aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-18 11:24:23 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-08-18 11:24:23 -0700
commita9dd9938c449ec775a4edede79cfe60c2832bb58 (patch)
tree581b851ddf8bdbe92a1cdaddce7b76bea15e2255
parentd5624ed82402bf4cf2d0010953ab9bdd26a8d389 (diff)
downloadltsi-kernel-a9dd9938c449ec775a4edede79cfe60c2832bb58.tar.gz
Update KERNEL_VERSION to 4.1.6
-rw-r--r--cfg/minnow-io.cfg20
-rw-r--r--patches.intel/i2c-i801-add-device-id-for-intel-wildcat-point-pch.patch67
-rw-r--r--patches.intel/i2c-i801-add-pci-id-for-intel-braswell.patch41
-rw-r--r--patches.intel/i2c-i801-fix-the-alignment-of-the-device-table.patch177
-rw-r--r--patches.intel/i2c-remove-define_pci_device_table-macro.patch261
-rw-r--r--patches.intel/mfd-delete-non-required-instances-of-include-linux-init.h.patch255
-rw-r--r--patches.intel/mfd-lpc_ich-add-device-ids-for-intel-9-series-pch.patch63
-rw-r--r--patches.intel/mfd-lpc_ich-add-pci-id-for-intel-braswell.patch53
-rw-r--r--patches.intel/mfd-lpc_ich-add-support-for-intel-avoton-gpios.patch41
-rw-r--r--patches.intel/mfd-lpc_ich-add-support-for-intel-bay-trail-soc.patch53
-rw-r--r--patches.intel/mfd-lpc_ich-add-support-for-itco-v3.patch218
-rw-r--r--patches.intel/mfd-lpc_ich-add-support-for-nm10-gpio.patch34
-rw-r--r--patches.intel/mfd-lpc_ich-change-avoton-to-itco-v3.patch36
-rw-r--r--patches.intel/mfd-lpc_ich-convert-ich-gpios-ids-to-enum.patch47
-rw-r--r--patches.intel/mfd-lpc_ich-enable-gpio-for-panther-point.patch32
-rw-r--r--patches.intel/mfd-lpc_ich-fix-acpi-enable-bitmask.patch37
-rw-r--r--patches.intel/mfd-lpc_ich-only-configure-watchdog-or-gpio-when-present.patch54
-rw-r--r--patches.intel/mfd-lpc_ich-remove-lpc_ich_cfg-struct-use.patch156
-rw-r--r--patches.intel/pwm-add-support-for-intel-low-power-subsystem-pwm.patch244
-rw-r--r--patches.intel/pwm-lpss-add-acpi-and-pci-ids-for-intel-braswell.patch55
-rw-r--r--patches.intel/pwm-lpss-add-support-for-pci-devices.patch254
-rw-r--r--patches.intel/pwm-lpss-fix-build-failure-on-powerpc.patch35
-rw-r--r--patches.intel/pwm-lpss-fix-const-qualifier-and-sparse-warnings.patch64
-rw-r--r--patches.intel/pwm-lpss-properly-split-driver-to-parts.patch446
-rw-r--r--patches.intel/pwm-lpss-remove-dependency-on-clk-framework.patch116
-rw-r--r--patches.intel/pwm-lpss-use-c99-initializers-in-structures.patch68
-rw-r--r--patches.intel/watchdog-fix-checkpatch-warnings-and-error.patch126
-rw-r--r--patches.intel/watchdog-itco_wdt-add-support-for-v3-silicon.patch320
-rw-r--r--patches.intel/watchdog-itco_wdt-fix-the-parent-device.patch37
-rw-r--r--patches.ltsi/ltsi-makefile-addition.patch8
-rw-r--r--patches.renesas/0001-clk-add-clock-indices-support.patch83
-rw-r--r--patches.renesas/0001-media-v4l-vsp1-Update-copyright-notice.patch215
-rw-r--r--patches.renesas/0002-ARM-shmobile-wait-for-MSTP-clock-status-to-toggle-wh.patch119
-rw-r--r--patches.renesas/0002-of-fdt-update-of_get_flat_dt_prop-in-prep-for-libfdt.patch526
-rw-r--r--patches.renesas/0003-clk-shmobile-div6-use-proper-description-in-kernel-d.patch33
-rw-r--r--patches.renesas/0004-clk-shmobile-add-CPG-driver-for-rz-platforms.patch174
-rw-r--r--patches.renesas/0005-clk-shmobile-rcar-gen2-fix-lb-sd0-sd1-sdh-clock-pare.patch56
-rw-r--r--patches.renesas/0006-clk-shmobile-fix-setting-paretn-clock-rate.patch35
-rw-r--r--patches.renesas/0007-clk-shmobile-clk-mstp-change-to-using-clock-indices.patch73
-rw-r--r--patches.renesas/0008-gpio-rcar-Add-helper-variable-dev-pdev-dev.patch114
-rw-r--r--patches.renesas/0009-mtd-m25p80-Add-dual-read-support.patch117
-rw-r--r--patches.renesas/0010-mtd-m25p80-Enable-Dual-SPI-read-transfers-for-s25fl2.patch35
-rw-r--r--patches.renesas/0011-mtd-delete-non-required-instances-of-include-linux-i.patch505
-rw-r--r--patches.renesas/0012-mtd-m25p80-Use-positive-logic-to-check-JEDEC-ID.patch34
-rw-r--r--patches.renesas/0013-mtd-m25p80-add-support-for-the-Spansion-s25fl008k-ch.patch30
-rw-r--r--patches.renesas/0014-mtd-m25p80-add-Macronix-mx66l1g55g-1Gbit-SPI-flash.patch28
-rw-r--r--patches.renesas/0015-pinctrl-Quiet-logging-about-missing-DT-nodes-when-no.patch36
-rw-r--r--patches.renesas/0016-drm-rcar-du-Handle-encoder-initialization-failures.patch35
-rw-r--r--patches.renesas/0017-ASoC-rsnd-tidyup-register-naming-of-BUSIF_MODE.patch62
-rw-r--r--patches.renesas/0018-ASoC-rsnd-cleanup-debug-information-method.patch122
-rw-r--r--patches.renesas/0019-ASoC-rsnd-remove-meaningless-rsnd_ssi_non.patch48
-rw-r--r--patches.renesas/0020-ASoC-rsnd-control-SCU-ops-in-probe-timing.patch97
-rw-r--r--patches.renesas/0021-ASoC-rsnd-add-rsnd_scu_init-and-separate-init-start.patch85
-rw-r--r--patches.renesas/0022-ASoC-rsnd-remove-meaningless-function-parameter.patch74
-rw-r--r--patches.renesas/0023-ASoC-rsnd-merge-rsnd_scu_start-stop-and-rsnd_scu_tra.patch103
-rw-r--r--patches.renesas/0024-ASoC-rsnd-rsnd_dai_is_clk_master-can-be-shared.patch81
-rw-r--r--patches.renesas/0025-ASoC-rsnd-remove-pin-sync-option.patch47
-rw-r--r--patches.renesas/0026-ASoC-rsnd-SSI_MODE0-1-settings-goes-to-scu.c.patch250
-rw-r--r--patches.renesas/0027-ASoC-rsnd-remove-ssiu-from-ssi.c.patch106
-rw-r--r--patches.renesas/0028-ASoC-rsnd-rename-rsnd_scu_convert_rate_ctrl.patch48
-rw-r--r--patches.renesas/0029-ASoC-rsnd-explain-SRC-bypass-mode-settings-in-commen.patch75
-rw-r--r--patches.renesas/0030-ASoC-rsnd-remove-duplicate-priv-from-rsnd_dma.patch63
-rw-r--r--patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch46
-rw-r--r--patches.renesas/0032-ASoC-rsnd-fixup-Gen2-module-naming.patch31
-rw-r--r--patches.renesas/0033-ASoC-rsnd-don-t-use-schedule_work-when-rsnd_dma_star.patch67
-rw-r--r--patches.renesas/0034-ASoC-rsnd-SCU-should-be-called-before-SSI.patch39
-rw-r--r--patches.renesas/0035-ASoC-rsnd-clarify-scu.c-area.patch43
-rw-r--r--patches.renesas/0036-ASoC-rsnd-Merge-macros-in-scu.c.patch68
-rw-r--r--patches.renesas/0037-ASoC-rsnd-rsnd_scu_hpbif_is_enable-become-macro.patch85
-rw-r--r--patches.renesas/0038-ASoC-rsnd-merge-SRC-clock-timing-setting.patch182
-rw-r--r--patches.renesas/0039-ASoC-rsnd-add-rsnd_ssi_is_play.patch67
-rw-r--r--patches.renesas/0040-ASoC-rsnd-extracts-Gen1-Gen2-common-parts.patch482
-rw-r--r--patches.renesas/0041-ASoC-rsnd-remove-SSI-dependent-DMAEngine-callback.patch294
-rw-r--r--patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch37
-rw-r--r--patches.renesas/0043-ASoC-rsnd-add-Gen2-SRC-and-DMAEngine-support.patch447
-rw-r--r--patches.renesas/0044-ASoC-rsnd-use-device-dependency-clock.patch84
-rw-r--r--patches.renesas/0045-ASoC-rsnd-tidyup-original-for_each_rsnd_xxx-macro.patch59
-rw-r--r--patches.renesas/0046-ASoC-rsnd-set-DIV_EN-register-on-rsnd_adg_set_conver.patch92
-rw-r--r--patches.renesas/0047-ASoC-rsnd-print-error-if-there-is-SRC-settings-misma.patch37
-rw-r--r--patches.renesas/0048-ASoC-rsnd-move-priv-member-settings-to-upper-side.patch44
-rw-r--r--patches.renesas/0049-ASoC-rsnd-move-rsnd_mod_call-macro.patch89
-rw-r--r--patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch176
-rw-r--r--patches.renesas/0051-ASoC-rsnd-remove-verbose-debug-message-from-scu-ssi.patch44
-rw-r--r--patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch80
-rw-r--r--patches.renesas/0053-ASoC-rsnd-tidyup-RSND_SSI_xxx-flags.patch35
-rw-r--r--patches.renesas/0054-ASoC-rsnd-run-rsnd_path_init-when-probe-timing.patch278
-rw-r--r--patches.renesas/0055-ASoC-rsnd-use-mod-array-instead-of-list-on-rdai.patch223
-rw-r--r--patches.renesas/0056-ASoC-rsnd-get-ssi-scu-from-rsnd_dai_stream.patch120
-rw-r--r--patches.renesas/0057-ASoC-rsnd-use-devm_clk_get-instead-of-clk_get.patch63
-rw-r--r--patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch67
-rw-r--r--patches.renesas/0059-ASoC-rsnd-remove-unused-SSI_CONTROL.patch41
-rw-r--r--patches.renesas/0060-ASoC-rsnd-modify-rsnd_adg_ssi_ws_timing_gen2-paramet.patch54
-rw-r--r--patches.renesas/0061-ASoC-rsnd-share-reg_field-and-reduce-memory.patch138
-rw-r--r--patches.renesas/0062-ASoC-rsnd-add-struct-rsnd_dai_platform_info.patch161
-rw-r--r--patches.renesas/0063-ASoC-rsnd-Get-correct-SCU-ID.patch230
-rw-r--r--patches.renesas/0064-ASoC-rsnd-add-rsnd_scu_enable_ssi_irq.patch101
-rw-r--r--patches.renesas/0065-ASoC-rsnd-call-rsnd_scu_ssi_mode_init-from-SSI.patch163
-rw-r--r--patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch83
-rw-r--r--patches.renesas/0067-ASoC-rsnd-use-mod-probe-method-on-SCU.patch113
-rw-r--r--patches.renesas/0068-ASoC-rsnd-use-mod-probe-method-on-SSI.patch184
-rw-r--r--patches.renesas/0069-ASoC-rsnd-nothing-to-do-on-rsnd_dai_remove.patch82
-rw-r--r--patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch133
-rw-r--r--patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch1616
-rw-r--r--patches.renesas/0072-ASoC-rcar-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch36
-rw-r--r--patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch531
-rw-r--r--patches.renesas/0074-ASoC-rcar-bugfix-it-cares-about-the-non-src-case.patch51
-rw-r--r--patches.renesas/0075-ASoC-rsnd-fix-clock-prepare-unprepare.patch68
-rw-r--r--patches.renesas/0076-ASoC-rsnd-call-rsnd_dai_pointer_update-from-outside-.patch44
-rw-r--r--patches.renesas/0077-thermal-rcar-thermal-fix-same-mask-applied-twice.patch33
-rw-r--r--patches.renesas/0078-thermal-rcar-thermal-update-thermal-zone-only-when-t.patch75
-rw-r--r--patches.renesas/0079-spi-rspi-Remove-unused-mesg-parameter-from-send-rece.patch110
-rw-r--r--patches.renesas/0080-spi-rspi-Use-core-message-handling.patch200
-rw-r--r--patches.renesas/0081-spi-rspi-Abstract-8-16-bit-Data-Register-access.patch183
-rw-r--r--patches.renesas/0082-spi-rspi-Add-rspi_data_-out-in-out_in-helpers.patch194
-rw-r--r--patches.renesas/0083-spi-rspi-Abstract-transfer_one-for-RSPI-and-QSPI.patch115
-rw-r--r--patches.renesas/0084-spi-rspi-Merge-rspi_send_pio-and-rspi_receive_pio.patch158
-rw-r--r--patches.renesas/0085-spi-rspi-Merge-qspi_send_pio-and-qspi_receive_pio.patch130
-rw-r--r--patches.renesas/0086-spi-rspi-Add-support-for-more-than-one-interrupt.patch242
-rw-r--r--patches.renesas/0087-spi-rspi-Add-support-for-RSPI-on-RZ-A1H.patch214
-rw-r--r--patches.renesas/0088-spi-rspi-Add-support-for-loopback-mode.patch87
-rw-r--r--patches.renesas/0089-spi-rspi-Convert-to-clk_prepare_enable-disable_unpre.patch55
-rw-r--r--patches.renesas/0090-spi-rspi-Use-NULL-as-the-clock-ID.patch40
-rw-r--r--patches.renesas/0091-spi-rspi-Add-DT-support.patch250
-rw-r--r--patches.renesas/0092-spi-rspi-Add-support-for-Quad-and-Dual-SPI-Transfers.patch314
-rw-r--r--patches.renesas/0093-spi-rspi-fix-build-error-when-CONFIG_OF-is-not-set.patch34
-rw-r--r--patches.renesas/0094-spi-rspi-Only-enable-interrupts-when-there-s-a-need-.patch64
-rw-r--r--patches.renesas/0095-spi-rspi-Remove-empty-rspi_cleanup.patch41
-rw-r--r--patches.renesas/0096-spi-rspi-Fix-loopback-mode-for-Dual-Quad-SPI-Transfe.patch38
-rw-r--r--patches.renesas/0097-spi-rspi-Add-runtime-PM-support-using-spi-core-auto_.patch65
-rw-r--r--patches.renesas/0098-sh-intc-Enable-driver-compilation-with-COMPILE_TEST.patch31
-rw-r--r--patches.renesas/0099-drivers-sh-compile-drivers-sh-pm_runtime.c-if-ARCH_S.patch116
-rw-r--r--patches.renesas/0100-sh_eth-use-ETH_ZLEN-instead-of-home-grown-define.patch50
-rw-r--r--patches.renesas/0101-sh_eth-add-device-tree-support.patch200
-rw-r--r--patches.renesas/0102-sh_eth-update-OF-PHY-registeration.patch148
-rw-r--r--patches.renesas/0103-sh_eth-exit-probe-with-unknown-register-layout.patch48
-rw-r--r--patches.renesas/0104-sh_eth-convert-pr_-to-netdev_-calls.patch53
-rw-r--r--patches.renesas/0105-sh_eth-convert-dev_-to-netdev_-calls.patch180
-rw-r--r--patches.renesas/0106-sh_eth-fold-netif_msg_-and-netdev_-calls-into-netif_.patch112
-rw-r--r--patches.renesas/0107-sh_eth-Use-the-platform-device-for-memory-allocation.patch54
-rw-r--r--patches.renesas/0108-sh_eth-Use-the-platform-device-as-the-MDIO-bus-paren.patch35
-rw-r--r--patches.renesas/0109-sh_eth-Simplify-MDIO-bus-initialization-and-release.patch110
-rw-r--r--patches.renesas/0110-sh_eth-Register-MDIO-bus-before-registering-the-netw.patch77
-rw-r--r--patches.renesas/0111-sh_eth-Remove-goto-statements-that-jump-straight-to-.patch121
-rw-r--r--patches.renesas/0112-sh_eth-ensure-pm_runtime-cannot-suspend-the-device-d.patch77
-rw-r--r--patches.renesas/0113-mmc-sh_mobile_sdhi-Use-modern-PM-macros-to-define-pm.patch36
-rw-r--r--patches.renesas/0114-mmc-tmio_mmc-Convert-from-legacy-to-modern-PM-ops.patch92
-rw-r--r--patches.renesas/0115-mmc-tmio-Adapt-to-proper-PM-configs-for-exported-fun.patch77
-rw-r--r--patches.renesas/0116-mmc-sdhi-tidyup-sh_mobile_sdhi_of_match-position.patch64
-rw-r--r--patches.renesas/0117-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7778.patch59
-rw-r--r--patches.renesas/0118-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7779.patch32
-rw-r--r--patches.renesas/0119-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7790.patch61
-rw-r--r--patches.renesas/0120-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7791.patch31
-rw-r--r--patches.renesas/0121-pinctrl-sh-pfc-r8a7791-Add-QSPI-pin-groups.patch116
-rw-r--r--patches.renesas/0122-pinctrl-sh-pfc-r8a7790-Break-out-USB0-OVC-VBUS.patch55
-rw-r--r--patches.renesas/0123-pinctrl-sh-pfc-r8a7790-Add-QSPI-pin-groups.patch87
-rw-r--r--patches.renesas/0124-pinctrl-pfc-r8a7791-add-mux-data-for-IIC-B-cores.patch113
-rw-r--r--patches.renesas/0125-pinctrl-sh-pfc-r8a7790-Add-alternative-MSIOF-pin-gro.patch212
-rw-r--r--patches.renesas/0126-pinctrl-sh-pfc-r8a7791-Add-alternative-MSIOF-pin-gro.patch551
-rw-r--r--patches.renesas/0127-sh-pfc-r8a7790-Fix-definition-of-IPSR5.patch34
-rw-r--r--patches.renesas/0128-sh-pfc-r8a7791-Fix-definition-of-MOD_SEL3.patch32
-rw-r--r--patches.renesas/0129-serial-sh-sci-Fix-cast-warning.patch35
-rw-r--r--patches.renesas/0130-serial-sh-sci-Fix-compatible-string-in-DT-bindings-e.patch34
-rw-r--r--patches.renesas/0131-serial-sh-sci-Add-missing-call-to-uart_remove_one_po.patch39
-rw-r--r--patches.renesas/0132-serial-sh-sci-Replace-printk-by-pr_.patch52
-rw-r--r--patches.renesas/0133-serial-sh-sci-Remove-useless-casts.patch52
-rw-r--r--patches.renesas/0134-serial-sh-sci-Add-more-register-documentation.patch237
-rw-r--r--patches.renesas/0135-serial-sh-sci-Replace-hardcoded-3-by-UART_PM_STATE_O.patch31
-rw-r--r--patches.renesas/0136-serial-sh-sci-Neaten-dev_-level-uses.patch141
-rw-r--r--patches.renesas/0137-cpufreq-remove-unused-notifier-CPUFREQ_-SUSPENDCHANG.patch157
-rw-r--r--patches.renesas/0138-media-media-soc_camera-rcar_vin-Add-support-for-10-b.patch54
-rw-r--r--patches.renesas/0139-i2c-add-deprecation-warning-for-class-based-instanti.patch47
-rw-r--r--patches.renesas/0140-i2c-rcar-add-compatible-entry-for-r8a7791.patch65
-rw-r--r--patches.renesas/0141-i2c-i2c-rcar-deprecate-class-based-instantiation.patch31
-rw-r--r--patches.renesas/0142-regulator-da9210-Remove-redundant-error-message.patch35
-rw-r--r--patches.renesas/0143-spi-Provide-core-support-for-DMA-mapping-transfers.patch186
-rw-r--r--patches.renesas/0144-spi-Provide-core-support-for-full-duplex-devices.patch116
-rw-r--r--patches.renesas/0145-spi-core-Ignore-unsupported-spi-tr-x-bus-width-prope.patch51
-rw-r--r--patches.renesas/0146-spi-Make-core-DMA-mapping-functions-generate-scatter.patch285
-rw-r--r--patches.renesas/0147-regulator-core-Allow-regulator_set_voltage-for-fixed.patch48
-rw-r--r--patches.renesas/0148-DMA-shdma-Fix-warnings-due-to-improper-casts-and-pri.patch90
-rw-r--r--patches.renesas/0149-shdma-add-R-Car-Audio-DMAC-peri-peri-driver.patch419
-rw-r--r--patches.renesas/0150-of-add-functions-to-count-number-of-elements-in-a-pr.patch164
-rw-r--r--patches.renesas/0151-ASoC-add-snd_soc_of_parse_audio_simple_widgets-for-D.patch144
-rw-r--r--patches.renesas/0152-ASoC-core-add-TDM-slot-parsing-from-DT-supports.patch149
-rw-r--r--patches.renesas/0153-clocksource-Add-Kconfig-entries-for-CMT-MTU2-TMU-and.patch74
-rw-r--r--patches.renesas/0154-clocksource-CMT-MTU2-TMU-and-STI-should-depend-on-GE.patch78
-rw-r--r--patches.renesas/0155-regulator-gpio-regulator-Remove-unneeded-OOM-error-m.patch35
-rw-r--r--patches.renesas/0156-regulator-gpio-add-gpios-status-for-DT.patch64
-rw-r--r--patches.renesas/0157-regulator-gpio-Document-regulator-type-property.patch29
-rw-r--r--patches.renesas/0158-regulator-gpio-print-warning-if-gpios-gpios-states-m.patch30
-rw-r--r--patches.renesas/0159-regulator-gpio-explain-detail-of-gpios-states.patch32
-rw-r--r--patches.renesas/0160-regulator-gpio-regulator-do-not-open-code-counting-a.patch73
-rw-r--r--patches.renesas/0161-regulator-gpio-regulator-fix-forgotten-gpios-states-.patch62
-rw-r--r--patches.renesas/0162-ASoC-simple-card-simplify-code.patch49
-rw-r--r--patches.renesas/0163-ASoC-simple-card-simplify-code.patch84
-rw-r--r--patches.renesas/0164-ASoC-simple-card-simplify-code.patch171
-rw-r--r--patches.renesas/0165-ASoC-simple-card-simplify-code.patch107
-rw-r--r--patches.renesas/0166-ASoC-simple-card-simplify-code.patch109
-rw-r--r--patches.renesas/0167-ASoC-simple-card-simplify-code.patch112
-rw-r--r--patches.renesas/0168-ASoC-simple-card-simplify-code.patch84
-rw-r--r--patches.renesas/0169-ASoC-simple-card-simplify-code.patch118
-rw-r--r--patches.renesas/0170-ASoC-simple-card-fix-__asoc_simple_card_dai_init.patch60
-rw-r--r--patches.renesas/0171-ASoC-simple-card-simplify-the-daifmt-code.patch99
-rw-r--r--patches.renesas/0172-ASoC-simple-card-Add-snd_card-s-name-parsing-from-DT.patch49
-rw-r--r--patches.renesas/0173-ASoC-simple-card-add-off-codec-widgets-supports.patch35
-rw-r--r--patches.renesas/0174-ASoC-simple-card-for-new-properties-documenting-and-.patch58
-rw-r--r--patches.renesas/0175-ASoC-simple-card-add-slot-information-parsing-suppor.patch105
-rw-r--r--patches.renesas/0176-ASoC-simple-card-cpu_dai_name-creates-confusion-when.patch53
-rw-r--r--patches.renesas/0177-ASoC-simple-card-tidyup-cpu-codec-dai_fmt-settings-f.patch37
-rw-r--r--patches.renesas/0178-ASoC-simple-card-card-name-can-be-option.patch41
-rw-r--r--patches.renesas/0179-ASoC-simple-card-Fix-the-reference-count-of-device-n.patch140
-rw-r--r--patches.renesas/0180-ASoC-simple-card-Simplify-code.patch76
-rw-r--r--patches.renesas/0181-ASoC-simple-card-overwrite-cpu_dai-fmt-with-codec_da.patch109
-rw-r--r--patches.renesas/0182-ASoC-simple-card-dynamically-allocate-the-DAI-link-a.patch117
-rw-r--r--patches.renesas/0183-ASoC-simple-card-Add-DT-documentation-for-multi-DAI-.patch83
-rw-r--r--patches.renesas/0184-ASoC-simple-card-Handle-many-DAI-links.patch287
-rw-r--r--patches.renesas/0185-spi-delete-non-required-instances-of-include-linux-i.patch397
-rw-r--r--patches.renesas/0186-spi-sh-msiof-Fix-SPI-bus-population-from-DT.patch31
-rw-r--r--patches.renesas/0187-spi-sh-msiof-Typo-in-comment-s-tx-rx.patch29
-rw-r--r--patches.renesas/0188-spi-sh-msiof-Change-hz-from-unsigned-long-to-u32.patch45
-rw-r--r--patches.renesas/0189-spi-sh-msiof-Add-more-register-documentation.patch215
-rw-r--r--patches.renesas/0190-spi-sh-msiof-Use-the-core-cs_gpio-field-and-make-it-.patch72
-rw-r--r--patches.renesas/0191-spi-sh-msiof-Improve-bindings.patch75
-rw-r--r--patches.renesas/0192-spi-sh-msiof-Move-default-FIFO-sizes-to-device-ID-da.patch147
-rw-r--r--patches.renesas/0193-spi-sh-msiof-Add-support-for-R-Car-H2-and-M2.patch174
-rw-r--r--patches.renesas/0194-spi-sh-msiof-Move-clock-management-to-un-prepare_mes.patch134
-rw-r--r--patches.renesas/0195-spi-sh-msiof-Convert-to-let-spi-core-validate-xfer-b.patch60
-rw-r--r--patches.renesas/0196-spi-sh-msiof-Use-core-message-handling-instead-of-sp.patch186
-rw-r--r--patches.renesas/0197-spi-sh-msiof-Kill-sh_msiof_spi_bits-and-sh_msiof_spi.patch71
-rw-r--r--patches.renesas/0198-spi-sh-msiof-Remove-renesas-msiof-sh7724-from-bindin.patch31
-rw-r--r--patches.renesas/0199-spi-sh-msiof-Convert-to-spi-core-auto_runtime_pm-fra.patch89
-rw-r--r--patches.renesas/0200-ARM-shmobile-dts-Remove-r8a7791-koelsch-reference.dt.patch141
-rw-r--r--patches.renesas/0201-ARM-shmobile-Add-GPIO-keys-to-Koelsch-DTS.patch84
-rw-r--r--patches.renesas/0202-ARM-shmobile-koelsch-1-1-GiB-memory-in-DT.patch37
-rw-r--r--patches.renesas/0203-ARM-shmobile-r8a7791-Add-thermal-clock-in-device-tre.patch31
-rw-r--r--patches.renesas/0204-ARM-shmobile-r8a7790-Add-thermal-clock-in-device-tre.patch31
-rw-r--r--patches.renesas/0205-ARM-shmobile-r8a7791-Add-serial-ports-to-the-device-.patch209
-rw-r--r--patches.renesas/0206-ARM-shmobile-r8a7790-Add-serial-ports-to-the-device-.patch130
-rw-r--r--patches.renesas/0207-ARM-shmobile-r8a7790-Add-VIN-clocks-to-device-tree.patch37
-rw-r--r--patches.renesas/0208-ARM-shmobile-r8a7791-Add-VIN-clocks-to-device-tree.patch37
-rw-r--r--patches.renesas/0209-ARM-shmobile-r8a7790-Add-SATA-clocks-to-device-tree.patch41
-rw-r--r--patches.renesas/0210-ARM-shmobile-r8a7791-Add-SATA-clocks-to-device-tree.patch40
-rw-r--r--patches.renesas/0211-ARM-shmobile-r8a7791-Add-SATA-nodes-to-r8a7791.dtsi.patch48
-rw-r--r--patches.renesas/0212-ARM-shmobile-koelsch-Enable-SATA0-in-r8a7791-koelsch.patch33
-rw-r--r--patches.renesas/0213-ARM-shmobile-r8a7790-Add-SATA-nodes-to-r8a7790.dtsi.patch48
-rw-r--r--patches.renesas/0214-ARM-shmobile-lager-Enable-SATA1-in-r8a7790-lager.dts.patch33
-rw-r--r--patches.renesas/0215-ARM-shmobile-r8a7790-Fix-serial-ports-DT-compatible-.patch113
-rw-r--r--patches.renesas/0216-ARM-shmobile-r8a7790-Replace-IRQ-type-numerical-valu.patch112
-rw-r--r--patches.renesas/0217-ARM-shmobile-Lager-conditionally-select-CONFIG_MICRE.patch40
-rw-r--r--patches.renesas/0218-ARM-shmobile-bockw-use-SSI-DMAEngine-for-sound.patch45
-rw-r--r--patches.renesas/0219-ARM-shmobile-bockw-use-HPBIF-DMAEngine-for-sound.patch58
-rw-r--r--patches.renesas/0220-ARM-shmobile-bockw-add-USB-Func-DMAEngine-support.patch29
-rw-r--r--patches.renesas/0221-ARM-shmobile-koelsch-Conditionally-select-MICREL_PHY.patch32
-rw-r--r--patches.renesas/0222-ARM-mach-shmobile-kzm9g-add-zboot-support.patch506
-rw-r--r--patches.renesas/0223-ARM-shmobile-lager-Add-VIN1-SoC-camera-support.patch141
-rw-r--r--patches.renesas/0224-ARM-shmobile-kzm9d-Use-common-clock-framework.patch45
-rw-r--r--patches.renesas/0225-ARM-shmobile-lager-Make-spi_flash_data-const.patch29
-rw-r--r--patches.renesas/0226-ARM-shmobile-lager-Add-SATA-support.patch57
-rw-r--r--patches.renesas/0227-ARM-shmobile-koelsch-Add-SATA0-support.patch56
-rw-r--r--patches.renesas/0228-ARM-shmobile-ape6evm-Conditionally-select-SMSC_PHY.patch37
-rw-r--r--patches.renesas/0229-ARM-shmobile-armadillo800eva-Conditionally-select-SM.patch39
-rw-r--r--patches.renesas/0230-ARM-shmobile-bockw-Sort-Kconfig-node-s-selections.patch33
-rw-r--r--patches.renesas/0231-ARM-shmobile-r8a7779-Wait-for-status-on-selected-MST.patch57
-rw-r--r--patches.renesas/0232-ARM-shmobile-r8a7790-Wait-for-status-on-all-MSTP-clo.patch158
-rw-r--r--patches.renesas/0233-ARM-shmobile-r8a7791-Add-I2C-clocks.patch59
-rw-r--r--patches.renesas/0234-ARM-shmobile-r8a7791-Add-VIN-clocks.patch80
-rw-r--r--patches.renesas/0235-ARM-shmobile-Remove-duplicate-shmobile_invalidate_st.patch29
-rw-r--r--patches.renesas/0236-ARM-shmobile-r8a7779-Remove-unused-clock-constants.patch38
-rw-r--r--patches.renesas/0237-ARM-shmobile-emev2-Use-__initconst-for-const-init-de.patch35
-rw-r--r--patches.renesas/0238-ARM-shmobile-r8a7791-Wait-for-status-on-all-MSTP-clo.patch111
-rw-r--r--patches.renesas/0239-ARM-shmobile-r8a7790-add-Audio-DMAC-clock.patch48
-rw-r--r--patches.renesas/0240-ARM-shmobile-r8a7790-add-Audio-DMAC-support.patch177
-rw-r--r--patches.renesas/0241-ARM-shmobile-r8a7790-Add-VIN-clock-support.patch54
-rw-r--r--patches.renesas/0242-ARM-shmobile-r8a7790-Add-SATA-clocks.patch51
-rw-r--r--patches.renesas/0243-ARM-shmobile-r8a7791-Add-ZS-clock.patch46
-rw-r--r--patches.renesas/0244-ARM-shmobile-r8a7791-Add-SATA-clocks.patch48
-rw-r--r--patches.renesas/0245-ARM-shmobile-r7s72100-really-add-i2c-clocks.patch37
-rw-r--r--patches.renesas/0246-ARM-shmobile-r8a7790-Add-PCI-USB-host-clock-support.patch50
-rw-r--r--patches.renesas/0247-ARM-shmobile-lager-Enable-VIN-along-with-ADV7180-dec.patch39
-rw-r--r--patches.renesas/0248-ARM-shmobile-koelsch-Enable-SATA-in-defconfig.patch40
-rw-r--r--patches.renesas/0249-ARM-shmobile-koelsch-Enable-DEVTMPFS_MOUNT-in-defcon.patch33
-rw-r--r--patches.renesas/0250-ARM-shmobile-lager-Enable-SATA-in-defconfig.patch32
-rw-r--r--patches.renesas/0251-ARM-shmobile-marzen-enable-CONFIG_DEVTMPFS-in-defcon.patch37
-rw-r--r--patches.renesas/0252-ARM-shmobile-mackerel-enable-CONFIG_DEVTMPFS-in-defc.patch32
-rw-r--r--patches.renesas/0253-ARM-shmobile-lager-enable-CONFIG_DEVTMPFS-in-defconf.patch34
-rw-r--r--patches.renesas/0254-ARM-shmobile-kzm9g-enable-CONFIG_DEVTMPFS-in-defconf.patch32
-rw-r--r--patches.renesas/0255-ARM-shmobile-kzm9d-enable-CONFIG_DEVTMPFS-in-defconf.patch32
-rw-r--r--patches.renesas/0256-ARM-shmobile-genmai-enable-CONFIG_DEVTMPFS-in-defcon.patch32
-rw-r--r--patches.renesas/0257-ARM-shmobile-bockw-enable-CONFIG_DEVTMPFS-in-defconf.patch35
-rw-r--r--patches.renesas/0258-ARM-shmobile-armadillo-enable-CONFIG_DEVTMPFS-in-def.patch32
-rw-r--r--patches.renesas/0259-ARM-shmobile-ape6evm-enable-CONFIG_DEVTMPFS-in-defco.patch32
-rw-r--r--patches.renesas/0260-ARM-shmobile-kzm9d-Conditionally-select-SMSC_PHY.patch35
-rw-r--r--patches.renesas/0261-ARM-shmobile-mackerel-Conditionally-select-SMSC_PHY.patch31
-rw-r--r--patches.renesas/0262-ARM-shmobile-marzen-Conditionally-select-SMSC_PHY.patch39
-rw-r--r--patches.renesas/0263-ARM-shmobile-lager-fix-error-return-code-check-from-.patch50
-rw-r--r--patches.renesas/0264-ARM-shmobile-koelsch-fix-error-return-code-check-fro.patch50
-rw-r--r--patches.renesas/0265-ARM-shmobile-lager-Add-USBHS-support.patch196
-rw-r--r--patches.renesas/0266-ARM-shmobile-Remove-Lager-USBHS-UDC-ifdefs.patch46
-rw-r--r--patches.renesas/0267-ARM-shmobile-Lager-pass-Ether-PHY-IRQ.patch49
-rw-r--r--patches.renesas/0268-ARM-shmobile-Koelsch-pass-Ether-PHY-IRQ.patch49
-rw-r--r--patches.renesas/0269-ARM-shmobile-koelsch-Add-I2C-support.patch93
-rw-r--r--patches.renesas/0270-ARM-shmobile-koelsch-Enable-I2C-in-defconfig.patch31
-rw-r--r--patches.renesas/0271-ARM-shmobile-bockw-use-wp-gpios-instead-of-WP-pin.patch52
-rw-r--r--patches.renesas/0272-ARM-shmobile-Lager-USB0-cable-detection-workaround.patch83
-rw-r--r--patches.renesas/0273-ARM-shmobile-lager-add-sound-support.patch179
-rw-r--r--patches.renesas/0274-ARM-shmobile-lager-add-sound-support-on-defconfig.patch31
-rw-r--r--patches.renesas/0275-Revert-ARM-shmobile-marzen-Conditionally-select-SMSC.patch40
-rw-r--r--patches.renesas/0276-ARM-shmobile-genmai-legacy-Add-RSPI-support.patch86
-rw-r--r--patches.renesas/0277-ARM-shmobile-r7s72100-dtsi-Add-RSPI-nodes.patch128
-rw-r--r--patches.renesas/0278-ARM-shmobile-koelsch-legacy-Add-QSPI-support.patch124
-rw-r--r--patches.renesas/0279-ARM-shmobile-r8a7791-dtsi-Add-QSPI-node.patch38
-rw-r--r--patches.renesas/0280-ARM-shmobile-koelsch-dts-Add-QSPI-nodes.patch69
-rw-r--r--patches.renesas/0281-ARM-shmobile-lager-legacy-Switch-QSPI-to-named-IRQs.patch30
-rw-r--r--patches.renesas/0282-ARM-shmobile-koelsch-defconfig-Enable-RSPI-and-MTD_M.patch43
-rw-r--r--patches.renesas/0283-ARM-shmobile-genmai-defconfig-Enable-RSPI.patch30
-rw-r--r--patches.renesas/0284-ARM-shmobile-genmai-Enable-r7s72100-ether.patch61
-rw-r--r--patches.renesas/0285-ARM-shmobile-Add-SDHI-devices-for-legacy-Koelsch.patch214
-rw-r--r--patches.renesas/0286-ARM-shmobile-lager-add-SDHI0-2-support.patch123
-rw-r--r--patches.renesas/0287-ARM-shmobile-lager-legacy-Add-QSPI-pinmux.patch33
-rw-r--r--patches.renesas/0288-ARM-shmobile-r8a7790-dtsi-Add-QSPI-node.patch38
-rw-r--r--patches.renesas/0289-ARM-shmobile-lager-dts-Add-QSPI-nodes.patch71
-rw-r--r--patches.renesas/0290-ARM-shmobile-lager-defconfig-Enable-RSPI-and-MTD_M25.patch43
-rw-r--r--patches.renesas/0291-ARM-shmobile-lager-add-SDHI0-2-support-on-DTS.patch117
-rw-r--r--patches.renesas/0292-ARM-shmobile-r8a7778-dtsi-Remove-duplicate-i2c-nodes.patch72
-rw-r--r--patches.renesas/0293-ARM-shmobile-Add-defconfig-for-shmobile-multiplatfor.patch160
-rw-r--r--patches.renesas/0294-ARM-shmobile-lager-Add-internal-USB-PCI-support.patch96
-rw-r--r--patches.renesas/0295-ARM-shmobile-lager-reference-Refactor-clock-lookup-h.patch77
-rw-r--r--patches.renesas/0296-ARM-shmobile-lager-Add-DU-device-to-DTS.patch43
-rw-r--r--patches.renesas/0297-ARM-shmobile-lager-reference-Add-DU-device.patch120
-rw-r--r--patches.renesas/0298-ARM-shmobile-koelsch-reference-Refactor-clock-lookup.patch81
-rw-r--r--patches.renesas/0299-ARM-shmobile-koelsch-reference-Add-DU-device.patch113
-rw-r--r--patches.renesas/0300-ARM-shmobile-koelsch-reference-Add-DU-device-to-DTS.patch43
-rw-r--r--patches.renesas/0301-ARM-shmobile-r8a7791-remove-superfluous-interrupt-pa.patch271
-rw-r--r--patches.renesas/0302-ARM-shmobile-r8a7790-remove-superfluous-interrupt-pa.patch271
-rw-r--r--patches.renesas/0303-ARM-shmobile-r8a7790-add-i2c-aliases-to-dtsi.patch35
-rw-r--r--patches.renesas/0304-ARM-shmobile-Armadillo-800-EVA-set-proper-DMA-masks-.patch34
-rw-r--r--patches.renesas/0305-ARM-shmobile-BOCK-W-set-proper-DMA-masks-for-Ether-d.patch67
-rw-r--r--patches.renesas/0306-ARM-shmobile-Lager-set-proper-DMA-masks-for-Ether-de.patch70
-rw-r--r--patches.renesas/0307-ARM-shmobile-Koelsch-set-proper-DMA-masks-for-Ether-.patch70
-rw-r--r--patches.renesas/0308-ARM-shmobile-Genmai-set-proper-DMA-masks-for-Ether-d.patch65
-rw-r--r--patches.renesas/0309-ARM-shmobile-Get-rid-of-legacy-KZM9D-defconfig.patch118
-rw-r--r--patches.renesas/0310-ARM-shmobile-koelsch-Enable-SDHI-GPIO-and-regulators.patch56
-rw-r--r--patches.renesas/0311-ARM-shmobile-Remove-KZM9D-board-code.patch106
-rw-r--r--patches.renesas/0312-ARM-shmobile-Remove-Koelsch-DT-reference-legacy-cloc.patch44
-rw-r--r--patches.renesas/0313-ARM-shmobile-Remove-Lager-DT-reference-legacy-clock-.patch43
-rw-r--r--patches.renesas/0314-ARM-shmobile-r8a7791-add-i2c-master-nodes-to-dtsi.patch104
-rw-r--r--patches.renesas/0315-ARM-shmobile-r8a7791-add-i2c2-bus-to-koelsch-dt.patch53
-rw-r--r--patches.renesas/0316-ARM-shmobile-r7s72100-add-nodes-for-i2c-controllers-.patch107
-rw-r--r--patches.renesas/0317-ARM-shmobile-genmai-adapt-dts-to-use-native-i2c-driv.patch39
-rw-r--r--patches.renesas/0318-ARM-shmobile-r7s72100-update-defconfig-for-I2C-usage.patch42
-rw-r--r--patches.renesas/0319-usb-host-remove-selects-of-USB_ARCH_HAS_-HCI.patch310
-rw-r--r--patches.renesas/0320-ARM-centralize-common-multi-platform-kconfig-options.patch768
-rw-r--r--patches.renesas/0321-ARM-select-HAVE_SMP-for-V7-multi-platform.patch272
-rw-r--r--patches.renesas/0322-ARM-select-MIGHT_HAVE_CACHE_L2X0-for-V6-and-V7-multi.patch163
-rw-r--r--patches.renesas/0323-ARM-shmobile-r8a7778-add-audio-clock-in-new-style.patch39
-rw-r--r--patches.renesas/0324-ARM-shmobile-r8a7790-add-audio-clock.patch111
-rw-r--r--patches.renesas/0325-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks.patch71
-rw-r--r--patches.renesas/0326-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks-for-DT.patch36
-rw-r--r--patches.renesas/0327-ARM-shmobile-r8a7791-clock-add-QSPI-clocks.patch85
-rw-r--r--patches.renesas/0328-ARM-shmobile-r7s72100-Add-clock-for-r7s72100-ether.patch52
-rw-r--r--patches.renesas/0329-ARM-shmobile-Add-r8a7791-legacy-SDHI-clocks.patch123
-rw-r--r--patches.renesas/0330-ARM-shmobile-Remove-legacy-r8a7790-DT-clocks.patch58
-rw-r--r--patches.renesas/0331-ARM-shmobile-Use-64-bit-dma_addr_t-on-r8a7790-r8a779.patch49
-rw-r--r--patches.renesas/0332-ARM-shmobile-Break-out-R-Car-SYSC-PM-code.patch498
-rw-r--r--patches.renesas/0333-ARM-shmobile-r8a7790-SYSC-setup-code.patch100
-rw-r--r--patches.renesas/0334-ARM-shmobile-r8a7790-CA7-SCU-enablement.patch57
-rw-r--r--patches.renesas/0335-ARM-shmobile-r8a7790-CA15-SCU-enablement.patch45
-rw-r--r--patches.renesas/0336-ARM-shmobile-Remove-__init-from-rcar_gen2_read_mode_.patch34
-rw-r--r--patches.renesas/0337-ARM-shmobile-r8a7791-Remove-legacy-clock-aliases-for.patch33
-rw-r--r--patches.renesas/0338-ARM-shmobile-r8a7790-add-sound-SCU-clock-support.patch70
-rw-r--r--patches.renesas/0339-ARM-shmobile-r8a7790-add-Ether-DT-support.patch50
-rw-r--r--patches.renesas/0340-ARM-shmobile-lager-add-Ether-DT-support.patch71
-rw-r--r--patches.renesas/0341-ARM-shmobile-r8a7791-add-Ether-DT-support.patch50
-rw-r--r--patches.renesas/0342-ARM-shmobile-koelsch-add-Ether-DT-support.patch70
-rw-r--r--patches.renesas/0343-ARM-shmobile-r8a7791-fix-clock-index-for-i2c5.patch30
-rw-r--r--patches.renesas/0344-ARM-shmobile-r8a7791-dtsi-Fix-typo-in-msiof2-clock-o.patch33
-rw-r--r--patches.renesas/0345-ARM-shmobile-Move-SYSC-base-variable-to-inside-ifdef.patch40
-rw-r--r--patches.renesas/0346-ARM-shmobile-Add-SDHI-devices-to-r8a7791-DTSI.patch56
-rw-r--r--patches.renesas/0347-ARM-shmobile-Add-SDHI-devices-for-Koelsch-DTS.patch167
-rw-r--r--patches.renesas/0348-ARM-shmobile-APMU-Fix-warnings-due-to-improper-print.patch34
-rw-r--r--patches.renesas/0349-ARM-shmobile-r7s72100-fix-bus-clock-calculation.patch32
-rw-r--r--patches.renesas/0350-ARM-shmobile-Remove-CMT-TMU-and-STI-Kconfig-entries.patch162
-rw-r--r--patches.renesas/0351-ARM-shmobile-r8a7791-Fix-SCIFA3-5-clocks.patch72
-rw-r--r--patches.renesas/0352-ASoC-fsi-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch154
-rw-r--r--patches.renesas/0353-ASoC-fsi-fixup-compile-error-for-simple-card.patch38
-rw-r--r--patches.renesas/0354-ARM-bockw-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch87
-rw-r--r--patches.renesas/0355-Kconfig-rename-HAS_IOPORT-to-HAS_IOPORT_MAP.patch763
-rw-r--r--patches.renesas/0356-ARM-shmobile-lager-correct-renesas-gpios-to-renesas-.patch43
-rw-r--r--patches.renesas/0357-ARM-shmobile-lager-fixup-SND_SOC_DAIFMT_CBx_CFx-flag.patch42
-rw-r--r--patches.renesas/0358-ARM-shmobile-armadillo800eva-fixup-SND_SOC_DAIFMT_CB.patch33
-rw-r--r--patches.renesas/0359-ARM-shmobile-r8a7778-Use-clks-as-MSTP007-parent.patch33
-rw-r--r--patches.renesas/0360-ARM-shmobile-sh73a0-drop-address-cells-from-GIC-node.patch36
-rw-r--r--patches.renesas/0361-ARM-shmobile-r8a7740-drop-address-cells-from-GIC-nod.patch36
-rw-r--r--patches.renesas/0362-ARM-shmobile-koelsch-correct-renesas-gpios-to-renesa.patch47
-rw-r--r--patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch52
-rw-r--r--patches.renesas/0364-ASoC-rcar-subnode-tidyup-for-renesas-rsnd.txt.patch50
-rw-r--r--patches.renesas/0365-ARM-shmobile-r8a7790-Correct-SYS-DMAC-clock-defines.patch38
-rw-r--r--patches.renesas/0366-media-v4l-vsp1-Remove-unexisting-rt-clocks.patch124
-rw-r--r--patches.renesas/0367-media-v4l-vsp1-uds-Enable-scaling-of-alpha-layer.patch42
-rw-r--r--patches.renesas/0368-media-v4l-vsp1-Support-multi-input-entities.patch254
-rw-r--r--patches.renesas/0369-media-v4l-vsp1-Add-BRU-support.patch817
-rw-r--r--patches.renesas/0370-media-v4l-vsp1-Add-DT-support.patch133
-rw-r--r--patches.renesas/0371-ASoC-ak4642-Add-ALC-controls.patch32
-rw-r--r--patches.renesas/0372-ASoC-ak4642-Add-driver-data-and-driver-private-struc.patch119
-rw-r--r--patches.renesas/0373-ASoC-ak4642-Add-support-for-extended-sysclk-frequenc.patch76
-rw-r--r--patches.renesas/0374-gpio-rcar-Add-optional-functional-clock-to-bindings.patch36
-rw-r--r--patches.renesas/0375-gpio-rcar-Add-minimal-runtime-PM-support.patch61
-rw-r--r--patches.renesas/0376-gpio-rcar-remove-unnecessary-OOM-messages.patch33
-rw-r--r--patches.renesas/0377-i2c-rcar-add-compatibles-for-additional-SoC.patch45
-rw-r--r--patches.renesas/0378-i2c-rcar-not-everything-needs-to-be-a-function.patch62
-rw-r--r--patches.renesas/0379-i2c-rcar-no-need-to-store-irq-number.patch63
-rw-r--r--patches.renesas/0380-i2c-rcar-refactor-bus-state-machine.patch119
-rw-r--r--patches.renesas/0381-i2c-rcar-refactor-irq-state-machine.patch107
-rw-r--r--patches.renesas/0382-i2c-rcar-check-bus-free-before-first-message.patch64
-rw-r--r--patches.renesas/0383-i2c-rcar-refactor-setting-up-msg.patch81
-rw-r--r--patches.renesas/0384-i2c-rcar-refactor-status-bit-handling.patch91
-rw-r--r--patches.renesas/0385-i2c-rcar-remove-spinlock.patch110
-rw-r--r--patches.renesas/0386-i2c-rcar-reuse-status-bits-as-enable-bits.patch61
-rw-r--r--patches.renesas/0387-i2c-rcar-janitorial-cleanup-after-refactoring.patch160
-rw-r--r--patches.renesas/0388-i2c-rcar-update-copyright-and-license-information.patch63
-rw-r--r--patches.renesas/0389-i2c-remove-unnecessary-OOM-messages.patch237
-rw-r--r--patches.renesas/0390-i2c-sh_mobile-replace-magic-hex-values-with-constant.patch61
-rw-r--r--patches.renesas/0391-i2c-sh_mobile-improve-error-handling.patch80
-rw-r--r--patches.renesas/0392-i2c-sh_mobile-honor-DT-bus-speed-settings.patch39
-rw-r--r--patches.renesas/0393-i2c-sh_mobile-devm-conversion-low-hanging-fruits.patch123
-rw-r--r--patches.renesas/0394-i2c-sh_mobile-devm-conversion-irq-setup.patch133
-rw-r--r--patches.renesas/0395-i2c-sh_mobile-remove-superfluous-offset-parameter.patch89
-rw-r--r--patches.renesas/0396-i2c-sh_mobile-bail-out-on-errors-when-initializing.patch70
-rw-r--r--patches.renesas/0397-i2c-sh_mobile-check-timing-parameters-for-valid-rang.patch69
-rw-r--r--patches.renesas/0398-i2c-sh_mobile-fix-clock-calculation-for-newer-SoCs.patch109
-rw-r--r--patches.renesas/0399-i2c-sh_mobile-add-compatibles-for-additional-SoC.patch30
-rw-r--r--patches.renesas/0400-pinctrl-allows-not-to-define-the-get_group_pins-oper.patch125
-rw-r--r--patches.renesas/0401-pinctrl-pinconf-generic-Use-kmemdup-instead-of-kmall.patch38
-rw-r--r--patches.renesas/0402-pinctrl-Enable-power-source-to-be-extracted-from-DT-.patch45
-rw-r--r--patches.renesas/0403-thermal-rcar-Use-pm_runtime_put-i.s.o.-pm_runtime_pu.patch40
-rw-r--r--patches.renesas/0404-thermal-rcar-remove-unnecessary-OOM-messages.patch44
-rw-r--r--patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch1220
-rw-r--r--patches.renesas/0406-clocksource-sh_cmt-Use-request_irq-instead-of-setup_.patch50
-rw-r--r--patches.renesas/0407-clocksource-sh_cmt-Split-channel-fields-from-sh_cmt_.patch809
-rw-r--r--patches.renesas/0408-clocksource-sh_cmt-Rename-struct-sh_cmt_priv-to-sh_c.patch253
-rw-r--r--patches.renesas/0409-clocksource-sh_cmt-Split-channel-setup-to-separate-f.patch127
-rw-r--r--patches.renesas/0410-clocksource-sh_cmt-Constify-name-argument-to-sh_cmt_.patch58
-rw-r--r--patches.renesas/0411-clocksource-sh_cmt-Rename-mapbase-mapbase_str-to-map.patch120
-rw-r--r--patches.renesas/0412-clocksource-sh_cmt-Add-memory-base-to-sh_cmt_channel.patch77
-rw-r--r--patches.renesas/0413-clocksource-sh_cmt-Add-index-to-struct-sh_cmt_channe.patch156
-rw-r--r--patches.renesas/0414-clocksource-sh_cmt-Replace-kmalloc-memset-with-kzall.patch55
-rw-r--r--patches.renesas/0415-clocksource-sh_cmt-Allocate-channels-dynamically.patch56
-rw-r--r--patches.renesas/0416-clocksource-sh_cmt-Split-static-information-from-sh_.patch322
-rw-r--r--patches.renesas/0417-clocksource-sh_cmt-Replace-hardcoded-register-values.patch128
-rw-r--r--patches.renesas/0418-clocksource-sh_cmt-Set-cpumask-to-cpu_possible_mask.patch66
-rw-r--r--patches.renesas/0419-clocksource-sh_cmt-Hardcode-CMT-clock-event-rating-t.patch63
-rw-r--r--patches.renesas/0420-clocksource-sh_cmt-Hardcode-CMT-clock-source-rating-.patch63
-rw-r--r--patches.renesas/0421-clocksource-sh_cmt-Add-support-for-multiple-channels.patch530
-rw-r--r--patches.renesas/0422-clocksource-sh_cmt-Rename-clock-to-fck-in-the-non-le.patch40
-rw-r--r--patches.renesas/0423-clocksource-sh_cmt-Remove-FSF-mail-address-from-GPL-.patch35
-rw-r--r--patches.renesas/0424-clocksource-sh_cmt-Sort-headers-alphabetically.patch55
-rw-r--r--patches.renesas/0425-clocksource-sh_cmt-Request-IRQ-for-clock-event-devic.patch117
-rw-r--r--patches.renesas/0426-clocksource-sh_cmt-Remove-unnecessary-OOM-messages.patch37
-rw-r--r--patches.renesas/0427-clocksource-sh_mtu2-Use-request_irq-instead-of-setup.patch85
-rw-r--r--patches.renesas/0428-clocksource-sh_mtu2-Turn-sh_mtu2_priv-fields-into-lo.patch58
-rw-r--r--patches.renesas/0429-clocksource-sh_mtu2-Split-channel-fields-from-sh_mtu.patch302
-rw-r--r--patches.renesas/0430-clocksource-sh_mtu2-Rename-struct-sh_mtu2_priv-to-sh.patch169
-rw-r--r--patches.renesas/0431-clocksource-sh_mtu2-Split-channel-setup-to-separate-.patch73
-rw-r--r--patches.renesas/0432-clocksource-sh_mtu2-Constify-name-argument-to-sh_mtu.patch50
-rw-r--r--patches.renesas/0433-clocksource-sh_mtu2-Add-memory-base-to-sh_mtu2_chann.patch111
-rw-r--r--patches.renesas/0434-clocksource-sh_mtu2-Add-index-to-struct-sh_mtu2_chan.patch104
-rw-r--r--patches.renesas/0435-clocksource-sh_mtu2-Replace-kmalloc-memset-with-kzal.patch56
-rw-r--r--patches.renesas/0436-clocksource-sh_mtu2-Allocate-channels-dynamically.patch92
-rw-r--r--patches.renesas/0437-clocksource-sh_mtu2-Replace-hardcoded-register-value.patch143
-rw-r--r--patches.renesas/0438-clocksource-sh_mtu2-Set-cpumask-to-cpu_possible_mask.patch31
-rw-r--r--patches.renesas/0439-clocksource-sh_mtu2-Hardcode-MTU2-clock-event-rating.patch63
-rw-r--r--patches.renesas/0440-clocksource-sh_mtu2-Add-support-for-multiple-channel.patch318
-rw-r--r--patches.renesas/0441-clocksource-sh_mtu2-Rename-clock-to-fck-in-the-non-l.patch41
-rw-r--r--patches.renesas/0442-clocksource-sh_mtu2-Remove-FSF-mail-address-from-GPL.patch36
-rw-r--r--patches.renesas/0443-clocksource-sh_mtu2-Sort-headers-alphabetically.patch54
-rw-r--r--patches.renesas/0444-clocksource-sh_mtu2-Remove-unnecessary-OOM-messages.patch37
-rw-r--r--patches.renesas/0445-pinctrl-sh-pfc-r8a7791-Split-the-DU-sync-and-cde-dis.patch87
-rw-r--r--patches.renesas/0446-sh-pfc-r8a7791-Add-SSI-pin-support.patch364
-rw-r--r--patches.renesas/0447-sh-pfc-r8a7791-Add-Audio-pin-support.patch111
-rw-r--r--patches.renesas/0448-pinctrl-pfc-r8a7790-add-i2c0-muxing.patch96
-rw-r--r--patches.renesas/0449-pinctrl-pfc-r8a7790-add-mux-data-for-IIC-B-cores.patch184
-rw-r--r--patches.renesas/0450-pinctrl-sh-pfc-Don-t-set-the-pinmux_irq-irq-field-fo.patch41
-rw-r--r--patches.renesas/0451-pinctrl-sh-pfc-r8a7740-Allow-Multiplatform-Build.patch34
-rw-r--r--patches.renesas/0452-pinctrl-sh-pfc-sh73a0-Allow-Multiplatform-Build.patch34
-rw-r--r--patches.renesas/0453-pinctrl-sh-pfc-r8a73a4-Allow-Multiplatform-Build.patch35
-rw-r--r--patches.renesas/0454-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch68
-rw-r--r--patches.renesas/0455-Revert-serial-sh-sci-Add-device-tree-support-for-r8a.patch69
-rw-r--r--patches.renesas/0456-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch32
-rw-r--r--patches.renesas/0457-mmc-clarify-DDR-timing-mode-between-SD-UHS-and-eMMC.patch64
-rw-r--r--patches.renesas/0458-mmc-sh_mmcif-clarify-DDR-timing-mode-between-SD-UHS-.patch42
-rw-r--r--patches.renesas/0459-cpufreq-Introduce-macros-for-cpufreq_frequency_table.patch113
-rw-r--r--patches.renesas/0460-cpufreq-Fix-build-error-on-some-platforms-that-use-c.patch79
-rw-r--r--patches.renesas/0461-sh-clk-Use-cpufreq_for_each_valid_entry-macro-for-it.patch61
-rw-r--r--patches.renesas/0462-sh-intc-Remove-pointless-irq_reserve_irqs-invocation.patch42
-rw-r--r--patches.renesas/0463-drivers-sh-pm_runtime-does-not-need-idle-callback.patch47
-rw-r--r--patches.renesas/0464-drivers-sh-Restrict-INTC_USERIMASK-to-SH4A.patch33
-rw-r--r--patches.renesas/0465-drivers-sh-pm_runtime-implementation-needs-to-suspen.patch85
-rw-r--r--patches.renesas/0466-drivers-sh-Enable-PM-runtime-for-new-R-Car-Gen2-SoCs.patch35
-rw-r--r--patches.renesas/0467-spi-rspi-Round-up-division-to-avoid-slave-overclocki.patch56
-rw-r--r--patches.renesas/0468-spi-rspi-Extract-rspi_wait_for_-tx_empty-rx_full.patch97
-rw-r--r--patches.renesas/0469-spi-rspi-Do-not-call-rspi_receive_init-for-TX-only.patch44
-rw-r--r--patches.renesas/0470-spi-rspi-Remove-unused-16-bit-DMA-support.patch176
-rw-r--r--patches.renesas/0471-spi-rspi-Use-core-SPI_MASTER_MUST_-RT-X-handling.patch307
-rw-r--r--patches.renesas/0472-spi-rspi-Extract-rspi_pio_transfer.patch183
-rw-r--r--patches.renesas/0473-spi-rspi-Don-t-consider-DMA-configuration-failures-f.patch35
-rw-r--r--patches.renesas/0474-spi-rspi-Extract-rspi_request_dma_chan.patch131
-rw-r--r--patches.renesas/0475-spi-rspi-Remove-unneeded-resource-test-in-DMA-setup.patch78
-rw-r--r--patches.renesas/0476-spi-rspi-SPI-DMA-core-needs-both-RX-and-TX-DMA-to-fu.patch83
-rw-r--r--patches.renesas/0477-spi-rspi-Use-SPI-core-DMA-mapping-framework.patch299
-rw-r--r--patches.renesas/0478-spi-rspi-Move-RSPI-specific-setup-out-of-DMA-routine.patch100
-rw-r--r--patches.renesas/0479-spi-rspi-Pass-sg_tables-instead-of-spi_tranfer-to-rs.patch81
-rw-r--r--patches.renesas/0480-spi-rspi-Merge-rspi_-_dma-into-rspi_dma_transfer.patch206
-rw-r--r--patches.renesas/0481-spi-rspi-Absorb-rspi_rz_transfer_out_in-into-rspi_rz.patch51
-rw-r--r--patches.renesas/0482-spi-rspi-Add-DMA-support-for-QSPI-on-R-Car-Gen2.patch59
-rw-r--r--patches.renesas/0483-spi-rspi-Add-DMA-support-for-RSPI-on-RZ-A1H.patch32
-rw-r--r--patches.renesas/0484-spi-rspi-Extract-rspi_common_transfer.patch117
-rw-r--r--patches.renesas/0485-ASoC-ak4642-Fix-typo-zoro-zero.patch29
-rw-r--r--patches.renesas/0486-pwm-add-period-and-polarity-to-struct-pwm_lookup.patch56
-rw-r--r--patches.renesas/0487-usb-renesas-gadget-fixup-complete-STATUS-stage-after.patch41
-rw-r--r--patches.renesas/0488-sh_eth-replace-devm_kzalloc-with-devm_kmalloc_array.patch37
-rw-r--r--patches.renesas/0489-net-sh_eth-Fix-receive-packet-exceeded-condition-in-.patch56
-rw-r--r--patches.renesas/0490-net-sh_eth-Fix-timing-of-RACT-setting-in-sh_eth_rx.patch39
-rw-r--r--patches.renesas/0491-PCI-rcar-Add-Renesas-R-Car-PCIe-driver.patch821
-rw-r--r--patches.renesas/0492-PCI-rcar-Add-MSI-support-for-PCIe.patch353
-rw-r--r--patches.renesas/0493-PCI-rcar-Add-R-Car-PCIe-device-tree-bindings.patch75
-rw-r--r--patches.renesas/0494-DMA-shdma-add-cyclic-transfer-support.patch166
-rw-r--r--patches.renesas/0495-ARM-shmobile-armadillo-initialize-all-struct-pwm_loo.patch68
-rw-r--r--patches.renesas/0496-ARM-OMAP3-Beagle-initialize-all-the-struct-pwm_looku.patch40
-rw-r--r--patches.renesas/0497-ARM-pxa-hx4700-initialize-all-the-struct-pwm_lookup-.patch41
-rw-r--r--patches.renesas/0498-pwm-modify-PWM_LOOKUP-to-initialize-all-struct-pwm_l.patch54
-rw-r--r--patches.renesas/0499-ARM-OMAP3-Beagle-use-PWM_LOOKUP-to-initialize-struct.patch41
-rw-r--r--patches.renesas/0500-ARM-shmobile-armadillo-use-PWM_LOOKUP-to-initialize-.patch43
-rw-r--r--patches.renesas/0501-ARM-pxa-hx4700-use-PWM_LOOKUP-to-initialize-struct-p.patch41
-rw-r--r--patches.renesas/0502-ASoC-core-Update-snd_soc_of_parse_daifmt-interface.patch93
-rw-r--r--patches.renesas/0503-ASoC-simple-card-Move-dai-link-level-properties-away.patch490
-rw-r--r--patches.renesas/0504-ASoC-simple-card-Drop-node-name-checking.patch38
-rw-r--r--patches.renesas/0505-ASoC-simple-card-Simplify-error-msg-in-simple_card_d.patch42
-rw-r--r--patches.renesas/0506-ASoC-simple-card-Improve-coding-style.patch90
-rw-r--r--patches.renesas/0507-ASoC-simple-card-is_top_level_node-parameter-to-simp.patch63
-rw-r--r--patches.renesas/0508-ASoC-simple-card-Support-setting-mclk-via-a-fixed-fa.patch92
-rw-r--r--patches.renesas/0509-serial-sh-sci-Add-device-tree-support-for-r8a7-778-7.patch38
-rw-r--r--patches.renesas/0510-clocksource-sh_tmu-Use-request_irq-instead-of-setup_.patch84
-rw-r--r--patches.renesas/0511-clocksource-sh_tmu-Split-channel-fields-from-sh_tmu_.patch527
-rw-r--r--patches.renesas/0512-clocksource-sh_tmu-Rename-struct-sh_tmu_priv-to-sh_t.patch175
-rw-r--r--patches.renesas/0513-clocksource-sh_tmu-Split-channel-setup-to-separate-f.patch79
-rw-r--r--patches.renesas/0514-clocksource-sh_tmu-Constify-name-argument-to-sh_tmu_.patch58
-rw-r--r--patches.renesas/0515-clocksource-sh_tmu-Add-memory-base-to-sh_tmu_channel.patch107
-rw-r--r--patches.renesas/0516-clocksource-sh_tmu-Add-index-to-struct-sh_tmu_channe.patch127
-rw-r--r--patches.renesas/0517-clocksource-sh_tmu-Replace-kmalloc-memset-with-kzall.patch55
-rw-r--r--patches.renesas/0518-clocksource-sh_tmu-Allocate-channels-dynamically.patch92
-rw-r--r--patches.renesas/0519-clocksource-sh_tmu-Replace-hardcoded-register-values.patch76
-rw-r--r--patches.renesas/0520-clocksource-sh_tmu-Hardcode-TMU-clock-event-and-sour.patch86
-rw-r--r--patches.renesas/0521-clocksource-sh_tmu-Add-support-for-multiple-channels.patch359
-rw-r--r--patches.renesas/0522-clocksource-sh_tmu-Rename-clock-to-fck-in-the-non-le.patch41
-rw-r--r--patches.renesas/0523-clocksource-sh_tmu-Remove-FSF-mail-address-from-GPL-.patch35
-rw-r--r--patches.renesas/0524-clocksource-sh_tmu-Sort-headers-alphabetically.patch55
-rw-r--r--patches.renesas/0525-clocksource-sh_tmu-Fix-channel-IRQ-retrieval-in-lega.patch34
-rw-r--r--patches.renesas/0526-clocksource-sh_tmu-Remove-unnecessary-OOM-messages.patch37
-rw-r--r--patches.renesas/0527-spi-sh-msiof-remove-unnecessary-OOM-messages.patch36
-rw-r--r--patches.renesas/0528-media-v4l-vsp1-Add-DT-bindings-documentation.patch70
-rw-r--r--patches.renesas/0529-usb-host-xhci-plat-sort-the-headers-in-alphabetic-or.patch39
-rw-r--r--patches.renesas/0530-usb-host-xhci-plat-add-clock-support.patch111
-rw-r--r--patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch193
-rw-r--r--patches.renesas/0532-usb-xhci-avoid-warning-for-PM_SLEEP.patch37
-rw-r--r--patches.renesas/0533-usb-host-xhci-plat-add-xhci_plat_start.patch46
-rw-r--r--patches.renesas/0534-drm-rcar-du-Add-run-time-dependencies.patch41
-rw-r--r--patches.renesas/0535-gpio-rcar-Add-support-for-DT-IRQ-flags.patch32
-rw-r--r--patches.renesas/0536-dmaengine-shdma-Enable-driver-compilation-with-COMPI.patch32
-rw-r--r--patches.renesas/0537-ARM-shmobile-r8a7790-Rename-VSP1_-SY-RT-clocks-to-VS.patch55
-rw-r--r--patches.renesas/0538-ARM-shmobile-r8a7791-Rename-VSP1_SY-clocks-to-VSP1_S.patch52
-rw-r--r--patches.renesas/0539-ARM-shmobile-r8a7791-add-IIC0-1-clock-macros.patch31
-rw-r--r--patches.renesas/0540-ARM-shmobile-r8a7791-Add-EHCI-MSTP-clock.patch59
-rw-r--r--patches.renesas/0541-ARM-shmobile-r8a7790-add-IIC0-2-clock-macros.patch38
-rw-r--r--patches.renesas/0542-ARM-shmobile-r8a7791-Correct-SYS-DMAC-clock-defines.patch38
-rw-r--r--patches.renesas/0543-clk-shmobile-r8a7779-Add-clocks-support.patch281
-rw-r--r--patches.renesas/0544-clk-shmobile-r8a7779-Add-MSTP-clock-support.patch35
-rw-r--r--patches.renesas/0545-ARM-shmobile-r7s72100-document-MSTP-clock-support.patch34
-rw-r--r--patches.renesas/0546-clk-shmobile-mstp-Fix-the-is_enabled-operation.patch33
-rw-r--r--patches.renesas/0547-clk-shmobile-Add-R8A7740-specific-clock-support.patch288
-rw-r--r--patches.renesas/0548-ARM-shmobile-armadillo800eva-Spelling-and-grammar.patch31
-rw-r--r--patches.renesas/0549-ARM-shmobile-multiplatform-Enable-MSIOF-in-defconfig.patch29
-rw-r--r--patches.renesas/0550-ARM-shmobile-Include-i2c-shmobile.c-in-shmobile_defc.patch33
-rw-r--r--patches.renesas/0551-ARM-shmobile-Include-at24.c-in-shmobile_defconfig.patch33
-rw-r--r--patches.renesas/0552-ARM-shmobile-Enable-USBHS-gadget-support-in-shmobile.patch36
-rw-r--r--patches.renesas/0553-ARM-shmobile-Enable-HIGHMEM-in-shmobile_defconfig.patch32
-rw-r--r--patches.renesas/0554-ARM-shmobile-Enable-VSP1-in-shmobile_defconfig.patch38
-rw-r--r--patches.renesas/0555-ARM-shmobile-Enable-USB-EO-HCI-HCD-support-in-shmobi.patch33
-rw-r--r--patches.renesas/0556-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-C.patch32
-rw-r--r--patches.renesas/0557-ARM-shmobile-Add-shared-shmobile_init_delay.patch80
-rw-r--r--patches.renesas/0558-ARM-shmobile-Remove-legacy-EMEV2-SoC-support.patch338
-rw-r--r--patches.renesas/0559-ARM-shmobile-Remove-EMEV2-header-file.patch87
-rw-r--r--patches.renesas/0560-ARM-shmobile-Make-use-of-r8a7790_add_standard_device.patch50
-rw-r--r--patches.renesas/0561-ARM-shmobile-rcar-gen2-Cache-Mode-Monitor-Register-V.patch47
-rw-r--r--patches.renesas/0562-ARM-shmobile-Check-r8a7791-MD21-at-SMP-boot.patch58
-rw-r--r--patches.renesas/0563-ARM-shmobile-r8a7778-bockw-Move-select-RENESAS_INTC_.patch50
-rw-r--r--patches.renesas/0564-ARM-shmobile-r8a7791-Use-rcar_gen2_read_mode_pins-he.patch61
-rw-r--r--patches.renesas/0565-ARM-shmobile-Introduce-shmobile_clk_workaround.patch118
-rw-r--r--patches.renesas/0566-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-l.patch39
-rw-r--r--patches.renesas/0567-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-l.patch43
-rw-r--r--patches.renesas/0568-ARM-shmobile-Use-shmobile_clk_workaround-on-Lager.patch108
-rw-r--r--patches.renesas/0569-ARM-shmobile-Use-shmobile_clk_workaround-on-Koelsch.patch114
-rw-r--r--patches.renesas/0570-ARM-shmobile-koelsch-Annotate-clk_names-with-__initc.patch29
-rw-r--r--patches.renesas/0571-ARM-shmobile-lager-Annotate-clk_names-with-__initcon.patch29
-rw-r--r--patches.renesas/0572-ARM-shmobile-koelsch-reference-Work-around-core-cloc.patch52
-rw-r--r--patches.renesas/0573-ARM-shmobile-koelsch-reference-Annotate-clk_enables-.patch29
-rw-r--r--patches.renesas/0574-ARM-shmobile-lager-reference-Work-around-core-clock-.patch53
-rw-r--r--patches.renesas/0575-ARM-shmobile-Add-Lager-clock-workarounds-for-SDHI-an.patch35
-rw-r--r--patches.renesas/0576-ARM-shmobile-Add-Koelsch-clock-workarounds-for-SDHI.patch34
-rw-r--r--patches.renesas/0577-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-D.patch40
-rw-r--r--patches.renesas/0578-ARM-shmobile-r8a7790-lager-dts-Rename-label-spi-to-q.patch64
-rw-r--r--patches.renesas/0579-ARM-shmobile-r8a7791-koelsch-dts-Rename-label-spi-to.patch64
-rw-r--r--patches.renesas/0580-ARM-shmobile-r8a7790-dtsi-Add-MSIOF-nodes-and-aliase.patch77
-rw-r--r--patches.renesas/0581-ARM-shmobile-r8a7791-dtsi-Add-MSIOF-nodes-and-aliase.patch66
-rw-r--r--patches.renesas/0582-ARM-shmobile-lager-dts-Add-MSIOF-nodes.patch61
-rw-r--r--patches.renesas/0583-ARM-shmobile-koelsch-dts-Add-MSIOF-nodes.patch57
-rw-r--r--patches.renesas/0584-ARM-shmobile-r8a7778-dtsi-Improve-and-correct-HSPI-n.patch66
-rw-r--r--patches.renesas/0585-ARM-shmobile-r8a7779-dtsi-Improve-and-correct-HSPI-n.patch66
-rw-r--r--patches.renesas/0586-ARM-shmobile-bockw-reference-dts-Add-SPI-FLASH.patch43
-rw-r--r--patches.renesas/0587-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-La.patch71
-rw-r--r--patches.renesas/0588-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-Ko.patch120
-rw-r--r--patches.renesas/0589-ARM-shmobile-lager-Set-ethernet-PHY-LED-mode.patch31
-rw-r--r--patches.renesas/0590-ARM-shmobile-koelsch-Set-ethernet-PHY-LED-mode.patch32
-rw-r--r--patches.renesas/0591-ARM-shmobile-armadillo-reference-dts-Use-KEY_-macros.patch60
-rw-r--r--patches.renesas/0592-ARM-shmobile-kzm9g-reference-dts-Use-KEY_-macros-for.patch79
-rw-r--r--patches.renesas/0593-ARM-shmobile-r8a7791-add-IIC-B-clocks-to-dtsi.patch69
-rw-r--r--patches.renesas/0594-ARM-shmobile-r8a7791-add-IIC-B-cores-to-dtsi.patch86
-rw-r--r--patches.renesas/0595-ARM-shmobile-koelsch-make-i2c2-pfc-node-unique.patch34
-rw-r--r--patches.renesas/0596-ARM-shmobile-koelsch-activate-i2c6-bus.patch34
-rw-r--r--patches.renesas/0597-ARM-shmobile-Use-r8a7740-suffix-for-i2c-mmcif-fsi2-c.patch60
-rw-r--r--patches.renesas/0598-ARM-shmobile-armadillo-reference-dts-enable-RTC.patch55
-rw-r--r--patches.renesas/0599-ARM-shmobile-lager-Correct-setting-of-ethernet-PHY-L.patch38
-rw-r--r--patches.renesas/0600-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-D.patch33
-rw-r--r--patches.renesas/0601-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-D.patch37
-rw-r--r--patches.renesas/0602-ARM-shmobile-r8a7790-add-IIC-B-clocks-to-dtsi.patch73
-rw-r--r--patches.renesas/0603-ARM-shmobile-r8a7790-add-IIC-B-cores-to-dtsi.patch79
-rw-r--r--patches.renesas/0604-ARM-shmobile-r8a7778-remove-old-style-audio-clock.patch60
-rw-r--r--patches.renesas/0605-ARM-shmobile-r8a7790-remove-old-style-audio-clock.patch62
-rw-r--r--patches.renesas/0606-ARM-shmobile-bockw-remove-old-style-audio-clock.patch63
-rw-r--r--patches.renesas/0607-ARM-shmobile-bockw-switch-to-use-dai-info-for-R-Car-.patch92
-rw-r--r--patches.renesas/0608-ARM-shmobile-lager-switch-to-use-dai-info-for-R-Car-.patch56
-rw-r--r--patches.renesas/0609-ARM-shmobile-koelsch-legacy-Enable-Quad-SPI-transfer.patch30
-rw-r--r--patches.renesas/0610-ARM-shmobile-koelsch-dts-Enable-Quad-SPI-transfers-f.patch30
-rw-r--r--patches.renesas/0611-ARM-shmobile-lager-dts-Enable-Quad-SPI-transfers-for.patch30
-rw-r--r--patches.renesas/0612-ARM-shmobile-lager-legacy-Enable-Quad-SPI-transfers-.patch41
-rw-r--r--patches.renesas/0613-ARM-shmobile-r8a7740-Remove-unused-r8a7740_add_early.patch44
-rw-r--r--patches.renesas/0614-ARM-shmobile-sh7372-Call-sh7372_add_early_devices-in.patch35
-rw-r--r--patches.renesas/0615-ARM-shmobile-r8a7740-Make-r8a7740_meram_workaround-_.patch32
-rw-r--r--patches.renesas/0616-ARM-shmobile-armadillo-reference-dts-Seiko-Instrumen.patch35
-rw-r--r--patches.renesas/0617-ARM-shmobile-Ignore-callbacks-for-subsys-generic_pm_.patch77
-rw-r--r--patches.renesas/0618-ARM-shmobile-henninger-initial-device-tree.patch89
-rw-r--r--patches.renesas/0619-ARM-shmobile-henninger-add-Ether-DT-support.patch69
-rw-r--r--patches.renesas/0620-ARM-shmobile-henninger-enable-SATA0.patch30
-rw-r--r--patches.renesas/0621-ARM-shmobile-henninger-specify-EXTAL-frequency.patch36
-rw-r--r--patches.renesas/0622-ARM-shmobile-henninger-add-SDHI0-2-DT-support.patch126
-rw-r--r--patches.renesas/0623-ARM-shmobile-henninger-add-QSPI-DT-support.patch72
-rw-r--r--patches.renesas/0624-ARM-shmobile-henninger-add-MSIOF0-DT-support.patch57
-rw-r--r--patches.renesas/0625-ARM-shmobile-r8a7740-dtsi-Add-Ethernet-support.patch40
-rw-r--r--patches.renesas/0626-ARM-shmobile-armadillo-reference-dts-Add-Ethernet-su.patch51
-rw-r--r--patches.renesas/0627-ARM-shmobile-r8a7740-Correct-name-of-DT-Ethernet-clo.patch32
-rw-r--r--patches.renesas/0628-ARM-shmobile-sh7372-Switch-to-new-style-CMT-device.patch83
-rw-r--r--patches.renesas/0629-ARM-shmobile-sh73a0-Switch-to-new-style-CMT-device.patch94
-rw-r--r--patches.renesas/0630-ARM-shmobile-r8a73a4-Switch-to-new-style-CMT-device.patch74
-rw-r--r--patches.renesas/0631-ARM-shmobile-r8a7740-Switch-to-new-style-CMT-device.patch101
-rw-r--r--patches.renesas/0632-ARM-shmobile-r8a7790-Switch-to-new-style-CMT-device.patch97
-rw-r--r--patches.renesas/0633-ARM-shmobile-r8a7791-Switch-to-new-style-CMT-device.patch90
-rw-r--r--patches.renesas/0634-ARM-shmobile-sh7372-Switch-to-new-style-TMU-device.patch143
-rw-r--r--patches.renesas/0635-ARM-shmobile-sh73a0-Switch-to-new-style-TMU-device.patch116
-rw-r--r--patches.renesas/0636-ARM-shmobile-r8a7740-Switch-to-new-style-TMU-device.patch172
-rw-r--r--patches.renesas/0637-ARM-shmobile-r8a7778-Switch-to-new-style-TMU-device.patch96
-rw-r--r--patches.renesas/0638-ARM-shmobile-r8a7779-Switch-to-new-style-TMU-device.patch127
-rw-r--r--patches.renesas/0639-ARM-shmobile-r7s72100-Switch-to-new-style-MTU2-devic.patch89
-rw-r--r--patches.renesas/0640-ARM-shmobile-Add-r8a7740-Maximum-CPU-Frequency-to-DT.patch31
-rw-r--r--patches.renesas/0641-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-in-common-.patch34
-rw-r--r--patches.renesas/0642-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-for-Armadi.patch34
-rw-r--r--patches.renesas/0643-ARM-shmobile-Remove-unused-r8a7740_init_delay.patch48
-rw-r--r--patches.renesas/0644-ARM-shmobile-Minor-cleanup-of-the-Armadillo-legacy-b.patch44
-rw-r--r--patches.renesas/0645-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-in-common-.patch33
-rw-r--r--patches.renesas/0646-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-for-Koelsc.patch46
-rw-r--r--patches.renesas/0647-ARM-shmobile-Remove-unused-r8a7791_init_early.patch49
-rw-r--r--patches.renesas/0648-ARM-shmobile-dts-Move-interrupt-parent-property-to-r.patch620
-rw-r--r--patches.renesas/0649-ARM-shmobile-r8a7790-dtsi-Add-GPIO-clocks.patch90
-rw-r--r--patches.renesas/0650-ARM-shmobile-r8a7791-dtsi-Add-GPIO-clocks.patch112
-rw-r--r--patches.renesas/0651-ARM-shmobile-marzen-reference-Set-SMSC-lan-to-use-ir.patch32
-rw-r--r--patches.renesas/0652-ARM-shmobile-Use-shmobile_init_late-on-r8a7740.patch32
-rw-r--r--patches.renesas/0653-ARM-shmobile-lager-Enable-SCIF0-and-SCIF1-serial-por.patch124
-rw-r--r--patches.renesas/0654-ARM-shmobile-koelsch-Enable-SCIF0-and-SCIF1-serial-p.patch126
-rw-r--r--patches.renesas/0655-ARM-shmobile-r7s72100-add-essential-clock-nodes-to-d.patch167
-rw-r--r--patches.renesas/0656-ARM-shmobile-r7s72100-genmai-populate-nodes-for-exte.patch37
-rw-r--r--patches.renesas/0657-ARM-shmobile-r7s72100-add-scif-nodes-to-dtsi.patch125
-rw-r--r--patches.renesas/0658-ARM-shmobile-r7s72100-genmai-add-uart-alias-and-acti.patch54
-rw-r--r--patches.renesas/0659-ARM-shmobile-r7s72100-genmai-platform-scif-devices-o.patch159
-rw-r--r--patches.renesas/0660-ARM-shmobile-r7s72100-add-i2c-clocks-to-dtsi.patch88
-rw-r--r--patches.renesas/0661-ARM-shmobile-r7s72100-remove-I2C-DT-clocks-from-lega.patch36
-rw-r--r--patches.renesas/0662-ARM-shmobile-r7s72100-add-spi-clocks-to-dtsi.patch100
-rw-r--r--patches.renesas/0663-ARM-shmobile-r7s72100-remove-SPI-DT-clocks-from-lega.patch38
-rw-r--r--patches.renesas/0664-ARM-shmobile-Add-forward-declaration-of-struct-clk-t.patch34
-rw-r--r--patches.renesas/0665-ARM-shmobile-r7s72100-use-workaround-for-non-DT-cloc.patch57
-rw-r--r--patches.renesas/0666-ARM-shmobile-Set-clock-frequency-in-HZ-from-OF-nodes.patch69
-rw-r--r--patches.renesas/0667-ARM-shmobile-r8a7740-dtsi-Remove-duplicate-interrupt.patch35
-rw-r--r--patches.renesas/0668-ARM-shmobile-Remove-non-multiplatform-Genmai-referen.patch91
-rw-r--r--patches.renesas/0669-ARM-shmobile-genmai-reference-Remove-legacy-clock-su.patch49
-rw-r--r--patches.renesas/0670-ARM-shmobile-Sync-Genmai-DTS-with-Genmai-reference-D.patch74
-rw-r--r--patches.renesas/0671-ARM-shmobile-Let-Genmai-multiplatform-boot-with-Genm.patch49
-rw-r--r--patches.renesas/0672-ARM-shmobile-Remove-Genmai-reference-DTS.patch87
-rw-r--r--patches.renesas/0673-USB-delete-CONFIG_USB_DEVICEFS-from-defconfig.patch1110
-rw-r--r--patches.renesas/0674-ARM-shmobile-r8a7779-Add-clock-index-macros-for-DT-s.patch93
-rw-r--r--patches.renesas/0675-ARM-shmobile-armadillo800eva-fixup-HDMI-sound-flags-.patch39
-rw-r--r--patches.renesas/0676-ARM-kconfig-allow-PCI-support-to-be-selected-with-AR.patch123
-rw-r--r--patches.renesas/0677-ARM-shmobile-r8a7791-Fix-SD2CKCR-register-address.patch50
-rw-r--r--patches.renesas/0678-ASoC-sh-Migo-R-sound-needs-I2C.patch33
-rw-r--r--patches.renesas/0679-ASoC-rsnd-remove-old-clock-style-support.patch84
-rw-r--r--patches.renesas/0680-ASoC-rsnd-remove-compatibility-code.patch429
-rw-r--r--patches.renesas/0681-ASoC-rsnd-add-rsnd_path_parse-macro.patch90
-rw-r--r--patches.renesas/0682-ASoC-rsnd-add-rsnd_get_adinr.patch130
-rw-r--r--patches.renesas/0683-ASoC-rsnd-remove-duplicate-parameter-from-rsnd_mod_o.patch507
-rw-r--r--patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch106
-rw-r--r--patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch561
-rw-r--r--patches.renesas/0686-ASoC-rsnd-Fix-warnings-due-to-improper-printk-format.patch58
-rw-r--r--patches.renesas/0687-ASoC-rsnd-DT-node-clean-up-by-using-the-of_node_put.patch78
-rw-r--r--patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch50
-rw-r--r--patches.renesas/0689-ASoC-rsnd-remove-rsnd_src_non_ops.patch66
-rw-r--r--patches.renesas/0690-ASoC-rsnd-module-name-is-unified.patch213
-rw-r--r--patches.renesas/0691-ASoC-rsnd-care-DMA-slave-channel-name-for-DT.patch169
-rw-r--r--patches.renesas/0692-ASoC-rsnd-add-rsnd_gen_dma_addr-for-DMAC-addr.patch160
-rw-r--r--patches.renesas/0693-ASoC-rsnd-fixup-index-of-src-dst-mod-when-capture.patch33
-rw-r--r--patches.renesas/0694-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch47
-rw-r--r--patches.renesas/0695-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch37
-rw-r--r--patches.renesas/0696-mmc-sh-mmcif-update-to-print-version-and-bus-clock-r.patch46
-rw-r--r--patches.renesas/0697-mmc-sh-mmcif-use-devm_-for-ioremap.patch71
-rw-r--r--patches.renesas/0698-mmc-sh-mmcif-use-devm_-for-clock-management.patch73
-rw-r--r--patches.renesas/0699-mmc-sh-mmcif-use-devm_-for-irq-management.patch84
-rw-r--r--patches.renesas/0700-mmc-sh-mmcif-no-need-to-call-pm_runtime_suspend-on-e.patch52
-rw-r--r--patches.renesas/0701-mmc-sh-mmcif-final-error-path-cleanup.patch50
-rw-r--r--patches.renesas/0702-pinctrl-sh-pfc-r8a7791-Add-HSCIF-pin-support.patch299
-rw-r--r--patches.renesas/0703-media-vb2-Check-if-there-are-buffers-before-streamon.patch35
-rw-r--r--patches.renesas/0704-media-vb2-rename-queued_count-to-owned_by_drv_count.patch92
-rw-r--r--patches.renesas/0705-media-vb2-only-call-start_streaming-if-sufficient-bu.patch505
-rw-r--r--patches.renesas/0706-v4l-Add-ARGB-and-XRGB-pixel-formats.patch54
-rw-r--r--patches.renesas/0707-DocBook-media-Document-ALPHA_COMPONENT-control-usage.patch49
-rw-r--r--patches.renesas/0708-v4l-Support-extending-the-v4l2_pix_format-structure.patch728
-rw-r--r--patches.renesas/0709-v4l-Add-premultiplied-alpha-flag-for-pixel-formats.patch139
-rw-r--r--patches.renesas/0710-v4l-vb2-Fix-stream-start-and-buffer-completion-race.patch43
-rw-r--r--patches.renesas/0711-PCI-rcar-Remove-redundant-config-accessor-register-n.patch50
-rw-r--r--patches.renesas/0712-PCI-rcar-Use-correct-initial-HW-settings.patch73
-rw-r--r--patches.renesas/0713-PCI-rcar-Cleanup-style-and-formatting.patch406
-rw-r--r--patches.renesas/0714-PCI-rcar-Remove-rcar_pcie_setup_window-resource-argu.patch49
-rw-r--r--patches.renesas/0715-spi-rspi-Remove-unused-variable-in-rspi_rz_transfer_.patch31
-rw-r--r--patches.renesas/0716-spi-rspi-Pass-spi_master-pointer-to-rspi_release_dma.patch59
-rw-r--r--patches.renesas/0717-sh_eth-remove-checks-around-dev_kfree_skb-calls.patch64
-rw-r--r--patches.renesas/0718-mmc-tmio-mmc-Add-renesas-sdhi-r8a7791-to-binding-doc.patch34
-rw-r--r--patches.renesas/0719-sh-pfc-r8a7791-add-CAN-pin-groups.patch218
-rw-r--r--patches.renesas/0720-sh-pfc-Add-renesas-pfc-r8a7791-to-binding-documentat.patch32
-rw-r--r--patches.renesas/0721-sh-pfc-sh73a0-Introduce-the-use-of-devm_regulator_re.patch53
-rw-r--r--patches.renesas/0722-sh-Switch-to-new-style-CMT-device.patch993
-rw-r--r--patches.renesas/0723-sh-Switch-to-new-style-TMU-device.patch3823
-rw-r--r--patches.renesas/0724-sh-Switch-to-new-style-MTU2-device.patch730
-rw-r--r--patches.renesas/0725-clocksource-sh_cmt-Drop-support-for-legacy-platform-.patch280
-rw-r--r--patches.renesas/0726-clocksource-sh_cmt-Replace-global-spinlock-with-a-pe.patch67
-rw-r--r--patches.renesas/0727-clocksource-shmobile-Remove-unused-sh_timer_config-m.patch35
-rw-r--r--patches.renesas/0728-clocksource-sh_cmt-Add-DT-support.patch203
-rw-r--r--patches.renesas/0729-clocksource-sh_mtu2-Drop-support-for-legacy-platform.patch261
-rw-r--r--patches.renesas/0730-clocksource-sh_mtu2-Replace-global-spinlock-with-a-p.patch69
-rw-r--r--patches.renesas/0731-clocksource-sh_mtu2-Add-DT-support.patch96
-rw-r--r--patches.renesas/0732-clocksource-sh_tmu-Drop-support-for-legacy-platform-.patch181
-rw-r--r--patches.renesas/0733-clocksource-sh_tmu-Replace-global-spinlock-with-a-pe.patch70
-rw-r--r--patches.renesas/0734-clocksource-sh_tmu-Add-DT-support.patch162
-rw-r--r--patches.renesas/0735-gpio-rcar-clamp-returned-value-to-0-1.patch38
-rw-r--r--patches.renesas/0736-usb-renesas_usbhs-fix-usbhs_pipe_malloc-to-re-enable.patch32
-rw-r--r--patches.renesas/0737-usb-renesas_usbhs-gadget-fix-re-enabling-pipe-withou.patch89
-rw-r--r--patches.renesas/0738-usb-renesas_usbhs-add-R-Car-Gen.-2-init-and-power-co.patch291
-rw-r--r--patches.renesas/0739-dmaengine-shdma-Add-more-register-documentation.patch140
-rw-r--r--patches.renesas/0740-dmaengine-shdma-Use-defines-instead-of-hardcoded-num.patch46
-rw-r--r--patches.renesas/0741-dmaengine-sh-Rework-Kconfig-and-Makefile.patch120
-rw-r--r--patches.renesas/0742-serial-sh-sci-Updated-calculation-of-bit-error-rate-.patch41
-rw-r--r--patches.renesas/0743-serial-sh-sci-Fix-range-check-of-bit-rate-for-HSCIF.patch36
-rw-r--r--patches.renesas/0744-serial-sh-sci-Add-calculation-recive-margin-for-HSCI.patch147
-rw-r--r--patches.renesas/0745-sh-pfc-r8a7791-fix-CAN-pin-groups.patch54
-rw-r--r--patches.renesas/0746-spi-sh-msiof-Add-more-register-documentation.patch83
-rw-r--r--patches.renesas/0747-spi-sh-msiof-Extract-sh_msiof_spi_-start-stop-helper.patch95
-rw-r--r--patches.renesas/0748-spi-sh-msiof-Improve-transfer-error-handling.patch71
-rw-r--r--patches.renesas/0749-spi-sh-msiof-Refactor-sh_msiof_transfer_one.patch119
-rw-r--r--patches.renesas/0750-spi-sh-msiof-Add-DMA-support.patch533
-rw-r--r--patches.renesas/0751-spi-sh-msiof-Handle-dmaengine_prep_slave_single-fail.patch83
-rw-r--r--patches.renesas/0752-spi-sh-msiof-Use-correct-device-for-DMA-mapping-with.patch95
-rw-r--r--patches.renesas/0753-spi-sh-msiof-Fix-leaking-of-unused-DMA-descriptors.patch150
-rw-r--r--patches.renesas/0754-spi-sh-msiof-Fix-transmit-only-DMA-transfers.patch39
-rw-r--r--patches.renesas/0755-mmc-tmio-Configure-DMA-slave-bus-width.patch40
-rw-r--r--patches.renesas/0756-mmc-sh_mmcif-Fix-DMA-slave-address-configuration.patch49
-rw-r--r--patches.renesas/0757-mmc-sh_mmcif-Configure-DMA-slave-bus-width.patch39
-rw-r--r--patches.renesas/0758-net-sh_eth-Add-r8a7794-support.patch52
-rw-r--r--patches.renesas/0759-sh-intc-Confine-SH_INTC-to-platforms-that-need-it.patch116
-rw-r--r--patches.renesas/0760-spi-rspi-Handle-dmaengine_prep_slave_sg-failures-gra.patch100
-rw-r--r--patches.renesas/0761-spi-rspi-Fix-leaking-of-unused-DMA-descriptors.patch163
-rw-r--r--patches.renesas/0762-thermal-rcar-Document-SoC-specific-bindings.patch67
-rw-r--r--patches.renesas/0763-drm-rcar-du-fix-warnings.patch33
-rw-r--r--patches.renesas/0764-drm-rcar-du-Fix-maximum-frame-buffer-pitch-computati.patch58
-rw-r--r--patches.renesas/0765-PCI-rcar-Fix-GPL-v2-license-string-typo.patch30
-rw-r--r--patches.renesas/0766-i2c-i2c-rcar-Drop-class-based-scanning-to-improve-bo.patch48
-rw-r--r--patches.renesas/0767-media-of-move-graph-helpers-from-drivers-media-v4l2-.patch570
-rw-r--r--patches.renesas/0768-media-rcar_vin-copy-flags-from-pdata.patch85
-rw-r--r--patches.renesas/0769-media-rcar_vin-add-devicetree-support.patch242
-rw-r--r--patches.renesas/0770-media-v4l-vsp1-Fix-routing-cleanup-when-stopping-the.patch39
-rw-r--r--patches.renesas/0771-media-v4l-vsp1-Release-buffers-at-stream-stop.patch39
-rw-r--r--patches.renesas/0772-media-v4l-vsp1-Fix-pipeline-stop-timeout.patch62
-rw-r--r--patches.renesas/0773-media-v4l-vsp1-Fix-typos.patch92
-rw-r--r--patches.renesas/0774-media-v4l-vsp1-Cleanup-video-nodes-at-removal-time.patch135
-rw-r--r--patches.renesas/0775-media-v4l-vsp1-Propagate-vsp1_device_get-errors-to-t.patch87
-rw-r--r--patches.renesas/0776-media-v4l-vsp1-Setup-control-handler-automatically-a.patch124
-rw-r--r--patches.renesas/0777-media-v4l-vsp1-sru-Fix-the-intensity-control-default.patch53
-rw-r--r--patches.renesas/0778-media-v4l-vsp1-sru-Make-the-intensity-controllable-d.patch195
-rw-r--r--patches.renesas/0779-media-v4l-vsp1-wpf-Simplify-cast-to-pipeline-structu.patch34
-rw-r--r--patches.renesas/0780-media-v4l-vsp1-wpf-Clear-RPF-to-WPF-association-at-s.patch40
-rw-r--r--patches.renesas/0781-media-v4l-vsp1-Switch-to-XRGB-formats.patch84
-rw-r--r--patches.renesas/0782-media-v4l-vsp1-Add-alpha-channel-support-to-the-memo.patch182
-rw-r--r--patches.renesas/0783-media-v4l-vsp1-Add-V4L2_CID_ALPHA_COMPONENT-control-.patch216
-rw-r--r--patches.renesas/0784-media-v4l-vsp1-bru-Support-premultiplied-alpha-at-th.patch204
-rw-r--r--patches.renesas/0785-media-v4l-vsp1-bru-Support-non-premultiplied-colors-.patch52
-rw-r--r--patches.renesas/0786-media-v4l-vsp1-bru-Make-the-background-color-configu.patch127
-rw-r--r--patches.renesas/0787-media-v4l-vsp1-uds-Fix-scaling-of-alpha-layer.patch333
-rw-r--r--patches.renesas/0788-ASoC-rsnd-fixup-rsnd_gen_dma_addr-for-Gen1.patch84
-rw-r--r--patches.renesas/0789-ASoC-rsnd-fixup-loop-exit-timing-of-dma-name-search.patch41
-rw-r--r--patches.renesas/0790-ASoC-rcar-Fix-dma-direction-type.patch54
-rw-r--r--patches.renesas/0791-ASoC-rsnd-SSI-DMA-can-select-BUSIF.patch420
-rw-r--r--patches.renesas/0792-ASoC-rsnd-use-dmaengine_prep_dma_cyclic-instead-of-o.patch172
-rw-r--r--patches.renesas/0793-ASoC-rsnd-enable-DVC-when-capture.patch60
-rw-r--r--patches.renesas/0794-ASoC-rsnd-DMA-cleanup-for-flexible-SSI-SRC-selection.patch264
-rw-r--r--patches.renesas/0795-ASoC-rsnd-DMA-start-address-is-properly-used-for-eac.patch64
-rw-r--r--patches.renesas/0796-ASoC-rsnd-add-DT-support-to-DVC.patch152
-rw-r--r--patches.renesas/0797-ASoC-rsnd-add-missing-src-dst_addr_width-for-DMAEngi.patch32
-rw-r--r--patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch80
-rw-r--r--patches.renesas/0799-ASoC-rsnd-use-regmap_mmio-instead-of-original-regmap.patch566
-rw-r--r--patches.renesas/0800-ASoC-rsnd-care-detail-of-SRC_BSDSR.patch71
-rw-r--r--patches.renesas/0801-ASoC-rsnd-care-audio-local-bus-data-format-consisten.patch98
-rw-r--r--patches.renesas/0802-ASoC-rsnd-add-missing-dev_dbg-in-rsnd_bset.patch43
-rw-r--r--patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch50
-rw-r--r--patches.renesas/0804-ASoC-rsnd-fixup-SND_SOC_DAIFMT_xB_xF-behavior.patch92
-rw-r--r--patches.renesas/0805-ASoC-rsnd-tidyup-DVC-control-method.patch135
-rw-r--r--patches.renesas/0806-ASoC-rsnd-enable-Mute-control-on-DVC.patch100
-rw-r--r--patches.renesas/0807-ARM-shmobile-armadillo800eva-reference-dts-Add-match.patch49
-rw-r--r--patches.renesas/0808-ARM-shmobile-marzen-Remove-early_printk-from-command.patch33
-rw-r--r--patches.renesas/0809-ARM-shmobile-armadillo800eva-defconfig-Enable-REGULA.patch43
-rw-r--r--patches.renesas/0810-ARM-shmobile-marzen-Add-to-shmobile-defconfig.patch59
-rw-r--r--patches.renesas/0811-ARM-shmobile-Enable-PM_RUNTIME-in-defconfig.patch28
-rw-r--r--patches.renesas/0812-ARM-shmobile-Enable-CPUFREQ-configuration.patch40
-rw-r--r--patches.renesas/0813-ARM-shmobile-add-cpufreq-cpu0-driver-for-common-SH-M.patch98
-rw-r--r--patches.renesas/0814-ARM-shmobile-Fix-device-node-reference-leakage-in-sh.patch87
-rw-r--r--patches.renesas/0815-ARM-shmobile-Move-intc.h-cleanup-sh_intc.h-usage.patch105
-rw-r--r--patches.renesas/0816-ARM-shmobile-Move-dma-register.h.patch123
-rw-r--r--patches.renesas/0817-ARM-shmobile-Move-clock.h.patch229
-rw-r--r--patches.renesas/0818-ARM-shmobile-Move-most-of-irqs.h-keep-some-for-pinct.patch511
-rw-r--r--patches.renesas/0819-ARM-shmobile-Move-common.h.patch868
-rw-r--r--patches.renesas/0820-ARM-shmobile-Move-pm-rmobile.h-cleanup-sh73xx.h.patch169
-rw-r--r--patches.renesas/0821-ARM-shmobile-Move-pm-rcar.h-cleanup-r8a7779-case.patch162
-rw-r--r--patches.renesas/0822-ARM-shmobile-Move-rcar-gen2.h-cleanup-r8a7790-case.patch200
-rw-r--r--patches.renesas/0823-ARM-shmobile-Update-EMEV2-DTS-to-include-CPU-frequen.patch40
-rw-r--r--patches.renesas/0824-ARM-shmobile-Use-shmobile_init_delay-on-EMEV2.patch45
-rw-r--r--patches.renesas/0825-ARM-shmobile-r8a7779-Add-clocks.patch180
-rw-r--r--patches.renesas/0826-ARM-shmobile-Sync-Marzen-DTS-with-Marzen-reference-D.patch134
-rw-r--r--patches.renesas/0827-ARM-shmobile-marzen-Specify-external-clock-frequency.patch36
-rw-r--r--patches.renesas/0828-ARM-shmobile-r8a7779-Reference-clocks.patch120
-rw-r--r--patches.renesas/0829-ARM-shmobile-r8a7791-SYSC-setup-code.patch115
-rw-r--r--patches.renesas/0830-ARM-shmobile-APMU-Add-Core-Standby-state-for-Suspend.patch142
-rw-r--r--patches.renesas/0831-ARM-shmobile-r8a7790-Support-Core-Standby-for-Suspen.patch31
-rw-r--r--patches.renesas/0832-ARM-shmobile-r8a7791-Support-Core-Standby-for-Suspen.patch30
-rw-r--r--patches.renesas/0833-ARM-shmobile-Mark-all-SoCs-in-shmobile-as-CPUFreq-ca.patch35
-rw-r--r--patches.renesas/0834-ARM-shmobile-Use-shmobile_init_late-on-r8a7790-DT-on.patch32
-rw-r--r--patches.renesas/0835-ARM-shmobile-Use-shmobile_init_late-on-r8a7791-DT-on.patch32
-rw-r--r--patches.renesas/0836-ARM-shmobile-Add-shared-R-Car-Gen2-CMA-reservation-c.patch80
-rw-r--r--patches.renesas/0837-ARM-shmobile-rcar-gen2-Update-for-of_get_flat_dt_pro.patch128
-rw-r--r--patches.renesas/0838-ARM-shmobile-rcar-gen2-Use-1ULL-instead-of-u64-1.patch32
-rw-r--r--patches.renesas/0839-ARM-shmobile-rcar-gen2-Remove-useless-copied-section.patch40
-rw-r--r--patches.renesas/0840-ARM-shmobile-rcar-gen2-correct-return-value-of-shmob.patch38
-rw-r--r--patches.renesas/0841-ARM-shmobile-koelsch-reference-Remove-workarounds-fo.patch58
-rw-r--r--patches.renesas/0842-ARM-shmobile-lager-reference-Remove-workarounds-for-.patch55
-rw-r--r--patches.renesas/0843-ARM-shmobile-armadillo800eva-legacy-Add-LED-support.patch71
-rw-r--r--patches.renesas/0844-ARM-shmobile-armadillo800eva-reference-Spelling-s-ED.patch38
-rw-r--r--patches.renesas/0845-ARM-shmobile-Enable-R-Car-Gen2-CMA-code-in-board-fil.patch67
-rw-r--r--patches.renesas/0846-ARM-shmobile-Get-rid-of-redundant-EMEV2-mach-callbac.patch60
-rw-r--r--patches.renesas/0847-ARM-shmobile-Update-r7s72100-DTS-to-include-CPU-freq.patch34
-rw-r--r--patches.renesas/0848-ARM-shmobile-Use-shmobile_init_delay-on-Genmai-board.patch47
-rw-r--r--patches.renesas/0849-ARM-shmobile-Use-shmobile_init_delay-on-r7s72100.patch58
-rw-r--r--patches.renesas/0850-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-in-common-.patch34
-rw-r--r--patches.renesas/0851-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-for-Lager.patch47
-rw-r--r--patches.renesas/0852-ARM-shmobile-Remove-unused-r8a7790_init_early.patch50
-rw-r--r--patches.renesas/0853-ARM-shmobile-r8a7779-Add-helper-to-read-mode-pins.patch100
-rw-r--r--patches.renesas/0854-ARM-shmobile-r8a7779-Move-r8a7779_earlytimer_init-to.patch77
-rw-r--r--patches.renesas/0855-ARM-shmobile-marzen-reference-Move-clock-and-OF-devi.patch61
-rw-r--r--patches.renesas/0856-ARM-shmobile-r8a7779-Initial-multiplatform-support.patch113
-rw-r--r--patches.renesas/0857-ARM-shmobile-marzen-reference-Initialize-CPG-device.patch65
-rw-r--r--patches.renesas/0858-ARM-shmobile-marzen-reference-Instantiate-clkdevs-fo.patch69
-rw-r--r--patches.renesas/0859-ARM-shmobile-Remove-non-multiplatform-Marzen-referen.patch92
-rw-r--r--patches.renesas/0860-ARM-shmobile-Let-Marzen-multiplatform-boot-with-Marz.patch47
-rw-r--r--patches.renesas/0861-ARM-shmobile-Remove-Marzen-reference-DTS.patch150
-rw-r--r--patches.renesas/0862-ARM-shmobile-marzen-reference-Remove-legacy-clock-su.patch57
-rw-r--r--patches.renesas/0863-ARM-shmobile-r8a7779-Add-Maximum-CPU-Frequency-to-DT.patch50
-rw-r--r--patches.renesas/0864-ARM-shmobile-r8a7779-Use-DT-CPU-Frequency-in-common-.patch35
-rw-r--r--patches.renesas/0865-ARM-shmobile-marzen-reference-Use-DT-CPU-Frequency.patch34
-rw-r--r--patches.renesas/0866-ARM-shmobile-r8a7779-Remove-unused-r8a7779_init_dela.patch49
-rw-r--r--patches.renesas/0867-ARM-shmobile-r8a7779-dtsi-Update-unit-addresses-for-.patch62
-rw-r--r--patches.renesas/0868-ARM-shmobile-r8a7779-dtsi-Correct-address-cells-size.patch75
-rw-r--r--patches.renesas/0869-ARM-shmobile-r8a7779-Add-scif-nodes-to-dtsi.patch86
-rw-r--r--patches.renesas/0870-ARM-shmobile-marzen-Initialise-SCIF-devices-using-DT.patch92
-rw-r--r--patches.renesas/0871-ARM-shmobile-marzen-Do-not-use-workaround-for-scif-d.patch35
-rw-r--r--patches.renesas/0872-ARM-shmobile-r8a7790-add-USB3.0-clocks-to-device-tre.patch42
-rw-r--r--patches.renesas/0873-ARM-shmobile-r8a7791-add-USB3.0-clocks-to-device-tre.patch40
-rw-r--r--patches.renesas/0874-ARM-shmobile-r8a7791-dtsi-add-SYS-DMAC-clocks.patch47
-rw-r--r--patches.renesas/0875-ARM-shmobile-lager-Add-VDD-MPU-regulator-for-DVFS.patch66
-rw-r--r--patches.renesas/0876-ARM-shmobile-r8a7790-lager-dts-Add-DVFS-parameters-i.patch75
-rw-r--r--patches.renesas/0877-ARM-shmobile-koelsch-dts-Add-VDD-MPU-regulator-for-D.patch63
-rw-r--r--patches.renesas/0878-ARM-shmobile-r8a7791-koelsch-dts-Add-DVFS-parameters.patch72
-rw-r--r--patches.renesas/0879-ARM-shmobile-lager-enable-i2c-devices.patch46
-rw-r--r--patches.renesas/0880-ARM-shmobile-lager-add-i2c1-i2c2-pins.patch58
-rw-r--r--patches.renesas/0881-ARM-shmobile-lager-Move-i2c-12-_pins-nodes-to-pfc-no.patch61
-rw-r--r--patches.renesas/0882-ARM-shmobile-Lager-memory-map-update.patch52
-rw-r--r--patches.renesas/0883-ARM-shmobile-lager-Remove-duplicate-i2c3-nodes.patch70
-rw-r--r--patches.renesas/0884-ARM-shmobile-koelsch-Remove-duplicate-i2c6-nodes.patch78
-rw-r--r--patches.renesas/0885-ARM-shmobile-henninger-add-I2C2-DT-support.patch51
-rw-r--r--patches.renesas/0886-ARM-shmobile-r8a7790-add-MSTP10-support-on-DTSI.patch97
-rw-r--r--patches.renesas/0887-ARM-shmobile-r8a7790-add-R-Car-sound-support-on-DTSI.patch83
-rw-r--r--patches.renesas/0888-ARM-shmobile-r8a7791-add-audio-clock-on-DTSI.patch52
-rw-r--r--patches.renesas/0889-ARM-shmobile-r8a7791-add-MSTP10-support-on-DTSI.patch99
-rw-r--r--patches.renesas/0890-ARM-shmobile-r8a7790-Add-PCIEC-clock-device-tree-nod.patch57
-rw-r--r--patches.renesas/0891-ARM-shmobile-r8a7790-Add-default-PCIe-bus-clock.patch39
-rw-r--r--patches.renesas/0892-ARM-shmobile-r8a7790-Add-PCIe-Controller-device-node.patch54
-rw-r--r--patches.renesas/0893-ARM-shmobile-r8a7791-Add-PCIEC-clock-device-tree-nod.patch56
-rw-r--r--patches.renesas/0894-ARM-shmobile-r8a7791-Add-default-PCIe-bus-clock.patch41
-rw-r--r--patches.renesas/0895-ARM-shmobile-r8a7791-Add-PCIe-Controller-device-node.patch50
-rw-r--r--patches.renesas/0896-ARM-shmobile-koelsch-Enable-PCIe-Controller-PCIe-bus.patch35
-rw-r--r--patches.renesas/0897-ARM-shmobile-henninger-Enable-PCIe-Controller-PCIe-b.patch32
-rw-r--r--patches.renesas/0898-ARM-shmobile-r8a7791-add-R-Car-sound-support-on-DTSI.patch83
-rw-r--r--patches.renesas/0899-ARM-shmobile-Enable-genmai-board-in-multiplatform-de.patch31
-rw-r--r--patches.renesas/0900-ARM-shmobile-Move-r7s72100.h.patch99
-rw-r--r--patches.renesas/0901-ARM-shmobile-Move-r8a73a4.h.patch83
-rw-r--r--patches.renesas/0902-ARM-shmobile-Move-r8a7740.h.patch110
-rw-r--r--patches.renesas/0903-ARM-shmobile-Move-r8a7778.h.patch84
-rw-r--r--patches.renesas/0904-ARM-shmobile-Move-r8a7790.h.patch160
-rw-r--r--patches.renesas/0905-ARM-shmobile-Move-sh73a0.h.patch130
-rw-r--r--patches.renesas/0906-ARM-shmobile-Move-sh7372.h.patch99
-rw-r--r--patches.renesas/0907-ARM-shmobile-Move-r8a7779.h.patch148
-rw-r--r--patches.renesas/0908-ARM-shmobile-Move-r8a7791.h.patch121
-rw-r--r--patches.renesas/0909-ARM-shmobile-Allow-use-of-boot-code-for-non-SMP-case.patch105
-rw-r--r--patches.renesas/0910-ARM-shmobile-Adjust-APMU-code-to-build-for-non-SMP.patch80
-rw-r--r--patches.renesas/0911-ARM-shmobile-Use-__init-for-APMU-suspend-init-functi.patch33
-rw-r--r--patches.renesas/0912-ARM-shmobile-Move-r8a7790-reset-code-to-pm-r8a7790.c.patch141
-rw-r--r--patches.renesas/0913-ARM-shmobile-Allow-r8a7790-to-build-non-SMP-APMU-cod.patch73
-rw-r--r--patches.renesas/0914-ARM-shmobile-Move-r8a7791-reset-code-to-pm-r8a7791.c.patch117
-rw-r--r--patches.renesas/0915-ARM-shmobile-Allow-r8a7791-to-build-non-SMP-APMU-cod.patch74
-rw-r--r--patches.renesas/0916-ARM-shmobile-r8a7790-add-internal-PCI-bridge-nodes.patch95
-rw-r--r--patches.renesas/0917-ARM-shmobile-lager-enable-internal-PCI.patch72
-rw-r--r--patches.renesas/0918-ARM-shmobile-r8a7790-add-DVC-support-for-sound-node-.patch44
-rw-r--r--patches.renesas/0919-ARM-shmobile-r8a7791-add-DVC-support-for-sound-node-.patch44
-rw-r--r--patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch189
-rw-r--r--patches.renesas/0921-ARM-shmobile-r8a7790-Fix-whitespace-errors-in-pci-no.patch58
-rw-r--r--patches.renesas/0922-ARM-shmobile-genmai-reference-dts-Add-RSPI-node.patch39
-rw-r--r--patches.renesas/0923-ARM-shmobile-fix-shmobile_smp_apmu_suspend_init-buil.patch34
-rw-r--r--patches.renesas/0924-ARM-shmobile-r8a7791-add-internal-PCI-bridge-nodes.patch72
-rw-r--r--patches.renesas/0925-ARM-shmobile-koelsch-enable-internal-PCI.patch62
-rw-r--r--patches.renesas/0926-ARM-shmobile-henninger-enable-internal-PCI.patch62
-rw-r--r--patches.renesas/0927-ARM-shmobile-henninger-Consistently-use-tabs-for-ind.patch30
-rw-r--r--patches.renesas/0928-ARM-shmobile-r8a7779-Consistently-use-tabs-for-inden.patch42
-rw-r--r--patches.renesas/0929-ARM-shmobile-armadillo800eva-reference-Remove-early_.patch32
-rw-r--r--patches.renesas/0930-ARM-shmobile-kzm9g-reference-Remove-early_printk-fro.patch31
-rw-r--r--patches.renesas/0931-ARM-shmobile-marzen-Consistently-use-tabs-for-indent.patch45
-rw-r--r--patches.renesas/0932-ARM-shmobile-Enable-R-Car-Gen-2-PCIe-in-shmobile_def.patch32
-rw-r--r--patches.renesas/0933-ARM-shmobile-Remove-opps-table-check-for-cpufreq.patch51
-rw-r--r--patches.renesas/0934-ARM-shmobile-Lager-Correct-I2C-bus-for-VDD-MPU-regul.patch48
-rw-r--r--patches.renesas/0935-ARM-shmobile-r8a7790-lager-use-iic-cores-instead-of-.patch74
-rw-r--r--patches.renesas/0936-ARM-shmobile-r8a7778-add-SCI-clock-support-for-DT.patch41
-rw-r--r--patches.renesas/0937-ARM-shmobile-r8a73a4-add-SCI-clock-support-for-DT.patch40
-rw-r--r--patches.renesas/0938-ARM-shmobile-r8a7740-correct-SCI-clock-support-for-D.patch62
-rw-r--r--patches.renesas/0939-ARM-shmobile-sh73a0-add-SCI-clock-support-for-DT.patch48
-rw-r--r--patches.renesas/0940-ARM-shmobile-r8a7778-Add-SCIF-nodes.patch73
-rw-r--r--patches.renesas/0941-ARM-shmobile-bockw-reference-Initialise-SCIF-device-.patch86
-rw-r--r--patches.renesas/0942-ARM-shmobile-r8a73a4-Add-SCIF-nodes.patch72
-rw-r--r--patches.renesas/0943-ARM-shmobile-ape6evm-reference-Initialise-SCIF-devic.patch88
-rw-r--r--patches.renesas/0944-ARM-shmobile-r8a7740-Add-SCIF-nodes.patch93
-rw-r--r--patches.renesas/0945-ARM-shmobile-armadillo800eva-reference-Initialise-SC.patch85
-rw-r--r--patches.renesas/0946-ARM-shmobile-sh73a0-Add-SCIF-nodes.patch102
-rw-r--r--patches.renesas/0947-ARM-shmobile-kzm9g-reference-Initialise-SCIF-device-.patch77
-rw-r--r--patches.renesas/0948-ARM-shmobile-r8a7778-add-TMU-clock-support-for-DT.patch33
-rw-r--r--patches.renesas/0949-ARM-shmobile-r8a7740-add-TMU-clock-support-for-DT.patch32
-rw-r--r--patches.renesas/0950-ARM-shmobile-r8a73a4-add-CMT1-clock-support-for-DT.patch30
-rw-r--r--patches.renesas/0951-ARM-shmobile-r8a7740-add-CMT1-clock-support-for-DT.patch30
-rw-r--r--patches.renesas/0952-ARM-shmobile-sh73a0-add-CMT1-clock-support-for-DT.patch30
-rw-r--r--patches.renesas/0953-ARM-shmobile-genmai-remove-defconfig.patch149
-rw-r--r--patches.renesas/0954-ARM-shmobile-sh73a0-Remove-spurious-0x-from-SCIFB-cl.patch36
-rw-r--r--patches.renesas/0955-ARM-shmobile-defconfig-Remove-MACH_GENMAI.patch33
-rw-r--r--patches.renesas/0956-ARM-shmobile-r8a7790-add-missing-0x0100-for-SDCKCR.patch41
-rw-r--r--patches.renesas/0957-ARM-shmobile-r8a7791-add-missing-0x0100-for-SDCKCR.patch39
-rw-r--r--patches.renesas/0958-ARM-shmobile-koelsch-Remove-non-existent-i2c6-pinmux.patch53
-rw-r--r--patches.renesas/0960-xhci-Platform-Add-en-dis-able_usb3_lpm_timeout.patch35
-rw-r--r--patches.renesas/0961-xhci-Platform-Set-xhci-lpm-support-quirk-based-on-pl.patch102
-rw-r--r--patches.renesas/0962-usb-host-xhci-plat-use-devm_functions.patch83
-rw-r--r--patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch283
-rw-r--r--patches.renesas/0964-ASoC-ak4642-Make-of_device_id-array-const.patch40
-rw-r--r--patches.renesas/0965-i2c-rcar-fix-MNR-interrupt-handling.patch65
-rw-r--r--patches.renesas/0966-Revert-i2c-rcar-remove-spinlock.patch112
-rw-r--r--patches.renesas/0967-ASoC-rcar-Use-instead-of-for-boolean-expressions.patch37
-rw-r--r--patches.renesas/0968-net-sh_eth-fix-driver-dependencies.patch37
-rw-r--r--patches.renesas/0969-usb-renesas_usbhs-fix-the-behavior-of-some-usbhs_pkt.patch185
-rw-r--r--patches.renesas/0970-usb-renesas_usbhs-protect-mod-irq_-bemp-brdy-sts-by-.patch48
-rw-r--r--patches.renesas/0971-usb-renesas_usbhs-fix-the-condition-of-is_done-in-us.patch61
-rw-r--r--patches.renesas/0972-usb-renesas_usbhs-fix-the-usb_pkt_pop.patch80
-rw-r--r--patches.renesas/0973-i2c-rcar-fix-RCAR_IRQ_ACK_-RECV-SEND.patch31
-rw-r--r--patches.renesas/micrel-fix-masking-off-led-bits.patch38
-rw-r--r--patches.renesas/phy-micrel-add-of-configuration-for-led-mode.patch143
-rw-r--r--series1008
1007 files changed, 5 insertions, 107854 deletions
diff --git a/cfg/minnow-io.cfg b/cfg/minnow-io.cfg
deleted file mode 100644
index 9bfe5c19e8c19..0000000000000
--- a/cfg/minnow-io.cfg
+++ /dev/null
@@ -1,20 +0,0 @@
-CONFIG_MINNOWBOARD=y
-CONFIG_MINNOWBOARD_GPIO=m
-CONFIG_MINNOWBOARD_KEYS=m
-
-# GPIO Support
-CONFIG_GPIO_SYSFS=y
-CONFIG_GPIOLIB=y
-
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_MFD_CORE=y
-CONFIG_LPC_SCH=y
-CONFIG_GPIO_SCH=y
-CONFIG_GPIO_PCH=y
-
-# Userland interfaces
-CONFIG_INPUT_EVDEV=y
-
-# Input Device Drivers
-CONFIG_KEYBOARD_GPIO_POLLED=y
diff --git a/patches.intel/i2c-i801-add-device-id-for-intel-wildcat-point-pch.patch b/patches.intel/i2c-i801-add-device-id-for-intel-wildcat-point-pch.patch
deleted file mode 100644
index f2541a5399c58..0000000000000
--- a/patches.intel/i2c-i801-add-device-id-for-intel-wildcat-point-pch.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Tue Nov 4 17:56:01 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Tue, 4 Nov 2014 16:55:24 +0800
-Subject: [LTSI-dev] [PATCH 3/4] i2c: i801: Add device ID for Intel Wildcat Point PCH
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Message-ID: <1415091325-27802-4-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Jean Delvare <jdelvare@suse.de>
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit b299de839157852c563b9f133c8b7e630545a9c3)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- Documentation/i2c/busses/i2c-i801 | 1 +
- drivers/i2c/busses/Kconfig | 1 +
- drivers/i2c/busses/i2c-i801.c | 3 +++
- 3 files changed, 5 insertions(+)
-
---- a/Documentation/i2c/busses/i2c-i801
-+++ b/Documentation/i2c/busses/i2c-i801
-@@ -25,6 +25,7 @@ Supported adapters:
- * Intel Avoton (SOC)
- * Intel Wellsburg (PCH)
- * Intel Coleto Creek (PCH)
-+ * Intel Wildcat Point (PCH)
- * Intel Wildcat Point-LP (PCH)
- * Intel BayTrail (SOC)
- Datasheets: Publicly available at the Intel website
---- a/drivers/i2c/busses/Kconfig
-+++ b/drivers/i2c/busses/Kconfig
-@@ -109,6 +109,7 @@ config I2C_I801
- Avoton (SOC)
- Wellsburg (PCH)
- Coleto Creek (PCH)
-+ Wildcat Point (PCH)
- Wildcat Point-LP (PCH)
- BayTrail (SOC)
-
---- a/drivers/i2c/busses/i2c-i801.c
-+++ b/drivers/i2c/busses/i2c-i801.c
-@@ -59,6 +59,7 @@
- * Wellsburg (PCH) MS 0x8d7e 32 hard yes yes yes
- * Wellsburg (PCH) MS 0x8d7f 32 hard yes yes yes
- * Coleto Creek (PCH) 0x23b0 32 hard yes yes yes
-+ * Wildcat Point (PCH) 0x8ca2 32 hard yes yes yes
- * Wildcat Point-LP (PCH) 0x9ca2 32 hard yes yes yes
- * BayTrail (SOC) 0x0f12 32 hard yes yes yes
- *
-@@ -175,6 +176,7 @@
- #define PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS 0x23b0
- #define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30
- #define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS 0x8c22
-+#define PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS 0x8ca2
- #define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS 0x8d22
- #define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS0 0x8d7d
- #define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1 0x8d7e
-@@ -823,6 +825,7 @@ static const struct pci_device_id i801_i
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS) },
-+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS) },
- { 0, }
diff --git a/patches.intel/i2c-i801-add-pci-id-for-intel-braswell.patch b/patches.intel/i2c-i801-add-pci-id-for-intel-braswell.patch
deleted file mode 100644
index d06eceff0f9b2..0000000000000
--- a/patches.intel/i2c-i801-add-pci-id-for-intel-braswell.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Tue Nov 4 17:56:06 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Tue, 4 Nov 2014 16:55:25 +0800
-Subject: [LTSI-dev] [PATCH 4/4] i2c: i801: Add PCI ID for Intel Braswell
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Message-ID: <1415091325-27802-5-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Alan Cox <alan@linux.intel.com>
-
-The SMBus host controller is the same as used in Baytrail so add the new
-PCI ID to the driver's list of supported IDs.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 39e8e30ee544a62c148033d64a979028b958ca05)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/i2c/busses/i2c-i801.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/i2c/busses/i2c-i801.c
-+++ b/drivers/i2c/busses/i2c-i801.c
-@@ -164,6 +164,7 @@
-
- /* Older devices have their ID defined in <linux/pci_ids.h> */
- #define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12
-+#define PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS 0x2292
- #define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22
- #define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22
- /* Patsburg also has three 'Integrated Device Function' SMBus controllers */
-@@ -828,6 +829,7 @@ static const struct pci_device_id i801_i
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_SMBUS) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS) },
-+ { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_BRASWELL_SMBUS) },
- { 0, }
- };
-
diff --git a/patches.intel/i2c-i801-fix-the-alignment-of-the-device-table.patch b/patches.intel/i2c-i801-fix-the-alignment-of-the-device-table.patch
deleted file mode 100644
index 7a8f8c7035094..0000000000000
--- a/patches.intel/i2c-i801-fix-the-alignment-of-the-device-table.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Tue Nov 4 17:55:57 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Tue, 4 Nov 2014 16:55:23 +0800
-Subject: [LTSI-dev] [PATCH 2/4] i2c: i801: Fix the alignment of the device table
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Message-ID: <1415091325-27802-3-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Jean Delvare <jdelvare@suse.de>
-
-A long name broke the alignment, shift the columns a bit to fix it and
-make the table look nice again. While we're here, switch to the
-standard comment style to make checkpatch happy, and use tabs instead
-of spaces for column alignment.
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit ce3161106ab57afbfbe1c33d95bf4a569405983a)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/i2c/busses/i2c-i801.c | 136 +++++++++++++++++++++---------------------
- 1 file changed, 68 insertions(+), 68 deletions(-)
-
---- a/drivers/i2c/busses/i2c-i801.c
-+++ b/drivers/i2c/busses/i2c-i801.c
-@@ -22,57 +22,57 @@
- */
-
- /*
-- Supports the following Intel I/O Controller Hubs (ICH):
--
-- I/O Block I2C
-- region SMBus Block proc. block
-- Chip name PCI ID size PEC buffer call read
-- ----------------------------------------------------------------------
-- 82801AA (ICH) 0x2413 16 no no no no
-- 82801AB (ICH0) 0x2423 16 no no no no
-- 82801BA (ICH2) 0x2443 16 no no no no
-- 82801CA (ICH3) 0x2483 32 soft no no no
-- 82801DB (ICH4) 0x24c3 32 hard yes no no
-- 82801E (ICH5) 0x24d3 32 hard yes yes yes
-- 6300ESB 0x25a4 32 hard yes yes yes
-- 82801F (ICH6) 0x266a 32 hard yes yes yes
-- 6310ESB/6320ESB 0x269b 32 hard yes yes yes
-- 82801G (ICH7) 0x27da 32 hard yes yes yes
-- 82801H (ICH8) 0x283e 32 hard yes yes yes
-- 82801I (ICH9) 0x2930 32 hard yes yes yes
-- EP80579 (Tolapai) 0x5032 32 hard yes yes yes
-- ICH10 0x3a30 32 hard yes yes yes
-- ICH10 0x3a60 32 hard yes yes yes
-- 5/3400 Series (PCH) 0x3b30 32 hard yes yes yes
-- 6 Series (PCH) 0x1c22 32 hard yes yes yes
-- Patsburg (PCH) 0x1d22 32 hard yes yes yes
-- Patsburg (PCH) IDF 0x1d70 32 hard yes yes yes
-- Patsburg (PCH) IDF 0x1d71 32 hard yes yes yes
-- Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes
-- DH89xxCC (PCH) 0x2330 32 hard yes yes yes
-- Panther Point (PCH) 0x1e22 32 hard yes yes yes
-- Lynx Point (PCH) 0x8c22 32 hard yes yes yes
-- Lynx Point-LP (PCH) 0x9c22 32 hard yes yes yes
-- Avoton (SOC) 0x1f3c 32 hard yes yes yes
-- Wellsburg (PCH) 0x8d22 32 hard yes yes yes
-- Wellsburg (PCH) MS 0x8d7d 32 hard yes yes yes
-- Wellsburg (PCH) MS 0x8d7e 32 hard yes yes yes
-- Wellsburg (PCH) MS 0x8d7f 32 hard yes yes yes
-- Coleto Creek (PCH) 0x23b0 32 hard yes yes yes
-- Wildcat Point-LP (PCH) 0x9ca2 32 hard yes yes yes
-- BayTrail (SOC) 0x0f12 32 hard yes yes yes
--
-- Features supported by this driver:
-- Software PEC no
-- Hardware PEC yes
-- Block buffer yes
-- Block process call transaction no
-- I2C block read transaction yes (doesn't use the block buffer)
-- Slave mode no
-- Interrupt processing yes
--
-- See the file Documentation/i2c/busses/i2c-i801 for details.
--*/
-+ * Supports the following Intel I/O Controller Hubs (ICH):
-+ *
-+ * I/O Block I2C
-+ * region SMBus Block proc. block
-+ * Chip name PCI ID size PEC buffer call read
-+ * ---------------------------------------------------------------------------
-+ * 82801AA (ICH) 0x2413 16 no no no no
-+ * 82801AB (ICH0) 0x2423 16 no no no no
-+ * 82801BA (ICH2) 0x2443 16 no no no no
-+ * 82801CA (ICH3) 0x2483 32 soft no no no
-+ * 82801DB (ICH4) 0x24c3 32 hard yes no no
-+ * 82801E (ICH5) 0x24d3 32 hard yes yes yes
-+ * 6300ESB 0x25a4 32 hard yes yes yes
-+ * 82801F (ICH6) 0x266a 32 hard yes yes yes
-+ * 6310ESB/6320ESB 0x269b 32 hard yes yes yes
-+ * 82801G (ICH7) 0x27da 32 hard yes yes yes
-+ * 82801H (ICH8) 0x283e 32 hard yes yes yes
-+ * 82801I (ICH9) 0x2930 32 hard yes yes yes
-+ * EP80579 (Tolapai) 0x5032 32 hard yes yes yes
-+ * ICH10 0x3a30 32 hard yes yes yes
-+ * ICH10 0x3a60 32 hard yes yes yes
-+ * 5/3400 Series (PCH) 0x3b30 32 hard yes yes yes
-+ * 6 Series (PCH) 0x1c22 32 hard yes yes yes
-+ * Patsburg (PCH) 0x1d22 32 hard yes yes yes
-+ * Patsburg (PCH) IDF 0x1d70 32 hard yes yes yes
-+ * Patsburg (PCH) IDF 0x1d71 32 hard yes yes yes
-+ * Patsburg (PCH) IDF 0x1d72 32 hard yes yes yes
-+ * DH89xxCC (PCH) 0x2330 32 hard yes yes yes
-+ * Panther Point (PCH) 0x1e22 32 hard yes yes yes
-+ * Lynx Point (PCH) 0x8c22 32 hard yes yes yes
-+ * Lynx Point-LP (PCH) 0x9c22 32 hard yes yes yes
-+ * Avoton (SOC) 0x1f3c 32 hard yes yes yes
-+ * Wellsburg (PCH) 0x8d22 32 hard yes yes yes
-+ * Wellsburg (PCH) MS 0x8d7d 32 hard yes yes yes
-+ * Wellsburg (PCH) MS 0x8d7e 32 hard yes yes yes
-+ * Wellsburg (PCH) MS 0x8d7f 32 hard yes yes yes
-+ * Coleto Creek (PCH) 0x23b0 32 hard yes yes yes
-+ * Wildcat Point-LP (PCH) 0x9ca2 32 hard yes yes yes
-+ * BayTrail (SOC) 0x0f12 32 hard yes yes yes
-+ *
-+ * Features supported by this driver:
-+ * Software PEC no
-+ * Hardware PEC yes
-+ * Block buffer yes
-+ * Block process call transaction no
-+ * I2C block read transaction yes (doesn't use the block buffer)
-+ * Slave mode no
-+ * Interrupt processing yes
-+ *
-+ * See the file Documentation/i2c/busses/i2c-i801 for details.
-+ */
-
- #include <linux/interrupt.h>
- #include <linux/module.h>
-@@ -162,24 +162,24 @@
- STATUS_ERROR_FLAGS)
-
- /* Older devices have their ID defined in <linux/pci_ids.h> */
--#define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12
--#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22
--#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22
-+#define PCI_DEVICE_ID_INTEL_BAYTRAIL_SMBUS 0x0f12
-+#define PCI_DEVICE_ID_INTEL_COUGARPOINT_SMBUS 0x1c22
-+#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS 0x1d22
- /* Patsburg also has three 'Integrated Device Function' SMBus controllers */
--#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0 0x1d70
--#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 0x1d71
--#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 0x1d72
--#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22
--#define PCI_DEVICE_ID_INTEL_AVOTON_SMBUS 0x1f3c
--#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330
--#define PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS 0x23b0
--#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30
--#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS 0x8c22
--#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS 0x8d22
--#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS0 0x8d7d
--#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1 0x8d7e
--#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2 0x8d7f
--#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS 0x9c22
-+#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF0 0x1d70
-+#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF1 0x1d71
-+#define PCI_DEVICE_ID_INTEL_PATSBURG_SMBUS_IDF2 0x1d72
-+#define PCI_DEVICE_ID_INTEL_PANTHERPOINT_SMBUS 0x1e22
-+#define PCI_DEVICE_ID_INTEL_AVOTON_SMBUS 0x1f3c
-+#define PCI_DEVICE_ID_INTEL_DH89XXCC_SMBUS 0x2330
-+#define PCI_DEVICE_ID_INTEL_COLETOCREEK_SMBUS 0x23b0
-+#define PCI_DEVICE_ID_INTEL_5_3400_SERIES_SMBUS 0x3b30
-+#define PCI_DEVICE_ID_INTEL_LYNXPOINT_SMBUS 0x8c22
-+#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS 0x8d22
-+#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS0 0x8d7d
-+#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS1 0x8d7e
-+#define PCI_DEVICE_ID_INTEL_WELLSBURG_SMBUS_MS2 0x8d7f
-+#define PCI_DEVICE_ID_INTEL_LYNXPOINT_LP_SMBUS 0x9c22
- #define PCI_DEVICE_ID_INTEL_WILDCATPOINT_LP_SMBUS 0x9ca2
-
- struct i801_mux_config {
diff --git a/patches.intel/i2c-remove-define_pci_device_table-macro.patch b/patches.intel/i2c-remove-define_pci_device_table-macro.patch
deleted file mode 100644
index b447d9b7f75ef..0000000000000
--- a/patches.intel/i2c-remove-define_pci_device_table-macro.patch
+++ /dev/null
@@ -1,261 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Tue Nov 4 17:55:55 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Tue, 4 Nov 2014 16:55:22 +0800
-Subject: [LTSI-dev] [PATCH 1/4] i2c: remove DEFINE_PCI_DEVICE_TABLE macro
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Message-ID: <1415091325-27802-2-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Jingoo Han <jg1.han@samsung.com>
-
-Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro
-is not preferred.
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 392debf11656dedd79da44416747d5b2b1747f5e)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/i2c/busses/i2c-ali1535.c | 2 +-
- drivers/i2c/busses/i2c-ali1563.c | 2 +-
- drivers/i2c/busses/i2c-ali15x3.c | 2 +-
- drivers/i2c/busses/i2c-amd756.c | 2 +-
- drivers/i2c/busses/i2c-amd8111.c | 2 +-
- drivers/i2c/busses/i2c-designware-pcidrv.c | 2 +-
- drivers/i2c/busses/i2c-eg20t.c | 2 +-
- drivers/i2c/busses/i2c-hydra.c | 2 +-
- drivers/i2c/busses/i2c-i801.c | 2 +-
- drivers/i2c/busses/i2c-ismt.c | 2 +-
- drivers/i2c/busses/i2c-nforce2.c | 2 +-
- drivers/i2c/busses/i2c-pasemi.c | 2 +-
- drivers/i2c/busses/i2c-piix4.c | 2 +-
- drivers/i2c/busses/i2c-pxa-pci.c | 2 +-
- drivers/i2c/busses/i2c-sis5595.c | 2 +-
- drivers/i2c/busses/i2c-sis630.c | 2 +-
- drivers/i2c/busses/i2c-sis96x.c | 2 +-
- drivers/i2c/busses/i2c-via.c | 2 +-
- drivers/i2c/busses/i2c-viapro.c | 2 +-
- drivers/i2c/busses/scx200_acb.c | 2 +-
- 20 files changed, 20 insertions(+), 20 deletions(-)
-
---- a/drivers/i2c/busses/i2c-ali1535.c
-+++ b/drivers/i2c/busses/i2c-ali1535.c
-@@ -494,7 +494,7 @@ static struct i2c_adapter ali1535_adapte
- .algo = &smbus_algorithm,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(ali1535_ids) = {
-+static const struct pci_device_id ali1535_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
- { },
- };
---- a/drivers/i2c/busses/i2c-ali1563.c
-+++ b/drivers/i2c/busses/i2c-ali1563.c
-@@ -416,7 +416,7 @@ static void ali1563_remove(struct pci_de
- ali1563_shutdown(dev);
- }
-
--static DEFINE_PCI_DEVICE_TABLE(ali1563_id_table) = {
-+static const struct pci_device_id ali1563_id_table[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1563) },
- {},
- };
---- a/drivers/i2c/busses/i2c-ali15x3.c
-+++ b/drivers/i2c/busses/i2c-ali15x3.c
-@@ -476,7 +476,7 @@ static struct i2c_adapter ali15x3_adapte
- .algo = &smbus_algorithm,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(ali15x3_ids) = {
-+static const struct pci_device_id ali15x3_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M7101) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-amd756.c
-+++ b/drivers/i2c/busses/i2c-amd756.c
-@@ -307,7 +307,7 @@ static const char* chipname[] = {
- "nVidia nForce", "AMD8111",
- };
-
--static DEFINE_PCI_DEVICE_TABLE(amd756_ids) = {
-+static const struct pci_device_id amd756_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_740B),
- .driver_data = AMD756 },
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7413),
---- a/drivers/i2c/busses/i2c-amd8111.c
-+++ b/drivers/i2c/busses/i2c-amd8111.c
-@@ -414,7 +414,7 @@ static const struct i2c_algorithm smbus_
- };
-
-
--static DEFINE_PCI_DEVICE_TABLE(amd8111_ids) = {
-+static const struct pci_device_id amd8111_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_SMBUS2) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-designware-pcidrv.c
-+++ b/drivers/i2c/busses/i2c-designware-pcidrv.c
-@@ -309,7 +309,7 @@ static void i2c_dw_pci_remove(struct pci
- /* work with hotplug and coldplug */
- MODULE_ALIAS("i2c_designware-pci");
-
--static DEFINE_PCI_DEVICE_TABLE(i2_designware_pci_ids) = {
-+static const struct pci_device_id i2_designware_pci_ids[] = {
- /* Moorestown */
- { PCI_VDEVICE(INTEL, 0x0802), moorestown_0 },
- { PCI_VDEVICE(INTEL, 0x0803), moorestown_1 },
---- a/drivers/i2c/busses/i2c-eg20t.c
-+++ b/drivers/i2c/busses/i2c-eg20t.c
-@@ -186,7 +186,7 @@ static DEFINE_MUTEX(pch_mutex);
- #define PCI_DEVICE_ID_ML7223_I2C 0x8010
- #define PCI_DEVICE_ID_ML7831_I2C 0x8817
-
--static DEFINE_PCI_DEVICE_TABLE(pch_pcidev_id) = {
-+static const struct pci_device_id pch_pcidev_id[] = {
- { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_PCH_I2C), 1, },
- { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7213_I2C), 2, },
- { PCI_VDEVICE(ROHM, PCI_DEVICE_ID_ML7223_I2C), 1, },
---- a/drivers/i2c/busses/i2c-hydra.c
-+++ b/drivers/i2c/busses/i2c-hydra.c
-@@ -104,7 +104,7 @@ static struct i2c_adapter hydra_adap = {
- .algo_data = &hydra_bit_data,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(hydra_ids) = {
-+static const struct pci_device_id hydra_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_HYDRA) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-i801.c
-+++ b/drivers/i2c/busses/i2c-i801.c
-@@ -791,7 +791,7 @@ static const struct i2c_algorithm smbus_
- .functionality = i801_func,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(i801_ids) = {
-+static const struct pci_device_id i801_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_3) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_3) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_2) },
---- a/drivers/i2c/busses/i2c-ismt.c
-+++ b/drivers/i2c/busses/i2c-ismt.c
-@@ -182,7 +182,7 @@ struct ismt_priv {
- /**
- * ismt_ids - PCI device IDs supported by this driver
- */
--static DEFINE_PCI_DEVICE_TABLE(ismt_ids) = {
-+static const struct pci_device_id ismt_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_S1200_SMT0) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_S1200_SMT1) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_AVOTON_SMT) },
---- a/drivers/i2c/busses/i2c-nforce2.c
-+++ b/drivers/i2c/busses/i2c-nforce2.c
-@@ -306,7 +306,7 @@ static struct i2c_algorithm smbus_algori
- };
-
-
--static DEFINE_PCI_DEVICE_TABLE(nforce2_ids) = {
-+static const struct pci_device_id nforce2_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_SMBUS) },
- { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SMBUS) },
- { PCI_DEVICE(PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_SMBUS) },
---- a/drivers/i2c/busses/i2c-pasemi.c
-+++ b/drivers/i2c/busses/i2c-pasemi.c
-@@ -401,7 +401,7 @@ static void pasemi_smb_remove(struct pci
- kfree(smbus);
- }
-
--static DEFINE_PCI_DEVICE_TABLE(pasemi_smb_ids) = {
-+static const struct pci_device_id pasemi_smb_ids[] = {
- { PCI_DEVICE(0x1959, 0xa003) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-piix4.c
-+++ b/drivers/i2c/busses/i2c-piix4.c
-@@ -540,7 +540,7 @@ static const struct i2c_algorithm smbus_
- .functionality = piix4_func,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(piix4_ids) = {
-+static const struct pci_device_id piix4_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3) },
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82443MX_3) },
- { PCI_DEVICE(PCI_VENDOR_ID_EFAR, PCI_DEVICE_ID_EFAR_SLC90E66_3) },
---- a/drivers/i2c/busses/i2c-pxa-pci.c
-+++ b/drivers/i2c/busses/i2c-pxa-pci.c
-@@ -148,7 +148,7 @@ static void ce4100_i2c_remove(struct pci
- kfree(sds);
- }
-
--static DEFINE_PCI_DEVICE_TABLE(ce4100_i2c_devices) = {
-+static const struct pci_device_id ce4100_i2c_devices[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_INTEL, 0x2e68)},
- { },
- };
---- a/drivers/i2c/busses/i2c-sis5595.c
-+++ b/drivers/i2c/busses/i2c-sis5595.c
-@@ -369,7 +369,7 @@ static struct i2c_adapter sis5595_adapte
- .algo = &smbus_algorithm,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(sis5595_ids) = {
-+static const struct pci_device_id sis5595_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-sis630.c
-+++ b/drivers/i2c/busses/i2c-sis630.c
-@@ -510,7 +510,7 @@ static struct i2c_adapter sis630_adapter
- .retries = 3
- };
-
--static DEFINE_PCI_DEVICE_TABLE(sis630_ids) = {
-+static const struct pci_device_id sis630_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_503) },
- { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_LPC) },
- { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_964) },
---- a/drivers/i2c/busses/i2c-sis96x.c
-+++ b/drivers/i2c/busses/i2c-sis96x.c
-@@ -244,7 +244,7 @@ static struct i2c_adapter sis96x_adapter
- .algo = &smbus_algorithm,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(sis96x_ids) = {
-+static const struct pci_device_id sis96x_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_SI, PCI_DEVICE_ID_SI_SMBUS) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-via.c
-+++ b/drivers/i2c/busses/i2c-via.c
-@@ -88,7 +88,7 @@ static struct i2c_adapter vt586b_adapter
- };
-
-
--static DEFINE_PCI_DEVICE_TABLE(vt586b_ids) = {
-+static const struct pci_device_id vt586b_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_3) },
- { 0, }
- };
---- a/drivers/i2c/busses/i2c-viapro.c
-+++ b/drivers/i2c/busses/i2c-viapro.c
-@@ -442,7 +442,7 @@ release_region:
- return error;
- }
-
--static DEFINE_PCI_DEVICE_TABLE(vt596_ids) = {
-+static const struct pci_device_id vt596_ids[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596_3),
- .driver_data = SMBBA1 },
- { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C596B_3),
---- a/drivers/i2c/busses/scx200_acb.c
-+++ b/drivers/i2c/busses/scx200_acb.c
-@@ -554,7 +554,7 @@ static struct platform_driver scx200_pci
- .remove = scx200_remove,
- };
-
--static DEFINE_PCI_DEVICE_TABLE(scx200_isa) = {
-+static const struct pci_device_id scx200_isa[] = {
- { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_BRIDGE) },
- { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SC1100_BRIDGE) },
- { 0, }
diff --git a/patches.intel/mfd-delete-non-required-instances-of-include-linux-init.h.patch b/patches.intel/mfd-delete-non-required-instances-of-include-linux-init.h.patch
deleted file mode 100644
index fb0984d00db40..0000000000000
--- a/patches.intel/mfd-delete-non-required-instances-of-include-linux-init.h.patch
+++ /dev/null
@@ -1,255 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:33 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:06 +0800
-Subject: [LTSI-dev] [PATCH 01/16] mfd: Delete non-required instances of include <linux/init.h>
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-2-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-
-None of these files are actually using any __init type directives
-and hence don't need to include <linux/init.h>. Most are just a
-left over from __devinit and __cpuinit removal, or simply due to
-code getting copied from one driver to the next.
-
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 3c699105d0376c14940ce7cf561754a94cdff8dd)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/adp5520.c | 1 -
- drivers/mfd/cs5535-mfd.c | 1 -
- drivers/mfd/janz-cmodio.c | 1 -
- drivers/mfd/lpc_ich.c | 1 -
- drivers/mfd/lpc_sch.c | 1 -
- drivers/mfd/mcp-sa11x0.c | 1 -
- drivers/mfd/pcf50633-adc.c | 1 -
- drivers/mfd/rc5t583-irq.c | 1 -
- drivers/mfd/rdc321x-southbridge.c | 1 -
- drivers/mfd/retu-mfd.c | 1 -
- drivers/mfd/smsc-ece1099.c | 1 -
- drivers/mfd/ti-ssp.c | 1 -
- drivers/mfd/ti_am335x_tscadc.c | 1 -
- drivers/mfd/tps65912-core.c | 1 -
- drivers/mfd/tps65912-irq.c | 1 -
- drivers/mfd/twl4030-irq.c | 1 -
- drivers/mfd/twl4030-madc.c | 1 -
- drivers/mfd/twl6030-irq.c | 1 -
- drivers/mfd/vexpress-config.c | 1 -
- drivers/mfd/wm8350-core.c | 1 -
- drivers/mfd/wm8350-irq.c | 1 -
- 21 files changed, 21 deletions(-)
-
---- a/drivers/mfd/adp5520.c
-+++ b/drivers/mfd/adp5520.c
-@@ -20,7 +20,6 @@
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/platform_device.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/interrupt.h>
- #include <linux/irq.h>
---- a/drivers/mfd/cs5535-mfd.c
-+++ b/drivers/mfd/cs5535-mfd.c
-@@ -23,7 +23,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/mfd/core.h>
- #include <linux/module.h>
- #include <linux/pci.h>
---- a/drivers/mfd/janz-cmodio.c
-+++ b/drivers/mfd/janz-cmodio.c
-@@ -13,7 +13,6 @@
-
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/pci.h>
- #include <linux/interrupt.h>
- #include <linux/delay.h>
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -58,7 +58,6 @@
-
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/errno.h>
---- a/drivers/mfd/lpc_sch.c
-+++ b/drivers/mfd/lpc_sch.c
-@@ -23,7 +23,6 @@
- * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/errno.h>
---- a/drivers/mfd/mcp-sa11x0.c
-+++ b/drivers/mfd/mcp-sa11x0.c
-@@ -12,7 +12,6 @@
- * MCP read/write timeouts from Jordi Colomer, rehacked by rmk.
- */
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/io.h>
- #include <linux/errno.h>
- #include <linux/kernel.h>
---- a/drivers/mfd/pcf50633-adc.c
-+++ b/drivers/mfd/pcf50633-adc.c
-@@ -19,7 +19,6 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/device.h>
- #include <linux/platform_device.h>
- #include <linux/completion.h>
---- a/drivers/mfd/rc5t583-irq.c
-+++ b/drivers/mfd/rc5t583-irq.c
-@@ -22,7 +22,6 @@
- */
- #include <linux/interrupt.h>
- #include <linux/irq.h>
--#include <linux/init.h>
- #include <linux/i2c.h>
- #include <linux/mfd/rc5t583.h>
-
---- a/drivers/mfd/rdc321x-southbridge.c
-+++ b/drivers/mfd/rdc321x-southbridge.c
-@@ -19,7 +19,6 @@
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- */
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/kernel.h>
- #include <linux/platform_device.h>
---- a/drivers/mfd/retu-mfd.c
-+++ b/drivers/mfd/retu-mfd.c
-@@ -19,7 +19,6 @@
- #include <linux/err.h>
- #include <linux/i2c.h>
- #include <linux/irq.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/mutex.h>
- #include <linux/module.h>
---- a/drivers/mfd/smsc-ece1099.c
-+++ b/drivers/mfd/smsc-ece1099.c
-@@ -13,7 +13,6 @@
-
- #include <linux/module.h>
- #include <linux/moduleparam.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/i2c.h>
- #include <linux/gpio.h>
---- a/drivers/mfd/ti-ssp.c
-+++ b/drivers/mfd/ti-ssp.c
-@@ -23,7 +23,6 @@
- #include <linux/module.h>
- #include <linux/slab.h>
- #include <linux/err.h>
--#include <linux/init.h>
- #include <linux/wait.h>
- #include <linux/clk.h>
- #include <linux/interrupt.h>
---- a/drivers/mfd/ti_am335x_tscadc.c
-+++ b/drivers/mfd/ti_am335x_tscadc.c
-@@ -14,7 +14,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/err.h>
- #include <linux/io.h>
---- a/drivers/mfd/tps65912-core.c
-+++ b/drivers/mfd/tps65912-core.c
-@@ -15,7 +15,6 @@
-
- #include <linux/module.h>
- #include <linux/moduleparam.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/gpio.h>
- #include <linux/mfd/core.h>
---- a/drivers/mfd/tps65912-irq.c
-+++ b/drivers/mfd/tps65912-irq.c
-@@ -15,7 +15,6 @@
-
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/bug.h>
- #include <linux/device.h>
- #include <linux/interrupt.h>
---- a/drivers/mfd/twl4030-irq.c
-+++ b/drivers/mfd/twl4030-irq.c
-@@ -27,7 +27,6 @@
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
--#include <linux/init.h>
- #include <linux/export.h>
- #include <linux/interrupt.h>
- #include <linux/irq.h>
---- a/drivers/mfd/twl4030-madc.c
-+++ b/drivers/mfd/twl4030-madc.c
-@@ -29,7 +29,6 @@
- *
- */
-
--#include <linux/init.h>
- #include <linux/device.h>
- #include <linux/interrupt.h>
- #include <linux/kernel.h>
---- a/drivers/mfd/twl6030-irq.c
-+++ b/drivers/mfd/twl6030-irq.c
-@@ -31,7 +31,6 @@
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
--#include <linux/init.h>
- #include <linux/export.h>
- #include <linux/interrupt.h>
- #include <linux/irq.h>
---- a/drivers/mfd/vexpress-config.c
-+++ b/drivers/mfd/vexpress-config.c
-@@ -16,7 +16,6 @@
- #include <linux/bitops.h>
- #include <linux/completion.h>
- #include <linux/export.h>
--#include <linux/init.h>
- #include <linux/list.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
---- a/drivers/mfd/wm8350-core.c
-+++ b/drivers/mfd/wm8350-core.c
-@@ -14,7 +14,6 @@
-
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/bug.h>
- #include <linux/device.h>
---- a/drivers/mfd/wm8350-irq.c
-+++ b/drivers/mfd/wm8350-irq.c
-@@ -14,7 +14,6 @@
-
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/bug.h>
- #include <linux/device.h>
- #include <linux/interrupt.h>
diff --git a/patches.intel/mfd-lpc_ich-add-device-ids-for-intel-9-series-pch.patch b/patches.intel/mfd-lpc_ich-add-device-ids-for-intel-9-series-pch.patch
deleted file mode 100644
index 1613c2cb61ee3..0000000000000
--- a/patches.intel/mfd-lpc_ich-add-device-ids-for-intel-9-series-pch.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:18 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:18 +0800
-Subject: [LTSI-dev] [PATCH 13/16] mfd: lpc_ich: Add Device IDs for Intel 9 Series PCH
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-14-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: James Ralston <james.d.ralston@intel.com>
-
-This patch adds the LPC Device IDs for the Intel 9 Series PCH.
-
-Signed-off-by: James Ralston <james.d.ralston@intel.com>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit fea31042ff613145c7784e2ce454bf3c151b97ba)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -54,6 +54,7 @@
- * document number TBD : Avoton SoC
- * document number TBD : Coleto Creek
- * document number TBD : Wildcat Point-LP
-+ * document number TBD : 9 Series
- */
-
- #define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
-@@ -217,6 +218,7 @@ enum lpc_chipsets {
- LPC_COLETO, /* Coleto Creek */
- LPC_WPT_LP, /* Wildcat Point-LP */
- LPC_BRASWELL, /* Braswell SoC */
-+ LPC_9S, /* 9 Series */
- };
-
- static struct lpc_ich_info lpc_chipset_info[] = {
-@@ -524,6 +526,10 @@ static struct lpc_ich_info lpc_chipset_i
- .name = "Braswell SoC",
- .iTCO_version = 3,
- },
-+ [LPC_9S] = {
-+ .name = "9 Series",
-+ .iTCO_version = 2,
-+ },
- };
-
- /*
-@@ -751,6 +757,11 @@ static const struct pci_device_id lpc_ic
- { PCI_VDEVICE(INTEL, 0x9cc7), LPC_WPT_LP},
- { PCI_VDEVICE(INTEL, 0x9cc9), LPC_WPT_LP},
- { PCI_VDEVICE(INTEL, 0x229c), LPC_BRASWELL},
-+ { PCI_VDEVICE(INTEL, 0x8cc1), LPC_9S},
-+ { PCI_VDEVICE(INTEL, 0x8cc2), LPC_9S},
-+ { PCI_VDEVICE(INTEL, 0x8cc3), LPC_9S},
-+ { PCI_VDEVICE(INTEL, 0x8cc4), LPC_9S},
-+ { PCI_VDEVICE(INTEL, 0x8cc6), LPC_9S},
- { 0, }, /* End of list */
- };
- MODULE_DEVICE_TABLE(pci, lpc_ich_ids);
diff --git a/patches.intel/mfd-lpc_ich-add-pci-id-for-intel-braswell.patch b/patches.intel/mfd-lpc_ich-add-pci-id-for-intel-braswell.patch
deleted file mode 100644
index fe29dbfed687a..0000000000000
--- a/patches.intel/mfd-lpc_ich-add-pci-id-for-intel-braswell.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:15 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:17 +0800
-Subject: [LTSI-dev] [PATCH 12/16] mfd: lpc_ich: Add PCI ID for Intel Braswell
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-13-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Alan Cox <alan@linux.intel.com>
-
-This is the same as used in Baytrail so add the new PCI ID to the driver's
-list of supported IDs.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit ff0c9da013d2c9f1ec232926a54e536ab48c6678)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -216,6 +216,7 @@ enum lpc_chipsets {
- LPC_BAYTRAIL, /* Bay Trail SoC */
- LPC_COLETO, /* Coleto Creek */
- LPC_WPT_LP, /* Wildcat Point-LP */
-+ LPC_BRASWELL, /* Braswell SoC */
- };
-
- static struct lpc_ich_info lpc_chipset_info[] = {
-@@ -519,6 +520,10 @@ static struct lpc_ich_info lpc_chipset_i
- .name = "Wildcat Point_LP",
- .iTCO_version = 2,
- },
-+ [LPC_BRASWELL] = {
-+ .name = "Braswell SoC",
-+ .iTCO_version = 3,
-+ },
- };
-
- /*
-@@ -745,6 +750,7 @@ static const struct pci_device_id lpc_ic
- { PCI_VDEVICE(INTEL, 0x9cc6), LPC_WPT_LP},
- { PCI_VDEVICE(INTEL, 0x9cc7), LPC_WPT_LP},
- { PCI_VDEVICE(INTEL, 0x9cc9), LPC_WPT_LP},
-+ { PCI_VDEVICE(INTEL, 0x229c), LPC_BRASWELL},
- { 0, }, /* End of list */
- };
- MODULE_DEVICE_TABLE(pci, lpc_ich_ids);
diff --git a/patches.intel/mfd-lpc_ich-add-support-for-intel-avoton-gpios.patch b/patches.intel/mfd-lpc_ich-add-support-for-intel-avoton-gpios.patch
deleted file mode 100644
index 8e3548a426043..0000000000000
--- a/patches.intel/mfd-lpc_ich-add-support-for-intel-avoton-gpios.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:41 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:08 +0800
-Subject: [LTSI-dev] [PATCH 03/16] mfd: lpc_ich: Add support for Intel Avoton GPIOs
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-4-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Vincent Donnefort <vdonnefort@gmail.com>
-
-Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit facd9939403cb5769190054a600474399e776e3a)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 1 +
- include/linux/mfd/lpc_ich.h | 1 +
- 2 files changed, 2 insertions(+)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -499,6 +499,7 @@ static struct lpc_ich_info lpc_chipset_i
- [LPC_AVN] = {
- .name = "Avoton SoC",
- .iTCO_version = 1,
-+ .gpio_version = AVOTON_GPIO,
- },
- [LPC_COLETO] = {
- .name = "Coleto Creek",
---- a/include/linux/mfd/lpc_ich.h
-+++ b/include/linux/mfd/lpc_ich.h
-@@ -39,6 +39,7 @@ enum {
- ICH_V9_GPIO,
- ICH_V10CORP_GPIO,
- ICH_V10CONS_GPIO,
-+ AVOTON_GPIO,
- };
-
- struct lpc_ich_info {
diff --git a/patches.intel/mfd-lpc_ich-add-support-for-intel-bay-trail-soc.patch b/patches.intel/mfd-lpc_ich-add-support-for-intel-bay-trail-soc.patch
deleted file mode 100644
index a403a0526c409..0000000000000
--- a/patches.intel/mfd-lpc_ich-add-support-for-intel-bay-trail-soc.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:08 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:15 +0800
-Subject: [LTSI-dev] [PATCH 10/16] mfd: lpc_ich: Add support for Intel Bay Trail SoC
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-11-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-This patch adds the LPC Controller Device IDs for Watchdog and GPIO for
-the Intel Bay Trail Atom SoC.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 6111ec70357022ccd037399c13f69900431850b4)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -213,6 +213,7 @@ enum lpc_chipsets {
- LPC_LPT_LP, /* Lynx Point-LP */
- LPC_WBG, /* Wellsburg */
- LPC_AVN, /* Avoton SoC */
-+ LPC_BAYTRAIL, /* Bay Trail SoC */
- LPC_COLETO, /* Coleto Creek */
- LPC_WPT_LP, /* Wildcat Point-LP */
- };
-@@ -505,6 +506,10 @@ static struct lpc_ich_info lpc_chipset_i
- .iTCO_version = 3,
- .gpio_version = AVOTON_GPIO,
- },
-+ [LPC_BAYTRAIL] = {
-+ .name = "Bay Trail SoC",
-+ .iTCO_version = 3,
-+ },
- [LPC_COLETO] = {
- .name = "Coleto Creek",
- .iTCO_version = 2,
-@@ -730,6 +735,7 @@ static const struct pci_device_id lpc_ic
- { PCI_VDEVICE(INTEL, 0x1f39), LPC_AVN},
- { PCI_VDEVICE(INTEL, 0x1f3a), LPC_AVN},
- { PCI_VDEVICE(INTEL, 0x1f3b), LPC_AVN},
-+ { PCI_VDEVICE(INTEL, 0x0f1c), LPC_BAYTRAIL},
- { PCI_VDEVICE(INTEL, 0x2390), LPC_COLETO},
- { PCI_VDEVICE(INTEL, 0x9cc1), LPC_WPT_LP},
- { PCI_VDEVICE(INTEL, 0x9cc2), LPC_WPT_LP},
diff --git a/patches.intel/mfd-lpc_ich-add-support-for-itco-v3.patch b/patches.intel/mfd-lpc_ich-add-support-for-itco-v3.patch
deleted file mode 100644
index 58e1220d23048..0000000000000
--- a/patches.intel/mfd-lpc_ich-add-support-for-itco-v3.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:57 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:12 +0800
-Subject: [LTSI-dev] [PATCH 07/16] mfd: lpc_ich: Add support for iTCO v3
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-8-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-Some newer Atom CPUs, eg Avoton and Bay Trail, use slightly different
-register layouts for the iTCO than the current v1 and v2 iTCO.
-Differences from previous iTCO versions include:
-- The ACPI space is enabled in the "ACPI base address" register instead
- of the "ACPI control register"
-
-- The "no reboot" functionality is set in the "Power Management
- Configuration" register instead of the "General Control and Status"
- (GCS) register or PCI configuration space.
-
-- The "ACPI Control Register" is not present on v3. The "Power
- Management Configuration Base Address" register resides at the same
- address is Avoton/Bay Trail.
-
-To differentiate these newer chipsets create a new v3 iTCO version and
-update the MFD driver to support them.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Rajat Jain <rajatjain@juniper.net>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit eb71d4dec4a5e010e34b9d7afdb5af41884c388e)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 81 ++++++++++++++++++++++++++++++++++++--------
- include/linux/mfd/lpc_ich.h | 8 ++--
- 2 files changed, 71 insertions(+), 18 deletions(-)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -71,9 +71,11 @@
- #define ACPIBASE_GPE_END 0x2f
- #define ACPIBASE_SMI_OFF 0x30
- #define ACPIBASE_SMI_END 0x33
-+#define ACPIBASE_PMC_OFF 0x08
-+#define ACPIBASE_PMC_END 0x0c
- #define ACPIBASE_TCO_OFF 0x60
- #define ACPIBASE_TCO_END 0x7f
--#define ACPICTRL 0x44
-+#define ACPICTRL_PMCBASE 0x44
-
- #define ACPIBASE_GCS_OFF 0x3410
- #define ACPIBASE_GCS_END 0x3414
-@@ -93,11 +95,12 @@ struct lpc_ich_priv {
- int chipset;
-
- int abase; /* ACPI base */
-- int actrl; /* ACPI control or PMC base */
-+ int actrl_pbase; /* ACPI control or PMC base */
- int gbase; /* GPIO base */
- int gctrl; /* GPIO control */
-
-- int actrl_save; /* Cached ACPI control base value */
-+ int abase_save; /* Cached ACPI base value */
-+ int actrl_pbase_save; /* Cached ACPI control or PMC base value */
- int gctrl_save; /* Cached GPIO control value */
- };
-
-@@ -110,7 +113,7 @@ static struct resource wdt_ich_res[] = {
- {
- .flags = IORESOURCE_IO,
- },
-- /* GCS */
-+ /* GCS or PMC */
- {
- .flags = IORESOURCE_MEM,
- },
-@@ -742,9 +745,15 @@ static void lpc_ich_restore_config_space
- {
- struct lpc_ich_priv *priv = pci_get_drvdata(dev);
-
-- if (priv->actrl_save >= 0) {
-- pci_write_config_byte(dev, priv->actrl, priv->actrl_save);
-- priv->actrl_save = -1;
-+ if (priv->abase_save >= 0) {
-+ pci_write_config_byte(dev, priv->abase, priv->abase_save);
-+ priv->abase_save = -1;
-+ }
-+
-+ if (priv->actrl_pbase_save >= 0) {
-+ pci_write_config_byte(dev, priv->actrl_pbase,
-+ priv->actrl_pbase_save);
-+ priv->actrl_pbase_save = -1;
- }
-
- if (priv->gctrl_save >= 0) {
-@@ -758,9 +767,26 @@ static void lpc_ich_enable_acpi_space(st
- struct lpc_ich_priv *priv = pci_get_drvdata(dev);
- u8 reg_save;
-
-- pci_read_config_byte(dev, priv->actrl, &reg_save);
-- pci_write_config_byte(dev, priv->actrl, reg_save | 0x80);
-- priv->actrl_save = reg_save;
-+ switch (lpc_chipset_info[priv->chipset].iTCO_version) {
-+ case 3:
-+ /*
-+ * Some chipsets (eg Avoton) enable the ACPI space in the
-+ * ACPI BASE register.
-+ */
-+ pci_read_config_byte(dev, priv->abase, &reg_save);
-+ pci_write_config_byte(dev, priv->abase, reg_save | 0x2);
-+ priv->abase_save = reg_save;
-+ break;
-+ default:
-+ /*
-+ * Most chipsets enable the ACPI space in the ACPI control
-+ * register.
-+ */
-+ pci_read_config_byte(dev, priv->actrl_pbase, &reg_save);
-+ pci_write_config_byte(dev, priv->actrl_pbase, reg_save | 0x80);
-+ priv->actrl_pbase_save = reg_save;
-+ break;
-+ }
- }
-
- static void lpc_ich_enable_gpio_space(struct pci_dev *dev)
-@@ -773,6 +799,17 @@ static void lpc_ich_enable_gpio_space(st
- priv->gctrl_save = reg_save;
- }
-
-+static void lpc_ich_enable_pmc_space(struct pci_dev *dev)
-+{
-+ struct lpc_ich_priv *priv = pci_get_drvdata(dev);
-+ u8 reg_save;
-+
-+ pci_read_config_byte(dev, priv->actrl_pbase, &reg_save);
-+ pci_write_config_byte(dev, priv->actrl_pbase, reg_save | 0x2);
-+
-+ priv->actrl_pbase_save = reg_save;
-+}
-+
- static void lpc_ich_finalize_cell(struct pci_dev *dev, struct mfd_cell *cell)
- {
- struct lpc_ich_priv *priv = pci_get_drvdata(dev);
-@@ -910,14 +947,20 @@ static int lpc_ich_init_wdt(struct pci_d
- lpc_ich_enable_acpi_space(dev);
-
- /*
-+ * iTCO v2:
- * Get the Memory-Mapped GCS register. To get access to it
- * we have to read RCBA from PCI Config space 0xf0 and use
- * it as base. GCS = RCBA + ICH6_GCS(0x3410).
-+ *
-+ * iTCO v3:
-+ * Get the Power Management Configuration register. To get access
-+ * to it we have to read the PMC BASE from config space and address
-+ * the register at offset 0x8.
- */
- if (lpc_chipset_info[priv->chipset].iTCO_version == 1) {
- /* Don't register iomem for TCO ver 1 */
- lpc_ich_cells[LPC_WDT].num_resources--;
-- } else {
-+ } else if (lpc_chipset_info[priv->chipset].iTCO_version == 2) {
- pci_read_config_dword(dev, RCBABASE, &base_addr_cfg);
- base_addr = base_addr_cfg & 0xffffc000;
- if (!(base_addr_cfg & 1)) {
-@@ -926,9 +969,17 @@ static int lpc_ich_init_wdt(struct pci_d
- ret = -ENODEV;
- goto wdt_done;
- }
-- res = wdt_mem_res(ICH_RES_MEM_GCS);
-+ res = wdt_mem_res(ICH_RES_MEM_GCS_PMC);
- res->start = base_addr + ACPIBASE_GCS_OFF;
- res->end = base_addr + ACPIBASE_GCS_END;
-+ } else if (lpc_chipset_info[priv->chipset].iTCO_version == 3) {
-+ lpc_ich_enable_pmc_space(dev);
-+ pci_read_config_dword(dev, ACPICTRL_PMCBASE, &base_addr_cfg);
-+ base_addr = base_addr_cfg & 0xfffffe00;
-+
-+ res = wdt_mem_res(ICH_RES_MEM_GCS_PMC);
-+ res->start = base_addr + ACPIBASE_PMC_OFF;
-+ res->end = base_addr + ACPIBASE_PMC_END;
- }
-
- lpc_ich_finalize_cell(dev, &lpc_ich_cells[LPC_WDT]);
-@@ -953,9 +1004,11 @@ static int lpc_ich_probe(struct pci_dev
-
- priv->chipset = id->driver_data;
-
-- priv->actrl_save = -1;
-+ priv->actrl_pbase_save = -1;
-+ priv->abase_save = -1;
-+
- priv->abase = ACPIBASE;
-- priv->actrl = ACPICTRL;
-+ priv->actrl_pbase = ACPICTRL_PMCBASE;
-
- priv->gctrl_save = -1;
- if (priv->chipset <= LPC_ICH5) {
---- a/include/linux/mfd/lpc_ich.h
-+++ b/include/linux/mfd/lpc_ich.h
-@@ -21,10 +21,10 @@
- #define LPC_ICH_H
-
- /* Watchdog resources */
--#define ICH_RES_IO_TCO 0
--#define ICH_RES_IO_SMI 1
--#define ICH_RES_MEM_OFF 2
--#define ICH_RES_MEM_GCS 0
-+#define ICH_RES_IO_TCO 0
-+#define ICH_RES_IO_SMI 1
-+#define ICH_RES_MEM_OFF 2
-+#define ICH_RES_MEM_GCS_PMC 0
-
- /* GPIO resources */
- #define ICH_RES_GPIO 0
diff --git a/patches.intel/mfd-lpc_ich-add-support-for-nm10-gpio.patch b/patches.intel/mfd-lpc_ich-add-support-for-nm10-gpio.patch
deleted file mode 100644
index 134f7587fd9bf..0000000000000
--- a/patches.intel/mfd-lpc_ich-add-support-for-nm10-gpio.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:05 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:14 +0800
-Subject: [LTSI-dev] [PATCH 09/16] mfd: lpc_ich: Add support for NM10 GPIO
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-10-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-The NM10's GPIO is compatible with ICH v7 GPIO.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Dan Weinlader <danw@vs-networks.com>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 117bbfe25cfc2e968be1f7976ac460a5cd3d734e)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -305,6 +305,7 @@ static struct lpc_ich_info lpc_chipset_i
- [LPC_NM10] = {
- .name = "NM10",
- .iTCO_version = 2,
-+ .gpio_version = ICH_V7_GPIO,
- },
- [LPC_ICH8] = {
- .name = "ICH8 or ICH8R",
diff --git a/patches.intel/mfd-lpc_ich-change-avoton-to-itco-v3.patch b/patches.intel/mfd-lpc_ich-change-avoton-to-itco-v3.patch
deleted file mode 100644
index d5de655b273a5..0000000000000
--- a/patches.intel/mfd-lpc_ich-change-avoton-to-itco-v3.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:01 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:13 +0800
-Subject: [LTSI-dev] [PATCH 08/16] mfd: lpc_ich: Change Avoton to iTCO v3
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-9-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-The register layout of the Avoton is compatible with the iTCO v3
-register layout.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Rajat Jain <rajatjain@juniper.net>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit c48cf59878685cc06b71bb2a3ca17b61103c8de7)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -501,7 +501,7 @@ static struct lpc_ich_info lpc_chipset_i
- },
- [LPC_AVN] = {
- .name = "Avoton SoC",
-- .iTCO_version = 1,
-+ .iTCO_version = 3,
- .gpio_version = AVOTON_GPIO,
- },
- [LPC_COLETO] = {
diff --git a/patches.intel/mfd-lpc_ich-convert-ich-gpios-ids-to-enum.patch b/patches.intel/mfd-lpc_ich-convert-ich-gpios-ids-to-enum.patch
deleted file mode 100644
index e93c9d35e07e8..0000000000000
--- a/patches.intel/mfd-lpc_ich-convert-ich-gpios-ids-to-enum.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:37 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:07 +0800
-Subject: [LTSI-dev] [PATCH 02/16] mfd: lpc_ich: Convert ICH GPIOs IDs to enum
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-3-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Vincent Donnefort <vdonnefort@gmail.com>
-
-All those IDs are arbitrary and so can be encapsulated into an enumeration.
-
-Signed-off-by: Vincent Donnefort <vdonnefort@gmail.com>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 6cec365e3eba3dd8c864056d8d3fd9e73ab8dd7a)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- include/linux/mfd/lpc_ich.h | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
-
---- a/include/linux/mfd/lpc_ich.h
-+++ b/include/linux/mfd/lpc_ich.h
-@@ -31,13 +31,15 @@
- #define ICH_RES_GPE0 1
-
- /* GPIO compatibility */
--#define ICH_I3100_GPIO 0x401
--#define ICH_V5_GPIO 0x501
--#define ICH_V6_GPIO 0x601
--#define ICH_V7_GPIO 0x701
--#define ICH_V9_GPIO 0x801
--#define ICH_V10CORP_GPIO 0xa01
--#define ICH_V10CONS_GPIO 0xa11
-+enum {
-+ ICH_I3100_GPIO,
-+ ICH_V5_GPIO,
-+ ICH_V6_GPIO,
-+ ICH_V7_GPIO,
-+ ICH_V9_GPIO,
-+ ICH_V10CORP_GPIO,
-+ ICH_V10CONS_GPIO,
-+};
-
- struct lpc_ich_info {
- char name[32];
diff --git a/patches.intel/mfd-lpc_ich-enable-gpio-for-panther-point.patch b/patches.intel/mfd-lpc_ich-enable-gpio-for-panther-point.patch
deleted file mode 100644
index 5611e58303151..0000000000000
--- a/patches.intel/mfd-lpc_ich-enable-gpio-for-panther-point.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:11 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:16 +0800
-Subject: [LTSI-dev] [PATCH 11/16] mfd: lpc_ich: Enable GPIO for Panther Point
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-12-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Guenter Roeck <linux@roeck-us.net>
-
-Panther Point PCH GPIO configuration is similar to V5 PCHs.
-
-Signed-off-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 62cf2cdb99c7e870ab857bdd617e728790f8c43c)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -488,6 +488,7 @@ static struct lpc_ich_info lpc_chipset_i
- [LPC_PPT] = {
- .name = "Panther Point",
- .iTCO_version = 2,
-+ .gpio_version = ICH_V5_GPIO,
- },
- [LPC_LPT] = {
- .name = "Lynx Point",
diff --git a/patches.intel/mfd-lpc_ich-fix-acpi-enable-bitmask.patch b/patches.intel/mfd-lpc_ich-fix-acpi-enable-bitmask.patch
deleted file mode 100644
index bfd29dd3231bd..0000000000000
--- a/patches.intel/mfd-lpc_ich-fix-acpi-enable-bitmask.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:45 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:09 +0800
-Subject: [LTSI-dev] [PATCH 04/16] mfd: lpc_ich: Fix ACPI enable bitmask
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-5-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-The original bitmask of 0x10 was incorrect and would result in a write
-to a reserved read-only bit instead of enabling the ACPI I/O
-region. Update it to the proper value of 0x80.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Rajat Jain <rajatjain@juniper.net>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit f5dccb15877b82a40950c6f752d5345c86189fc9)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -759,7 +759,7 @@ static void lpc_ich_enable_acpi_space(st
- u8 reg_save;
-
- pci_read_config_byte(dev, priv->acpi.ctrl, &reg_save);
-- pci_write_config_byte(dev, priv->acpi.ctrl, reg_save | 0x10);
-+ pci_write_config_byte(dev, priv->acpi.ctrl, reg_save | 0x80);
- priv->acpi.save = reg_save;
- }
-
diff --git a/patches.intel/mfd-lpc_ich-only-configure-watchdog-or-gpio-when-present.patch b/patches.intel/mfd-lpc_ich-only-configure-watchdog-or-gpio-when-present.patch
deleted file mode 100644
index 54455c8340c9b..0000000000000
--- a/patches.intel/mfd-lpc_ich-only-configure-watchdog-or-gpio-when-present.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:48 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:10 +0800
-Subject: [LTSI-dev] [PATCH 05/16] mfd: lpc_ich: Only configure watchdog or GPIO when present
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-6-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-Some chipsets don't currently have GPIO support enabled. For these
-chipsets don't go through the process of initializing the GPIO region.
-
-Make the same change for the watchdog initialization for chipsets which
-may not enable the WDT in the future.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Rajat Jain <rajatjain@juniper.net>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit f0776b8ce03ceb638c51b62f324844c71c446600)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -967,13 +967,17 @@ static int lpc_ich_probe(struct pci_dev
-
- pci_set_drvdata(dev, priv);
-
-- ret = lpc_ich_init_wdt(dev);
-- if (!ret)
-- cell_added = true;
-+ if (lpc_chipset_info[priv->chipset].iTCO_version) {
-+ ret = lpc_ich_init_wdt(dev);
-+ if (!ret)
-+ cell_added = true;
-+ }
-
-- ret = lpc_ich_init_gpio(dev);
-- if (!ret)
-- cell_added = true;
-+ if (lpc_chipset_info[priv->chipset].gpio_version) {
-+ ret = lpc_ich_init_gpio(dev);
-+ if (!ret)
-+ cell_added = true;
-+ }
-
- /*
- * We only care if at least one or none of the cells registered
diff --git a/patches.intel/mfd-lpc_ich-remove-lpc_ich_cfg-struct-use.patch b/patches.intel/mfd-lpc_ich-remove-lpc_ich_cfg-struct-use.patch
deleted file mode 100644
index 19beed4cf9f52..0000000000000
--- a/patches.intel/mfd-lpc_ich-remove-lpc_ich_cfg-struct-use.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:39:53 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:11 +0800
-Subject: [LTSI-dev] [PATCH 06/16] mfd: lpc_ich: Remove lpc_ich_cfg struct use
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-7-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-Future chipsets will use different register layouts that don't map
-cleanly to the lpc_ich_cfg fields. Remove the lpc_ich_cfg struct and
-add explicit fields to the higher level lpc_ich_priv structure.
-
-This change should have no functional impact.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Rajat Jain <rajatjain@juniper.net>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 429b941abd503c8936e116c819362323aafdbd50)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/mfd/lpc_ich.c | 63 +++++++++++++++++++++++++-------------------------
- 1 file changed, 32 insertions(+), 31 deletions(-)
-
---- a/drivers/mfd/lpc_ich.c
-+++ b/drivers/mfd/lpc_ich.c
-@@ -89,16 +89,16 @@
- #define wdt_mem_res(i) wdt_res(ICH_RES_MEM_OFF, i)
- #define wdt_res(b, i) (&wdt_ich_res[(b) + (i)])
-
--struct lpc_ich_cfg {
-- int base;
-- int ctrl;
-- int save;
--};
--
- struct lpc_ich_priv {
- int chipset;
-- struct lpc_ich_cfg acpi;
-- struct lpc_ich_cfg gpio;
-+
-+ int abase; /* ACPI base */
-+ int actrl; /* ACPI control or PMC base */
-+ int gbase; /* GPIO base */
-+ int gctrl; /* GPIO control */
-+
-+ int actrl_save; /* Cached ACPI control base value */
-+ int gctrl_save; /* Cached GPIO control value */
- };
-
- static struct resource wdt_ich_res[] = {
-@@ -742,14 +742,14 @@ static void lpc_ich_restore_config_space
- {
- struct lpc_ich_priv *priv = pci_get_drvdata(dev);
-
-- if (priv->acpi.save >= 0) {
-- pci_write_config_byte(dev, priv->acpi.ctrl, priv->acpi.save);
-- priv->acpi.save = -1;
-+ if (priv->actrl_save >= 0) {
-+ pci_write_config_byte(dev, priv->actrl, priv->actrl_save);
-+ priv->actrl_save = -1;
- }
-
-- if (priv->gpio.save >= 0) {
-- pci_write_config_byte(dev, priv->gpio.ctrl, priv->gpio.save);
-- priv->gpio.save = -1;
-+ if (priv->gctrl_save >= 0) {
-+ pci_write_config_byte(dev, priv->gctrl, priv->gctrl_save);
-+ priv->gctrl_save = -1;
- }
- }
-
-@@ -758,9 +758,9 @@ static void lpc_ich_enable_acpi_space(st
- struct lpc_ich_priv *priv = pci_get_drvdata(dev);
- u8 reg_save;
-
-- pci_read_config_byte(dev, priv->acpi.ctrl, &reg_save);
-- pci_write_config_byte(dev, priv->acpi.ctrl, reg_save | 0x80);
-- priv->acpi.save = reg_save;
-+ pci_read_config_byte(dev, priv->actrl, &reg_save);
-+ pci_write_config_byte(dev, priv->actrl, reg_save | 0x80);
-+ priv->actrl_save = reg_save;
- }
-
- static void lpc_ich_enable_gpio_space(struct pci_dev *dev)
-@@ -768,9 +768,9 @@ static void lpc_ich_enable_gpio_space(st
- struct lpc_ich_priv *priv = pci_get_drvdata(dev);
- u8 reg_save;
-
-- pci_read_config_byte(dev, priv->gpio.ctrl, &reg_save);
-- pci_write_config_byte(dev, priv->gpio.ctrl, reg_save | 0x10);
-- priv->gpio.save = reg_save;
-+ pci_read_config_byte(dev, priv->gctrl, &reg_save);
-+ pci_write_config_byte(dev, priv->gctrl, reg_save | 0x10);
-+ priv->gctrl_save = reg_save;
- }
-
- static void lpc_ich_finalize_cell(struct pci_dev *dev, struct mfd_cell *cell)
-@@ -815,7 +815,7 @@ static int lpc_ich_init_gpio(struct pci_
- struct resource *res;
-
- /* Setup power management base register */
-- pci_read_config_dword(dev, priv->acpi.base, &base_addr_cfg);
-+ pci_read_config_dword(dev, priv->abase, &base_addr_cfg);
- base_addr = base_addr_cfg & 0x0000ff80;
- if (!base_addr) {
- dev_notice(&dev->dev, "I/O space for ACPI uninitialized\n");
-@@ -841,7 +841,7 @@ static int lpc_ich_init_gpio(struct pci_
-
- gpe0_done:
- /* Setup GPIO base register */
-- pci_read_config_dword(dev, priv->gpio.base, &base_addr_cfg);
-+ pci_read_config_dword(dev, priv->gbase, &base_addr_cfg);
- base_addr = base_addr_cfg & 0x0000ff80;
- if (!base_addr) {
- dev_notice(&dev->dev, "I/O space for GPIO uninitialized\n");
-@@ -891,7 +891,7 @@ static int lpc_ich_init_wdt(struct pci_d
- struct resource *res;
-
- /* Setup power management base register */
-- pci_read_config_dword(dev, priv->acpi.base, &base_addr_cfg);
-+ pci_read_config_dword(dev, priv->abase, &base_addr_cfg);
- base_addr = base_addr_cfg & 0x0000ff80;
- if (!base_addr) {
- dev_notice(&dev->dev, "I/O space for ACPI uninitialized\n");
-@@ -952,17 +952,18 @@ static int lpc_ich_probe(struct pci_dev
- return -ENOMEM;
-
- priv->chipset = id->driver_data;
-- priv->acpi.save = -1;
-- priv->acpi.base = ACPIBASE;
-- priv->acpi.ctrl = ACPICTRL;
-
-- priv->gpio.save = -1;
-+ priv->actrl_save = -1;
-+ priv->abase = ACPIBASE;
-+ priv->actrl = ACPICTRL;
-+
-+ priv->gctrl_save = -1;
- if (priv->chipset <= LPC_ICH5) {
-- priv->gpio.base = GPIOBASE_ICH0;
-- priv->gpio.ctrl = GPIOCTRL_ICH0;
-+ priv->gbase = GPIOBASE_ICH0;
-+ priv->gctrl = GPIOCTRL_ICH0;
- } else {
-- priv->gpio.base = GPIOBASE_ICH6;
-- priv->gpio.ctrl = GPIOCTRL_ICH6;
-+ priv->gbase = GPIOBASE_ICH6;
-+ priv->gctrl = GPIOCTRL_ICH6;
- }
-
- pci_set_drvdata(dev, priv);
diff --git a/patches.intel/pwm-add-support-for-intel-low-power-subsystem-pwm.patch b/patches.intel/pwm-add-support-for-intel-low-power-subsystem-pwm.patch
deleted file mode 100644
index 855c4c843143e..0000000000000
--- a/patches.intel/pwm-add-support-for-intel-low-power-subsystem-pwm.patch
+++ /dev/null
@@ -1,244 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:35 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:51 +0800
-Subject: [LTSI-dev] [PATCH 1/8] pwm: add support for Intel Low Power Subsystem PWM
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-2-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Mika Westerberg <mika.westerberg@linux.intel.com>
-
-Add support for Intel Low Power I/O subsystem PWM controllers found on
-Intel BayTrail SoC.
-
-Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Signed-off-by: Chew, Kean Ho <kean.ho.chew@intel.com>
-Signed-off-by: Chang, Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit d16a5aa9e821633a3095d7a88cd1d2cd108bf966)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/Kconfig | 10 ++
- drivers/pwm/Makefile | 1
- drivers/pwm/pwm-lpss.c | 183 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 194 insertions(+)
- create mode 100644 drivers/pwm/pwm-lpss.c
-
---- a/drivers/pwm/Kconfig
-+++ b/drivers/pwm/Kconfig
-@@ -119,6 +119,16 @@ config PWM_LPC32XX
- To compile this driver as a module, choose M here: the module
- will be called pwm-lpc32xx.
-
-+config PWM_LPSS
-+ tristate "Intel LPSS PWM support"
-+ depends on ACPI
-+ help
-+ Generic PWM framework driver for Intel Low Power Subsystem PWM
-+ controller.
-+
-+ To compile this driver as a module, choose M here: the module
-+ will be called pwm-lpss.
-+
- config PWM_MXS
- tristate "Freescale MXS PWM support"
- depends on ARCH_MXS && OF
---- a/drivers/pwm/Makefile
-+++ b/drivers/pwm/Makefile
-@@ -9,6 +9,7 @@ obj-$(CONFIG_PWM_IMX) += pwm-imx.o
- obj-$(CONFIG_PWM_JZ4740) += pwm-jz4740.o
- obj-$(CONFIG_PWM_LP3943) += pwm-lp3943.o
- obj-$(CONFIG_PWM_LPC32XX) += pwm-lpc32xx.o
-+obj-$(CONFIG_PWM_LPSS) += pwm-lpss.o
- obj-$(CONFIG_PWM_MXS) += pwm-mxs.o
- obj-$(CONFIG_PWM_PCA9685) += pwm-pca9685.o
- obj-$(CONFIG_PWM_PUV3) += pwm-puv3.o
---- /dev/null
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -0,0 +1,183 @@
-+/*
-+ * Intel Low Power Subsystem PWM controller driver
-+ *
-+ * Copyright (C) 2014, Intel Corporation
-+ * Author: Mika Westerberg <mika.westerberg@linux.intel.com>
-+ * Author: Chew Kean Ho <kean.ho.chew@intel.com>
-+ * Author: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-+ * Author: Chew Chiau Ee <chiau.ee.chew@intel.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/acpi.h>
-+#include <linux/clk.h>
-+#include <linux/device.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/pwm.h>
-+#include <linux/platform_device.h>
-+
-+#define PWM 0x00000000
-+#define PWM_ENABLE BIT(31)
-+#define PWM_SW_UPDATE BIT(30)
-+#define PWM_BASE_UNIT_SHIFT 8
-+#define PWM_BASE_UNIT_MASK 0x00ffff00
-+#define PWM_ON_TIME_DIV_MASK 0x000000ff
-+#define PWM_DIVISION_CORRECTION 0x2
-+#define PWM_LIMIT (0x8000 + PWM_DIVISION_CORRECTION)
-+#define NSECS_PER_SEC 1000000000UL
-+
-+struct pwm_lpss_chip {
-+ struct pwm_chip chip;
-+ void __iomem *regs;
-+ struct clk *clk;
-+};
-+
-+static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)
-+{
-+ return container_of(chip, struct pwm_lpss_chip, chip);
-+}
-+
-+static int pwm_lpss_config(struct pwm_chip *chip, struct pwm_device *pwm,
-+ int duty_ns, int period_ns)
-+{
-+ struct pwm_lpss_chip *lpwm = to_lpwm(chip);
-+ u8 on_time_div;
-+ unsigned long c;
-+ unsigned long long base_unit, freq = NSECS_PER_SEC;
-+ u32 ctrl;
-+
-+ do_div(freq, period_ns);
-+
-+ /* The equation is: base_unit = ((freq / c) * 65536) + correction */
-+ base_unit = freq * 65536;
-+
-+ c = clk_get_rate(lpwm->clk);
-+ if (!c)
-+ return -EINVAL;
-+
-+ do_div(base_unit, c);
-+ base_unit += PWM_DIVISION_CORRECTION;
-+ if (base_unit > PWM_LIMIT)
-+ return -EINVAL;
-+
-+ if (duty_ns <= 0)
-+ duty_ns = 1;
-+ on_time_div = 255 - (255 * duty_ns / period_ns);
-+
-+ ctrl = readl(lpwm->regs + PWM);
-+ ctrl &= ~(PWM_BASE_UNIT_MASK | PWM_ON_TIME_DIV_MASK);
-+ ctrl |= (u16) base_unit << PWM_BASE_UNIT_SHIFT;
-+ ctrl |= on_time_div;
-+ /* request PWM to update on next cycle */
-+ ctrl |= PWM_SW_UPDATE;
-+ writel(ctrl, lpwm->regs + PWM);
-+
-+ return 0;
-+}
-+
-+static int pwm_lpss_enable(struct pwm_chip *chip, struct pwm_device *pwm)
-+{
-+ struct pwm_lpss_chip *lpwm = to_lpwm(chip);
-+ u32 ctrl;
-+ int ret;
-+
-+ ret = clk_prepare_enable(lpwm->clk);
-+ if (ret)
-+ return ret;
-+
-+ ctrl = readl(lpwm->regs + PWM);
-+ writel(ctrl | PWM_ENABLE, lpwm->regs + PWM);
-+
-+ return 0;
-+}
-+
-+static void pwm_lpss_disable(struct pwm_chip *chip, struct pwm_device *pwm)
-+{
-+ struct pwm_lpss_chip *lpwm = to_lpwm(chip);
-+ u32 ctrl;
-+
-+ ctrl = readl(lpwm->regs + PWM);
-+ writel(ctrl & ~PWM_ENABLE, lpwm->regs + PWM);
-+
-+ clk_disable_unprepare(lpwm->clk);
-+}
-+
-+static const struct pwm_ops pwm_lpss_ops = {
-+ .config = pwm_lpss_config,
-+ .enable = pwm_lpss_enable,
-+ .disable = pwm_lpss_disable,
-+ .owner = THIS_MODULE,
-+};
-+
-+static const struct acpi_device_id pwm_lpss_acpi_match[] = {
-+ { "80860F09", 0 },
-+ { },
-+};
-+MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
-+
-+static int pwm_lpss_probe(struct platform_device *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm;
-+ struct resource *r;
-+ int ret;
-+
-+ lpwm = devm_kzalloc(&pdev->dev, sizeof(*lpwm), GFP_KERNEL);
-+ if (!lpwm)
-+ return -ENOMEM;
-+
-+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
-+ lpwm->regs = devm_ioremap_resource(&pdev->dev, r);
-+ if (IS_ERR(lpwm->regs))
-+ return PTR_ERR(lpwm->regs);
-+
-+ lpwm->clk = devm_clk_get(&pdev->dev, NULL);
-+ if (IS_ERR(lpwm->clk)) {
-+ dev_err(&pdev->dev, "failed to get PWM clock\n");
-+ return PTR_ERR(lpwm->clk);
-+ }
-+
-+ lpwm->chip.dev = &pdev->dev;
-+ lpwm->chip.ops = &pwm_lpss_ops;
-+ lpwm->chip.base = -1;
-+ lpwm->chip.npwm = 1;
-+
-+ ret = pwmchip_add(&lpwm->chip);
-+ if (ret) {
-+ dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret);
-+ return ret;
-+ }
-+
-+ platform_set_drvdata(pdev, lpwm);
-+ return 0;
-+}
-+
-+static int pwm_lpss_remove(struct platform_device *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm = platform_get_drvdata(pdev);
-+ u32 ctrl;
-+
-+ ctrl = readl(lpwm->regs + PWM);
-+ writel(ctrl & ~PWM_ENABLE, lpwm->regs + PWM);
-+
-+ return pwmchip_remove(&lpwm->chip);
-+}
-+
-+static struct platform_driver pwm_lpss_driver = {
-+ .driver = {
-+ .name = "pwm-lpss",
-+ .acpi_match_table = pwm_lpss_acpi_match,
-+ },
-+ .probe = pwm_lpss_probe,
-+ .remove = pwm_lpss_remove,
-+};
-+module_platform_driver(pwm_lpss_driver);
-+
-+MODULE_DESCRIPTION("PWM driver for Intel LPSS");
-+MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
-+MODULE_LICENSE("GPL v2");
-+MODULE_ALIAS("platform:pwm-lpss");
diff --git a/patches.intel/pwm-lpss-add-acpi-and-pci-ids-for-intel-braswell.patch b/patches.intel/pwm-lpss-add-acpi-and-pci-ids-for-intel-braswell.patch
deleted file mode 100644
index 62d5ec0d2f8a1..0000000000000
--- a/patches.intel/pwm-lpss-add-acpi-and-pci-ids-for-intel-braswell.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:51 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:55 +0800
-Subject: [LTSI-dev] [PATCH 5/8] pwm: lpss: Add ACPI and PCI IDs for Intel Braswell
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-6-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Alan Cox <alan@linux.intel.com>
-
-This is pretty much the same as Baytrail PWM. Only difference is that the
-input clock runs on different frequency.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 373c57829a3f9da1405b1fbd3d17e50f8e1f476e)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/pwm-lpss.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -48,6 +48,11 @@ static const struct pwm_lpss_boardinfo b
- 25000000
- };
-
-+/* Braswell */
-+static const struct pwm_lpss_boardinfo bsw_info = {
-+ 19200000
-+};
-+
- static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)
- {
- return container_of(chip, struct pwm_lpss_chip, chip);
-@@ -189,6 +194,8 @@ static void pwm_lpss_remove_pci(struct p
- static struct pci_device_id pwm_lpss_pci_ids[] = {
- { PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&byt_info},
- { PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&byt_info},
-+ { PCI_VDEVICE(INTEL, 0x2288), (unsigned long)&bsw_info},
-+ { PCI_VDEVICE(INTEL, 0x2289), (unsigned long)&bsw_info},
- { },
- };
- MODULE_DEVICE_TABLE(pci, pwm_lpss_pci_ids);
-@@ -231,6 +238,7 @@ static int pwm_lpss_remove_platform(stru
-
- static const struct acpi_device_id pwm_lpss_acpi_match[] = {
- { "80860F09", (unsigned long)&byt_info },
-+ { "80862288", (unsigned long)&bsw_info },
- { },
- };
- MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
diff --git a/patches.intel/pwm-lpss-add-support-for-pci-devices.patch b/patches.intel/pwm-lpss-add-support-for-pci-devices.patch
deleted file mode 100644
index 67e9d127e60cf..0000000000000
--- a/patches.intel/pwm-lpss-add-support-for-pci-devices.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:39 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:52 +0800
-Subject: [LTSI-dev] [PATCH 2/8] pwm: lpss: Add support for PCI devices
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-3-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Alan Cox <alan@linux.intel.com>
-
-Not all systems enumerate the PWM devices via ACPI. They can also be
-exposed via the PCI interface.
-
-Signed-off-by: Alan Cox <alan@linux.intel.com>
-Signed-off-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
-Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 093e00bb3f82f3c67e2d1682e316fc012bcd0d92)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/pwm-lpss.c | 159 +++++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 129 insertions(+), 30 deletions(-)
-
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -6,6 +6,7 @@
- * Author: Chew Kean Ho <kean.ho.chew@intel.com>
- * Author: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
- * Author: Chew Chiau Ee <chiau.ee.chew@intel.com>
-+ * Author: Alan Cox <alan@linux.intel.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
-@@ -19,6 +20,9 @@
- #include <linux/module.h>
- #include <linux/pwm.h>
- #include <linux/platform_device.h>
-+#include <linux/pci.h>
-+
-+static int pci_drv, plat_drv; /* So we know which drivers registered */
-
- #define PWM 0x00000000
- #define PWM_ENABLE BIT(31)
-@@ -34,6 +38,16 @@ struct pwm_lpss_chip {
- struct pwm_chip chip;
- void __iomem *regs;
- struct clk *clk;
-+ unsigned long clk_rate;
-+};
-+
-+struct pwm_lpss_boardinfo {
-+ unsigned long clk_rate;
-+};
-+
-+/* BayTrail */
-+static const struct pwm_lpss_boardinfo byt_info = {
-+ 25000000
- };
-
- static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)
-@@ -55,7 +69,7 @@ static int pwm_lpss_config(struct pwm_ch
- /* The equation is: base_unit = ((freq / c) * 65536) + correction */
- base_unit = freq * 65536;
-
-- c = clk_get_rate(lpwm->clk);
-+ c = lpwm->clk_rate;
- if (!c)
- return -EINVAL;
-
-@@ -113,52 +127,48 @@ static const struct pwm_ops pwm_lpss_ops
- .owner = THIS_MODULE,
- };
-
--static const struct acpi_device_id pwm_lpss_acpi_match[] = {
-- { "80860F09", 0 },
-- { },
--};
--MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
--
--static int pwm_lpss_probe(struct platform_device *pdev)
-+static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
-+ struct resource *r,
-+ struct pwm_lpss_boardinfo *info)
- {
- struct pwm_lpss_chip *lpwm;
-- struct resource *r;
- int ret;
-
-- lpwm = devm_kzalloc(&pdev->dev, sizeof(*lpwm), GFP_KERNEL);
-+ lpwm = devm_kzalloc(dev, sizeof(*lpwm), GFP_KERNEL);
- if (!lpwm)
-- return -ENOMEM;
-+ return ERR_PTR(-ENOMEM);
-
-- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
-- lpwm->regs = devm_ioremap_resource(&pdev->dev, r);
-+ lpwm->regs = devm_ioremap_resource(dev, r);
- if (IS_ERR(lpwm->regs))
-- return PTR_ERR(lpwm->regs);
-+ return lpwm->regs;
-
-- lpwm->clk = devm_clk_get(&pdev->dev, NULL);
-- if (IS_ERR(lpwm->clk)) {
-- dev_err(&pdev->dev, "failed to get PWM clock\n");
-- return PTR_ERR(lpwm->clk);
-+ if (info) {
-+ lpwm->clk_rate = info->clk_rate;
-+ } else {
-+ lpwm->clk = devm_clk_get(dev, NULL);
-+ if (IS_ERR(lpwm->clk)) {
-+ dev_err(dev, "failed to get PWM clock\n");
-+ return ERR_CAST(lpwm->clk);
-+ }
-+ lpwm->clk_rate = clk_get_rate(lpwm->clk);
- }
-
-- lpwm->chip.dev = &pdev->dev;
-+ lpwm->chip.dev = dev;
- lpwm->chip.ops = &pwm_lpss_ops;
- lpwm->chip.base = -1;
- lpwm->chip.npwm = 1;
-
- ret = pwmchip_add(&lpwm->chip);
- if (ret) {
-- dev_err(&pdev->dev, "failed to add PWM chip: %d\n", ret);
-- return ret;
-+ dev_err(dev, "failed to add PWM chip: %d\n", ret);
-+ return ERR_PTR(ret);
- }
-
-- platform_set_drvdata(pdev, lpwm);
-- return 0;
-+ return lpwm;
- }
-
--static int pwm_lpss_remove(struct platform_device *pdev)
-+static int pwm_lpss_remove(struct pwm_lpss_chip *lpwm)
- {
-- struct pwm_lpss_chip *lpwm = platform_get_drvdata(pdev);
- u32 ctrl;
-
- ctrl = readl(lpwm->regs + PWM);
-@@ -167,15 +177,104 @@ static int pwm_lpss_remove(struct platfo
- return pwmchip_remove(&lpwm->chip);
- }
-
--static struct platform_driver pwm_lpss_driver = {
-+static int pwm_lpss_probe_pci(struct pci_dev *pdev,
-+ const struct pci_device_id *id)
-+{
-+ const struct pwm_lpss_boardinfo *info;
-+ struct pwm_lpss_chip *lpwm;
-+ int err;
-+
-+ err = pci_enable_device(pdev);
-+ if (err < 0)
-+ return err;
-+
-+ info = (struct pwm_lpss_boardinfo *)id->driver_data;
-+ lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
-+ if (IS_ERR(lpwm))
-+ return PTR_ERR(lpwm);
-+
-+ pci_set_drvdata(pdev, lpwm);
-+ return 0;
-+}
-+
-+static void pwm_lpss_remove_pci(struct pci_dev *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm = pci_get_drvdata(pdev);
-+
-+ pwm_lpss_remove(lpwm);
-+ pci_disable_device(pdev);
-+}
-+
-+static struct pci_device_id pwm_lpss_pci_ids[] = {
-+ { PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&byt_info},
-+ { PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&byt_info},
-+ { },
-+};
-+MODULE_DEVICE_TABLE(pci, pwm_lpss_pci_ids);
-+
-+static struct pci_driver pwm_lpss_driver_pci = {
-+ .name = "pwm-lpss",
-+ .id_table = pwm_lpss_pci_ids,
-+ .probe = pwm_lpss_probe_pci,
-+ .remove = pwm_lpss_remove_pci,
-+};
-+
-+static int pwm_lpss_probe_platform(struct platform_device *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm;
-+ struct resource *r;
-+
-+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
-+ lpwm = pwm_lpss_probe(&pdev->dev, r, NULL);
-+ if (IS_ERR(lpwm))
-+ return PTR_ERR(lpwm);
-+
-+ platform_set_drvdata(pdev, lpwm);
-+ return 0;
-+}
-+
-+static int pwm_lpss_remove_platform(struct platform_device *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm = platform_get_drvdata(pdev);
-+
-+ return pwm_lpss_remove(lpwm);
-+}
-+
-+static const struct acpi_device_id pwm_lpss_acpi_match[] = {
-+ { "80860F09", 0 },
-+ { },
-+};
-+MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
-+
-+static struct platform_driver pwm_lpss_driver_platform = {
- .driver = {
- .name = "pwm-lpss",
- .acpi_match_table = pwm_lpss_acpi_match,
- },
-- .probe = pwm_lpss_probe,
-- .remove = pwm_lpss_remove,
-+ .probe = pwm_lpss_probe_platform,
-+ .remove = pwm_lpss_remove_platform,
- };
--module_platform_driver(pwm_lpss_driver);
-+
-+static int __init pwm_init(void)
-+{
-+ pci_drv = pci_register_driver(&pwm_lpss_driver_pci);
-+ plat_drv = platform_driver_register(&pwm_lpss_driver_platform);
-+ if (pci_drv && plat_drv)
-+ return pci_drv;
-+
-+ return 0;
-+}
-+module_init(pwm_init);
-+
-+static void __exit pwm_exit(void)
-+{
-+ if (!pci_drv)
-+ pci_unregister_driver(&pwm_lpss_driver_pci);
-+ if (!plat_drv)
-+ platform_driver_unregister(&pwm_lpss_driver_platform);
-+}
-+module_exit(pwm_exit);
-
- MODULE_DESCRIPTION("PWM driver for Intel LPSS");
- MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
diff --git a/patches.intel/pwm-lpss-fix-build-failure-on-powerpc.patch b/patches.intel/pwm-lpss-fix-build-failure-on-powerpc.patch
deleted file mode 100644
index 0fb414b8c02d6..0000000000000
--- a/patches.intel/pwm-lpss-fix-build-failure-on-powerpc.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:58 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:57 +0800
-Subject: [LTSI-dev] [PATCH 7/8] pwm: lpss: Fix build failure on PowerPC
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-8-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Thierry Reding <thierry.reding@gmail.com>
-
-An x86 build seems to pull in the linux/io.h include indirectly. On
-PowerPC that doesn't happen and the build breaks due to the readl() and
-writel() functions not being declared. Fix this by explicitly including
-linux/io.h.
-
-Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit e0c86a3b63e948e51a47d17382c7cd8711d19750)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/pwm-lpss.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -13,6 +13,7 @@
- * published by the Free Software Foundation.
- */
-
-+#include <linux/io.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-
diff --git a/patches.intel/pwm-lpss-fix-const-qualifier-and-sparse-warnings.patch b/patches.intel/pwm-lpss-fix-const-qualifier-and-sparse-warnings.patch
deleted file mode 100644
index 225b391a06767..0000000000000
--- a/patches.intel/pwm-lpss-fix-const-qualifier-and-sparse-warnings.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:43 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:53 +0800
-Subject: [LTSI-dev] [PATCH 3/8] pwm: lpss: Fix const qualifier and sparse warnings
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-4-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Thierry Reding <thierry.reding@gmail.com>
-
-Fixes the following warnings reported by the 0-DAY kernel build testing
-backend:
-
- drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
->> drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
- lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
- ^
- drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
- static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
- ^
->> drivers/pwm/pwm-lpss.c:143:28: sparse: incorrect type in return expression (different address spaces)
- drivers/pwm/pwm-lpss.c:143:28: expected struct pwm_lpss_chip *
- drivers/pwm/pwm-lpss.c:143:28: got void [noderef] <asn:2>*regs
->> drivers/pwm/pwm-lpss.c:192:63: sparse: incorrect type in argument 3 (different modifiers)
- drivers/pwm/pwm-lpss.c:192:63: expected struct pwm_lpss_boardinfo *info
- drivers/pwm/pwm-lpss.c:192:63: got struct pwm_lpss_boardinfo const *[assigned] info
- drivers/pwm/pwm-lpss.c: In function 'pwm_lpss_probe_pci':
- drivers/pwm/pwm-lpss.c:192:2: warning: passing argument 3 of 'pwm_lpss_probe' discards 'const' qualifier from pointer target type [enabled by default]
- lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
- ^
- drivers/pwm/pwm-lpss.c:130:30: note: expected 'struct pwm_lpss_boardinfo *' but argument is of type 'const struct pwm_lpss_boardinfo *'
- static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
- ^
-
-Reported-by: kbuild test robot <fengguang.wu@intel.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 89c0339e0aa097384b3efed894b23820814c21d3)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/pwm-lpss.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -129,7 +129,7 @@ static const struct pwm_ops pwm_lpss_ops
-
- static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
- struct resource *r,
-- struct pwm_lpss_boardinfo *info)
-+ const struct pwm_lpss_boardinfo *info)
- {
- struct pwm_lpss_chip *lpwm;
- int ret;
-@@ -140,7 +140,7 @@ static struct pwm_lpss_chip *pwm_lpss_pr
-
- lpwm->regs = devm_ioremap_resource(dev, r);
- if (IS_ERR(lpwm->regs))
-- return lpwm->regs;
-+ return ERR_CAST(lpwm->regs);
-
- if (info) {
- lpwm->clk_rate = info->clk_rate;
diff --git a/patches.intel/pwm-lpss-properly-split-driver-to-parts.patch b/patches.intel/pwm-lpss-properly-split-driver-to-parts.patch
deleted file mode 100644
index 1d0fc808d050e..0000000000000
--- a/patches.intel/pwm-lpss-properly-split-driver-to-parts.patch
+++ /dev/null
@@ -1,446 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:55 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:56 +0800
-Subject: [LTSI-dev] [PATCH 6/8] pwm: lpss: Properly split driver to parts
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-7-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-
-The driver consists of core, PCI, and platform parts. It would be better
-to split them into separate files.
-
-The platform driver is now called pwm-lpss-platform. Thus, previously
-set CONFIG_PWM_LPSS=m is not enough to build it. But we are on the safe
-side since it seems no one from outside Intel is using it for now.
-
-While here, move to use macros module_pci_driver() and
-module_platform_driver().
-
-Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Acked-by: Alan Cox <alan@linux.intel.com>
-[thierry.reding: change select to depends on PWM_LPSS, cleanup]
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit c558e39e14c2372394f49e07fbe94e9708b615cb)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/Kconfig | 19 +++++
- drivers/pwm/Makefile | 2
- drivers/pwm/pwm-lpss-pci.c | 65 +++++++++++++++++++
- drivers/pwm/pwm-lpss-platform.c | 68 ++++++++++++++++++++
- drivers/pwm/pwm-lpss.c | 136 ++--------------------------------------
- drivers/pwm/pwm-lpss.h | 32 +++++++++
- 6 files changed, 195 insertions(+), 127 deletions(-)
- create mode 100644 drivers/pwm/pwm-lpss-pci.c
- create mode 100644 drivers/pwm/pwm-lpss-platform.c
- create mode 100644 drivers/pwm/pwm-lpss.h
-
---- a/drivers/pwm/Kconfig
-+++ b/drivers/pwm/Kconfig
-@@ -121,7 +121,6 @@ config PWM_LPC32XX
-
- config PWM_LPSS
- tristate "Intel LPSS PWM support"
-- depends on ACPI
- help
- Generic PWM framework driver for Intel Low Power Subsystem PWM
- controller.
-@@ -129,6 +128,24 @@ config PWM_LPSS
- To compile this driver as a module, choose M here: the module
- will be called pwm-lpss.
-
-+config PWM_LPSS_PCI
-+ tristate "Intel LPSS PWM PCI driver"
-+ depends on PWM_LPSS && PCI
-+ help
-+ The PCI driver for Intel Low Power Subsystem PWM controller.
-+
-+ To compile this driver as a module, choose M here: the module
-+ will be called pwm-lpss-pci.
-+
-+config PWM_LPSS_PLATFORM
-+ tristate "Intel LPSS PWM platform driver"
-+ depends on PWM_LPSS && ACPI
-+ help
-+ The platform driver for Intel Low Power Subsystem PWM controller.
-+
-+ To compile this driver as a module, choose M here: the module
-+ will be called pwm-lpss-platform.
-+
- config PWM_MXS
- tristate "Freescale MXS PWM support"
- depends on ARCH_MXS && OF
---- a/drivers/pwm/Makefile
-+++ b/drivers/pwm/Makefile
-@@ -10,6 +10,8 @@ obj-$(CONFIG_PWM_JZ4740) += pwm-jz4740.o
- obj-$(CONFIG_PWM_LP3943) += pwm-lp3943.o
- obj-$(CONFIG_PWM_LPC32XX) += pwm-lpc32xx.o
- obj-$(CONFIG_PWM_LPSS) += pwm-lpss.o
-+obj-$(CONFIG_PWM_LPSS_PCI) += pwm-lpss-pci.o
-+obj-$(CONFIG_PWM_LPSS_PLATFORM) += pwm-lpss-platform.o
- obj-$(CONFIG_PWM_MXS) += pwm-mxs.o
- obj-$(CONFIG_PWM_PCA9685) += pwm-pca9685.o
- obj-$(CONFIG_PWM_PUV3) += pwm-puv3.o
---- /dev/null
-+++ b/drivers/pwm/pwm-lpss-pci.c
-@@ -0,0 +1,65 @@
-+/*
-+ * Intel Low Power Subsystem PWM controller PCI driver
-+ *
-+ * Copyright (C) 2014, Intel Corporation
-+ *
-+ * Derived from the original pwm-lpss.c
-+ *
-+ * 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/pci.h>
-+
-+#include "pwm-lpss.h"
-+
-+static int pwm_lpss_probe_pci(struct pci_dev *pdev,
-+ const struct pci_device_id *id)
-+{
-+ const struct pwm_lpss_boardinfo *info;
-+ struct pwm_lpss_chip *lpwm;
-+ int err;
-+
-+ err = pci_enable_device(pdev);
-+ if (err < 0)
-+ return err;
-+
-+ info = (struct pwm_lpss_boardinfo *)id->driver_data;
-+ lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
-+ if (IS_ERR(lpwm))
-+ return PTR_ERR(lpwm);
-+
-+ pci_set_drvdata(pdev, lpwm);
-+ return 0;
-+}
-+
-+static void pwm_lpss_remove_pci(struct pci_dev *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm = pci_get_drvdata(pdev);
-+
-+ pwm_lpss_remove(lpwm);
-+ pci_disable_device(pdev);
-+}
-+
-+static const struct pci_device_id pwm_lpss_pci_ids[] = {
-+ { PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&pwm_lpss_byt_info},
-+ { PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&pwm_lpss_byt_info},
-+ { PCI_VDEVICE(INTEL, 0x2288), (unsigned long)&pwm_lpss_bsw_info},
-+ { PCI_VDEVICE(INTEL, 0x2289), (unsigned long)&pwm_lpss_bsw_info},
-+ { },
-+};
-+MODULE_DEVICE_TABLE(pci, pwm_lpss_pci_ids);
-+
-+static struct pci_driver pwm_lpss_driver_pci = {
-+ .name = "pwm-lpss",
-+ .id_table = pwm_lpss_pci_ids,
-+ .probe = pwm_lpss_probe_pci,
-+ .remove = pwm_lpss_remove_pci,
-+};
-+module_pci_driver(pwm_lpss_driver_pci);
-+
-+MODULE_DESCRIPTION("PWM PCI driver for Intel LPSS");
-+MODULE_LICENSE("GPL v2");
---- /dev/null
-+++ b/drivers/pwm/pwm-lpss-platform.c
-@@ -0,0 +1,68 @@
-+/*
-+ * Intel Low Power Subsystem PWM controller driver
-+ *
-+ * Copyright (C) 2014, Intel Corporation
-+ *
-+ * Derived from the original pwm-lpss.c
-+ *
-+ * 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/acpi.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+
-+#include "pwm-lpss.h"
-+
-+static int pwm_lpss_probe_platform(struct platform_device *pdev)
-+{
-+ const struct pwm_lpss_boardinfo *info;
-+ const struct acpi_device_id *id;
-+ struct pwm_lpss_chip *lpwm;
-+ struct resource *r;
-+
-+ id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
-+ if (!id)
-+ return -ENODEV;
-+
-+ info = (const struct pwm_lpss_boardinfo *)id->driver_data;
-+ r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
-+ lpwm = pwm_lpss_probe(&pdev->dev, r, info);
-+ if (IS_ERR(lpwm))
-+ return PTR_ERR(lpwm);
-+
-+ platform_set_drvdata(pdev, lpwm);
-+ return 0;
-+}
-+
-+static int pwm_lpss_remove_platform(struct platform_device *pdev)
-+{
-+ struct pwm_lpss_chip *lpwm = platform_get_drvdata(pdev);
-+
-+ return pwm_lpss_remove(lpwm);
-+}
-+
-+static const struct acpi_device_id pwm_lpss_acpi_match[] = {
-+ { "80860F09", (unsigned long)&pwm_lpss_byt_info },
-+ { "80862288", (unsigned long)&pwm_lpss_bsw_info },
-+ { },
-+};
-+MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
-+
-+static struct platform_driver pwm_lpss_driver_platform = {
-+ .driver = {
-+ .name = "pwm-lpss",
-+ .acpi_match_table = pwm_lpss_acpi_match,
-+ },
-+ .probe = pwm_lpss_probe_platform,
-+ .remove = pwm_lpss_remove_platform,
-+};
-+module_platform_driver(pwm_lpss_driver_platform);
-+
-+MODULE_DESCRIPTION("PWM platform driver for Intel LPSS");
-+MODULE_LICENSE("GPL v2");
-+MODULE_ALIAS("platform:pwm-lpss");
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -13,15 +13,10 @@
- * published by the Free Software Foundation.
- */
-
--#include <linux/acpi.h>
--#include <linux/device.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/pwm.h>
--#include <linux/platform_device.h>
--#include <linux/pci.h>
-
--static int pci_drv, plat_drv; /* So we know which drivers registered */
-+#include "pwm-lpss.h"
-
- #define PWM 0x00000000
- #define PWM_ENABLE BIT(31)
-@@ -39,19 +34,17 @@ struct pwm_lpss_chip {
- unsigned long clk_rate;
- };
-
--struct pwm_lpss_boardinfo {
-- unsigned long clk_rate;
--};
--
- /* BayTrail */
--static const struct pwm_lpss_boardinfo byt_info = {
-+const struct pwm_lpss_boardinfo pwm_lpss_byt_info = {
- 25000000
- };
-+EXPORT_SYMBOL_GPL(pwm_lpss_byt_info);
-
- /* Braswell */
--static const struct pwm_lpss_boardinfo bsw_info = {
-+const struct pwm_lpss_boardinfo pwm_lpss_bsw_info = {
- 19200000
- };
-+EXPORT_SYMBOL_GPL(pwm_lpss_bsw_info);
-
- static inline struct pwm_lpss_chip *to_lpwm(struct pwm_chip *chip)
- {
-@@ -123,9 +116,8 @@ static const struct pwm_ops pwm_lpss_ops
- .owner = THIS_MODULE,
- };
-
--static struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev,
-- struct resource *r,
-- const struct pwm_lpss_boardinfo *info)
-+struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
-+ const struct pwm_lpss_boardinfo *info)
- {
- struct pwm_lpss_chip *lpwm;
- int ret;
-@@ -152,8 +144,9 @@ static struct pwm_lpss_chip *pwm_lpss_pr
-
- return lpwm;
- }
-+EXPORT_SYMBOL_GPL(pwm_lpss_probe);
-
--static int pwm_lpss_remove(struct pwm_lpss_chip *lpwm)
-+int pwm_lpss_remove(struct pwm_lpss_chip *lpwm)
- {
- u32 ctrl;
-
-@@ -162,117 +155,8 @@ static int pwm_lpss_remove(struct pwm_lp
-
- return pwmchip_remove(&lpwm->chip);
- }
--
--static int pwm_lpss_probe_pci(struct pci_dev *pdev,
-- const struct pci_device_id *id)
--{
-- const struct pwm_lpss_boardinfo *info;
-- struct pwm_lpss_chip *lpwm;
-- int err;
--
-- err = pci_enable_device(pdev);
-- if (err < 0)
-- return err;
--
-- info = (struct pwm_lpss_boardinfo *)id->driver_data;
-- lpwm = pwm_lpss_probe(&pdev->dev, &pdev->resource[0], info);
-- if (IS_ERR(lpwm))
-- return PTR_ERR(lpwm);
--
-- pci_set_drvdata(pdev, lpwm);
-- return 0;
--}
--
--static void pwm_lpss_remove_pci(struct pci_dev *pdev)
--{
-- struct pwm_lpss_chip *lpwm = pci_get_drvdata(pdev);
--
-- pwm_lpss_remove(lpwm);
-- pci_disable_device(pdev);
--}
--
--static struct pci_device_id pwm_lpss_pci_ids[] = {
-- { PCI_VDEVICE(INTEL, 0x0f08), (unsigned long)&byt_info},
-- { PCI_VDEVICE(INTEL, 0x0f09), (unsigned long)&byt_info},
-- { PCI_VDEVICE(INTEL, 0x2288), (unsigned long)&bsw_info},
-- { PCI_VDEVICE(INTEL, 0x2289), (unsigned long)&bsw_info},
-- { },
--};
--MODULE_DEVICE_TABLE(pci, pwm_lpss_pci_ids);
--
--static struct pci_driver pwm_lpss_driver_pci = {
-- .name = "pwm-lpss",
-- .id_table = pwm_lpss_pci_ids,
-- .probe = pwm_lpss_probe_pci,
-- .remove = pwm_lpss_remove_pci,
--};
--
--static int pwm_lpss_probe_platform(struct platform_device *pdev)
--{
-- const struct pwm_lpss_boardinfo *info;
-- const struct acpi_device_id *id;
-- struct pwm_lpss_chip *lpwm;
-- struct resource *r;
--
-- id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
-- if (!id)
-- return -ENODEV;
--
-- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
--
-- info = (struct pwm_lpss_boardinfo *)id->driver_data;
-- lpwm = pwm_lpss_probe(&pdev->dev, r, info);
-- if (IS_ERR(lpwm))
-- return PTR_ERR(lpwm);
--
-- platform_set_drvdata(pdev, lpwm);
-- return 0;
--}
--
--static int pwm_lpss_remove_platform(struct platform_device *pdev)
--{
-- struct pwm_lpss_chip *lpwm = platform_get_drvdata(pdev);
--
-- return pwm_lpss_remove(lpwm);
--}
--
--static const struct acpi_device_id pwm_lpss_acpi_match[] = {
-- { "80860F09", (unsigned long)&byt_info },
-- { "80862288", (unsigned long)&bsw_info },
-- { },
--};
--MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
--
--static struct platform_driver pwm_lpss_driver_platform = {
-- .driver = {
-- .name = "pwm-lpss",
-- .acpi_match_table = pwm_lpss_acpi_match,
-- },
-- .probe = pwm_lpss_probe_platform,
-- .remove = pwm_lpss_remove_platform,
--};
--
--static int __init pwm_init(void)
--{
-- pci_drv = pci_register_driver(&pwm_lpss_driver_pci);
-- plat_drv = platform_driver_register(&pwm_lpss_driver_platform);
-- if (pci_drv && plat_drv)
-- return pci_drv;
--
-- return 0;
--}
--module_init(pwm_init);
--
--static void __exit pwm_exit(void)
--{
-- if (!pci_drv)
-- pci_unregister_driver(&pwm_lpss_driver_pci);
-- if (!plat_drv)
-- platform_driver_unregister(&pwm_lpss_driver_platform);
--}
--module_exit(pwm_exit);
-+EXPORT_SYMBOL_GPL(pwm_lpss_remove);
-
- MODULE_DESCRIPTION("PWM driver for Intel LPSS");
- MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
- MODULE_LICENSE("GPL v2");
--MODULE_ALIAS("platform:pwm-lpss");
---- /dev/null
-+++ b/drivers/pwm/pwm-lpss.h
-@@ -0,0 +1,32 @@
-+/*
-+ * Intel Low Power Subsystem PWM controller driver
-+ *
-+ * Copyright (C) 2014, Intel Corporation
-+ *
-+ * Derived from the original pwm-lpss.c
-+ *
-+ * 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 __PWM_LPSS_H
-+#define __PWM_LPSS_H
-+
-+#include <linux/device.h>
-+#include <linux/pwm.h>
-+
-+struct pwm_lpss_chip;
-+
-+struct pwm_lpss_boardinfo {
-+ unsigned long clk_rate;
-+};
-+
-+extern const struct pwm_lpss_boardinfo pwm_lpss_byt_info;
-+extern const struct pwm_lpss_boardinfo pwm_lpss_bsw_info;
-+
-+struct pwm_lpss_chip *pwm_lpss_probe(struct device *dev, struct resource *r,
-+ const struct pwm_lpss_boardinfo *info);
-+int pwm_lpss_remove(struct pwm_lpss_chip *lpwm);
-+
-+#endif /* __PWM_LPSS_H */
diff --git a/patches.intel/pwm-lpss-remove-dependency-on-clk-framework.patch b/patches.intel/pwm-lpss-remove-dependency-on-clk-framework.patch
deleted file mode 100644
index 1ee2e1bb33499..0000000000000
--- a/patches.intel/pwm-lpss-remove-dependency-on-clk-framework.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:53:47 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:54 +0800
-Subject: [LTSI-dev] [PATCH 4/8] pwm: lpss: remove dependency on clk framework
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-5-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Heikki Krogerus <heikki.krogerus@linux.intel.com>
-
-Unlike other Intel LPSS devices, the PWM does not have the
-clock dividers or the gate. All we get from the clock is the
-rate. Since PCI case uses the driver data to get the rate,
-we can drop the clk and use the same data also in case of
-ACPI. The frequency is the same.
-
-Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
-Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
-Reviewed-by: Chew, Chiau Ee <chiau.ee.chew@intel.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 65accd87381ed96bf8893124b149bae08edd2740)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/pwm-lpss.c | 32 ++++++++++----------------------
- 1 file changed, 10 insertions(+), 22 deletions(-)
-
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -14,7 +14,6 @@
- */
-
- #include <linux/acpi.h>
--#include <linux/clk.h>
- #include <linux/device.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-@@ -37,7 +36,6 @@ static int pci_drv, plat_drv; /* So we k
- struct pwm_lpss_chip {
- struct pwm_chip chip;
- void __iomem *regs;
-- struct clk *clk;
- unsigned long clk_rate;
- };
-
-@@ -97,11 +95,6 @@ static int pwm_lpss_enable(struct pwm_ch
- {
- struct pwm_lpss_chip *lpwm = to_lpwm(chip);
- u32 ctrl;
-- int ret;
--
-- ret = clk_prepare_enable(lpwm->clk);
-- if (ret)
-- return ret;
-
- ctrl = readl(lpwm->regs + PWM);
- writel(ctrl | PWM_ENABLE, lpwm->regs + PWM);
-@@ -116,8 +109,6 @@ static void pwm_lpss_disable(struct pwm_
-
- ctrl = readl(lpwm->regs + PWM);
- writel(ctrl & ~PWM_ENABLE, lpwm->regs + PWM);
--
-- clk_disable_unprepare(lpwm->clk);
- }
-
- static const struct pwm_ops pwm_lpss_ops = {
-@@ -142,17 +133,7 @@ static struct pwm_lpss_chip *pwm_lpss_pr
- if (IS_ERR(lpwm->regs))
- return ERR_CAST(lpwm->regs);
-
-- if (info) {
-- lpwm->clk_rate = info->clk_rate;
-- } else {
-- lpwm->clk = devm_clk_get(dev, NULL);
-- if (IS_ERR(lpwm->clk)) {
-- dev_err(dev, "failed to get PWM clock\n");
-- return ERR_CAST(lpwm->clk);
-- }
-- lpwm->clk_rate = clk_get_rate(lpwm->clk);
-- }
--
-+ lpwm->clk_rate = info->clk_rate;
- lpwm->chip.dev = dev;
- lpwm->chip.ops = &pwm_lpss_ops;
- lpwm->chip.base = -1;
-@@ -221,12 +202,19 @@ static struct pci_driver pwm_lpss_driver
-
- static int pwm_lpss_probe_platform(struct platform_device *pdev)
- {
-+ const struct pwm_lpss_boardinfo *info;
-+ const struct acpi_device_id *id;
- struct pwm_lpss_chip *lpwm;
- struct resource *r;
-
-+ id = acpi_match_device(pdev->dev.driver->acpi_match_table, &pdev->dev);
-+ if (!id)
-+ return -ENODEV;
-+
- r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-
-- lpwm = pwm_lpss_probe(&pdev->dev, r, NULL);
-+ info = (struct pwm_lpss_boardinfo *)id->driver_data;
-+ lpwm = pwm_lpss_probe(&pdev->dev, r, info);
- if (IS_ERR(lpwm))
- return PTR_ERR(lpwm);
-
-@@ -242,7 +230,7 @@ static int pwm_lpss_remove_platform(stru
- }
-
- static const struct acpi_device_id pwm_lpss_acpi_match[] = {
-- { "80860F09", 0 },
-+ { "80860F09", (unsigned long)&byt_info },
- { },
- };
- MODULE_DEVICE_TABLE(acpi, pwm_lpss_acpi_match);
diff --git a/patches.intel/pwm-lpss-use-c99-initializers-in-structures.patch b/patches.intel/pwm-lpss-use-c99-initializers-in-structures.patch
deleted file mode 100644
index d9c587eddec55..0000000000000
--- a/patches.intel/pwm-lpss-use-c99-initializers-in-structures.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Oct 29 09:54:01 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 29 Oct 2014 08:52:58 +0800
-Subject: [LTSI-dev] [PATCH 8/8] pwm: lpss: use c99 initializers in structures
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1414543978-24145-9-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Julia Lawall <Julia.Lawall@lip6.fr>
-
-Use c99 initializers for structures.
-
-A simplified version of the semantic match that finds this problem is as
-follows: (http://coccinelle.lip6.fr/)
-
-// <smpl>
-@decl@
-identifier i1,fld;
-type T;
-field list[n] fs;
-@@
-
-struct i1 {
- fs
- T fld;
- ...};
-
-@bad@
-identifier decl.i1,i2;
-expression e;
-initializer list[decl.n] is;
-@@
-
-struct i1 i2 = { is,
-+ .fld = e
-- e
- ,...};
-// </smpl>
-
-Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
-[thierry.reding: rebased and applied same fix for Braswell]
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit b2b7adeb21745266326d453b95e5d0b1b9cb1d4e)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/pwm/pwm-lpss.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/pwm/pwm-lpss.c
-+++ b/drivers/pwm/pwm-lpss.c
-@@ -37,13 +37,13 @@ struct pwm_lpss_chip {
-
- /* BayTrail */
- const struct pwm_lpss_boardinfo pwm_lpss_byt_info = {
-- 25000000
-+ .clk_rate = 25000000
- };
- EXPORT_SYMBOL_GPL(pwm_lpss_byt_info);
-
- /* Braswell */
- const struct pwm_lpss_boardinfo pwm_lpss_bsw_info = {
-- 19200000
-+ .clk_rate = 19200000
- };
- EXPORT_SYMBOL_GPL(pwm_lpss_bsw_info);
-
diff --git a/patches.intel/watchdog-fix-checkpatch-warnings-and-error.patch b/patches.intel/watchdog-fix-checkpatch-warnings-and-error.patch
deleted file mode 100644
index bdf7acb005d6b..0000000000000
--- a/patches.intel/watchdog-fix-checkpatch-warnings-and-error.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:26 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:20 +0800
-Subject: [LTSI-dev] [PATCH 15/16] watchdog: fix checkpatch warnings and error
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-16-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Jingoo Han <jg1.han@samsung.com>
-
-Fix the following checkpatch warnings and error:
- WARNING: quoted string split across lines
- WARNING: braces {} are not necessary for single statement blocks
- WARNING: __initdata should be placed after ibmasr_id_table[]
- WARNING: please, no space before tabs
- ERROR: do not initialise statics to 0 or NULL
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-(cherry picked from commit 5f5e19093b2fa592720810154f15ffe51aa9277f)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/watchdog/ep93xx_wdt.c | 6 +++---
- drivers/watchdog/iTCO_wdt.c | 6 +++---
- drivers/watchdog/ibmasr.c | 2 +-
- drivers/watchdog/pc87413_wdt.c | 7 +++----
- drivers/watchdog/softdog.c | 2 +-
- drivers/watchdog/w83697hf_wdt.c | 4 ++--
- 6 files changed, 13 insertions(+), 14 deletions(-)
-
---- a/drivers/watchdog/ep93xx_wdt.c
-+++ b/drivers/watchdog/ep93xx_wdt.c
-@@ -172,9 +172,9 @@ static struct platform_driver ep93xx_wdt
-
- module_platform_driver(ep93xx_wdt_driver);
-
--MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>,"
-- "Alessandro Zummo <a.zummo@towertech.it>,"
-- "H Hartley Sweeten <hsweeten@visionengravers.com>");
-+MODULE_AUTHOR("Ray Lehtiniemi <rayl@mail.com>");
-+MODULE_AUTHOR("Alessandro Zummo <a.zummo@towertech.it>");
-+MODULE_AUTHOR("H Hartley Sweeten <hsweeten@visionengravers.com>");
- MODULE_DESCRIPTION("EP93xx Watchdog");
- MODULE_LICENSE("GPL");
- MODULE_VERSION(WDT_VERSION);
---- a/drivers/watchdog/iTCO_wdt.c
-+++ b/drivers/watchdog/iTCO_wdt.c
-@@ -370,15 +370,15 @@ static const struct watchdog_info ident
- static const struct watchdog_ops iTCO_wdt_ops = {
- .owner = THIS_MODULE,
- .start = iTCO_wdt_start,
-- .stop = iTCO_wdt_stop,
-- .ping = iTCO_wdt_ping,
-+ .stop = iTCO_wdt_stop,
-+ .ping = iTCO_wdt_ping,
- .set_timeout = iTCO_wdt_set_timeout,
- .get_timeleft = iTCO_wdt_get_timeleft,
- };
-
- static struct watchdog_device iTCO_wdt_watchdog_dev = {
- .info = &ident,
-- .ops = &iTCO_wdt_ops,
-+ .ops = &iTCO_wdt_ops,
- };
-
- /*
---- a/drivers/watchdog/ibmasr.c
-+++ b/drivers/watchdog/ibmasr.c
-@@ -360,7 +360,7 @@ struct ibmasr_id {
- int type;
- };
-
--static struct ibmasr_id __initdata ibmasr_id_table[] = {
-+static struct ibmasr_id ibmasr_id_table[] __initdata = {
- { "IBM Automatic Server Restart - eserver xSeries 220", ASMTYPE_TOPAZ },
- { "IBM Automatic Server Restart - Machine Type 8673", ASMTYPE_PEARL },
- { "IBM Automatic Server Restart - Machine Type 8480", ASMTYPE_JASPER },
---- a/drivers/watchdog/pc87413_wdt.c
-+++ b/drivers/watchdog/pc87413_wdt.c
-@@ -512,9 +512,8 @@ static int __init pc87413_init(void)
- return -EBUSY;
-
- ret = register_reboot_notifier(&pc87413_notifier);
-- if (ret != 0) {
-+ if (ret != 0)
- pr_err("cannot register reboot notifier (err=%d)\n", ret);
-- }
-
- ret = misc_register(&pc87413_miscdev);
- if (ret != 0) {
-@@ -575,8 +574,8 @@ static void __exit pc87413_exit(void)
- module_init(pc87413_init);
- module_exit(pc87413_exit);
-
--MODULE_AUTHOR("Sven Anders <anders@anduras.de>, "
-- "Marcus Junker <junker@anduras.de>,");
-+MODULE_AUTHOR("Sven Anders <anders@anduras.de>");
-+MODULE_AUTHOR("Marcus Junker <junker@anduras.de>");
- MODULE_DESCRIPTION("PC87413 WDT driver");
- MODULE_LICENSE("GPL");
-
---- a/drivers/watchdog/softdog.c
-+++ b/drivers/watchdog/softdog.c
-@@ -62,7 +62,7 @@ MODULE_PARM_DESC(nowayout,
- "Watchdog cannot be stopped once started (default="
- __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
-
--static int soft_noboot = 0;
-+static int soft_noboot;
- module_param(soft_noboot, int, 0);
- MODULE_PARM_DESC(soft_noboot,
- "Softdog action, set to 1 to ignore reboots, 0 to reboot (default=0)");
---- a/drivers/watchdog/w83697hf_wdt.c
-+++ b/drivers/watchdog/w83697hf_wdt.c
-@@ -455,6 +455,6 @@ module_init(wdt_init);
- module_exit(wdt_exit);
-
- MODULE_LICENSE("GPL");
--MODULE_AUTHOR("Marcus Junker <junker@anduras.de>, "
-- "Samuel Tardieu <sam@rfc1149.net>");
-+MODULE_AUTHOR("Marcus Junker <junker@anduras.de>");
-+MODULE_AUTHOR("Samuel Tardieu <sam@rfc1149.net>");
- MODULE_DESCRIPTION("w83697hf/hg WDT driver");
diff --git a/patches.intel/watchdog-itco_wdt-add-support-for-v3-silicon.patch b/patches.intel/watchdog-itco_wdt-add-support-for-v3-silicon.patch
deleted file mode 100644
index 3a0e6129f18fa..0000000000000
--- a/patches.intel/watchdog-itco_wdt-add-support-for-v3-silicon.patch
+++ /dev/null
@@ -1,320 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:22 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:19 +0800
-Subject: [LTSI-dev] [PATCH 14/16] watchdog: iTCO_wdt: Add support for v3 silicon
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-15-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Peter Tyser <ptyser@xes-inc.com>
-
-Some new Atom's, eg Avoton and Bay Trail, have slightly different iTCO
-functionality:
-- The watchdog timer ticks at 1 second instead of .6 seconds
-
-- Some 8 and 16-bit registers were combined into 32-bit registers
-
-- Some registers were removed (DAT_IN, DAT_OUT, MESSAGE)
-
-- The BOOT_STS field in TCO_STS was removed
-
-- The NO_REBOOT bit is in the PMC area instead of GCS
-
-Update the driver to support the above changes and bump the version to
-1.11.
-
-Signed-off-by: Peter Tyser <ptyser@xes-inc.com>
-Tested-by: Rajat Jain <rajatjain@juniper.net>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Lee Jones <lee.jones@linaro.org>
-(cherry picked from commit 24b3a1670b47e75be633ae0b5c07945c446f9d29)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/watchdog/iTCO_wdt.c | 137 ++++++++++++++++++++++++++------------------
- 1 file changed, 82 insertions(+), 55 deletions(-)
-
---- a/drivers/watchdog/iTCO_wdt.c
-+++ b/drivers/watchdog/iTCO_wdt.c
-@@ -48,7 +48,7 @@
-
- /* Module and version information */
- #define DRV_NAME "iTCO_wdt"
--#define DRV_VERSION "1.10"
-+#define DRV_VERSION "1.11"
-
- /* Includes */
- #include <linux/module.h> /* For module specific items */
-@@ -92,9 +92,12 @@ static struct { /* this is private data
- unsigned int iTCO_version;
- struct resource *tco_res;
- struct resource *smi_res;
-- struct resource *gcs_res;
-- /* NO_REBOOT flag is Memory-Mapped GCS register bit 5 (TCO version 2)*/
-- unsigned long __iomem *gcs;
-+ /*
-+ * NO_REBOOT flag is Memory-Mapped GCS register bit 5 (TCO version 2),
-+ * or memory-mapped PMC register bit 4 (TCO version 3).
-+ */
-+ struct resource *gcs_pmc_res;
-+ unsigned long __iomem *gcs_pmc;
- /* the lock for io operations */
- spinlock_t io_lock;
- struct platform_device *dev;
-@@ -125,11 +128,19 @@ MODULE_PARM_DESC(turn_SMI_watchdog_clear
- * Some TCO specific functions
- */
-
--static inline unsigned int seconds_to_ticks(int seconds)
-+/*
-+ * The iTCO v1 and v2's internal timer is stored as ticks which decrement
-+ * every 0.6 seconds. v3's internal timer is stored as seconds (some
-+ * datasheets incorrectly state 0.6 seconds).
-+ */
-+static inline unsigned int seconds_to_ticks(int secs)
- {
-- /* the internal timer is stored as ticks which decrement
-- * every 0.6 seconds */
-- return (seconds * 10) / 6;
-+ return iTCO_wdt_private.iTCO_version == 3 ? secs : (secs * 10) / 6;
-+}
-+
-+static inline unsigned int ticks_to_seconds(int ticks)
-+{
-+ return iTCO_wdt_private.iTCO_version == 3 ? ticks : (ticks * 6) / 10;
- }
-
- static void iTCO_wdt_set_NO_REBOOT_bit(void)
-@@ -137,10 +148,14 @@ static void iTCO_wdt_set_NO_REBOOT_bit(v
- u32 val32;
-
- /* Set the NO_REBOOT bit: this disables reboots */
-- if (iTCO_wdt_private.iTCO_version == 2) {
-- val32 = readl(iTCO_wdt_private.gcs);
-+ if (iTCO_wdt_private.iTCO_version == 3) {
-+ val32 = readl(iTCO_wdt_private.gcs_pmc);
-+ val32 |= 0x00000010;
-+ writel(val32, iTCO_wdt_private.gcs_pmc);
-+ } else if (iTCO_wdt_private.iTCO_version == 2) {
-+ val32 = readl(iTCO_wdt_private.gcs_pmc);
- val32 |= 0x00000020;
-- writel(val32, iTCO_wdt_private.gcs);
-+ writel(val32, iTCO_wdt_private.gcs_pmc);
- } else if (iTCO_wdt_private.iTCO_version == 1) {
- pci_read_config_dword(iTCO_wdt_private.pdev, 0xd4, &val32);
- val32 |= 0x00000002;
-@@ -154,12 +169,20 @@ static int iTCO_wdt_unset_NO_REBOOT_bit(
- u32 val32;
-
- /* Unset the NO_REBOOT bit: this enables reboots */
-- if (iTCO_wdt_private.iTCO_version == 2) {
-- val32 = readl(iTCO_wdt_private.gcs);
-+ if (iTCO_wdt_private.iTCO_version == 3) {
-+ val32 = readl(iTCO_wdt_private.gcs_pmc);
-+ val32 &= 0xffffffef;
-+ writel(val32, iTCO_wdt_private.gcs_pmc);
-+
-+ val32 = readl(iTCO_wdt_private.gcs_pmc);
-+ if (val32 & 0x00000010)
-+ ret = -EIO;
-+ } else if (iTCO_wdt_private.iTCO_version == 2) {
-+ val32 = readl(iTCO_wdt_private.gcs_pmc);
- val32 &= 0xffffffdf;
-- writel(val32, iTCO_wdt_private.gcs);
-+ writel(val32, iTCO_wdt_private.gcs_pmc);
-
-- val32 = readl(iTCO_wdt_private.gcs);
-+ val32 = readl(iTCO_wdt_private.gcs_pmc);
- if (val32 & 0x00000020)
- ret = -EIO;
- } else if (iTCO_wdt_private.iTCO_version == 1) {
-@@ -192,7 +215,7 @@ static int iTCO_wdt_start(struct watchdo
-
- /* Force the timer to its reload value by writing to the TCO_RLD
- register */
-- if (iTCO_wdt_private.iTCO_version == 2)
-+ if (iTCO_wdt_private.iTCO_version >= 2)
- outw(0x01, TCO_RLD);
- else if (iTCO_wdt_private.iTCO_version == 1)
- outb(0x01, TCO_RLD);
-@@ -240,9 +263,9 @@ static int iTCO_wdt_ping(struct watchdog
- iTCO_vendor_pre_keepalive(iTCO_wdt_private.smi_res, wd_dev->timeout);
-
- /* Reload the timer by writing to the TCO Timer Counter register */
-- if (iTCO_wdt_private.iTCO_version == 2)
-+ if (iTCO_wdt_private.iTCO_version >= 2) {
- outw(0x01, TCO_RLD);
-- else if (iTCO_wdt_private.iTCO_version == 1) {
-+ } else if (iTCO_wdt_private.iTCO_version == 1) {
- /* Reset the timeout status bit so that the timer
- * needs to count down twice again before rebooting */
- outw(0x0008, TCO1_STS); /* write 1 to clear bit */
-@@ -270,14 +293,14 @@ static int iTCO_wdt_set_timeout(struct w
- /* "Values of 0h-3h are ignored and should not be attempted" */
- if (tmrval < 0x04)
- return -EINVAL;
-- if (((iTCO_wdt_private.iTCO_version == 2) && (tmrval > 0x3ff)) ||
-+ if (((iTCO_wdt_private.iTCO_version >= 2) && (tmrval > 0x3ff)) ||
- ((iTCO_wdt_private.iTCO_version == 1) && (tmrval > 0x03f)))
- return -EINVAL;
-
- iTCO_vendor_pre_set_heartbeat(tmrval);
-
- /* Write new heartbeat to watchdog */
-- if (iTCO_wdt_private.iTCO_version == 2) {
-+ if (iTCO_wdt_private.iTCO_version >= 2) {
- spin_lock(&iTCO_wdt_private.io_lock);
- val16 = inw(TCOv2_TMR);
- val16 &= 0xfc00;
-@@ -312,13 +335,13 @@ static unsigned int iTCO_wdt_get_timelef
- unsigned int time_left = 0;
-
- /* read the TCO Timer */
-- if (iTCO_wdt_private.iTCO_version == 2) {
-+ if (iTCO_wdt_private.iTCO_version >= 2) {
- spin_lock(&iTCO_wdt_private.io_lock);
- val16 = inw(TCO_RLD);
- val16 &= 0x3ff;
- spin_unlock(&iTCO_wdt_private.io_lock);
-
-- time_left = (val16 * 6) / 10;
-+ time_left = ticks_to_seconds(val16);
- } else if (iTCO_wdt_private.iTCO_version == 1) {
- spin_lock(&iTCO_wdt_private.io_lock);
- val8 = inb(TCO_RLD);
-@@ -327,7 +350,7 @@ static unsigned int iTCO_wdt_get_timelef
- val8 += (inb(TCOv1_TMR) & 0x3f);
- spin_unlock(&iTCO_wdt_private.io_lock);
-
-- time_left = (val8 * 6) / 10;
-+ time_left = ticks_to_seconds(val8);
- }
- return time_left;
- }
-@@ -376,16 +399,16 @@ static void iTCO_wdt_cleanup(void)
- resource_size(iTCO_wdt_private.tco_res));
- release_region(iTCO_wdt_private.smi_res->start,
- resource_size(iTCO_wdt_private.smi_res));
-- if (iTCO_wdt_private.iTCO_version == 2) {
-- iounmap(iTCO_wdt_private.gcs);
-- release_mem_region(iTCO_wdt_private.gcs_res->start,
-- resource_size(iTCO_wdt_private.gcs_res));
-+ if (iTCO_wdt_private.iTCO_version >= 2) {
-+ iounmap(iTCO_wdt_private.gcs_pmc);
-+ release_mem_region(iTCO_wdt_private.gcs_pmc_res->start,
-+ resource_size(iTCO_wdt_private.gcs_pmc_res));
- }
-
- iTCO_wdt_private.tco_res = NULL;
- iTCO_wdt_private.smi_res = NULL;
-- iTCO_wdt_private.gcs_res = NULL;
-- iTCO_wdt_private.gcs = NULL;
-+ iTCO_wdt_private.gcs_pmc_res = NULL;
-+ iTCO_wdt_private.gcs_pmc = NULL;
- }
-
- static int iTCO_wdt_probe(struct platform_device *dev)
-@@ -414,27 +437,27 @@ static int iTCO_wdt_probe(struct platfor
- iTCO_wdt_private.pdev = to_pci_dev(dev->dev.parent);
-
- /*
-- * Get the Memory-Mapped GCS register, we need it for the
-- * NO_REBOOT flag (TCO v2).
-+ * Get the Memory-Mapped GCS or PMC register, we need it for the
-+ * NO_REBOOT flag (TCO v2 and v3).
- */
-- if (iTCO_wdt_private.iTCO_version == 2) {
-- iTCO_wdt_private.gcs_res = platform_get_resource(dev,
-+ if (iTCO_wdt_private.iTCO_version >= 2) {
-+ iTCO_wdt_private.gcs_pmc_res = platform_get_resource(dev,
- IORESOURCE_MEM,
-- ICH_RES_MEM_GCS);
-+ ICH_RES_MEM_GCS_PMC);
-
-- if (!iTCO_wdt_private.gcs_res)
-+ if (!iTCO_wdt_private.gcs_pmc_res)
- goto out;
-
-- if (!request_mem_region(iTCO_wdt_private.gcs_res->start,
-- resource_size(iTCO_wdt_private.gcs_res), dev->name)) {
-+ if (!request_mem_region(iTCO_wdt_private.gcs_pmc_res->start,
-+ resource_size(iTCO_wdt_private.gcs_pmc_res), dev->name)) {
- ret = -EBUSY;
- goto out;
- }
-- iTCO_wdt_private.gcs = ioremap(iTCO_wdt_private.gcs_res->start,
-- resource_size(iTCO_wdt_private.gcs_res));
-- if (!iTCO_wdt_private.gcs) {
-+ iTCO_wdt_private.gcs_pmc = ioremap(iTCO_wdt_private.gcs_pmc_res->start,
-+ resource_size(iTCO_wdt_private.gcs_pmc_res));
-+ if (!iTCO_wdt_private.gcs_pmc) {
- ret = -EIO;
-- goto unreg_gcs;
-+ goto unreg_gcs_pmc;
- }
- }
-
-@@ -442,7 +465,7 @@ static int iTCO_wdt_probe(struct platfor
- if (iTCO_wdt_unset_NO_REBOOT_bit() && iTCO_vendor_check_noreboot_on()) {
- pr_info("unable to reset NO_REBOOT flag, device disabled by hardware/BIOS\n");
- ret = -ENODEV; /* Cannot reset NO_REBOOT bit */
-- goto unmap_gcs;
-+ goto unmap_gcs_pmc;
- }
-
- /* Set the NO_REBOOT bit to prevent later reboots, just for sure */
-@@ -454,7 +477,7 @@ static int iTCO_wdt_probe(struct platfor
- pr_err("I/O address 0x%04llx already in use, device disabled\n",
- (u64)SMI_EN);
- ret = -EBUSY;
-- goto unmap_gcs;
-+ goto unmap_gcs_pmc;
- }
- if (turn_SMI_watchdog_clear_off >= iTCO_wdt_private.iTCO_version) {
- /*
-@@ -478,9 +501,13 @@ static int iTCO_wdt_probe(struct platfor
- ich_info->name, ich_info->iTCO_version, (u64)TCOBASE);
-
- /* Clear out the (probably old) status */
-- outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
-- outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
-- outw(0x0004, TCO2_STS); /* Clear BOOT_STS bit */
-+ if (iTCO_wdt_private.iTCO_version == 3) {
-+ outl(0x20008, TCO1_STS);
-+ } else {
-+ outw(0x0008, TCO1_STS); /* Clear the Time Out Status bit */
-+ outw(0x0002, TCO2_STS); /* Clear SECOND_TO_STS bit */
-+ outw(0x0004, TCO2_STS); /* Clear BOOT_STS bit */
-+ }
-
- iTCO_wdt_watchdog_dev.bootstatus = 0;
- iTCO_wdt_watchdog_dev.timeout = WATCHDOG_TIMEOUT;
-@@ -515,18 +542,18 @@ unreg_tco:
- unreg_smi:
- release_region(iTCO_wdt_private.smi_res->start,
- resource_size(iTCO_wdt_private.smi_res));
--unmap_gcs:
-- if (iTCO_wdt_private.iTCO_version == 2)
-- iounmap(iTCO_wdt_private.gcs);
--unreg_gcs:
-- if (iTCO_wdt_private.iTCO_version == 2)
-- release_mem_region(iTCO_wdt_private.gcs_res->start,
-- resource_size(iTCO_wdt_private.gcs_res));
-+unmap_gcs_pmc:
-+ if (iTCO_wdt_private.iTCO_version >= 2)
-+ iounmap(iTCO_wdt_private.gcs_pmc);
-+unreg_gcs_pmc:
-+ if (iTCO_wdt_private.iTCO_version >= 2)
-+ release_mem_region(iTCO_wdt_private.gcs_pmc_res->start,
-+ resource_size(iTCO_wdt_private.gcs_pmc_res));
- out:
- iTCO_wdt_private.tco_res = NULL;
- iTCO_wdt_private.smi_res = NULL;
-- iTCO_wdt_private.gcs_res = NULL;
-- iTCO_wdt_private.gcs = NULL;
-+ iTCO_wdt_private.gcs_pmc_res = NULL;
-+ iTCO_wdt_private.gcs_pmc = NULL;
-
- return ret;
- }
diff --git a/patches.intel/watchdog-itco_wdt-fix-the-parent-device.patch b/patches.intel/watchdog-itco_wdt-fix-the-parent-device.patch
deleted file mode 100644
index 2e5a854fcb85c..0000000000000
--- a/patches.intel/watchdog-itco_wdt-fix-the-parent-device.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ltsi-dev-bounces@lists.linuxfoundation.org Wed Nov 5 10:40:29 2014
-From: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Date: Wed, 5 Nov 2014 09:39:21 +0800
-Subject: [LTSI-dev] [PATCH 16/16] watchdog: iTCO_wdt: Fix the parent device
-To: LTSI Mailing List <ltsi-dev@lists.linuxfoundation.org>
-Cc: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
-Message-ID: <1415151561-16047-17-git-send-email-rebecca.swee.fun.chang@intel.com>
-
-
-From: Jean Delvare <jdelvare@suse.de>
-
-The watchdog's parent is iTCO_wdt (the platform device) not lpc_ich
-(the PCI device.) Setting the parent right makes it much easier for
-the user to figure out which driver/module is handling the watchdog
-device node.
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Reviewed-by: Guenter Roeck <linux@roeck-us.net>
-Signed-off-by: Wim Van Sebroeck <wim@iguana.be>
-(cherry picked from commit c90789baa8cec363093c5ec292c989b6f22d8f32)
-
-Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com>
----
- drivers/watchdog/iTCO_wdt.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/watchdog/iTCO_wdt.c
-+++ b/drivers/watchdog/iTCO_wdt.c
-@@ -512,7 +512,7 @@ static int iTCO_wdt_probe(struct platfor
- iTCO_wdt_watchdog_dev.bootstatus = 0;
- iTCO_wdt_watchdog_dev.timeout = WATCHDOG_TIMEOUT;
- watchdog_set_nowayout(&iTCO_wdt_watchdog_dev, nowayout);
-- iTCO_wdt_watchdog_dev.parent = dev->dev.parent;
-+ iTCO_wdt_watchdog_dev.parent = &dev->dev;
-
- /* Make sure the watchdog is not running */
- iTCO_wdt_stop(&iTCO_wdt_watchdog_dev);
diff --git a/patches.ltsi/ltsi-makefile-addition.patch b/patches.ltsi/ltsi-makefile-addition.patch
index 85d0d2d2f567f..0ceb70e5f7d66 100644
--- a/patches.ltsi/ltsi-makefile-addition.patch
+++ b/patches.ltsi/ltsi-makefile-addition.patch
@@ -16,11 +16,11 @@ Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
- VERSION = 3
- PATCHLEVEL = 14
- SUBLEVEL = 51
+ VERSION = 4
+ PATCHLEVEL = 1
+ SUBLEVEL = 6
-EXTRAVERSION =
+EXTRAVERSION = -ltsi
- NAME = Remembering Coco
+ NAME = Series 4800
# *DOCUMENTATION*
diff --git a/patches.renesas/0001-clk-add-clock-indices-support.patch b/patches.renesas/0001-clk-add-clock-indices-support.patch
deleted file mode 100644
index 7dd0596c7ba82..0000000000000
--- a/patches.renesas/0001-clk-add-clock-indices-support.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 1dbdf65c300903355ac70b6f22b5d2259f7ae995 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Thu, 13 Feb 2014 18:02:49 +0000
-Subject: clk: add clock-indices support
-
-Add a property called clock-indices to allow clock-output-names
-to be used where the index used to lookup a clock is not a 1:1
-mapping to the array position in the clock-output-names
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 7a0fc1a3df82d29e00b4c9f88a6b37450d6711f1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/clock/clock-bindings.txt | 17 +++++++++++
- drivers/clk/clk.c | 20 ++++++++++++-
- 2 files changed, 36 insertions(+), 1 deletion(-)
-
---- a/Documentation/devicetree/bindings/clock/clock-bindings.txt
-+++ b/Documentation/devicetree/bindings/clock/clock-bindings.txt
-@@ -44,6 +44,23 @@ For example:
- clocks by index. The names should reflect the clock output signal
- names for the device.
-
-+clock-indices: If the identifyng number for the clocks in the node
-+ is not linear from zero, then the this mapping allows
-+ the mapping of identifiers into the clock-output-names
-+ array.
-+
-+For example, if we have two clocks <&oscillator 1> and <&oscillator 3>:
-+
-+ oscillator {
-+ compatible = "myclocktype";
-+ #clock-cells = <1>;
-+ clock-indices = <1>, <3>;
-+ clock-output-names = "clka", "clkb";
-+ }
-+
-+ This ensures we do not have any empty nodes in clock-output-names
-+
-+
- ==Clock consumers==
-
- Required properties:
---- a/drivers/clk/clk.c
-+++ b/drivers/clk/clk.c
-@@ -2504,8 +2504,12 @@ EXPORT_SYMBOL_GPL(of_clk_get_parent_coun
- const char *of_clk_get_parent_name(struct device_node *np, int index)
- {
- struct of_phandle_args clkspec;
-+ struct property *prop;
- const char *clk_name;
-+ const __be32 *vp;
-+ u32 pv;
- int rc;
-+ int count;
-
- if (index < 0)
- return NULL;
-@@ -2515,8 +2519,22 @@ const char *of_clk_get_parent_name(struc
- if (rc)
- return NULL;
-
-+ index = clkspec.args_count ? clkspec.args[0] : 0;
-+ count = 0;
-+
-+ /* if there is an indices property, use it to transfer the index
-+ * specified into an array offset for the clock-output-names property.
-+ */
-+ of_property_for_each_u32(clkspec.np, "clock-indices", prop, vp, pv) {
-+ if (index == pv) {
-+ index = count;
-+ break;
-+ }
-+ count++;
-+ }
-+
- if (of_property_read_string_index(clkspec.np, "clock-output-names",
-- clkspec.args_count ? clkspec.args[0] : 0,
-+ index,
- &clk_name) < 0)
- clk_name = clkspec.np->name;
-
diff --git a/patches.renesas/0001-media-v4l-vsp1-Update-copyright-notice.patch b/patches.renesas/0001-media-v4l-vsp1-Update-copyright-notice.patch
deleted file mode 100644
index 288a0bb41725c..0000000000000
--- a/patches.renesas/0001-media-v4l-vsp1-Update-copyright-notice.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 5d7a1aa76eba43c6c71aa2bd68313228765542de Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 6 Feb 2014 14:42:31 -0300
-Subject: [media] v4l: vsp1: Update copyright notice
-
-The "Renesas Corporation" listed in the copyright notice doesn't exist.
-Replace it with "Renesas Electronics Corporation" and update the
-copyright years.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 8a1edc55c1ec1ff3624c25b4ac6c1ce776d872b8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1.h | 2 +-
- drivers/media/platform/vsp1/vsp1_drv.c | 2 +-
- drivers/media/platform/vsp1/vsp1_entity.c | 2 +-
- drivers/media/platform/vsp1/vsp1_entity.h | 2 +-
- drivers/media/platform/vsp1/vsp1_lif.c | 2 +-
- drivers/media/platform/vsp1/vsp1_lif.h | 2 +-
- drivers/media/platform/vsp1/vsp1_rpf.c | 2 +-
- drivers/media/platform/vsp1/vsp1_rwpf.c | 2 +-
- drivers/media/platform/vsp1/vsp1_rwpf.h | 2 +-
- drivers/media/platform/vsp1/vsp1_uds.c | 2 +-
- drivers/media/platform/vsp1/vsp1_uds.h | 2 +-
- drivers/media/platform/vsp1/vsp1_video.c | 2 +-
- drivers/media/platform/vsp1/vsp1_video.h | 2 +-
- drivers/media/platform/vsp1/vsp1_wpf.c | 2 +-
- 14 files changed, 14 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1.h b/drivers/media/platform/vsp1/vsp1.h
-index 94d1b02680c5..0313210c6e9e 100644
---- a/drivers/media/platform/vsp1/vsp1.h
-+++ b/drivers/media/platform/vsp1/vsp1.h
-@@ -1,7 +1,7 @@
- /*
- * vsp1.h -- R-Car VSP1 Driver
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
-index 0df0a994e575..2f74f0e0ddf5 100644
---- a/drivers/media/platform/vsp1/vsp1_drv.c
-+++ b/drivers/media/platform/vsp1/vsp1_drv.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_drv.c -- R-Car VSP1 Driver
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
-index 0226e47df6d9..3fc9e4266caf 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.c
-+++ b/drivers/media/platform/vsp1/vsp1_entity.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_entity.c -- R-Car VSP1 Base Entity
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
-index e152798d7f38..f6fd6988aeb0 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.h
-+++ b/drivers/media/platform/vsp1/vsp1_entity.h
-@@ -1,7 +1,7 @@
- /*
- * vsp1_entity.h -- R-Car VSP1 Base Entity
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_lif.c b/drivers/media/platform/vsp1/vsp1_lif.c
-index 74a32e69ef10..135a78957014 100644
---- a/drivers/media/platform/vsp1/vsp1_lif.c
-+++ b/drivers/media/platform/vsp1/vsp1_lif.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_lif.c -- R-Car VSP1 LCD Controller Interface
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_lif.h b/drivers/media/platform/vsp1/vsp1_lif.h
-index 89b93af56fdc..7b35879028de 100644
---- a/drivers/media/platform/vsp1/vsp1_lif.h
-+++ b/drivers/media/platform/vsp1/vsp1_lif.h
-@@ -1,7 +1,7 @@
- /*
- * vsp1_lif.h -- R-Car VSP1 LCD Controller Interface
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
-index bce2be5466b9..2b04d0f95c62 100644
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_rpf.c -- R-Car VSP1 Read Pixel Formatter
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.c b/drivers/media/platform/vsp1/vsp1_rwpf.c
-index 782f770daee5..ec3dab6a9b9b 100644
---- a/drivers/media/platform/vsp1/vsp1_rwpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rwpf.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_rwpf.c -- R-Car VSP1 Read and Write Pixel Formatters
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.h b/drivers/media/platform/vsp1/vsp1_rwpf.h
-index 6cbdb547470b..5c5ee81bbeae 100644
---- a/drivers/media/platform/vsp1/vsp1_rwpf.h
-+++ b/drivers/media/platform/vsp1/vsp1_rwpf.h
-@@ -1,7 +1,7 @@
- /*
- * vsp1_rwpf.h -- R-Car VSP1 Read and Write Pixel Formatters
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c
-index 0e50b37f060d..622342ac7770 100644
---- a/drivers/media/platform/vsp1/vsp1_uds.c
-+++ b/drivers/media/platform/vsp1/vsp1_uds.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_uds.c -- R-Car VSP1 Up and Down Scaler
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_uds.h b/drivers/media/platform/vsp1/vsp1_uds.h
-index 972a285abdb9..479d12df1180 100644
---- a/drivers/media/platform/vsp1/vsp1_uds.h
-+++ b/drivers/media/platform/vsp1/vsp1_uds.h
-@@ -1,7 +1,7 @@
- /*
- * vsp1_uds.h -- R-Car VSP1 Up and Down Scaler
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index b4687a834f85..f5f6af5b46a2 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_video.c -- R-Car VSP1 Video Node
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_video.h b/drivers/media/platform/vsp1/vsp1_video.h
-index d8612a378345..53e4b3745940 100644
---- a/drivers/media/platform/vsp1/vsp1_video.h
-+++ b/drivers/media/platform/vsp1/vsp1_video.h
-@@ -1,7 +1,7 @@
- /*
- * vsp1_video.h -- R-Car VSP1 Video Node
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index 7baed81ff005..11a61c601da0 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -1,7 +1,7 @@
- /*
- * vsp1_wpf.c -- R-Car VSP1 Write Pixel Formatter
- *
-- * Copyright (C) 2013 Renesas Corporation
-+ * Copyright (C) 2013-2014 Renesas Electronics Corporation
- *
- * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.com)
- *
---
-2.1.2
-
diff --git a/patches.renesas/0002-ARM-shmobile-wait-for-MSTP-clock-status-to-toggle-wh.patch b/patches.renesas/0002-ARM-shmobile-wait-for-MSTP-clock-status-to-toggle-wh.patch
deleted file mode 100644
index 9a43e5674b441..0000000000000
--- a/patches.renesas/0002-ARM-shmobile-wait-for-MSTP-clock-status-to-toggle-wh.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From 1a327c0e2e271f0d044713c4b05491e0e53c67c3 Mon Sep 17 00:00:00 2001
-From: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Date: Sat, 14 Dec 2013 16:23:51 +0100
-Subject: ARM: shmobile: wait for MSTP clock status to toggle, when enabling it
-
-On r-/sh-mobile SoCs MSTP clocks are used by the runtime PM to dynamically
-enable and disable peripheral clocks. To make sure the clock has really
-started we have to read back its status register until it confirms success.
-
-Signed-off-by: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a028c6da34d434e35ba8322568c756ea97ff3c18)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/clk/cpg.c | 38 ++++++++++++++++++++++++++++++++++++++
- include/linux/sh_clk.h | 19 ++++++++++++-------
- 2 files changed, 50 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/sh/clk/cpg.c b/drivers/sh/clk/cpg.c
-index 1ebe67cd1833..7442bc130055 100644
---- a/drivers/sh/clk/cpg.c
-+++ b/drivers/sh/clk/cpg.c
-@@ -36,9 +36,47 @@ static void sh_clk_write(int value, struct clk *clk)
- iowrite32(value, clk->mapped_reg);
- }
-
-+static unsigned int r8(const void __iomem *addr)
-+{
-+ return ioread8(addr);
-+}
-+
-+static unsigned int r16(const void __iomem *addr)
-+{
-+ return ioread16(addr);
-+}
-+
-+static unsigned int r32(const void __iomem *addr)
-+{
-+ return ioread32(addr);
-+}
-+
- static int sh_clk_mstp_enable(struct clk *clk)
- {
- sh_clk_write(sh_clk_read(clk) & ~(1 << clk->enable_bit), clk);
-+ if (clk->status_reg) {
-+ unsigned int (*read)(const void __iomem *addr);
-+ int i;
-+ void __iomem *mapped_status = (phys_addr_t)clk->status_reg -
-+ (phys_addr_t)clk->enable_reg + clk->mapped_reg;
-+
-+ if (clk->flags & CLK_ENABLE_REG_8BIT)
-+ read = r8;
-+ else if (clk->flags & CLK_ENABLE_REG_16BIT)
-+ read = r16;
-+ else
-+ read = r32;
-+
-+ for (i = 1000;
-+ (read(mapped_status) & (1 << clk->enable_bit)) && i;
-+ i--)
-+ cpu_relax();
-+ if (!i) {
-+ pr_err("cpg: failed to enable %p[%d]\n",
-+ clk->enable_reg, clk->enable_bit);
-+ return -ETIMEDOUT;
-+ }
-+ }
- return 0;
- }
-
-diff --git a/include/linux/sh_clk.h b/include/linux/sh_clk.h
-index 60c72395ec6b..1f208b2a1ed6 100644
---- a/include/linux/sh_clk.h
-+++ b/include/linux/sh_clk.h
-@@ -52,6 +52,7 @@ struct clk {
- unsigned long flags;
-
- void __iomem *enable_reg;
-+ void __iomem *status_reg;
- unsigned int enable_bit;
- void __iomem *mapped_reg;
-
-@@ -116,22 +117,26 @@ long clk_round_parent(struct clk *clk, unsigned long target,
- unsigned long *best_freq, unsigned long *parent_freq,
- unsigned int div_min, unsigned int div_max);
-
--#define SH_CLK_MSTP(_parent, _enable_reg, _enable_bit, _flags) \
-+#define SH_CLK_MSTP(_parent, _enable_reg, _enable_bit, _status_reg, _flags) \
- { \
- .parent = _parent, \
- .enable_reg = (void __iomem *)_enable_reg, \
- .enable_bit = _enable_bit, \
-+ .status_reg = _status_reg, \
- .flags = _flags, \
- }
-
--#define SH_CLK_MSTP32(_p, _r, _b, _f) \
-- SH_CLK_MSTP(_p, _r, _b, _f | CLK_ENABLE_REG_32BIT)
-+#define SH_CLK_MSTP32(_p, _r, _b, _f) \
-+ SH_CLK_MSTP(_p, _r, _b, 0, _f | CLK_ENABLE_REG_32BIT)
-
--#define SH_CLK_MSTP16(_p, _r, _b, _f) \
-- SH_CLK_MSTP(_p, _r, _b, _f | CLK_ENABLE_REG_16BIT)
-+#define SH_CLK_MSTP32_STS(_p, _r, _b, _s, _f) \
-+ SH_CLK_MSTP(_p, _r, _b, _s, _f | CLK_ENABLE_REG_32BIT)
-
--#define SH_CLK_MSTP8(_p, _r, _b, _f) \
-- SH_CLK_MSTP(_p, _r, _b, _f | CLK_ENABLE_REG_8BIT)
-+#define SH_CLK_MSTP16(_p, _r, _b, _f) \
-+ SH_CLK_MSTP(_p, _r, _b, 0, _f | CLK_ENABLE_REG_16BIT)
-+
-+#define SH_CLK_MSTP8(_p, _r, _b, _f) \
-+ SH_CLK_MSTP(_p, _r, _b, 0, _f | CLK_ENABLE_REG_8BIT)
-
- int sh_clk_mstp_register(struct clk *clks, int nr);
-
---
-2.1.2
-
diff --git a/patches.renesas/0002-of-fdt-update-of_get_flat_dt_prop-in-prep-for-libfdt.patch b/patches.renesas/0002-of-fdt-update-of_get_flat_dt_prop-in-prep-for-libfdt.patch
deleted file mode 100644
index 27db7d1537021..0000000000000
--- a/patches.renesas/0002-of-fdt-update-of_get_flat_dt_prop-in-prep-for-libfdt.patch
+++ /dev/null
@@ -1,526 +0,0 @@
-From 469190ae2117c59a306d47a777e9ce3846acbdec Mon Sep 17 00:00:00 2001
-From: Rob Herring <robh@kernel.org>
-Date: Tue, 1 Apr 2014 23:49:03 -0500
-Subject: of/fdt: update of_get_flat_dt_prop in prep for libfdt
-
-Make of_get_flat_dt_prop arguments compatible with libfdt fdt_getprop
-call in preparation to convert FDT code to use libfdt. Make the return
-value const and the property length ptr type an int.
-
-Signed-off-by: Rob Herring <robh@kernel.org>
-Tested-by: Michal Simek <michal.simek@xilinx.com>
-Tested-by: Grant Likely <grant.likely@linaro.org>
-Tested-by: Stephen Chivers <schivers@csc.com>
-(cherry picked from commit 9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/plat-samsung/s5p-dev-mfc.c
- arch/powerpc/platforms/powernv/opal.c
- drivers/of/fdt.c
- drivers/of/of_reserved_mem.c
----
- arch/arc/kernel/devtree.c | 2 +-
- arch/arm/kernel/devtree.c | 2 +-
- arch/arm/mach-exynos/common.c | 2 +-
- arch/arm/mach-vexpress/platsmp.c | 2 +-
- arch/arm/plat-samsung/s5p-dev-mfc.c | 4 ++--
- arch/microblaze/kernel/prom.c | 8 ++++----
- arch/powerpc/kernel/epapr_paravirt.c | 2 +-
- arch/powerpc/kernel/fadump.c | 4 ++--
- arch/powerpc/kernel/prom.c | 24 +++++++++++++-----------
- arch/powerpc/kernel/rtas.c | 2 +-
- arch/powerpc/mm/hash_utils_64.c | 22 +++++++++++-----------
- arch/powerpc/platforms/52xx/efika.c | 4 ++--
- arch/powerpc/platforms/chrp/setup.c | 4 ++--
- arch/powerpc/platforms/powernv/opal.c | 8 ++++----
- arch/powerpc/platforms/pseries/setup.c | 4 ++--
- arch/xtensa/kernel/setup.c | 2 +-
- drivers/of/fdt.c | 33 +++++++++++++++++----------------
- include/linux/of_fdt.h | 8 ++++----
- 18 files changed, 70 insertions(+), 67 deletions(-)
-
---- a/arch/arc/kernel/devtree.c
-+++ b/arch/arc/kernel/devtree.c
-@@ -42,7 +42,7 @@ const struct machine_desc * __init setup
- const struct machine_desc *mdesc;
- unsigned long dt_root;
- void *clk;
-- unsigned long len;
-+ int len;
-
- if (!early_init_dt_scan(dt))
- return NULL;
---- a/arch/arm/kernel/devtree.c
-+++ b/arch/arm/kernel/devtree.c
-@@ -212,7 +212,7 @@ const struct machine_desc * __init setup
-
- if (!mdesc) {
- const char *prop;
-- long size;
-+ int size;
- unsigned long dt_root;
-
- early_print("\nError: unrecognized/unsupported "
---- a/arch/arm/mach-exynos/common.c
-+++ b/arch/arm/mach-exynos/common.c
-@@ -322,7 +322,7 @@ static int __init exynos_fdt_map_chipid(
- {
- struct map_desc iodesc;
- __be32 *reg;
-- unsigned long len;
-+ int len;
-
- if (!of_flat_dt_is_compatible(node, "samsung,exynos4210-chipid") &&
- !of_flat_dt_is_compatible(node, "samsung,exynos5440-clock"))
---- a/arch/arm/mach-vexpress/platsmp.c
-+++ b/arch/arm/mach-vexpress/platsmp.c
-@@ -53,7 +53,7 @@ static int __init vexpress_dt_find_scu(u
- {
- if (of_flat_dt_match(node, vexpress_dt_cortex_a9_match)) {
- phys_addr_t phys_addr;
-- __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);
-+ const __be32 *reg = of_get_flat_dt_prop(node, "reg", NULL);
-
- if (WARN_ON(!reg))
- return -EINVAL;
---- a/arch/arm/plat-samsung/s5p-dev-mfc.c
-+++ b/arch/arm/plat-samsung/s5p-dev-mfc.c
-@@ -125,8 +125,8 @@ device_initcall(s5p_mfc_memory_init);
- int __init s5p_fdt_find_mfc_mem(unsigned long node, const char *uname,
- int depth, void *data)
- {
-- __be32 *prop;
-- unsigned long len;
-+ const __be32 *prop;
-+ int len;
- struct s5p_mfc_dt_meminfo *mfc_mem = data;
-
- if (!data)
---- a/arch/microblaze/kernel/prom.c
-+++ b/arch/microblaze/kernel/prom.c
-@@ -43,13 +43,13 @@
- #include <asm/pci-bridge.h>
-
- #ifdef CONFIG_EARLY_PRINTK
--static char *stdout;
-+static const char *stdout;
-
- static int __init early_init_dt_scan_chosen_serial(unsigned long node,
- const char *uname, int depth, void *data)
- {
-- unsigned long l;
-- char *p;
-+ int l;
-+ const char *p;
-
- pr_debug("%s: depth: %d, uname: %s\n", __func__, depth, uname);
-
-@@ -80,7 +80,7 @@ static int __init early_init_dt_scan_cho
- (strncmp(p, "xlnx,opb-uartlite", 17) == 0) ||
- (strncmp(p, "xlnx,axi-uartlite", 17) == 0) ||
- (strncmp(p, "xlnx,mdm", 8) == 0)) {
-- unsigned int *addrp;
-+ const unsigned int *addrp;
-
- *(u32 *)data = UARTLITE;
-
---- a/arch/powerpc/kernel/epapr_paravirt.c
-+++ b/arch/powerpc/kernel/epapr_paravirt.c
-@@ -36,7 +36,7 @@ static int __init early_init_dt_scan_epa
- int depth, void *data)
- {
- const u32 *insts;
-- unsigned long len;
-+ int len;
- int i;
-
- insts = of_get_flat_dt_prop(node, "hcall-instructions", &len);
---- a/arch/powerpc/kernel/fadump.c
-+++ b/arch/powerpc/kernel/fadump.c
-@@ -55,9 +55,9 @@ int crash_mem_ranges;
- int __init early_init_dt_scan_fw_dump(unsigned long node,
- const char *uname, int depth, void *data)
- {
-- __be32 *sections;
-+ const __be32 *sections;
- int i, num_sections;
-- unsigned long size;
-+ int size;
- const int *token;
-
- if (depth != 1 || strcmp(uname, "rtas") != 0)
---- a/arch/powerpc/kernel/prom.c
-+++ b/arch/powerpc/kernel/prom.c
-@@ -162,7 +162,7 @@ static struct ibm_pa_feature {
- {CPU_FTR_REAL_LE, PPC_FEATURE_TRUE_LE, 5, 0, 0},
- };
-
--static void __init scan_features(unsigned long node, unsigned char *ftrs,
-+static void __init scan_features(unsigned long node, const unsigned char *ftrs,
- unsigned long tablelen,
- struct ibm_pa_feature *fp,
- unsigned long ft_size)
-@@ -201,8 +201,8 @@ static void __init scan_features(unsigne
-
- static void __init check_cpu_pa_features(unsigned long node)
- {
-- unsigned char *pa_ftrs;
-- unsigned long tablelen;
-+ const unsigned char *pa_ftrs;
-+ int tablelen;
-
- pa_ftrs = of_get_flat_dt_prop(node, "ibm,pa-features", &tablelen);
- if (pa_ftrs == NULL)
-@@ -215,7 +215,7 @@ static void __init check_cpu_pa_features
- #ifdef CONFIG_PPC_STD_MMU_64
- static void __init check_cpu_slb_size(unsigned long node)
- {
-- __be32 *slb_size_ptr;
-+ const __be32 *slb_size_ptr;
-
- slb_size_ptr = of_get_flat_dt_prop(node, "slb-size", NULL);
- if (slb_size_ptr != NULL) {
-@@ -256,7 +256,7 @@ static struct feature_property {
- static inline void identical_pvr_fixup(unsigned long node)
- {
- unsigned int pvr;
-- char *model = of_get_flat_dt_prop(node, "model", NULL);
-+ const char *model = of_get_flat_dt_prop(node, "model", NULL);
-
- /*
- * Since 440GR(x)/440EP(x) processors have the same pvr,
-@@ -294,11 +294,11 @@ static int __init early_init_dt_scan_cpu
- const char *uname, int depth,
- void *data)
- {
-- char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
- const __be32 *prop;
- const __be32 *intserv;
- int i, nthreads;
-- unsigned long len;
-+ int len;
- int found = -1;
- int found_thread = 0;
-
-@@ -391,7 +391,7 @@ static int __init early_init_dt_scan_cpu
- int __init early_init_dt_scan_chosen_ppc(unsigned long node, const char *uname,
- int depth, void *data)
- {
-- unsigned long *lprop; /* All these set by kernel, so no need to convert endian */
-+ const unsigned long *lprop; /* All these set by kernel, so no need to convert endian */
-
- /* Use common scan routine to determine if this is the chosen node */
- if (early_init_dt_scan_chosen(node, uname, depth, data) == 0)
-@@ -442,8 +442,9 @@ int __init early_init_dt_scan_chosen_ppc
- */
- static int __init early_init_dt_scan_drconf_memory(unsigned long node)
- {
-- __be32 *dm, *ls, *usm;
-- unsigned long l, n, flags;
-+ const __be32 *dm, *ls, *usm;
-+ int l;
-+ unsigned long n, flags;
- u64 base, size, memblock_size;
- unsigned int is_kexec_kdump = 0, rngs;
-
-@@ -563,7 +564,8 @@ void __init early_init_dt_add_memory_arc
-
- static void __init early_reserve_mem_dt(void)
- {
-- unsigned long i, len, dt_root;
-+ unsigned long i, dt_root;
-+ int len;
- const __be32 *prop;
-
- dt_root = of_get_flat_dt_root();
---- a/arch/powerpc/kernel/rtas.c
-+++ b/arch/powerpc/kernel/rtas.c
-@@ -1135,7 +1135,7 @@ void __init rtas_initialize(void)
- int __init early_init_dt_scan_rtas(unsigned long node,
- const char *uname, int depth, void *data)
- {
-- u32 *basep, *entryp, *sizep;
-+ const u32 *basep, *entryp, *sizep;
-
- if (depth != 1 || strcmp(uname, "rtas") != 0)
- return 0;
---- a/arch/powerpc/mm/hash_utils_64.c
-+++ b/arch/powerpc/mm/hash_utils_64.c
-@@ -265,9 +265,9 @@ static int __init htab_dt_scan_seg_sizes
- const char *uname, int depth,
- void *data)
- {
-- char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-- __be32 *prop;
-- unsigned long size = 0;
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const __be32 *prop;
-+ int size = 0;
-
- /* We are scanning "cpu" nodes only */
- if (type == NULL || strcmp(type, "cpu") != 0)
-@@ -320,9 +320,9 @@ static int __init htab_dt_scan_page_size
- const char *uname, int depth,
- void *data)
- {
-- char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-- __be32 *prop;
-- unsigned long size = 0;
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const __be32 *prop;
-+ int size = 0;
-
- /* We are scanning "cpu" nodes only */
- if (type == NULL || strcmp(type, "cpu") != 0)
-@@ -402,9 +402,9 @@ static int __init htab_dt_scan_page_size
- static int __init htab_dt_scan_hugepage_blocks(unsigned long node,
- const char *uname, int depth,
- void *data) {
-- char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-- __be64 *addr_prop;
-- __be32 *page_count_prop;
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const __be64 *addr_prop;
-+ const __be32 *page_count_prop;
- unsigned int expected_pages;
- long unsigned int phys_addr;
- long unsigned int block_size;
-@@ -546,8 +546,8 @@ static int __init htab_dt_scan_pftsize(u
- const char *uname, int depth,
- void *data)
- {
-- char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-- __be32 *prop;
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const __be32 *prop;
-
- /* We are scanning "cpu" nodes only */
- if (type == NULL || strcmp(type, "cpu") != 0)
---- a/arch/powerpc/platforms/52xx/efika.c
-+++ b/arch/powerpc/platforms/52xx/efika.c
-@@ -199,8 +199,8 @@ static void __init efika_setup_arch(void
-
- static int __init efika_probe(void)
- {
-- char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
-- "model", NULL);
-+ const char *model = of_get_flat_dt_prop(of_get_flat_dt_root(),
-+ "model", NULL);
-
- if (model == NULL)
- return 0;
---- a/arch/powerpc/platforms/chrp/setup.c
-+++ b/arch/powerpc/platforms/chrp/setup.c
-@@ -574,8 +574,8 @@ chrp_init2(void)
-
- static int __init chrp_probe(void)
- {
-- char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(),
-- "device_type", NULL);
-+ const char *dtype = of_get_flat_dt_prop(of_get_flat_dt_root(),
-+ "device_type", NULL);
- if (dtype == NULL)
- return 0;
- if (strcmp(dtype, "chrp"))
---- a/arch/powerpc/platforms/powernv/opal.c
-+++ b/arch/powerpc/platforms/powernv/opal.c
-@@ -50,7 +50,7 @@ int __init early_init_dt_scan_opal(unsig
- const char *uname, int depth, void *data)
- {
- const void *basep, *entryp;
-- unsigned long basesz, entrysz;
-+ int basesz, entrysz;
-
- if (depth != 1 || strcmp(uname, "ibm,opal") != 0)
- return 0;
-@@ -64,9 +64,9 @@ int __init early_init_dt_scan_opal(unsig
- opal.base = of_read_number(basep, basesz/4);
- opal.entry = of_read_number(entryp, entrysz/4);
-
-- pr_debug("OPAL Base = 0x%llx (basep=%p basesz=%ld)\n",
-+ pr_debug("OPAL Base = 0x%llx (basep=%p basesz=%d)\n",
- opal.base, basep, basesz);
-- pr_debug("OPAL Entry = 0x%llx (entryp=%p basesz=%ld)\n",
-+ pr_debug("OPAL Entry = 0x%llx (entryp=%p basesz=%d)\n",
- opal.entry, entryp, entrysz);
-
- powerpc_firmware_features |= FW_FEATURE_OPAL;
-@@ -269,7 +269,7 @@ int opal_get_chars(uint32_t vtermno, cha
- if ((be64_to_cpu(evt) & OPAL_EVENT_CONSOLE_INPUT) == 0)
- return 0;
- len = cpu_to_be64(count);
-- rc = opal_console_read(vtermno, &len, buf);
-+ rc = opal_console_read(vtermno, &len, buf);
- if (rc == OPAL_SUCCESS)
- return be64_to_cpu(len);
- return 0;
---- a/arch/powerpc/platforms/pseries/setup.c
-+++ b/arch/powerpc/platforms/pseries/setup.c
-@@ -671,7 +671,7 @@ static int __init pseries_probe_fw_featu
- void *data)
- {
- const char *prop;
-- unsigned long len;
-+ int len;
- static int hypertas_found;
- static int vec5_found;
-
-@@ -704,7 +704,7 @@ static int __init pseries_probe_fw_featu
- static int __init pSeries_probe(void)
- {
- unsigned long root = of_get_flat_dt_root();
-- char *dtype = of_get_flat_dt_prop(root, "device_type", NULL);
-+ const char *dtype = of_get_flat_dt_prop(root, "device_type", NULL);
-
- if (dtype == NULL)
- return 0;
---- a/arch/xtensa/kernel/setup.c
-+++ b/arch/xtensa/kernel/setup.c
-@@ -221,7 +221,7 @@ static int __init xtensa_dt_io_area(unsi
- int depth, void *data)
- {
- const __be32 *ranges;
-- unsigned long len;
-+ int len;
-
- if (depth > 1)
- return 0;
---- a/drivers/of/fdt.c
-+++ b/drivers/of/fdt.c
-@@ -38,7 +38,7 @@ char *of_fdt_get_string(struct boot_para
- */
- void *of_fdt_get_property(struct boot_param_header *blob,
- unsigned long node, const char *name,
-- unsigned long *size)
-+ int *size)
- {
- unsigned long p = node;
-
-@@ -88,7 +88,8 @@ int of_fdt_is_compatible(struct boot_par
- unsigned long node, const char *compat)
- {
- const char *cp;
-- unsigned long cplen, l, score = 0;
-+ int cplen;
-+ unsigned long l, score = 0;
-
- cp = of_fdt_get_property(blob, node, "compatible", &cplen);
- if (cp == NULL)
-@@ -518,8 +519,8 @@ unsigned long __init of_get_flat_dt_root
- * This function can be used within scan_flattened_dt callback to get
- * access to properties
- */
--void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
-- unsigned long *size)
-+const void *__init of_get_flat_dt_prop(unsigned long node, const char *name,
-+ int *size)
- {
- return of_fdt_get_property(initial_boot_params, node, name, size);
- }
-@@ -657,7 +658,7 @@ const void * __init of_flat_dt_match_mac
- }
- if (!best_data) {
- const char *prop;
-- long size;
-+ int size;
-
- pr_err("\n unrecognized device tree list:\n[ ");
-
-@@ -686,8 +687,8 @@ const void * __init of_flat_dt_match_mac
- static void __init early_init_dt_check_for_initrd(unsigned long node)
- {
- u64 start, end;
-- unsigned long len;
-- __be32 *prop;
-+ int len;
-+ const __be32 *prop;
-
- pr_debug("Looking for initrd properties... ");
-
-@@ -720,7 +721,7 @@ static inline void early_init_dt_check_f
- int __init early_init_dt_scan_root(unsigned long node, const char *uname,
- int depth, void *data)
- {
-- __be32 *prop;
-+ const __be32 *prop;
-
- if (depth != 0)
- return 0;
-@@ -742,9 +743,9 @@ int __init early_init_dt_scan_root(unsig
- return 1;
- }
-
--u64 __init dt_mem_next_cell(int s, __be32 **cellp)
-+u64 __init dt_mem_next_cell(int s, const __be32 **cellp)
- {
-- __be32 *p = *cellp;
-+ const __be32 *p = *cellp;
-
- *cellp = p + s;
- return of_read_number(p, s);
-@@ -756,9 +757,9 @@ u64 __init dt_mem_next_cell(int s, __be3
- int __init early_init_dt_scan_memory(unsigned long node, const char *uname,
- int depth, void *data)
- {
-- char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-- __be32 *reg, *endp;
-- unsigned long l;
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const __be32 *reg, *endp;
-+ int l;
-
- /* We are scanning "memory" nodes only */
- if (type == NULL) {
-@@ -779,7 +780,7 @@ int __init early_init_dt_scan_memory(uns
-
- endp = reg + (l / sizeof(__be32));
-
-- pr_debug("memory scan node %s, reg size %ld, data: %x %x %x %x,\n",
-+ pr_debug("memory scan node %s, reg size %d, data: %x %x %x %x,\n",
- uname, l, reg[0], reg[1], reg[2], reg[3]);
-
- while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
-@@ -802,8 +803,8 @@ int __init early_init_dt_scan_memory(uns
- int __init early_init_dt_scan_chosen(unsigned long node, const char *uname,
- int depth, void *data)
- {
-- unsigned long l;
-- char *p;
-+ int l;
-+ const char *p;
-
- pr_debug("search \"chosen\", depth: %d, uname: %s\n", depth, uname);
-
---- a/include/linux/of_fdt.h
-+++ b/include/linux/of_fdt.h
-@@ -66,7 +66,7 @@ extern char *of_fdt_get_string(struct bo
- extern void *of_fdt_get_property(struct boot_param_header *blob,
- unsigned long node,
- const char *name,
-- unsigned long *size);
-+ int *size);
- extern int of_fdt_is_compatible(struct boot_param_header *blob,
- unsigned long node,
- const char *compat);
-@@ -85,8 +85,8 @@ extern char *find_flat_dt_string(u32 off
- extern int of_scan_flat_dt(int (*it)(unsigned long node, const char *uname,
- int depth, void *data),
- void *data);
--extern void *of_get_flat_dt_prop(unsigned long node, const char *name,
-- unsigned long *size);
-+extern const void *of_get_flat_dt_prop(unsigned long node, const char *name,
-+ int *size);
- extern int of_flat_dt_is_compatible(unsigned long node, const char *name);
- extern int of_flat_dt_match(unsigned long node, const char *const *matches);
- extern unsigned long of_get_flat_dt_root(void);
-@@ -100,7 +100,7 @@ extern int early_init_dt_scan_memory(uns
- int depth, void *data);
- extern void early_init_dt_add_memory_arch(u64 base, u64 size);
- extern void * early_init_dt_alloc_memory_arch(u64 size, u64 align);
--extern u64 dt_mem_next_cell(int s, __be32 **cellp);
-+extern u64 dt_mem_next_cell(int s, const __be32 **cellp);
-
- /* Early flat tree scan hooks */
- extern int early_init_dt_scan_root(unsigned long node, const char *uname,
diff --git a/patches.renesas/0003-clk-shmobile-div6-use-proper-description-in-kernel-d.patch b/patches.renesas/0003-clk-shmobile-div6-use-proper-description-in-kernel-d.patch
deleted file mode 100644
index 3ef67123c04d4..0000000000000
--- a/patches.renesas/0003-clk-shmobile-div6-use-proper-description-in-kernel-d.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 596589d192a4b6ba6c1b03a7454094df1040d802 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 24 Feb 2014 20:57:11 +0100
-Subject: clk: shmobile: div6: use proper description in kernel doc
-
-These variable clocks have nothing to do with MSTP gating, probably a
-copy&paste leftover.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 95aa4f9b5fe577de902aa780e91140c6e89c73a2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clk/shmobile/clk-div6.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clk/shmobile/clk-div6.c b/drivers/clk/shmobile/clk-div6.c
-index aac4756ec52e..f065f694cb65 100644
---- a/drivers/clk/shmobile/clk-div6.c
-+++ b/drivers/clk/shmobile/clk-div6.c
-@@ -23,7 +23,7 @@
- #define CPG_DIV6_DIV_MASK 0x3f
-
- /**
-- * struct div6_clock - MSTP gating clock
-+ * struct div6_clock - CPG 6 bit divider clock
- * @hw: handle between common and hardware-specific interfaces
- * @reg: IO-remapped register
- * @div: divisor value (1-64)
---
-2.1.2
-
diff --git a/patches.renesas/0004-clk-shmobile-add-CPG-driver-for-rz-platforms.patch b/patches.renesas/0004-clk-shmobile-add-CPG-driver-for-rz-platforms.patch
deleted file mode 100644
index 0a4ed7fb64f4c..0000000000000
--- a/patches.renesas/0004-clk-shmobile-add-CPG-driver-for-rz-platforms.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 82e31e592d4b0cccb9dd5b557d5a7e06ca9b7780 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Fri, 7 Mar 2014 17:00:37 +0100
-Subject: clk: shmobile: add CPG driver for rz-platforms
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit a665962e8f4484647e7a19b4d6329d42ed8bc804)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../bindings/clock/renesas,rz-cpg-clocks.txt | 29 ++++++
- drivers/clk/shmobile/Makefile | 1 +
- drivers/clk/shmobile/clk-rz.c | 103 +++++++++++++++++++++
- 3 files changed, 133 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt
- create mode 100644 drivers/clk/shmobile/clk-rz.c
-
-diff --git a/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt
-new file mode 100644
-index 000000000000..98a257492522
---- /dev/null
-+++ b/Documentation/devicetree/bindings/clock/renesas,rz-cpg-clocks.txt
-@@ -0,0 +1,29 @@
-+* Renesas RZ Clock Pulse Generator (CPG)
-+
-+The CPG generates core clocks for the RZ SoCs. It includes the PLL, variable
-+CPU and GPU clocks, and several fixed ratio dividers.
-+
-+Required Properties:
-+
-+ - compatible: Must be one of
-+ - "renesas,r7s72100-cpg-clocks" for the r7s72100 CPG
-+ - "renesas,rz-cpg-clocks" for the generic RZ CPG
-+ - reg: Base address and length of the memory resource used by the CPG
-+ - clocks: References to possible parent clocks. Order must match clock modes
-+ in the datasheet. For the r7s72100, this is extal, usb_x1.
-+ - #clock-cells: Must be 1
-+ - clock-output-names: The names of the clocks. Supported clocks are "pll",
-+ "i", and "g"
-+
-+
-+Example
-+-------
-+
-+ cpg_clocks: cpg_clocks@fcfe0000 {
-+ #clock-cells = <1>;
-+ compatible = "renesas,r7s72100-cpg-clocks",
-+ "renesas,rz-cpg-clocks";
-+ reg = <0xfcfe0000 0x18>;
-+ clocks = <&extal_clk>, <&usb_x1_clk>;
-+ clock-output-names = "pll", "i", "g";
-+ };
-diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
-index 9ecef140dba7..5404cb931ebf 100644
---- a/drivers/clk/shmobile/Makefile
-+++ b/drivers/clk/shmobile/Makefile
-@@ -1,4 +1,5 @@
- obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o
-+obj-$(CONFIG_ARCH_R7S72100) += clk-rz.o
- obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o
- obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o
- obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o
-diff --git a/drivers/clk/shmobile/clk-rz.c b/drivers/clk/shmobile/clk-rz.c
-new file mode 100644
-index 000000000000..7e68e8630962
---- /dev/null
-+++ b/drivers/clk/shmobile/clk-rz.c
-@@ -0,0 +1,103 @@
-+/*
-+ * rz Core CPG Clocks
-+ *
-+ * Copyright (C) 2013 Ideas On Board SPRL
-+ * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.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; version 2 of the License.
-+ */
-+
-+#include <linux/clk-provider.h>
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/of.h>
-+#include <linux/of_address.h>
-+#include <linux/slab.h>
-+
-+struct rz_cpg {
-+ struct clk_onecell_data data;
-+ void __iomem *reg;
-+};
-+
-+#define CPG_FRQCR 0x10
-+#define CPG_FRQCR2 0x14
-+
-+/* -----------------------------------------------------------------------------
-+ * Initialization
-+ */
-+
-+static struct clk * __init
-+rz_cpg_register_clock(struct device_node *np, struct rz_cpg *cpg, const char *name)
-+{
-+ u32 val;
-+ unsigned mult;
-+ static const unsigned frqcr_tab[4] = { 3, 2, 0, 1 };
-+
-+ if (strcmp(name, "pll") == 0) {
-+ /* FIXME: cpg_mode should be read from GPIO. But no GPIO support yet */
-+ unsigned cpg_mode = 0; /* hardcoded to EXTAL for now */
-+ const char *parent_name = of_clk_get_parent_name(np, cpg_mode);
-+
-+ mult = cpg_mode ? (32 / 4) : 30;
-+
-+ return clk_register_fixed_factor(NULL, name, parent_name, 0, mult, 1);
-+ }
-+
-+ /* If mapping regs failed, skip non-pll clocks. System will boot anyhow */
-+ if (!cpg->reg)
-+ return ERR_PTR(-ENXIO);
-+
-+ /* FIXME:"i" and "g" are variable clocks with non-integer dividers (e.g. 2/3)
-+ * and the constraint that always g <= i. To get the rz platform started,
-+ * let them run at fixed current speed and implement the details later.
-+ */
-+ if (strcmp(name, "i") == 0)
-+ val = (clk_readl(cpg->reg + CPG_FRQCR) >> 8) & 3;
-+ else if (strcmp(name, "g") == 0)
-+ val = clk_readl(cpg->reg + CPG_FRQCR2) & 3;
-+ else
-+ return ERR_PTR(-EINVAL);
-+
-+ mult = frqcr_tab[val];
-+ return clk_register_fixed_factor(NULL, name, "pll", 0, mult, 3);
-+}
-+
-+static void __init rz_cpg_clocks_init(struct device_node *np)
-+{
-+ struct rz_cpg *cpg;
-+ struct clk **clks;
-+ unsigned i;
-+ int num_clks;
-+
-+ num_clks = of_property_count_strings(np, "clock-output-names");
-+ if (WARN(num_clks <= 0, "can't count CPG clocks\n"))
-+ return;
-+
-+ cpg = kzalloc(sizeof(*cpg), GFP_KERNEL);
-+ clks = kzalloc(num_clks * sizeof(*clks), GFP_KERNEL);
-+ BUG_ON(!cpg || !clks);
-+
-+ cpg->data.clks = clks;
-+ cpg->data.clk_num = num_clks;
-+
-+ cpg->reg = of_iomap(np, 0);
-+
-+ for (i = 0; i < num_clks; ++i) {
-+ const char *name;
-+ struct clk *clk;
-+
-+ of_property_read_string_index(np, "clock-output-names", i, &name);
-+
-+ clk = rz_cpg_register_clock(np, cpg, name);
-+ if (IS_ERR(clk))
-+ pr_err("%s: failed to register %s %s clock (%ld)\n",
-+ __func__, np->name, name, PTR_ERR(clk));
-+ else
-+ cpg->data.clks[i] = clk;
-+ }
-+
-+ of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
-+}
-+CLK_OF_DECLARE(rz_cpg_clks, "renesas,rz-cpg-clocks", rz_cpg_clocks_init);
---
-2.1.2
-
diff --git a/patches.renesas/0005-clk-shmobile-rcar-gen2-fix-lb-sd0-sd1-sdh-clock-pare.patch b/patches.renesas/0005-clk-shmobile-rcar-gen2-fix-lb-sd0-sd1-sdh-clock-pare.patch
deleted file mode 100644
index f4bb83684b9e2..0000000000000
--- a/patches.renesas/0005-clk-shmobile-rcar-gen2-fix-lb-sd0-sd1-sdh-clock-pare.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 9affa85bbc7834c2e6f00b297c4cc4463268dd41 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Mon, 31 Mar 2014 15:50:34 +0100
-Subject: clk: shmobile: rcar-gen2: fix lb/sd0/sd1/sdh clock parent to pll1
-
-The clock generator for rcar-gen2 has the lb, sdh, sd0 and sd1 clocks
-parented to pll1_div2 where the hardware diagram shows these to be
-directly fed from pll1.
-
-This fixes the initial rate for sdh0 clock to be 97.5MHz instead of
-the reported 48MHz where the manual says the default register values
-are for 97.5MHz.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 365b01869bca1c9d5ecb05be7857739fa18a9b8c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clk/shmobile/clk-rcar-gen2.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clk/shmobile/clk-rcar-gen2.c b/drivers/clk/shmobile/clk-rcar-gen2.c
-index 99c27b1c625b..dff7f79a19b9 100644
---- a/drivers/clk/shmobile/clk-rcar-gen2.c
-+++ b/drivers/clk/shmobile/clk-rcar-gen2.c
-@@ -242,22 +242,22 @@ rcar_gen2_cpg_register_clock(struct device_node *np, struct rcar_gen2_cpg *cpg,
- parent_name = "main";
- mult = config->pll3_mult;
- } else if (!strcmp(name, "lb")) {
-- parent_name = "pll1_div2";
-+ parent_name = "pll1";
- div = cpg_mode & BIT(18) ? 36 : 24;
- } else if (!strcmp(name, "qspi")) {
- parent_name = "pll1_div2";
- div = (cpg_mode & (BIT(3) | BIT(2) | BIT(1))) == BIT(2)
- ? 8 : 10;
- } else if (!strcmp(name, "sdh")) {
-- parent_name = "pll1_div2";
-+ parent_name = "pll1";
- table = cpg_sdh_div_table;
- shift = 8;
- } else if (!strcmp(name, "sd0")) {
-- parent_name = "pll1_div2";
-+ parent_name = "pll1";
- table = cpg_sd01_div_table;
- shift = 4;
- } else if (!strcmp(name, "sd1")) {
-- parent_name = "pll1_div2";
-+ parent_name = "pll1";
- table = cpg_sd01_div_table;
- shift = 0;
- } else if (!strcmp(name, "z")) {
---
-2.1.2
-
diff --git a/patches.renesas/0006-clk-shmobile-fix-setting-paretn-clock-rate.patch b/patches.renesas/0006-clk-shmobile-fix-setting-paretn-clock-rate.patch
deleted file mode 100644
index 0b0756edccfd7..0000000000000
--- a/patches.renesas/0006-clk-shmobile-fix-setting-paretn-clock-rate.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 61264c41c132d68e59adb33576628dc882346425 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Mon, 31 Mar 2014 18:47:27 +0100
-Subject: clk: shmobile: fix setting paretn clock rate
-
-If the driver needs to change a clock rate, then it must be propogated
-through the MSTP clock to the parent clock (such as shdi0 -> sd0). Without
-this we cannot up-rate default clocks which are really slow (such as the
-mmcif1 which defaults to 12MHz where it could be running at 97MHz)
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit e44df332f30bf3040c60c1ed6674d1431fdb48b9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clk/shmobile/clk-mstp.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
-index 42d5912b1d25..2e5810c88d11 100644
---- a/drivers/clk/shmobile/clk-mstp.c
-+++ b/drivers/clk/shmobile/clk-mstp.c
-@@ -137,7 +137,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name,
-
- init.name = name;
- init.ops = &cpg_mstp_clock_ops;
-- init.flags = CLK_IS_BASIC;
-+ init.flags = CLK_IS_BASIC | CLK_SET_RATE_PARENT;
- init.parent_names = &parent_name;
- init.num_parents = 1;
-
---
-2.1.2
-
diff --git a/patches.renesas/0007-clk-shmobile-clk-mstp-change-to-using-clock-indices.patch b/patches.renesas/0007-clk-shmobile-clk-mstp-change-to-using-clock-indices.patch
deleted file mode 100644
index 33549b1527bd0..0000000000000
--- a/patches.renesas/0007-clk-shmobile-clk-mstp-change-to-using-clock-indices.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 268bdaf26a693062fd0ddbb3f87b15060da28e52 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Tue, 15 Apr 2014 17:06:34 +0100
-Subject: clk: shmobile: clk-mstp: change to using clock-indices
-
-With the addition of clock-indices, we need to change the renesas
-clock implementation to use these instead of the local definition
-of "renesas,clock-indices".
-
-Since this will break booting with older device trees, we add a
-simple auto-detection of which properties are present.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 8e33f91a0b84ae1964bef77cb92f5d41d97530c8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 2 +-
- drivers/clk/shmobile/clk-mstp.c | 9 +++++++--
- 2 files changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-index 5992dceec7af..02a25d99ca61 100644
---- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-@@ -43,7 +43,7 @@ Example
- clock-output-names =
- "tpu0", "mmcif1", "sdhi3", "sdhi2",
- "sdhi1", "sdhi0", "mmcif0";
-- renesas,clock-indices = <
-+ clock-indices = <
- R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
- R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
- R8A7790_CLK_MMCIF0
-diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
-index 2e5810c88d11..1f6324e29a80 100644
---- a/drivers/clk/shmobile/clk-mstp.c
-+++ b/drivers/clk/shmobile/clk-mstp.c
-@@ -156,6 +156,7 @@ cpg_mstp_clock_register(const char *name, const char *parent_name,
- static void __init cpg_mstp_clocks_init(struct device_node *np)
- {
- struct mstp_clock_group *group;
-+ const char *idxname;
- struct clk **clks;
- unsigned int i;
-
-@@ -184,6 +185,11 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
- for (i = 0; i < MSTP_MAX_CLOCKS; ++i)
- clks[i] = ERR_PTR(-ENOENT);
-
-+ if (of_find_property(np, "clock-indices", &i))
-+ idxname = "clock-indices";
-+ else
-+ idxname = "renesas,clock-indices";
-+
- for (i = 0; i < MSTP_MAX_CLOCKS; ++i) {
- const char *parent_name;
- const char *name;
-@@ -197,8 +203,7 @@ static void __init cpg_mstp_clocks_init(struct device_node *np)
- continue;
-
- parent_name = of_clk_get_parent_name(np, i);
-- ret = of_property_read_u32_index(np, "renesas,clock-indices", i,
-- &clkidx);
-+ ret = of_property_read_u32_index(np, idxname, i, &clkidx);
- if (parent_name == NULL || ret < 0)
- break;
-
---
-2.1.2
-
diff --git a/patches.renesas/0008-gpio-rcar-Add-helper-variable-dev-pdev-dev.patch b/patches.renesas/0008-gpio-rcar-Add-helper-variable-dev-pdev-dev.patch
deleted file mode 100644
index dc90407050088..0000000000000
--- a/patches.renesas/0008-gpio-rcar-Add-helper-variable-dev-pdev-dev.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 76f9bb9494de0e28d3d5eb7eab385ad038321bc0 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 27 Mar 2014 21:47:36 +0100
-Subject: gpio: rcar: Add helper variable dev = &pdev->dev
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: linux-gpio@vger.kernel.org
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit b22978fc33dec72e5f8e17f90eb63ea9137aafd5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpio/gpio-rcar.c | 32 ++++++++++++++++----------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
-index ca76ce751540..03c91482432c 100644
---- a/drivers/gpio/gpio-rcar.c
-+++ b/drivers/gpio/gpio-rcar.c
-@@ -356,12 +356,13 @@ static int gpio_rcar_probe(struct platform_device *pdev)
- struct resource *io, *irq;
- struct gpio_chip *gpio_chip;
- struct irq_chip *irq_chip;
-- const char *name = dev_name(&pdev->dev);
-+ struct device *dev = &pdev->dev;
-+ const char *name = dev_name(dev);
- int ret;
-
-- p = devm_kzalloc(&pdev->dev, sizeof(*p), GFP_KERNEL);
-+ p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);
- if (!p) {
-- dev_err(&pdev->dev, "failed to allocate driver data\n");
-+ dev_err(dev, "failed to allocate driver data\n");
- ret = -ENOMEM;
- goto err0;
- }
-@@ -380,15 +381,14 @@ static int gpio_rcar_probe(struct platform_device *pdev)
- irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-
- if (!io || !irq) {
-- dev_err(&pdev->dev, "missing IRQ or IOMEM\n");
-+ dev_err(dev, "missing IRQ or IOMEM\n");
- ret = -EINVAL;
- goto err0;
- }
-
-- p->base = devm_ioremap_nocache(&pdev->dev, io->start,
-- resource_size(io));
-+ p->base = devm_ioremap_nocache(dev, io->start, resource_size(io));
- if (!p->base) {
-- dev_err(&pdev->dev, "failed to remap I/O memory\n");
-+ dev_err(dev, "failed to remap I/O memory\n");
- ret = -ENXIO;
- goto err0;
- }
-@@ -402,7 +402,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
- gpio_chip->set = gpio_rcar_set;
- gpio_chip->to_irq = gpio_rcar_to_irq;
- gpio_chip->label = name;
-- gpio_chip->dev = &pdev->dev;
-+ gpio_chip->dev = dev;
- gpio_chip->owner = THIS_MODULE;
- gpio_chip->base = p->config.gpio_base;
- gpio_chip->ngpio = p->config.number_of_pins;
-@@ -421,30 +421,30 @@ static int gpio_rcar_probe(struct platform_device *pdev)
- &gpio_rcar_irq_domain_ops, p);
- if (!p->irq_domain) {
- ret = -ENXIO;
-- dev_err(&pdev->dev, "cannot initialize irq domain\n");
-+ dev_err(dev, "cannot initialize irq domain\n");
- goto err0;
- }
-
-- if (devm_request_irq(&pdev->dev, irq->start,
-- gpio_rcar_irq_handler, IRQF_SHARED, name, p)) {
-- dev_err(&pdev->dev, "failed to request IRQ\n");
-+ if (devm_request_irq(dev, irq->start, gpio_rcar_irq_handler,
-+ IRQF_SHARED, name, p)) {
-+ dev_err(dev, "failed to request IRQ\n");
- ret = -ENOENT;
- goto err1;
- }
-
- ret = gpiochip_add(gpio_chip);
- if (ret) {
-- dev_err(&pdev->dev, "failed to add GPIO controller\n");
-+ dev_err(dev, "failed to add GPIO controller\n");
- goto err1;
- }
-
-- dev_info(&pdev->dev, "driving %d GPIOs\n", p->config.number_of_pins);
-+ dev_info(dev, "driving %d GPIOs\n", p->config.number_of_pins);
-
- /* warn in case of mismatch if irq base is specified */
- if (p->config.irq_base) {
- ret = irq_find_mapping(p->irq_domain, 0);
- if (p->config.irq_base != ret)
-- dev_warn(&pdev->dev, "irq base mismatch (%u/%u)\n",
-+ dev_warn(dev, "irq base mismatch (%u/%u)\n",
- p->config.irq_base, ret);
- }
-
-@@ -452,7 +452,7 @@ static int gpio_rcar_probe(struct platform_device *pdev)
- ret = gpiochip_add_pin_range(gpio_chip, p->config.pctl_name, 0,
- gpio_chip->base, gpio_chip->ngpio);
- if (ret < 0)
-- dev_warn(&pdev->dev, "failed to add pin range\n");
-+ dev_warn(dev, "failed to add pin range\n");
- }
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0009-mtd-m25p80-Add-dual-read-support.patch b/patches.renesas/0009-mtd-m25p80-Add-dual-read-support.patch
deleted file mode 100644
index fd015e9bf931c..0000000000000
--- a/patches.renesas/0009-mtd-m25p80-Add-dual-read-support.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From cf78dac7430db4c5689b7afaf20a7f2848493542 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 21 Jan 2014 13:59:18 +0100
-Subject: mtd: m25p80: Add dual read support
-
-Add support for Dual SPI read transfers, which is supported by some
-Spansion SPI FLASHes.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Marek Vasut <marex@denx.de>
-Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-(cherry picked from commit dbbafb74239e8296bc20f86366b3f38e13650900)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mtd/devices/m25p80.c | 23 +++++++++++++++++++----
- 1 file changed, 19 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
-index ad1913909702..73bf661100f7 100644
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -41,7 +41,8 @@
- #define OPCODE_WRSR 0x01 /* Write status register 1 byte */
- #define OPCODE_NORM_READ 0x03 /* Read data bytes (low frequency) */
- #define OPCODE_FAST_READ 0x0b /* Read data bytes (high frequency) */
--#define OPCODE_QUAD_READ 0x6b /* Read data bytes */
-+#define OPCODE_DUAL_READ 0x3b /* Read data bytes (Dual SPI) */
-+#define OPCODE_QUAD_READ 0x6b /* Read data bytes (Quad SPI) */
- #define OPCODE_PP 0x02 /* Page program (up to 256 bytes) */
- #define OPCODE_BE_4K 0x20 /* Erase 4KiB block */
- #define OPCODE_BE_4K_PMC 0xd7 /* Erase 4KiB block on PMC chips */
-@@ -54,7 +55,8 @@
- /* 4-byte address opcodes - used on Spansion and some Macronix flashes. */
- #define OPCODE_NORM_READ_4B 0x13 /* Read data bytes (low frequency) */
- #define OPCODE_FAST_READ_4B 0x0c /* Read data bytes (high frequency) */
--#define OPCODE_QUAD_READ_4B 0x6c /* Read data bytes */
-+#define OPCODE_DUAL_READ_4B 0x3c /* Read data bytes (Dual SPI) */
-+#define OPCODE_QUAD_READ_4B 0x6c /* Read data bytes (Quad SPI) */
- #define OPCODE_PP_4B 0x12 /* Page program (up to 256 bytes) */
- #define OPCODE_SE_4B 0xdc /* Sector erase (usually 64KiB) */
-
-@@ -95,6 +97,7 @@
- enum read_type {
- M25P80_NORMAL = 0,
- M25P80_FAST,
-+ M25P80_DUAL,
- M25P80_QUAD,
- };
-
-@@ -479,6 +482,7 @@ static inline int m25p80_dummy_cycles_read(struct m25p *flash)
- {
- switch (flash->flash_read) {
- case M25P80_FAST:
-+ case M25P80_DUAL:
- case M25P80_QUAD:
- return 1;
- case M25P80_NORMAL:
-@@ -492,6 +496,8 @@ static inline int m25p80_dummy_cycles_read(struct m25p *flash)
- static inline unsigned int m25p80_rx_nbits(const struct m25p *flash)
- {
- switch (flash->flash_read) {
-+ case M25P80_DUAL:
-+ return 2;
- case M25P80_QUAD:
- return 4;
- default:
-@@ -855,7 +861,8 @@ struct flash_info {
- #define SST_WRITE 0x04 /* use SST byte programming */
- #define M25P_NO_FR 0x08 /* Can't do fastread */
- #define SECT_4K_PMC 0x10 /* OPCODE_BE_4K_PMC works uniformly */
--#define M25P80_QUAD_READ 0x20 /* Flash supports Quad Read */
-+#define M25P80_DUAL_READ 0x20 /* Flash supports Dual Read */
-+#define M25P80_QUAD_READ 0x40 /* Flash supports Quad Read */
- };
-
- #define INFO(_jedec_id, _ext_id, _sector_size, _n_sectors, _flags) \
-@@ -1226,7 +1233,7 @@ static int m25p_probe(struct spi_device *spi)
- if (info->flags & M25P_NO_FR)
- flash->flash_read = M25P80_NORMAL;
-
-- /* Quad-read mode takes precedence over fast/normal */
-+ /* Quad/Dual-read mode takes precedence over fast/normal */
- if (spi->mode & SPI_RX_QUAD && info->flags & M25P80_QUAD_READ) {
- ret = set_quad_mode(flash, info->jedec_id);
- if (ret) {
-@@ -1234,6 +1241,8 @@ static int m25p_probe(struct spi_device *spi)
- return ret;
- }
- flash->flash_read = M25P80_QUAD;
-+ } else if (spi->mode & SPI_RX_DUAL && info->flags & M25P80_DUAL_READ) {
-+ flash->flash_read = M25P80_DUAL;
- }
-
- /* Default commands */
-@@ -1241,6 +1250,9 @@ static int m25p_probe(struct spi_device *spi)
- case M25P80_QUAD:
- flash->read_opcode = OPCODE_QUAD_READ;
- break;
-+ case M25P80_DUAL:
-+ flash->read_opcode = OPCODE_DUAL_READ;
-+ break;
- case M25P80_FAST:
- flash->read_opcode = OPCODE_FAST_READ;
- break;
-@@ -1265,6 +1277,9 @@ static int m25p_probe(struct spi_device *spi)
- case M25P80_QUAD:
- flash->read_opcode = OPCODE_QUAD_READ_4B;
- break;
-+ case M25P80_DUAL:
-+ flash->read_opcode = OPCODE_DUAL_READ_4B;
-+ break;
- case M25P80_FAST:
- flash->read_opcode = OPCODE_FAST_READ_4B;
- break;
---
-2.1.2
-
diff --git a/patches.renesas/0010-mtd-m25p80-Enable-Dual-SPI-read-transfers-for-s25fl2.patch b/patches.renesas/0010-mtd-m25p80-Enable-Dual-SPI-read-transfers-for-s25fl2.patch
deleted file mode 100644
index aed93dc947205..0000000000000
--- a/patches.renesas/0010-mtd-m25p80-Enable-Dual-SPI-read-transfers-for-s25fl2.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 8481ddf80b6ac692dc34706a066467761af5aa09 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 21 Jan 2014 13:59:19 +0100
-Subject: mtd: m25p80: Enable Dual SPI read transfers for s25fl256s1 and
- s25fl512s
-
-Spansion s25fl256s1 and s25fl512s support Dual SPI transfers, hence set the
-M25P80_DUAL_READ flag.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-(cherry picked from commit f5e00838e83f6fc93f42c7a01b0c612031955b31)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mtd/devices/m25p80.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
-index 73bf661100f7..f0871a2e449d 100644
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -960,8 +960,8 @@ static const struct spi_device_id m25p_ids[] = {
- { "s25sl032p", INFO(0x010215, 0x4d00, 64 * 1024, 64, 0) },
- { "s25sl064p", INFO(0x010216, 0x4d00, 64 * 1024, 128, 0) },
- { "s25fl256s0", INFO(0x010219, 0x4d00, 256 * 1024, 128, 0) },
-- { "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, M25P80_QUAD_READ) },
-- { "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256, M25P80_QUAD_READ) },
-+ { "s25fl256s1", INFO(0x010219, 0x4d01, 64 * 1024, 512, M25P80_DUAL_READ | M25P80_QUAD_READ) },
-+ { "s25fl512s", INFO(0x010220, 0x4d00, 256 * 1024, 256, M25P80_DUAL_READ | M25P80_QUAD_READ) },
- { "s70fl01gs", INFO(0x010221, 0x4d00, 256 * 1024, 256, 0) },
- { "s25sl12800", INFO(0x012018, 0x0300, 256 * 1024, 64, 0) },
- { "s25sl12801", INFO(0x012018, 0x0301, 64 * 1024, 256, 0) },
---
-2.1.2
-
diff --git a/patches.renesas/0011-mtd-delete-non-required-instances-of-include-linux-i.patch b/patches.renesas/0011-mtd-delete-non-required-instances-of-include-linux-i.patch
deleted file mode 100644
index e0eb519b6fd45..0000000000000
--- a/patches.renesas/0011-mtd-delete-non-required-instances-of-include-linux-i.patch
+++ /dev/null
@@ -1,505 +0,0 @@
-From 7bbd27c561c5bccb9b208945f2a08ffe8424479d Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Tue, 21 Jan 2014 16:22:52 -0500
-Subject: mtd: delete non-required instances of include <linux/init.h>
-
-None of these files are actually using any __init type directives
-and hence don't need to include <linux/init.h>. Most are just a
-left over from __devinit and __cpuinit removal, or simply due to
-code getting copied from one driver to the next.
-
-Cc: David Woodhouse <dwmw2@infradead.org>
-Cc: Brian Norris <computersforpeace@gmail.com>
-Cc: linux-mtd@lists.infradead.org
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-[Brian: dropped one incorrect hunk]
-Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-
-(cherry picked from commit 3ea5b037e750274659648b58fb97426566a90373)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mtd/chips/cfi_cmdset_0001.c | 1 -
- drivers/mtd/chips/cfi_cmdset_0002.c | 1 -
- drivers/mtd/chips/cfi_cmdset_0020.c | 1 -
- drivers/mtd/devices/m25p80.c | 1 -
- drivers/mtd/devices/mtd_dataflash.c | 1 -
- drivers/mtd/devices/sst25l.c | 1 -
- drivers/mtd/inftlmount.c | 1 -
- drivers/mtd/maps/bfin-async-flash.c | 1 -
- drivers/mtd/maps/gpio-addr-flash.c | 1 -
- drivers/mtd/maps/intel_vr_nor.c | 1 -
- drivers/mtd/maps/ixp4xx.c | 1 -
- drivers/mtd/maps/lantiq-flash.c | 1 -
- drivers/mtd/maps/latch-addr-flash.c | 1 -
- drivers/mtd/maps/pci.c | 1 -
- drivers/mtd/maps/physmap_of.c | 1 -
- drivers/mtd/maps/plat-ram.c | 1 -
- drivers/mtd/maps/pxa2xx-flash.c | 1 -
- drivers/mtd/maps/rbtx4939-flash.c | 1 -
- drivers/mtd/maps/scb2_flash.c | 1 -
- drivers/mtd/maps/sun_uflash.c | 1 -
- drivers/mtd/mtd_blkdevs.c | 1 -
- drivers/mtd/nand/ams-delta.c | 1 -
- drivers/mtd/nand/au1550nd.c | 1 -
- drivers/mtd/nand/bf5xx_nand.c | 1 -
- drivers/mtd/nand/davinci_nand.c | 1 -
- drivers/mtd/nand/fsl_elbc_nand.c | 1 -
- drivers/mtd/nand/fsl_ifc_nand.c | 1 -
- drivers/mtd/nand/gpio.c | 1 -
- drivers/mtd/nand/mpc5121_nfc.c | 1 -
- drivers/mtd/nand/nuc900_nand.c | 1 -
- drivers/mtd/nand/pasemi_nand.c | 1 -
- drivers/mtd/nand/s3c2410.c | 1 -
- drivers/mtd/onenand/generic.c | 1 -
- drivers/mtd/onenand/omap2.c | 1 -
- drivers/mtd/onenand/onenand_base.c | 1 -
- drivers/mtd/tests/mtd_test.c | 1 -
- drivers/mtd/ubi/ubi.h | 1 -
- 37 files changed, 37 deletions(-)
-
-diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c
-index 77514430f1fe..a19719e00a69 100644
---- a/drivers/mtd/chips/cfi_cmdset_0001.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0001.c
-@@ -21,7 +21,6 @@
- #include <linux/types.h>
- #include <linux/kernel.h>
- #include <linux/sched.h>
--#include <linux/init.h>
- #include <asm/io.h>
- #include <asm/byteorder.h>
-
-diff --git a/drivers/mtd/chips/cfi_cmdset_0002.c b/drivers/mtd/chips/cfi_cmdset_0002.c
-index 89b9d6891532..718244d1211a 100644
---- a/drivers/mtd/chips/cfi_cmdset_0002.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -24,7 +24,6 @@
- #include <linux/types.h>
- #include <linux/kernel.h>
- #include <linux/sched.h>
--#include <linux/init.h>
- #include <asm/io.h>
- #include <asm/byteorder.h>
-
-diff --git a/drivers/mtd/chips/cfi_cmdset_0020.c b/drivers/mtd/chips/cfi_cmdset_0020.c
-index 096993f9711e..88529422c401 100644
---- a/drivers/mtd/chips/cfi_cmdset_0020.c
-+++ b/drivers/mtd/chips/cfi_cmdset_0020.c
-@@ -22,7 +22,6 @@
- #include <linux/types.h>
- #include <linux/kernel.h>
- #include <linux/sched.h>
--#include <linux/init.h>
- #include <asm/io.h>
- #include <asm/byteorder.h>
-
-diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
-index f0871a2e449d..1e147a849c35 100644
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -15,7 +15,6 @@
- *
- */
-
--#include <linux/init.h>
- #include <linux/err.h>
- #include <linux/errno.h>
- #include <linux/module.h>
-diff --git a/drivers/mtd/devices/mtd_dataflash.c b/drivers/mtd/devices/mtd_dataflash.c
-index 624069de4f28..8b278d2b15bb 100644
---- a/drivers/mtd/devices/mtd_dataflash.c
-+++ b/drivers/mtd/devices/mtd_dataflash.c
-@@ -10,7 +10,6 @@
- * 2 of the License, or (at your option) any later version.
- */
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/delay.h>
- #include <linux/device.h>
-diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
-index 687bf27ec850..c63ecbcad0b7 100644
---- a/drivers/mtd/devices/sst25l.c
-+++ b/drivers/mtd/devices/sst25l.c
-@@ -15,7 +15,6 @@
- *
- */
-
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/device.h>
- #include <linux/mutex.h>
-diff --git a/drivers/mtd/inftlmount.c b/drivers/mtd/inftlmount.c
-index 4adc0374fb6b..487e64f411a5 100644
---- a/drivers/mtd/inftlmount.c
-+++ b/drivers/mtd/inftlmount.c
-@@ -30,7 +30,6 @@
- #include <asm/uaccess.h>
- #include <linux/delay.h>
- #include <linux/slab.h>
--#include <linux/init.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/nftl.h>
- #include <linux/mtd/inftl.h>
-diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
-index 5434d8ded015..6ea51e549045 100644
---- a/drivers/mtd/maps/bfin-async-flash.c
-+++ b/drivers/mtd/maps/bfin-async-flash.c
-@@ -14,7 +14,6 @@
- * Licensed under the GPL-2 or later.
- */
-
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
-index 1adba86474a5..a4c477b9fdd6 100644
---- a/drivers/mtd/maps/gpio-addr-flash.c
-+++ b/drivers/mtd/maps/gpio-addr-flash.c
-@@ -14,7 +14,6 @@
- */
-
- #include <linux/gpio.h>
--#include <linux/init.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c
-index 46d195fca942..5ab71f0e1bcd 100644
---- a/drivers/mtd/maps/intel_vr_nor.c
-+++ b/drivers/mtd/maps/intel_vr_nor.c
-@@ -31,7 +31,6 @@
- #include <linux/kernel.h>
- #include <linux/slab.h>
- #include <linux/pci.h>
--#include <linux/init.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
- #include <linux/mtd/partitions.h>
-diff --git a/drivers/mtd/maps/ixp4xx.c b/drivers/mtd/maps/ixp4xx.c
-index d6b2451eab1d..6a589f1e2880 100644
---- a/drivers/mtd/maps/ixp4xx.c
-+++ b/drivers/mtd/maps/ixp4xx.c
-@@ -16,7 +16,6 @@
- #include <linux/err.h>
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
- #include <linux/slab.h>
-diff --git a/drivers/mtd/maps/lantiq-flash.c b/drivers/mtd/maps/lantiq-flash.c
-index 93c507a6f862..7aa682cd4d7e 100644
---- a/drivers/mtd/maps/lantiq-flash.c
-+++ b/drivers/mtd/maps/lantiq-flash.c
-@@ -13,7 +13,6 @@
- #include <linux/kernel.h>
- #include <linux/io.h>
- #include <linux/slab.h>
--#include <linux/init.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
- #include <linux/mtd/partitions.h>
-diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
-index 98bb5d5375d7..cadfbe051873 100644
---- a/drivers/mtd/maps/latch-addr-flash.c
-+++ b/drivers/mtd/maps/latch-addr-flash.c
-@@ -10,7 +10,6 @@
- * kind, whether express or implied.
- */
-
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/maps/pci.c b/drivers/mtd/maps/pci.c
-index 36da518915b5..eb0242e0b2d9 100644
---- a/drivers/mtd/maps/pci.c
-+++ b/drivers/mtd/maps/pci.c
-@@ -14,7 +14,6 @@
- #include <linux/module.h>
- #include <linux/kernel.h>
- #include <linux/pci.h>
--#include <linux/init.h>
- #include <linux/slab.h>
-
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
-index d11109762ac5..217c25d7381b 100644
---- a/drivers/mtd/maps/physmap_of.c
-+++ b/drivers/mtd/maps/physmap_of.c
-@@ -15,7 +15,6 @@
-
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/device.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
-diff --git a/drivers/mtd/maps/plat-ram.c b/drivers/mtd/maps/plat-ram.c
-index 10196f5a897d..76ace85ccdc6 100644
---- a/drivers/mtd/maps/plat-ram.c
-+++ b/drivers/mtd/maps/plat-ram.c
-@@ -23,7 +23,6 @@
-
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
- #include <linux/ioport.h>
-diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
-index 9aad854fe912..cb4d92eea9fe 100644
---- a/drivers/mtd/maps/pxa2xx-flash.c
-+++ b/drivers/mtd/maps/pxa2xx-flash.c
-@@ -13,7 +13,6 @@
- #include <linux/types.h>
- #include <linux/slab.h>
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/platform_device.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
-diff --git a/drivers/mtd/maps/rbtx4939-flash.c b/drivers/mtd/maps/rbtx4939-flash.c
-index 93525121d69d..146b6047ed2b 100644
---- a/drivers/mtd/maps/rbtx4939-flash.c
-+++ b/drivers/mtd/maps/rbtx4939-flash.c
-@@ -13,7 +13,6 @@
- #include <linux/module.h>
- #include <linux/types.h>
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/device.h>
- #include <linux/platform_device.h>
-diff --git a/drivers/mtd/maps/scb2_flash.c b/drivers/mtd/maps/scb2_flash.c
-index 3051c4c36240..b7a22a612a46 100644
---- a/drivers/mtd/maps/scb2_flash.c
-+++ b/drivers/mtd/maps/scb2_flash.c
-@@ -47,7 +47,6 @@
- #include <linux/module.h>
- #include <linux/types.h>
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <asm/io.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/map.h>
-diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
-index 39cc4181f025..b6f1aac3510c 100644
---- a/drivers/mtd/maps/sun_uflash.c
-+++ b/drivers/mtd/maps/sun_uflash.c
-@@ -11,7 +11,6 @@
- #include <linux/module.h>
- #include <linux/fs.h>
- #include <linux/errno.h>
--#include <linux/init.h>
- #include <linux/ioport.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
-diff --git a/drivers/mtd/mtd_blkdevs.c b/drivers/mtd/mtd_blkdevs.c
-index 5073cbc796d8..0b2ccb68c0d0 100644
---- a/drivers/mtd/mtd_blkdevs.c
-+++ b/drivers/mtd/mtd_blkdevs.c
-@@ -30,7 +30,6 @@
- #include <linux/blkpg.h>
- #include <linux/spinlock.h>
- #include <linux/hdreg.h>
--#include <linux/init.h>
- #include <linux/mutex.h>
- #include <asm/uaccess.h>
-
-diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c
-index 8611eb4b45fc..4936e9e0002f 100644
---- a/drivers/mtd/nand/ams-delta.c
-+++ b/drivers/mtd/nand/ams-delta.c
-@@ -17,7 +17,6 @@
- */
-
- #include <linux/slab.h>
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/delay.h>
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/nand/au1550nd.c b/drivers/mtd/nand/au1550nd.c
-index 2880d888cfc5..7d84c4e4bf43 100644
---- a/drivers/mtd/nand/au1550nd.c
-+++ b/drivers/mtd/nand/au1550nd.c
-@@ -11,7 +11,6 @@
-
- #include <linux/slab.h>
- #include <linux/gpio.h>
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/interrupt.h>
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/nand/bf5xx_nand.c b/drivers/mtd/nand/bf5xx_nand.c
-index 94f55dbde995..b7a24946ca26 100644
---- a/drivers/mtd/nand/bf5xx_nand.c
-+++ b/drivers/mtd/nand/bf5xx_nand.c
-@@ -37,7 +37,6 @@
-
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
- #include <linux/ioport.h>
-diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
-index a4989ec6292e..4f5f3223aeef 100644
---- a/drivers/mtd/nand/davinci_nand.c
-+++ b/drivers/mtd/nand/davinci_nand.c
-@@ -24,7 +24,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/platform_device.h>
- #include <linux/err.h>
-diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
-index c09ab95a2219..545a5c002f09 100644
---- a/drivers/mtd/nand/fsl_elbc_nand.c
-+++ b/drivers/mtd/nand/fsl_elbc_nand.c
-@@ -24,7 +24,6 @@
-
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
- #include <linux/ioport.h>
-diff --git a/drivers/mtd/nand/fsl_ifc_nand.c b/drivers/mtd/nand/fsl_ifc_nand.c
-index 90ca7e75d6f0..f8c77e311766 100644
---- a/drivers/mtd/nand/fsl_ifc_nand.c
-+++ b/drivers/mtd/nand/fsl_ifc_nand.c
-@@ -22,7 +22,6 @@
-
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/of_address.h>
- #include <linux/slab.h>
-diff --git a/drivers/mtd/nand/gpio.c b/drivers/mtd/nand/gpio.c
-index 8e6148aa4539..117ce333fdd4 100644
---- a/drivers/mtd/nand/gpio.c
-+++ b/drivers/mtd/nand/gpio.c
-@@ -18,7 +18,6 @@
-
- #include <linux/kernel.h>
- #include <linux/err.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/module.h>
- #include <linux/platform_device.h>
-diff --git a/drivers/mtd/nand/mpc5121_nfc.c b/drivers/mtd/nand/mpc5121_nfc.c
-index 31ee7cfbc12b..e78841a2dcc3 100644
---- a/drivers/mtd/nand/mpc5121_nfc.c
-+++ b/drivers/mtd/nand/mpc5121_nfc.c
-@@ -30,7 +30,6 @@
- #include <linux/gfp.h>
- #include <linux/delay.h>
- #include <linux/err.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/nand/nuc900_nand.c b/drivers/mtd/nand/nuc900_nand.c
-index 7360f7872d9a..1cb55dcf3ed6 100644
---- a/drivers/mtd/nand/nuc900_nand.c
-+++ b/drivers/mtd/nand/nuc900_nand.c
-@@ -10,7 +10,6 @@
- */
-
- #include <linux/slab.h>
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
-diff --git a/drivers/mtd/nand/pasemi_nand.c b/drivers/mtd/nand/pasemi_nand.c
-index 90f871acb0ef..2c98f9da7471 100644
---- a/drivers/mtd/nand/pasemi_nand.c
-+++ b/drivers/mtd/nand/pasemi_nand.c
-@@ -23,7 +23,6 @@
- #undef DEBUG
-
- #include <linux/slab.h>
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/nand.h>
-diff --git a/drivers/mtd/nand/s3c2410.c b/drivers/mtd/nand/s3c2410.c
-index f0918e7411d9..79acbb8691b5 100644
---- a/drivers/mtd/nand/s3c2410.c
-+++ b/drivers/mtd/nand/s3c2410.c
-@@ -29,7 +29,6 @@
-
- #include <linux/module.h>
- #include <linux/types.h>
--#include <linux/init.h>
- #include <linux/kernel.h>
- #include <linux/string.h>
- #include <linux/io.h>
-diff --git a/drivers/mtd/onenand/generic.c b/drivers/mtd/onenand/generic.c
-index 8e1919b6f074..093c29ac1a13 100644
---- a/drivers/mtd/onenand/generic.c
-+++ b/drivers/mtd/onenand/generic.c
-@@ -13,7 +13,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/slab.h>
- #include <linux/platform_device.h>
- #include <linux/mtd/mtd.h>
-diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
-index 6547c84afc3a..d945473c3882 100644
---- a/drivers/mtd/onenand/omap2.c
-+++ b/drivers/mtd/onenand/omap2.c
-@@ -25,7 +25,6 @@
-
- #include <linux/device.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/onenand.h>
- #include <linux/mtd/partitions.h>
-diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
-index 1de33b5d3903..531ccbcdc04b 100644
---- a/drivers/mtd/onenand/onenand_base.c
-+++ b/drivers/mtd/onenand/onenand_base.c
-@@ -24,7 +24,6 @@
- #include <linux/module.h>
- #include <linux/moduleparam.h>
- #include <linux/slab.h>
--#include <linux/init.h>
- #include <linux/sched.h>
- #include <linux/delay.h>
- #include <linux/interrupt.h>
-diff --git a/drivers/mtd/tests/mtd_test.c b/drivers/mtd/tests/mtd_test.c
-index c818a63532e7..111ee46a7428 100644
---- a/drivers/mtd/tests/mtd_test.c
-+++ b/drivers/mtd/tests/mtd_test.c
-@@ -1,6 +1,5 @@
- #define pr_fmt(fmt) "mtd_test: " fmt
-
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/sched.h>
- #include <linux/printk.h>
-diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
-index 8ea6297a208f..41763223f7ea 100644
---- a/drivers/mtd/ubi/ubi.h
-+++ b/drivers/mtd/ubi/ubi.h
-@@ -22,7 +22,6 @@
- #ifndef __UBI_UBI_H__
- #define __UBI_UBI_H__
-
--#include <linux/init.h>
- #include <linux/types.h>
- #include <linux/list.h>
- #include <linux/rbtree.h>
---
-2.1.2
-
diff --git a/patches.renesas/0012-mtd-m25p80-Use-positive-logic-to-check-JEDEC-ID.patch b/patches.renesas/0012-mtd-m25p80-Use-positive-logic-to-check-JEDEC-ID.patch
deleted file mode 100644
index e0b66ac087a23..0000000000000
--- a/patches.renesas/0012-mtd-m25p80-Use-positive-logic-to-check-JEDEC-ID.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 61002129d6ee6993d7986b0be19dc11b2627f2d6 Mon Sep 17 00:00:00 2001
-From: Axel Lin <axel.lin@ingics.com>
-Date: Tue, 21 Jan 2014 15:56:34 +0800
-Subject: mtd: m25p80: Use positive logic to check JEDEC ID
-
-For slightly better readability.
-
-Signed-off-by: Axel Lin <axel.lin@ingics.com>
-Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-(cherry picked from commit b2fda1296bb8e213a6bad3937326ae98c4c4773c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mtd/devices/m25p80.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
-index 1e147a849c35..c6e6d8e8ef7b 100644
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -1078,9 +1078,8 @@ static const struct spi_device_id *jedec_probe(struct spi_device *spi)
- for (tmp = 0; tmp < ARRAY_SIZE(m25p_ids) - 1; tmp++) {
- info = (void *)m25p_ids[tmp].driver_data;
- if (info->jedec_id == jedec) {
-- if (info->ext_id != 0 && info->ext_id != ext_jedec)
-- continue;
-- return &m25p_ids[tmp];
-+ if (info->ext_id == 0 || info->ext_id == ext_jedec)
-+ return &m25p_ids[tmp];
- }
- }
- dev_err(&spi->dev, "unrecognized JEDEC id %06x\n", jedec);
---
-2.1.2
-
diff --git a/patches.renesas/0013-mtd-m25p80-add-support-for-the-Spansion-s25fl008k-ch.patch b/patches.renesas/0013-mtd-m25p80-add-support-for-the-Spansion-s25fl008k-ch.patch
deleted file mode 100644
index e1b8be3e4b691..0000000000000
--- a/patches.renesas/0013-mtd-m25p80-add-support-for-the-Spansion-s25fl008k-ch.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From ebdbea2419e70363e674e9f04a8eccf3f329ede2 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 11 Feb 2014 09:51:18 +0100
-Subject: mtd: m25p80: add support for the Spansion s25fl008k chip
-
-Signed-off-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-(cherry picked from commit bec44c45c245b38662f1e61bf0bde95fac1e7fb5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mtd/devices/m25p80.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
-index c6e6d8e8ef7b..882b72072ae7 100644
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -971,6 +971,7 @@ static const struct spi_device_id m25p_ids[] = {
- { "s25sl016a", INFO(0x010214, 0, 64 * 1024, 32, 0) },
- { "s25sl032a", INFO(0x010215, 0, 64 * 1024, 64, 0) },
- { "s25sl064a", INFO(0x010216, 0, 64 * 1024, 128, 0) },
-+ { "s25fl008k", INFO(0xef4014, 0, 64 * 1024, 16, SECT_4K) },
- { "s25fl016k", INFO(0xef4015, 0, 64 * 1024, 32, SECT_4K) },
- { "s25fl064k", INFO(0xef4017, 0, 64 * 1024, 128, SECT_4K) },
-
---
-2.1.2
-
diff --git a/patches.renesas/0014-mtd-m25p80-add-Macronix-mx66l1g55g-1Gbit-SPI-flash.patch b/patches.renesas/0014-mtd-m25p80-add-Macronix-mx66l1g55g-1Gbit-SPI-flash.patch
deleted file mode 100644
index a8ecbc0582682..0000000000000
--- a/patches.renesas/0014-mtd-m25p80-add-Macronix-mx66l1g55g-1Gbit-SPI-flash.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 975123a25fd885f6d96c09fba187281eb3cdd3e7 Mon Sep 17 00:00:00 2001
-From: Brian Norris <computersforpeace@gmail.com>
-Date: Wed, 29 Jan 2014 13:39:43 -0800
-Subject: mtd: m25p80: add Macronix mx66l1g55g 1Gbit SPI flash
-
-Signed-off-by: Brian Norris <computersforpeace@gmail.com>
-Acked-by: Marek Vasut <marex@denx.de>
-(cherry picked from commit 6f7db7f3203a0bd48170807adeb53dd401d29110)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mtd/devices/m25p80.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
-index 882b72072ae7..524dab3ac938 100644
---- a/drivers/mtd/devices/m25p80.c
-+++ b/drivers/mtd/devices/m25p80.c
-@@ -940,6 +940,7 @@ static const struct spi_device_id m25p_ids[] = {
- { "mx25l25635e", INFO(0xc22019, 0, 64 * 1024, 512, 0) },
- { "mx25l25655e", INFO(0xc22619, 0, 64 * 1024, 512, 0) },
- { "mx66l51235l", INFO(0xc2201a, 0, 64 * 1024, 1024, M25P80_QUAD_READ) },
-+ { "mx66l1g55g", INFO(0xc2261b, 0, 64 * 1024, 2048, M25P80_QUAD_READ) },
-
- /* Micron */
- { "n25q064", INFO(0x20ba17, 0, 64 * 1024, 128, 0) },
---
-2.1.2
-
diff --git a/patches.renesas/0015-pinctrl-Quiet-logging-about-missing-DT-nodes-when-no.patch b/patches.renesas/0015-pinctrl-Quiet-logging-about-missing-DT-nodes-when-no.patch
deleted file mode 100644
index c4f554bd77fc9..0000000000000
--- a/patches.renesas/0015-pinctrl-Quiet-logging-about-missing-DT-nodes-when-no.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 4f31f26145b2244452c4889d43cd41d62a989da3 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@linaro.org>
-Date: Thu, 30 Jan 2014 18:57:20 +0000
-Subject: pinctrl: Quiet logging about missing DT nodes when not using DT
-
-On systems which were not booted using DT it is entirely unsurprising that
-device nodes don't have any DT information and this is going to happen for
-every single device in the system. Make pinctrl be less chatty about this
-situation by only logging in the case where we have DT.
-
-Signed-off-by: Mark Brown <broonie@linaro.org>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 5d88dceac736a779fdf6208bbd0a06e81fe25300)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/devicetree.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
-index 340fb4e6c600..eda13de2e7c0 100644
---- a/drivers/pinctrl/devicetree.c
-+++ b/drivers/pinctrl/devicetree.c
-@@ -186,7 +186,9 @@ int pinctrl_dt_to_map(struct pinctrl *p)
-
- /* CONFIG_OF enabled, p->dev not instantiated from DT */
- if (!np) {
-- dev_dbg(p->dev, "no of_node; not parsing pinctrl DT\n");
-+ if (of_have_populated_dt())
-+ dev_dbg(p->dev,
-+ "no of_node; not parsing pinctrl DT\n");
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0016-drm-rcar-du-Handle-encoder-initialization-failures.patch b/patches.renesas/0016-drm-rcar-du-Handle-encoder-initialization-failures.patch
deleted file mode 100644
index a8196fbed8af5..0000000000000
--- a/patches.renesas/0016-drm-rcar-du-Handle-encoder-initialization-failures.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 1e13b65c0d0a4eafcaa9db060ef5d6029f12660b Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 1 Apr 2014 13:03:52 +0200
-Subject: drm/rcar-du: Handle encoder initialization failures
-
-The rcar_du_encoder_init() function can fail and return an error code.
-Don't ignore it.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Dave Airlie <airlied@redhat.com>
-(cherry picked from commit d9961b22716ddf59ca307fe862f93ff0ea919952)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
-index fbeabd9a281f..a87edfac111f 100644
---- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
-+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
-@@ -248,7 +248,10 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
- continue;
- }
-
-- rcar_du_encoder_init(rcdu, pdata->type, pdata->output, pdata);
-+ ret = rcar_du_encoder_init(rcdu, pdata->type, pdata->output,
-+ pdata);
-+ if (ret < 0)
-+ return ret;
- }
-
- /* Set the possible CRTCs and possible clones. There's always at least
---
-2.1.2
-
diff --git a/patches.renesas/0017-ASoC-rsnd-tidyup-register-naming-of-BUSIF_MODE.patch b/patches.renesas/0017-ASoC-rsnd-tidyup-register-naming-of-BUSIF_MODE.patch
deleted file mode 100644
index 2e3dc1c8d5efc..0000000000000
--- a/patches.renesas/0017-ASoC-rsnd-tidyup-register-naming-of-BUSIF_MODE.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 239e78b54c84bc46741089b834f5b144a6d192fc Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:37:39 -0800
-Subject: ASoC: rsnd: tidyup register naming of BUSIF_MODE
-
-Gen1:SRU has only 1 BUSIF_MODE,
-but Gen2:SSIU/SCU has SRCm_BUSIF_MODE, and SSIn_BUSIF_MODE.
-This patch rename current BUSIF_MODE to SRC_BUSIF_MODE.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 0290d2a42cb476358303d05fbe2475dd50889907)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 2 +-
- sound/soc/sh/rcar/rsnd.h | 2 +-
- sound/soc/sh/rcar/scu.c | 2 +-
- 3 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index add088bd4b2a..cbdbbfa322b8 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -317,7 +317,7 @@ static int rsnd_gen1_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen)
- RSND_GEN1_S_REG(gen, SRU, SRC_ROUTE_CTRL, 0xc0),
- RSND_GEN1_S_REG(gen, SRU, SSI_MODE0, 0xD0),
- RSND_GEN1_S_REG(gen, SRU, SSI_MODE1, 0xD4),
-- RSND_GEN1_M_REG(gen, SRU, BUSIF_MODE, 0x20, 0x4),
-+ RSND_GEN1_M_REG(gen, SRU, SRC_BUSIF_MODE, 0x20, 0x4),
- RSND_GEN1_M_REG(gen, SRU, SRC_ROUTE_MODE0,0x50, 0x8),
- RSND_GEN1_M_REG(gen, SRU, SRC_SWRSR, 0x200, 0x40),
- RSND_GEN1_M_REG(gen, SRU, SRC_SRCIR, 0x204, 0x40),
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 4ca66cd899c8..f62b9eb274e1 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -39,8 +39,8 @@ enum rsnd_reg {
- RSND_REG_SRC_ROUTE_CTRL, /* for Gen1 */
- RSND_REG_SSI_MODE0,
- RSND_REG_SSI_MODE1,
-- RSND_REG_BUSIF_MODE,
- RSND_REG_INT_ENABLE, /* for Gen2 */
-+ RSND_REG_SRC_BUSIF_MODE,
- RSND_REG_SRC_ROUTE_MODE0,
- RSND_REG_SRC_SWRSR,
- RSND_REG_SRC_SRCIR,
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 9bb08bb1d455..9b9daa3821a3 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -211,7 +211,7 @@ static int rsnd_scu_convert_rate_ctrl(struct rsnd_priv *priv,
- rsnd_mod_write(mod, SRC_SRCIR, 0);
-
- /* use DMA transfer */
-- rsnd_mod_write(mod, BUSIF_MODE, 1);
-+ rsnd_mod_write(mod, SRC_BUSIF_MODE, 1);
-
- return 0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0018-ASoC-rsnd-cleanup-debug-information-method.patch b/patches.renesas/0018-ASoC-rsnd-cleanup-debug-information-method.patch
deleted file mode 100644
index b0781cb77a0f4..0000000000000
--- a/patches.renesas/0018-ASoC-rsnd-cleanup-debug-information-method.patch
+++ /dev/null
@@ -1,122 +0,0 @@
-From 428c58d7a7d9cd3195721482425f39898f972a5f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:38:08 -0800
-Subject: ASoC: rsnd: cleanup debug information method
-
-rsnd_mod debug information is implemented
-in each callback functions now.
-But, it can be implemented in rsnd_mod_call(),
-and share this code.
-This patch adds it
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 92d9587ede108a7e73f80d0767aedf2c4edb47d8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 11 ++++++++++-
- sound/soc/sh/rcar/scu.c | 2 --
- sound/soc/sh/rcar/ssi.c | 12 ------------
- 3 files changed, 10 insertions(+), 15 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index f62b9eb274e1..faacdcb8f05b 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -152,10 +152,19 @@ struct rsnd_mod {
- #define rsnd_mod_id(mod) ((mod)->id)
- #define for_each_rsnd_mod(pos, n, io) \
- list_for_each_entry_safe(pos, n, &(io)->head, list)
-+#define __rsnd_mod_call(mod, func, rdai, io) \
-+({ \
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \
-+ struct device *dev = rsnd_priv_to_dev(priv); \
-+ dev_dbg(dev, "%s-%d-%s\n", \
-+ rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \
-+ (mod)->ops->func(mod, rdai, io); \
-+})
-+
- #define rsnd_mod_call(mod, func, rdai, io) \
- (!(mod) ? -ENODEV : \
- !((mod)->ops->func) ? 0 : \
-- (mod)->ops->func(mod, rdai, io))
-+ __rsnd_mod_call(mod, func, rdai, io))
-
- void rsnd_mod_init(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 9b9daa3821a3..e4b82ab31dca 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -300,8 +300,6 @@ static int rsnd_scu_start(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-- dev_dbg(dev, "%s%d start\n", rsnd_mod_name(mod), rsnd_mod_id(mod));
--
- return 0;
- }
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 4b8cf7ca9d19..df775f0c8a2c 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -324,7 +324,6 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct device *dev = rsnd_priv_to_dev(priv);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- u32 cr;
-
-@@ -371,8 +370,6 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
-
- rsnd_ssi_mode_set(priv, rdai, ssi);
-
-- dev_dbg(dev, "%s.%d init\n", rsnd_mod_name(mod), rsnd_mod_id(mod));
--
- return 0;
- }
-
-@@ -384,8 +381,6 @@ static int rsnd_ssi_quit(struct rsnd_mod *mod,
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct device *dev = rsnd_priv_to_dev(priv);
-
-- dev_dbg(dev, "%s.%d quit\n", rsnd_mod_name(mod), rsnd_mod_id(mod));
--
- if (ssi->err > 0)
- dev_warn(dev, "ssi under/over flow err = %d\n", ssi->err);
-
-@@ -450,7 +445,6 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-- struct device *dev = rsnd_priv_to_dev(priv);
-
- /* enable PIO IRQ */
- ssi->cr_etc = UIEN | OIEN | DIEN;
-@@ -461,8 +455,6 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
-
- rsnd_ssi_hw_start(ssi, rdai, io);
-
-- dev_dbg(dev, "%s.%d start\n", rsnd_mod_name(mod), rsnd_mod_id(mod));
--
- return 0;
- }
-
-@@ -470,12 +462,8 @@ static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-
-- dev_dbg(dev, "%s.%d stop\n", rsnd_mod_name(mod), rsnd_mod_id(mod));
--
- ssi->cr_etc = 0;
-
- rsnd_ssi_hw_stop(ssi, rdai);
---
-2.1.2
-
diff --git a/patches.renesas/0019-ASoC-rsnd-remove-meaningless-rsnd_ssi_non.patch b/patches.renesas/0019-ASoC-rsnd-remove-meaningless-rsnd_ssi_non.patch
deleted file mode 100644
index a34d3d6b4b3e9..0000000000000
--- a/patches.renesas/0019-ASoC-rsnd-remove-meaningless-rsnd_ssi_non.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From ffcacc0264f7f6d7c812c70e0ff17eaf0ed4bd7a Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:38:17 -0800
-Subject: ASoC: rsnd: remove meaningless rsnd_ssi_non()
-
-rsnd_ssi_non_ops callback functions are never called.
-remove these meaningless callback
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6acef1721c1046be8b5f44b839c28817cfbd66c6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/ssi.c | 16 ----------------
- 1 file changed, 16 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index df775f0c8a2c..ef3d45045d1f 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -555,24 +555,8 @@ static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
- /*
- * Non SSI
- */
--static int rsnd_ssi_non(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct device *dev = rsnd_priv_to_dev(priv);
--
-- dev_dbg(dev, "%s\n", __func__);
--
-- return 0;
--}
--
- static struct rsnd_mod_ops rsnd_ssi_non_ops = {
- .name = "ssi (non)",
-- .init = rsnd_ssi_non,
-- .quit = rsnd_ssi_non,
-- .start = rsnd_ssi_non,
-- .stop = rsnd_ssi_non,
- };
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0020-ASoC-rsnd-control-SCU-ops-in-probe-timing.patch b/patches.renesas/0020-ASoC-rsnd-control-SCU-ops-in-probe-timing.patch
deleted file mode 100644
index d67490653d50c..0000000000000
--- a/patches.renesas/0020-ASoC-rsnd-control-SCU-ops-in-probe-timing.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 4b24bc4c0a1df601316e85449136ebfd005d75ab Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:38:26 -0800
-Subject: ASoC: rsnd: control SCU ops in probe timing
-
-SCU will be used if platform requested to use.
-Current driver is checking it in runtime,
-but, it can be decided in probe timing.
-This patch do it
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 013f38fe260af6f505ad5da5f6b0db3e42ca1fbb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 30 +++++++++++-------------------
- 1 file changed, 11 insertions(+), 19 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index e4b82ab31dca..ab5f1d21731e 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -270,24 +270,10 @@ static int rsnd_scu_start(struct rsnd_mod *mod,
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- struct device *dev = rsnd_priv_to_dev(priv);
- int ret;
-
-- /*
-- * SCU will be used if it has RSND_SCU_USE_HPBIF flags
-- */
-- if (!rsnd_scu_hpbif_is_enable(mod)) {
-- /* it use PIO transter */
-- dev_dbg(dev, "%s%d is not used\n",
-- rsnd_mod_name(mod), rsnd_mod_id(mod));
--
-- return 0;
-- }
--
- clk_enable(scu->clk);
-
-- /* it use DMA transter */
--
- ret = rsnd_src_set_route_if_gen1(priv, mod, rdai, io);
- if (ret < 0)
- return ret;
-@@ -310,9 +296,6 @@ static int rsnd_scu_stop(struct rsnd_mod *mod,
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-
-- if (!rsnd_scu_hpbif_is_enable(mod))
-- return 0;
--
- rsnd_scu_transfer_stop(priv, mod, rdai, io);
-
- clk_disable(scu->clk);
-@@ -326,6 +309,10 @@ static struct rsnd_mod_ops rsnd_scu_ops = {
- .stop = rsnd_scu_stop,
- };
-
-+static struct rsnd_mod_ops rsnd_scu_non_ops = {
-+ .name = "scu (non)",
-+};
-+
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
- {
- if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv)))
-@@ -340,6 +327,7 @@ int rsnd_scu_probe(struct platform_device *pdev,
- {
- struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_scu *scu;
-+ struct rsnd_mod_ops *ops;
- struct clk *clk;
- char name[RSND_SCU_NAME_SIZE];
- int i, nr;
-@@ -364,11 +352,15 @@ int rsnd_scu_probe(struct platform_device *pdev,
- if (IS_ERR(clk))
- return PTR_ERR(clk);
-
-- rsnd_mod_init(priv, &scu->mod,
-- &rsnd_scu_ops, i);
- scu->info = &info->scu_info[i];
- scu->clk = clk;
-
-+ ops = &rsnd_scu_non_ops;
-+ if (rsnd_scu_hpbif_is_enable(&scu->mod))
-+ ops = &rsnd_scu_ops;
-+
-+ rsnd_mod_init(priv, &scu->mod, ops, i);
-+
- dev_dbg(dev, "SCU%d probed\n", i);
- }
- dev_dbg(dev, "scu probed\n");
---
-2.1.2
-
diff --git a/patches.renesas/0021-ASoC-rsnd-add-rsnd_scu_init-and-separate-init-start.patch b/patches.renesas/0021-ASoC-rsnd-add-rsnd_scu_init-and-separate-init-start.patch
deleted file mode 100644
index 8420bf1a8da1c..0000000000000
--- a/patches.renesas/0021-ASoC-rsnd-add-rsnd_scu_init-and-separate-init-start.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7ae4a85f32ec9e06c35111591cc873a59b012715 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:38:33 -0800
-Subject: ASoC: rsnd: add rsnd_scu_init(), and separate init/start
-
-Current scu.c has rsnd_scu_start(),
-and, operation of initialization/start
-are implemented in this function.
-This patch adds new rsnd_scu_init() and separates
-rsnd_scu_start(), since rsnd_mod_ops has .init/.start callbacks.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit a204d90c91208d9b63ba309a1c44f582751e58c9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 29 +++++++++++++++++++++++------
- 1 file changed, 23 insertions(+), 6 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index ab5f1d21731e..e1e08738b9d4 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -264,7 +264,7 @@ bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod)
- return !!(flags & RSND_SCU_USE_HPBIF);
- }
-
--static int rsnd_scu_start(struct rsnd_mod *mod,
-+static int rsnd_scu_init(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-@@ -282,13 +282,30 @@ static int rsnd_scu_start(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-- ret = rsnd_scu_transfer_start(priv, mod, rdai, io);
-- if (ret < 0)
-- return ret;
-+ return 0;
-+}
-+
-+static int rsnd_scu_quit(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ clk_disable(scu->clk);
-
- return 0;
- }
-
-+static int rsnd_scu_start(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ return rsnd_scu_transfer_start(priv, mod, rdai, io);
-+}
-+
- static int rsnd_scu_stop(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -298,13 +315,13 @@ static int rsnd_scu_stop(struct rsnd_mod *mod,
-
- rsnd_scu_transfer_stop(priv, mod, rdai, io);
-
-- clk_disable(scu->clk);
--
- return 0;
- }
-
- static struct rsnd_mod_ops rsnd_scu_ops = {
- .name = "scu",
-+ .init = rsnd_scu_init,
-+ .quit = rsnd_scu_quit,
- .start = rsnd_scu_start,
- .stop = rsnd_scu_stop,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0022-ASoC-rsnd-remove-meaningless-function-parameter.patch b/patches.renesas/0022-ASoC-rsnd-remove-meaningless-function-parameter.patch
deleted file mode 100644
index a9b855eafd003..0000000000000
--- a/patches.renesas/0022-ASoC-rsnd-remove-meaningless-function-parameter.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From d1d78368ec2c7f6149bf6734027172069e21fe41 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:38:42 -0800
-Subject: ASoC: rsnd: remove meaningless function parameter
-
-struct rsnd_priv *priv on rsnd_scu_init/start/stop()
-are no longer needed
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 47718dc7d8ca5f5509ac9beb13486642306bb36b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index e1e08738b9d4..ece539b758d1 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -50,7 +50,7 @@ struct rsnd_scu {
- i++)
-
- /* Gen1 only */
--static int rsnd_src_set_route_if_gen1(struct rsnd_priv *priv,
-+static int rsnd_src_set_route_if_gen1(
- struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -69,6 +69,7 @@ static int rsnd_src_set_route_if_gen1(struct rsnd_priv *priv,
- { 0x3, 28, }, /* 7 */
- { 0x3, 30, }, /* 8 */
- };
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- u32 mask;
- u32 val;
-@@ -149,11 +150,12 @@ unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- return rate;
- }
-
--static int rsnd_scu_convert_rate_ctrl(struct rsnd_priv *priv,
-+static int rsnd_scu_convert_rate_ctrl(
- struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- u32 convert_rate = rsnd_scu_convert_rate(scu);
-@@ -268,17 +270,16 @@ static int rsnd_scu_init(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- int ret;
-
- clk_enable(scu->clk);
-
-- ret = rsnd_src_set_route_if_gen1(priv, mod, rdai, io);
-+ ret = rsnd_src_set_route_if_gen1(mod, rdai, io);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_scu_convert_rate_ctrl(priv, mod, rdai, io);
-+ ret = rsnd_scu_convert_rate_ctrl(mod, rdai, io);
- if (ret < 0)
- return ret;
-
---
-2.1.2
-
diff --git a/patches.renesas/0023-ASoC-rsnd-merge-rsnd_scu_start-stop-and-rsnd_scu_tra.patch b/patches.renesas/0023-ASoC-rsnd-merge-rsnd_scu_start-stop-and-rsnd_scu_tra.patch
deleted file mode 100644
index 8e5404af15245..0000000000000
--- a/patches.renesas/0023-ASoC-rsnd-merge-rsnd_scu_start-stop-and-rsnd_scu_tra.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From f91f9c1dcad96f344d743d62c2bf7b962f00b7cb Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:38:50 -0800
-Subject: ASoC: rsnd: merge rsnd_scu_start/stop() and
- rsnd_scu_transfer_start/stop()
-
-rsnd_scu_transfer_start/stop() are no longer needed.
-merge into rsnd_scu_start/stop()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e7ce74eaa76591e5a4905d0fc07a278533447b80)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 56 +++++++++++++------------------------------------
- 1 file changed, 14 insertions(+), 42 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index ece539b758d1..5d2dbbbf9d98 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -218,46 +218,6 @@ static int rsnd_scu_convert_rate_ctrl(
- return 0;
- }
-
--static int rsnd_scu_transfer_start(struct rsnd_priv *priv,
-- struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- int id = rsnd_mod_id(mod);
-- u32 val;
--
-- if (rsnd_is_gen1(priv)) {
-- val = (1 << id);
-- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, val, val);
-- }
--
-- if (rsnd_scu_convert_rate(scu))
-- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
--
-- return 0;
--}
--
--static int rsnd_scu_transfer_stop(struct rsnd_priv *priv,
-- struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- int id = rsnd_mod_id(mod);
-- u32 mask;
--
-- if (rsnd_is_gen1(priv)) {
-- mask = (1 << id);
-- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, mask, 0);
-- }
--
-- if (rsnd_scu_convert_rate(scu))
-- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
--
-- return 0;
--}
--
- bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod)
- {
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-@@ -303,8 +263,15 @@ static int rsnd_scu_start(struct rsnd_mod *mod,
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ int id = rsnd_mod_id(mod);
-
-- return rsnd_scu_transfer_start(priv, mod, rdai, io);
-+ if (rsnd_is_gen1(priv))
-+ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
-+
-+ if (rsnd_scu_convert_rate(scu))
-+ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
-+
-+ return 0;
- }
-
- static int rsnd_scu_stop(struct rsnd_mod *mod,
-@@ -313,8 +280,13 @@ static int rsnd_scu_stop(struct rsnd_mod *mod,
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ int id = rsnd_mod_id(mod);
-+
-+ if (rsnd_is_gen1(priv))
-+ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
-
-- rsnd_scu_transfer_stop(priv, mod, rdai, io);
-+ if (rsnd_scu_convert_rate(scu))
-+ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
-
- return 0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0024-ASoC-rsnd-rsnd_dai_is_clk_master-can-be-shared.patch b/patches.renesas/0024-ASoC-rsnd-rsnd_dai_is_clk_master-can-be-shared.patch
deleted file mode 100644
index 1ee4e285448c6..0000000000000
--- a/patches.renesas/0024-ASoC-rsnd-rsnd_dai_is_clk_master-can-be-shared.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From b6ecea4baf55e2fe786be5aff3cb17c742da5bed Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:39:12 -0800
-Subject: ASoC: rsnd: rsnd_dai_is_clk_master() can be shared
-
-Current rsnd driver is using ssi local
-rsnd_rdai_is_clk_master() for checking clock master.
-But it can be rsnd_dai_is_clk_master(), and share in each file
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e779a20da90b12d17af74fe544fafd814b66dc63)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 1 +
- sound/soc/sh/rcar/ssi.c | 9 ++++-----
- 2 files changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index faacdcb8f05b..cd396dda85c5 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -215,6 +215,7 @@ int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai);
-
- void rsnd_dai_pointer_update(struct rsnd_dai_stream *io, int cnt);
- int rsnd_dai_pointer_offset(struct rsnd_dai_stream *io, int additional);
-+#define rsnd_dai_is_clk_master(rdai) ((rdai)->clk_master)
-
- /*
- * R-Car Gen1/Gen2
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index ef3d45045d1f..ddcca067908c 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -95,7 +95,6 @@ struct rsnd_ssiu {
- #define rsnd_ssi_dma_available(ssi) \
- rsnd_dma_available(rsnd_mod_to_dma(&(ssi)->mod))
- #define rsnd_ssi_clk_from_parent(ssi) ((ssi)->parent)
--#define rsnd_rdai_is_clk_master(rdai) ((rdai)->clk_master)
- #define rsnd_ssi_mode_flags(p) ((p)->info->flags)
- #define rsnd_ssi_dai_id(ssi) ((ssi)->info->dai_id)
- #define rsnd_ssi_to_ssiu(ssi)\
-@@ -133,7 +132,7 @@ static void rsnd_ssi_mode_set(struct rsnd_priv *priv,
- #define ssi_parent_set(p, sync, adg, ext) \
- do { \
- ssi->parent = ssiu->ssi + p; \
-- if (rsnd_rdai_is_clk_master(rdai)) \
-+ if (rsnd_dai_is_clk_master(rdai)) \
- val = adg; \
- else \
- val = ext; \
-@@ -252,7 +251,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi,
- if (0 == ssi->usrcnt) {
- clk_enable(ssi->clk);
-
-- if (rsnd_rdai_is_clk_master(rdai)) {
-+ if (rsnd_dai_is_clk_master(rdai)) {
- if (rsnd_ssi_clk_from_parent(ssi))
- rsnd_ssi_hw_start(ssi->parent, rdai, io);
- else
-@@ -302,7 +301,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi,
- rsnd_mod_write(&ssi->mod, SSICR, cr); /* disabled all */
- rsnd_ssi_status_check(&ssi->mod, IIRQ);
-
-- if (rsnd_rdai_is_clk_master(rdai)) {
-+ if (rsnd_dai_is_clk_master(rdai)) {
- if (rsnd_ssi_clk_from_parent(ssi))
- rsnd_ssi_hw_stop(ssi->parent, rdai);
- else
-@@ -522,7 +521,7 @@ static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
- rsnd_ssi_hw_start(ssi, ssi->rdai, io);
-
- /* enable WS continue */
-- if (rsnd_rdai_is_clk_master(rdai))
-+ if (rsnd_dai_is_clk_master(rdai))
- rsnd_mod_write(&ssi->mod, SSIWSR, CONT);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0025-ASoC-rsnd-remove-pin-sync-option.patch b/patches.renesas/0025-ASoC-rsnd-remove-pin-sync-option.patch
deleted file mode 100644
index 1dc607de3c3bf..0000000000000
--- a/patches.renesas/0025-ASoC-rsnd-remove-pin-sync-option.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2e74326d526e256077b30c1395f2e8bdd96ac2c0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:39:23 -0800
-Subject: ASoC: rsnd: remove pin sync option
-
-Renesas Chip is supporting multi pin sound,
-but the HW setting is very difficult and confusable.
-But driver is supporting it halfway.
-Remove SYNC option at this point.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6f3ab6c1c022e7a4877d38940cd45ae7804a15e2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 1 +
- sound/soc/sh/rcar/ssi.c | 2 --
- 2 files changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index 6add6ccc811e..1d19bfc2486d 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -35,6 +35,7 @@
- */
- #define RSND_SSI_CLK_PIN_SHARE (1 << 31)
- #define RSND_SSI_SYNC (1 << 29) /* SSI34_sync etc */
-+#define RSND_SSI_CLK_FROM_ADG (1 << 30) /* clock parent is master */
-
- #define RSND_SSI_PLAY (1 << 24)
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index ddcca067908c..68393a9f91bf 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -136,8 +136,6 @@ static void rsnd_ssi_mode_set(struct rsnd_priv *priv,
- val = adg; \
- else \
- val = ext; \
-- if (flags & RSND_SSI_SYNC) \
-- val |= sync; \
- } while (0)
-
- flags = rsnd_ssi_mode_flags(ssi);
---
-2.1.2
-
diff --git a/patches.renesas/0026-ASoC-rsnd-SSI_MODE0-1-settings-goes-to-scu.c.patch b/patches.renesas/0026-ASoC-rsnd-SSI_MODE0-1-settings-goes-to-scu.c.patch
deleted file mode 100644
index f494e10a26c0a..0000000000000
--- a/patches.renesas/0026-ASoC-rsnd-SSI_MODE0-1-settings-goes-to-scu.c.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-From 3f9a38e9470a0ac77423ec3118000f1273f8889f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:39:32 -0800
-Subject: ASoC: rsnd: SSI_MODE0/1 settings goes to scu.c
-
-SRU (Gen1) / SCU (Gen2) / SSIU (Gen2) are controlled under scu.c.
-(SCU + SSIU (Gen2) was SRU (Gen1))
-And register of SSI_MODE0/1 are mapped on these IP.
-But these have been implemented under ssi.c on this driver.
-The naming is very confusable,
-but it should be implemented under scu.c
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 7b5ce9759a60ebdffa1e76224ccb3d85bd06e4ac)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 1 +
- sound/soc/sh/rcar/scu.c | 45 ++++++++++++++++++++++
- sound/soc/sh/rcar/ssi.c | 98 ++++++++++++++----------------------------------
- 3 files changed, 74 insertions(+), 70 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index cd396dda85c5..85b926229b81 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -321,5 +321,6 @@ void rsnd_ssi_remove(struct platform_device *pdev,
- struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
- struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
- int dai_id, int is_play);
-+int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
-
- #endif
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 5d2dbbbf9d98..ade10474a0cf 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -49,6 +49,46 @@ struct rsnd_scu {
- ((pos) = (struct rsnd_scu *)(priv)->scu + i); \
- i++)
-
-+static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ int id = rsnd_mod_id(mod);
-+
-+ /*
-+ * SSI_MODE0
-+ */
-+ rsnd_mod_bset(mod, SSI_MODE0, (1 << id),
-+ rsnd_scu_hpbif_is_enable(mod) ? 0 : (1 << id));
-+
-+ /*
-+ * SSI_MODE1
-+ */
-+ if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) {
-+ int shift = -1;
-+ switch (id) {
-+ case 1:
-+ shift = 0;
-+ break;
-+ case 2:
-+ shift = 2;
-+ break;
-+ case 4:
-+ shift = 16;
-+ break;
-+ }
-+
-+ if (shift >= 0)
-+ rsnd_mod_bset(mod, SSI_MODE1,
-+ 0x3 << shift,
-+ rsnd_dai_is_clk_master(rdai) ?
-+ 0x2 << shift : 0x1 << shift);
-+ }
-+
-+ return 0;
-+}
-+
- /* Gen1 only */
- static int rsnd_src_set_route_if_gen1(
- struct rsnd_mod *mod,
-@@ -235,6 +275,10 @@ static int rsnd_scu_init(struct rsnd_mod *mod,
-
- clk_enable(scu->clk);
-
-+ ret = rsnd_scu_ssi_mode_init(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
- ret = rsnd_src_set_route_if_gen1(mod, rdai, io);
- if (ret < 0)
- return ret;
-@@ -301,6 +345,7 @@ static struct rsnd_mod_ops rsnd_scu_ops = {
-
- static struct rsnd_mod_ops rsnd_scu_non_ops = {
- .name = "scu (non)",
-+ .init = rsnd_scu_ssi_mode_init,
- };
-
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 68393a9f91bf..0f314db8cb50 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -75,9 +75,6 @@ struct rsnd_ssi {
- };
-
- struct rsnd_ssiu {
-- u32 ssi_mode0;
-- u32 ssi_mode1;
--
- int ssi_nr;
- struct rsnd_ssi *ssi;
- };
-@@ -100,70 +97,6 @@ struct rsnd_ssiu {
- #define rsnd_ssi_to_ssiu(ssi)\
- (((struct rsnd_ssiu *)((ssi) - rsnd_mod_id(&(ssi)->mod))) - 1)
-
--static void rsnd_ssi_mode_set(struct rsnd_priv *priv,
-- struct rsnd_dai *rdai,
-- struct rsnd_ssi *ssi)
--{
-- struct device *dev = rsnd_priv_to_dev(priv);
-- struct rsnd_mod *scu;
-- struct rsnd_ssiu *ssiu = rsnd_ssi_to_ssiu(ssi);
-- int id = rsnd_mod_id(&ssi->mod);
-- u32 flags;
-- u32 val;
--
-- scu = rsnd_scu_mod_get(priv, rsnd_mod_id(&ssi->mod));
--
-- /*
-- * SSI_MODE0
-- */
--
-- /* see also BUSIF_MODE */
-- if (rsnd_scu_hpbif_is_enable(scu)) {
-- ssiu->ssi_mode0 &= ~(1 << id);
-- dev_dbg(dev, "SSI%d uses DEPENDENT mode\n", id);
-- } else {
-- ssiu->ssi_mode0 |= (1 << id);
-- dev_dbg(dev, "SSI%d uses INDEPENDENT mode\n", id);
-- }
--
-- /*
-- * SSI_MODE1
-- */
--#define ssi_parent_set(p, sync, adg, ext) \
-- do { \
-- ssi->parent = ssiu->ssi + p; \
-- if (rsnd_dai_is_clk_master(rdai)) \
-- val = adg; \
-- else \
-- val = ext; \
-- } while (0)
--
-- flags = rsnd_ssi_mode_flags(ssi);
-- if (flags & RSND_SSI_CLK_PIN_SHARE) {
--
-- val = 0;
-- switch (id) {
-- case 1:
-- ssi_parent_set(0, (1 << 4), (0x2 << 0), (0x1 << 0));
-- break;
-- case 2:
-- ssi_parent_set(0, (1 << 4), (0x2 << 2), (0x1 << 2));
-- break;
-- case 4:
-- ssi_parent_set(3, (1 << 20), (0x2 << 16), (0x1 << 16));
-- break;
-- case 8:
-- ssi_parent_set(7, 0, 0, 0);
-- break;
-- }
--
-- ssiu->ssi_mode1 |= val;
-- }
--
-- rsnd_mod_write(&ssi->mod, SSI_MODE0, ssiu->ssi_mode0);
-- rsnd_mod_write(&ssi->mod, SSI_MODE1, ssiu->ssi_mode1);
--}
--
- static void rsnd_ssi_status_check(struct rsnd_mod *mod,
- u32 bit)
- {
-@@ -320,7 +253,6 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- struct rsnd_dai_stream *io)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- u32 cr;
-
-@@ -365,8 +297,6 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- ssi->cr_own = cr;
- ssi->err = -1; /* ignore 1st error */
-
-- rsnd_ssi_mode_set(priv, rdai, ssi);
--
- return 0;
- }
-
-@@ -588,6 +518,32 @@ struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id)
- return &(((struct rsnd_ssiu *)(priv->ssiu))->ssi + id)->mod;
- }
-
-+int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
-+{
-+ struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+
-+ return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_CLK_PIN_SHARE);
-+}
-+
-+static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi)
-+{
-+ if (!rsnd_ssi_is_pin_sharing(&ssi->mod))
-+ return;
-+
-+ switch (rsnd_mod_id(&ssi->mod)) {
-+ case 1:
-+ case 2:
-+ ssi->parent = rsnd_mod_to_ssi(rsnd_ssi_mod_get(priv, 0));
-+ break;
-+ case 4:
-+ ssi->parent = rsnd_mod_to_ssi(rsnd_ssi_mod_get(priv, 3));
-+ break;
-+ case 8:
-+ ssi->parent = rsnd_mod_to_ssi(rsnd_ssi_mod_get(priv, 7));
-+ break;
-+ }
-+}
-+
- int rsnd_ssi_probe(struct platform_device *pdev,
- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
-@@ -668,6 +624,8 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- }
-
- rsnd_mod_init(priv, &ssi->mod, ops, i);
-+
-+ rsnd_ssi_parent_clk_setup(priv, ssi);
- }
-
- dev_dbg(dev, "ssi probed\n");
---
-2.1.2
-
diff --git a/patches.renesas/0027-ASoC-rsnd-remove-ssiu-from-ssi.c.patch b/patches.renesas/0027-ASoC-rsnd-remove-ssiu-from-ssi.c.patch
deleted file mode 100644
index 745ec14b560f1..0000000000000
--- a/patches.renesas/0027-ASoC-rsnd-remove-ssiu-from-ssi.c.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 15589fc6b732809fd7e5dd7ba0b85499a7ec7585 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:39:40 -0800
-Subject: ASoC: rsnd: remove ssiu from ssi.c
-
-Now, SSI_MODE0/1 are controlled under scu.c
-ssiu is no longer needed on ssi.c
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit dd27d808f9e084e7e9c4719c17f17d1fa35c45a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 3 ++-
- sound/soc/sh/rcar/ssi.c | 24 +++++++-----------------
- 2 files changed, 9 insertions(+), 18 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 85b926229b81..e92b1f438f74 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -280,7 +280,8 @@ struct rsnd_priv {
- /*
- * below value will be filled on rsnd_ssi_probe()
- */
-- void *ssiu;
-+ void *ssi;
-+ int ssi_nr;
-
- /*
- * below value will be filled on rsnd_dai_probe()
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 0f314db8cb50..dc72439da58d 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -74,18 +74,13 @@ struct rsnd_ssi {
- unsigned int rate;
- };
-
--struct rsnd_ssiu {
-- int ssi_nr;
-- struct rsnd_ssi *ssi;
--};
--
- #define for_each_rsnd_ssi(pos, priv, i) \
- for (i = 0; \
- (i < rsnd_ssi_nr(priv)) && \
-- ((pos) = ((struct rsnd_ssiu *)((priv)->ssiu))->ssi + i); \
-+ ((pos) = ((struct rsnd_ssi *)(priv)->ssi + i)); \
- i++)
-
--#define rsnd_ssi_nr(priv) (((struct rsnd_ssiu *)((priv)->ssiu))->ssi_nr)
-+#define rsnd_ssi_nr(priv) ((priv)->ssi_nr)
- #define rsnd_mod_to_ssi(_mod) container_of((_mod), struct rsnd_ssi, mod)
- #define rsnd_dma_to_ssi(dma) rsnd_mod_to_ssi(rsnd_dma_to_mod(dma))
- #define rsnd_ssi_pio_available(ssi) ((ssi)->info->pio_irq > 0)
-@@ -94,8 +89,6 @@ struct rsnd_ssiu {
- #define rsnd_ssi_clk_from_parent(ssi) ((ssi)->parent)
- #define rsnd_ssi_mode_flags(p) ((p)->info->flags)
- #define rsnd_ssi_dai_id(ssi) ((ssi)->info->dai_id)
--#define rsnd_ssi_to_ssiu(ssi)\
-- (((struct rsnd_ssiu *)((ssi) - rsnd_mod_id(&(ssi)->mod))) - 1)
-
- static void rsnd_ssi_status_check(struct rsnd_mod *mod,
- u32 bit)
-@@ -515,7 +508,7 @@ struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id)
- if (WARN_ON(id < 0 || id >= rsnd_ssi_nr(priv)))
- id = 0;
-
-- return &(((struct rsnd_ssiu *)(priv->ssiu))->ssi + id)->mod;
-+ return &((struct rsnd_ssi *)(priv->ssi) + id)->mod;
- }
-
- int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
-@@ -552,7 +545,6 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_mod_ops *ops;
- struct clk *clk;
-- struct rsnd_ssiu *ssiu;
- struct rsnd_ssi *ssi;
- char name[RSND_SSI_NAME_SIZE];
- int i, nr, ret;
-@@ -561,16 +553,14 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- * init SSI
- */
- nr = info->ssi_info_nr;
-- ssiu = devm_kzalloc(dev, sizeof(*ssiu) + (sizeof(*ssi) * nr),
-- GFP_KERNEL);
-- if (!ssiu) {
-+ ssi = devm_kzalloc(dev, sizeof(*ssi) * nr, GFP_KERNEL);
-+ if (!ssi) {
- dev_err(dev, "SSI allocate failed\n");
- return -ENOMEM;
- }
-
-- priv->ssiu = ssiu;
-- ssiu->ssi = (struct rsnd_ssi *)(ssiu + 1);
-- ssiu->ssi_nr = nr;
-+ priv->ssi = ssi;
-+ priv->ssi_nr = nr;
-
- for_each_rsnd_ssi(ssi, priv, i) {
- pinfo = &info->ssi_info[i];
---
-2.1.2
-
diff --git a/patches.renesas/0028-ASoC-rsnd-rename-rsnd_scu_convert_rate_ctrl.patch b/patches.renesas/0028-ASoC-rsnd-rename-rsnd_scu_convert_rate_ctrl.patch
deleted file mode 100644
index 103e546290bce..0000000000000
--- a/patches.renesas/0028-ASoC-rsnd-rename-rsnd_scu_convert_rate_ctrl.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 4c373a71fd59e08583ca8e70476d3d1a7862050f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:39:48 -0800
-Subject: ASoC: rsnd: rename rsnd_scu_convert_rate_ctrl()
-
-rsnd_scu_convert_rate_ctrl() is unclear naming,
-and there is "rsnd_scu_convert_rate" variable.
-These are confusable.
-it renamed to rsnd_scu_set_convert_rate()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit f80e1c96339a45992b5dded0474288e52bd3b18d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index ade10474a0cf..872a115cd224 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -190,10 +190,9 @@ unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- return rate;
- }
-
--static int rsnd_scu_convert_rate_ctrl(
-- struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-@@ -283,7 +282,7 @@ static int rsnd_scu_init(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-- ret = rsnd_scu_convert_rate_ctrl(mod, rdai, io);
-+ ret = rsnd_scu_set_convert_rate(mod, rdai, io);
- if (ret < 0)
- return ret;
-
---
-2.1.2
-
diff --git a/patches.renesas/0029-ASoC-rsnd-explain-SRC-bypass-mode-settings-in-commen.patch b/patches.renesas/0029-ASoC-rsnd-explain-SRC-bypass-mode-settings-in-commen.patch
deleted file mode 100644
index 873aac8af0b8c..0000000000000
--- a/patches.renesas/0029-ASoC-rsnd-explain-SRC-bypass-mode-settings-in-commen.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 071ccf09cd95cfa486cab493611cb16b7e144294 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:39:56 -0800
-Subject: ASoC: rsnd: explain SRC bypass mode settings in comment
-
-SRC bypass mode is useful for debugging.
-This patch explains SRC bypass mode settings in comment
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 41c6221c39accdc4fe2b0c0fa196b6302b704e57)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 45 +++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 45 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 872a115cd224..076aa71bc102 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -40,6 +40,51 @@ struct rsnd_scu {
- *
- */
-
-+/*
-+ * How to use SRC bypass mode for debugging
-+ *
-+ * SRC has bypass mode, and it is useful for debugging.
-+ * In Gen2 case,
-+ * SRCm_MODE controls whether SRC is used or not
-+ * SSI_MODE0 controls whether SSIU which receives SRC data
-+ * is used or not.
-+ * Both SRCm_MODE/SSI_MODE0 settings are needed if you use SRC,
-+ * but SRC bypass mode needs SSI_MODE0 only.
-+ *
-+ * This driver request
-+ * struct rsnd_scu_platform_info {
-+ * u32 flags;
-+ * u32 convert_rate;
-+ * }
-+ *
-+ * rsnd_scu_hpbif_is_enable() will be true
-+ * if flags had RSND_SCU_USE_HPBIF,
-+ * and it controls whether SSIU is used or not.
-+ *
-+ * rsnd_scu_convert_rate() indicates
-+ * above convert_rate, and it controls
-+ * whether SRC is used or not.
-+ *
-+ * ex) doesn't use SRC
-+ * struct rsnd_scu_platform_info info = {
-+ * .flags = 0,
-+ * .convert_rate = 0,
-+ * };
-+ *
-+ * ex) uses SRC
-+ * struct rsnd_scu_platform_info info = {
-+ * .flags = RSND_SCU_USE_HPBIF,
-+ * .convert_rate = 48000,
-+ * };
-+ *
-+ * ex) uses SRC bypass mode
-+ * struct rsnd_scu_platform_info info = {
-+ * .flags = RSND_SCU_USE_HPBIF,
-+ * .convert_rate = 0,
-+ * };
-+ *
-+ */
-+
- #define rsnd_mod_to_scu(_mod) \
- container_of((_mod), struct rsnd_scu, mod)
-
---
-2.1.2
-
diff --git a/patches.renesas/0030-ASoC-rsnd-remove-duplicate-priv-from-rsnd_dma.patch b/patches.renesas/0030-ASoC-rsnd-remove-duplicate-priv-from-rsnd_dma.patch
deleted file mode 100644
index 3feec31c94c36..0000000000000
--- a/patches.renesas/0030-ASoC-rsnd-remove-duplicate-priv-from-rsnd_dma.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 5f1876530f98b226d1475d4b3e6d5949ac98896f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:03 -0800
-Subject: ASoC: rsnd: remove duplicate *priv from rsnd_dma
-
-*priv pointer exists under rsnd_mod,
-and, it can get rsnd_mod pointer from rsnd_dma.
-remove duplicate rsnd_dma :: priv
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9b5ab573a81b9ac0df90b74d732651fdf8b24525)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 5 ++---
- sound/soc/sh/rcar/rsnd.h | 1 -
- 2 files changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 743de5e3b1e1..ed8611f9c64f 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -156,7 +156,7 @@ void rsnd_dma_stop(struct rsnd_dma *dma)
- static void rsnd_dma_complete(void *data)
- {
- struct rsnd_dma *dma = (struct rsnd_dma *)data;
-- struct rsnd_priv *priv = dma->priv;
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma));
- unsigned long flags;
-
- rsnd_lock(priv, flags);
-@@ -172,7 +172,7 @@ static void rsnd_dma_complete(void *data)
- static void rsnd_dma_do_work(struct work_struct *work)
- {
- struct rsnd_dma *dma = container_of(work, struct rsnd_dma, work);
-- struct rsnd_priv *priv = dma->priv;
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma));
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_async_tx_descriptor *desc;
- dma_addr_t buf;
-@@ -246,7 +246,6 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- goto rsnd_dma_init_err;
-
- dma->dir = is_play ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
-- dma->priv = priv;
- dma->inquiry = inquiry;
- dma->complete = complete;
- INIT_WORK(&dma->work, rsnd_dma_do_work);
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index e92b1f438f74..33c01fb9f5fd 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -96,7 +96,6 @@ void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg,
- * R-Car DMA
- */
- struct rsnd_dma {
-- struct rsnd_priv *priv;
- struct sh_dmae_slave slave;
- struct work_struct work;
- struct dma_chan *chan;
---
-2.1.2
-
diff --git a/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch b/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch
deleted file mode 100644
index 65bf2d5bf4021..0000000000000
--- a/patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From ac052396d2d048f0737bace5471c33267d4dd0af Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:13 -0800
-Subject: ASoC: rsnd: non 0 is error on probe
-
-Some xxx_probe() returns not only -Exx, but also PTR_ERR().
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 106d2eff563b2abdb34872cb8ec7b19766edaffc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -736,23 +736,23 @@ static int rsnd_probe(struct platform_de
- * init each module
- */
- ret = rsnd_gen_probe(pdev, info, priv);
-- if (ret < 0)
-+ if (ret)
- return ret;
-
- ret = rsnd_scu_probe(pdev, info, priv);
-- if (ret < 0)
-+ if (ret)
- return ret;
-
- ret = rsnd_adg_probe(pdev, info, priv);
-- if (ret < 0)
-+ if (ret)
- return ret;
-
- ret = rsnd_ssi_probe(pdev, info, priv);
-- if (ret < 0)
-+ if (ret)
- return ret;
-
- ret = rsnd_dai_probe(pdev, info, priv);
-- if (ret < 0)
-+ if (ret)
- return ret;
-
- /*
diff --git a/patches.renesas/0032-ASoC-rsnd-fixup-Gen2-module-naming.patch b/patches.renesas/0032-ASoC-rsnd-fixup-Gen2-module-naming.patch
deleted file mode 100644
index d6e85149a4612..0000000000000
--- a/patches.renesas/0032-ASoC-rsnd-fixup-Gen2-module-naming.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From daddccac8880ad7241917463983fca5a9eb39512 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:20 -0800
-Subject: ASoC: rsnd: fixup Gen2 module naming
-
-Gen2 has SCU, not SRU
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 64de62b38641dec05905930024133726c540040e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index cbdbbfa322b8..76828c20fb50 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -283,7 +283,7 @@ static int rsnd_gen2_probe(struct platform_device *pdev,
- return ret;
-
- dev_dbg(dev, "Gen2 device probed\n");
-- dev_dbg(dev, "SRU : %08x => %p\n", scu_res->start,
-+ dev_dbg(dev, "SCU : %08x => %p\n", scu_res->start,
- gen->base[RSND_GEN2_SCU]);
- dev_dbg(dev, "ADG : %08x => %p\n", adg_res->start,
- gen->base[RSND_GEN2_ADG]);
---
-2.1.2
-
diff --git a/patches.renesas/0033-ASoC-rsnd-don-t-use-schedule_work-when-rsnd_dma_star.patch b/patches.renesas/0033-ASoC-rsnd-don-t-use-schedule_work-when-rsnd_dma_star.patch
deleted file mode 100644
index 7b8881f5604fe..0000000000000
--- a/patches.renesas/0033-ASoC-rsnd-don-t-use-schedule_work-when-rsnd_dma_star.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 4a24a5f5cab4e1f170c8ced6e375579903cd2c7f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:27 -0800
-Subject: ASoC: rsnd: don't use schedule_work() when rsnd_dma_start()
-
-rsnd_dma_start() is the function to start DMAEngine.
-Current code is using schedule_work() for it,
-but it breaks DMAC/SSI register setting timing.
-Don't use schedule_work() on it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit f5cab3b8976d59c6166228874a5af3d87c94c723)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 13 ++++++++++---
- 1 file changed, 10 insertions(+), 3 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 4fd57351c54a..11eb0e35b9ce 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -132,6 +132,7 @@ void rsnd_mod_init(struct rsnd_priv *priv,
- /*
- * rsnd_dma functions
- */
-+static void __rsnd_dma_start(struct rsnd_dma *dma);
- static void rsnd_dma_continue(struct rsnd_dma *dma)
- {
- /* push next A or B plane */
-@@ -143,7 +144,7 @@ void rsnd_dma_start(struct rsnd_dma *dma)
- {
- /* push both A and B plane*/
- dma->submit_loop = 2;
-- schedule_work(&dma->work);
-+ __rsnd_dma_start(dma);
- }
-
- void rsnd_dma_stop(struct rsnd_dma *dma)
-@@ -169,9 +170,8 @@ static void rsnd_dma_complete(void *data)
- rsnd_unlock(priv, flags);
- }
-
--static void rsnd_dma_do_work(struct work_struct *work)
-+static void __rsnd_dma_start(struct rsnd_dma *dma)
- {
-- struct rsnd_dma *dma = container_of(work, struct rsnd_dma, work);
- struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma));
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_async_tx_descriptor *desc;
-@@ -204,6 +204,13 @@ static void rsnd_dma_do_work(struct work_struct *work)
- }
- }
-
-+static void rsnd_dma_do_work(struct work_struct *work)
-+{
-+ struct rsnd_dma *dma = container_of(work, struct rsnd_dma, work);
-+
-+ __rsnd_dma_start(dma);
-+}
-+
- int rsnd_dma_available(struct rsnd_dma *dma)
- {
- return !!dma->chan;
---
-2.1.2
-
diff --git a/patches.renesas/0034-ASoC-rsnd-SCU-should-be-called-before-SSI.patch b/patches.renesas/0034-ASoC-rsnd-SCU-should-be-called-before-SSI.patch
deleted file mode 100644
index 6a062559ec8cd..0000000000000
--- a/patches.renesas/0034-ASoC-rsnd-SCU-should-be-called-before-SSI.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a90d8fa2564da6fc05815a6e74836290183fd505 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:34 -0800
-Subject: ASoC: rsnd: SCU should be called before SSI
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit be213ac1af893410eb8256010edf136b4099e827)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 76828c20fb50..db486aae6b8b 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -182,14 +182,14 @@ int rsnd_gen_path_init(struct rsnd_priv *priv,
- rsnd_dai_is_play(rdai, io));
- id = rsnd_mod_id(mod);
-
-- /* SSI */
-- mod = rsnd_ssi_mod_get(priv, id);
-+ /* SCU */
-+ mod = rsnd_scu_mod_get(priv, id);
- ret = rsnd_dai_connect(rdai, mod, io);
- if (ret < 0)
- return ret;
-
-- /* SCU */
-- mod = rsnd_scu_mod_get(priv, id);
-+ /* SSI */
-+ mod = rsnd_ssi_mod_get(priv, id);
- ret = rsnd_dai_connect(rdai, mod, io);
-
- return ret;
---
-2.1.2
-
diff --git a/patches.renesas/0035-ASoC-rsnd-clarify-scu.c-area.patch b/patches.renesas/0035-ASoC-rsnd-clarify-scu.c-area.patch
deleted file mode 100644
index a9a712cfcad15..0000000000000
--- a/patches.renesas/0035-ASoC-rsnd-clarify-scu.c-area.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 16bb4732b1468feb8aa080b0ffe232257eb673ff Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:41 -0800
-Subject: ASoC: rsnd: clarify scu.c area
-
-scu.c cares SRU(Gen1) / SCU(Gen2) / SSIU(Gen2)
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c926b746055adfd915936c67244e635e9c7a3d84)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 076aa71bc102..1adc85825f4e 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -41,6 +41,20 @@ struct rsnd_scu {
- */
-
- /*
-+ * scu.c is caring...
-+ *
-+ * Gen1
-+ *
-+ * [mem] -> [SRU] -> [SSI]
-+ * |--------|
-+ *
-+ * Gen2
-+ *
-+ * [mem] -> [SCU] -> [SSIU] -> [SSI]
-+ * |-----------------|
-+ */
-+
-+/*
- * How to use SRC bypass mode for debugging
- *
- * SRC has bypass mode, and it is useful for debugging.
---
-2.1.2
-
diff --git a/patches.renesas/0036-ASoC-rsnd-Merge-macros-in-scu.c.patch b/patches.renesas/0036-ASoC-rsnd-Merge-macros-in-scu.c.patch
deleted file mode 100644
index 8aa965d864954..0000000000000
--- a/patches.renesas/0036-ASoC-rsnd-Merge-macros-in-scu.c.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From baa79efb1f633bef236d9c820ad743091244cd55 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:47 -0800
-Subject: ASoC: rsnd: Merge macros in scu.c
-
-Merge #define lines, since these are defined
-in the scattering place
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 39cf3c4064b8db25efe501fec8e3c48a578b4b58)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 24 ++++++++++++------------
- 1 file changed, 12 insertions(+), 12 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 1adc85825f4e..8181ec55ad21 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -16,9 +16,6 @@ struct rsnd_scu {
- struct clk *clk;
- };
-
--#define rsnd_scu_mode_flags(p) ((p)->info->flags)
--#define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
--
- #define RSND_SCU_NAME_SIZE 16
-
- /*
-@@ -30,6 +27,18 @@ struct rsnd_scu {
- #define OTBL_18 (6 << 16)
- #define OTBL_16 (8 << 16)
-
-+#define rsnd_scu_mode_flags(p) ((p)->info->flags)
-+#define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
-+#define rsnd_mod_to_scu(_mod) \
-+ container_of((_mod), struct rsnd_scu, mod)
-+
-+#define for_each_rsnd_scu(pos, priv, i) \
-+ for ((i) = 0; \
-+ ((i) < rsnd_scu_nr(priv)) && \
-+ ((pos) = (struct rsnd_scu *)(priv)->scu + i); \
-+ i++)
-+
-+
- /*
- * image of SRC (Sampling Rate Converter)
- *
-@@ -99,15 +108,6 @@ struct rsnd_scu {
- *
- */
-
--#define rsnd_mod_to_scu(_mod) \
-- container_of((_mod), struct rsnd_scu, mod)
--
--#define for_each_rsnd_scu(pos, priv, i) \
-- for ((i) = 0; \
-- ((i) < rsnd_scu_nr(priv)) && \
-- ((pos) = (struct rsnd_scu *)(priv)->scu + i); \
-- i++)
--
- static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
---
-2.1.2
-
diff --git a/patches.renesas/0037-ASoC-rsnd-rsnd_scu_hpbif_is_enable-become-macro.patch b/patches.renesas/0037-ASoC-rsnd-rsnd_scu_hpbif_is_enable-become-macro.patch
deleted file mode 100644
index b2260293f37b7..0000000000000
--- a/patches.renesas/0037-ASoC-rsnd-rsnd_scu_hpbif_is_enable-become-macro.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 3e8a5317ed44bde97263b5de32d3e8578ec403d0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:40:54 -0800
-Subject: ASoC: rsnd: rsnd_scu_hpbif_is_enable() become macro
-
-rsnd_scu_hpbif_is_enable() is used only scu.c now.
-It can be local macro
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 96c7c0d6f8c6e09e9123f0518130c047c5de40f6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 1 -
- sound/soc/sh/rcar/scu.c | 15 +++++----------
- 2 files changed, 5 insertions(+), 11 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 33c01fb9f5fd..a9c58305e2f1 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -303,7 +303,6 @@ int rsnd_scu_probe(struct platform_device *pdev,
- void rsnd_scu_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
--bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod);
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_mod *ssi_mod,
- struct snd_pcm_runtime *runtime);
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 8181ec55ad21..2f839f72c99c 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -31,6 +31,8 @@ struct rsnd_scu {
- #define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
- #define rsnd_mod_to_scu(_mod) \
- container_of((_mod), struct rsnd_scu, mod)
-+#define rsnd_scu_hpbif_is_enable(scu) \
-+ (rsnd_scu_mode_flags(scu) & RSND_SCU_USE_HPBIF)
-
- #define for_each_rsnd_scu(pos, priv, i) \
- for ((i) = 0; \
-@@ -113,13 +115,14 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- struct rsnd_dai_stream *io)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- int id = rsnd_mod_id(mod);
-
- /*
- * SSI_MODE0
- */
- rsnd_mod_bset(mod, SSI_MODE0, (1 << id),
-- rsnd_scu_hpbif_is_enable(mod) ? 0 : (1 << id));
-+ rsnd_scu_hpbif_is_enable(scu) ? 0 : (1 << id));
-
- /*
- * SSI_MODE1
-@@ -316,14 +319,6 @@ static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
- return 0;
- }
-
--bool rsnd_scu_hpbif_is_enable(struct rsnd_mod *mod)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- u32 flags = rsnd_scu_mode_flags(scu);
--
-- return !!(flags & RSND_SCU_USE_HPBIF);
--}
--
- static int rsnd_scu_init(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -449,7 +444,7 @@ int rsnd_scu_probe(struct platform_device *pdev,
- scu->clk = clk;
-
- ops = &rsnd_scu_non_ops;
-- if (rsnd_scu_hpbif_is_enable(&scu->mod))
-+ if (rsnd_scu_hpbif_is_enable(scu))
- ops = &rsnd_scu_ops;
-
- rsnd_mod_init(priv, &scu->mod, ops, i);
---
-2.1.2
-
diff --git a/patches.renesas/0038-ASoC-rsnd-merge-SRC-clock-timing-setting.patch b/patches.renesas/0038-ASoC-rsnd-merge-SRC-clock-timing-setting.patch
deleted file mode 100644
index fd60f45938132..0000000000000
--- a/patches.renesas/0038-ASoC-rsnd-merge-SRC-clock-timing-setting.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-From 0a1192000a62c95652af288c7f29e5249eb450f0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:41:10 -0800
-Subject: ASoC: rsnd: merge SRC clock timing/setting
-
-SRC clock and timing setting register
-exist in SRU and ADG on Gen1.
-But, these are merged into ADG on Gen2.
-Current driver is supporting Gen1 SRC only
-at this point, but, above settings are
-set as different function.
-This patch merges these as preparation of Gen2 support.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 28dc4b63cdb96f2448a677320fcc0eb112e13e3f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 20 ++++----------------
- sound/soc/sh/rcar/rsnd.h | 8 ++++----
- sound/soc/sh/rcar/scu.c | 48 +++++++++++++++++++++++++++++++++++-------------
- 3 files changed, 43 insertions(+), 33 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index a53235c4d1b0..5bdffa480245 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -30,10 +30,10 @@ struct rsnd_adg {
- i++, (pos) = adg->clk[i])
- #define rsnd_priv_to_adg(priv) ((struct rsnd_adg *)(priv)->adg)
-
--static int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
-- struct rsnd_mod *mod,
-- unsigned int src_rate,
-- unsigned int dst_rate)
-+int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
-+ struct rsnd_mod *mod,
-+ unsigned int src_rate,
-+ unsigned int dst_rate)
- {
- struct rsnd_adg *adg = rsnd_priv_to_adg(priv);
- struct device *dev = rsnd_priv_to_dev(priv);
-@@ -91,18 +91,6 @@ find_rate:
- return 0;
- }
-
--int rsnd_adg_set_convert_clk(struct rsnd_priv *priv,
-- struct rsnd_mod *mod,
-- unsigned int src_rate,
-- unsigned int dst_rate)
--{
-- if (rsnd_is_gen1(priv))
-- return rsnd_adg_set_convert_clk_gen1(priv, mod,
-- src_rate, dst_rate);
--
-- return -EINVAL;
--}
--
- static void rsnd_adg_set_ssi_clk(struct rsnd_mod *mod, u32 val)
- {
- int id = rsnd_mod_id(mod);
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index a9c58305e2f1..39914558e857 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -246,10 +246,10 @@ int rsnd_adg_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
- void rsnd_adg_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
--int rsnd_adg_set_convert_clk(struct rsnd_priv *priv,
-- struct rsnd_mod *mod,
-- unsigned int src_rate,
-- unsigned int dst_rate);
-+int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
-+ struct rsnd_mod *mod,
-+ unsigned int src_rate,
-+ unsigned int dst_rate);
-
- /*
- * R-Car sound priv
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 2f839f72c99c..e2ffcc415057 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -172,10 +172,8 @@ static int rsnd_src_set_route_if_gen1(
- { 0x3, 30, }, /* 8 */
- };
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- u32 mask;
- u32 val;
-- int shift;
- int id;
-
- /*
-@@ -197,6 +195,23 @@ static int rsnd_src_set_route_if_gen1(
-
- rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val);
-
-+ return 0;
-+}
-+
-+static int rsnd_scu_set_convert_timing_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ u32 convert_rate = rsnd_scu_convert_rate(scu);
-+ u32 mask;
-+ u32 val;
-+ int shift;
-+ int id = rsnd_mod_id(mod);
-+ int ret;
-+
- /*
- * SRC_TIMING_SELECT
- */
-@@ -209,12 +224,23 @@ static int rsnd_src_set_route_if_gen1(
- * SSI WS is used as source clock if SRC is not used
- * (when playback, source/destination become reverse when capture)
- */
-- if (rsnd_scu_convert_rate(scu)) /* use ADG */
-+ ret = 0;
-+ if (convert_rate) {
-+ /* use ADG */
- val = 0;
-- else if (8 == id) /* use SSI WS, but SRU8 is special */
-+ ret = rsnd_adg_set_convert_clk_gen1(priv, mod,
-+ runtime->rate,
-+ convert_rate);
-+ } else if (8 == id) {
-+ /* use SSI WS, but SRU8 is special */
- val = id << shift;
-- else /* use SSI WS */
-+ } else {
-+ /* use SSI WS */
- val = (id + 1) << shift;
-+ }
-+
-+ if (ret < 0)
-+ return ret;
-
- switch (id / 4) {
- case 0:
-@@ -284,7 +310,6 @@ static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
-
- if (convert_rate) {
- u32 fsrate = 0x0400000 / convert_rate * runtime->rate;
-- int ret;
-
- /* Enable the initial value of IFS */
- rsnd_mod_write(mod, SRC_IFSCR, 1);
-@@ -301,13 +326,6 @@ static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
- if (rsnd_is_gen1(priv)) {
- /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
- }
--
-- /* set convert clock */
-- ret = rsnd_adg_set_convert_clk(priv, mod,
-- runtime->rate,
-- convert_rate);
-- if (ret < 0)
-- return ret;
- }
-
- /* Cancel the initialization and operate the SRC function */
-@@ -340,6 +358,10 @@ static int rsnd_scu_init(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-+ ret = rsnd_scu_set_convert_timing_gen1(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0039-ASoC-rsnd-add-rsnd_ssi_is_play.patch b/patches.renesas/0039-ASoC-rsnd-add-rsnd_ssi_is_play.patch
deleted file mode 100644
index bc3249b0bf0e8..0000000000000
--- a/patches.renesas/0039-ASoC-rsnd-add-rsnd_ssi_is_play.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 6d5caf063ad0b3e1040350212705d24f056d6939 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:41:17 -0800
-Subject: ASoC: rsnd: add rsnd_ssi_is_play()
-
-SCU needs SSI direction if Gen2.
-Add rsnd_ssi_is_play() function for it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 32f27ebf9b625df610c12408ea15bae37be75eaf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 1 +
- sound/soc/sh/rcar/ssi.c | 11 +++++++++--
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 39914558e857..b1874eb71436 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -321,5 +321,6 @@ struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
- struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
- int dai_id, int is_play);
- int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
-+int rsnd_ssi_is_play(struct rsnd_mod *mod);
-
- #endif
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index dc72439da58d..bae309c9f0fb 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -494,7 +494,7 @@ struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
- if (rsnd_ssi_dai_id(ssi) != dai_id)
- continue;
-
-- has_play = !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_PLAY);
-+ has_play = rsnd_ssi_is_play(&ssi->mod);
-
- if (is_play == has_play)
- return &ssi->mod;
-@@ -518,6 +518,13 @@ int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
- return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_CLK_PIN_SHARE);
- }
-
-+int rsnd_ssi_is_play(struct rsnd_mod *mod)
-+{
-+ struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+
-+ return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_PLAY);
-+}
-+
- static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi)
- {
- if (!rsnd_ssi_is_pin_sharing(&ssi->mod))
-@@ -582,7 +589,7 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- if (pinfo->dma_id > 0) {
- ret = rsnd_dma_init(
- priv, rsnd_mod_to_dma(&ssi->mod),
-- (rsnd_ssi_mode_flags(ssi) & RSND_SSI_PLAY),
-+ rsnd_ssi_is_play(&ssi->mod),
- pinfo->dma_id,
- rsnd_ssi_dma_inquiry,
- rsnd_ssi_dma_complete);
---
-2.1.2
-
diff --git a/patches.renesas/0040-ASoC-rsnd-extracts-Gen1-Gen2-common-parts.patch b/patches.renesas/0040-ASoC-rsnd-extracts-Gen1-Gen2-common-parts.patch
deleted file mode 100644
index bc49d0b8dfdc3..0000000000000
--- a/patches.renesas/0040-ASoC-rsnd-extracts-Gen1-Gen2-common-parts.patch
+++ /dev/null
@@ -1,482 +0,0 @@
-From e055532069fb171e266999873458ac552e718a26 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:41:36 -0800
-Subject: ASoC: rsnd: extracts Gen1/Gen2 common parts
-
-Renesas sound IP Gen1/Gen2 are similar, but different.
-This patch extracts Gen1/Gen2 common and dependency parts,
-and create Gen1/Gen2 ops to control it.
-
-According to this structure, SSIU setup which
-has been implemented on ssi.c can be moved to scu.c
-(SRU/SSIU/SCU should be implemented on scu.c)
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 1b7b08efbe7419cc3e082f2b5ec8ae89f7af43d1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 2 +-
- sound/soc/sh/rcar/scu.c | 336 ++++++++++++++++++++++++++++-------------------
- sound/soc/sh/rcar/ssi.c | 5 -
- 3 files changed, 205 insertions(+), 138 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index b1874eb71436..c397dc8edee5 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -48,7 +48,7 @@ enum rsnd_reg {
- RSND_REG_SRC_IFSCR,
- RSND_REG_SRC_IFSVR,
- RSND_REG_SRC_SRCCR,
-- RSND_REG_SRC_MNFSR,
-+ RSND_REG_SRC_MNFSR, /* for Gen1 */
-
- /* ADG */
- RSND_REG_BRRA,
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index e2ffcc415057..29d8990e3f0f 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -110,6 +110,9 @@ struct rsnd_scu {
- *
- */
-
-+/*
-+ * Gen1/Gen2 common functions
-+ */
- static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -151,11 +154,145 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- return 0;
- }
-
--/* Gen1 only */
--static int rsnd_src_set_route_if_gen1(
-- struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
-+ struct rsnd_mod *ssi_mod,
-+ struct snd_pcm_runtime *runtime)
-+{
-+ struct rsnd_scu *scu;
-+ unsigned int rate;
-+
-+ /* this function is assuming SSI id = SCU id here */
-+ scu = rsnd_mod_to_scu(rsnd_scu_mod_get(priv, rsnd_mod_id(ssi_mod)));
-+
-+ /*
-+ * return convert rate if SRC is used,
-+ * otherwise, return runtime->rate as usual
-+ */
-+ rate = rsnd_scu_convert_rate(scu);
-+ if (!rate)
-+ rate = runtime->rate;
-+
-+ return rate;
-+}
-+
-+static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ u32 convert_rate = rsnd_scu_convert_rate(scu);
-+ u32 adinr = runtime->channels;
-+ u32 fsrate = 0;
-+
-+ if (convert_rate)
-+ fsrate = 0x0400000 / convert_rate * runtime->rate;
-+
-+ /* set/clear soft reset */
-+ rsnd_mod_write(mod, SRC_SWRSR, 0);
-+ rsnd_mod_write(mod, SRC_SWRSR, 1);
-+
-+ /*
-+ * Initialize the operation of the SRC internal circuits
-+ * see rsnd_scu_start()
-+ */
-+ rsnd_mod_write(mod, SRC_SRCIR, 1);
-+
-+ /* Set channel number and output bit length */
-+ switch (runtime->sample_bits) {
-+ case 16:
-+ adinr |= OTBL_16;
-+ break;
-+ case 32:
-+ adinr |= OTBL_24;
-+ break;
-+ default:
-+ return -EIO;
-+ }
-+ rsnd_mod_write(mod, SRC_ADINR, adinr);
-+
-+ /* Enable the initial value of IFS */
-+ if (fsrate) {
-+ rsnd_mod_write(mod, SRC_IFSCR, 1);
-+
-+ /* Set initial value of IFS */
-+ rsnd_mod_write(mod, SRC_IFSVR, fsrate);
-+ }
-+
-+ /* use DMA transfer */
-+ rsnd_mod_write(mod, SRC_BUSIF_MODE, 1);
-+
-+ return 0;
-+}
-+
-+static int rsnd_scu_init(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ int ret;
-+
-+ clk_enable(scu->clk);
-+
-+ ret = rsnd_scu_ssi_mode_init(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ return 0;
-+}
-+
-+static int rsnd_scu_quit(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ clk_disable(scu->clk);
-+
-+ return 0;
-+}
-+
-+static int rsnd_scu_start(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ /*
-+ * Cancel the initialization and operate the SRC function
-+ * see rsnd_scu_set_convert_rate()
-+ */
-+ rsnd_mod_write(mod, SRC_SRCIR, 0);
-+
-+ if (rsnd_scu_convert_rate(scu))
-+ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
-+
-+ return 0;
-+}
-+
-+
-+static int rsnd_scu_stop(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ if (rsnd_scu_convert_rate(scu))
-+ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
-+
-+ return 0;
-+}
-+
-+static struct rsnd_mod_ops rsnd_scu_non_ops = {
-+ .name = "scu (non)",
-+};
-+
-+/*
-+ * Gen1 functions
-+ */
-+static int rsnd_src_set_route_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
- struct scu_route_config {
- u32 mask;
-@@ -171,17 +308,10 @@ static int rsnd_src_set_route_if_gen1(
- { 0x3, 28, }, /* 7 */
- { 0x3, 30, }, /* 8 */
- };
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- u32 mask;
- u32 val;
- int id;
-
-- /*
-- * Gen1 only
-- */
-- if (!rsnd_is_gen1(priv))
-- return 0;
--
- id = rsnd_mod_id(mod);
- if (id < 0 || id >= ARRAY_SIZE(routes))
- return -EIO;
-@@ -257,104 +387,43 @@ static int rsnd_scu_set_convert_timing_gen1(struct rsnd_mod *mod,
- return 0;
- }
-
--unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
-- struct rsnd_mod *ssi_mod,
-- struct snd_pcm_runtime *runtime)
--{
-- struct rsnd_scu *scu;
-- unsigned int rate;
--
-- /* this function is assuming SSI id = SCU id here */
-- scu = rsnd_mod_to_scu(rsnd_scu_mod_get(priv, rsnd_mod_id(ssi_mod)));
--
-- /*
-- * return convert rate if SRC is used,
-- * otherwise, return runtime->rate as usual
-- */
-- rate = rsnd_scu_convert_rate(scu);
-- if (!rate)
-- rate = runtime->rate;
--
-- return rate;
--}
--
--static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+static int rsnd_scu_set_convert_rate_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- u32 convert_rate = rsnd_scu_convert_rate(scu);
-- u32 adinr = runtime->channels;
--
-- /* set/clear soft reset */
-- rsnd_mod_write(mod, SRC_SWRSR, 0);
-- rsnd_mod_write(mod, SRC_SWRSR, 1);
--
-- /* Initialize the operation of the SRC internal circuits */
-- rsnd_mod_write(mod, SRC_SRCIR, 1);
--
-- /* Set channel number and output bit length */
-- switch (runtime->sample_bits) {
-- case 16:
-- adinr |= OTBL_16;
-- break;
-- case 32:
-- adinr |= OTBL_24;
-- break;
-- default:
-- return -EIO;
-- }
-- rsnd_mod_write(mod, SRC_ADINR, adinr);
--
-- if (convert_rate) {
-- u32 fsrate = 0x0400000 / convert_rate * runtime->rate;
--
-- /* Enable the initial value of IFS */
-- rsnd_mod_write(mod, SRC_IFSCR, 1);
--
-- /* Set initial value of IFS */
-- rsnd_mod_write(mod, SRC_IFSVR, fsrate);
--
-- /* Select SRC mode (fixed value) */
-- rsnd_mod_write(mod, SRC_SRCCR, 0x00010110);
-+ int ret;
-
-- /* Set the restriction value of the FS ratio (98%) */
-- rsnd_mod_write(mod, SRC_MNFSR, fsrate / 100 * 98);
-+ ret = rsnd_scu_set_convert_rate(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-
-- if (rsnd_is_gen1(priv)) {
-- /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
-- }
-- }
-+ /* Select SRC mode (fixed value) */
-+ rsnd_mod_write(mod, SRC_SRCCR, 0x00010110);
-
-- /* Cancel the initialization and operate the SRC function */
-- rsnd_mod_write(mod, SRC_SRCIR, 0);
-+ /* Set the restriction value of the FS ratio (98%) */
-+ rsnd_mod_write(mod, SRC_MNFSR,
-+ rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98);
-
-- /* use DMA transfer */
-- rsnd_mod_write(mod, SRC_BUSIF_MODE, 1);
-+ /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
-
- return 0;
- }
-
--static int rsnd_scu_init(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+static int rsnd_scu_init_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- int ret;
-
-- clk_enable(scu->clk);
--
-- ret = rsnd_scu_ssi_mode_init(mod, rdai, io);
-+ ret = rsnd_scu_init(mod, rdai, io);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_src_set_route_if_gen1(mod, rdai, io);
-+ ret = rsnd_src_set_route_gen1(mod, rdai, io);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_scu_set_convert_rate(mod, rdai, io);
-+ ret = rsnd_scu_set_convert_rate_gen1(mod, rdai, io);
- if (ret < 0)
- return ret;
-
-@@ -365,62 +434,58 @@ static int rsnd_scu_init(struct rsnd_mod *mod,
- return 0;
- }
-
--static int rsnd_scu_quit(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+static int rsnd_scu_start_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ int id = rsnd_mod_id(mod);
-
-- clk_disable(scu->clk);
-+ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
-
-- return 0;
-+ return rsnd_scu_start(mod, rdai, io);
- }
-
--static int rsnd_scu_start(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+static int rsnd_scu_stop_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- int id = rsnd_mod_id(mod);
-
-- if (rsnd_is_gen1(priv))
-- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
--
-- if (rsnd_scu_convert_rate(scu))
-- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
-+ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
-
-- return 0;
-+ return rsnd_scu_stop(mod, rdai, io);
- }
-
--static int rsnd_scu_stop(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- int id = rsnd_mod_id(mod);
-+static struct rsnd_mod_ops rsnd_scu_gen1_ops = {
-+ .name = "sru (gen1)",
-+ .init = rsnd_scu_init_gen1,
-+ .quit = rsnd_scu_quit,
-+ .start = rsnd_scu_start_gen1,
-+ .stop = rsnd_scu_stop_gen1,
-+};
-
-- if (rsnd_is_gen1(priv))
-- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
-+static struct rsnd_mod_ops rsnd_scu_non_gen1_ops = {
-+ .name = "non-sru (gen1)",
-+ .init = rsnd_scu_ssi_mode_init,
-+};
-
-- if (rsnd_scu_convert_rate(scu))
-- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
-+/*
-+ * Gen2 functions
-+ */
-+static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ /* enable PIO interrupt */
-+ rsnd_mod_write(mod, INT_ENABLE, 0x0f000000);
-
- return 0;
- }
-
--static struct rsnd_mod_ops rsnd_scu_ops = {
-- .name = "scu",
-- .init = rsnd_scu_init,
-- .quit = rsnd_scu_quit,
-- .start = rsnd_scu_start,
-- .stop = rsnd_scu_stop,
--};
--
--static struct rsnd_mod_ops rsnd_scu_non_ops = {
-- .name = "scu (non)",
-+static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = {
-+ .name = "non-scu (gen2)",
- .init = rsnd_scu_ssi_mode_init,
-+ .start = rsnd_scu_start_non_gen2,
- };
-
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
-@@ -466,8 +531,15 @@ int rsnd_scu_probe(struct platform_device *pdev,
- scu->clk = clk;
-
- ops = &rsnd_scu_non_ops;
-- if (rsnd_scu_hpbif_is_enable(scu))
-- ops = &rsnd_scu_ops;
-+ if (rsnd_scu_hpbif_is_enable(scu)) {
-+ if (rsnd_is_gen1(priv))
-+ ops = &rsnd_scu_gen1_ops;
-+ } else {
-+ if (rsnd_is_gen1(priv))
-+ ops = &rsnd_scu_non_gen1_ops;
-+ if (rsnd_is_gen2(priv))
-+ ops = &rsnd_scu_non_gen2_ops;
-+ }
-
- rsnd_mod_init(priv, &scu->mod, ops, i);
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index bae309c9f0fb..b7f464ebcdc0 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -363,16 +363,11 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-
- /* enable PIO IRQ */
- ssi->cr_etc = UIEN | OIEN | DIEN;
-
-- /* enable PIO interrupt if gen2 */
-- if (rsnd_is_gen2(priv))
-- rsnd_mod_write(&ssi->mod, INT_ENABLE, 0x0f000000);
--
- rsnd_ssi_hw_start(ssi, rdai, io);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0041-ASoC-rsnd-remove-SSI-dependent-DMAEngine-callback.patch b/patches.renesas/0041-ASoC-rsnd-remove-SSI-dependent-DMAEngine-callback.patch
deleted file mode 100644
index 85b932fceb45e..0000000000000
--- a/patches.renesas/0041-ASoC-rsnd-remove-SSI-dependent-DMAEngine-callback.patch
+++ /dev/null
@@ -1,294 +0,0 @@
-From 61b2df02c0b40d872eeb1e70c8569653e285f4b6 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:41:44 -0800
-Subject: ASoC: rsnd: remove SSI dependent DMAEngine callback
-
-Renesas Gen2 sound will use 2 DMAC
-which are Audio-DMAC, and Audio-DMAC-peri-peri.
-Current driver has callback function for each DMAC,
-because it assumed each DMAC needs special settings.
-But it became clear that these can share settings.
-This patch removes unnecessary callback
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 4686a0ad9aaee89495f181e5755d153e7fe7ffe6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 38 +++++++++++++++++++++++++++-----------
- sound/soc/sh/rcar/rsnd.h | 10 +++++-----
- sound/soc/sh/rcar/ssi.c | 47 ++++++++---------------------------------------
- 3 files changed, 40 insertions(+), 55 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 11eb0e35b9ce..b5af6f5145ea 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -143,6 +143,7 @@ static void rsnd_dma_continue(struct rsnd_dma *dma)
- void rsnd_dma_start(struct rsnd_dma *dma)
- {
- /* push both A and B plane*/
-+ dma->offset = 0;
- dma->submit_loop = 2;
- __rsnd_dma_start(dma);
- }
-@@ -157,12 +158,26 @@ void rsnd_dma_stop(struct rsnd_dma *dma)
- static void rsnd_dma_complete(void *data)
- {
- struct rsnd_dma *dma = (struct rsnd_dma *)data;
-+ struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
- struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma));
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- unsigned long flags;
-
- rsnd_lock(priv, flags);
-
-- dma->complete(dma);
-+ /*
-+ * Renesas sound Gen1 needs 1 DMAC,
-+ * Gen2 needs 2 DMAC.
-+ * In Gen2 case, it are Audio-DMAC, and Audio-DMAC-peri-peri.
-+ * But, Audio-DMAC-peri-peri doesn't have interrupt,
-+ * and this driver is assuming that here.
-+ *
-+ * If Audio-DMAC-peri-peri has interrpt,
-+ * rsnd_dai_pointer_update() will be called twice,
-+ * ant it will breaks io->byte_pos
-+ */
-+
-+ rsnd_dai_pointer_update(io, io->byte_per_period);
-
- if (dma->submit_loop)
- rsnd_dma_continue(dma);
-@@ -172,17 +187,21 @@ static void rsnd_dma_complete(void *data)
-
- static void __rsnd_dma_start(struct rsnd_dma *dma)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma));
-+ struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_async_tx_descriptor *desc;
- dma_addr_t buf;
-- size_t len;
-+ size_t len = io->byte_per_period;
- int i;
-
- for (i = 0; i < dma->submit_loop; i++) {
-
-- if (dma->inquiry(dma, &buf, &len) < 0)
-- return;
-+ buf = runtime->dma_addr +
-+ rsnd_dai_pointer_offset(io, dma->offset + len);
-+ dma->offset = len;
-
- desc = dmaengine_prep_slave_single(
- dma->chan, buf, len, dma->dir,
-@@ -217,10 +236,7 @@ int rsnd_dma_available(struct rsnd_dma *dma)
- }
-
- int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
-- int is_play, int id,
-- int (*inquiry)(struct rsnd_dma *dma,
-- dma_addr_t *buf, int *len),
-- int (*complete)(struct rsnd_dma *dma))
-+ int is_play, int id)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_slave_config cfg;
-@@ -253,8 +269,6 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- goto rsnd_dma_init_err;
-
- dma->dir = is_play ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
-- dma->inquiry = inquiry;
-- dma->complete = complete;
- INIT_WORK(&dma->work, rsnd_dma_do_work);
-
- return 0;
-@@ -307,6 +321,7 @@ int rsnd_dai_connect(struct rsnd_dai *rdai,
- }
-
- list_add_tail(&mod->list, &io->head);
-+ mod->io = io;
-
- return 0;
- }
-@@ -314,6 +329,7 @@ int rsnd_dai_connect(struct rsnd_dai *rdai,
- int rsnd_dai_disconnect(struct rsnd_mod *mod)
- {
- list_del_init(&mod->list);
-+ mod->io = NULL;
-
- return 0;
- }
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index c397dc8edee5..b2c717d2ba7e 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -100,19 +100,16 @@ struct rsnd_dma {
- struct work_struct work;
- struct dma_chan *chan;
- enum dma_data_direction dir;
-- int (*inquiry)(struct rsnd_dma *dma, dma_addr_t *buf, int *len);
-- int (*complete)(struct rsnd_dma *dma);
-
- int submit_loop;
-+ int offset; /* it cares A/B plane */
- };
-
- void rsnd_dma_start(struct rsnd_dma *dma);
- void rsnd_dma_stop(struct rsnd_dma *dma);
- int rsnd_dma_available(struct rsnd_dma *dma);
- int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
-- int is_play, int id,
-- int (*inquiry)(struct rsnd_dma *dma, dma_addr_t *buf, int *len),
-- int (*complete)(struct rsnd_dma *dma));
-+ int is_play, int id);
- void rsnd_dma_quit(struct rsnd_priv *priv,
- struct rsnd_dma *dma);
-
-@@ -137,17 +134,20 @@ struct rsnd_mod_ops {
- struct rsnd_dai_stream *io);
- };
-
-+struct rsnd_dai_stream;
- struct rsnd_mod {
- int id;
- struct rsnd_priv *priv;
- struct rsnd_mod_ops *ops;
- struct list_head list; /* connect to rsnd_dai playback/capture */
- struct rsnd_dma dma;
-+ struct rsnd_dai_stream *io;
- };
-
- #define rsnd_mod_to_priv(mod) ((mod)->priv)
- #define rsnd_mod_to_dma(mod) (&(mod)->dma)
- #define rsnd_dma_to_mod(_dma) container_of((_dma), struct rsnd_mod, dma)
-+#define rsnd_mod_to_io(mod) ((mod)->io)
- #define rsnd_mod_id(mod) ((mod)->id)
- #define for_each_rsnd_mod(pos, n, io) \
- list_for_each_entry_safe(pos, n, &(io)->head, list)
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index b7f464ebcdc0..d3371d798d54 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -64,12 +64,10 @@ struct rsnd_ssi {
- struct rsnd_mod mod;
-
- struct rsnd_dai *rdai;
-- struct rsnd_dai_stream *io;
- u32 cr_own;
- u32 cr_clk;
- u32 cr_etc;
- int err;
-- int dma_offset;
- unsigned int usrcnt;
- unsigned int rate;
- };
-@@ -286,7 +284,6 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- * set ssi parameter
- */
- ssi->rdai = rdai;
-- ssi->io = io;
- ssi->cr_own = cr;
- ssi->err = -1; /* ignore 1st error */
-
-@@ -305,7 +302,6 @@ static int rsnd_ssi_quit(struct rsnd_mod *mod,
- dev_warn(dev, "ssi under/over flow err = %d\n", ssi->err);
-
- ssi->rdai = NULL;
-- ssi->io = NULL;
- ssi->cr_own = 0;
- ssi->err = 0;
-
-@@ -329,8 +325,9 @@ static void rsnd_ssi_record_error(struct rsnd_ssi *ssi, u32 status)
- static irqreturn_t rsnd_ssi_pio_interrupt(int irq, void *data)
- {
- struct rsnd_ssi *ssi = data;
-- struct rsnd_dai_stream *io = ssi->io;
-- u32 status = rsnd_mod_read(&ssi->mod, SSISR);
-+ struct rsnd_mod *mod = &ssi->mod;
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ u32 status = rsnd_mod_read(mod, SSISR);
- irqreturn_t ret = IRQ_NONE;
-
- if (io && (status & DIRQ)) {
-@@ -347,9 +344,9 @@ static irqreturn_t rsnd_ssi_pio_interrupt(int irq, void *data)
- * see rsnd_ssi_init()
- */
- if (rsnd_dai_is_play(rdai, io))
-- rsnd_mod_write(&ssi->mod, SSITDR, *buf);
-+ rsnd_mod_write(mod, SSITDR, *buf);
- else
-- *buf = rsnd_mod_read(&ssi->mod, SSIRDR);
-+ *buf = rsnd_mod_read(mod, SSIRDR);
-
- rsnd_dai_pointer_update(io, sizeof(*buf));
-
-@@ -394,33 +391,6 @@ static struct rsnd_mod_ops rsnd_ssi_pio_ops = {
- .stop = rsnd_ssi_pio_stop,
- };
-
--static int rsnd_ssi_dma_inquiry(struct rsnd_dma *dma, dma_addr_t *buf, int *len)
--{
-- struct rsnd_ssi *ssi = rsnd_dma_to_ssi(dma);
-- struct rsnd_dai_stream *io = ssi->io;
-- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
--
-- *len = io->byte_per_period;
-- *buf = runtime->dma_addr +
-- rsnd_dai_pointer_offset(io, ssi->dma_offset + *len);
-- ssi->dma_offset = *len; /* it cares A/B plane */
--
-- return 0;
--}
--
--static int rsnd_ssi_dma_complete(struct rsnd_dma *dma)
--{
-- struct rsnd_ssi *ssi = rsnd_dma_to_ssi(dma);
-- struct rsnd_dai_stream *io = ssi->io;
-- u32 status = rsnd_mod_read(&ssi->mod, SSISR);
--
-- rsnd_ssi_record_error(ssi, status);
--
-- rsnd_dai_pointer_update(ssi->io, io->byte_per_period);
--
-- return 0;
--}
--
- static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -430,7 +400,6 @@ static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
-
- /* enable DMA transfer */
- ssi->cr_etc = DMEN;
-- ssi->dma_offset = 0;
-
- rsnd_dma_start(dma);
-
-@@ -452,6 +421,8 @@ static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
-
- ssi->cr_etc = 0;
-
-+ rsnd_ssi_record_error(ssi, rsnd_mod_read(mod, SSISR));
-+
- rsnd_ssi_hw_stop(ssi, rdai);
-
- rsnd_dma_stop(dma);
-@@ -585,9 +556,7 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- ret = rsnd_dma_init(
- priv, rsnd_mod_to_dma(&ssi->mod),
- rsnd_ssi_is_play(&ssi->mod),
-- pinfo->dma_id,
-- rsnd_ssi_dma_inquiry,
-- rsnd_ssi_dma_complete);
-+ pinfo->dma_id);
- if (ret < 0)
- dev_info(dev, "SSI DMA failed. try PIO transter\n");
- else
---
-2.1.2
-
diff --git a/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch b/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch
deleted file mode 100644
index c34f05a667e6d..0000000000000
--- a/patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From c1d504912fbbe920023441b77ef2f642db387e9a Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:41:51 -0800
-Subject: ASoC: rsnd: rsnd_ssi_probe() goes forwarder than rsnd_scu_probe()
-
-rsnd_ssi_probe() goes forwarder than rsnd_scu_probe(),
-since scu will need ssi information on Gen2
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit eb854f6dff24a59378acc8d8eda57a3543a25acc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -762,15 +762,15 @@ static int rsnd_probe(struct platform_de
- if (ret)
- return ret;
-
-- ret = rsnd_scu_probe(pdev, info, priv);
-+ ret = rsnd_ssi_probe(pdev, info, priv);
- if (ret)
- return ret;
-
-- ret = rsnd_adg_probe(pdev, info, priv);
-+ ret = rsnd_scu_probe(pdev, info, priv);
- if (ret)
- return ret;
-
-- ret = rsnd_ssi_probe(pdev, info, priv);
-+ ret = rsnd_adg_probe(pdev, info, priv);
- if (ret)
- return ret;
-
diff --git a/patches.renesas/0043-ASoC-rsnd-add-Gen2-SRC-and-DMAEngine-support.patch b/patches.renesas/0043-ASoC-rsnd-add-Gen2-SRC-and-DMAEngine-support.patch
deleted file mode 100644
index 7d662d2e83375..0000000000000
--- a/patches.renesas/0043-ASoC-rsnd-add-Gen2-SRC-and-DMAEngine-support.patch
+++ /dev/null
@@ -1,447 +0,0 @@
-From 64f5ba8a014816f325db53d7ce02ee2027f659bb Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 23 Jan 2014 18:42:00 -0800
-Subject: ASoC: rsnd: add Gen2 SRC and DMAEngine support
-
-Renesas sound Gen2 has SRC (= Sampling Rate Converter)
-which needs 2 DMAC.
-The data path image when you use SRC on Gen2 is
-
-[mem] -> Audio-DMAC -> SRC -> Audio-DMAC-peri-peri -> SSIU -> SSI
-
-This patch support SRC and DMAEnine.
-It is tested on R-Car H2 Lager board
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 629509c5bc478c0343d94c8c70812396f44447fb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 6 +++
- sound/soc/sh/rcar/adg.c | 138 +++++++++++++++++++++++++++++++++++++++++++++++
- sound/soc/sh/rcar/gen.c | 26 +++++++++
- sound/soc/sh/rcar/rsnd.h | 25 +++++++++
- sound/soc/sh/rcar/scu.c | 117 ++++++++++++++++++++++++++++++++++++++++
- 5 files changed, 312 insertions(+)
-
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index 1d19bfc2486d..2be05aea54f9 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -56,9 +56,15 @@ struct rsnd_ssi_platform_info {
- */
- #define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */
-
-+#define RSND_SCU_SET(rate, _dma_id) \
-+ { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
-+#define RSND_SCU_UNUSED \
-+ { .flags = 0, .convert_rate = 0, .dma_id = 0, }
-+
- struct rsnd_scu_platform_info {
- u32 flags;
- u32 convert_rate; /* sampling rate convert */
-+ int dma_id; /* for Gen2 SCU */
- };
-
- /*
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index 5bdffa480245..821791e15d04 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -30,6 +30,144 @@ struct rsnd_adg {
- i++, (pos) = adg->clk[i])
- #define rsnd_priv_to_adg(priv) ((struct rsnd_adg *)(priv)->adg)
-
-+
-+static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_mod *mod)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ int id = rsnd_mod_id(mod);
-+ int ws = id;
-+
-+ if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) {
-+ switch (id) {
-+ case 1:
-+ case 2:
-+ ws = 0;
-+ break;
-+ case 4:
-+ ws = 3;
-+ break;
-+ case 8:
-+ ws = 7;
-+ break;
-+ }
-+ }
-+
-+ return (0x6 + ws) << 8;
-+}
-+
-+static int rsnd_adg_set_src_timsel_gen2(struct rsnd_dai *rdai,
-+ struct rsnd_mod *mod,
-+ struct rsnd_dai_stream *io,
-+ u32 timsel)
-+{
-+ int is_play = rsnd_dai_is_play(rdai, io);
-+ int id = rsnd_mod_id(mod);
-+ int shift = (id % 2) ? 16 : 0;
-+ u32 mask, ws;
-+ u32 in, out;
-+
-+ ws = rsnd_adg_ssi_ws_timing_gen2(mod);
-+
-+ in = (is_play) ? timsel : ws;
-+ out = (is_play) ? ws : timsel;
-+
-+ in = in << shift;
-+ out = out << shift;
-+ mask = 0xffff << shift;
-+
-+ switch (id / 2) {
-+ case 0:
-+ rsnd_mod_bset(mod, SRCIN_TIMSEL0, mask, in);
-+ rsnd_mod_bset(mod, SRCOUT_TIMSEL0, mask, out);
-+ break;
-+ case 1:
-+ rsnd_mod_bset(mod, SRCIN_TIMSEL1, mask, in);
-+ rsnd_mod_bset(mod, SRCOUT_TIMSEL1, mask, out);
-+ break;
-+ case 2:
-+ rsnd_mod_bset(mod, SRCIN_TIMSEL2, mask, in);
-+ rsnd_mod_bset(mod, SRCOUT_TIMSEL2, mask, out);
-+ break;
-+ case 3:
-+ rsnd_mod_bset(mod, SRCIN_TIMSEL3, mask, in);
-+ rsnd_mod_bset(mod, SRCOUT_TIMSEL3, mask, out);
-+ break;
-+ case 4:
-+ rsnd_mod_bset(mod, SRCIN_TIMSEL4, mask, in);
-+ rsnd_mod_bset(mod, SRCOUT_TIMSEL4, mask, out);
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io,
-+ unsigned int src_rate,
-+ unsigned int dst_rate)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_adg *adg = rsnd_priv_to_adg(priv);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ int idx, sel, div, step;
-+ u32 val;
-+ unsigned int min, diff;
-+ unsigned int sel_rate [] = {
-+ clk_get_rate(adg->clk[CLKA]), /* 0000: CLKA */
-+ clk_get_rate(adg->clk[CLKB]), /* 0001: CLKB */
-+ clk_get_rate(adg->clk[CLKC]), /* 0010: CLKC */
-+ adg->rbga_rate_for_441khz_div_6,/* 0011: RBGA */
-+ adg->rbgb_rate_for_48khz_div_6, /* 0100: RBGB */
-+ };
-+
-+ min = ~0;
-+ val = 0;
-+ for (sel = 0; sel < ARRAY_SIZE(sel_rate); sel++) {
-+ idx = 0;
-+ step = 2;
-+
-+ if (!sel_rate[sel])
-+ continue;
-+
-+ for (div = 2; div <= 98304; div += step) {
-+ diff = abs(src_rate - sel_rate[sel] / div);
-+ if (min > diff) {
-+ val = (sel << 8) | idx;
-+ min = diff;
-+ }
-+
-+ /*
-+ * step of 0_0000 / 0_0001 / 0_1101
-+ * are out of order
-+ */
-+ if ((idx > 2) && (idx % 2))
-+ step *= 2;
-+ if (idx == 0x1c) {
-+ div += step;
-+ step *= 2;
-+ }
-+ idx++;
-+ }
-+ }
-+
-+ if (min == ~0) {
-+ dev_err(dev, "no Input clock\n");
-+ return -EIO;
-+ }
-+
-+ return rsnd_adg_set_src_timsel_gen2(rdai, mod, io, val);
-+}
-+
-+int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ u32 val = rsnd_adg_ssi_ws_timing_gen2(mod);
-+
-+ return rsnd_adg_set_src_timsel_gen2(rdai, mod, io, val);
-+}
-+
- int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- unsigned int src_rate,
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index db486aae6b8b..3e03a8bc4f75 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -229,14 +229,40 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen)
- RSND_GEN2_S_REG(gen, SSIU, SSI_MODE0, 0x800),
- RSND_GEN2_S_REG(gen, SSIU, SSI_MODE1, 0x804),
- /* FIXME: it needs SSI_MODE2/3 in the future */
-+ RSND_GEN2_S_REG(gen, SSIU, SSI_CONTROL, 0x810),
-+ RSND_GEN2_M_REG(gen, SSIU, SSI_BUSIF_MODE, 0x0, 0x80),
-+ RSND_GEN2_M_REG(gen, SSIU, SSI_BUSIF_ADINR,0x4, 0x80),
-+ RSND_GEN2_M_REG(gen, SSIU, SSI_CTRL, 0x10, 0x80),
- RSND_GEN2_M_REG(gen, SSIU, INT_ENABLE, 0x18, 0x80),
-
-+ RSND_GEN2_M_REG(gen, SCU, SRC_BUSIF_MODE, 0x0, 0x20),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_ROUTE_MODE0,0xc, 0x20),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_CTRL, 0x10, 0x20),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_SWRSR, 0x200, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_SRCIR, 0x204, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_ADINR, 0x214, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_IFSCR, 0x21c, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_IFSVR, 0x220, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_SRCCR, 0x224, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_BSDSR, 0x22c, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, SRC_BSISR, 0x238, 0x40),
-+
- RSND_GEN2_S_REG(gen, ADG, BRRA, 0x00),
- RSND_GEN2_S_REG(gen, ADG, BRRB, 0x04),
- RSND_GEN2_S_REG(gen, ADG, SSICKR, 0x08),
- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL0, 0x0c),
- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL1, 0x10),
- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL2, 0x14),
-+ RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL0, 0x34),
-+ RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL1, 0x38),
-+ RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL2, 0x3c),
-+ RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL3, 0x40),
-+ RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL4, 0x44),
-+ RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL0, 0x48),
-+ RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL1, 0x4c),
-+ RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL2, 0x50),
-+ RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL3, 0x54),
-+ RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL4, 0x58),
-
- RSND_GEN2_M_REG(gen, SSI, SSICR, 0x00, 0x40),
- RSND_GEN2_M_REG(gen, SSI, SSISR, 0x04, 0x40),
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index b2c717d2ba7e..8b66dc15fa73 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -37,6 +37,11 @@ enum rsnd_reg {
- RSND_REG_SRC_TMG_SEL1, /* for Gen1 */
- RSND_REG_SRC_TMG_SEL2, /* for Gen1 */
- RSND_REG_SRC_ROUTE_CTRL, /* for Gen1 */
-+ RSND_REG_SRC_CTRL, /* for Gen2 */
-+ RSND_REG_SSI_CTRL, /* for Gen2 */
-+ RSND_REG_SSI_CONTROL,
-+ RSND_REG_SSI_BUSIF_MODE, /* for Gen2 */
-+ RSND_REG_SSI_BUSIF_ADINR, /* for Gen2 */
- RSND_REG_SSI_MODE0,
- RSND_REG_SSI_MODE1,
- RSND_REG_INT_ENABLE, /* for Gen2 */
-@@ -49,6 +54,8 @@ enum rsnd_reg {
- RSND_REG_SRC_IFSVR,
- RSND_REG_SRC_SRCCR,
- RSND_REG_SRC_MNFSR, /* for Gen1 */
-+ RSND_REG_SRC_BSDSR, /* for Gen2 */
-+ RSND_REG_SRC_BSISR, /* for Gen2 */
-
- /* ADG */
- RSND_REG_BRRA,
-@@ -60,6 +67,16 @@ enum rsnd_reg {
- RSND_REG_AUDIO_CLK_SEL3, /* for Gen1 */
- RSND_REG_AUDIO_CLK_SEL4, /* for Gen1 */
- RSND_REG_AUDIO_CLK_SEL5, /* for Gen1 */
-+ RSND_REG_SRCIN_TIMSEL0, /* for Gen2 */
-+ RSND_REG_SRCIN_TIMSEL1, /* for Gen2 */
-+ RSND_REG_SRCIN_TIMSEL2, /* for Gen2 */
-+ RSND_REG_SRCIN_TIMSEL3, /* for Gen2 */
-+ RSND_REG_SRCIN_TIMSEL4, /* for Gen2 */
-+ RSND_REG_SRCOUT_TIMSEL0, /* for Gen2 */
-+ RSND_REG_SRCOUT_TIMSEL1, /* for Gen2 */
-+ RSND_REG_SRCOUT_TIMSEL2, /* for Gen2 */
-+ RSND_REG_SRCOUT_TIMSEL3, /* for Gen2 */
-+ RSND_REG_SRCOUT_TIMSEL4, /* for Gen2 */
-
- /* SSI */
- RSND_REG_SSICR,
-@@ -250,6 +267,14 @@ int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- unsigned int src_rate,
- unsigned int dst_rate);
-+int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io,
-+ unsigned int src_rate,
-+ unsigned int dst_rate);
-+int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io);
-
- /*
- * R-Car sound priv
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 29d8990e3f0f..6e5c763e1040 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -33,6 +33,8 @@ struct rsnd_scu {
- container_of((_mod), struct rsnd_scu, mod)
- #define rsnd_scu_hpbif_is_enable(scu) \
- (rsnd_scu_mode_flags(scu) & RSND_SCU_USE_HPBIF)
-+#define rsnd_scu_dma_available(scu) \
-+ rsnd_dma_available(rsnd_mod_to_dma(&(scu)->mod))
-
- #define for_each_rsnd_scu(pos, priv, i) \
- for ((i) = 0; \
-@@ -472,6 +474,103 @@ static struct rsnd_mod_ops rsnd_scu_non_gen1_ops = {
- /*
- * Gen2 functions
- */
-+static int rsnd_scu_set_convert_rate_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int ret;
-+
-+ ret = rsnd_scu_set_convert_rate(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_mod_read(mod, SRC_ADINR));
-+ rsnd_mod_write(mod, SSI_BUSIF_MODE, rsnd_mod_read(mod, SRC_BUSIF_MODE));
-+
-+ rsnd_mod_write(mod, SRC_SRCCR, 0x00011110);
-+
-+ rsnd_mod_write(mod, SRC_BSDSR, 0x01800000);
-+ rsnd_mod_write(mod, SRC_BSISR, 0x00100060);
-+
-+ return 0;
-+}
-+
-+static int rsnd_scu_set_convert_timing_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ u32 convert_rate = rsnd_scu_convert_rate(scu);
-+ int ret;
-+
-+ if (convert_rate)
-+ ret = rsnd_adg_set_convert_clk_gen2(mod, rdai, io,
-+ runtime->rate,
-+ convert_rate);
-+ else
-+ ret = rsnd_adg_set_convert_timing_gen2(mod, rdai, io);
-+
-+ return ret;
-+}
-+
-+static int rsnd_scu_init_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int ret;
-+
-+ ret = rsnd_scu_init(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_scu_set_convert_rate_gen2(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_scu_set_convert_timing_gen2(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ return 0;
-+}
-+
-+static int rsnd_scu_start_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ rsnd_dma_start(rsnd_mod_to_dma(&scu->mod));
-+
-+ rsnd_mod_write(mod, SSI_CTRL, 0x1);
-+ rsnd_mod_write(mod, SRC_CTRL, 0x11);
-+
-+ return rsnd_scu_start(mod, rdai, io);
-+}
-+
-+static int rsnd_scu_stop_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+
-+ rsnd_mod_write(mod, SSI_CTRL, 0);
-+ rsnd_mod_write(mod, SRC_CTRL, 0);
-+
-+ rsnd_dma_stop(rsnd_mod_to_dma(&scu->mod));
-+
-+ return rsnd_scu_stop(mod, rdai, io);
-+}
-+
-+static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
-+ .name = "scu (gen2)",
-+ .init = rsnd_scu_init_gen2,
-+ .quit = rsnd_scu_quit,
-+ .start = rsnd_scu_start_gen2,
-+ .stop = rsnd_scu_stop_gen2,
-+};
-+
- static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -534,6 +633,17 @@ int rsnd_scu_probe(struct platform_device *pdev,
- if (rsnd_scu_hpbif_is_enable(scu)) {
- if (rsnd_is_gen1(priv))
- ops = &rsnd_scu_gen1_ops;
-+ if (rsnd_is_gen2(priv)) {
-+ struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, i);
-+ int ret = rsnd_dma_init(priv,
-+ rsnd_mod_to_dma(&scu->mod),
-+ rsnd_ssi_is_play(ssi),
-+ scu->info->dma_id);
-+ if (ret < 0)
-+ return ret;
-+
-+ ops = &rsnd_scu_gen2_ops;
-+ }
- } else {
- if (rsnd_is_gen1(priv))
- ops = &rsnd_scu_non_gen1_ops;
-@@ -553,4 +663,11 @@ int rsnd_scu_probe(struct platform_device *pdev,
- void rsnd_scu_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-+ struct rsnd_scu *scu;
-+ int i;
-+
-+ for_each_rsnd_scu(scu, priv, i) {
-+ if (rsnd_scu_dma_available(scu))
-+ rsnd_dma_quit(priv, rsnd_mod_to_dma(&scu->mod));
-+ }
- }
---
-2.1.2
-
diff --git a/patches.renesas/0044-ASoC-rsnd-use-device-dependency-clock.patch b/patches.renesas/0044-ASoC-rsnd-use-device-dependency-clock.patch
deleted file mode 100644
index 6e4b622c92c05..0000000000000
--- a/patches.renesas/0044-ASoC-rsnd-use-device-dependency-clock.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 44d86b464a7e968b01df91eb8acc37167db5c415 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Fri, 7 Feb 2014 00:53:06 -0800
-Subject: ASoC: rsnd: use device dependency clock
-
-Current R-Car sound driver is using device
-independent audio clock, but it is not good
-design for DT support.
-This patch adds device dependent clock support.
-But, there are some platform which is using
-independent audio clock.
-It is still supported at this point,
-but it will be removed soon.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8691d0748e566f8708f7a9139e760134f5dc3130)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 40 +++++++++++++++++++++++++++++++++++-----
- 1 file changed, 35 insertions(+), 5 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index 821791e15d04..8d3a82ef2db5 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -385,8 +385,9 @@ int rsnd_adg_probe(struct platform_device *pdev,
- {
- struct rsnd_adg *adg;
- struct device *dev = rsnd_priv_to_dev(priv);
-- struct clk *clk;
-+ struct clk *clk, *clk_orig;
- int i;
-+ bool use_old_style = false;
-
- adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL);
- if (!adg) {
-@@ -394,10 +395,39 @@ int rsnd_adg_probe(struct platform_device *pdev,
- return -ENOMEM;
- }
-
-- adg->clk[CLKA] = clk_get(NULL, "audio_clk_a");
-- adg->clk[CLKB] = clk_get(NULL, "audio_clk_b");
-- adg->clk[CLKC] = clk_get(NULL, "audio_clk_c");
-- adg->clk[CLKI] = clk_get(NULL, "audio_clk_internal");
-+ clk_orig = clk_get(dev, NULL);
-+ adg->clk[CLKA] = clk_get(dev, "clk_a");
-+ adg->clk[CLKB] = clk_get(dev, "clk_b");
-+ adg->clk[CLKC] = clk_get(dev, "clk_c");
-+ adg->clk[CLKI] = clk_get(dev, "clk_i");
-+
-+ /*
-+ * It request device dependent audio clock.
-+ * But above all clks will indicate rsnd module clock
-+ * if platform doesn't it
-+ */
-+ for_each_rsnd_clk(clk, adg, i) {
-+ if (clk_orig == clk) {
-+ dev_warn(dev,
-+ "doesn't have device dependent clock, use independent clock\n");
-+ use_old_style = true;
-+ break;
-+ }
-+ }
-+
-+ /*
-+ * note:
-+ * these exist in order to keep compatible with
-+ * platform which has device independent audio clock,
-+ * but will be removed soon
-+ */
-+ if (use_old_style) {
-+ adg->clk[CLKA] = clk_get(NULL, "audio_clk_a");
-+ adg->clk[CLKB] = clk_get(NULL, "audio_clk_b");
-+ adg->clk[CLKC] = clk_get(NULL, "audio_clk_c");
-+ adg->clk[CLKI] = clk_get(NULL, "audio_clk_internal");
-+ }
-+
- for_each_rsnd_clk(clk, adg, i) {
- if (IS_ERR(clk)) {
- dev_err(dev, "Audio clock failed\n");
---
-2.1.2
-
diff --git a/patches.renesas/0045-ASoC-rsnd-tidyup-original-for_each_rsnd_xxx-macro.patch b/patches.renesas/0045-ASoC-rsnd-tidyup-original-for_each_rsnd_xxx-macro.patch
deleted file mode 100644
index 5d3a7fe1cb3d2..0000000000000
--- a/patches.renesas/0045-ASoC-rsnd-tidyup-original-for_each_rsnd_xxx-macro.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 369b362f76d6abaabaaceea53891c2cadd1c54f6 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 11 Feb 2014 17:15:51 -0800
-Subject: ASoC: rsnd: tidyup original for_each_rsnd_xxx macro
-
-Current for_each_rsnd_xxx macro will read out-of-array's
-memory after last loop operation.
-It was not good C language operation, and the binary which was
-compiled by (at least) gcc 4.8.1 is broken
-This patch tidyup these issues
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 00463c113b6ba6506b4f1ebb9b3c5dd249f8750f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 7 ++++---
- sound/soc/sh/rcar/rsnd.h | 7 ++++---
- 2 files changed, 8 insertions(+), 6 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index 8d3a82ef2db5..bc8961c5e986 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -25,9 +25,10 @@ struct rsnd_adg {
- };
-
- #define for_each_rsnd_clk(pos, adg, i) \
-- for (i = 0, (pos) = adg->clk[i]; \
-- i < CLKMAX; \
-- i++, (pos) = adg->clk[i])
-+ for (i = 0; \
-+ (i < CLKMAX) && \
-+ ((pos) = adg->clk[i]); \
-+ i++)
- #define rsnd_priv_to_adg(priv) ((struct rsnd_adg *)(priv)->adg)
-
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 8b66dc15fa73..9e4efb40416b 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -216,9 +216,10 @@ struct rsnd_dai {
-
- #define rsnd_dai_nr(priv) ((priv)->dai_nr)
- #define for_each_rsnd_dai(rdai, priv, i) \
-- for (i = 0, (rdai) = rsnd_dai_get(priv, i); \
-- i < rsnd_dai_nr(priv); \
-- i++, (rdai) = rsnd_dai_get(priv, i))
-+ for (i = 0; \
-+ (i < rsnd_dai_nr(priv)) && \
-+ ((rdai) = rsnd_dai_get(priv, i)); \
-+ i++)
-
- struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id);
- int rsnd_dai_disconnect(struct rsnd_mod *mod);
---
-2.1.2
-
diff --git a/patches.renesas/0046-ASoC-rsnd-set-DIV_EN-register-on-rsnd_adg_set_conver.patch b/patches.renesas/0046-ASoC-rsnd-set-DIV_EN-register-on-rsnd_adg_set_conver.patch
deleted file mode 100644
index 49f6301e2d7b7..0000000000000
--- a/patches.renesas/0046-ASoC-rsnd-set-DIV_EN-register-on-rsnd_adg_set_conver.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 54b69d3a68d075a6ffd180d9396580fa8e9802e8 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 11 Feb 2014 21:04:12 -0800
-Subject: ASoC: rsnd: set DIV_EN register on rsnd_adg_set_convert_clk_gen2()
-
-DIV_EN register enable bit is required when you use Gen2 SRC
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ee2c828d21b2381c813df257235d3c635269e435)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 16 +++++++++++++---
- sound/soc/sh/rcar/gen.c | 1 +
- sound/soc/sh/rcar/rsnd.h | 1 +
- 3 files changed, 15 insertions(+), 3 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index bc8961c5e986..af9e4407aa89 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -111,8 +111,8 @@ int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod,
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_adg *adg = rsnd_priv_to_adg(priv);
- struct device *dev = rsnd_priv_to_dev(priv);
-- int idx, sel, div, step;
-- u32 val;
-+ int idx, sel, div, step, ret;
-+ u32 val, en;
- unsigned int min, diff;
- unsigned int sel_rate [] = {
- clk_get_rate(adg->clk[CLKA]), /* 0000: CLKA */
-@@ -124,6 +124,7 @@ int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod,
-
- min = ~0;
- val = 0;
-+ en = 0;
- for (sel = 0; sel < ARRAY_SIZE(sel_rate); sel++) {
- idx = 0;
- step = 2;
-@@ -136,6 +137,7 @@ int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod,
- if (min > diff) {
- val = (sel << 8) | idx;
- min = diff;
-+ en = 1 << (sel + 1); /* fixme */
- }
-
- /*
-@@ -157,7 +159,15 @@ int rsnd_adg_set_convert_clk_gen2(struct rsnd_mod *mod,
- return -EIO;
- }
-
-- return rsnd_adg_set_src_timsel_gen2(rdai, mod, io, val);
-+ ret = rsnd_adg_set_src_timsel_gen2(rdai, mod, io, val);
-+ if (ret < 0) {
-+ dev_err(dev, "timsel error\n");
-+ return ret;
-+ }
-+
-+ rsnd_mod_bset(mod, DIV_EN, en, en);
-+
-+ return 0;
- }
-
- int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod,
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 3e03a8bc4f75..0a43b906ffdf 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -253,6 +253,7 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen)
- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL0, 0x0c),
- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL1, 0x10),
- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL2, 0x14),
-+ RSND_GEN2_S_REG(gen, ADG, DIV_EN, 0x30),
- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL0, 0x34),
- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL1, 0x38),
- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL2, 0x3c),
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 9e4efb40416b..d4093907dfd8 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -67,6 +67,7 @@ enum rsnd_reg {
- RSND_REG_AUDIO_CLK_SEL3, /* for Gen1 */
- RSND_REG_AUDIO_CLK_SEL4, /* for Gen1 */
- RSND_REG_AUDIO_CLK_SEL5, /* for Gen1 */
-+ RSND_REG_DIV_EN, /* for Gen2 */
- RSND_REG_SRCIN_TIMSEL0, /* for Gen2 */
- RSND_REG_SRCIN_TIMSEL1, /* for Gen2 */
- RSND_REG_SRCIN_TIMSEL2, /* for Gen2 */
---
-2.1.2
-
diff --git a/patches.renesas/0047-ASoC-rsnd-print-error-if-there-is-SRC-settings-misma.patch b/patches.renesas/0047-ASoC-rsnd-print-error-if-there-is-SRC-settings-misma.patch
deleted file mode 100644
index 91c2a3d37d69d..0000000000000
--- a/patches.renesas/0047-ASoC-rsnd-print-error-if-there-is-SRC-settings-misma.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 9b49d8d751219bfc78c1d5b54daddaa49a7dcef7 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 11 Feb 2014 21:05:26 -0800
-Subject: ASoC: rsnd: print error if there is SRC settings mismatch
-
-rsnd request clock master if SRC is used
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit a2070feede404484296aace813b6c518582a3f8e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 6e5c763e1040..3984d4b4f2df 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -122,6 +122,14 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
- int id = rsnd_mod_id(mod);
-+ u32 convert_rate = rsnd_scu_convert_rate(scu);
-+
-+ if (convert_rate && !rsnd_dai_is_clk_master(rdai)) {
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+
-+ dev_err(dev, "rsnd should be clk master when you rate convert\n");
-+ return -EINVAL;
-+ }
-
- /*
- * SSI_MODE0
---
-2.1.2
-
diff --git a/patches.renesas/0048-ASoC-rsnd-move-priv-member-settings-to-upper-side.patch b/patches.renesas/0048-ASoC-rsnd-move-priv-member-settings-to-upper-side.patch
deleted file mode 100644
index 5a5fad3dbfaf4..0000000000000
--- a/patches.renesas/0048-ASoC-rsnd-move-priv-member-settings-to-upper-side.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 26e0e909a5dca7e742f06748331c5846dd049c84 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 24 Feb 2014 22:14:33 -0800
-Subject: ASoC: rsnd: move priv member settings to upper side
-
-There is no big meaning, but preparation for platform dai support
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 498480731e232d7c9a96a338924b5a275121e091)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index f316a663e4d3..a8e6aa6cb334 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -594,6 +594,10 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- return -ENOMEM;
- }
-
-+ priv->dai_nr = dai_nr;
-+ priv->daidrv = drv;
-+ priv->rdai = rdai;
-+
- for (i = 0; i < dai_nr; i++) {
-
- pmod = rsnd_ssi_mod_get_frm_dai(priv, i, 1);
-@@ -630,10 +634,6 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- cmod ? "capture" : " -- ");
- }
-
-- priv->dai_nr = dai_nr;
-- priv->daidrv = drv;
-- priv->rdai = rdai;
--
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0049-ASoC-rsnd-move-rsnd_mod_call-macro.patch b/patches.renesas/0049-ASoC-rsnd-move-rsnd_mod_call-macro.patch
deleted file mode 100644
index 664418ce7d58b..0000000000000
--- a/patches.renesas/0049-ASoC-rsnd-move-rsnd_mod_call-macro.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 71f1f9e46eaa394c736493fd43fe6dd90b2b004a Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 24 Feb 2014 22:14:41 -0800
-Subject: ASoC: rsnd: move rsnd_mod_call() macro
-
-core.c is the only user of rsnd_mod_call() macro.
-Move it to core.c from rsnd.h
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit d870a91e9d0eae524ac2da7cbdc7e399a71b86c4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 34 ++++++++++++++++++++++++----------
- sound/soc/sh/rcar/rsnd.h | 13 -------------
- 2 files changed, 24 insertions(+), 23 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index a8e6aa6cb334..5f6d9fef23d1 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -291,16 +291,30 @@ void rsnd_dma_quit(struct rsnd_priv *priv,
- /*
- * rsnd_dai functions
- */
--#define rsnd_dai_call(rdai, io, fn) \
--({ \
-- struct rsnd_mod *mod, *n; \
-- int ret = 0; \
-- for_each_rsnd_mod(mod, n, io) { \
-- ret = rsnd_mod_call(mod, fn, rdai, io); \
-- if (ret < 0) \
-- break; \
-- } \
-- ret; \
-+#define __rsnd_mod_call(mod, func, rdai, io) \
-+({ \
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \
-+ struct device *dev = rsnd_priv_to_dev(priv); \
-+ dev_dbg(dev, "%s [%d] %s\n", \
-+ rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \
-+ (mod)->ops->func(mod, rdai, io); \
-+})
-+
-+#define rsnd_mod_call(mod, func, rdai, io) \
-+ (!(mod) ? -ENODEV : \
-+ !((mod)->ops->func) ? 0 : \
-+ __rsnd_mod_call(mod, func, (rdai), (io)))
-+
-+#define rsnd_dai_call(rdai, io, fn) \
-+({ \
-+ struct rsnd_mod *mod, *n; \
-+ int ret = 0; \
-+ for_each_rsnd_mod(mod, n, (io)) { \
-+ ret = rsnd_mod_call(mod, fn, (rdai), (io)); \
-+ if (ret < 0) \
-+ break; \
-+ } \
-+ ret; \
- })
-
- int rsnd_dai_connect(struct rsnd_dai *rdai,
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index d4093907dfd8..fb1e0cee08b6 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -169,19 +169,6 @@ struct rsnd_mod {
- #define rsnd_mod_id(mod) ((mod)->id)
- #define for_each_rsnd_mod(pos, n, io) \
- list_for_each_entry_safe(pos, n, &(io)->head, list)
--#define __rsnd_mod_call(mod, func, rdai, io) \
--({ \
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \
-- struct device *dev = rsnd_priv_to_dev(priv); \
-- dev_dbg(dev, "%s-%d-%s\n", \
-- rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \
-- (mod)->ops->func(mod, rdai, io); \
--})
--
--#define rsnd_mod_call(mod, func, rdai, io) \
-- (!(mod) ? -ENODEV : \
-- !((mod)->ops->func) ? 0 : \
-- __rsnd_mod_call(mod, func, rdai, io))
-
- void rsnd_mod_init(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
---
-2.1.2
-
diff --git a/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch b/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch
deleted file mode 100644
index 4a136330b51d5..0000000000000
--- a/patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From d87b0ab780b8d825dff81f88b4dc097c32bf7e11 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 24 Feb 2014 22:15:00 -0800
-Subject: ASoC: rsnd: remove verbose function parameter
-
-priv has rcar_snd_info pointer.
-having priv and info in same time is verbose.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5da39cf30454bbf3e92f56935e7d137e5bd2c830)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 1 -
- sound/soc/sh/rcar/core.c | 11 +++++------
- sound/soc/sh/rcar/gen.c | 7 ++-----
- sound/soc/sh/rcar/rsnd.h | 5 +----
- sound/soc/sh/rcar/scu.c | 2 +-
- sound/soc/sh/rcar/ssi.c | 2 +-
- 6 files changed, 10 insertions(+), 18 deletions(-)
-
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -391,7 +391,6 @@ static void rsnd_adg_ssi_clk_init(struct
- }
-
- int rsnd_adg_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
- struct rsnd_adg *adg;
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -577,7 +577,6 @@ static const struct snd_soc_dai_ops rsnd
- };
-
- static int rsnd_dai_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
- struct snd_soc_dai_driver *drv;
-@@ -772,23 +771,23 @@ static int rsnd_probe(struct platform_de
- /*
- * init each module
- */
-- ret = rsnd_gen_probe(pdev, info, priv);
-+ ret = rsnd_gen_probe(pdev, priv);
- if (ret)
- return ret;
-
-- ret = rsnd_ssi_probe(pdev, info, priv);
-+ ret = rsnd_ssi_probe(pdev, priv);
- if (ret)
- return ret;
-
-- ret = rsnd_scu_probe(pdev, info, priv);
-+ ret = rsnd_scu_probe(pdev, priv);
- if (ret)
- return ret;
-
-- ret = rsnd_adg_probe(pdev, info, priv);
-+ ret = rsnd_adg_probe(pdev, priv);
- if (ret)
- return ret;
-
-- ret = rsnd_dai_probe(pdev, info, priv);
-+ ret = rsnd_dai_probe(pdev, priv);
- if (ret)
- return ret;
-
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -276,7 +276,6 @@ static int rsnd_gen2_regmap_init(struct
- }
-
- static int rsnd_gen2_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
-@@ -374,7 +373,6 @@ static int rsnd_gen1_regmap_init(struct
- }
-
- static int rsnd_gen1_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
-@@ -419,7 +417,6 @@ static int rsnd_gen1_probe(struct platfo
- * Gen
- */
- int rsnd_gen_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
-@@ -436,9 +433,9 @@ int rsnd_gen_probe(struct platform_devic
-
- ret = -ENODEV;
- if (rsnd_is_gen1(priv))
-- ret = rsnd_gen1_probe(pdev, info, priv);
-+ ret = rsnd_gen1_probe(pdev, priv);
- else if (rsnd_is_gen2(priv))
-- ret = rsnd_gen2_probe(pdev, info, priv);
-+ ret = rsnd_gen2_probe(pdev, priv);
-
- if (ret < 0)
- dev_err(dev, "unknown generation R-Car sound device\n");
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -226,7 +226,6 @@ int rsnd_dai_pointer_offset(struct rsnd_
- * R-Car Gen1/Gen2
- */
- int rsnd_gen_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv);
- void rsnd_gen_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
-@@ -248,7 +247,6 @@ void __iomem *rsnd_gen_reg_get(struct rs
- int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod);
- int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate);
- int rsnd_adg_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv);
- void rsnd_adg_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
-@@ -305,6 +303,7 @@ struct rsnd_priv {
- };
-
- #define rsnd_priv_to_dev(priv) ((priv)->dev)
-+#define rsnd_priv_to_info(priv) ((priv)->info)
- #define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags)
- #define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags)
-
-@@ -312,7 +311,6 @@ struct rsnd_priv {
- * R-Car SCU
- */
- int rsnd_scu_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv);
- void rsnd_scu_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
-@@ -327,7 +325,6 @@ unsigned int rsnd_scu_get_ssi_rate(struc
- * R-Car SSI
- */
- int rsnd_ssi_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv);
- void rsnd_ssi_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -604,9 +604,9 @@ struct rsnd_mod *rsnd_scu_mod_get(struct
- }
-
- int rsnd_scu_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_scu *scu;
- struct rsnd_mod_ops *ops;
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -511,9 +511,9 @@ static void rsnd_ssi_parent_clk_setup(st
- }
-
- int rsnd_ssi_probe(struct platform_device *pdev,
-- struct rcar_snd_info *info,
- struct rsnd_priv *priv)
- {
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct rsnd_ssi_platform_info *pinfo;
- struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_mod_ops *ops;
diff --git a/patches.renesas/0051-ASoC-rsnd-remove-verbose-debug-message-from-scu-ssi.patch b/patches.renesas/0051-ASoC-rsnd-remove-verbose-debug-message-from-scu-ssi.patch
deleted file mode 100644
index 36075bb67b4b9..0000000000000
--- a/patches.renesas/0051-ASoC-rsnd-remove-verbose-debug-message-from-scu-ssi.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 4f941694919aaf6a45c8fe3195f719ad70b3409c Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 24 Feb 2014 22:15:07 -0800
-Subject: ASoC: rsnd: remove verbose debug message from scu/ssi
-
-scu/ssi probe() already have more detail debug message.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 98455ed5ddbfbcbcd0adb300c6cb1964ed0a6931)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 1 -
- sound/soc/sh/rcar/ssi.c | 2 --
- 2 files changed, 3 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 82d8b20a6ffb..882e837d39d1 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -663,7 +663,6 @@ int rsnd_scu_probe(struct platform_device *pdev,
-
- dev_dbg(dev, "SCU%d probed\n", i);
- }
-- dev_dbg(dev, "scu probed\n");
-
- return 0;
- }
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 2460c9f564de..38a62a883b83 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -589,8 +589,6 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- rsnd_ssi_parent_clk_setup(priv, ssi);
- }
-
-- dev_dbg(dev, "ssi probed\n");
--
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch b/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch
deleted file mode 100644
index cfa31280c16c7..0000000000000
--- a/patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 61379b88cf8e0c0a77aced0e65ef9dc751b28a86 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 24 Feb 2014 22:15:18 -0800
-Subject: ASoC: rsnd: unify rdai naming
-
-struct rsnd_dai is called as "rdai",
-but its size has been called as "dai_nr".
-Unify these as "rdai"
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ecba9e724c5775aebd3a28e831643160c7146e83)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 8 ++++----
- sound/soc/sh/rcar/rsnd.h | 6 +++---
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -352,7 +352,7 @@ int rsnd_dai_id(struct rsnd_priv *priv,
- {
- int id = rdai - priv->rdai;
-
-- if ((id < 0) || (id >= rsnd_dai_nr(priv)))
-+ if ((id < 0) || (id >= rsnd_rdai_nr(priv)))
- return -EINVAL;
-
- return id;
-@@ -360,7 +360,7 @@ int rsnd_dai_id(struct rsnd_priv *priv,
-
- struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id)
- {
-- if ((id < 0) || (id >= rsnd_dai_nr(priv)))
-+ if ((id < 0) || (id >= rsnd_rdai_nr(priv)))
- return NULL;
-
- return priv->rdai + id;
-@@ -607,7 +607,7 @@ static int rsnd_dai_probe(struct platfor
- return -ENOMEM;
- }
-
-- priv->dai_nr = dai_nr;
-+ priv->rdai_nr = dai_nr;
- priv->daidrv = drv;
- priv->rdai = rdai;
-
-@@ -801,7 +801,7 @@ static int rsnd_probe(struct platform_de
- }
-
- ret = snd_soc_register_component(dev, &rsnd_soc_component,
-- priv->daidrv, rsnd_dai_nr(priv));
-+ priv->daidrv, rsnd_rdai_nr(priv));
- if (ret < 0) {
- dev_err(dev, "cannot snd dai register\n");
- goto exit_snd_soc;
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -202,10 +202,10 @@ struct rsnd_dai {
- unsigned int data_alignment:1;
- };
-
--#define rsnd_dai_nr(priv) ((priv)->dai_nr)
-+#define rsnd_rdai_nr(priv) ((priv)->rdai_nr)
- #define for_each_rsnd_dai(rdai, priv, i) \
- for (i = 0; \
-- (i < rsnd_dai_nr(priv)) && \
-+ (i < rsnd_rdai_nr(priv)) && \
- ((rdai) = rsnd_dai_get(priv, i)); \
- i++)
-
-@@ -299,7 +299,7 @@ struct rsnd_priv {
- */
- struct snd_soc_dai_driver *daidrv;
- struct rsnd_dai *rdai;
-- int dai_nr;
-+ int rdai_nr;
- };
-
- #define rsnd_priv_to_dev(priv) ((priv)->dev)
diff --git a/patches.renesas/0053-ASoC-rsnd-tidyup-RSND_SSI_xxx-flags.patch b/patches.renesas/0053-ASoC-rsnd-tidyup-RSND_SSI_xxx-flags.patch
deleted file mode 100644
index 02480b5363332..0000000000000
--- a/patches.renesas/0053-ASoC-rsnd-tidyup-RSND_SSI_xxx-flags.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From fb29b59283f4ca382757e4c0137597080067dfcc Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 24 Feb 2014 22:15:33 -0800
-Subject: ASoC: rsnd: tidyup RSND_SSI_xxx flags
-
-6f3ab6c1c022e7a4877d38940cd45ae7804a15e2
-(ASoC: rsnd: remove pin sync option)
-added unused RSND_SSI_CLK_FROM_ADG flag.
-It should remove RSND_SSI_SYNC.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 697dce94ed37e0653e5bba593f11e2b14877cd63)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 3 ---
- 1 file changed, 3 deletions(-)
-
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index 2be05aea54f9..e3d585c67685 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -34,9 +34,6 @@
- * B : SSI direction
- */
- #define RSND_SSI_CLK_PIN_SHARE (1 << 31)
--#define RSND_SSI_SYNC (1 << 29) /* SSI34_sync etc */
--#define RSND_SSI_CLK_FROM_ADG (1 << 30) /* clock parent is master */
--
- #define RSND_SSI_PLAY (1 << 24)
-
- #define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags) \
---
-2.1.2
-
diff --git a/patches.renesas/0054-ASoC-rsnd-run-rsnd_path_init-when-probe-timing.patch b/patches.renesas/0054-ASoC-rsnd-run-rsnd_path_init-when-probe-timing.patch
deleted file mode 100644
index fa2100dd8e204..0000000000000
--- a/patches.renesas/0054-ASoC-rsnd-run-rsnd_path_init-when-probe-timing.patch
+++ /dev/null
@@ -1,278 +0,0 @@
-From d28fce5de9fe5a7a117c0aa9e4875d640efcddef Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:42:47 -0800
-Subject: ASoC: rsnd: run rsnd_path_init() when probe() timing
-
-Current rsnd SSIU/SSI/SCU/SRU path is set
-when playback/capture starts up.
-But it is meaningless method, since the path is based
-on platform and can be set in probe() timing.
-This patch sets the path on probe() timing.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9bfed6cf4fa2cd2c5e80431244348b0c5d933cf5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 94 +++++++++++++++++++++++++++++++++++++++---------
- sound/soc/sh/rcar/gen.c | 56 -----------------------------
- sound/soc/sh/rcar/rsnd.h | 9 -----
- 3 files changed, 78 insertions(+), 81 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index f0745af316be..96cb78612a7d 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -317,9 +317,9 @@ void rsnd_dma_quit(struct rsnd_priv *priv,
- ret; \
- })
-
--int rsnd_dai_connect(struct rsnd_dai *rdai,
-- struct rsnd_mod *mod,
-- struct rsnd_dai_stream *io)
-+static int rsnd_dai_connect(struct rsnd_dai *rdai,
-+ struct rsnd_mod *mod,
-+ struct rsnd_dai_stream *io)
- {
- if (!mod)
- return -EIO;
-@@ -340,7 +340,7 @@ int rsnd_dai_connect(struct rsnd_dai *rdai,
- return 0;
- }
-
--int rsnd_dai_disconnect(struct rsnd_mod *mod)
-+static int rsnd_dai_disconnect(struct rsnd_mod *mod)
- {
- list_del_init(&mod->list);
- mod->io = NULL;
-@@ -418,10 +418,6 @@ static int rsnd_dai_stream_init(struct rsnd_dai_stream *io,
- {
- struct snd_pcm_runtime *runtime = substream->runtime;
-
-- if (!list_empty(&io->head))
-- return -EIO;
--
-- INIT_LIST_HEAD(&io->head);
- io->substream = substream;
- io->byte_pos = 0;
- io->period_pos = 0;
-@@ -476,10 +472,6 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
- if (ret < 0)
- goto dai_trigger_end;
-
-- ret = rsnd_gen_path_init(priv, rdai, io);
-- if (ret < 0)
-- goto dai_trigger_end;
--
- ret = rsnd_dai_call(rdai, io, init);
- if (ret < 0)
- goto dai_trigger_end;
-@@ -497,10 +489,6 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
- if (ret < 0)
- goto dai_trigger_end;
-
-- ret = rsnd_gen_path_exit(priv, rdai, io);
-- if (ret < 0)
-- goto dai_trigger_end;
--
- ret = rsnd_platform_call(priv, dai, stop, ssi_id);
- if (ret < 0)
- goto dai_trigger_end;
-@@ -576,6 +564,70 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = {
- .set_fmt = rsnd_soc_dai_set_fmt,
- };
-
-+static int rsnd_path_init(struct rsnd_priv *priv,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_mod *mod;
-+ int ret;
-+ int id;
-+
-+ /*
-+ * Gen1 is created by SRU/SSI, and this SRU is base module of
-+ * Gen2's SCU/SSIU/SSI. (Gen2 SCU/SSIU came from SRU)
-+ *
-+ * Easy image is..
-+ * Gen1 SRU = Gen2 SCU + SSIU + etc
-+ *
-+ * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is
-+ * using fixed path.
-+ *
-+ * Then, SSI id = SCU id here
-+ */
-+ /* get SSI's ID */
-+ mod = rsnd_ssi_mod_get_frm_dai(priv,
-+ rsnd_dai_id(priv, rdai),
-+ rsnd_dai_is_play(rdai, io));
-+ if (!mod)
-+ return 0;
-+ id = rsnd_mod_id(mod);
-+ ret = 0;
-+
-+ /* SCU */
-+ mod = rsnd_scu_mod_get(priv, id);
-+ if (mod) {
-+ ret = rsnd_dai_connect(rdai, mod, io);
-+ if (ret < 0)
-+ return ret;
-+ }
-+
-+ /* SSI */
-+ mod = rsnd_ssi_mod_get(priv, id);
-+ if (mod) {
-+ ret = rsnd_dai_connect(rdai, mod, io);
-+ if (ret < 0)
-+ return ret;
-+ }
-+
-+ return ret;
-+}
-+
-+static int rsnd_path_exit(struct rsnd_priv *priv,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_mod *mod, *n;
-+ int ret = 0;
-+
-+ /*
-+ * remove all mod from rdai
-+ */
-+ for_each_rsnd_mod(mod, n, io)
-+ ret |= rsnd_dai_disconnect(mod);
-+
-+ return ret;
-+}
-+
- static int rsnd_dai_probe(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-@@ -634,12 +686,14 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- drv[i].playback.formats = RSND_FMTS;
- drv[i].playback.channels_min = 2;
- drv[i].playback.channels_max = 2;
-+ rsnd_path_init(priv, &rdai[i], &rdai[i].playback);
- }
- if (cmod) {
- drv[i].capture.rates = RSND_RATES;
- drv[i].capture.formats = RSND_FMTS;
- drv[i].capture.channels_min = 2;
- drv[i].capture.channels_max = 2;
-+ rsnd_path_init(priv, &rdai[i], &rdai[i].capture);
- }
-
- dev_dbg(dev, "%s (%s/%s)\n", rdai[i].name,
-@@ -653,6 +707,14 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- static void rsnd_dai_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-+ struct rsnd_dai *rdai;
-+ int i;
-+
-+ for (i = 0; i < rsnd_rdai_nr(priv); i++) {
-+ rdai = rsnd_dai_get(priv, i);
-+ rsnd_path_exit(priv, rdai, &rdai->playback);
-+ rsnd_path_exit(priv, rdai, &rdai->capture);
-+ }
- }
-
- /*
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index bcb98f4be831..4f2c1d0c6970 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -155,62 +155,6 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
- return 0;
- }
-
--int rsnd_gen_path_init(struct rsnd_priv *priv,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_mod *mod;
-- int ret;
-- int id;
--
-- /*
-- * Gen1 is created by SRU/SSI, and this SRU is base module of
-- * Gen2's SCU/SSIU/SSI. (Gen2 SCU/SSIU came from SRU)
-- *
-- * Easy image is..
-- * Gen1 SRU = Gen2 SCU + SSIU + etc
-- *
-- * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is
-- * using fixed path.
-- *
-- * Then, SSI id = SCU id here
-- */
--
-- /* get SSI's ID */
-- mod = rsnd_ssi_mod_get_frm_dai(priv,
-- rsnd_dai_id(priv, rdai),
-- rsnd_dai_is_play(rdai, io));
-- id = rsnd_mod_id(mod);
--
-- /* SCU */
-- mod = rsnd_scu_mod_get(priv, id);
-- ret = rsnd_dai_connect(rdai, mod, io);
-- if (ret < 0)
-- return ret;
--
-- /* SSI */
-- mod = rsnd_ssi_mod_get(priv, id);
-- ret = rsnd_dai_connect(rdai, mod, io);
--
-- return ret;
--}
--
--int rsnd_gen_path_exit(struct rsnd_priv *priv,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_mod *mod, *n;
-- int ret = 0;
--
-- /*
-- * remove all mod from rdai
-- */
-- for_each_rsnd_mod(mod, n, io)
-- ret |= rsnd_dai_disconnect(mod);
--
-- return ret;
--}
--
- /*
- * Gen2
- */
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 3962a50977e5..6a25203e0f08 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -210,9 +210,6 @@ struct rsnd_dai {
- i++)
-
- struct rsnd_dai *rsnd_dai_get(struct rsnd_priv *priv, int id);
--int rsnd_dai_disconnect(struct rsnd_mod *mod);
--int rsnd_dai_connect(struct rsnd_dai *rdai, struct rsnd_mod *mod,
-- struct rsnd_dai_stream *io);
- int rsnd_dai_is_play(struct rsnd_dai *rdai, struct rsnd_dai_stream *io);
- int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai);
- #define rsnd_dai_get_platform_info(rdai) ((rdai)->info)
-@@ -229,12 +226,6 @@ int rsnd_gen_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
- void rsnd_gen_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
--int rsnd_gen_path_init(struct rsnd_priv *priv,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
--int rsnd_gen_path_exit(struct rsnd_priv *priv,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
- void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- enum rsnd_reg reg);
---
-2.1.2
-
diff --git a/patches.renesas/0055-ASoC-rsnd-use-mod-array-instead-of-list-on-rdai.patch b/patches.renesas/0055-ASoC-rsnd-use-mod-array-instead-of-list-on-rdai.patch
deleted file mode 100644
index dfdbeb844e837..0000000000000
--- a/patches.renesas/0055-ASoC-rsnd-use-mod-array-instead-of-list-on-rdai.patch
+++ /dev/null
@@ -1,223 +0,0 @@
-From 44680793de15ac3605394c9a4814d2a32e90e0ef Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:42:55 -0800
-Subject: ASoC: rsnd: use mod array instead of list on rdai
-
-struct rsnd_dai_stream used list for mod list.
-It added only odd flexibility to current driver, and
-it is a factor which makes extendibility difficult.
-rsnd use mod array instead of list from now.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit a126021d144bae88a563db2b57b0ad5eb1ee66d9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 42 +++++++++++++++++++++++-------------------
- sound/soc/sh/rcar/rsnd.h | 12 ++++++++----
- sound/soc/sh/rcar/scu.c | 2 +-
- sound/soc/sh/rcar/ssi.c | 2 +-
- 4 files changed, 33 insertions(+), 25 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 96cb78612a7d..416b0782503a 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -121,12 +121,13 @@ char *rsnd_mod_name(struct rsnd_mod *mod)
- void rsnd_mod_init(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- struct rsnd_mod_ops *ops,
-+ enum rsnd_mod_type type,
- int id)
- {
- mod->priv = priv;
- mod->id = id;
- mod->ops = ops;
-- INIT_LIST_HEAD(&mod->list);
-+ mod->type = type;
- }
-
- /*
-@@ -307,9 +308,12 @@ void rsnd_dma_quit(struct rsnd_priv *priv,
-
- #define rsnd_dai_call(rdai, io, fn) \
- ({ \
-- struct rsnd_mod *mod, *n; \
-- int ret = 0; \
-- for_each_rsnd_mod(mod, n, (io)) { \
-+ struct rsnd_mod *mod; \
-+ int ret = 0, i; \
-+ for (i = 0; i < RSND_MOD_MAX; i++) { \
-+ mod = (io)->mod[i]; \
-+ if (!mod) \
-+ continue; \
- ret = rsnd_mod_call(mod, fn, (rdai), (io)); \
- if (ret < 0) \
- break; \
-@@ -317,14 +321,13 @@ void rsnd_dma_quit(struct rsnd_priv *priv,
- ret; \
- })
-
--static int rsnd_dai_connect(struct rsnd_dai *rdai,
-- struct rsnd_mod *mod,
-+static int rsnd_dai_connect(struct rsnd_mod *mod,
- struct rsnd_dai_stream *io)
- {
- if (!mod)
- return -EIO;
-
-- if (!list_empty(&mod->list)) {
-+ if (io->mod[mod->type]) {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct device *dev = rsnd_priv_to_dev(priv);
-
-@@ -334,15 +337,15 @@ static int rsnd_dai_connect(struct rsnd_dai *rdai,
- return -EIO;
- }
-
-- list_add_tail(&mod->list, &io->head);
-+ io->mod[mod->type] = mod;
- mod->io = io;
-
- return 0;
- }
-
--static int rsnd_dai_disconnect(struct rsnd_mod *mod)
-+static int rsnd_dai_disconnect(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
- {
-- list_del_init(&mod->list);
-+ io->mod[mod->type] = NULL;
- mod->io = NULL;
-
- return 0;
-@@ -596,7 +599,7 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- /* SCU */
- mod = rsnd_scu_mod_get(priv, id);
- if (mod) {
-- ret = rsnd_dai_connect(rdai, mod, io);
-+ ret = rsnd_dai_connect(mod, io);
- if (ret < 0)
- return ret;
- }
-@@ -604,7 +607,7 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- /* SSI */
- mod = rsnd_ssi_mod_get(priv, id);
- if (mod) {
-- ret = rsnd_dai_connect(rdai, mod, io);
-+ ret = rsnd_dai_connect(mod, io);
- if (ret < 0)
- return ret;
- }
-@@ -616,14 +619,18 @@ static int rsnd_path_exit(struct rsnd_priv *priv,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- struct rsnd_mod *mod, *n;
-- int ret = 0;
-+ struct rsnd_mod *mod;
-+ int ret = 0, i;
-
- /*
- * remove all mod from rdai
- */
-- for_each_rsnd_mod(mod, n, io)
-- ret |= rsnd_dai_disconnect(mod);
-+ for (i = 0; i < RSND_MOD_MAX; i++) {
-+ mod = io->mod[i];
-+ if (!mod)
-+ continue;
-+ ret |= rsnd_dai_disconnect(mod, io);
-+ }
-
- return ret;
- }
-@@ -671,9 +678,6 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- /*
- * init rsnd_dai
- */
-- INIT_LIST_HEAD(&rdai[i].playback.head);
-- INIT_LIST_HEAD(&rdai[i].capture.head);
--
- snprintf(rdai[i].name, RSND_DAI_NAME_SIZE, "rsnd-dai.%d", i);
-
- /*
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 6a25203e0f08..7767a8f1994a 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -135,6 +135,11 @@ void rsnd_dma_quit(struct rsnd_priv *priv,
- /*
- * R-Car sound mod
- */
-+enum rsnd_mod_type {
-+ RSND_MOD_SCU = 0,
-+ RSND_MOD_SSI,
-+ RSND_MOD_MAX,
-+};
-
- struct rsnd_mod_ops {
- char *name;
-@@ -155,9 +160,9 @@ struct rsnd_mod_ops {
- struct rsnd_dai_stream;
- struct rsnd_mod {
- int id;
-+ enum rsnd_mod_type type;
- struct rsnd_priv *priv;
- struct rsnd_mod_ops *ops;
-- struct list_head list; /* connect to rsnd_dai playback/capture */
- struct rsnd_dma dma;
- struct rsnd_dai_stream *io;
- };
-@@ -167,12 +172,11 @@ struct rsnd_mod {
- #define rsnd_dma_to_mod(_dma) container_of((_dma), struct rsnd_mod, dma)
- #define rsnd_mod_to_io(mod) ((mod)->io)
- #define rsnd_mod_id(mod) ((mod)->id)
--#define for_each_rsnd_mod(pos, n, io) \
-- list_for_each_entry_safe(pos, n, &(io)->head, list)
-
- void rsnd_mod_init(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- struct rsnd_mod_ops *ops,
-+ enum rsnd_mod_type type,
- int id);
- char *rsnd_mod_name(struct rsnd_mod *mod);
-
-@@ -181,8 +185,8 @@ char *rsnd_mod_name(struct rsnd_mod *mod);
- */
- #define RSND_DAI_NAME_SIZE 16
- struct rsnd_dai_stream {
-- struct list_head head; /* head of rsnd_mod list */
- struct snd_pcm_substream *substream;
-+ struct rsnd_mod *mod[RSND_MOD_MAX];
- int byte_pos;
- int period_pos;
- int byte_per_period;
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 882e837d39d1..81264ecd82ac 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -659,7 +659,7 @@ int rsnd_scu_probe(struct platform_device *pdev,
- ops = &rsnd_scu_non_gen2_ops;
- }
-
-- rsnd_mod_init(priv, &scu->mod, ops, i);
-+ rsnd_mod_init(priv, &scu->mod, ops, RSND_MOD_SCU, i);
-
- dev_dbg(dev, "SCU%d probed\n", i);
- }
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 38a62a883b83..480dde5076b7 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -584,7 +584,7 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- dev_dbg(dev, "SSI%d use PIO transfer\n", i);
- }
-
-- rsnd_mod_init(priv, &ssi->mod, ops, i);
-+ rsnd_mod_init(priv, &ssi->mod, ops, RSND_MOD_SSI, i);
-
- rsnd_ssi_parent_clk_setup(priv, ssi);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0056-ASoC-rsnd-get-ssi-scu-from-rsnd_dai_stream.patch b/patches.renesas/0056-ASoC-rsnd-get-ssi-scu-from-rsnd_dai_stream.patch
deleted file mode 100644
index ca626a0d0f2ee..0000000000000
--- a/patches.renesas/0056-ASoC-rsnd-get-ssi-scu-from-rsnd_dai_stream.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 56e4fb14ea973ccfdc676c9e1be148813caf3339 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:43:03 -0800
-Subject: ASoC: rsnd: get ssi/scu from rsnd_dai_stream
-
-Current driver is assuming that SSI id = SCU id.
-But, now, it can get correct SSI/SCU from
-rsnd_dai_stream. use it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 374e5426377604a94d672650ef22dd2b4285de17)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 4 +++-
- sound/soc/sh/rcar/scu.c | 20 +++++++++++---------
- sound/soc/sh/rcar/ssi.c | 2 +-
- 3 files changed, 15 insertions(+), 11 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 7767a8f1994a..cbc38a2be81c 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -192,6 +192,8 @@ struct rsnd_dai_stream {
- int byte_per_period;
- int next_period_byte;
- };
-+#define rsnd_io_to_mod_ssi(io) ((io)->mod[RSND_MOD_SSI])
-+#define rsnd_io_to_mod_scu(io) ((io)->mod[RSND_MOD_SCU])
-
- struct rsnd_dai {
- char name[RSND_DAI_NAME_SIZE];
-@@ -311,7 +313,7 @@ void rsnd_scu_remove(struct platform_device *pdev,
- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
-- struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime);
-
- #define rsnd_scu_nr(priv) ((priv)->scu_nr)
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 81264ecd82ac..1073d35486e3 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -121,7 +121,8 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- int id = rsnd_mod_id(mod);
-+ struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
-+ int ssi_id = rsnd_mod_id(ssi_mod);
- u32 convert_rate = rsnd_scu_convert_rate(scu);
-
- if (convert_rate && !rsnd_dai_is_clk_master(rdai)) {
-@@ -134,15 +135,15 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- /*
- * SSI_MODE0
- */
-- rsnd_mod_bset(mod, SSI_MODE0, (1 << id),
-- rsnd_scu_hpbif_is_enable(scu) ? 0 : (1 << id));
-+ rsnd_mod_bset(mod, SSI_MODE0, (1 << ssi_id),
-+ rsnd_scu_hpbif_is_enable(scu) ? 0 : (1 << ssi_id));
-
- /*
- * SSI_MODE1
- */
-- if (rsnd_ssi_is_pin_sharing(rsnd_ssi_mod_get(priv, id))) {
-+ if (rsnd_ssi_is_pin_sharing(ssi_mod)) {
- int shift = -1;
-- switch (id) {
-+ switch (ssi_id) {
- case 1:
- shift = 0;
- break;
-@@ -165,14 +166,13 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- }
-
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
-- struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime)
- {
- struct rsnd_scu *scu;
- unsigned int rate;
-
-- /* this function is assuming SSI id = SCU id here */
-- scu = rsnd_mod_to_scu(rsnd_scu_mod_get(priv, rsnd_mod_id(ssi_mod)));
-+ scu = rsnd_mod_to_scu(rsnd_io_to_mod_scu(io));
-
- /*
- * return convert rate if SRC is used,
-@@ -583,8 +583,10 @@ static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-+ struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
-+
- /* enable PIO interrupt */
-- rsnd_mod_write(mod, INT_ENABLE, 0x0f000000);
-+ rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
-
- return 0;
- }
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 480dde5076b7..25a7d441f8fc 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -121,7 +121,7 @@ static int rsnd_ssi_master_clk_start(struct rsnd_ssi *ssi,
- 1, 2, 4, 8, 16, 6, 12,
- };
- unsigned int main_rate;
-- unsigned int rate = rsnd_scu_get_ssi_rate(priv, &ssi->mod, runtime);
-+ unsigned int rate = rsnd_scu_get_ssi_rate(priv, io, runtime);
-
- /*
- * Find best clock, and try to start ADG
---
-2.1.2
-
diff --git a/patches.renesas/0057-ASoC-rsnd-use-devm_clk_get-instead-of-clk_get.patch b/patches.renesas/0057-ASoC-rsnd-use-devm_clk_get-instead-of-clk_get.patch
deleted file mode 100644
index 642bc6fad1cfb..0000000000000
--- a/patches.renesas/0057-ASoC-rsnd-use-devm_clk_get-instead-of-clk_get.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 4f8c2378fd4e9692ef3ad8a1a9c09d162b9c72d1 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:43:11 -0800
-Subject: ASoC: rsnd: use devm_clk_get() instead of clk_get()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 468be93eb4e28c5710ed8acc1b938937707e537c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 24 +++++++++---------------
- 1 file changed, 9 insertions(+), 15 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index 69d9394f3697..a05ad8159824 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -405,11 +405,11 @@ int rsnd_adg_probe(struct platform_device *pdev,
- return -ENOMEM;
- }
-
-- clk_orig = clk_get(dev, NULL);
-- adg->clk[CLKA] = clk_get(dev, "clk_a");
-- adg->clk[CLKB] = clk_get(dev, "clk_b");
-- adg->clk[CLKC] = clk_get(dev, "clk_c");
-- adg->clk[CLKI] = clk_get(dev, "clk_i");
-+ clk_orig = devm_clk_get(dev, NULL);
-+ adg->clk[CLKA] = devm_clk_get(dev, "clk_a");
-+ adg->clk[CLKB] = devm_clk_get(dev, "clk_b");
-+ adg->clk[CLKC] = devm_clk_get(dev, "clk_c");
-+ adg->clk[CLKI] = devm_clk_get(dev, "clk_i");
-
- /*
- * It request device dependent audio clock.
-@@ -432,10 +432,10 @@ int rsnd_adg_probe(struct platform_device *pdev,
- * but will be removed soon
- */
- if (use_old_style) {
-- adg->clk[CLKA] = clk_get(NULL, "audio_clk_a");
-- adg->clk[CLKB] = clk_get(NULL, "audio_clk_b");
-- adg->clk[CLKC] = clk_get(NULL, "audio_clk_c");
-- adg->clk[CLKI] = clk_get(NULL, "audio_clk_internal");
-+ adg->clk[CLKA] = devm_clk_get(NULL, "audio_clk_a");
-+ adg->clk[CLKB] = devm_clk_get(NULL, "audio_clk_b");
-+ adg->clk[CLKC] = devm_clk_get(NULL, "audio_clk_c");
-+ adg->clk[CLKI] = devm_clk_get(NULL, "audio_clk_internal");
- }
-
- for_each_rsnd_clk(clk, adg, i) {
-@@ -457,10 +457,4 @@ int rsnd_adg_probe(struct platform_device *pdev,
- void rsnd_adg_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-- struct rsnd_adg *adg = priv->adg;
-- struct clk *clk;
-- int i;
--
-- for_each_rsnd_clk(clk, adg, i)
-- clk_put(clk);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch b/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch
deleted file mode 100644
index bac1d4f8a3c32..0000000000000
--- a/patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 75f5aa4638c8a5b59058162e7a5f7e96ea5e08b1 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:43:18 -0800
-Subject: ASoC: rsnd: use function pointer for each probe
-
-R-Car sound consists of many devices.
-It will have more device support in the future.
-Thus, for each probe become now function pointer array.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit d1ac970f5de94bef9e094b46f016899d04e8178b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 34 ++++++++++++++--------------------
- 1 file changed, 14 insertions(+), 20 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -813,7 +813,15 @@ static int rsnd_probe(struct platform_de
- struct rcar_snd_info *info;
- struct rsnd_priv *priv;
- struct device *dev = &pdev->dev;
-- int ret;
-+ int (*probe_func[])(struct platform_device *pdev,
-+ struct rsnd_priv *priv) = {
-+ rsnd_gen_probe,
-+ rsnd_ssi_probe,
-+ rsnd_scu_probe,
-+ rsnd_adg_probe,
-+ rsnd_dai_probe,
-+ };
-+ int ret, i;
-
- info = pdev->dev.platform_data;
- if (!info) {
-@@ -837,25 +845,11 @@ static int rsnd_probe(struct platform_de
- /*
- * init each module
- */
-- ret = rsnd_gen_probe(pdev, priv);
-- if (ret)
-- return ret;
--
-- ret = rsnd_ssi_probe(pdev, priv);
-- if (ret)
-- return ret;
--
-- ret = rsnd_scu_probe(pdev, priv);
-- if (ret)
-- return ret;
--
-- ret = rsnd_adg_probe(pdev, priv);
-- if (ret)
-- return ret;
--
-- ret = rsnd_dai_probe(pdev, priv);
-- if (ret)
-- return ret;
-+ for (i = 0; i < ARRAY_SIZE(probe_func); i++) {
-+ ret = probe_func[i](pdev, priv);
-+ if (ret)
-+ return ret;
-+ }
-
- /*
- * asoc register
diff --git a/patches.renesas/0059-ASoC-rsnd-remove-unused-SSI_CONTROL.patch b/patches.renesas/0059-ASoC-rsnd-remove-unused-SSI_CONTROL.patch
deleted file mode 100644
index 06007fbcafc1e..0000000000000
--- a/patches.renesas/0059-ASoC-rsnd-remove-unused-SSI_CONTROL.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From c35caa925fb5328f2c318dfb2d6944b849cfd6e9 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:43:26 -0800
-Subject: ASoC: rsnd: remove unused SSI_CONTROL
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 685fb3eb31445bd872ab30ae301404b2cac7cd75)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 1 -
- sound/soc/sh/rcar/rsnd.h | 1 -
- 2 files changed, 2 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 4f2c1d0c6970..92d1bc9acef0 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -173,7 +173,6 @@ static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen)
- RSND_GEN2_S_REG(gen, SSIU, SSI_MODE0, 0x800),
- RSND_GEN2_S_REG(gen, SSIU, SSI_MODE1, 0x804),
- /* FIXME: it needs SSI_MODE2/3 in the future */
-- RSND_GEN2_S_REG(gen, SSIU, SSI_CONTROL, 0x810),
- RSND_GEN2_M_REG(gen, SSIU, SSI_BUSIF_MODE, 0x0, 0x80),
- RSND_GEN2_M_REG(gen, SSIU, SSI_BUSIF_ADINR,0x4, 0x80),
- RSND_GEN2_M_REG(gen, SSIU, SSI_CTRL, 0x10, 0x80),
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index cbc38a2be81c..e16acd2037a0 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -39,7 +39,6 @@ enum rsnd_reg {
- RSND_REG_SRC_ROUTE_CTRL, /* for Gen1 */
- RSND_REG_SRC_CTRL, /* for Gen2 */
- RSND_REG_SSI_CTRL, /* for Gen2 */
-- RSND_REG_SSI_CONTROL,
- RSND_REG_SSI_BUSIF_MODE, /* for Gen2 */
- RSND_REG_SSI_BUSIF_ADINR, /* for Gen2 */
- RSND_REG_SSI_MODE0,
---
-2.1.2
-
diff --git a/patches.renesas/0060-ASoC-rsnd-modify-rsnd_adg_ssi_ws_timing_gen2-paramet.patch b/patches.renesas/0060-ASoC-rsnd-modify-rsnd_adg_ssi_ws_timing_gen2-paramet.patch
deleted file mode 100644
index 59efff1c531dd..0000000000000
--- a/patches.renesas/0060-ASoC-rsnd-modify-rsnd_adg_ssi_ws_timing_gen2-paramet.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 963979a0770e4d621ff352969f42df987d2bb6d0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:43:33 -0800
-Subject: ASoC: rsnd: modify rsnd_adg_ssi_ws_timing_gen2() parameter
-
-rsnd_adg_ssi_ws_timing_gen2() returns SSI WS timing,
-and it used "mod" as parameter.
-but, this "mod" is sometimes not ssi mod.
-Get SSI mod from rsnd_dai_stream
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8467dedc9dae3630a2ede49a43120af3ed54ba19)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index a05ad8159824..8df00ac3b120 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -32,8 +32,9 @@ struct rsnd_adg {
- #define rsnd_priv_to_adg(priv) ((struct rsnd_adg *)(priv)->adg)
-
-
--static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_mod *mod)
-+static u32 rsnd_adg_ssi_ws_timing_gen2(struct rsnd_dai_stream *io)
- {
-+ struct rsnd_mod *mod = rsnd_io_to_mod_ssi(io);
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- int id = rsnd_mod_id(mod);
- int ws = id;
-@@ -67,7 +68,7 @@ static int rsnd_adg_set_src_timsel_gen2(struct rsnd_dai *rdai,
- u32 mask, ws;
- u32 in, out;
-
-- ws = rsnd_adg_ssi_ws_timing_gen2(mod);
-+ ws = rsnd_adg_ssi_ws_timing_gen2(io);
-
- in = (is_play) ? timsel : ws;
- out = (is_play) ? ws : timsel;
-@@ -174,7 +175,7 @@ int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- u32 val = rsnd_adg_ssi_ws_timing_gen2(mod);
-+ u32 val = rsnd_adg_ssi_ws_timing_gen2(io);
-
- return rsnd_adg_set_src_timsel_gen2(rdai, mod, io, val);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0061-ASoC-rsnd-share-reg_field-and-reduce-memory.patch b/patches.renesas/0061-ASoC-rsnd-share-reg_field-and-reduce-memory.patch
deleted file mode 100644
index 044d087924a96..0000000000000
--- a/patches.renesas/0061-ASoC-rsnd-share-reg_field-and-reduce-memory.patch
+++ /dev/null
@@ -1,138 +0,0 @@
-From 7487540b5911007d07f79c8cb4f715116c994b0f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 23:43:40 -0800
-Subject: ASoC: rsnd: share reg_field and reduce memory
-
-Gen1/Gen2 code never be used in same time.
-Thus, driver can share Gen1 only register and Gen2 only register.
-It can reduce memory too.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c82e1c8874e5abaf52f9ed886386cbe08ec98a5b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 81 +++++++++++++++++++++++++++++++-----------------
- 1 file changed, 53 insertions(+), 28 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index e16acd2037a0..d5afdee6b6f2 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -32,18 +32,8 @@
- */
- enum rsnd_reg {
- /* SRU/SCU/SSIU */
-- RSND_REG_SRC_ROUTE_SEL, /* for Gen1 */
-- RSND_REG_SRC_TMG_SEL0, /* for Gen1 */
-- RSND_REG_SRC_TMG_SEL1, /* for Gen1 */
-- RSND_REG_SRC_TMG_SEL2, /* for Gen1 */
-- RSND_REG_SRC_ROUTE_CTRL, /* for Gen1 */
-- RSND_REG_SRC_CTRL, /* for Gen2 */
-- RSND_REG_SSI_CTRL, /* for Gen2 */
-- RSND_REG_SSI_BUSIF_MODE, /* for Gen2 */
-- RSND_REG_SSI_BUSIF_ADINR, /* for Gen2 */
- RSND_REG_SSI_MODE0,
- RSND_REG_SSI_MODE1,
-- RSND_REG_INT_ENABLE, /* for Gen2 */
- RSND_REG_SRC_BUSIF_MODE,
- RSND_REG_SRC_ROUTE_MODE0,
- RSND_REG_SRC_SWRSR,
-@@ -52,9 +42,6 @@ enum rsnd_reg {
- RSND_REG_SRC_IFSCR,
- RSND_REG_SRC_IFSVR,
- RSND_REG_SRC_SRCCR,
-- RSND_REG_SRC_MNFSR, /* for Gen1 */
-- RSND_REG_SRC_BSDSR, /* for Gen2 */
-- RSND_REG_SRC_BSISR, /* for Gen2 */
-
- /* ADG */
- RSND_REG_BRRA,
-@@ -62,21 +49,6 @@ enum rsnd_reg {
- RSND_REG_SSICKR,
- RSND_REG_AUDIO_CLK_SEL0,
- RSND_REG_AUDIO_CLK_SEL1,
-- RSND_REG_AUDIO_CLK_SEL2,
-- RSND_REG_AUDIO_CLK_SEL3, /* for Gen1 */
-- RSND_REG_AUDIO_CLK_SEL4, /* for Gen1 */
-- RSND_REG_AUDIO_CLK_SEL5, /* for Gen1 */
-- RSND_REG_DIV_EN, /* for Gen2 */
-- RSND_REG_SRCIN_TIMSEL0, /* for Gen2 */
-- RSND_REG_SRCIN_TIMSEL1, /* for Gen2 */
-- RSND_REG_SRCIN_TIMSEL2, /* for Gen2 */
-- RSND_REG_SRCIN_TIMSEL3, /* for Gen2 */
-- RSND_REG_SRCIN_TIMSEL4, /* for Gen2 */
-- RSND_REG_SRCOUT_TIMSEL0, /* for Gen2 */
-- RSND_REG_SRCOUT_TIMSEL1, /* for Gen2 */
-- RSND_REG_SRCOUT_TIMSEL2, /* for Gen2 */
-- RSND_REG_SRCOUT_TIMSEL3, /* for Gen2 */
-- RSND_REG_SRCOUT_TIMSEL4, /* for Gen2 */
-
- /* SSI */
- RSND_REG_SSICR,
-@@ -85,9 +57,62 @@ enum rsnd_reg {
- RSND_REG_SSIRDR,
- RSND_REG_SSIWSR,
-
-+ /* SHARE see below */
-+ RSND_REG_SHARE01,
-+ RSND_REG_SHARE02,
-+ RSND_REG_SHARE03,
-+ RSND_REG_SHARE04,
-+ RSND_REG_SHARE05,
-+ RSND_REG_SHARE06,
-+ RSND_REG_SHARE07,
-+ RSND_REG_SHARE08,
-+ RSND_REG_SHARE09,
-+ RSND_REG_SHARE10,
-+ RSND_REG_SHARE11,
-+ RSND_REG_SHARE12,
-+ RSND_REG_SHARE13,
-+ RSND_REG_SHARE14,
-+ RSND_REG_SHARE15,
-+ RSND_REG_SHARE16,
-+ RSND_REG_SHARE17,
-+ RSND_REG_SHARE18,
-+ RSND_REG_SHARE19,
-+
- RSND_REG_MAX,
- };
-
-+/* Gen1 only */
-+#define RSND_REG_SRC_ROUTE_SEL RSND_REG_SHARE01
-+#define RSND_REG_SRC_TMG_SEL0 RSND_REG_SHARE02
-+#define RSND_REG_SRC_TMG_SEL1 RSND_REG_SHARE03
-+#define RSND_REG_SRC_TMG_SEL2 RSND_REG_SHARE04
-+#define RSND_REG_SRC_ROUTE_CTRL RSND_REG_SHARE05
-+#define RSND_REG_SRC_MNFSR RSND_REG_SHARE06
-+#define RSND_REG_AUDIO_CLK_SEL3 RSND_REG_SHARE07
-+#define RSND_REG_AUDIO_CLK_SEL4 RSND_REG_SHARE08
-+#define RSND_REG_AUDIO_CLK_SEL5 RSND_REG_SHARE09
-+
-+/* Gen2 only */
-+#define RSND_REG_SRC_CTRL RSND_REG_SHARE01
-+#define RSND_REG_SSI_CTRL RSND_REG_SHARE02
-+#define RSND_REG_SSI_BUSIF_MODE RSND_REG_SHARE03
-+#define RSND_REG_SSI_BUSIF_ADINR RSND_REG_SHARE04
-+#define RSND_REG_INT_ENABLE RSND_REG_SHARE05
-+#define RSND_REG_SRC_BSDSR RSND_REG_SHARE06
-+#define RSND_REG_SRC_BSISR RSND_REG_SHARE07
-+#define RSND_REG_DIV_EN RSND_REG_SHARE08
-+#define RSND_REG_SRCIN_TIMSEL0 RSND_REG_SHARE09
-+#define RSND_REG_SRCIN_TIMSEL1 RSND_REG_SHARE10
-+#define RSND_REG_SRCIN_TIMSEL2 RSND_REG_SHARE11
-+#define RSND_REG_SRCIN_TIMSEL3 RSND_REG_SHARE12
-+#define RSND_REG_SRCIN_TIMSEL4 RSND_REG_SHARE13
-+#define RSND_REG_SRCOUT_TIMSEL0 RSND_REG_SHARE14
-+#define RSND_REG_SRCOUT_TIMSEL1 RSND_REG_SHARE15
-+#define RSND_REG_SRCOUT_TIMSEL2 RSND_REG_SHARE16
-+#define RSND_REG_SRCOUT_TIMSEL3 RSND_REG_SHARE17
-+#define RSND_REG_SRCOUT_TIMSEL4 RSND_REG_SHARE18
-+#define RSND_REG_AUDIO_CLK_SEL2 RSND_REG_SHARE19
-+
- struct rsnd_priv;
- struct rsnd_mod;
- struct rsnd_dai;
---
-2.1.2
-
diff --git a/patches.renesas/0062-ASoC-rsnd-add-struct-rsnd_dai_platform_info.patch b/patches.renesas/0062-ASoC-rsnd-add-struct-rsnd_dai_platform_info.patch
deleted file mode 100644
index d7ba8a1a51795..0000000000000
--- a/patches.renesas/0062-ASoC-rsnd-add-struct-rsnd_dai_platform_info.patch
+++ /dev/null
@@ -1,161 +0,0 @@
-From 901d902786cac94723492d214a6ed6a6a4b6efd9 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:49:50 -0800
-Subject: ASoC: rsnd: add struct rsnd_dai_platform_info
-
-R-Car sound DAI consists from SSI/SCU/SSIU/SRU...
-Current R-Car sound DAI is decided from these settings,
-but it is intuitively unclear, and is not good design for DT support.
-This patch adds new rsnd_dai_platform_info to solve this issue.
-
-But now, many platform is using this driver without
-rsnd_dai_platform_info.
-So, this patch still supports DAI settings via SSI to keep compatible.
-It will be removed in next Linux version.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 78f13d0c5a2888564b2bed7f8433c8ec889997ff)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 17 ++++++++++++++++-
- sound/soc/sh/rcar/core.c | 23 ++++++++++++++++-------
- sound/soc/sh/rcar/ssi.c | 14 ++++++++++++++
- 3 files changed, 46 insertions(+), 8 deletions(-)
-
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index e3d585c67685..698f7b5fc76d 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -36,13 +36,15 @@
- #define RSND_SSI_CLK_PIN_SHARE (1 << 31)
- #define RSND_SSI_PLAY (1 << 24)
-
-+#define RSND_SSI(_dma_id, _pio_irq, _flags) \
-+{ .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
- #define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags) \
- { .dai_id = _dai_id, .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
- #define RSND_SSI_UNUSED \
- { .dai_id = -1, .dma_id = -1, .pio_irq = -1, .flags = 0 }
-
- struct rsnd_ssi_platform_info {
-- int dai_id;
-+ int dai_id; /* will be removed */
- int dma_id;
- int pio_irq;
- u32 flags;
-@@ -53,6 +55,8 @@ struct rsnd_ssi_platform_info {
- */
- #define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */
-
-+#define RSND_SCU(rate, _dma_id) \
-+{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
- #define RSND_SCU_SET(rate, _dma_id) \
- { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
- #define RSND_SCU_UNUSED \
-@@ -64,6 +68,15 @@ struct rsnd_scu_platform_info {
- int dma_id; /* for Gen2 SCU */
- };
-
-+struct rsnd_dai_path_info {
-+ struct rsnd_ssi_platform_info *ssi;
-+};
-+
-+struct rsnd_dai_platform_info {
-+ struct rsnd_dai_path_info playback;
-+ struct rsnd_dai_path_info capture;
-+};
-+
- /*
- * flags
- *
-@@ -81,6 +94,8 @@ struct rcar_snd_info {
- int ssi_info_nr;
- struct rsnd_scu_platform_info *scu_info;
- int scu_info_nr;
-+ struct rsnd_dai_platform_info *dai_info;
-+ int dai_info_nr;
- int (*start)(int id);
- int (*stop)(int id);
- };
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index ea747614fbf8..450472633eb1 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -639,19 +639,26 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
- struct snd_soc_dai_driver *drv;
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct rsnd_dai *rdai;
- struct rsnd_mod *pmod, *cmod;
- struct device *dev = rsnd_priv_to_dev(priv);
-- int dai_nr;
-+ int dai_nr = info->dai_info_nr;
- int i;
-
-- /* get max dai nr */
-- for (dai_nr = 0; dai_nr < 32; dai_nr++) {
-- pmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 1);
-- cmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 0);
-+ /*
-+ * dai_nr should be set via dai_info_nr,
-+ * but allow it to keeping compatible
-+ */
-+ if (!dai_nr) {
-+ /* get max dai nr */
-+ for (dai_nr = 0; dai_nr < 32; dai_nr++) {
-+ pmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 1);
-+ cmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 0);
-
-- if (!pmod && !cmod)
-- break;
-+ if (!pmod && !cmod)
-+ break;
-+ }
- }
-
- if (!dai_nr) {
-@@ -671,6 +678,8 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- priv->rdai = rdai;
-
- for (i = 0; i < dai_nr; i++) {
-+ if (info->dai_info)
-+ rdai[i].info = &info->dai_info[i];
-
- pmod = rsnd_ssi_mod_get_frm_dai(priv, i, 1);
- cmod = rsnd_ssi_mod_get_frm_dai(priv, i, 0);
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 25a7d441f8fc..34234813f742 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -451,12 +451,26 @@ static struct rsnd_mod_ops rsnd_ssi_non_ops = {
- struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
- int dai_id, int is_play)
- {
-+ struct rsnd_dai_platform_info *dai_info = NULL;
-+ struct rsnd_dai_path_info *path_info = NULL;
-+ struct rsnd_ssi_platform_info *target_info = NULL;
- struct rsnd_ssi *ssi;
- int i, has_play;
-
-+ if (priv->rdai)
-+ dai_info = priv->rdai[dai_id].info;
-+ if (dai_info)
-+ path_info = (is_play) ? &dai_info->playback : &dai_info->capture;
-+ if (path_info)
-+ target_info = path_info->ssi;
-+
- is_play = !!is_play;
-
- for_each_rsnd_ssi(ssi, priv, i) {
-+ if (target_info == ssi->info)
-+ return &ssi->mod;
-+
-+ /* for compatible */
- if (rsnd_ssi_dai_id(ssi) != dai_id)
- continue;
-
---
-2.1.2
-
diff --git a/patches.renesas/0063-ASoC-rsnd-Get-correct-SCU-ID.patch b/patches.renesas/0063-ASoC-rsnd-Get-correct-SCU-ID.patch
deleted file mode 100644
index e0eaad8844496..0000000000000
--- a/patches.renesas/0063-ASoC-rsnd-Get-correct-SCU-ID.patch
+++ /dev/null
@@ -1,230 +0,0 @@
-From 32f2350521c74d71d16b2c8e1f4701903fa6c6cf Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:50:00 -0800
-Subject: ASoC: rsnd: Get correct SCU ID
-
-Current rsnd driver is assuming that SCU/SRU ID is
-same as SSIU/SSI ID, because Gen1 can't select it.
-But, Gen2 can select it.
-The SCU/SRU/SSIU/SSI pair depends on the platform.
-This patch get correct SCU ID from platform info.
-To keep compatible, it still assuming SCU ID = SSI ID
-if platform doesn't have info
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 389933d9f6e55a1ef3a71549c36f6283b9f8c145)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 1 +
- sound/soc/sh/rcar/core.c | 47 +++++++++++++++++++++++++++++++++--------------
- sound/soc/sh/rcar/rsnd.h | 14 ++++++++++++++
- sound/soc/sh/rcar/scu.c | 21 ++++++++++++++++-----
- sound/soc/sh/rcar/ssi.c | 9 ++++++++-
- 5 files changed, 72 insertions(+), 20 deletions(-)
-
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index 698f7b5fc76d..1d8c68323f49 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -70,6 +70,7 @@ struct rsnd_scu_platform_info {
-
- struct rsnd_dai_path_info {
- struct rsnd_ssi_platform_info *ssi;
-+ struct rsnd_scu_platform_info *scu;
- };
-
- struct rsnd_dai_platform_info {
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 450472633eb1..7316d10e4649 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -107,6 +107,11 @@
- (!(priv->info->func) ? 0 : \
- priv->info->func(param))
-
-+#define rsnd_is_enable_path(io, name) \
-+ ((io)->info ? (io)->info->name : NULL)
-+#define rsnd_info_id(priv, io, name) \
-+ ((io)->info->name - priv->info->name##_info)
-+
- /*
- * rsnd_mod functions
- */
-@@ -572,8 +577,10 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io)
- {
- struct rsnd_mod *mod;
-+ struct rsnd_dai_platform_info *dai_info = rdai->info;
- int ret;
-- int id;
-+ int ssi_id = -1;
-+ int scu_id = -1;
-
- /*
- * Gen1 is created by SRU/SSI, and this SRU is base module of
-@@ -584,29 +591,35 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- *
- * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is
- * using fixed path.
-- *
-- * Then, SSI id = SCU id here
- */
-- /* get SSI's ID */
-- mod = rsnd_ssi_mod_get_frm_dai(priv,
-- rsnd_dai_id(priv, rdai),
-- rsnd_dai_is_play(rdai, io));
-- if (!mod)
-- return 0;
-- id = rsnd_mod_id(mod);
-+ if (dai_info) {
-+ if (rsnd_is_enable_path(io, ssi))
-+ ssi_id = rsnd_info_id(priv, io, ssi);
-+ if (rsnd_is_enable_path(io, scu))
-+ scu_id = rsnd_info_id(priv, io, scu);
-+ } else {
-+ /* get SSI's ID */
-+ mod = rsnd_ssi_mod_get_frm_dai(priv,
-+ rsnd_dai_id(priv, rdai),
-+ rsnd_dai_is_play(rdai, io));
-+ if (!mod)
-+ return 0;
-+ ssi_id = scu_id = rsnd_mod_id(mod);
-+ }
-+
- ret = 0;
-
- /* SCU */
-- mod = rsnd_scu_mod_get(priv, id);
-- if (mod) {
-+ if (scu_id >= 0) {
-+ mod = rsnd_scu_mod_get(priv, scu_id);
- ret = rsnd_dai_connect(mod, io);
- if (ret < 0)
- return ret;
- }
-
- /* SSI */
-- mod = rsnd_ssi_mod_get(priv, id);
-- if (mod) {
-+ if (ssi_id >= 0) {
-+ mod = rsnd_ssi_mod_get(priv, ssi_id);
- ret = rsnd_dai_connect(mod, io);
- if (ret < 0)
- return ret;
-@@ -699,6 +712,9 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- drv[i].playback.formats = RSND_FMTS;
- drv[i].playback.channels_min = 2;
- drv[i].playback.channels_max = 2;
-+
-+ if (info->dai_info)
-+ rdai[i].playback.info = &info->dai_info[i].playback;
- rsnd_path_init(priv, &rdai[i], &rdai[i].playback);
- }
- if (cmod) {
-@@ -706,6 +722,9 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- drv[i].capture.formats = RSND_FMTS;
- drv[i].capture.channels_min = 2;
- drv[i].capture.channels_max = 2;
-+
-+ if (info->dai_info)
-+ rdai[i].capture.info = &info->dai_info[i].capture;
- rsnd_path_init(priv, &rdai[i], &rdai[i].capture);
- }
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index d5afdee6b6f2..3472631c7b35 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -211,6 +211,7 @@ char *rsnd_mod_name(struct rsnd_mod *mod);
- struct rsnd_dai_stream {
- struct snd_pcm_substream *substream;
- struct rsnd_mod *mod[RSND_MOD_MAX];
-+ struct rsnd_dai_path_info *info; /* rcar_snd.h */
- int byte_pos;
- int period_pos;
- int byte_per_period;
-@@ -328,6 +329,19 @@ struct rsnd_priv {
- #define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags)
- #define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags)
-
-+#define rsnd_info_is_playback(priv, type) \
-+({ \
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv); \
-+ int i, is_play = 0; \
-+ for (i = 0; i < info->dai_info_nr; i++) { \
-+ if (info->dai_info[i].playback.type == (type)->info) { \
-+ is_play = 1; \
-+ break; \
-+ } \
-+ } \
-+ is_play; \
-+})
-+
- /*
- * R-Car SCU
- */
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 1073d35486e3..b517300f32ce 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -620,6 +620,9 @@ int rsnd_scu_probe(struct platform_device *pdev,
- * init SCU
- */
- nr = info->scu_info_nr;
-+ if (!nr)
-+ return 0;
-+
- scu = devm_kzalloc(dev, sizeof(*scu) * nr, GFP_KERNEL);
- if (!scu) {
- dev_err(dev, "SCU allocate failed\n");
-@@ -644,11 +647,19 @@ int rsnd_scu_probe(struct platform_device *pdev,
- if (rsnd_is_gen1(priv))
- ops = &rsnd_scu_gen1_ops;
- if (rsnd_is_gen2(priv)) {
-- struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, i);
-- int ret = rsnd_dma_init(priv,
-- rsnd_mod_to_dma(&scu->mod),
-- rsnd_ssi_is_play(ssi),
-- scu->info->dma_id);
-+ int ret;
-+ int is_play;
-+
-+ if (info->dai_info) {
-+ is_play = rsnd_info_is_playback(priv, scu);
-+ } else {
-+ struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, i);
-+ is_play = rsnd_ssi_is_play(ssi);
-+ }
-+ ret = rsnd_dma_init(priv,
-+ rsnd_mod_to_dma(&scu->mod),
-+ is_play,
-+ scu->info->dma_id);
- if (ret < 0)
- return ret;
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 34234813f742..9162c2bb6cc5 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -567,9 +567,16 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- * SSI DMA case
- */
- if (pinfo->dma_id > 0) {
-+ int is_play;
-+
-+ if (info->dai_info)
-+ is_play = rsnd_info_is_playback(priv, ssi);
-+ else
-+ is_play = rsnd_ssi_is_play(&ssi->mod);
-+
- ret = rsnd_dma_init(
- priv, rsnd_mod_to_dma(&ssi->mod),
-- rsnd_ssi_is_play(&ssi->mod),
-+ is_play,
- pinfo->dma_id);
- if (ret < 0)
- dev_info(dev, "SSI DMA failed. try PIO transter\n");
---
-2.1.2
-
diff --git a/patches.renesas/0064-ASoC-rsnd-add-rsnd_scu_enable_ssi_irq.patch b/patches.renesas/0064-ASoC-rsnd-add-rsnd_scu_enable_ssi_irq.patch
deleted file mode 100644
index 9b418a3e2f360..0000000000000
--- a/patches.renesas/0064-ASoC-rsnd-add-rsnd_scu_enable_ssi_irq.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From f23b14813256fd6fabdfe545bb3770bec2bd43ba Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:50:08 -0800
-Subject: ASoC: rsnd: add rsnd_scu_enable_ssi_irq()
-
-Current R-Car sound driver is assuming that
-SCU mod is used even though it is not needed.
-Because scu.c is controlling SSIU too.
-(it is Gen1 compatibility)
-But, SCU mod will be really not used if new platform dai
-feature was used.
-Thus, SSIU irq setting is called from SSI
-directory by this patch.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b8cc41e9e8cc5beec9dcbe044cfc44aa0325d9e6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 3 +++
- sound/soc/sh/rcar/scu.c | 26 +++++++++++++-------------
- sound/soc/sh/rcar/ssi.c | 2 ++
- 3 files changed, 18 insertions(+), 13 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 3472631c7b35..3b71b77c4fd8 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -353,6 +353,9 @@ struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime);
-+int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io);
-
- #define rsnd_scu_nr(priv) ((priv)->scu_nr)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index b517300f32ce..8ce79e855cf0 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -165,6 +165,19 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- return 0;
- }
-
-+int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
-+
-+ /* enable PIO interrupt if Gen2 */
-+ if (rsnd_is_gen2(priv))
-+ rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
-+
-+ return 0;
-+}
-+
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime)
-@@ -579,22 +592,9 @@ static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
- .stop = rsnd_scu_stop_gen2,
- };
-
--static int rsnd_scu_start_non_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
--
-- /* enable PIO interrupt */
-- rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
--
-- return 0;
--}
--
- static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = {
- .name = "non-scu (gen2)",
- .init = rsnd_scu_ssi_mode_init,
-- .start = rsnd_scu_start_non_gen2,
- };
-
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 9162c2bb6cc5..a74c7a789b2b 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -365,6 +365,8 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
- /* enable PIO IRQ */
- ssi->cr_etc = UIEN | OIEN | DIEN;
-
-+ rsnd_scu_enable_ssi_irq(mod, rdai, io);
-+
- rsnd_ssi_hw_start(ssi, rdai, io);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0065-ASoC-rsnd-call-rsnd_scu_ssi_mode_init-from-SSI.patch b/patches.renesas/0065-ASoC-rsnd-call-rsnd_scu_ssi_mode_init-from-SSI.patch
deleted file mode 100644
index aa3b148e3b044..0000000000000
--- a/patches.renesas/0065-ASoC-rsnd-call-rsnd_scu_ssi_mode_init-from-SSI.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From e752d94624b82b5926740ed3dcf0b65aad83d521 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:50:24 -0800
-Subject: ASoC: rsnd: call rsnd_scu_ssi_mode_init() from SSI
-
-Current R-Car sound driver is assuming that
-SCU mod is used even though it is not needed.
-Because scu.c is controlling SSIU too.
-(it is Gen1 compatibility)
-But, SCU mod will be really not used if new platform dai
-feature was added.
-Thus, rsnd_scu_ssi_mode_init() is called from SSI
-directory by this patch.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 221bf523e31306c1095b28932e079950108e3887)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/rsnd.h | 3 +++
- sound/soc/sh/rcar/scu.c | 54 +++++++++++++++---------------------------------
- sound/soc/sh/rcar/ssi.c | 2 ++
- 3 files changed, 22 insertions(+), 37 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 3b71b77c4fd8..9205f96da2f4 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -353,6 +353,9 @@ struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime);
-+int rsnd_scu_ssi_mode_init(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io);
- int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io);
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 8ce79e855cf0..63e6aeb8c42d 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -115,28 +115,28 @@ struct rsnd_scu {
- /*
- * Gen1/Gen2 common functions
- */
--static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+int rsnd_scu_ssi_mode_init(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- struct rsnd_mod *ssi_mod = rsnd_io_to_mod_ssi(io);
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
-+ struct rsnd_mod *scu_mod = rsnd_io_to_mod_scu(io);
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- int ssi_id = rsnd_mod_id(ssi_mod);
-- u32 convert_rate = rsnd_scu_convert_rate(scu);
--
-- if (convert_rate && !rsnd_dai_is_clk_master(rdai)) {
-- struct device *dev = rsnd_priv_to_dev(priv);
--
-- dev_err(dev, "rsnd should be clk master when you rate convert\n");
-- return -EINVAL;
-- }
-+ int has_scu = 0;
-
- /*
- * SSI_MODE0
- */
-- rsnd_mod_bset(mod, SSI_MODE0, (1 << ssi_id),
-- rsnd_scu_hpbif_is_enable(scu) ? 0 : (1 << ssi_id));
-+ if (info->dai_info) {
-+ has_scu = !!scu_mod;
-+ } else {
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(scu_mod);
-+ has_scu = rsnd_scu_hpbif_is_enable(scu);
-+ }
-+
-+ rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id),
-+ has_scu ? 0 : (1 << ssi_id));
-
- /*
- * SSI_MODE1
-@@ -156,7 +156,7 @@ static int rsnd_scu_ssi_mode_init(struct rsnd_mod *mod,
- }
-
- if (shift >= 0)
-- rsnd_mod_bset(mod, SSI_MODE1,
-+ rsnd_mod_bset(ssi_mod, SSI_MODE1,
- 0x3 << shift,
- rsnd_dai_is_clk_master(rdai) ?
- 0x2 << shift : 0x1 << shift);
-@@ -253,14 +253,9 @@ static int rsnd_scu_init(struct rsnd_mod *mod,
- struct rsnd_dai_stream *io)
- {
- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- int ret;
-
- clk_enable(scu->clk);
-
-- ret = rsnd_scu_ssi_mode_init(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
- return 0;
- }
-
-@@ -487,11 +482,6 @@ static struct rsnd_mod_ops rsnd_scu_gen1_ops = {
- .stop = rsnd_scu_stop_gen1,
- };
-
--static struct rsnd_mod_ops rsnd_scu_non_gen1_ops = {
-- .name = "non-sru (gen1)",
-- .init = rsnd_scu_ssi_mode_init,
--};
--
- /*
- * Gen2 functions
- */
-@@ -592,11 +582,6 @@ static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
- .stop = rsnd_scu_stop_gen2,
- };
-
--static struct rsnd_mod_ops rsnd_scu_non_gen2_ops = {
-- .name = "non-scu (gen2)",
-- .init = rsnd_scu_ssi_mode_init,
--};
--
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
- {
- if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv)))
-@@ -665,11 +650,6 @@ int rsnd_scu_probe(struct platform_device *pdev,
-
- ops = &rsnd_scu_gen2_ops;
- }
-- } else {
-- if (rsnd_is_gen1(priv))
-- ops = &rsnd_scu_non_gen1_ops;
-- if (rsnd_is_gen2(priv))
-- ops = &rsnd_scu_non_gen2_ops;
- }
-
- rsnd_mod_init(priv, &scu->mod, ops, RSND_MOD_SCU, i);
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index a74c7a789b2b..a7df216a46da 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -287,6 +287,8 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- ssi->cr_own = cr;
- ssi->err = -1; /* ignore 1st error */
-
-+ rsnd_scu_ssi_mode_init(mod, rdai, io);
-+
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch b/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch
deleted file mode 100644
index 3ff48de1b5c4a..0000000000000
--- a/patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 10259368bab3428b333562bdbe43fc8549992367 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:50:33 -0800
-Subject: ASoC: rsnd: add probe/remove callback on rsnd_mod_ops
-
-Each rsnd mod needs specific probe method,
-and its best timing is DAI probe timing.
-But current code runs it mod probe timing.
-This patch adds new probe/remove callback to solve it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 7681f6ac6b6338932621f842d68e54f6267b785f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 23 +++++++++++++++++++++++
- sound/soc/sh/rcar/rsnd.h | 6 ++++++
- 2 files changed, 29 insertions(+)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -841,6 +841,7 @@ static int rsnd_probe(struct platform_de
- struct rcar_snd_info *info;
- struct rsnd_priv *priv;
- struct device *dev = &pdev->dev;
-+ struct rsnd_dai *rdai;
- int (*probe_func[])(struct platform_device *pdev,
- struct rsnd_priv *priv) = {
- rsnd_gen_probe,
-@@ -879,6 +880,16 @@ static int rsnd_probe(struct platform_de
- return ret;
- }
-
-+ for_each_rsnd_dai(rdai, priv, i) {
-+ ret = rsnd_dai_call(rdai, &rdai->playback, probe);
-+ if (ret)
-+ return ret;
-+
-+ ret = rsnd_dai_call(rdai, &rdai->capture, probe);
-+ if (ret)
-+ return ret;
-+ }
-+
- /*
- * asoc register
- */
-@@ -911,9 +922,21 @@ exit_snd_soc:
- static int rsnd_remove(struct platform_device *pdev)
- {
- struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev);
-+ struct rsnd_dai *rdai;
-+ int ret, i;
-
- pm_runtime_disable(&pdev->dev);
-
-+ for_each_rsnd_dai(rdai, priv, i) {
-+ ret = rsnd_dai_call(rdai, &rdai->playback, remove);
-+ if (ret)
-+ return ret;
-+
-+ ret = rsnd_dai_call(rdai, &rdai->capture, remove);
-+ if (ret)
-+ return ret;
-+ }
-+
- /*
- * remove each module
- */
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -167,6 +167,12 @@ enum rsnd_mod_type {
-
- struct rsnd_mod_ops {
- char *name;
-+ int (*probe)(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io);
-+ int (*remove)(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io);
- int (*init)(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io);
diff --git a/patches.renesas/0067-ASoC-rsnd-use-mod-probe-method-on-SCU.patch b/patches.renesas/0067-ASoC-rsnd-use-mod-probe-method-on-SCU.patch
deleted file mode 100644
index 73356bd78ee39..0000000000000
--- a/patches.renesas/0067-ASoC-rsnd-use-mod-probe-method-on-SCU.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 488036d1719f640f437ee19850688a695d3702d8 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:50:41 -0800
-Subject: ASoC: rsnd: use mod probe method on SCU
-
-Now, it can use .probe
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 76c6fb5c49790da44d553f655182b426ade2c599)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/scu.c | 64 ++++++++++++++++++++++++++++++-------------------
- 1 file changed, 39 insertions(+), 25 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/scu.c b/sound/soc/sh/rcar/scu.c
-index 63e6aeb8c42d..40250acf608d 100644
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -525,6 +525,42 @@ static int rsnd_scu_set_convert_timing_gen2(struct rsnd_mod *mod,
- return ret;
- }
-
-+static int rsnd_scu_probe_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-+ struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod));
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ int ret;
-+ int is_play;
-+
-+ if (info->dai_info)
-+ is_play = rsnd_info_is_playback(priv, scu);
-+ else
-+ is_play = rsnd_ssi_is_play(ssi);
-+
-+ ret = rsnd_dma_init(priv,
-+ rsnd_mod_to_dma(mod),
-+ is_play,
-+ scu->info->dma_id);
-+ if (ret < 0)
-+ dev_err(dev, "SCU DMA failed\n");
-+
-+ return ret;
-+}
-+
-+static int rsnd_scu_remove_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
-+
-+ return 0;
-+}
-+
- static int rsnd_scu_init_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -576,6 +612,8 @@ static int rsnd_scu_stop_gen2(struct rsnd_mod *mod,
-
- static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
- .name = "scu (gen2)",
-+ .probe = rsnd_scu_probe_gen2,
-+ .remove = rsnd_scu_remove_gen2,
- .init = rsnd_scu_init_gen2,
- .quit = rsnd_scu_quit,
- .start = rsnd_scu_start_gen2,
-@@ -631,25 +669,8 @@ int rsnd_scu_probe(struct platform_device *pdev,
- if (rsnd_scu_hpbif_is_enable(scu)) {
- if (rsnd_is_gen1(priv))
- ops = &rsnd_scu_gen1_ops;
-- if (rsnd_is_gen2(priv)) {
-- int ret;
-- int is_play;
--
-- if (info->dai_info) {
-- is_play = rsnd_info_is_playback(priv, scu);
-- } else {
-- struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, i);
-- is_play = rsnd_ssi_is_play(ssi);
-- }
-- ret = rsnd_dma_init(priv,
-- rsnd_mod_to_dma(&scu->mod),
-- is_play,
-- scu->info->dma_id);
-- if (ret < 0)
-- return ret;
--
-+ if (rsnd_is_gen2(priv))
- ops = &rsnd_scu_gen2_ops;
-- }
- }
-
- rsnd_mod_init(priv, &scu->mod, ops, RSND_MOD_SCU, i);
-@@ -663,11 +684,4 @@ int rsnd_scu_probe(struct platform_device *pdev,
- void rsnd_scu_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-- struct rsnd_scu *scu;
-- int i;
--
-- for_each_rsnd_scu(scu, priv, i) {
-- if (rsnd_scu_dma_available(scu))
-- rsnd_dma_quit(priv, rsnd_mod_to_dma(&scu->mod));
-- }
- }
---
-2.1.2
-
diff --git a/patches.renesas/0068-ASoC-rsnd-use-mod-probe-method-on-SSI.patch b/patches.renesas/0068-ASoC-rsnd-use-mod-probe-method-on-SSI.patch
deleted file mode 100644
index 50a4b75896b23..0000000000000
--- a/patches.renesas/0068-ASoC-rsnd-use-mod-probe-method-on-SSI.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-From 24141ff81310489083f92a04483b67a49390165b Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:50:49 -0800
-Subject: ASoC: rsnd: use mod probe method on SSI
-
-Now, it can use .probe
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ff8f30e688477beead6d1e648fb11f321220a4d7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/ssi.c | 116 +++++++++++++++++++++++++++---------------------
- 1 file changed, 65 insertions(+), 51 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index a7df216a46da..0f3eeac56155 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -358,6 +358,26 @@ static irqreturn_t rsnd_ssi_pio_interrupt(int irq, void *data)
- return ret;
- }
-
-+static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+ int irq = ssi->info->pio_irq;
-+ int ret;
-+
-+ ret = devm_request_irq(dev, irq,
-+ rsnd_ssi_pio_interrupt,
-+ IRQF_SHARED,
-+ dev_name(dev), ssi);
-+ if (ret)
-+ dev_err(dev, "SSI request interrupt failed\n");
-+
-+ return ret;
-+}
-+
- static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -389,12 +409,50 @@ static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
-
- static struct rsnd_mod_ops rsnd_ssi_pio_ops = {
- .name = "ssi (pio)",
-+ .probe = rsnd_ssi_pio_probe,
- .init = rsnd_ssi_init,
- .quit = rsnd_ssi_quit,
- .start = rsnd_ssi_pio_start,
- .stop = rsnd_ssi_pio_stop,
- };
-
-+static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ int dma_id = ssi->info->dma_id;
-+ int is_play;
-+ int ret;
-+
-+ if (info->dai_info)
-+ is_play = rsnd_info_is_playback(priv, ssi);
-+ else
-+ is_play = rsnd_ssi_is_play(&ssi->mod);
-+
-+ ret = rsnd_dma_init(
-+ priv, rsnd_mod_to_dma(mod),
-+ is_play,
-+ dma_id);
-+
-+ if (ret < 0)
-+ dev_err(dev, "SSI DMA failed\n");
-+
-+ return ret;
-+}
-+
-+static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
-+
-+ return 0;
-+}
-+
- static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
-@@ -436,6 +494,8 @@ static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
-
- static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
- .name = "ssi (dma)",
-+ .probe = rsnd_ssi_dma_probe,
-+ .remove = rsnd_ssi_dma_remove,
- .init = rsnd_ssi_init,
- .quit = rsnd_ssi_quit,
- .start = rsnd_ssi_dma_start,
-@@ -538,7 +598,7 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- struct clk *clk;
- struct rsnd_ssi *ssi;
- char name[RSND_SSI_NAME_SIZE];
-- int i, nr, ret;
-+ int i, nr;
-
- /*
- * init SSI
-@@ -566,48 +626,10 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- ssi->clk = clk;
-
- ops = &rsnd_ssi_non_ops;
--
-- /*
-- * SSI DMA case
-- */
-- if (pinfo->dma_id > 0) {
-- int is_play;
--
-- if (info->dai_info)
-- is_play = rsnd_info_is_playback(priv, ssi);
-- else
-- is_play = rsnd_ssi_is_play(&ssi->mod);
--
-- ret = rsnd_dma_init(
-- priv, rsnd_mod_to_dma(&ssi->mod),
-- is_play,
-- pinfo->dma_id);
-- if (ret < 0)
-- dev_info(dev, "SSI DMA failed. try PIO transter\n");
-- else
-- ops = &rsnd_ssi_dma_ops;
--
-- dev_dbg(dev, "SSI%d use DMA transfer\n", i);
-- }
--
-- /*
-- * SSI PIO case
-- */
-- if (!rsnd_ssi_dma_available(ssi) &&
-- rsnd_ssi_pio_available(ssi)) {
-- ret = devm_request_irq(dev, pinfo->pio_irq,
-- &rsnd_ssi_pio_interrupt,
-- IRQF_SHARED,
-- dev_name(dev), ssi);
-- if (ret) {
-- dev_err(dev, "SSI request interrupt failed\n");
-- return ret;
-- }
--
-- ops = &rsnd_ssi_pio_ops;
--
-- dev_dbg(dev, "SSI%d use PIO transfer\n", i);
-- }
-+ if (pinfo->dma_id > 0)
-+ ops = &rsnd_ssi_dma_ops;
-+ else if (rsnd_ssi_pio_available(ssi))
-+ ops = &rsnd_ssi_pio_ops;
-
- rsnd_mod_init(priv, &ssi->mod, ops, RSND_MOD_SSI, i);
-
-@@ -620,12 +642,4 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- void rsnd_ssi_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-- struct rsnd_ssi *ssi;
-- int i;
--
-- for_each_rsnd_ssi(ssi, priv, i) {
-- if (rsnd_ssi_dma_available(ssi))
-- rsnd_dma_quit(priv, rsnd_mod_to_dma(&ssi->mod));
-- }
--
- }
---
-2.1.2
-
diff --git a/patches.renesas/0069-ASoC-rsnd-nothing-to-do-on-rsnd_dai_remove.patch b/patches.renesas/0069-ASoC-rsnd-nothing-to-do-on-rsnd_dai_remove.patch
deleted file mode 100644
index 4aa44d2c9e154..0000000000000
--- a/patches.renesas/0069-ASoC-rsnd-nothing-to-do-on-rsnd_dai_remove.patch
+++ /dev/null
@@ -1,82 +0,0 @@
-From 35359c1b34f1f23251dd59f1d760fe3a35c73e99 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:51:03 -0800
-Subject: ASoC: rsnd: nothing to do on rsnd_dai_remove()
-
-rsnd_dai_remove() called rsnd_path_exit(),
-but these memory will be cleaned automatically.
-Because it is created by devm_kzalloc().
-nothing to do on rsnd_dai_remove()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 4076220767416b8b65009dd57eeb317c38d41baa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 36 ------------------------------------
- 1 file changed, 36 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index e8e585de7251..92e155b7b6a7 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -348,14 +348,6 @@ static int rsnd_dai_connect(struct rsnd_mod *mod,
- return 0;
- }
-
--static int rsnd_dai_disconnect(struct rsnd_mod *mod, struct rsnd_dai_stream *io)
--{
-- io->mod[mod->type] = NULL;
-- mod->io = NULL;
--
-- return 0;
--}
--
- int rsnd_dai_id(struct rsnd_priv *priv, struct rsnd_dai *rdai)
- {
- int id = rdai - priv->rdai;
-@@ -628,26 +620,6 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- return ret;
- }
-
--static int rsnd_path_exit(struct rsnd_priv *priv,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_mod *mod;
-- int ret = 0, i;
--
-- /*
-- * remove all mod from rdai
-- */
-- for (i = 0; i < RSND_MOD_MAX; i++) {
-- mod = io->mod[i];
-- if (!mod)
-- continue;
-- ret |= rsnd_dai_disconnect(mod, io);
-- }
--
-- return ret;
--}
--
- static int rsnd_dai_probe(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-@@ -739,14 +711,6 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- static void rsnd_dai_remove(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
-- struct rsnd_dai *rdai;
-- int i;
--
-- for (i = 0; i < rsnd_rdai_nr(priv); i++) {
-- rdai = rsnd_dai_get(priv, i);
-- rsnd_path_exit(priv, rdai, &rdai->playback);
-- rsnd_path_exit(priv, rdai, &rdai->capture);
-- }
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch b/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch
deleted file mode 100644
index a1c38d1a8394e..0000000000000
--- a/patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From ecdd264f4c8a0887884cf96f36158742b01d3fb3 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:51:11 -0800
-Subject: ASoC: rsnd: remove all rsnd_xxx_remove()
-
-Now, rsnd_xxx_remove() do nothing.
-remove these
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9524be0e761edd9f3c020344677d914ed249d010)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 5 -----
- sound/soc/sh/rcar/core.c | 14 --------------
- sound/soc/sh/rcar/gen.c | 5 -----
- sound/soc/sh/rcar/rsnd.h | 8 --------
- sound/soc/sh/rcar/scu.c | 5 -----
- sound/soc/sh/rcar/ssi.c | 5 -----
- 6 files changed, 42 deletions(-)
-
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -454,8 +454,3 @@ int rsnd_adg_probe(struct platform_devic
-
- return 0;
- }
--
--void rsnd_adg_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv)
--{
--}
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -708,11 +708,6 @@ static int rsnd_dai_probe(struct platfor
- return 0;
- }
-
--static void rsnd_dai_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv)
--{
--}
--
- /*
- * pcm ops
- */
-@@ -901,15 +896,6 @@ static int rsnd_remove(struct platform_d
- return ret;
- }
-
-- /*
-- * remove each module
-- */
-- rsnd_ssi_remove(pdev, priv);
-- rsnd_adg_remove(pdev, priv);
-- rsnd_scu_remove(pdev, priv);
-- rsnd_dai_remove(pdev, priv);
-- rsnd_gen_remove(pdev, priv);
--
- return 0;
- }
-
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -385,8 +385,3 @@ int rsnd_gen_probe(struct platform_devic
-
- return ret;
- }
--
--void rsnd_gen_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv)
--{
--}
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -261,8 +261,6 @@ int rsnd_dai_pointer_offset(struct rsnd_
- */
- int rsnd_gen_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
--void rsnd_gen_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv);
- void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- enum rsnd_reg reg);
-@@ -276,8 +274,6 @@ int rsnd_adg_ssi_clk_stop(struct rsnd_mo
- int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate);
- int rsnd_adg_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
--void rsnd_adg_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv);
- int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- unsigned int src_rate,
-@@ -353,8 +349,6 @@ struct rsnd_priv {
- */
- int rsnd_scu_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
--void rsnd_scu_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
- unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
-@@ -373,8 +367,6 @@ int rsnd_scu_enable_ssi_irq(struct rsnd_
- */
- int rsnd_ssi_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
--void rsnd_ssi_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
- struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
- int dai_id, int is_play);
---- a/sound/soc/sh/rcar/scu.c
-+++ b/sound/soc/sh/rcar/scu.c
-@@ -680,8 +680,3 @@ int rsnd_scu_probe(struct platform_devic
-
- return 0;
- }
--
--void rsnd_scu_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv)
--{
--}
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -638,8 +638,3 @@ int rsnd_ssi_probe(struct platform_devic
-
- return 0;
- }
--
--void rsnd_ssi_remove(struct platform_device *pdev,
-- struct rsnd_priv *priv)
--{
--}
diff --git a/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch b/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch
deleted file mode 100644
index f2bd6d8c1343c..0000000000000
--- a/patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch
+++ /dev/null
@@ -1,1616 +0,0 @@
-From ef5ed63c953f1799ff6bff09ee39454eca3d3012 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 3 Mar 2014 20:51:21 -0800
-Subject: ASoC: rsnd: rename scu to src
-
-R-Car sound has SCU unit which has SRC/CTU/MIX/DVC,
-and current rsnd driver has scu.c and scu module.
-Current scu.c has SRC support only.
-My first concept was control these feature on scu.c
-but, it become difficult and un-understandable now.
-This patch rename scu to src
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ba9c949f797aa3af56303445812a452144c61c35)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 18 -
- sound/soc/sh/rcar/Makefile | 2
- sound/soc/sh/rcar/core.c | 26 -
- sound/soc/sh/rcar/rsnd.h | 24 -
- sound/soc/sh/rcar/scu.c | 682 --------------------------------------------
- sound/soc/sh/rcar/src.c | 687 +++++++++++++++++++++++++++++++++++++++++++++
- sound/soc/sh/rcar/ssi.c | 6
- 7 files changed, 727 insertions(+), 718 deletions(-)
- rename sound/soc/sh/rcar/{scu.c => src.c} (63%)
-
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -55,14 +55,18 @@ struct rsnd_ssi_platform_info {
- */
- #define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */
-
--#define RSND_SCU(rate, _dma_id) \
-+#define RSND_SRC(rate, _dma_id) \
- { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
--#define RSND_SCU_SET(rate, _dma_id) \
-+#define RSND_SRC_SET(rate, _dma_id) \
- { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
--#define RSND_SCU_UNUSED \
-+#define RSND_SRC_UNUSED \
- { .flags = 0, .convert_rate = 0, .dma_id = 0, }
-
--struct rsnd_scu_platform_info {
-+#define rsnd_scu_platform_info rsnd_src_platform_info
-+#define src_info scu_info
-+#define src_info_nr scu_info_nr
-+
-+struct rsnd_src_platform_info {
- u32 flags;
- u32 convert_rate; /* sampling rate convert */
- int dma_id; /* for Gen2 SCU */
-@@ -70,7 +74,7 @@ struct rsnd_scu_platform_info {
-
- struct rsnd_dai_path_info {
- struct rsnd_ssi_platform_info *ssi;
-- struct rsnd_scu_platform_info *scu;
-+ struct rsnd_src_platform_info *src;
- };
-
- struct rsnd_dai_platform_info {
-@@ -93,8 +97,8 @@ struct rcar_snd_info {
- u32 flags;
- struct rsnd_ssi_platform_info *ssi_info;
- int ssi_info_nr;
-- struct rsnd_scu_platform_info *scu_info;
-- int scu_info_nr;
-+ struct rsnd_src_platform_info *src_info;
-+ int src_info_nr;
- struct rsnd_dai_platform_info *dai_info;
- int dai_info_nr;
- int (*start)(int id);
---- a/sound/soc/sh/rcar/Makefile
-+++ b/sound/soc/sh/rcar/Makefile
-@@ -1,2 +1,2 @@
--snd-soc-rcar-objs := core.o gen.o scu.o adg.o ssi.o
-+snd-soc-rcar-objs := core.o gen.o src.o adg.o ssi.o
- obj-$(CONFIG_SND_SOC_RCAR) += snd-soc-rcar.o
-\ No newline at end of file
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -73,13 +73,13 @@
- * | +- ssi[2]
- * | ...
- * |
-- * | ** these control scu
-+ * | ** these control src
- * |
-- * +- scu
-+ * +- src
- * |
-- * +- scu[0]
-- * +- scu[1]
-- * +- scu[2]
-+ * +- src[0]
-+ * +- src[1]
-+ * +- src[2]
- * ...
- *
- *
-@@ -572,7 +572,7 @@ static int rsnd_path_init(struct rsnd_pr
- struct rsnd_dai_platform_info *dai_info = rdai->info;
- int ret;
- int ssi_id = -1;
-- int scu_id = -1;
-+ int src_id = -1;
-
- /*
- * Gen1 is created by SRU/SSI, and this SRU is base module of
-@@ -587,8 +587,8 @@ static int rsnd_path_init(struct rsnd_pr
- if (dai_info) {
- if (rsnd_is_enable_path(io, ssi))
- ssi_id = rsnd_info_id(priv, io, ssi);
-- if (rsnd_is_enable_path(io, scu))
-- scu_id = rsnd_info_id(priv, io, scu);
-+ if (rsnd_is_enable_path(io, src))
-+ src_id = rsnd_info_id(priv, io, src);
- } else {
- /* get SSI's ID */
- mod = rsnd_ssi_mod_get_frm_dai(priv,
-@@ -596,14 +596,14 @@ static int rsnd_path_init(struct rsnd_pr
- rsnd_dai_is_play(rdai, io));
- if (!mod)
- return 0;
-- ssi_id = scu_id = rsnd_mod_id(mod);
-+ ssi_id = src_id = rsnd_mod_id(mod);
- }
-
- ret = 0;
-
-- /* SCU */
-- if (scu_id >= 0) {
-- mod = rsnd_scu_mod_get(priv, scu_id);
-+ /* SRC */
-+ if (src_id >= 0) {
-+ mod = rsnd_src_mod_get(priv, src_id);
- ret = rsnd_dai_connect(mod, io);
- if (ret < 0)
- return ret;
-@@ -805,7 +805,7 @@ static int rsnd_probe(struct platform_de
- struct rsnd_priv *priv) = {
- rsnd_gen_probe,
- rsnd_ssi_probe,
-- rsnd_scu_probe,
-+ rsnd_src_probe,
- rsnd_adg_probe,
- rsnd_dai_probe,
- };
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -160,7 +160,7 @@ void rsnd_dma_quit(struct rsnd_priv *pr
- * R-Car sound mod
- */
- enum rsnd_mod_type {
-- RSND_MOD_SCU = 0,
-+ RSND_MOD_SRC = 0,
- RSND_MOD_SSI,
- RSND_MOD_MAX,
- };
-@@ -224,7 +224,7 @@ struct rsnd_dai_stream {
- int next_period_byte;
- };
- #define rsnd_io_to_mod_ssi(io) ((io)->mod[RSND_MOD_SSI])
--#define rsnd_io_to_mod_scu(io) ((io)->mod[RSND_MOD_SCU])
-+#define rsnd_io_to_mod_src(io) ((io)->mod[RSND_MOD_SRC])
-
- struct rsnd_dai {
- char name[RSND_DAI_NAME_SIZE];
-@@ -302,10 +302,10 @@ struct rsnd_priv {
- void *gen;
-
- /*
-- * below value will be filled on rsnd_scu_probe()
-+ * below value will be filled on rsnd_src_probe()
- */
-- void *scu;
-- int scu_nr;
-+ void *src;
-+ int src_nr;
-
- /*
- * below value will be filled on rsnd_adg_probe()
-@@ -345,22 +345,22 @@ struct rsnd_priv {
- })
-
- /*
-- * R-Car SCU
-+ * R-Car SRC
- */
--int rsnd_scu_probe(struct platform_device *pdev,
-+int rsnd_src_probe(struct platform_device *pdev,
- struct rsnd_priv *priv);
--struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id);
--unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
-+struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id);
-+unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime);
--int rsnd_scu_ssi_mode_init(struct rsnd_mod *ssi_mod,
-+int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io);
--int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-+int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io);
-
--#define rsnd_scu_nr(priv) ((priv)->scu_nr)
-+#define rsnd_src_nr(priv) ((priv)->src_nr)
-
- /*
- * R-Car SSI
---- a/sound/soc/sh/rcar/scu.c
-+++ /dev/null
-@@ -1,682 +0,0 @@
--/*
-- * Renesas R-Car SCU support
-- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-- * Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 "rsnd.h"
--
--struct rsnd_scu {
-- struct rsnd_scu_platform_info *info; /* rcar_snd.h */
-- struct rsnd_mod mod;
-- struct clk *clk;
--};
--
--#define RSND_SCU_NAME_SIZE 16
--
--/*
-- * ADINR
-- */
--#define OTBL_24 (0 << 16)
--#define OTBL_22 (2 << 16)
--#define OTBL_20 (4 << 16)
--#define OTBL_18 (6 << 16)
--#define OTBL_16 (8 << 16)
--
--#define rsnd_scu_mode_flags(p) ((p)->info->flags)
--#define rsnd_scu_convert_rate(p) ((p)->info->convert_rate)
--#define rsnd_mod_to_scu(_mod) \
-- container_of((_mod), struct rsnd_scu, mod)
--#define rsnd_scu_hpbif_is_enable(scu) \
-- (rsnd_scu_mode_flags(scu) & RSND_SCU_USE_HPBIF)
--#define rsnd_scu_dma_available(scu) \
-- rsnd_dma_available(rsnd_mod_to_dma(&(scu)->mod))
--
--#define for_each_rsnd_scu(pos, priv, i) \
-- for ((i) = 0; \
-- ((i) < rsnd_scu_nr(priv)) && \
-- ((pos) = (struct rsnd_scu *)(priv)->scu + i); \
-- i++)
--
--
--/*
-- * image of SRC (Sampling Rate Converter)
-- *
-- * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+
-- * 48kHz <-> | SRC | <------> | SSI | <-----> | codec |
-- * 44.1kHz <-> +-----+ +-----+ +-------+
-- * ...
-- *
-- */
--
--/*
-- * scu.c is caring...
-- *
-- * Gen1
-- *
-- * [mem] -> [SRU] -> [SSI]
-- * |--------|
-- *
-- * Gen2
-- *
-- * [mem] -> [SCU] -> [SSIU] -> [SSI]
-- * |-----------------|
-- */
--
--/*
-- * How to use SRC bypass mode for debugging
-- *
-- * SRC has bypass mode, and it is useful for debugging.
-- * In Gen2 case,
-- * SRCm_MODE controls whether SRC is used or not
-- * SSI_MODE0 controls whether SSIU which receives SRC data
-- * is used or not.
-- * Both SRCm_MODE/SSI_MODE0 settings are needed if you use SRC,
-- * but SRC bypass mode needs SSI_MODE0 only.
-- *
-- * This driver request
-- * struct rsnd_scu_platform_info {
-- * u32 flags;
-- * u32 convert_rate;
-- * }
-- *
-- * rsnd_scu_hpbif_is_enable() will be true
-- * if flags had RSND_SCU_USE_HPBIF,
-- * and it controls whether SSIU is used or not.
-- *
-- * rsnd_scu_convert_rate() indicates
-- * above convert_rate, and it controls
-- * whether SRC is used or not.
-- *
-- * ex) doesn't use SRC
-- * struct rsnd_scu_platform_info info = {
-- * .flags = 0,
-- * .convert_rate = 0,
-- * };
-- *
-- * ex) uses SRC
-- * struct rsnd_scu_platform_info info = {
-- * .flags = RSND_SCU_USE_HPBIF,
-- * .convert_rate = 48000,
-- * };
-- *
-- * ex) uses SRC bypass mode
-- * struct rsnd_scu_platform_info info = {
-- * .flags = RSND_SCU_USE_HPBIF,
-- * .convert_rate = 0,
-- * };
-- *
-- */
--
--/*
-- * Gen1/Gen2 common functions
-- */
--int rsnd_scu_ssi_mode_init(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
-- struct rsnd_mod *scu_mod = rsnd_io_to_mod_scu(io);
-- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-- int ssi_id = rsnd_mod_id(ssi_mod);
-- int has_scu = 0;
--
-- /*
-- * SSI_MODE0
-- */
-- if (info->dai_info) {
-- has_scu = !!scu_mod;
-- } else {
-- struct rsnd_scu *scu = rsnd_mod_to_scu(scu_mod);
-- has_scu = rsnd_scu_hpbif_is_enable(scu);
-- }
--
-- rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id),
-- has_scu ? 0 : (1 << ssi_id));
--
-- /*
-- * SSI_MODE1
-- */
-- if (rsnd_ssi_is_pin_sharing(ssi_mod)) {
-- int shift = -1;
-- switch (ssi_id) {
-- case 1:
-- shift = 0;
-- break;
-- case 2:
-- shift = 2;
-- break;
-- case 4:
-- shift = 16;
-- break;
-- }
--
-- if (shift >= 0)
-- rsnd_mod_bset(ssi_mod, SSI_MODE1,
-- 0x3 << shift,
-- rsnd_dai_is_clk_master(rdai) ?
-- 0x2 << shift : 0x1 << shift);
-- }
--
-- return 0;
--}
--
--int rsnd_scu_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
--
-- /* enable PIO interrupt if Gen2 */
-- if (rsnd_is_gen2(priv))
-- rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
--
-- return 0;
--}
--
--unsigned int rsnd_scu_get_ssi_rate(struct rsnd_priv *priv,
-- struct rsnd_dai_stream *io,
-- struct snd_pcm_runtime *runtime)
--{
-- struct rsnd_scu *scu;
-- unsigned int rate;
--
-- scu = rsnd_mod_to_scu(rsnd_io_to_mod_scu(io));
--
-- /*
-- * return convert rate if SRC is used,
-- * otherwise, return runtime->rate as usual
-- */
-- rate = rsnd_scu_convert_rate(scu);
-- if (!rate)
-- rate = runtime->rate;
--
-- return rate;
--}
--
--static int rsnd_scu_set_convert_rate(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- u32 convert_rate = rsnd_scu_convert_rate(scu);
-- u32 adinr = runtime->channels;
-- u32 fsrate = 0;
--
-- if (convert_rate)
-- fsrate = 0x0400000 / convert_rate * runtime->rate;
--
-- /* set/clear soft reset */
-- rsnd_mod_write(mod, SRC_SWRSR, 0);
-- rsnd_mod_write(mod, SRC_SWRSR, 1);
--
-- /*
-- * Initialize the operation of the SRC internal circuits
-- * see rsnd_scu_start()
-- */
-- rsnd_mod_write(mod, SRC_SRCIR, 1);
--
-- /* Set channel number and output bit length */
-- switch (runtime->sample_bits) {
-- case 16:
-- adinr |= OTBL_16;
-- break;
-- case 32:
-- adinr |= OTBL_24;
-- break;
-- default:
-- return -EIO;
-- }
-- rsnd_mod_write(mod, SRC_ADINR, adinr);
--
-- /* Enable the initial value of IFS */
-- if (fsrate) {
-- rsnd_mod_write(mod, SRC_IFSCR, 1);
--
-- /* Set initial value of IFS */
-- rsnd_mod_write(mod, SRC_IFSVR, fsrate);
-- }
--
-- /* use DMA transfer */
-- rsnd_mod_write(mod, SRC_BUSIF_MODE, 1);
--
-- return 0;
--}
--
--static int rsnd_scu_init(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
--
-- clk_enable(scu->clk);
--
-- return 0;
--}
--
--static int rsnd_scu_quit(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
--
-- clk_disable(scu->clk);
--
-- return 0;
--}
--
--static int rsnd_scu_start(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
--
-- /*
-- * Cancel the initialization and operate the SRC function
-- * see rsnd_scu_set_convert_rate()
-- */
-- rsnd_mod_write(mod, SRC_SRCIR, 0);
--
-- if (rsnd_scu_convert_rate(scu))
-- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
--
-- return 0;
--}
--
--
--static int rsnd_scu_stop(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
--
-- if (rsnd_scu_convert_rate(scu))
-- rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
--
-- return 0;
--}
--
--static struct rsnd_mod_ops rsnd_scu_non_ops = {
-- .name = "scu (non)",
--};
--
--/*
-- * Gen1 functions
-- */
--static int rsnd_src_set_route_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct scu_route_config {
-- u32 mask;
-- int shift;
-- } routes[] = {
-- { 0xF, 0, }, /* 0 */
-- { 0xF, 4, }, /* 1 */
-- { 0xF, 8, }, /* 2 */
-- { 0x7, 12, }, /* 3 */
-- { 0x7, 16, }, /* 4 */
-- { 0x7, 20, }, /* 5 */
-- { 0x7, 24, }, /* 6 */
-- { 0x3, 28, }, /* 7 */
-- { 0x3, 30, }, /* 8 */
-- };
-- u32 mask;
-- u32 val;
-- int id;
--
-- id = rsnd_mod_id(mod);
-- if (id < 0 || id >= ARRAY_SIZE(routes))
-- return -EIO;
--
-- /*
-- * SRC_ROUTE_SELECT
-- */
-- val = rsnd_dai_is_play(rdai, io) ? 0x1 : 0x2;
-- val = val << routes[id].shift;
-- mask = routes[id].mask << routes[id].shift;
--
-- rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val);
--
-- return 0;
--}
--
--static int rsnd_scu_set_convert_timing_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-- u32 convert_rate = rsnd_scu_convert_rate(scu);
-- u32 mask;
-- u32 val;
-- int shift;
-- int id = rsnd_mod_id(mod);
-- int ret;
--
-- /*
-- * SRC_TIMING_SELECT
-- */
-- shift = (id % 4) * 8;
-- mask = 0x1F << shift;
--
-- /*
-- * ADG is used as source clock if SRC was used,
-- * then, SSI WS is used as destination clock.
-- * SSI WS is used as source clock if SRC is not used
-- * (when playback, source/destination become reverse when capture)
-- */
-- ret = 0;
-- if (convert_rate) {
-- /* use ADG */
-- val = 0;
-- ret = rsnd_adg_set_convert_clk_gen1(priv, mod,
-- runtime->rate,
-- convert_rate);
-- } else if (8 == id) {
-- /* use SSI WS, but SRU8 is special */
-- val = id << shift;
-- } else {
-- /* use SSI WS */
-- val = (id + 1) << shift;
-- }
--
-- if (ret < 0)
-- return ret;
--
-- switch (id / 4) {
-- case 0:
-- rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val);
-- break;
-- case 1:
-- rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val);
-- break;
-- case 2:
-- rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val);
-- break;
-- }
--
-- return 0;
--}
--
--static int rsnd_scu_set_convert_rate_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- int ret;
--
-- ret = rsnd_scu_set_convert_rate(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- /* Select SRC mode (fixed value) */
-- rsnd_mod_write(mod, SRC_SRCCR, 0x00010110);
--
-- /* Set the restriction value of the FS ratio (98%) */
-- rsnd_mod_write(mod, SRC_MNFSR,
-- rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98);
--
-- /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
--
-- return 0;
--}
--
--static int rsnd_scu_init_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- int ret;
--
-- ret = rsnd_scu_init(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- ret = rsnd_src_set_route_gen1(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- ret = rsnd_scu_set_convert_rate_gen1(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- ret = rsnd_scu_set_convert_timing_gen1(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- return 0;
--}
--
--static int rsnd_scu_start_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- int id = rsnd_mod_id(mod);
--
-- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
--
-- return rsnd_scu_start(mod, rdai, io);
--}
--
--static int rsnd_scu_stop_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- int id = rsnd_mod_id(mod);
--
-- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
--
-- return rsnd_scu_stop(mod, rdai, io);
--}
--
--static struct rsnd_mod_ops rsnd_scu_gen1_ops = {
-- .name = "sru (gen1)",
-- .init = rsnd_scu_init_gen1,
-- .quit = rsnd_scu_quit,
-- .start = rsnd_scu_start_gen1,
-- .stop = rsnd_scu_stop_gen1,
--};
--
--/*
-- * Gen2 functions
-- */
--static int rsnd_scu_set_convert_rate_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- int ret;
--
-- ret = rsnd_scu_set_convert_rate(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_mod_read(mod, SRC_ADINR));
-- rsnd_mod_write(mod, SSI_BUSIF_MODE, rsnd_mod_read(mod, SRC_BUSIF_MODE));
--
-- rsnd_mod_write(mod, SRC_SRCCR, 0x00011110);
--
-- rsnd_mod_write(mod, SRC_BSDSR, 0x01800000);
-- rsnd_mod_write(mod, SRC_BSISR, 0x00100060);
--
-- return 0;
--}
--
--static int rsnd_scu_set_convert_timing_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- u32 convert_rate = rsnd_scu_convert_rate(scu);
-- int ret;
--
-- if (convert_rate)
-- ret = rsnd_adg_set_convert_clk_gen2(mod, rdai, io,
-- runtime->rate,
-- convert_rate);
-- else
-- ret = rsnd_adg_set_convert_timing_gen2(mod, rdai, io);
--
-- return ret;
--}
--
--static int rsnd_scu_probe_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
-- struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod));
-- struct device *dev = rsnd_priv_to_dev(priv);
-- int ret;
-- int is_play;
--
-- if (info->dai_info)
-- is_play = rsnd_info_is_playback(priv, scu);
-- else
-- is_play = rsnd_ssi_is_play(ssi);
--
-- ret = rsnd_dma_init(priv,
-- rsnd_mod_to_dma(mod),
-- is_play,
-- scu->info->dma_id);
-- if (ret < 0)
-- dev_err(dev, "SCU DMA failed\n");
--
-- return ret;
--}
--
--static int rsnd_scu_remove_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
--
-- return 0;
--}
--
--static int rsnd_scu_init_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- int ret;
--
-- ret = rsnd_scu_init(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- ret = rsnd_scu_set_convert_rate_gen2(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- ret = rsnd_scu_set_convert_timing_gen2(mod, rdai, io);
-- if (ret < 0)
-- return ret;
--
-- return 0;
--}
--
--static int rsnd_scu_start_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
--
-- rsnd_dma_start(rsnd_mod_to_dma(&scu->mod));
--
-- rsnd_mod_write(mod, SSI_CTRL, 0x1);
-- rsnd_mod_write(mod, SRC_CTRL, 0x11);
--
-- return rsnd_scu_start(mod, rdai, io);
--}
--
--static int rsnd_scu_stop_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
--{
-- struct rsnd_scu *scu = rsnd_mod_to_scu(mod);
--
-- rsnd_mod_write(mod, SSI_CTRL, 0);
-- rsnd_mod_write(mod, SRC_CTRL, 0);
--
-- rsnd_dma_stop(rsnd_mod_to_dma(&scu->mod));
--
-- return rsnd_scu_stop(mod, rdai, io);
--}
--
--static struct rsnd_mod_ops rsnd_scu_gen2_ops = {
-- .name = "scu (gen2)",
-- .probe = rsnd_scu_probe_gen2,
-- .remove = rsnd_scu_remove_gen2,
-- .init = rsnd_scu_init_gen2,
-- .quit = rsnd_scu_quit,
-- .start = rsnd_scu_start_gen2,
-- .stop = rsnd_scu_stop_gen2,
--};
--
--struct rsnd_mod *rsnd_scu_mod_get(struct rsnd_priv *priv, int id)
--{
-- if (WARN_ON(id < 0 || id >= rsnd_scu_nr(priv)))
-- id = 0;
--
-- return &((struct rsnd_scu *)(priv->scu) + id)->mod;
--}
--
--int rsnd_scu_probe(struct platform_device *pdev,
-- struct rsnd_priv *priv)
--{
-- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-- struct device *dev = rsnd_priv_to_dev(priv);
-- struct rsnd_scu *scu;
-- struct rsnd_mod_ops *ops;
-- struct clk *clk;
-- char name[RSND_SCU_NAME_SIZE];
-- int i, nr;
--
-- /*
-- * init SCU
-- */
-- nr = info->scu_info_nr;
-- if (!nr)
-- return 0;
--
-- scu = devm_kzalloc(dev, sizeof(*scu) * nr, GFP_KERNEL);
-- if (!scu) {
-- dev_err(dev, "SCU allocate failed\n");
-- return -ENOMEM;
-- }
--
-- priv->scu_nr = nr;
-- priv->scu = scu;
--
-- for_each_rsnd_scu(scu, priv, i) {
-- snprintf(name, RSND_SCU_NAME_SIZE, "scu.%d", i);
--
-- clk = devm_clk_get(dev, name);
-- if (IS_ERR(clk))
-- return PTR_ERR(clk);
--
-- scu->info = &info->scu_info[i];
-- scu->clk = clk;
--
-- ops = &rsnd_scu_non_ops;
-- if (rsnd_scu_hpbif_is_enable(scu)) {
-- if (rsnd_is_gen1(priv))
-- ops = &rsnd_scu_gen1_ops;
-- if (rsnd_is_gen2(priv))
-- ops = &rsnd_scu_gen2_ops;
-- }
--
-- rsnd_mod_init(priv, &scu->mod, ops, RSND_MOD_SCU, i);
--
-- dev_dbg(dev, "SCU%d probed\n", i);
-- }
--
-- return 0;
--}
---- /dev/null
-+++ b/sound/soc/sh/rcar/src.c
-@@ -0,0 +1,687 @@
-+/*
-+ * Renesas R-Car SRC support
-+ *
-+ * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 "rsnd.h"
-+
-+struct rsnd_src {
-+ struct rsnd_src_platform_info *info; /* rcar_snd.h */
-+ struct rsnd_mod mod;
-+ struct clk *clk;
-+};
-+
-+#define RSND_SRC_NAME_SIZE 16
-+
-+/*
-+ * ADINR
-+ */
-+#define OTBL_24 (0 << 16)
-+#define OTBL_22 (2 << 16)
-+#define OTBL_20 (4 << 16)
-+#define OTBL_18 (6 << 16)
-+#define OTBL_16 (8 << 16)
-+
-+#define rsnd_src_mode_flags(p) ((p)->info->flags)
-+#define rsnd_src_convert_rate(p) ((p)->info->convert_rate)
-+#define rsnd_mod_to_src(_mod) \
-+ container_of((_mod), struct rsnd_src, mod)
-+#define rsnd_src_hpbif_is_enable(src) \
-+ (rsnd_src_mode_flags(src) & RSND_SCU_USE_HPBIF)
-+#define rsnd_src_dma_available(src) \
-+ rsnd_dma_available(rsnd_mod_to_dma(&(src)->mod))
-+
-+#define for_each_rsnd_src(pos, priv, i) \
-+ for ((i) = 0; \
-+ ((i) < rsnd_src_nr(priv)) && \
-+ ((pos) = (struct rsnd_src *)(priv)->src + i); \
-+ i++)
-+
-+
-+/*
-+ * image of SRC (Sampling Rate Converter)
-+ *
-+ * 96kHz <-> +-----+ 48kHz +-----+ 48kHz +-------+
-+ * 48kHz <-> | SRC | <------> | SSI | <-----> | codec |
-+ * 44.1kHz <-> +-----+ +-----+ +-------+
-+ * ...
-+ *
-+ */
-+
-+/*
-+ * src.c is caring...
-+ *
-+ * Gen1
-+ *
-+ * [mem] -> [SRU] -> [SSI]
-+ * |--------|
-+ *
-+ * Gen2
-+ *
-+ * [mem] -> [SRC] -> [SSIU] -> [SSI]
-+ * |-----------------|
-+ */
-+
-+/*
-+ * How to use SRC bypass mode for debugging
-+ *
-+ * SRC has bypass mode, and it is useful for debugging.
-+ * In Gen2 case,
-+ * SRCm_MODE controls whether SRC is used or not
-+ * SSI_MODE0 controls whether SSIU which receives SRC data
-+ * is used or not.
-+ * Both SRCm_MODE/SSI_MODE0 settings are needed if you use SRC,
-+ * but SRC bypass mode needs SSI_MODE0 only.
-+ *
-+ * This driver request
-+ * struct rsnd_src_platform_info {
-+ * u32 flags;
-+ * u32 convert_rate;
-+ * }
-+ *
-+ * rsnd_src_hpbif_is_enable() will be true
-+ * if flags had RSND_SRC_USE_HPBIF,
-+ * and it controls whether SSIU is used or not.
-+ *
-+ * rsnd_src_convert_rate() indicates
-+ * above convert_rate, and it controls
-+ * whether SRC is used or not.
-+ *
-+ * ex) doesn't use SRC
-+ * struct rsnd_src_platform_info info = {
-+ * .flags = 0,
-+ * .convert_rate = 0,
-+ * };
-+ *
-+ * ex) uses SRC
-+ * struct rsnd_src_platform_info info = {
-+ * .flags = RSND_SRC_USE_HPBIF,
-+ * .convert_rate = 48000,
-+ * };
-+ *
-+ * ex) uses SRC bypass mode
-+ * struct rsnd_src_platform_info info = {
-+ * .flags = RSND_SRC_USE_HPBIF,
-+ * .convert_rate = 0,
-+ * };
-+ *
-+ */
-+
-+/*
-+ * Gen1/Gen2 common functions
-+ */
-+int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
-+ struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ int ssi_id = rsnd_mod_id(ssi_mod);
-+ int has_src = 0;
-+
-+ /*
-+ * SSI_MODE0
-+ */
-+ if (info->dai_info) {
-+ has_src = !!src_mod;
-+ } else {
-+ struct rsnd_src *src = rsnd_mod_to_src(src_mod);
-+ has_src = rsnd_src_hpbif_is_enable(src);
-+ }
-+
-+ rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id),
-+ has_src ? 0 : (1 << ssi_id));
-+
-+ /*
-+ * SSI_MODE1
-+ */
-+ if (rsnd_ssi_is_pin_sharing(ssi_mod)) {
-+ int shift = -1;
-+ switch (ssi_id) {
-+ case 1:
-+ shift = 0;
-+ break;
-+ case 2:
-+ shift = 2;
-+ break;
-+ case 4:
-+ shift = 16;
-+ break;
-+ }
-+
-+ if (shift >= 0)
-+ rsnd_mod_bset(ssi_mod, SSI_MODE1,
-+ 0x3 << shift,
-+ rsnd_dai_is_clk_master(rdai) ?
-+ 0x2 << shift : 0x1 << shift);
-+ }
-+
-+ return 0;
-+}
-+
-+int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
-+
-+ /* enable PIO interrupt if Gen2 */
-+ if (rsnd_is_gen2(priv))
-+ rsnd_mod_write(ssi_mod, INT_ENABLE, 0x0f000000);
-+
-+ return 0;
-+}
-+
-+unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
-+ struct rsnd_dai_stream *io,
-+ struct snd_pcm_runtime *runtime)
-+{
-+ struct rsnd_src *src;
-+ unsigned int rate;
-+
-+ src = rsnd_mod_to_src(rsnd_io_to_mod_src(io));
-+
-+ /*
-+ * return convert rate if SRC is used,
-+ * otherwise, return runtime->rate as usual
-+ */
-+ rate = rsnd_src_convert_rate(src);
-+ if (!rate)
-+ rate = runtime->rate;
-+
-+ return rate;
-+}
-+
-+static int rsnd_src_set_convert_rate(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+ u32 convert_rate = rsnd_src_convert_rate(src);
-+ u32 adinr = runtime->channels;
-+ u32 fsrate = 0;
-+
-+ if (convert_rate)
-+ fsrate = 0x0400000 / convert_rate * runtime->rate;
-+
-+ /* set/clear soft reset */
-+ rsnd_mod_write(mod, SRC_SWRSR, 0);
-+ rsnd_mod_write(mod, SRC_SWRSR, 1);
-+
-+ /*
-+ * Initialize the operation of the SRC internal circuits
-+ * see rsnd_src_start()
-+ */
-+ rsnd_mod_write(mod, SRC_SRCIR, 1);
-+
-+ /* Set channel number and output bit length */
-+ switch (runtime->sample_bits) {
-+ case 16:
-+ adinr |= OTBL_16;
-+ break;
-+ case 32:
-+ adinr |= OTBL_24;
-+ break;
-+ default:
-+ return -EIO;
-+ }
-+ rsnd_mod_write(mod, SRC_ADINR, adinr);
-+
-+ /* Enable the initial value of IFS */
-+ if (fsrate) {
-+ rsnd_mod_write(mod, SRC_IFSCR, 1);
-+
-+ /* Set initial value of IFS */
-+ rsnd_mod_write(mod, SRC_IFSVR, fsrate);
-+ }
-+
-+ /* use DMA transfer */
-+ rsnd_mod_write(mod, SRC_BUSIF_MODE, 1);
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_init(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+
-+ clk_enable(src->clk);
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_quit(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+
-+ clk_disable(src->clk);
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_start(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+
-+ /*
-+ * Cancel the initialization and operate the SRC function
-+ * see rsnd_src_set_convert_rate()
-+ */
-+ rsnd_mod_write(mod, SRC_SRCIR, 0);
-+
-+ if (rsnd_src_convert_rate(src))
-+ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 1);
-+
-+ return 0;
-+}
-+
-+
-+static int rsnd_src_stop(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+
-+ if (rsnd_src_convert_rate(src))
-+ rsnd_mod_write(mod, SRC_ROUTE_MODE0, 0);
-+
-+ return 0;
-+}
-+
-+static struct rsnd_mod_ops rsnd_src_non_ops = {
-+ .name = "src (non)",
-+};
-+
-+/*
-+ * Gen1 functions
-+ */
-+static int rsnd_src_set_route_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct src_route_config {
-+ u32 mask;
-+ int shift;
-+ } routes[] = {
-+ { 0xF, 0, }, /* 0 */
-+ { 0xF, 4, }, /* 1 */
-+ { 0xF, 8, }, /* 2 */
-+ { 0x7, 12, }, /* 3 */
-+ { 0x7, 16, }, /* 4 */
-+ { 0x7, 20, }, /* 5 */
-+ { 0x7, 24, }, /* 6 */
-+ { 0x3, 28, }, /* 7 */
-+ { 0x3, 30, }, /* 8 */
-+ };
-+ u32 mask;
-+ u32 val;
-+ int id;
-+
-+ id = rsnd_mod_id(mod);
-+ if (id < 0 || id >= ARRAY_SIZE(routes))
-+ return -EIO;
-+
-+ /*
-+ * SRC_ROUTE_SELECT
-+ */
-+ val = rsnd_dai_is_play(rdai, io) ? 0x1 : 0x2;
-+ val = val << routes[id].shift;
-+ mask = routes[id].mask << routes[id].shift;
-+
-+ rsnd_mod_bset(mod, SRC_ROUTE_SEL, mask, val);
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_set_convert_timing_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ u32 convert_rate = rsnd_src_convert_rate(src);
-+ u32 mask;
-+ u32 val;
-+ int shift;
-+ int id = rsnd_mod_id(mod);
-+ int ret;
-+
-+ /*
-+ * SRC_TIMING_SELECT
-+ */
-+ shift = (id % 4) * 8;
-+ mask = 0x1F << shift;
-+
-+ /*
-+ * ADG is used as source clock if SRC was used,
-+ * then, SSI WS is used as destination clock.
-+ * SSI WS is used as source clock if SRC is not used
-+ * (when playback, source/destination become reverse when capture)
-+ */
-+ ret = 0;
-+ if (convert_rate) {
-+ /* use ADG */
-+ val = 0;
-+ ret = rsnd_adg_set_convert_clk_gen1(priv, mod,
-+ runtime->rate,
-+ convert_rate);
-+ } else if (8 == id) {
-+ /* use SSI WS, but SRU8 is special */
-+ val = id << shift;
-+ } else {
-+ /* use SSI WS */
-+ val = (id + 1) << shift;
-+ }
-+
-+ if (ret < 0)
-+ return ret;
-+
-+ switch (id / 4) {
-+ case 0:
-+ rsnd_mod_bset(mod, SRC_TMG_SEL0, mask, val);
-+ break;
-+ case 1:
-+ rsnd_mod_bset(mod, SRC_TMG_SEL1, mask, val);
-+ break;
-+ case 2:
-+ rsnd_mod_bset(mod, SRC_TMG_SEL2, mask, val);
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int ret;
-+
-+ ret = rsnd_src_set_convert_rate(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ /* Select SRC mode (fixed value) */
-+ rsnd_mod_write(mod, SRC_SRCCR, 0x00010110);
-+
-+ /* Set the restriction value of the FS ratio (98%) */
-+ rsnd_mod_write(mod, SRC_MNFSR,
-+ rsnd_mod_read(mod, SRC_IFSVR) / 100 * 98);
-+
-+ /* no SRC_BFSSR settings, since SRC_SRCCR::BUFMD is 0 */
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_init_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int ret;
-+
-+ ret = rsnd_src_init(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_src_set_route_gen1(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_src_set_convert_rate_gen1(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_src_set_convert_timing_gen1(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_start_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int id = rsnd_mod_id(mod);
-+
-+ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
-+
-+ return rsnd_src_start(mod, rdai, io);
-+}
-+
-+static int rsnd_src_stop_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int id = rsnd_mod_id(mod);
-+
-+ rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
-+
-+ return rsnd_src_stop(mod, rdai, io);
-+}
-+
-+static struct rsnd_mod_ops rsnd_src_gen1_ops = {
-+ .name = "sru (gen1)",
-+ .init = rsnd_src_init_gen1,
-+ .quit = rsnd_src_quit,
-+ .start = rsnd_src_start_gen1,
-+ .stop = rsnd_src_stop_gen1,
-+};
-+
-+/*
-+ * Gen2 functions
-+ */
-+static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int ret;
-+
-+ ret = rsnd_src_set_convert_rate(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_mod_read(mod, SRC_ADINR));
-+ rsnd_mod_write(mod, SSI_BUSIF_MODE, rsnd_mod_read(mod, SRC_BUSIF_MODE));
-+
-+ rsnd_mod_write(mod, SRC_SRCCR, 0x00011110);
-+
-+ rsnd_mod_write(mod, SRC_BSDSR, 0x01800000);
-+ rsnd_mod_write(mod, SRC_BSISR, 0x00100060);
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_set_convert_timing_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+ u32 convert_rate = rsnd_src_convert_rate(src);
-+ int ret;
-+
-+ if (convert_rate)
-+ ret = rsnd_adg_set_convert_clk_gen2(mod, rdai, io,
-+ runtime->rate,
-+ convert_rate);
-+ else
-+ ret = rsnd_adg_set_convert_timing_gen2(mod, rdai, io);
-+
-+ return ret;
-+}
-+
-+static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+ struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod));
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ int ret;
-+ int is_play;
-+
-+ if (info->dai_info)
-+ is_play = rsnd_info_is_playback(priv, src);
-+ else
-+ is_play = rsnd_ssi_is_play(ssi);
-+
-+ ret = rsnd_dma_init(priv,
-+ rsnd_mod_to_dma(mod),
-+ is_play,
-+ src->info->dma_id);
-+ if (ret < 0)
-+ dev_err(dev, "SRC DMA failed\n");
-+
-+ return ret;
-+}
-+
-+static int rsnd_src_remove_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_init_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ int ret;
-+
-+ ret = rsnd_src_init(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_src_set_convert_rate_gen2(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ ret = rsnd_src_set_convert_timing_gen2(mod, rdai, io);
-+ if (ret < 0)
-+ return ret;
-+
-+ return 0;
-+}
-+
-+static int rsnd_src_start_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+
-+ rsnd_dma_start(rsnd_mod_to_dma(&src->mod));
-+
-+ rsnd_mod_write(mod, SSI_CTRL, 0x1);
-+ rsnd_mod_write(mod, SRC_CTRL, 0x11);
-+
-+ return rsnd_src_start(mod, rdai, io);
-+}
-+
-+static int rsnd_src_stop_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct rsnd_dai_stream *io)
-+{
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+
-+ rsnd_mod_write(mod, SSI_CTRL, 0);
-+ rsnd_mod_write(mod, SRC_CTRL, 0);
-+
-+ rsnd_dma_stop(rsnd_mod_to_dma(&src->mod));
-+
-+ return rsnd_src_stop(mod, rdai, io);
-+}
-+
-+static struct rsnd_mod_ops rsnd_src_gen2_ops = {
-+ .name = "src (gen2)",
-+ .probe = rsnd_src_probe_gen2,
-+ .remove = rsnd_src_remove_gen2,
-+ .init = rsnd_src_init_gen2,
-+ .quit = rsnd_src_quit,
-+ .start = rsnd_src_start_gen2,
-+ .stop = rsnd_src_stop_gen2,
-+};
-+
-+struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id)
-+{
-+ if (WARN_ON(id < 0 || id >= rsnd_src_nr(priv)))
-+ id = 0;
-+
-+ return &((struct rsnd_src *)(priv->src) + id)->mod;
-+}
-+
-+int rsnd_src_probe(struct platform_device *pdev,
-+ struct rsnd_priv *priv)
-+{
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ struct rsnd_src *src;
-+ struct rsnd_mod_ops *ops;
-+ struct clk *clk;
-+ char name[RSND_SRC_NAME_SIZE];
-+ int i, nr;
-+
-+ /*
-+ * init SRC
-+ */
-+ nr = info->src_info_nr;
-+ if (!nr)
-+ return 0;
-+
-+ src = devm_kzalloc(dev, sizeof(*src) * nr, GFP_KERNEL);
-+ if (!src) {
-+ dev_err(dev, "SRC allocate failed\n");
-+ return -ENOMEM;
-+ }
-+
-+ priv->src_nr = nr;
-+ priv->src = src;
-+
-+ for_each_rsnd_src(src, priv, i) {
-+ snprintf(name, RSND_SRC_NAME_SIZE, "src.%d", i);
-+
-+ clk = devm_clk_get(dev, name);
-+ if (IS_ERR(clk)) {
-+ snprintf(name, RSND_SRC_NAME_SIZE, "scu.%d", i);
-+ clk = devm_clk_get(dev, name);
-+ }
-+
-+ if (IS_ERR(clk))
-+ return PTR_ERR(clk);
-+
-+ src->info = &info->src_info[i];
-+ src->clk = clk;
-+
-+ ops = &rsnd_src_non_ops;
-+ if (rsnd_src_hpbif_is_enable(src)) {
-+ if (rsnd_is_gen1(priv))
-+ ops = &rsnd_src_gen1_ops;
-+ if (rsnd_is_gen2(priv))
-+ ops = &rsnd_src_gen2_ops;
-+ }
-+
-+ rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i);
-+
-+ dev_dbg(dev, "SRC%d probed\n", i);
-+ }
-+
-+ return 0;
-+}
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -121,7 +121,7 @@ static int rsnd_ssi_master_clk_start(str
- 1, 2, 4, 8, 16, 6, 12,
- };
- unsigned int main_rate;
-- unsigned int rate = rsnd_scu_get_ssi_rate(priv, io, runtime);
-+ unsigned int rate = rsnd_src_get_ssi_rate(priv, io, runtime);
-
- /*
- * Find best clock, and try to start ADG
-@@ -287,7 +287,7 @@ static int rsnd_ssi_init(struct rsnd_mod
- ssi->cr_own = cr;
- ssi->err = -1; /* ignore 1st error */
-
-- rsnd_scu_ssi_mode_init(mod, rdai, io);
-+ rsnd_src_ssi_mode_init(mod, rdai, io);
-
- return 0;
- }
-@@ -387,7 +387,7 @@ static int rsnd_ssi_pio_start(struct rsn
- /* enable PIO IRQ */
- ssi->cr_etc = UIEN | OIEN | DIEN;
-
-- rsnd_scu_enable_ssi_irq(mod, rdai, io);
-+ rsnd_src_enable_ssi_irq(mod, rdai, io);
-
- rsnd_ssi_hw_start(ssi, rdai, io);
-
diff --git a/patches.renesas/0072-ASoC-rcar-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch b/patches.renesas/0072-ASoC-rcar-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
deleted file mode 100644
index 3163474419b34..0000000000000
--- a/patches.renesas/0072-ASoC-rcar-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 903bcf506d04ce9bd5fc8ccffb2357f5cff39536 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 13 Mar 2014 17:56:43 -0700
-Subject: ASoC: rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags
-
-SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
-Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e1508289404ab6ca28e0dc931612600f0441c417)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 6a1b45df8101..d836e8a9fdce 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -510,10 +510,10 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
- /* set master/slave audio interface */
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
- case SND_SOC_DAIFMT_CBM_CFM:
-- rdai->clk_master = 1;
-+ rdai->clk_master = 0;
- break;
- case SND_SOC_DAIFMT_CBS_CFS:
-- rdai->clk_master = 0;
-+ rdai->clk_master = 1; /* codec is slave, cpu is master */
- break;
- default:
- return -EINVAL;
---
-2.1.2
-
diff --git a/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch b/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch
deleted file mode 100644
index c940073ad29dc..0000000000000
--- a/patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch
+++ /dev/null
@@ -1,531 +0,0 @@
-From 545e6a07d1d413829dc7a25c217eb657edefe2ea Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 17 Mar 2014 19:29:55 -0700
-Subject: ASoC: rsnd: add DeviceTree support
-
-Support for loading the Renesas R-Car sound driver via DeviceTree.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 90e8e50fce3585d6f9902701de08389b027dadc6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 96 +++++++++++
- sound/soc/sh/rcar/adg.c | 1
- sound/soc/sh/rcar/core.c | 122 ++++++++++++++-
- sound/soc/sh/rcar/gen.c | 15 +
- sound/soc/sh/rcar/rsnd.h | 11 +
- sound/soc/sh/rcar/src.c | 36 ++++
- sound/soc/sh/rcar/ssi.c | 56 ++++++
- 7 files changed, 334 insertions(+), 3 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-
---- /dev/null
-+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-@@ -0,0 +1,96 @@
-+Renesas R-Car sound
-+
-+Required properties:
-+- compatible : "renesas,rcar_sound-gen1" if generation1
-+ "renesas,rcar_sound-gen2" if generation2
-+- reg : Should contain the register physical address.
-+ required register is
-+ SRU/ADG/SSI if generation1
-+ SRU/ADG/SSIU/SSI if generation2
-+- rcar_sound,ssi : SSI subnode
-+- rcar_sound,scu : SCU subnode
-+- rcar_sound,dai : DAI subnode
-+
-+SSI subnode properties:
-+- interrupts : Should contain SSI interrupt for PIO transfer
-+- shared-pin : if shared clock pin
-+
-+DAI subnode properties:
-+- playback : list of playback modules
-+- capture : list of capture modules
-+
-+Example:
-+
-+rcar_sound: rcar_sound@0xffd90000 {
-+ #sound-dai-cells = <1>;
-+ compatible = "renesas,rcar_sound-gen2";
-+ reg = <0 0xec500000 0 0x1000>, /* SCU */
-+ <0 0xec5a0000 0 0x100>, /* ADG */
-+ <0 0xec540000 0 0x1000>, /* SSIU */
-+ <0 0xec541000 0 0x1280>; /* SSI */
-+
-+ rcar_sound,src {
-+ src0: src@0 { };
-+ src1: src@1 { };
-+ src2: src@2 { };
-+ src3: src@3 { };
-+ src4: src@4 { };
-+ src5: src@5 { };
-+ src6: src@6 { };
-+ src7: src@7 { };
-+ src8: src@8 { };
-+ src9: src@9 { };
-+ };
-+
-+ rcar_sound,ssi {
-+ ssi0: ssi@0 {
-+ interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi1: ssi@1 {
-+ interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi2: ssi@2 {
-+ interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi3: ssi@3 {
-+ interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi4: ssi@4 {
-+ interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi5: ssi@5 {
-+ interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi6: ssi@6 {
-+ interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi7: ssi@7 {
-+ interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi8: ssi@8 {
-+ interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ ssi9: ssi@9 {
-+ interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+ };
-+
-+ rcar_sound,dai {
-+ dai0 {
-+ playback = <&ssi5 &src5>;
-+ capture = <&ssi6>;
-+ };
-+ dai1 {
-+ playback = <&ssi3>;
-+ };
-+ dai2 {
-+ capture = <&ssi4>;
-+ };
-+ dai3 {
-+ playback = <&ssi7>;
-+ };
-+ dai4 {
-+ capture = <&ssi8>;
-+ };
-+ };
-+};
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -392,6 +392,7 @@ static void rsnd_adg_ssi_clk_init(struct
- }
-
- int rsnd_adg_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv)
- {
- struct rsnd_adg *adg;
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -100,6 +100,21 @@
- #define RSND_RATES SNDRV_PCM_RATE_8000_96000
- #define RSND_FMTS (SNDRV_PCM_FMTBIT_S24_LE | SNDRV_PCM_FMTBIT_S16_LE)
-
-+static struct rsnd_of_data rsnd_of_data_gen1 = {
-+ .flags = RSND_GEN1,
-+};
-+
-+static struct rsnd_of_data rsnd_of_data_gen2 = {
-+ .flags = RSND_GEN2,
-+};
-+
-+static struct of_device_id rsnd_of_match[] = {
-+ { .compatible = "renesas,rcar_sound-gen1", .data = &rsnd_of_data_gen1 },
-+ { .compatible = "renesas,rcar_sound-gen2", .data = &rsnd_of_data_gen2 },
-+ {},
-+};
-+MODULE_DEVICE_TABLE(of, rsnd_of_match);
-+
- /*
- * rsnd_platform functions
- */
-@@ -620,7 +635,92 @@ static int rsnd_path_init(struct rsnd_pr
- return ret;
- }
-
-+static void rsnd_of_parse_dai(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv)
-+{
-+ struct device_node *dai_node, *dai_np;
-+ struct device_node *ssi_node, *ssi_np;
-+ struct device_node *src_node, *src_np;
-+ struct device_node *playback, *capture;
-+ struct rsnd_dai_platform_info *dai_info;
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct device *dev = &pdev->dev;
-+ int nr, i;
-+ int dai_i, ssi_i, src_i;
-+
-+ if (!of_data)
-+ return;
-+
-+ dai_node = of_get_child_by_name(dev->of_node, "rcar_sound,dai");
-+ if (!dai_node)
-+ return;
-+
-+ nr = of_get_child_count(dai_node);
-+ if (!nr)
-+ return;
-+
-+ dai_info = devm_kzalloc(dev,
-+ sizeof(struct rsnd_dai_platform_info) * nr,
-+ GFP_KERNEL);
-+ if (!dai_info) {
-+ dev_err(dev, "dai info allocation error\n");
-+ return;
-+ }
-+
-+ info->dai_info_nr = nr;
-+ info->dai_info = dai_info;
-+
-+ ssi_node = of_get_child_by_name(dev->of_node, "rcar_sound,ssi");
-+ src_node = of_get_child_by_name(dev->of_node, "rcar_sound,src");
-+
-+#define mod_parse(name) \
-+if (name##_node) { \
-+ struct rsnd_##name##_platform_info *name##_info; \
-+ \
-+ name##_i = 0; \
-+ for_each_child_of_node(name##_node, name##_np) { \
-+ name##_info = info->name##_info + name##_i; \
-+ \
-+ if (name##_np == playback) \
-+ dai_info->playback.name = name##_info; \
-+ if (name##_np == capture) \
-+ dai_info->capture.name = name##_info; \
-+ \
-+ name##_i++; \
-+ } \
-+}
-+
-+ /*
-+ * parse all dai
-+ */
-+ dai_i = 0;
-+ for_each_child_of_node(dai_node, dai_np) {
-+ dai_info = info->dai_info + dai_i;
-+
-+ for (i = 0;; i++) {
-+
-+ playback = of_parse_phandle(dai_np, "playback", i);
-+ capture = of_parse_phandle(dai_np, "capture", i);
-+
-+ if (!playback && !capture)
-+ break;
-+
-+ mod_parse(ssi);
-+ mod_parse(src);
-+
-+ if (playback)
-+ of_node_put(playback);
-+ if (capture)
-+ of_node_put(capture);
-+ }
-+
-+ dai_i++;
-+ }
-+}
-+
- static int rsnd_dai_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv)
- {
- struct snd_soc_dai_driver *drv;
-@@ -628,13 +728,16 @@ static int rsnd_dai_probe(struct platfor
- struct rsnd_dai *rdai;
- struct rsnd_mod *pmod, *cmod;
- struct device *dev = rsnd_priv_to_dev(priv);
-- int dai_nr = info->dai_info_nr;
-+ int dai_nr;
- int i;
-
-+ rsnd_of_parse_dai(pdev, of_data, priv);
-+
- /*
- * dai_nr should be set via dai_info_nr,
- * but allow it to keeping compatible
- */
-+ dai_nr = info->dai_info_nr;
- if (!dai_nr) {
- /* get max dai nr */
- for (dai_nr = 0; dai_nr < 32; dai_nr++) {
-@@ -801,7 +904,10 @@ static int rsnd_probe(struct platform_de
- struct rsnd_priv *priv;
- struct device *dev = &pdev->dev;
- struct rsnd_dai *rdai;
-+ const struct of_device_id *of_id = of_match_device(rsnd_of_match, dev);
-+ const struct rsnd_of_data *of_data;
- int (*probe_func[])(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv) = {
- rsnd_gen_probe,
- rsnd_ssi_probe,
-@@ -811,7 +917,16 @@ static int rsnd_probe(struct platform_de
- };
- int ret, i;
-
-- info = pdev->dev.platform_data;
-+ info = NULL;
-+ of_data = NULL;
-+ if (of_id) {
-+ info = devm_kzalloc(&pdev->dev,
-+ sizeof(struct rcar_snd_info), GFP_KERNEL);
-+ of_data = of_id->data;
-+ } else {
-+ info = pdev->dev.platform_data;
-+ }
-+
- if (!info) {
- dev_err(dev, "driver needs R-Car sound information\n");
- return -ENODEV;
-@@ -834,7 +949,7 @@ static int rsnd_probe(struct platform_de
- * init each module
- */
- for (i = 0; i < ARRAY_SIZE(probe_func); i++) {
-- ret = probe_func[i](pdev, priv);
-+ ret = probe_func[i](pdev, of_data, priv);
- if (ret)
- return ret;
- }
-@@ -902,6 +1017,7 @@ static int rsnd_remove(struct platform_d
- static struct platform_driver rsnd_driver = {
- .driver = {
- .name = "rcar_sound",
-+ .of_match_table = rsnd_of_match,
- },
- .probe = rsnd_probe,
- .remove = rsnd_remove,
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -359,13 +359,28 @@ static int rsnd_gen1_probe(struct platfo
- /*
- * Gen
- */
-+static void rsnd_of_parse_gen(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv)
-+{
-+ struct rcar_snd_info *info = priv->info;
-+
-+ if (!of_data)
-+ return;
-+
-+ info->flags = of_data->flags;
-+}
-+
- int rsnd_gen_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_gen *gen;
- int ret;
-
-+ rsnd_of_parse_gen(pdev, of_data, priv);
-+
- gen = devm_kzalloc(dev, sizeof(*gen), GFP_KERNEL);
- if (!gen) {
- dev_err(dev, "GEN allocate failed\n");
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -17,6 +17,8 @@
- #include <linux/io.h>
- #include <linux/list.h>
- #include <linux/module.h>
-+#include <linux/of_device.h>
-+#include <linux/of_irq.h>
- #include <linux/sh_dma.h>
- #include <linux/workqueue.h>
- #include <sound/rcar_snd.h>
-@@ -113,6 +115,7 @@ enum rsnd_reg {
- #define RSND_REG_SRCOUT_TIMSEL4 RSND_REG_SHARE18
- #define RSND_REG_AUDIO_CLK_SEL2 RSND_REG_SHARE19
-
-+struct rsnd_of_data;
- struct rsnd_priv;
- struct rsnd_mod;
- struct rsnd_dai;
-@@ -260,6 +263,7 @@ int rsnd_dai_pointer_offset(struct rsnd_
- * R-Car Gen1/Gen2
- */
- int rsnd_gen_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv);
- void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
-@@ -273,6 +277,7 @@ void __iomem *rsnd_gen_reg_get(struct rs
- int rsnd_adg_ssi_clk_stop(struct rsnd_mod *mod);
- int rsnd_adg_ssi_clk_try_start(struct rsnd_mod *mod, unsigned int rate);
- int rsnd_adg_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv);
- int rsnd_adg_set_convert_clk_gen1(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
-@@ -290,6 +295,10 @@ int rsnd_adg_set_convert_timing_gen2(str
- /*
- * R-Car sound priv
- */
-+struct rsnd_of_data {
-+ u32 flags;
-+};
-+
- struct rsnd_priv {
-
- struct device *dev;
-@@ -348,6 +357,7 @@ struct rsnd_priv {
- * R-Car SRC
- */
- int rsnd_src_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id);
- unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
-@@ -366,6 +376,7 @@ int rsnd_src_enable_ssi_irq(struct rsnd_
- * R-Car SSI
- */
- int rsnd_ssi_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
- struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -628,7 +628,41 @@ struct rsnd_mod *rsnd_src_mod_get(struct
- return &((struct rsnd_src *)(priv->src) + id)->mod;
- }
-
-+static void rsnd_of_parse_src(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv)
-+{
-+ struct device_node *src_node;
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct rsnd_src_platform_info *src_info;
-+ struct device *dev = &pdev->dev;
-+ int nr;
-+
-+ if (!of_data)
-+ return;
-+
-+ src_node = of_get_child_by_name(dev->of_node, "rcar_sound,src");
-+ if (!src_node)
-+ return;
-+
-+ nr = of_get_child_count(src_node);
-+ if (!nr)
-+ return;
-+
-+ src_info = devm_kzalloc(dev,
-+ sizeof(struct rsnd_src_platform_info) * nr,
-+ GFP_KERNEL);
-+ if (!src_info) {
-+ dev_err(dev, "src info allocation error\n");
-+ return;
-+ }
-+
-+ info->src_info = src_info;
-+ info->src_info_nr = nr;
-+}
-+
- int rsnd_src_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv)
- {
- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-@@ -639,6 +673,8 @@ int rsnd_src_probe(struct platform_devic
- char name[RSND_SRC_NAME_SIZE];
- int i, nr;
-
-+ rsnd_of_parse_src(pdev, of_data, priv);
-+
- /*
- * init SRC
- */
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -588,7 +588,61 @@ static void rsnd_ssi_parent_clk_setup(st
- }
- }
-
-+
-+static void rsnd_of_parse_ssi(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv)
-+{
-+ struct device_node *node;
-+ struct device_node *np;
-+ struct rsnd_ssi_platform_info *ssi_info;
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct device *dev = &pdev->dev;
-+ int nr, i;
-+
-+ if (!of_data)
-+ return;
-+
-+ node = of_get_child_by_name(dev->of_node, "rcar_sound,ssi");
-+ if (!node)
-+ return;
-+
-+ nr = of_get_child_count(node);
-+ if (!nr)
-+ return;
-+
-+ ssi_info = devm_kzalloc(dev,
-+ sizeof(struct rsnd_ssi_platform_info) * nr,
-+ GFP_KERNEL);
-+ if (!ssi_info) {
-+ dev_err(dev, "ssi info allocation error\n");
-+ return;
-+ }
-+
-+ info->ssi_info = ssi_info;
-+ info->ssi_info_nr = nr;
-+
-+ i = -1;
-+ for_each_child_of_node(node, np) {
-+ i++;
-+
-+ ssi_info = info->ssi_info + i;
-+
-+ /*
-+ * pin settings
-+ */
-+ if (of_get_property(np, "shared-pin", NULL))
-+ ssi_info->flags |= RSND_SSI_CLK_PIN_SHARE;
-+
-+ /*
-+ * irq
-+ */
-+ ssi_info->pio_irq = irq_of_parse_and_map(np, 0);
-+ }
-+}
-+
- int rsnd_ssi_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv)
- {
- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-@@ -600,6 +654,8 @@ int rsnd_ssi_probe(struct platform_devic
- char name[RSND_SSI_NAME_SIZE];
- int i, nr;
-
-+ rsnd_of_parse_ssi(pdev, of_data, priv);
-+
- /*
- * init SSI
- */
diff --git a/patches.renesas/0074-ASoC-rcar-bugfix-it-cares-about-the-non-src-case.patch b/patches.renesas/0074-ASoC-rcar-bugfix-it-cares-about-the-non-src-case.patch
deleted file mode 100644
index a60d241e71aa8..0000000000000
--- a/patches.renesas/0074-ASoC-rcar-bugfix-it-cares-about-the-non-src-case.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 40bd3f26cc31b914c28192aa4c698fc501c2d2f4 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 23 Mar 2014 21:23:42 -0700
-Subject: ASoC: rcar: bugfix: it cares about the non-src case
-
-src might not exist.
-kernel will be hung-up without this patch in such case.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b1eac430b6a4bee6821273d9b41dd3593eb7830b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/src.c | 18 +++++++++++-------
- 1 file changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index eee75ebf961c..6232b7d307aa 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -182,16 +182,20 @@ unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime)
- {
-+ struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
- struct rsnd_src *src;
-- unsigned int rate;
-+ unsigned int rate = 0;
-
-- src = rsnd_mod_to_src(rsnd_io_to_mod_src(io));
-+ if (src_mod) {
-+ src = rsnd_mod_to_src(src_mod);
-+
-+ /*
-+ * return convert rate if SRC is used,
-+ * otherwise, return runtime->rate as usual
-+ */
-+ rate = rsnd_src_convert_rate(src);
-+ }
-
-- /*
-- * return convert rate if SRC is used,
-- * otherwise, return runtime->rate as usual
-- */
-- rate = rsnd_src_convert_rate(src);
- if (!rate)
- rate = runtime->rate;
-
---
-2.1.2
-
diff --git a/patches.renesas/0075-ASoC-rsnd-fix-clock-prepare-unprepare.patch b/patches.renesas/0075-ASoC-rsnd-fix-clock-prepare-unprepare.patch
deleted file mode 100644
index 4f7be9fb01d38..0000000000000
--- a/patches.renesas/0075-ASoC-rsnd-fix-clock-prepare-unprepare.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From cc6b7c7bd649ee3b12d08615d0bfe303fb544687 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Thu, 10 Apr 2014 18:16:33 -0700
-Subject: ASoC: rsnd: fix clock prepare/unprepare
-
-As with the previous commit, before a clock can be used it must be prepared
-for use. Change from clk_enable() and clk_disable() to the versions of the
-calls which also prepare and un-prepare the clocks.
-
-Will fix warnings from the clock code when this is used.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 79861bbb759053a9b91026becc0915d0f1f8d37d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/src.c | 4 ++--
- sound/soc/sh/rcar/ssi.c | 4 ++--
- 2 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 6232b7d307aa..4d0720ed5a90 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -258,7 +258,7 @@ static int rsnd_src_init(struct rsnd_mod *mod,
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-- clk_enable(src->clk);
-+ clk_prepare_enable(src->clk);
-
- return 0;
- }
-@@ -269,7 +269,7 @@ static int rsnd_src_quit(struct rsnd_mod *mod,
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-- clk_disable(src->clk);
-+ clk_disable_unprepare(src->clk);
-
- return 0;
- }
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 4b7e20603dd7..1d8387c25bd8 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -171,7 +171,7 @@ static void rsnd_ssi_hw_start(struct rsnd_ssi *ssi,
- u32 cr;
-
- if (0 == ssi->usrcnt) {
-- clk_enable(ssi->clk);
-+ clk_prepare_enable(ssi->clk);
-
- if (rsnd_dai_is_clk_master(rdai)) {
- if (rsnd_ssi_clk_from_parent(ssi))
-@@ -230,7 +230,7 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi,
- rsnd_ssi_master_clk_stop(ssi);
- }
-
-- clk_disable(ssi->clk);
-+ clk_disable_unprepare(ssi->clk);
- }
-
- dev_dbg(dev, "ssi%d hw stopped\n", rsnd_mod_id(&ssi->mod));
---
-2.1.2
-
diff --git a/patches.renesas/0076-ASoC-rsnd-call-rsnd_dai_pointer_update-from-outside-.patch b/patches.renesas/0076-ASoC-rsnd-call-rsnd_dai_pointer_update-from-outside-.patch
deleted file mode 100644
index 555b0be5544c6..0000000000000
--- a/patches.renesas/0076-ASoC-rsnd-call-rsnd_dai_pointer_update-from-outside-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 70d213c60d5e9d3ecadafbaf209b5155fdbed820 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 23 Apr 2014 14:59:12 +0900
-Subject: ASoC: rsnd: call rsnd_dai_pointer_update() from outside of lock
-
-rsnd_soc_dai_trigger() will be called
-after rsnd_dai_pointer_update() function
-which is using rsnd_lock().
-Thus, it should be called from outside of rsnd_lock().
-Kernel will be hangup without this patch.
-Special thanks to Kataoka-san
-
-Reported-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 836b31fe1a9791d84ed95783ed42ebd5719f7918)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 215b668166be..89424470a1f3 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -197,13 +197,12 @@ static void rsnd_dma_complete(void *data)
- * rsnd_dai_pointer_update() will be called twice,
- * ant it will breaks io->byte_pos
- */
--
-- rsnd_dai_pointer_update(io, io->byte_per_period);
--
- if (dma->submit_loop)
- rsnd_dma_continue(dma);
-
- rsnd_unlock(priv, flags);
-+
-+ rsnd_dai_pointer_update(io, io->byte_per_period);
- }
-
- static void __rsnd_dma_start(struct rsnd_dma *dma)
---
-2.1.2
-
diff --git a/patches.renesas/0077-thermal-rcar-thermal-fix-same-mask-applied-twice.patch b/patches.renesas/0077-thermal-rcar-thermal-fix-same-mask-applied-twice.patch
deleted file mode 100644
index 6825e3d276e11..0000000000000
--- a/patches.renesas/0077-thermal-rcar-thermal-fix-same-mask-applied-twice.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 11b04631bc946f5ea31ae923061802bab10bdb30 Mon Sep 17 00:00:00 2001
-From: Patrick Titiano <ptitiano@baylibre.com>
-Date: Fri, 28 Feb 2014 14:10:03 +0100
-Subject: thermal: rcar-thermal: fix same mask applied twice
-
-Mask is already applied preceding the if statement.
-Remove the second mask.
-
-Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-(cherry picked from commit 206c0cba095acbb91d552d220207d690c9b29594)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/thermal/rcar_thermal.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
-index 79a09d02bbca..88cfeec6a28f 100644
---- a/drivers/thermal/rcar_thermal.c
-+++ b/drivers/thermal/rcar_thermal.c
-@@ -313,7 +313,7 @@ static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
-
- status = (status >> rcar_id_to_shift(priv)) & 0x3;
-
-- if (status & 0x3) {
-+ if (status) {
- dev_dbg(dev, "thermal%d %s%s\n",
- priv->id,
- (status & 0x2) ? "Rising " : "",
---
-2.1.2
-
diff --git a/patches.renesas/0078-thermal-rcar-thermal-update-thermal-zone-only-when-t.patch b/patches.renesas/0078-thermal-rcar-thermal-update-thermal-zone-only-when-t.patch
deleted file mode 100644
index 9410b31d702d8..0000000000000
--- a/patches.renesas/0078-thermal-rcar-thermal-update-thermal-zone-only-when-t.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 4dd74e8a65014b9bf3d19a5b94728bc4fbb37045 Mon Sep 17 00:00:00 2001
-From: Patrick Titiano <ptitiano@baylibre.com>
-Date: Fri, 28 Feb 2014 14:10:04 +0100
-Subject: thermal: rcar-thermal: update thermal zone only when temperature
- changes
-
-Avoid updating the thermal zone in case an IRQ was triggered but the
-temperature didn't effectively change.
-Note this is not a driver issue.
-Below is a captured debug trace illustrating the purpose of this patch:
-out of 8 thermal zone updates, only 2 are actually necessary.
-
-[ 41.120000] rcar_thermal_work(): cctemp=25000
-[ 41.120000] rcar_thermal_work(): nctemp=30000
-[ 41.120000] rcar_thermal_work(): temp is now 30000C, update thermal zone
-[ 58.990000] rcar_thermal_work(): cctemp=30000
-[ 58.990000] rcar_thermal_work(): nctemp=30000
-[ 58.990000] rcar_thermal_work(): same temp, do not update thermal zone
-[ 59.290000] rcar_thermal_work(): cctemp=30000
-[ 59.290000] rcar_thermal_work(): nctemp=30000
-[ 59.290000] rcar_thermal_work(): same temp, do not update thermal zone
-[ 59.590000] rcar_thermal_work(): cctemp=30000
-[ 59.590000] rcar_thermal_work(): nctemp=30000
-[ 59.590000] rcar_thermal_work(): same temp, do not update thermal zone
-[ 59.890000] rcar_thermal_work(): cctemp=30000
-[ 59.890000] rcar_thermal_work(): nctemp=30000
-[ 59.890000] rcar_thermal_work(): same temp, do not update thermal zone
-[ 60.190000] rcar_thermal_work(): cctemp=30000
-[ 60.190000] rcar_thermal_work(): nctemp=30000
-[ 60.190000] rcar_thermal_work(): same temp, do not update thermal zone
-[ 60.490000] rcar_thermal_work(): cctemp=30000
-[ 60.490000] rcar_thermal_work(): nctemp=30000
-[ 60.490000] rcar_thermal_work(): same temp, do not update thermal zone
-[ 60.790000] rcar_thermal_work(): cctemp=30000
-[ 60.790000] rcar_thermal_work(): nctemp=35000
-[ 60.790000] rcar_thermal_work(): temp is now 35000C, update thermal zone
-
-I suspect this may be due to sensor sampling accuracy / fluctuation,
-but no formal proof.
-
-Signed-off-by: Patrick Titiano <ptitiano@baylibre.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-(cherry picked from commit 9477165ec525d47abb1cb6523698e0cd89d65ddb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/thermal/rcar_thermal.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
-index 88cfeec6a28f..5a37940b02c9 100644
---- a/drivers/thermal/rcar_thermal.c
-+++ b/drivers/thermal/rcar_thermal.c
-@@ -299,12 +299,17 @@ static void _rcar_thermal_irq_ctrl(struct rcar_thermal_priv *priv, int enable)
- static void rcar_thermal_work(struct work_struct *work)
- {
- struct rcar_thermal_priv *priv;
-+ unsigned long cctemp, nctemp;
-
- priv = container_of(work, struct rcar_thermal_priv, work.work);
-
-+ rcar_thermal_get_temp(priv->zone, &cctemp);
- rcar_thermal_update_temp(priv);
- rcar_thermal_irq_enable(priv);
-- thermal_zone_device_update(priv->zone);
-+
-+ rcar_thermal_get_temp(priv->zone, &nctemp);
-+ if (nctemp != cctemp)
-+ thermal_zone_device_update(priv->zone);
- }
-
- static u32 rcar_thermal_had_changed(struct rcar_thermal_priv *priv, u32 status)
---
-2.1.2
-
diff --git a/patches.renesas/0079-spi-rspi-Remove-unused-mesg-parameter-from-send-rece.patch b/patches.renesas/0079-spi-rspi-Remove-unused-mesg-parameter-from-send-rece.patch
deleted file mode 100644
index 90fc74560c461..0000000000000
--- a/patches.renesas/0079-spi-rspi-Remove-unused-mesg-parameter-from-send-rece.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From f218b6575eabf6556e4b0cbd64661235407e4b8a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:51 +0100
-Subject: spi: rspi: Remove unused mesg parameter from {send,receive}_pio()
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 91949a2d4a96195ccd37322fafe8d16c68dda86e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 27 ++++++++++-----------------
- 1 file changed, 10 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 28987d9fcfe5..ccd5cf201d04 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -228,11 +228,8 @@ static u16 rspi_read16(const struct rspi_data *rspi, u16 offset)
- struct spi_ops {
- int (*set_config_register)(const struct rspi_data *rspi,
- int access_size);
-- int (*send_pio)(struct rspi_data *rspi, struct spi_message *mesg,
-- struct spi_transfer *t);
-- int (*receive_pio)(struct rspi_data *rspi, struct spi_message *mesg,
-- struct spi_transfer *t);
--
-+ int (*send_pio)(struct rspi_data *rspi, struct spi_transfer *t);
-+ int (*receive_pio)(struct rspi_data *rspi, struct spi_transfer *t);
- };
-
- /*
-@@ -358,8 +355,7 @@ static void rspi_negate_ssl(const struct rspi_data *rspi)
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_SPE, RSPI_SPCR);
- }
-
--static int rspi_send_pio(struct rspi_data *rspi, struct spi_message *mesg,
-- struct spi_transfer *t)
-+static int rspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
- int remain = t->len;
- const u8 *data = t->tx_buf;
-@@ -384,8 +380,7 @@ static int rspi_send_pio(struct rspi_data *rspi, struct spi_message *mesg,
- return 0;
- }
-
--static int qspi_send_pio(struct rspi_data *rspi, struct spi_message *mesg,
-- struct spi_transfer *t)
-+static int qspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
- int remain = t->len;
- const u8 *data = t->tx_buf;
-@@ -418,7 +413,7 @@ static int qspi_send_pio(struct rspi_data *rspi, struct spi_message *mesg,
- return 0;
- }
-
--#define send_pio(spi, mesg, t) spi->ops->send_pio(spi, mesg, t)
-+#define send_pio(spi, t) spi->ops->send_pio(spi, t)
-
- static void rspi_dma_complete(void *arg)
- {
-@@ -551,8 +546,7 @@ static void rspi_receive_init(const struct rspi_data *rspi)
- RSPI_SPSR);
- }
-
--static int rspi_receive_pio(struct rspi_data *rspi, struct spi_message *mesg,
-- struct spi_transfer *t)
-+static int rspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
- int remain = t->len;
- u8 *data;
-@@ -598,8 +592,7 @@ static void qspi_receive_init(const struct rspi_data *rspi)
- rspi_write8(rspi, 0x00, QSPI_SPBFCR);
- }
-
--static int qspi_receive_pio(struct rspi_data *rspi, struct spi_message *mesg,
-- struct spi_transfer *t)
-+static int qspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
- int remain = t->len;
- u8 *data;
-@@ -630,7 +623,7 @@ static int qspi_receive_pio(struct rspi_data *rspi, struct spi_message *mesg,
- return 0;
- }
-
--#define receive_pio(spi, mesg, t) spi->ops->receive_pio(spi, mesg, t)
-+#define receive_pio(spi, t) spi->ops->receive_pio(spi, t)
-
- static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
-@@ -771,7 +764,7 @@ static void rspi_work(struct work_struct *work)
- if (rspi_is_dma(rspi, t))
- ret = rspi_send_dma(rspi, t);
- else
-- ret = send_pio(rspi, mesg, t);
-+ ret = send_pio(rspi, t);
- if (ret < 0)
- goto error;
- }
-@@ -779,7 +772,7 @@ static void rspi_work(struct work_struct *work)
- if (rspi_is_dma(rspi, t))
- ret = rspi_receive_dma(rspi, t);
- else
-- ret = receive_pio(rspi, mesg, t);
-+ ret = receive_pio(rspi, t);
- if (ret < 0)
- goto error;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0080-spi-rspi-Use-core-message-handling.patch b/patches.renesas/0080-spi-rspi-Use-core-message-handling.patch
deleted file mode 100644
index 2052026fbf94c..0000000000000
--- a/patches.renesas/0080-spi-rspi-Use-core-message-handling.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 31aaf58336d11e6eaf7f3ff71be687d8080c1a34 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:52 +0100
-Subject: spi: rspi: Use core message handling
-
-Let the generic SPI core handle SPI messages, calling into our
-rspi_transfer_one() method.
-
-rspi_assert_ssl() and rspi_negate_ssl() are absorbed into
-rspi_prepare_message() and rspi_unprepare_message(), as they actually
-enable/disable the whole SPI function, instead of just (de)asserting the
-chip select line.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 79d2349542f38663c3096f389115b1f131d6e564)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 111 +++++++++++++++----------------------------------
- 1 file changed, 34 insertions(+), 77 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index ccd5cf201d04..0e4d169c90d7 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -25,8 +25,6 @@
- #include <linux/kernel.h>
- #include <linux/sched.h>
- #include <linux/errno.h>
--#include <linux/list.h>
--#include <linux/workqueue.h>
- #include <linux/interrupt.h>
- #include <linux/platform_device.h>
- #include <linux/io.h>
-@@ -181,10 +179,7 @@ struct rspi_data {
- void __iomem *addr;
- u32 max_speed_hz;
- struct spi_master *master;
-- struct list_head queue;
-- struct work_struct ws;
- wait_queue_head_t wait;
-- spinlock_t lock;
- struct clk *clk;
- u8 spsr;
- u16 spcmd;
-@@ -345,16 +340,6 @@ static int rspi_wait_for_interrupt(struct rspi_data *rspi, u8 wait_mask,
- return 0;
- }
-
--static void rspi_assert_ssl(const struct rspi_data *rspi)
--{
-- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_SPE, RSPI_SPCR);
--}
--
--static void rspi_negate_ssl(const struct rspi_data *rspi)
--{
-- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_SPE, RSPI_SPCR);
--}
--
- static int rspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
- int remain = t->len;
-@@ -739,56 +724,27 @@ static int rspi_is_dma(const struct rspi_data *rspi, struct spi_transfer *t)
- return 0;
- }
-
--static void rspi_work(struct work_struct *work)
-+static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-+ struct spi_transfer *xfer)
- {
-- struct rspi_data *rspi = container_of(work, struct rspi_data, ws);
-- struct spi_message *mesg;
-- struct spi_transfer *t;
-- unsigned long flags;
-- int ret;
--
-- while (1) {
-- spin_lock_irqsave(&rspi->lock, flags);
-- if (list_empty(&rspi->queue)) {
-- spin_unlock_irqrestore(&rspi->lock, flags);
-- break;
-- }
-- mesg = list_entry(rspi->queue.next, struct spi_message, queue);
-- list_del_init(&mesg->queue);
-- spin_unlock_irqrestore(&rspi->lock, flags);
--
-- rspi_assert_ssl(rspi);
--
-- list_for_each_entry(t, &mesg->transfers, transfer_list) {
-- if (t->tx_buf) {
-- if (rspi_is_dma(rspi, t))
-- ret = rspi_send_dma(rspi, t);
-- else
-- ret = send_pio(rspi, t);
-- if (ret < 0)
-- goto error;
-- }
-- if (t->rx_buf) {
-- if (rspi_is_dma(rspi, t))
-- ret = rspi_receive_dma(rspi, t);
-- else
-- ret = receive_pio(rspi, t);
-- if (ret < 0)
-- goto error;
-- }
-- mesg->actual_length += t->len;
-- }
-- rspi_negate_ssl(rspi);
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-+ int ret = 0;
-
-- mesg->status = 0;
-- mesg->complete(mesg->context);
-+ if (xfer->tx_buf) {
-+ if (rspi_is_dma(rspi, xfer))
-+ ret = rspi_send_dma(rspi, xfer);
-+ else
-+ ret = send_pio(rspi, xfer);
-+ if (ret < 0)
-+ return ret;
- }
--
-- return;
--
--error:
-- mesg->status = ret;
-- mesg->complete(mesg->context);
-+ if (xfer->rx_buf) {
-+ if (rspi_is_dma(rspi, xfer))
-+ ret = rspi_receive_dma(rspi, xfer);
-+ else
-+ ret = receive_pio(rspi, xfer);
-+ }
-+ return ret;
- }
-
- static int rspi_setup(struct spi_device *spi)
-@@ -808,24 +764,26 @@ static int rspi_setup(struct spi_device *spi)
- return 0;
- }
-
--static int rspi_transfer(struct spi_device *spi, struct spi_message *mesg)
-+static void rspi_cleanup(struct spi_device *spi)
- {
-- struct rspi_data *rspi = spi_master_get_devdata(spi->master);
-- unsigned long flags;
--
-- mesg->actual_length = 0;
-- mesg->status = -EINPROGRESS;
-+}
-
-- spin_lock_irqsave(&rspi->lock, flags);
-- list_add_tail(&mesg->queue, &rspi->queue);
-- schedule_work(&rspi->ws);
-- spin_unlock_irqrestore(&rspi->lock, flags);
-+static int rspi_prepare_message(struct spi_master *master,
-+ struct spi_message *message)
-+{
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-
-+ rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_SPE, RSPI_SPCR);
- return 0;
- }
-
--static void rspi_cleanup(struct spi_device *spi)
-+static int rspi_unprepare_message(struct spi_master *master,
-+ struct spi_message *message)
- {
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-+
-+ rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_SPE, RSPI_SPCR);
-+ return 0;
- }
-
- static irqreturn_t rspi_irq(int irq, void *_sr)
-@@ -972,9 +930,6 @@ static int rspi_probe(struct platform_device *pdev)
- }
- clk_enable(rspi->clk);
-
-- INIT_LIST_HEAD(&rspi->queue);
-- spin_lock_init(&rspi->lock);
-- INIT_WORK(&rspi->ws, rspi_work);
- init_waitqueue_head(&rspi->wait);
-
- if (rspi_pd && rspi_pd->num_chipselect)
-@@ -984,8 +939,10 @@ static int rspi_probe(struct platform_device *pdev)
-
- master->bus_num = pdev->id;
- master->setup = rspi_setup;
-- master->transfer = rspi_transfer;
-+ master->transfer_one = rspi_transfer_one;
- master->cleanup = rspi_cleanup;
-+ master->prepare_message = rspi_prepare_message;
-+ master->unprepare_message = rspi_unprepare_message;
- master->mode_bits = SPI_CPHA | SPI_CPOL;
-
- ret = devm_request_irq(&pdev->dev, irq, rspi_irq, 0,
---
-2.1.2
-
diff --git a/patches.renesas/0081-spi-rspi-Abstract-8-16-bit-Data-Register-access.patch b/patches.renesas/0081-spi-rspi-Abstract-8-16-bit-Data-Register-access.patch
deleted file mode 100644
index 08f22a1f29f1e..0000000000000
--- a/patches.renesas/0081-spi-rspi-Abstract-8-16-bit-Data-Register-access.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From db334576de1aeb19d140dacfe3e443b2c849c080 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:53 +0100
-Subject: spi: rspi: Abstract 8/16-bit Data Register access
-
-Add rspi_{write,read}_data(), to abstract 8-bit (QSPI, and RSPI on RZ/A1H)
-versus 16-bit (RSPI) Data Register access.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 74da76865d57161cadf8f324281f23ed3eb5db9c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 56 +++++++++++++++++++++++++++++++-------------------
- 1 file changed, 35 insertions(+), 21 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 0e4d169c90d7..a0bb3c28ae91 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -192,6 +192,7 @@ struct rspi_data {
-
- unsigned dma_width_16bit:1;
- unsigned dma_callbacked:1;
-+ unsigned byte_access:1;
- };
-
- static void rspi_write8(const struct rspi_data *rspi, u8 data, u16 offset)
-@@ -219,10 +220,25 @@ static u16 rspi_read16(const struct rspi_data *rspi, u16 offset)
- return ioread16(rspi->addr + offset);
- }
-
-+static void rspi_write_data(const struct rspi_data *rspi, u16 data)
-+{
-+ if (rspi->byte_access)
-+ rspi_write8(rspi, data, RSPI_SPDR);
-+ else /* 16 bit */
-+ rspi_write16(rspi, data, RSPI_SPDR);
-+}
-+
-+static u16 rspi_read_data(const struct rspi_data *rspi)
-+{
-+ if (rspi->byte_access)
-+ return rspi_read8(rspi, RSPI_SPDR);
-+ else /* 16 bit */
-+ return rspi_read16(rspi, RSPI_SPDR);
-+}
-+
- /* optional functions */
- struct spi_ops {
-- int (*set_config_register)(const struct rspi_data *rspi,
-- int access_size);
-+ int (*set_config_register)(struct rspi_data *rspi, int access_size);
- int (*send_pio)(struct rspi_data *rspi, struct spi_transfer *t);
- int (*receive_pio)(struct rspi_data *rspi, struct spi_transfer *t);
- };
-@@ -230,8 +246,7 @@ struct spi_ops {
- /*
- * functions for RSPI
- */
--static int rspi_set_config_register(const struct rspi_data *rspi,
-- int access_size)
-+static int rspi_set_config_register(struct rspi_data *rspi, int access_size)
- {
- int spbr;
-
-@@ -242,8 +257,9 @@ static int rspi_set_config_register(const struct rspi_data *rspi,
- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz) - 1;
- rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR);
-
-- /* Sets number of frames to be used: 1 frame */
-- rspi_write8(rspi, 0x00, RSPI_SPDCR);
-+ /* Disable dummy transmission, set 16-bit word access, 1 frame */
-+ rspi_write8(rspi, 0, RSPI_SPDCR);
-+ rspi->byte_access = 0;
-
- /* Sets RSPCK, SSL, next-access delay value */
- rspi_write8(rspi, 0x00, RSPI_SPCKD);
-@@ -266,8 +282,7 @@ static int rspi_set_config_register(const struct rspi_data *rspi,
- /*
- * functions for QSPI
- */
--static int qspi_set_config_register(const struct rspi_data *rspi,
-- int access_size)
-+static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
- {
- u16 spcmd;
- int spbr;
-@@ -279,8 +294,9 @@ static int qspi_set_config_register(const struct rspi_data *rspi,
- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz);
- rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR);
-
-- /* Sets number of frames to be used: 1 frame */
-- rspi_write8(rspi, 0x00, RSPI_SPDCR);
-+ /* Disable dummy transmission, set byte access */
-+ rspi_write8(rspi, 0, RSPI_SPDCR);
-+ rspi->byte_access = 1;
-
- /* Sets RSPCK, SSL, next-access delay value */
- rspi_write8(rspi, 0x00, RSPI_SPCKD);
-@@ -354,7 +370,7 @@ static int rspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- return -ETIMEDOUT;
- }
-
-- rspi_write16(rspi, *data, RSPI_SPDR);
-+ rspi_write_data(rspi, *data);
- data++;
- remain--;
- }
-@@ -380,14 +396,14 @@ static int qspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- "%s: tx empty timeout\n", __func__);
- return -ETIMEDOUT;
- }
-- rspi_write8(rspi, *data++, RSPI_SPDR);
-+ rspi_write_data(rspi, *data++);
-
- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
- dev_err(&rspi->master->dev,
- "%s: receive timeout\n", __func__);
- return -ETIMEDOUT;
- }
-- rspi_read8(rspi, RSPI_SPDR);
-+ rspi_read_data(rspi);
-
- remain--;
- }
-@@ -525,7 +541,7 @@ static void rspi_receive_init(const struct rspi_data *rspi)
-
- spsr = rspi_read8(rspi, RSPI_SPSR);
- if (spsr & SPSR_SPRF)
-- rspi_read16(rspi, RSPI_SPDR); /* dummy read */
-+ rspi_read_data(rspi); /* dummy read */
- if (spsr & SPSR_OVRF)
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPSR) & ~SPSR_OVRF,
- RSPI_SPSR);
-@@ -549,15 +565,14 @@ static int rspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- return -ETIMEDOUT;
- }
- /* dummy write for generate clock */
-- rspi_write16(rspi, DUMMY_DATA, RSPI_SPDR);
-+ rspi_write_data(rspi, DUMMY_DATA);
-
- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
- dev_err(&rspi->master->dev,
- "%s: receive timeout\n", __func__);
- return -ETIMEDOUT;
- }
-- /* SPDR allows 16 or 32-bit access only */
-- *data = (u8)rspi_read16(rspi, RSPI_SPDR);
-+ *data = rspi_read_data(rspi);
-
- data++;
- remain--;
-@@ -572,7 +587,7 @@ static void qspi_receive_init(const struct rspi_data *rspi)
-
- spsr = rspi_read8(rspi, RSPI_SPSR);
- if (spsr & SPSR_SPRF)
-- rspi_read8(rspi, RSPI_SPDR); /* dummy read */
-+ rspi_read_data(rspi); /* dummy read */
- rspi_write8(rspi, SPBFCR_TXRST | SPBFCR_RXRST, QSPI_SPBFCR);
- rspi_write8(rspi, 0x00, QSPI_SPBFCR);
- }
-@@ -593,15 +608,14 @@ static int qspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- return -ETIMEDOUT;
- }
- /* dummy write for generate clock */
-- rspi_write8(rspi, DUMMY_DATA, RSPI_SPDR);
-+ rspi_write_data(rspi, DUMMY_DATA);
-
- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
- dev_err(&rspi->master->dev,
- "%s: receive timeout\n", __func__);
- return -ETIMEDOUT;
- }
-- /* SPDR allows 8, 16 or 32-bit access */
-- *data++ = rspi_read8(rspi, RSPI_SPDR);
-+ *data++ = rspi_read_data(rspi);
- remain--;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0082-spi-rspi-Add-rspi_data_-out-in-out_in-helpers.patch b/patches.renesas/0082-spi-rspi-Add-rspi_data_-out-in-out_in-helpers.patch
deleted file mode 100644
index 66d4ac834c71d..0000000000000
--- a/patches.renesas/0082-spi-rspi-Add-rspi_data_-out-in-out_in-helpers.patch
+++ /dev/null
@@ -1,194 +0,0 @@
-From 9524fd040ff8b610c7e956928bd7fced8aa359b5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:54 +0100
-Subject: spi: rspi: Add rspi_data_{out,in,out_in}() helpers
-
-Add helpers rspi_data_{out,in,out_in}() to write, read, or write and
-read data to/from the Data Register, taking care of waiting until data
-or space is available in the buffers.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 35301c996046243ca6e41d490dea2823f045614c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 117 +++++++++++++++++++++++--------------------------
- 1 file changed, 56 insertions(+), 61 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index a0bb3c28ae91..4b27513e7204 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -356,22 +356,51 @@ static int rspi_wait_for_interrupt(struct rspi_data *rspi, u8 wait_mask,
- return 0;
- }
-
-+static int rspi_data_out(struct rspi_data *rspi, u8 data)
-+{
-+ if (rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE) < 0) {
-+ dev_err(&rspi->master->dev, "transmit timeout\n");
-+ return -ETIMEDOUT;
-+ }
-+ rspi_write_data(rspi, data);
-+ return 0;
-+}
-+
-+static int rspi_data_in(struct rspi_data *rspi)
-+{
-+ u8 data;
-+
-+ if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
-+ dev_err(&rspi->master->dev, "receive timeout\n");
-+ return -ETIMEDOUT;
-+ }
-+ data = rspi_read_data(rspi);
-+ return data;
-+}
-+
-+static int rspi_data_out_in(struct rspi_data *rspi, u8 data)
-+{
-+ int ret;
-+
-+ ret = rspi_data_out(rspi, data);
-+ if (ret < 0)
-+ return ret;
-+
-+ return rspi_data_in(rspi);
-+}
-+
- static int rspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- int remain = t->len;
-+ int remain = t->len, ret;
- const u8 *data = t->tx_buf;
-+
- while (remain > 0) {
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_TXMD,
- RSPI_SPCR);
-
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: tx empty timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
--
-- rspi_write_data(rspi, *data);
-- data++;
-+ ret = rspi_data_out(rspi, *data++);
-+ if (ret < 0)
-+ return ret;
- remain--;
- }
-
-@@ -383,28 +412,17 @@ static int rspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
-
- static int qspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- int remain = t->len;
-+ int remain = t->len, ret;
- const u8 *data = t->tx_buf;
-
- rspi_write8(rspi, SPBFCR_TXRST, QSPI_SPBFCR);
- rspi_write8(rspi, 0x00, QSPI_SPBFCR);
-
- while (remain > 0) {
--
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: tx empty timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
-- rspi_write_data(rspi, *data++);
--
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: receive timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
-- rspi_read_data(rspi);
--
-+ /* dummy read */
-+ ret = rspi_data_out_in(rspi, *data++);
-+ if (ret < 0)
-+ return ret;
- remain--;
- }
-
-@@ -549,32 +567,20 @@ static void rspi_receive_init(const struct rspi_data *rspi)
-
- static int rspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- int remain = t->len;
-- u8 *data;
-+ int remain = t->len, ret;
-+ u8 *data = t->rx_buf;
-
- rspi_receive_init(rspi);
-
-- data = t->rx_buf;
- while (remain > 0) {
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_TXMD,
- RSPI_SPCR);
-
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: tx empty timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
-- /* dummy write for generate clock */
-- rspi_write_data(rspi, DUMMY_DATA);
--
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: receive timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
-- *data = rspi_read_data(rspi);
--
-- data++;
-+ /* dummy write data for generate clock */
-+ ret = rspi_data_out_in(rspi, DUMMY_DATA);
-+ if (ret < 0)
-+ return ret;
-+ *data++ = ret;
- remain--;
- }
-
-@@ -594,28 +600,17 @@ static void qspi_receive_init(const struct rspi_data *rspi)
-
- static int qspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- int remain = t->len;
-- u8 *data;
-+ int remain = t->len, ret;
-+ u8 *data = t->rx_buf;
-
- qspi_receive_init(rspi);
-
-- data = t->rx_buf;
- while (remain > 0) {
--
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: tx empty timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
- /* dummy write for generate clock */
-- rspi_write_data(rspi, DUMMY_DATA);
--
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
-- dev_err(&rspi->master->dev,
-- "%s: receive timeout\n", __func__);
-- return -ETIMEDOUT;
-- }
-- *data++ = rspi_read_data(rspi);
-+ ret = rspi_data_out_in(rspi, DUMMY_DATA);
-+ if (ret < 0)
-+ return ret;
-+ *data++ = ret;
- remain--;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0083-spi-rspi-Abstract-transfer_one-for-RSPI-and-QSPI.patch b/patches.renesas/0083-spi-rspi-Abstract-transfer_one-for-RSPI-and-QSPI.patch
deleted file mode 100644
index c07f93089119d..0000000000000
--- a/patches.renesas/0083-spi-rspi-Abstract-transfer_one-for-RSPI-and-QSPI.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From bdfe1b8e1d178bd8a5b2ede2ebbaf9383e550ae0 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:55 +0100
-Subject: spi: rspi: Abstract transfer_one() for RSPI and QSPI
-
-Split off qspi_transfer_one() (which doesn't support DMA yet) from
-rspi_transfer_one().
-Replace the abstraction of send_pio()/receive_pio() by the abstracrion of
-transfer_one().
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit eb557f75269e82dd26a79be536eca223ddc3eaf7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 36 +++++++++++++++++++++++-------------
- 1 file changed, 23 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 4b27513e7204..d837c5029308 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -239,8 +239,8 @@ static u16 rspi_read_data(const struct rspi_data *rspi)
- /* optional functions */
- struct spi_ops {
- int (*set_config_register)(struct rspi_data *rspi, int access_size);
-- int (*send_pio)(struct rspi_data *rspi, struct spi_transfer *t);
-- int (*receive_pio)(struct rspi_data *rspi, struct spi_transfer *t);
-+ int (*transfer_one)(struct spi_master *master, struct spi_device *spi,
-+ struct spi_transfer *xfer);
- };
-
- /*
-@@ -432,8 +432,6 @@ static int qspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- return 0;
- }
-
--#define send_pio(spi, t) spi->ops->send_pio(spi, t)
--
- static void rspi_dma_complete(void *arg)
- {
- struct rspi_data *rspi = arg;
-@@ -617,8 +615,6 @@ static int qspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
- return 0;
- }
-
--#define receive_pio(spi, t) spi->ops->receive_pio(spi, t)
--
- static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
- struct scatterlist sg, sg_dummy;
-@@ -743,7 +739,7 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- if (rspi_is_dma(rspi, xfer))
- ret = rspi_send_dma(rspi, xfer);
- else
-- ret = send_pio(rspi, xfer);
-+ ret = rspi_send_pio(rspi, xfer);
- if (ret < 0)
- return ret;
- }
-@@ -751,8 +747,24 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- if (rspi_is_dma(rspi, xfer))
- ret = rspi_receive_dma(rspi, xfer);
- else
-- ret = receive_pio(rspi, xfer);
-+ ret = rspi_receive_pio(rspi, xfer);
-+ }
-+ return ret;
-+}
-+
-+static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-+ struct spi_transfer *xfer)
-+{
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-+ int ret = 0;
-+
-+ if (xfer->tx_buf) {
-+ ret = qspi_send_pio(rspi, xfer);
-+ if (ret < 0)
-+ return ret;
- }
-+ if (xfer->rx_buf)
-+ ret = qspi_receive_pio(rspi, xfer);
- return ret;
- }
-
-@@ -948,7 +960,7 @@ static int rspi_probe(struct platform_device *pdev)
-
- master->bus_num = pdev->id;
- master->setup = rspi_setup;
-- master->transfer_one = rspi_transfer_one;
-+ master->transfer_one = ops->transfer_one;
- master->cleanup = rspi_cleanup;
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
-@@ -990,14 +1002,12 @@ error1:
-
- static struct spi_ops rspi_ops = {
- .set_config_register = rspi_set_config_register,
-- .send_pio = rspi_send_pio,
-- .receive_pio = rspi_receive_pio,
-+ .transfer_one = rspi_transfer_one,
- };
-
- static struct spi_ops qspi_ops = {
- .set_config_register = qspi_set_config_register,
-- .send_pio = qspi_send_pio,
-- .receive_pio = qspi_receive_pio,
-+ .transfer_one = qspi_transfer_one,
- };
-
- static struct platform_device_id spi_driver_ids[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0084-spi-rspi-Merge-rspi_send_pio-and-rspi_receive_pio.patch b/patches.renesas/0084-spi-rspi-Merge-rspi_send_pio-and-rspi_receive_pio.patch
deleted file mode 100644
index ffe8a62138f2b..0000000000000
--- a/patches.renesas/0084-spi-rspi-Merge-rspi_send_pio-and-rspi_receive_pio.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From 4340c4fed6c73e090ca698235a6352a46ff448a9 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:56 +0100
-Subject: spi: rspi: Merge rspi_send_pio() and rspi_receive_pio()
-
-rspi_send_pio() and rspi_receive_pio() are very similar:
- - the former only sends data, using TX Only Mode,
- - the latter sends and receives full duplex data to/from the hardware,
- but uses dummy transmit data.
-Merge them into rspi_transfer_out_in(), now supporting full duplex if
-needed.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8449fd76deb9ac67a15a6fb8ead7bb4595d019d2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 101 ++++++++++++++++++++++---------------------------
- 1 file changed, 46 insertions(+), 55 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index d837c5029308..cc90136d02c8 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -389,27 +389,6 @@ static int rspi_data_out_in(struct rspi_data *rspi, u8 data)
- return rspi_data_in(rspi);
- }
-
--static int rspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
--{
-- int remain = t->len, ret;
-- const u8 *data = t->tx_buf;
--
-- while (remain > 0) {
-- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_TXMD,
-- RSPI_SPCR);
--
-- ret = rspi_data_out(rspi, *data++);
-- if (ret < 0)
-- return ret;
-- remain--;
-- }
--
-- /* Waiting for the last transmission */
-- rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
--
-- return 0;
--}
--
- static int qspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
- {
- int remain = t->len, ret;
-@@ -563,28 +542,6 @@ static void rspi_receive_init(const struct rspi_data *rspi)
- RSPI_SPSR);
- }
-
--static int rspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
--{
-- int remain = t->len, ret;
-- u8 *data = t->rx_buf;
--
-- rspi_receive_init(rspi);
--
-- while (remain > 0) {
-- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_TXMD,
-- RSPI_SPCR);
--
-- /* dummy write data for generate clock */
-- ret = rspi_data_out_in(rspi, DUMMY_DATA);
-- if (ret < 0)
-- return ret;
-- *data++ = ret;
-- remain--;
-- }
--
-- return 0;
--}
--
- static void qspi_receive_init(const struct rspi_data *rspi)
- {
- u8 spsr;
-@@ -729,27 +686,61 @@ static int rspi_is_dma(const struct rspi_data *rspi, struct spi_transfer *t)
- return 0;
- }
-
-+static int rspi_transfer_out_in(struct rspi_data *rspi,
-+ struct spi_transfer *xfer)
-+{
-+ int remain = xfer->len, ret;
-+ const u8 *tx_buf = xfer->tx_buf;
-+ u8 *rx_buf = xfer->rx_buf;
-+ u8 spcr, data;
-+
-+ rspi_receive_init(rspi);
-+
-+ spcr = rspi_read8(rspi, RSPI_SPCR);
-+ if (rx_buf)
-+ spcr &= ~SPCR_TXMD;
-+ else
-+ spcr |= SPCR_TXMD;
-+ rspi_write8(rspi, spcr, RSPI_SPCR);
-+
-+ while (remain > 0) {
-+ data = tx_buf ? *tx_buf++ : DUMMY_DATA;
-+ ret = rspi_data_out(rspi, data);
-+ if (ret < 0)
-+ return ret;
-+ if (rx_buf) {
-+ ret = rspi_data_in(rspi);
-+ if (ret < 0)
-+ return ret;
-+ *rx_buf++ = ret;
-+ }
-+ remain--;
-+ }
-+
-+ /* Wait for the last transmission */
-+ rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+
-+ return 0;
-+}
-+
- static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- struct spi_transfer *xfer)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-- int ret = 0;
-+ int ret;
-+
-+ if (!rspi_is_dma(rspi, xfer))
-+ return rspi_transfer_out_in(rspi, xfer);
-
- if (xfer->tx_buf) {
-- if (rspi_is_dma(rspi, xfer))
-- ret = rspi_send_dma(rspi, xfer);
-- else
-- ret = rspi_send_pio(rspi, xfer);
-+ ret = rspi_send_dma(rspi, xfer);
- if (ret < 0)
- return ret;
- }
-- if (xfer->rx_buf) {
-- if (rspi_is_dma(rspi, xfer))
-- ret = rspi_receive_dma(rspi, xfer);
-- else
-- ret = rspi_receive_pio(rspi, xfer);
-- }
-- return ret;
-+ if (xfer->rx_buf)
-+ return rspi_receive_dma(rspi, xfer);
-+
-+ return 0;
- }
-
- static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
---
-2.1.2
-
diff --git a/patches.renesas/0085-spi-rspi-Merge-qspi_send_pio-and-qspi_receive_pio.patch b/patches.renesas/0085-spi-rspi-Merge-qspi_send_pio-and-qspi_receive_pio.patch
deleted file mode 100644
index f36401ed2e213..0000000000000
--- a/patches.renesas/0085-spi-rspi-Merge-qspi_send_pio-and-qspi_receive_pio.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 61875440aa378226c6a0aeaa0f77b893be031a35 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:57 +0100
-Subject: spi: rspi: Merge qspi_send_pio() and qspi_receive_pio()
-
-qspi_send_pio() and qspi_receive_pio() are very similar: they both send
-and receive full duplex data to/from the hardware, but ignore the data
-stream in the unused direction.
-Merge them into qspi_transfer_out_in(), now supporting real full duplex.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 340a15e6f0d6cd436c55693f7328a1de02fcdb96)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 79 ++++++++++++++++++--------------------------------
- 1 file changed, 28 insertions(+), 51 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index cc90136d02c8..5d39cd3eba62 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -389,28 +389,6 @@ static int rspi_data_out_in(struct rspi_data *rspi, u8 data)
- return rspi_data_in(rspi);
- }
-
--static int qspi_send_pio(struct rspi_data *rspi, struct spi_transfer *t)
--{
-- int remain = t->len, ret;
-- const u8 *data = t->tx_buf;
--
-- rspi_write8(rspi, SPBFCR_TXRST, QSPI_SPBFCR);
-- rspi_write8(rspi, 0x00, QSPI_SPBFCR);
--
-- while (remain > 0) {
-- /* dummy read */
-- ret = rspi_data_out_in(rspi, *data++);
-- if (ret < 0)
-- return ret;
-- remain--;
-- }
--
-- /* Waiting for the last transmission */
-- rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
--
-- return 0;
--}
--
- static void rspi_dma_complete(void *arg)
- {
- struct rspi_data *rspi = arg;
-@@ -550,26 +528,7 @@ static void qspi_receive_init(const struct rspi_data *rspi)
- if (spsr & SPSR_SPRF)
- rspi_read_data(rspi); /* dummy read */
- rspi_write8(rspi, SPBFCR_TXRST | SPBFCR_RXRST, QSPI_SPBFCR);
-- rspi_write8(rspi, 0x00, QSPI_SPBFCR);
--}
--
--static int qspi_receive_pio(struct rspi_data *rspi, struct spi_transfer *t)
--{
-- int remain = t->len, ret;
-- u8 *data = t->rx_buf;
--
-- qspi_receive_init(rspi);
--
-- while (remain > 0) {
-- /* dummy write for generate clock */
-- ret = rspi_data_out_in(rspi, DUMMY_DATA);
-- if (ret < 0)
-- return ret;
-- *data++ = ret;
-- remain--;
-- }
--
-- return 0;
-+ rspi_write8(rspi, 0, QSPI_SPBFCR);
- }
-
- static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
-@@ -743,20 +702,38 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- return 0;
- }
-
--static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-- struct spi_transfer *xfer)
-+static int qspi_transfer_out_in(struct rspi_data *rspi,
-+ struct spi_transfer *xfer)
- {
-- struct rspi_data *rspi = spi_master_get_devdata(master);
-- int ret = 0;
-+ int remain = xfer->len, ret;
-+ const u8 *tx_buf = xfer->tx_buf;
-+ u8 *rx_buf = xfer->rx_buf;
-+ u8 data;
-
-- if (xfer->tx_buf) {
-- ret = qspi_send_pio(rspi, xfer);
-+ qspi_receive_init(rspi);
-+
-+ while (remain > 0) {
-+ data = tx_buf ? *tx_buf++ : DUMMY_DATA;
-+ ret = rspi_data_out_in(rspi, data);
- if (ret < 0)
- return ret;
-+ if (rx_buf)
-+ *rx_buf++ = ret;
-+ remain--;
- }
-- if (xfer->rx_buf)
-- ret = qspi_receive_pio(rspi, xfer);
-- return ret;
-+
-+ /* Wait for the last transmission */
-+ rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+
-+ return 0;
-+}
-+
-+static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-+ struct spi_transfer *xfer)
-+{
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-+
-+ return qspi_transfer_out_in(rspi, xfer);
- }
-
- static int rspi_setup(struct spi_device *spi)
---
-2.1.2
-
diff --git a/patches.renesas/0086-spi-rspi-Add-support-for-more-than-one-interrupt.patch b/patches.renesas/0086-spi-rspi-Add-support-for-more-than-one-interrupt.patch
deleted file mode 100644
index 1fb66555c0c7c..0000000000000
--- a/patches.renesas/0086-spi-rspi-Add-support-for-more-than-one-interrupt.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-From e0a4fc5efae26d20bbfd2237bf103b9fe0395c04 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:58 +0100
-Subject: spi: rspi: Add support for more than one interrupt
-
-Add support for multiple interrupts, based on the SDK reference code.
-This is needed for RZ/A1H, which supports 3 interrupts.
-
-When using multiple interrupts, they must be called "rx" (SPRI) and "tx"
-(SPTI). The error interrupt (SPEI) is not used, as it matters for slave
-mode only.
-
-When using a single interrupt, it may be called "mux". If it cannot be
-found, the first interrupt in the device's resources will be used.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9372220678cd4c62992f7637b2ee36b47fa58d37)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 106 ++++++++++++++++++++++++++++++++++++++++---------
- 1 file changed, 87 insertions(+), 19 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 5d39cd3eba62..d2ade5e09f58 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -1,7 +1,7 @@
- /*
- * SH RSPI driver
- *
-- * Copyright (C) 2012 Renesas Solutions Corp.
-+ * Copyright (C) 2012, 2013 Renesas Solutions Corp.
- *
- * Based on spi-sh.c:
- * Copyright (C) 2011 Renesas Solutions Corp.
-@@ -183,12 +183,12 @@ struct rspi_data {
- struct clk *clk;
- u8 spsr;
- u16 spcmd;
-+ int rx_irq, tx_irq;
- const struct spi_ops *ops;
-
- /* for dmaengine */
- struct dma_chan *chan_tx;
- struct dma_chan *chan_rx;
-- int irq;
-
- unsigned dma_width_16bit:1;
- unsigned dma_callbacked:1;
-@@ -440,7 +440,7 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- struct scatterlist sg;
- const void *buf = NULL;
- struct dma_async_tx_descriptor *desc;
-- unsigned len;
-+ unsigned int len;
- int ret = 0;
-
- if (rspi->dma_width_16bit) {
-@@ -478,7 +478,7 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- * DMAC needs SPTIE, but if SPTIE is set, this IRQ routine will be
- * called. So, this driver disables the IRQ while DMA transfer.
- */
-- disable_irq(rspi->irq);
-+ disable_irq(rspi->tx_irq);
-
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_TXMD, RSPI_SPCR);
- rspi_enable_irq(rspi, SPCR_SPTIE);
-@@ -497,7 +497,7 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- ret = -ETIMEDOUT;
- rspi_disable_irq(rspi, SPCR_SPTIE);
-
-- enable_irq(rspi->irq);
-+ enable_irq(rspi->tx_irq);
-
- end:
- rspi_dma_unmap_sg(&sg, rspi->chan_tx, DMA_TO_DEVICE);
-@@ -536,7 +536,7 @@ static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- struct scatterlist sg, sg_dummy;
- void *dummy = NULL, *rx_buf = NULL;
- struct dma_async_tx_descriptor *desc, *desc_dummy;
-- unsigned len;
-+ unsigned int len;
- int ret = 0;
-
- if (rspi->dma_width_16bit) {
-@@ -594,7 +594,9 @@ static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- * DMAC needs SPTIE, but if SPTIE is set, this IRQ routine will be
- * called. So, this driver disables the IRQ while DMA transfer.
- */
-- disable_irq(rspi->irq);
-+ disable_irq(rspi->tx_irq);
-+ if (rspi->rx_irq != rspi->tx_irq)
-+ disable_irq(rspi->rx_irq);
-
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_TXMD, RSPI_SPCR);
- rspi_enable_irq(rspi, SPCR_SPTIE | SPCR_SPRIE);
-@@ -617,7 +619,9 @@ static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- ret = -ETIMEDOUT;
- rspi_disable_irq(rspi, SPCR_SPTIE | SPCR_SPRIE);
-
-- enable_irq(rspi->irq);
-+ enable_irq(rspi->tx_irq);
-+ if (rspi->rx_irq != rspi->tx_irq)
-+ enable_irq(rspi->rx_irq);
-
- end:
- rspi_dma_unmap_sg(&sg, rspi->chan_rx, DMA_FROM_DEVICE);
-@@ -775,7 +779,7 @@ static int rspi_unprepare_message(struct spi_master *master,
- return 0;
- }
-
--static irqreturn_t rspi_irq(int irq, void *_sr)
-+static irqreturn_t rspi_irq_mux(int irq, void *_sr)
- {
- struct rspi_data *rspi = _sr;
- u8 spsr;
-@@ -797,6 +801,36 @@ static irqreturn_t rspi_irq(int irq, void *_sr)
- return ret;
- }
-
-+static irqreturn_t rspi_irq_rx(int irq, void *_sr)
-+{
-+ struct rspi_data *rspi = _sr;
-+ u8 spsr;
-+
-+ rspi->spsr = spsr = rspi_read8(rspi, RSPI_SPSR);
-+ if (spsr & SPSR_SPRF) {
-+ rspi_disable_irq(rspi, SPCR_SPRIE);
-+ wake_up(&rspi->wait);
-+ return IRQ_HANDLED;
-+ }
-+
-+ return 0;
-+}
-+
-+static irqreturn_t rspi_irq_tx(int irq, void *_sr)
-+{
-+ struct rspi_data *rspi = _sr;
-+ u8 spsr;
-+
-+ rspi->spsr = spsr = rspi_read8(rspi, RSPI_SPSR);
-+ if (spsr & SPSR_SPTEF) {
-+ rspi_disable_irq(rspi, SPCR_SPTIE);
-+ wake_up(&rspi->wait);
-+ return IRQ_HANDLED;
-+ }
-+
-+ return 0;
-+}
-+
- static int rspi_request_dma(struct rspi_data *rspi,
- struct platform_device *pdev)
- {
-@@ -868,12 +902,25 @@ static int rspi_remove(struct platform_device *pdev)
- return 0;
- }
-
-+static int rspi_request_irq(struct device *dev, unsigned int irq,
-+ irq_handler_t handler, const char *suffix,
-+ void *dev_id)
-+{
-+ const char *base = dev_name(dev);
-+ size_t len = strlen(base) + strlen(suffix) + 2;
-+ char *name = devm_kzalloc(dev, len, GFP_KERNEL);
-+ if (!name)
-+ return -ENOMEM;
-+ snprintf(name, len, "%s:%s", base, suffix);
-+ return devm_request_irq(dev, irq, handler, 0, name, dev_id);
-+}
-+
- static int rspi_probe(struct platform_device *pdev)
- {
- struct resource *res;
- struct spi_master *master;
- struct rspi_data *rspi;
-- int ret, irq;
-+ int ret;
- char clk_name[16];
- const struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev);
- const struct spi_ops *ops;
-@@ -886,12 +933,6 @@ static int rspi_probe(struct platform_device *pdev)
- return -ENODEV;
- }
-
-- irq = platform_get_irq(pdev, 0);
-- if (irq < 0) {
-- dev_err(&pdev->dev, "platform_get_irq error\n");
-- return -ENODEV;
-- }
--
- master = spi_alloc_master(&pdev->dev, sizeof(struct rspi_data));
- if (master == NULL) {
- dev_err(&pdev->dev, "spi_alloc_master error.\n");
-@@ -934,14 +975,41 @@ static int rspi_probe(struct platform_device *pdev)
- master->unprepare_message = rspi_unprepare_message;
- master->mode_bits = SPI_CPHA | SPI_CPOL;
-
-- ret = devm_request_irq(&pdev->dev, irq, rspi_irq, 0,
-- dev_name(&pdev->dev), rspi);
-+ ret = platform_get_irq_byname(pdev, "rx");
-+ if (ret < 0) {
-+ ret = platform_get_irq_byname(pdev, "mux");
-+ if (ret < 0)
-+ ret = platform_get_irq(pdev, 0);
-+ if (ret >= 0)
-+ rspi->rx_irq = rspi->tx_irq = ret;
-+ } else {
-+ rspi->rx_irq = ret;
-+ ret = platform_get_irq_byname(pdev, "tx");
-+ if (ret >= 0)
-+ rspi->tx_irq = ret;
-+ }
-+ if (ret < 0) {
-+ dev_err(&pdev->dev, "platform_get_irq error\n");
-+ goto error2;
-+ }
-+
-+ if (rspi->rx_irq == rspi->tx_irq) {
-+ /* Single multiplexed interrupt */
-+ ret = rspi_request_irq(&pdev->dev, rspi->rx_irq, rspi_irq_mux,
-+ "mux", rspi);
-+ } else {
-+ /* Multi-interrupt mode, only SPRI and SPTI are used */
-+ ret = rspi_request_irq(&pdev->dev, rspi->rx_irq, rspi_irq_rx,
-+ "rx", rspi);
-+ if (!ret)
-+ ret = rspi_request_irq(&pdev->dev, rspi->tx_irq,
-+ rspi_irq_tx, "tx", rspi);
-+ }
- if (ret < 0) {
- dev_err(&pdev->dev, "request_irq error\n");
- goto error2;
- }
-
-- rspi->irq = irq;
- ret = rspi_request_dma(rspi, pdev);
- if (ret < 0) {
- dev_err(&pdev->dev, "rspi_request_dma failed.\n");
---
-2.1.2
-
diff --git a/patches.renesas/0087-spi-rspi-Add-support-for-RSPI-on-RZ-A1H.patch b/patches.renesas/0087-spi-rspi-Add-support-for-RSPI-on-RZ-A1H.patch
deleted file mode 100644
index a764c97091485..0000000000000
--- a/patches.renesas/0087-spi-rspi-Add-support-for-RSPI-on-RZ-A1H.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-From 3a2b3216d50f8e24683c9ec0e480b5b81d22b4e0 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:43:59 +0100
-Subject: spi: rspi: Add support for RSPI on RZ/A1H
-
-Add support for the RSPI variant in the RZ/A1H (r7s72100) SoC.
-
-Main differences with RSPI on SH are:
- - Lack of TX only mode, hence we always have to use full duplex
- transfers,
- - The Data Register must be accessed used 8-bit operations.
-
-RSPI on RZ is matched using the new "rspi-rz" platform device name.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 862d357f84f009fdcba22be8d6a2f82ff80ab740)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 101 ++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 92 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index d2ade5e09f58..0c7556978d2e 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -47,7 +47,7 @@
- #define RSPI_SPCKD 0x0c /* Clock Delay Register */
- #define RSPI_SSLND 0x0d /* Slave Select Negation Delay Register */
- #define RSPI_SPND 0x0e /* Next-Access Delay Register */
--#define RSPI_SPCR2 0x0f /* Control Register 2 */
-+#define RSPI_SPCR2 0x0f /* Control Register 2 (SH only) */
- #define RSPI_SPCMD0 0x10 /* Command Register 0 */
- #define RSPI_SPCMD1 0x12 /* Command Register 1 */
- #define RSPI_SPCMD2 0x14 /* Command Register 2 */
-@@ -56,10 +56,12 @@
- #define RSPI_SPCMD5 0x1a /* Command Register 5 */
- #define RSPI_SPCMD6 0x1c /* Command Register 6 */
- #define RSPI_SPCMD7 0x1e /* Command Register 7 */
-+
-+/* RSPI on RZ only */
- #define RSPI_SPBFCR 0x20 /* Buffer Control Register */
- #define RSPI_SPBFDR 0x22 /* Buffer Data Count Setting Register */
-
--/*qspi only */
-+/* QSPI only */
- #define QSPI_SPBFCR 0x18 /* Buffer Control Register */
- #define QSPI_SPBDCR 0x1a /* Buffer Data Count Register */
- #define QSPI_SPBMUL0 0x1c /* Transfer Data Length Multiplier Setting Register 0 */
-@@ -102,7 +104,7 @@
- #define SPSR_PERF 0x08 /* Parity Error Flag */
- #define SPSR_MODF 0x04 /* Mode Fault Error Flag */
- #define SPSR_IDLNF 0x02 /* RSPI Idle Flag */
--#define SPSR_OVRF 0x01 /* Overrun Error Flag */
-+#define SPSR_OVRF 0x01 /* Overrun Error Flag (RSPI only) */
-
- /* SPSCR - Sequence Control Register */
- #define SPSCR_SPSLN_MASK 0x07 /* Sequence Length Specification */
-@@ -119,13 +121,13 @@
- #define SPDCR_SPLWORD SPDCR_SPLW1
- #define SPDCR_SPLBYTE SPDCR_SPLW0
- #define SPDCR_SPLW 0x20 /* Access Width Specification (SH) */
--#define SPDCR_SPRDTD 0x10 /* Receive Transmit Data Select */
-+#define SPDCR_SPRDTD 0x10 /* Receive Transmit Data Select (SH) */
- #define SPDCR_SLSEL1 0x08
- #define SPDCR_SLSEL0 0x04
--#define SPDCR_SLSEL_MASK 0x0c /* SSL1 Output Select */
-+#define SPDCR_SLSEL_MASK 0x0c /* SSL1 Output Select (SH) */
- #define SPDCR_SPFC1 0x02
- #define SPDCR_SPFC0 0x01
--#define SPDCR_SPFC_MASK 0x03 /* Frame Count Setting (1-4) */
-+#define SPDCR_SPFC_MASK 0x03 /* Frame Count Setting (1-4) (SH) */
-
- /* SPCKD - Clock Delay Register */
- #define SPCKD_SCKDL_MASK 0x07 /* Clock Delay Setting (1-8) */
-@@ -168,8 +170,8 @@
- #define SPCMD_CPHA 0x0001 /* Clock Phase Setting */
-
- /* SPBFCR - Buffer Control Register */
--#define SPBFCR_TXRST 0x80 /* Transmit Buffer Data Reset (qspi only) */
--#define SPBFCR_RXRST 0x40 /* Receive Buffer Data Reset (qspi only) */
-+#define SPBFCR_TXRST 0x80 /* Transmit Buffer Data Reset */
-+#define SPBFCR_RXRST 0x40 /* Receive Buffer Data Reset */
- #define SPBFCR_TXTRG_MASK 0x30 /* Transmit Buffer Data Triggering Number */
- #define SPBFCR_RXTRG_MASK 0x07 /* Receive Buffer Data Triggering Number */
-
-@@ -244,7 +246,7 @@ struct spi_ops {
- };
-
- /*
-- * functions for RSPI
-+ * functions for RSPI on legacy SH
- */
- static int rspi_set_config_register(struct rspi_data *rspi, int access_size)
- {
-@@ -280,6 +282,39 @@ static int rspi_set_config_register(struct rspi_data *rspi, int access_size)
- }
-
- /*
-+ * functions for RSPI on RZ
-+ */
-+static int rspi_rz_set_config_register(struct rspi_data *rspi, int access_size)
-+{
-+ int spbr;
-+
-+ /* Sets output mode */
-+ rspi_write8(rspi, 0x00, RSPI_SPPCR);
-+
-+ /* Sets transfer bit rate */
-+ spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz) - 1;
-+ rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR);
-+
-+ /* Disable dummy transmission, set byte access */
-+ rspi_write8(rspi, SPDCR_SPLBYTE, RSPI_SPDCR);
-+ rspi->byte_access = 1;
-+
-+ /* Sets RSPCK, SSL, next-access delay value */
-+ rspi_write8(rspi, 0x00, RSPI_SPCKD);
-+ rspi_write8(rspi, 0x00, RSPI_SSLND);
-+ rspi_write8(rspi, 0x00, RSPI_SPND);
-+
-+ /* Sets SPCMD */
-+ rspi->spcmd |= SPCMD_SPB_8_TO_16(access_size);
-+ rspi_write16(rspi, rspi->spcmd, RSPI_SPCMD0);
-+
-+ /* Sets RSPI mode */
-+ rspi_write8(rspi, SPCR_MSTR, RSPI_SPCR);
-+
-+ return 0;
-+}
-+
-+/*
- * functions for QSPI
- */
- static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
-@@ -520,6 +555,13 @@ static void rspi_receive_init(const struct rspi_data *rspi)
- RSPI_SPSR);
- }
-
-+static void rspi_rz_receive_init(const struct rspi_data *rspi)
-+{
-+ rspi_receive_init(rspi);
-+ rspi_write8(rspi, SPBFCR_TXRST | SPBFCR_RXRST, RSPI_SPBFCR);
-+ rspi_write8(rspi, 0, RSPI_SPBFCR);
-+}
-+
- static void qspi_receive_init(const struct rspi_data *rspi)
- {
- u8 spsr;
-@@ -706,6 +748,41 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- return 0;
- }
-
-+static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
-+ struct spi_transfer *xfer)
-+{
-+ int remain = xfer->len, ret;
-+ const u8 *tx_buf = xfer->tx_buf;
-+ u8 *rx_buf = xfer->rx_buf;
-+ u8 data;
-+
-+ rspi_rz_receive_init(rspi);
-+
-+ while (remain > 0) {
-+ data = tx_buf ? *tx_buf++ : DUMMY_DATA;
-+ ret = rspi_data_out_in(rspi, data);
-+ if (ret < 0)
-+ return ret;
-+ if (rx_buf)
-+ *rx_buf++ = ret;
-+ remain--;
-+ }
-+
-+ /* Wait for the last transmission */
-+ rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+
-+ return 0;
-+}
-+
-+static int rspi_rz_transfer_one(struct spi_master *master,
-+ struct spi_device *spi,
-+ struct spi_transfer *xfer)
-+{
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-+
-+ return rspi_rz_transfer_out_in(rspi, xfer);
-+}
-+
- static int qspi_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
-@@ -1041,6 +1118,11 @@ static struct spi_ops rspi_ops = {
- .transfer_one = rspi_transfer_one,
- };
-
-+static struct spi_ops rspi_rz_ops = {
-+ .set_config_register = rspi_rz_set_config_register,
-+ .transfer_one = rspi_rz_transfer_one,
-+};
-+
- static struct spi_ops qspi_ops = {
- .set_config_register = qspi_set_config_register,
- .transfer_one = qspi_transfer_one,
-@@ -1048,6 +1130,7 @@ static struct spi_ops qspi_ops = {
-
- static struct platform_device_id spi_driver_ids[] = {
- { "rspi", (kernel_ulong_t)&rspi_ops },
-+ { "rspi-rz", (kernel_ulong_t)&rspi_rz_ops },
- { "qspi", (kernel_ulong_t)&qspi_ops },
- {},
- };
---
-2.1.2
-
diff --git a/patches.renesas/0088-spi-rspi-Add-support-for-loopback-mode.patch b/patches.renesas/0088-spi-rspi-Add-support-for-loopback-mode.patch
deleted file mode 100644
index ce0e4b0231cc8..0000000000000
--- a/patches.renesas/0088-spi-rspi-Add-support-for-loopback-mode.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 54b29f6f07854342f81d85463b16a316106c35f6 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:44:00 +0100
-Subject: spi: rspi: Add support for loopback mode
-
-Add support for specifying loopback mode.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 06a7a3cff042a36fb7e6af71039a17c6d1a6d90f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 22 ++++++++++++++--------
- 1 file changed, 14 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 0c7556978d2e..28db8770aaf3 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -183,8 +183,9 @@ struct rspi_data {
- struct spi_master *master;
- wait_queue_head_t wait;
- struct clk *clk;
-- u8 spsr;
- u16 spcmd;
-+ u8 spsr;
-+ u8 sppcr;
- int rx_irq, tx_irq;
- const struct spi_ops *ops;
-
-@@ -252,8 +253,8 @@ static int rspi_set_config_register(struct rspi_data *rspi, int access_size)
- {
- int spbr;
-
-- /* Sets output mode(CMOS) and MOSI signal(from previous transfer) */
-- rspi_write8(rspi, 0x00, RSPI_SPPCR);
-+ /* Sets output mode, MOSI signal, and (optionally) loopback */
-+ rspi_write8(rspi, rspi->sppcr, RSPI_SPPCR);
-
- /* Sets transfer bit rate */
- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz) - 1;
-@@ -288,8 +289,8 @@ static int rspi_rz_set_config_register(struct rspi_data *rspi, int access_size)
- {
- int spbr;
-
-- /* Sets output mode */
-- rspi_write8(rspi, 0x00, RSPI_SPPCR);
-+ /* Sets output mode, MOSI signal, and (optionally) loopback */
-+ rspi_write8(rspi, rspi->sppcr, RSPI_SPPCR);
-
- /* Sets transfer bit rate */
- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz) - 1;
-@@ -322,8 +323,8 @@ static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
- u16 spcmd;
- int spbr;
-
-- /* Sets output mode(CMOS) and MOSI signal(from previous transfer) */
-- rspi_write8(rspi, 0x00, RSPI_SPPCR);
-+ /* Sets output mode, MOSI signal, and (optionally) loopback */
-+ rspi_write8(rspi, rspi->sppcr, RSPI_SPPCR);
-
- /* Sets transfer bit rate */
- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz);
-@@ -829,6 +830,11 @@ static int rspi_setup(struct spi_device *spi)
- if (spi->mode & SPI_CPHA)
- rspi->spcmd |= SPCMD_CPHA;
-
-+ /* CMOS output mode and MOSI signal from previous transfer */
-+ rspi->sppcr = 0;
-+ if (spi->mode & SPI_LOOP)
-+ rspi->sppcr |= SPPCR_SPLP;
-+
- set_config_register(rspi, 8);
-
- return 0;
-@@ -1050,7 +1056,7 @@ static int rspi_probe(struct platform_device *pdev)
- master->cleanup = rspi_cleanup;
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
-- master->mode_bits = SPI_CPHA | SPI_CPOL;
-+ master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP;
-
- ret = platform_get_irq_byname(pdev, "rx");
- if (ret < 0) {
---
-2.1.2
-
diff --git a/patches.renesas/0089-spi-rspi-Convert-to-clk_prepare_enable-disable_unpre.patch b/patches.renesas/0089-spi-rspi-Convert-to-clk_prepare_enable-disable_unpre.patch
deleted file mode 100644
index 6ffa2deea9e7f..0000000000000
--- a/patches.renesas/0089-spi-rspi-Convert-to-clk_prepare_enable-disable_unpre.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 571da81201378c6fe16c0f73e6da32a0a6bf63c3 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:44:01 +0100
-Subject: spi: rspi: Convert to clk_prepare_enable/disable_unprepare
-
-Get the driver ready for the migration to the common clock framework by
-calling clk_prepare_enable() and clk_disable_unprepare().
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 17fe0d9a28fe742c467f800625459cf7bcb44b3b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 11 ++++++++---
- 1 file changed, 8 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 28db8770aaf3..a648b40c271b 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -980,7 +980,7 @@ static int rspi_remove(struct platform_device *pdev)
- struct rspi_data *rspi = platform_get_drvdata(pdev);
-
- rspi_release_dma(rspi);
-- clk_disable(rspi->clk);
-+ clk_disable_unprepare(rspi->clk);
-
- return 0;
- }
-@@ -1041,7 +1041,12 @@ static int rspi_probe(struct platform_device *pdev)
- ret = PTR_ERR(rspi->clk);
- goto error1;
- }
-- clk_enable(rspi->clk);
-+
-+ ret = clk_prepare_enable(rspi->clk);
-+ if (ret < 0) {
-+ dev_err(&pdev->dev, "unable to prepare/enable clock\n");
-+ goto error1;
-+ }
-
- init_waitqueue_head(&rspi->wait);
-
-@@ -1112,7 +1117,7 @@ static int rspi_probe(struct platform_device *pdev)
- error3:
- rspi_release_dma(rspi);
- error2:
-- clk_disable(rspi->clk);
-+ clk_disable_unprepare(rspi->clk);
- error1:
- spi_master_put(master);
-
---
-2.1.2
-
diff --git a/patches.renesas/0090-spi-rspi-Use-NULL-as-the-clock-ID.patch b/patches.renesas/0090-spi-rspi-Use-NULL-as-the-clock-ID.patch
deleted file mode 100644
index 7daae77f91a9a..0000000000000
--- a/patches.renesas/0090-spi-rspi-Use-NULL-as-the-clock-ID.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c73c5e4e4353762705381d51bd245151bbf26fa2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 24 Jan 2014 09:44:02 +0100
-Subject: spi: rspi: Use NULL as the clock ID
-
-There's only one RSPI/QSPI clock, so we can use NULL as the clock ID
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 29f397b739ceef90c8b848f6579cbacd088e896e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index a648b40c271b..d79a7ed9b92e 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -1004,7 +1004,6 @@ static int rspi_probe(struct platform_device *pdev)
- struct spi_master *master;
- struct rspi_data *rspi;
- int ret;
-- char clk_name[16];
- const struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev);
- const struct spi_ops *ops;
- const struct platform_device_id *id_entry = pdev->id_entry;
-@@ -1034,8 +1033,7 @@ static int rspi_probe(struct platform_device *pdev)
- goto error1;
- }
-
-- snprintf(clk_name, sizeof(clk_name), "%s%d", id_entry->name, pdev->id);
-- rspi->clk = devm_clk_get(&pdev->dev, clk_name);
-+ rspi->clk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(rspi->clk)) {
- dev_err(&pdev->dev, "cannot get clock\n");
- ret = PTR_ERR(rspi->clk);
---
-2.1.2
-
diff --git a/patches.renesas/0091-spi-rspi-Add-DT-support.patch b/patches.renesas/0091-spi-rspi-Add-DT-support.patch
deleted file mode 100644
index 880b2dae9b5ed..0000000000000
--- a/patches.renesas/0091-spi-rspi-Add-DT-support.patch
+++ /dev/null
@@ -1,250 +0,0 @@
-From cc7129f229504fcbe503f1ccdbbb1e03538ad68c Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 28 Jan 2014 10:21:38 +0100
-Subject: spi: rspi: Add DT support
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 426ef76dd8a394a0e04d096941cd9acb49539a3e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/spi/spi-rspi.txt | 59 ++++++++++++
- drivers/spi/spi-rspi.c | 106 +++++++++++++++------
- 2 files changed, 136 insertions(+), 29 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/spi/spi-rspi.txt
-
-diff --git a/Documentation/devicetree/bindings/spi/spi-rspi.txt b/Documentation/devicetree/bindings/spi/spi-rspi.txt
-new file mode 100644
-index 000000000000..95f9b21d239f
---- /dev/null
-+++ b/Documentation/devicetree/bindings/spi/spi-rspi.txt
-@@ -0,0 +1,59 @@
-+Device tree configuration for Renesas RSPI/QSPI driver
-+
-+Required properties:
-+- compatible : For Renesas Serial Peripheral Interface on legacy SH:
-+ "renesas,rspi-<soctype>", "renesas,rspi" as fallback.
-+ For Renesas Serial Peripheral Interface on RZ/A1H:
-+ "renesas,rspi-<soctype>", "renesas,rspi-rz" as fallback.
-+ For Quad Serial Peripheral Interface on R-Car Gen2:
-+ "renesas,qspi-<soctype>", "renesas,qspi" as fallback.
-+ Examples of valid soctypes are "sh7757" (SH),
-+ "r7s72100" (RZ/A1H), "r8a7790" (R-Car H2), and
-+ "r8a7791" (R-Car M2).
-+- reg : Address start and address range size of the device
-+- interrupts : A list of interrupt-specifiers, one for each entry in
-+ interrupt-names.
-+ If interrupt-names is not present, an interrupt specifier
-+ for a single muxed interrupt.
-+- interrupt-names : A list of interrupt names. Should contain (if present):
-+ - "error" for SPEI,
-+ - "rx" for SPRI,
-+ - "tx" to SPTI,
-+ - "mux" for a single muxed interrupt.
-+- interrupt-parent : The phandle for the interrupt controller that
-+ services interrupts for this device.
-+- num-cs : Number of chip selects. Some RSPI cores have more than 1.
-+- #address-cells : Must be <1>
-+- #size-cells : Must be <0>
-+
-+Optional properties:
-+- clocks: : Must contain a reference to the functional clock.
-+
-+Pinctrl properties might be needed, too. See
-+Documentation/devicetree/bindings/pinctrl/renesas,*.
-+
-+Examples:
-+
-+ spi0: spi@e800c800 {
-+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
-+ reg = <0xe800c800 0x24>;
-+ interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 239 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 240 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "error", "rx", "tx";
-+ interrupt-parent = <&gic>;
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ };
-+
-+ spi: spi@e6b10000 {
-+ compatible = "renesas,qspi-r8a7791", "renesas,qspi";
-+ reg = <0 0xe6b10000 0 0x2c>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_QSPI_MOD>;
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ };
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index d79a7ed9b92e..e56fcb5f7f99 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -31,6 +31,7 @@
- #include <linux/clk.h>
- #include <linux/dmaengine.h>
- #include <linux/dma-mapping.h>
-+#include <linux/of_device.h>
- #include <linux/sh_dma.h>
- #include <linux/spi/spi.h>
- #include <linux/spi/rspi.h>
-@@ -985,6 +986,56 @@ static int rspi_remove(struct platform_device *pdev)
- return 0;
- }
-
-+static const struct spi_ops rspi_ops = {
-+ .set_config_register = rspi_set_config_register,
-+ .transfer_one = rspi_transfer_one,
-+};
-+
-+static const struct spi_ops rspi_rz_ops = {
-+ .set_config_register = rspi_rz_set_config_register,
-+ .transfer_one = rspi_rz_transfer_one,
-+};
-+
-+static const struct spi_ops qspi_ops = {
-+ .set_config_register = qspi_set_config_register,
-+ .transfer_one = qspi_transfer_one,
-+};
-+
-+#ifdef CONFIG_OF
-+static const struct of_device_id rspi_of_match[] = {
-+ /* RSPI on legacy SH */
-+ { .compatible = "renesas,rspi", .data = &rspi_ops },
-+ /* RSPI on RZ/A1H */
-+ { .compatible = "renesas,rspi-rz", .data = &rspi_rz_ops },
-+ /* QSPI on R-Car Gen2 */
-+ { .compatible = "renesas,qspi", .data = &qspi_ops },
-+ { /* sentinel */ }
-+};
-+
-+MODULE_DEVICE_TABLE(of, rspi_of_match);
-+
-+static int rspi_parse_dt(struct device *dev, struct spi_master *master)
-+{
-+ u32 num_cs;
-+ int error;
-+
-+ /* Parse DT properties */
-+ error = of_property_read_u32(dev->of_node, "num-cs", &num_cs);
-+ if (error) {
-+ dev_err(dev, "of_property_read_u32 num-cs failed %d\n", error);
-+ return error;
-+ }
-+
-+ master->num_chipselect = num_cs;
-+ return 0;
-+}
-+#else
-+static inline int rspi_parse_dt(struct device *dev, struct spi_master *master)
-+{
-+ return -EINVAL;
-+}
-+#endif /* CONFIG_OF */
-+
- static int rspi_request_irq(struct device *dev, unsigned int irq,
- irq_handler_t handler, const char *suffix,
- void *dev_id)
-@@ -1004,16 +1055,9 @@ static int rspi_probe(struct platform_device *pdev)
- struct spi_master *master;
- struct rspi_data *rspi;
- int ret;
-- const struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev);
-+ const struct of_device_id *of_id;
-+ const struct rspi_plat_data *rspi_pd;
- const struct spi_ops *ops;
-- const struct platform_device_id *id_entry = pdev->id_entry;
--
-- ops = (struct spi_ops *)id_entry->driver_data;
-- /* ops parameter check */
-- if (!ops->set_config_register) {
-- dev_err(&pdev->dev, "there is no set_config_register\n");
-- return -ENODEV;
-- }
-
- master = spi_alloc_master(&pdev->dev, sizeof(struct rspi_data));
- if (master == NULL) {
-@@ -1021,6 +1065,28 @@ static int rspi_probe(struct platform_device *pdev)
- return -ENOMEM;
- }
-
-+ of_id = of_match_device(rspi_of_match, &pdev->dev);
-+ if (of_id) {
-+ ops = of_id->data;
-+ ret = rspi_parse_dt(&pdev->dev, master);
-+ if (ret)
-+ goto error1;
-+ } else {
-+ ops = (struct spi_ops *)pdev->id_entry->driver_data;
-+ rspi_pd = dev_get_platdata(&pdev->dev);
-+ if (rspi_pd && rspi_pd->num_chipselect)
-+ master->num_chipselect = rspi_pd->num_chipselect;
-+ else
-+ master->num_chipselect = 2; /* default */
-+ };
-+
-+ /* ops parameter check */
-+ if (!ops->set_config_register) {
-+ dev_err(&pdev->dev, "there is no set_config_register\n");
-+ ret = -ENODEV;
-+ goto error1;
-+ }
-+
- rspi = spi_master_get_devdata(master);
- platform_set_drvdata(pdev, rspi);
- rspi->ops = ops;
-@@ -1048,11 +1114,6 @@ static int rspi_probe(struct platform_device *pdev)
-
- init_waitqueue_head(&rspi->wait);
-
-- if (rspi_pd && rspi_pd->num_chipselect)
-- master->num_chipselect = rspi_pd->num_chipselect;
-- else
-- master->num_chipselect = 2; /* default */
--
- master->bus_num = pdev->id;
- master->setup = rspi_setup;
- master->transfer_one = ops->transfer_one;
-@@ -1060,6 +1121,7 @@ static int rspi_probe(struct platform_device *pdev)
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
- master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP;
-+ master->dev.of_node = pdev->dev.of_node;
-
- ret = platform_get_irq_byname(pdev, "rx");
- if (ret < 0) {
-@@ -1122,21 +1184,6 @@ error1:
- return ret;
- }
-
--static struct spi_ops rspi_ops = {
-- .set_config_register = rspi_set_config_register,
-- .transfer_one = rspi_transfer_one,
--};
--
--static struct spi_ops rspi_rz_ops = {
-- .set_config_register = rspi_rz_set_config_register,
-- .transfer_one = rspi_rz_transfer_one,
--};
--
--static struct spi_ops qspi_ops = {
-- .set_config_register = qspi_set_config_register,
-- .transfer_one = qspi_transfer_one,
--};
--
- static struct platform_device_id spi_driver_ids[] = {
- { "rspi", (kernel_ulong_t)&rspi_ops },
- { "rspi-rz", (kernel_ulong_t)&rspi_rz_ops },
-@@ -1153,6 +1200,7 @@ static struct platform_driver rspi_driver = {
- .driver = {
- .name = "renesas_spi",
- .owner = THIS_MODULE,
-+ .of_match_table = of_match_ptr(rspi_of_match),
- },
- };
- module_platform_driver(rspi_driver);
---
-2.1.2
-
diff --git a/patches.renesas/0092-spi-rspi-Add-support-for-Quad-and-Dual-SPI-Transfers.patch b/patches.renesas/0092-spi-rspi-Add-support-for-Quad-and-Dual-SPI-Transfers.patch
deleted file mode 100644
index 747af722a126a..0000000000000
--- a/patches.renesas/0092-spi-rspi-Add-support-for-Quad-and-Dual-SPI-Transfers.patch
+++ /dev/null
@@ -1,314 +0,0 @@
-From 6242b9ab76e120e95102cc1fed1e795a6ece0188 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 30 Jan 2014 09:43:50 +0100
-Subject: spi: rspi: Add support for Quad and Dual SPI Transfers on QSPI
-
-Add support for Quad and Dual SPI Transfers on the Renesas Quad Serial
-Peripheral Interface, as found in R-Car Gen2 SoCs like R-Car H2 (r8a7790)
-and R-Car M2 (r8a7791):
- - Add unidirectional transfer methods for Quad/Dual SPI Transfers.
- - Program the sequencer to handle SPI messages with multiple transfer
- modes when Quad or Dual transfers are enabled for an SPI slave.
- Up to 4 transfer modes per SPI message are supported by the hardware.
- - Advertise the availability of Quad and Dual SPI modes on QSPI.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 880c6d114fd79a6973708744c78c7f55da6aea4c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 162 ++++++++++++++++++++++++++++++++++++++++++++-----
- 1 file changed, 148 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index e56fcb5f7f99..34ad4bca8a41 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -2,6 +2,7 @@
- * SH RSPI driver
- *
- * Copyright (C) 2012, 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Glider bvba
- *
- * Based on spi-sh.c:
- * Copyright (C) 2011 Renesas Solutions Corp.
-@@ -57,6 +58,10 @@
- #define RSPI_SPCMD5 0x1a /* Command Register 5 */
- #define RSPI_SPCMD6 0x1c /* Command Register 6 */
- #define RSPI_SPCMD7 0x1e /* Command Register 7 */
-+#define RSPI_SPCMD(i) (RSPI_SPCMD0 + (i) * 2)
-+#define RSPI_NUM_SPCMD 8
-+#define RSPI_RZ_NUM_SPCMD 4
-+#define QSPI_NUM_SPCMD 4
-
- /* RSPI on RZ only */
- #define RSPI_SPBFCR 0x20 /* Buffer Control Register */
-@@ -69,6 +74,7 @@
- #define QSPI_SPBMUL1 0x20 /* Transfer Data Length Multiplier Setting Register 1 */
- #define QSPI_SPBMUL2 0x24 /* Transfer Data Length Multiplier Setting Register 2 */
- #define QSPI_SPBMUL3 0x28 /* Transfer Data Length Multiplier Setting Register 3 */
-+#define QSPI_SPBMUL(i) (QSPI_SPBMUL0 + (i) * 4)
-
- /* SPCR - Control Register */
- #define SPCR_SPRIE 0x80 /* Receive Interrupt Enable */
-@@ -152,7 +158,7 @@
- #define SPCMD_LSBF 0x1000 /* LSB First */
- #define SPCMD_SPB_MASK 0x0f00 /* Data Length Setting */
- #define SPCMD_SPB_8_TO_16(bit) (((bit - 1) << 8) & SPCMD_SPB_MASK)
--#define SPCMD_SPB_8BIT 0x0000 /* qspi only */
-+#define SPCMD_SPB_8BIT 0x0000 /* QSPI only */
- #define SPCMD_SPB_16BIT 0x0100
- #define SPCMD_SPB_20BIT 0x0000
- #define SPCMD_SPB_24BIT 0x0100
-@@ -245,6 +251,7 @@ struct spi_ops {
- int (*set_config_register)(struct rspi_data *rspi, int access_size);
- int (*transfer_one)(struct spi_master *master, struct spi_device *spi,
- struct spi_transfer *xfer);
-+ u16 mode_bits;
- };
-
- /*
-@@ -274,8 +281,8 @@ static int rspi_set_config_register(struct rspi_data *rspi, int access_size)
- rspi_write8(rspi, 0x00, RSPI_SPCR2);
-
- /* Sets SPCMD */
-- rspi_write16(rspi, SPCMD_SPB_8_TO_16(access_size) | rspi->spcmd,
-- RSPI_SPCMD0);
-+ rspi->spcmd |= SPCMD_SPB_8_TO_16(access_size);
-+ rspi_write16(rspi, rspi->spcmd, RSPI_SPCMD0);
-
- /* Sets RSPI mode */
- rspi_write8(rspi, SPCR_MSTR, RSPI_SPCR);
-@@ -321,7 +328,6 @@ static int rspi_rz_set_config_register(struct rspi_data *rspi, int access_size)
- */
- static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
- {
-- u16 spcmd;
- int spbr;
-
- /* Sets output mode, MOSI signal, and (optionally) loopback */
-@@ -342,13 +348,13 @@ static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
-
- /* Data Length Setting */
- if (access_size == 8)
-- spcmd = SPCMD_SPB_8BIT;
-+ rspi->spcmd |= SPCMD_SPB_8BIT;
- else if (access_size == 16)
-- spcmd = SPCMD_SPB_16BIT;
-+ rspi->spcmd |= SPCMD_SPB_16BIT;
- else
-- spcmd = SPCMD_SPB_32BIT;
-+ rspi->spcmd |= SPCMD_SPB_32BIT;
-
-- spcmd |= SPCMD_SCKDEN | SPCMD_SLNDEN | rspi->spcmd | SPCMD_SPNDEN;
-+ rspi->spcmd |= SPCMD_SCKDEN | SPCMD_SLNDEN | SPCMD_SPNDEN;
-
- /* Resets transfer data length */
- rspi_write32(rspi, 0, QSPI_SPBMUL0);
-@@ -359,9 +365,9 @@ static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
- rspi_write8(rspi, 0x00, QSPI_SPBFCR);
-
- /* Sets SPCMD */
-- rspi_write16(rspi, spcmd, RSPI_SPCMD0);
-+ rspi_write16(rspi, rspi->spcmd, RSPI_SPCMD0);
-
-- /* Enables SPI function in a master mode */
-+ /* Enables SPI function in master mode */
- rspi_write8(rspi, SPCR_SPE | SPCR_MSTR, RSPI_SPCR);
-
- return 0;
-@@ -811,12 +817,55 @@ static int qspi_transfer_out_in(struct rspi_data *rspi,
- return 0;
- }
-
-+static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
-+{
-+ const u8 *buf = xfer->tx_buf;
-+ unsigned int i;
-+ int ret;
-+
-+ for (i = 0; i < xfer->len; i++) {
-+ ret = rspi_data_out(rspi, *buf++);
-+ if (ret < 0)
-+ return ret;
-+ }
-+
-+ /* Wait for the last transmission */
-+ rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+
-+ return 0;
-+}
-+
-+static int qspi_transfer_in(struct rspi_data *rspi, struct spi_transfer *xfer)
-+{
-+ u8 *buf = xfer->rx_buf;
-+ unsigned int i;
-+ int ret;
-+
-+ for (i = 0; i < xfer->len; i++) {
-+ ret = rspi_data_in(rspi);
-+ if (ret < 0)
-+ return ret;
-+ *buf++ = ret;
-+ }
-+
-+ return 0;
-+}
-+
- static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- struct spi_transfer *xfer)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-
-- return qspi_transfer_out_in(rspi, xfer);
-+ if (xfer->tx_buf && xfer->tx_nbits > SPI_NBITS_SINGLE) {
-+ /* Quad or Dual SPI Write */
-+ return qspi_transfer_out(rspi, xfer);
-+ } else if (xfer->rx_buf && xfer->rx_nbits > SPI_NBITS_SINGLE) {
-+ /* Quad or Dual SPI Read */
-+ return qspi_transfer_in(rspi, xfer);
-+ } else {
-+ /* Single SPI Transfer */
-+ return qspi_transfer_out_in(rspi, xfer);
-+ }
- }
-
- static int rspi_setup(struct spi_device *spi)
-@@ -845,21 +894,101 @@ static void rspi_cleanup(struct spi_device *spi)
- {
- }
-
-+static u16 qspi_transfer_mode(const struct spi_transfer *xfer)
-+{
-+ if (xfer->tx_buf)
-+ switch (xfer->tx_nbits) {
-+ case SPI_NBITS_QUAD:
-+ return SPCMD_SPIMOD_QUAD;
-+ case SPI_NBITS_DUAL:
-+ return SPCMD_SPIMOD_DUAL;
-+ default:
-+ return 0;
-+ }
-+ if (xfer->rx_buf)
-+ switch (xfer->rx_nbits) {
-+ case SPI_NBITS_QUAD:
-+ return SPCMD_SPIMOD_QUAD | SPCMD_SPRW;
-+ case SPI_NBITS_DUAL:
-+ return SPCMD_SPIMOD_DUAL | SPCMD_SPRW;
-+ default:
-+ return 0;
-+ }
-+
-+ return 0;
-+}
-+
-+static int qspi_setup_sequencer(struct rspi_data *rspi,
-+ const struct spi_message *msg)
-+{
-+ const struct spi_transfer *xfer;
-+ unsigned int i = 0, len = 0;
-+ u16 current_mode = 0xffff, mode;
-+
-+ list_for_each_entry(xfer, &msg->transfers, transfer_list) {
-+ mode = qspi_transfer_mode(xfer);
-+ if (mode == current_mode) {
-+ len += xfer->len;
-+ continue;
-+ }
-+
-+ /* Transfer mode change */
-+ if (i) {
-+ /* Set transfer data length of previous transfer */
-+ rspi_write32(rspi, len, QSPI_SPBMUL(i - 1));
-+ }
-+
-+ if (i >= QSPI_NUM_SPCMD) {
-+ dev_err(&msg->spi->dev,
-+ "Too many different transfer modes");
-+ return -EINVAL;
-+ }
-+
-+ /* Program transfer mode for this transfer */
-+ rspi_write16(rspi, rspi->spcmd | mode, RSPI_SPCMD(i));
-+ current_mode = mode;
-+ len = xfer->len;
-+ i++;
-+ }
-+ if (i) {
-+ /* Set final transfer data length and sequence length */
-+ rspi_write32(rspi, len, QSPI_SPBMUL(i - 1));
-+ rspi_write8(rspi, i - 1, RSPI_SPSCR);
-+ }
-+
-+ return 0;
-+}
-+
- static int rspi_prepare_message(struct spi_master *master,
-- struct spi_message *message)
-+ struct spi_message *msg)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-+ int ret;
-
-+ if (msg->spi->mode &
-+ (SPI_TX_DUAL | SPI_TX_QUAD | SPI_RX_DUAL | SPI_RX_QUAD)) {
-+ /* Setup sequencer for messages with multiple transfer modes */
-+ ret = qspi_setup_sequencer(rspi, msg);
-+ if (ret < 0)
-+ return ret;
-+ }
-+
-+ /* Enable SPI function in master mode */
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_SPE, RSPI_SPCR);
- return 0;
- }
-
- static int rspi_unprepare_message(struct spi_master *master,
-- struct spi_message *message)
-+ struct spi_message *msg)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-
-+ /* Disable SPI function */
- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_SPE, RSPI_SPCR);
-+
-+ /* Reset sequencer for Single SPI Transfers */
-+ rspi_write16(rspi, rspi->spcmd, RSPI_SPCMD0);
-+ rspi_write8(rspi, 0, RSPI_SPSCR);
- return 0;
- }
-
-@@ -989,16 +1118,21 @@ static int rspi_remove(struct platform_device *pdev)
- static const struct spi_ops rspi_ops = {
- .set_config_register = rspi_set_config_register,
- .transfer_one = rspi_transfer_one,
-+ .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
- };
-
- static const struct spi_ops rspi_rz_ops = {
- .set_config_register = rspi_rz_set_config_register,
- .transfer_one = rspi_rz_transfer_one,
-+ .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
- };
-
- static const struct spi_ops qspi_ops = {
- .set_config_register = qspi_set_config_register,
- .transfer_one = qspi_transfer_one,
-+ .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP |
-+ SPI_TX_DUAL | SPI_TX_QUAD |
-+ SPI_RX_DUAL | SPI_RX_QUAD,
- };
-
- #ifdef CONFIG_OF
-@@ -1120,7 +1254,7 @@ static int rspi_probe(struct platform_device *pdev)
- master->cleanup = rspi_cleanup;
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
-- master->mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP;
-+ master->mode_bits = ops->mode_bits;
- master->dev.of_node = pdev->dev.of_node;
-
- ret = platform_get_irq_byname(pdev, "rx");
---
-2.1.2
-
diff --git a/patches.renesas/0093-spi-rspi-fix-build-error-when-CONFIG_OF-is-not-set.patch b/patches.renesas/0093-spi-rspi-fix-build-error-when-CONFIG_OF-is-not-set.patch
deleted file mode 100644
index 158ce4b42f27e..0000000000000
--- a/patches.renesas/0093-spi-rspi-fix-build-error-when-CONFIG_OF-is-not-set.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 62e867ade9937147e6df85cb10da7b06ab7758d8 Mon Sep 17 00:00:00 2001
-From: "Shimoda, Yoshihiro" <yoshihiro.shimoda.uh@renesas.com>
-Date: Mon, 3 Feb 2014 10:43:46 +0900
-Subject: spi: rspi: fix build error when CONFIG_OF is not set
-
-This patch fixes an issue that the following build error happens when
-the CONFIG_OF is not set:
-
-drivers/spi/spi-rspi.c: In function 'rspi_probe':
-drivers/spi/spi-rspi.c:1203:26: error: 'rspi_of_match' undeclared (first use in this function)
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 64b67defe4eb4de2d2df8acd5584a9e28fa727d3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 34ad4bca8a41..e5cfc3d77b8c 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -1164,6 +1164,7 @@ static int rspi_parse_dt(struct device *dev, struct spi_master *master)
- return 0;
- }
- #else
-+#define rspi_of_match NULL
- static inline int rspi_parse_dt(struct device *dev, struct spi_master *master)
- {
- return -EINVAL;
---
-2.1.2
-
diff --git a/patches.renesas/0094-spi-rspi-Only-enable-interrupts-when-there-s-a-need-.patch b/patches.renesas/0094-spi-rspi-Only-enable-interrupts-when-there-s-a-need-.patch
deleted file mode 100644
index be789809b4212..0000000000000
--- a/patches.renesas/0094-spi-rspi-Only-enable-interrupts-when-there-s-a-need-.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 5e1ba70515975b8c87b7aa2bd4ae730f307780a8 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 11:06:24 +0100
-Subject: spi: rspi: Only enable interrupts when there's a need to wait
-
-rspi_wait_for_interrupt() unconditionally enables interrupts, even when the
-wait condition is already satisfied. This causes a high interrupt load (2
-interrupts/byte for full-duplex Single SPI transfers, 1 interrupt/byte for
-RSPI with TX Only mode, or QSPI in unidirectional Dual or Quad Transfer
-mode).
-
-Change this to return immediately when the wait condition is satisfied.
-This dramatically reduces the interrupt load, especially in high-speed
-Quad Transfer mode, and increases transfer speed, as no interrupts need to
-be handled when there's space available in the output FIFO, or data
-available in the input FIFO.
-
-Benchmark results for QSPI on r8a7791 while reading 1 MiB from 30 MHz SPI
-FLASH on the Koelsch development board:
-
-Before:
- Single SPI Dual SPI Quad SPI
- Interrupts: 2096856 1048592 1048594
- Mbps: 0.9 1.6 1.6
-
-After:
-
- Single SPI Dual SPI Quad SPI
- Interrupts: 1048569 21295 8
- Mbps: 0.7 10.8 12.9
-
-I don't know why Single SPI slowed down a bit.
-
-I've also verified functionality for RSPI-RZ on r7s72100, but don't have
-benchmark results as there's no SPI FLASH connected to RSPI on the Genmai
-development board. Unlike RSPI and QSPI, RSPI-RZ has separate interrupts
-for RX and TX, which shows that Single SPI transfers now generate (mostly)
-RX interrupts, as expected.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5dd1ad23af689591d70be06ee6efcc57d1ec2d16)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index e5cfc3d77b8c..04528888a53f 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -391,6 +391,9 @@ static int rspi_wait_for_interrupt(struct rspi_data *rspi, u8 wait_mask,
- int ret;
-
- rspi->spsr = rspi_read8(rspi, RSPI_SPSR);
-+ if (rspi->spsr & wait_mask)
-+ return 0;
-+
- rspi_enable_irq(rspi, enable_bit);
- ret = wait_event_timeout(rspi->wait, rspi->spsr & wait_mask, HZ);
- if (ret == 0 && !(rspi->spsr & wait_mask))
---
-2.1.2
-
diff --git a/patches.renesas/0095-spi-rspi-Remove-empty-rspi_cleanup.patch b/patches.renesas/0095-spi-rspi-Remove-empty-rspi_cleanup.patch
deleted file mode 100644
index a11819d945b66..0000000000000
--- a/patches.renesas/0095-spi-rspi-Remove-empty-rspi_cleanup.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 58242aaf25fcac85ce991057a0f9d1c1f4825ae6 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 21 Feb 2014 17:29:17 +0100
-Subject: spi: rspi: Remove empty rspi_cleanup()
-
-If spi_master.cleanup() is not needed, it can be left unimplemented.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ab98fcba962a57cee9fdb97aff2b25248c93cea5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 04528888a53f..4a1f978c3381 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -893,10 +893,6 @@ static int rspi_setup(struct spi_device *spi)
- return 0;
- }
-
--static void rspi_cleanup(struct spi_device *spi)
--{
--}
--
- static u16 qspi_transfer_mode(const struct spi_transfer *xfer)
- {
- if (xfer->tx_buf)
-@@ -1255,7 +1251,6 @@ static int rspi_probe(struct platform_device *pdev)
- master->bus_num = pdev->id;
- master->setup = rspi_setup;
- master->transfer_one = ops->transfer_one;
-- master->cleanup = rspi_cleanup;
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
- master->mode_bits = ops->mode_bits;
---
-2.1.2
-
diff --git a/patches.renesas/0096-spi-rspi-Fix-loopback-mode-for-Dual-Quad-SPI-Transfe.patch b/patches.renesas/0096-spi-rspi-Fix-loopback-mode-for-Dual-Quad-SPI-Transfe.patch
deleted file mode 100644
index 172c4eb2283ff..0000000000000
--- a/patches.renesas/0096-spi-rspi-Fix-loopback-mode-for-Dual-Quad-SPI-Transfe.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 79a7a72eed9898b243b8bbe3acc7f31211676ad2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 21 Feb 2014 17:29:18 +0100
-Subject: spi: rspi: Fix loopback mode for Dual/Quad SPI Transfers
-
-While normal Dual and Quad SPI Transfers are unidirectional, we must do
-a bidirectional transfer if loopback mode is enabled, else rx_buf is not
-filled.
-
-With spidev it seemed to work, as spidev uses the same buffer for
-tranmission and reception.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ba824d4971691a7f1f66429e378a08a95fbb5b79)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 4a1f978c3381..92bec7e91046 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -859,7 +859,9 @@ static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-
-- if (xfer->tx_buf && xfer->tx_nbits > SPI_NBITS_SINGLE) {
-+ if (spi->mode & SPI_LOOP) {
-+ return qspi_transfer_out_in(rspi, xfer);
-+ } else if (xfer->tx_buf && xfer->tx_nbits > SPI_NBITS_SINGLE) {
- /* Quad or Dual SPI Write */
- return qspi_transfer_out(rspi, xfer);
- } else if (xfer->rx_buf && xfer->rx_nbits > SPI_NBITS_SINGLE) {
---
-2.1.2
-
diff --git a/patches.renesas/0097-spi-rspi-Add-runtime-PM-support-using-spi-core-auto_.patch b/patches.renesas/0097-spi-rspi-Add-runtime-PM-support-using-spi-core-auto_.patch
deleted file mode 100644
index 5c5ba4ebd14f6..0000000000000
--- a/patches.renesas/0097-spi-rspi-Add-runtime-PM-support-using-spi-core-auto_.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 0d8c5015f69eede2cb2c6e888b05df3a28261ece Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 10:59:12 +0100
-Subject: spi: rspi: Add runtime PM support, using spi core auto_runtime_pm
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 490c97747d5dc77dfb5826e2823b41d8b2ef7ecc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 12 +++++-------
- 1 file changed, 5 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 92bec7e91046..1fb0ad213324 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -33,6 +33,7 @@
- #include <linux/dmaengine.h>
- #include <linux/dma-mapping.h>
- #include <linux/of_device.h>
-+#include <linux/pm_runtime.h>
- #include <linux/sh_dma.h>
- #include <linux/spi/spi.h>
- #include <linux/spi/rspi.h>
-@@ -1111,7 +1112,7 @@ static int rspi_remove(struct platform_device *pdev)
- struct rspi_data *rspi = platform_get_drvdata(pdev);
-
- rspi_release_dma(rspi);
-- clk_disable_unprepare(rspi->clk);
-+ pm_runtime_disable(&pdev->dev);
-
- return 0;
- }
-@@ -1242,16 +1243,13 @@ static int rspi_probe(struct platform_device *pdev)
- goto error1;
- }
-
-- ret = clk_prepare_enable(rspi->clk);
-- if (ret < 0) {
-- dev_err(&pdev->dev, "unable to prepare/enable clock\n");
-- goto error1;
-- }
-+ pm_runtime_enable(&pdev->dev);
-
- init_waitqueue_head(&rspi->wait);
-
- master->bus_num = pdev->id;
- master->setup = rspi_setup;
-+ master->auto_runtime_pm = true;
- master->transfer_one = ops->transfer_one;
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
-@@ -1312,7 +1310,7 @@ static int rspi_probe(struct platform_device *pdev)
- error3:
- rspi_release_dma(rspi);
- error2:
-- clk_disable_unprepare(rspi->clk);
-+ pm_runtime_disable(&pdev->dev);
- error1:
- spi_master_put(master);
-
---
-2.1.2
-
diff --git a/patches.renesas/0098-sh-intc-Enable-driver-compilation-with-COMPILE_TEST.patch b/patches.renesas/0098-sh-intc-Enable-driver-compilation-with-COMPILE_TEST.patch
deleted file mode 100644
index 159875f801b49..0000000000000
--- a/patches.renesas/0098-sh-intc-Enable-driver-compilation-with-COMPILE_TEST.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 517a42ba17e50c994ad31232fd675705634c7fea Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 27 Nov 2013 02:18:37 +0100
-Subject: sh: intc: Enable driver compilation with COMPILE_TEST
-
-This helps increasing build testing coverage.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4f3068f60503e08bc9e729528d9e54289980fa96)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/intc/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
-index a305731742a9..f7d90617c9d9 100644
---- a/drivers/sh/intc/Kconfig
-+++ b/drivers/sh/intc/Kconfig
-@@ -6,7 +6,7 @@ comment "Interrupt controller options"
-
- config INTC_USERIMASK
- bool "Userspace interrupt masking support"
-- depends on ARCH_SHMOBILE || (SUPERH && CPU_SH4A)
-+ depends on ARCH_SHMOBILE || (SUPERH && CPU_SH4A) || COMPILE_TEST
- help
- This enables support for hardware-assisted userspace hardirq
- masking.
---
-2.1.2
-
diff --git a/patches.renesas/0099-drivers-sh-compile-drivers-sh-pm_runtime.c-if-ARCH_S.patch b/patches.renesas/0099-drivers-sh-compile-drivers-sh-pm_runtime.c-if-ARCH_S.patch
deleted file mode 100644
index 64005249d6bd9..0000000000000
--- a/patches.renesas/0099-drivers-sh-compile-drivers-sh-pm_runtime.c-if-ARCH_S.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 6dcc351c5155f97f31b832c1e7f09a7887f12250 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Tue, 6 May 2014 23:26:19 +0200
-Subject: drivers: sh: compile drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI
-
-If the kernel is built to support multi-ARM configuration with shmobile
-support built in, then drivers/sh is not built. This contains the PM
-runtime code in drivers/sh/pm_runtime.c, which implicitly enables the
-module clocks for all devices, and thus is quite essential.
-Without this, the state of clocks depends on implicit reset state, or on
-the bootloader.
-
-If ARCH_SHMOBILE_MULTI then build the drivers/sh directory, but ensure that
-bits that may conflict (drivers/sh/clk if the common clock framework is
-enabled) or are not used (drivers/sh/intc), are not built.
-Also, only enable the PM runtime code when actually running on a shmobile
-SoCs that needs it.
-
-ARCH_SHMOBILE_MULTI was added a while ago by commit
-efacfce5f8a523457e9419a25d52fe39db00b26a ("ARM: shmobile: Introduce
-ARCH_SHMOBILE_MULTI"), but drivers/sh was compiled for both
-ARCH_SHMOBILE_LEGACY and ARCH_SHMOBILE_MULTI until commit
-bf98c1eac1d4a6bcf00532e4fa41d8126cd6c187 ("ARM: Rename ARCH_SHMOBILE to
-ARCH_SHMOBILE_LEGACY").
-
-Inspired by a patch from Ben Dooks <ben.dooks@codethink.co.uk>.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3c90c55dcde745bed81f6447f24ba96bda43d984)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/Makefile | 2 +-
- drivers/sh/Makefile | 14 ++++++++------
- drivers/sh/pm_runtime.c | 20 +++++++++++++++++++-
- 3 files changed, 28 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/Makefile b/drivers/Makefile
-index 8e3b8b06c0b2..3cc8214f9b26 100644
---- a/drivers/Makefile
-+++ b/drivers/Makefile
-@@ -118,7 +118,7 @@ obj-$(CONFIG_SGI_SN) += sn/
- obj-y += firmware/
- obj-$(CONFIG_CRYPTO) += crypto/
- obj-$(CONFIG_SUPERH) += sh/
--obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += sh/
-+obj-$(CONFIG_ARCH_SHMOBILE) += sh/
- ifndef CONFIG_ARCH_USES_GETTIMEOFFSET
- obj-y += clocksource/
- endif
-diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
-index fc67f564f02c..788ed9b59b4e 100644
---- a/drivers/sh/Makefile
-+++ b/drivers/sh/Makefile
-@@ -1,10 +1,12 @@
- #
- # Makefile for the SuperH specific drivers.
- #
--obj-y := intc/
-+obj-$(CONFIG_SUPERH) += intc/
-+obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/
-+ifneq ($(CONFIG_COMMON_CLK),y)
-+obj-$(CONFIG_HAVE_CLK) += clk/
-+endif
-+obj-$(CONFIG_MAPLE) += maple/
-+obj-$(CONFIG_SUPERHYWAY) += superhyway/
-
--obj-$(CONFIG_HAVE_CLK) += clk/
--obj-$(CONFIG_MAPLE) += maple/
--obj-$(CONFIG_SUPERHYWAY) += superhyway/
--
--obj-y += pm_runtime.o
-+obj-y += pm_runtime.o
-diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
-index 8afa5a4589f2..10c65eb51f85 100644
---- a/drivers/sh/pm_runtime.c
-+++ b/drivers/sh/pm_runtime.c
-@@ -50,8 +50,25 @@ static struct pm_clk_notifier_block platform_bus_notifier = {
- .con_ids = { NULL, },
- };
-
-+static bool default_pm_on;
-+
- static int __init sh_pm_runtime_init(void)
- {
-+ if (IS_ENABLED(CONFIG_ARCH_SHMOBILE_MULTI)) {
-+ if (!of_machine_is_compatible("renesas,emev2") &&
-+ !of_machine_is_compatible("renesas,r7s72100") &&
-+ !of_machine_is_compatible("renesas,r8a73a4") &&
-+ !of_machine_is_compatible("renesas,r8a7740") &&
-+ !of_machine_is_compatible("renesas,r8a7778") &&
-+ !of_machine_is_compatible("renesas,r8a7779") &&
-+ !of_machine_is_compatible("renesas,r8a7790") &&
-+ !of_machine_is_compatible("renesas,r8a7791") &&
-+ !of_machine_is_compatible("renesas,sh7372") &&
-+ !of_machine_is_compatible("renesas,sh73a0"))
-+ return 0;
-+ }
-+
-+ default_pm_on = true;
- pm_clk_add_notifier(&platform_bus_type, &platform_bus_notifier);
- return 0;
- }
-@@ -59,7 +76,8 @@ core_initcall(sh_pm_runtime_init);
-
- static int __init sh_pm_runtime_late_init(void)
- {
-- pm_genpd_poweroff_unused();
-+ if (default_pm_on)
-+ pm_genpd_poweroff_unused();
- return 0;
- }
- late_initcall(sh_pm_runtime_late_init);
---
-2.1.2
-
diff --git a/patches.renesas/0100-sh_eth-use-ETH_ZLEN-instead-of-home-grown-define.patch b/patches.renesas/0100-sh_eth-use-ETH_ZLEN-instead-of-home-grown-define.patch
deleted file mode 100644
index 3f1937f0672a2..0000000000000
--- a/patches.renesas/0100-sh_eth-use-ETH_ZLEN-instead-of-home-grown-define.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 9a0fd1c203823f4a7e1ff13aa4406e74e9d87eec Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Fri, 14 Feb 2014 03:05:42 +0300
-Subject: sh_eth: use ETH_ZLEN instead of home-grown #define
-
-The driver #define's and uses ETHERSMALL macro for the minimum Ethernet frame
-size for which we have a standard macro ETH_ZLEN. Use the latter instead of
-the home-grown one.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 730c8c69bc8d4640336885e20e719b0842d0fcb2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 4 ++--
- drivers/net/ethernet/renesas/sh_eth.h | 3 +--
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 957f0ffe31c4..6f1884d7804b 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2112,8 +2112,8 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
- skb->len + 2);
- txdesc->addr = dma_map_single(&ndev->dev, skb->data, skb->len,
- DMA_TO_DEVICE);
-- if (skb->len < ETHERSMALL)
-- txdesc->buffer_length = ETHERSMALL;
-+ if (skb->len < ETH_ZLEN)
-+ txdesc->buffer_length = ETH_ZLEN;
- else
- txdesc->buffer_length = skb->len;
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.h b/drivers/net/ethernet/renesas/sh_eth.h
-index a096b4bf9799..b37c427144ee 100644
---- a/drivers/net/ethernet/renesas/sh_eth.h
-+++ b/drivers/net/ethernet/renesas/sh_eth.h
-@@ -27,8 +27,7 @@
- #define RX_RING_MIN 64
- #define TX_RING_MAX 1024
- #define RX_RING_MAX 1024
--#define ETHERSMALL 60
--#define PKT_BUF_SZ 1538
-+#define PKT_BUF_SZ 1538
- #define SH_ETH_TSU_TIMEOUT_MS 500
- #define SH_ETH_TSU_CAM_ENTRIES 32
-
---
-2.1.2
-
diff --git a/patches.renesas/0101-sh_eth-add-device-tree-support.patch b/patches.renesas/0101-sh_eth-add-device-tree-support.patch
deleted file mode 100644
index 8e6d8c7cf3da7..0000000000000
--- a/patches.renesas/0101-sh_eth-add-device-tree-support.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 6ab325bd621230c0f1b4f401004268b1889c2896 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 18 Feb 2014 03:12:43 +0300
-Subject: sh_eth: add device tree support
-
-Add support of the device tree probing for the Renesas SH-Mobile SoCs
-documenting the device tree binding as necessary.
-
-This work is loosely based on the original patch by Nobuhiro Iwamatsu
-<nobuhiro.iwamatsu.yj@renesas.com>.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit b356e978e92fccd17a3e4620a4821bdbfb706c1a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/net/sh_eth.txt | 55 +++++++++++++++++++
- drivers/net/ethernet/renesas/sh_eth.c | 69 ++++++++++++++++++++++--
- 2 files changed, 121 insertions(+), 3 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/net/sh_eth.txt
-
-diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentation/devicetree/bindings/net/sh_eth.txt
-new file mode 100644
-index 000000000000..e7106b50dbdc
---- /dev/null
-+++ b/Documentation/devicetree/bindings/net/sh_eth.txt
-@@ -0,0 +1,55 @@
-+* Renesas Electronics SH EtherMAC
-+
-+This file provides information on what the device node for the SH EtherMAC
-+interface contains.
-+
-+Required properties:
-+- compatible: "renesas,gether-r8a7740" if the device is a part of R8A7740 SoC.
-+ "renesas,ether-r8a7778" if the device is a part of R8A7778 SoC.
-+ "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC.
-+ "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC.
-+ "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC.
-+ "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
-+- reg: offset and length of (1) the E-DMAC/feLic register block (required),
-+ (2) the TSU register block (optional).
-+- interrupts: interrupt specifier for the sole interrupt.
-+- phy-mode: see ethernet.txt file in the same directory.
-+- phy-handle: see ethernet.txt file in the same directory.
-+- #address-cells: number of address cells for the MDIO bus, must be equal to 1.
-+- #size-cells: number of size cells on the MDIO bus, must be equal to 0.
-+- clocks: clock phandle and specifier pair.
-+- pinctrl-0: phandle, referring to a default pin configuration node.
-+
-+Optional properties:
-+- interrupt-parent: the phandle for the interrupt controller that services
-+ interrupts for this device.
-+- pinctrl-names: pin configuration state name ("default").
-+- renesas,no-ether-link: boolean, specify when a board does not provide a proper
-+ Ether LINK signal.
-+- renesas,ether-link-active-low: boolean, specify when the Ether LINK signal is
-+ active-low instead of normal active-high.
-+
-+Example (Lager board):
-+
-+ ethernet@ee700000 {
-+ compatible = "renesas,ether-r8a7790";
-+ reg = <0 0xee700000 0 0x400>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7790_CLK_ETHER>;
-+ phy-mode = "rmii";
-+ phy-handle = <&phy1>;
-+ pinctrl-0 = <&ether_pins>;
-+ pinctrl-names = "default";
-+ renesas,ether-link-active-low;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ phy1: ethernet-phy@1 {
-+ reg = <1>;
-+ interrupt-parent = <&irqc0>;
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ pinctrl-0 = <&phy1_pins>;
-+ pinctrl-names = "default";
-+ };
-+ };
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 6f1884d7804b..b1afdaa7a466 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1,8 +1,8 @@
- /* SuperH Ethernet device driver
- *
- * Copyright (C) 2006-2012 Nobuhiro Iwamatsu
-- * Copyright (C) 2008-2013 Renesas Solutions Corp.
-- * Copyright (C) 2013 Cogent Embedded, Inc.
-+ * Copyright (C) 2008-2014 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Cogent Embedded, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
-@@ -27,6 +27,10 @@
- #include <linux/platform_device.h>
- #include <linux/mdio-bitbang.h>
- #include <linux/netdevice.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
-+#include <linux/of_irq.h>
-+#include <linux/of_net.h>
- #include <linux/phy.h>
- #include <linux/cache.h>
- #include <linux/io.h>
-@@ -2724,6 +2728,54 @@ static const struct net_device_ops sh_eth_netdev_ops_tsu = {
- .ndo_change_mtu = eth_change_mtu,
- };
-
-+#ifdef CONFIG_OF
-+static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev)
-+{
-+ struct device_node *np = dev->of_node;
-+ struct sh_eth_plat_data *pdata;
-+ struct device_node *phy;
-+ const char *mac_addr;
-+
-+ pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
-+ if (!pdata)
-+ return NULL;
-+
-+ pdata->phy_interface = of_get_phy_mode(np);
-+
-+ phy = of_parse_phandle(np, "phy-handle", 0);
-+ if (of_property_read_u32(phy, "reg", &pdata->phy))
-+ return NULL;
-+ pdata->phy_irq = irq_of_parse_and_map(phy, 0);
-+
-+ mac_addr = of_get_mac_address(np);
-+ if (mac_addr)
-+ memcpy(pdata->mac_addr, mac_addr, ETH_ALEN);
-+
-+ pdata->no_ether_link =
-+ of_property_read_bool(np, "renesas,no-ether-link");
-+ pdata->ether_link_active_low =
-+ of_property_read_bool(np, "renesas,ether-link-active-low");
-+
-+ return pdata;
-+}
-+
-+static const struct of_device_id sh_eth_match_table[] = {
-+ { .compatible = "renesas,gether-r8a7740", .data = &r8a7740_data },
-+ { .compatible = "renesas,ether-r8a7778", .data = &r8a777x_data },
-+ { .compatible = "renesas,ether-r8a7779", .data = &r8a777x_data },
-+ { .compatible = "renesas,ether-r8a7790", .data = &r8a779x_data },
-+ { .compatible = "renesas,ether-r8a7791", .data = &r8a779x_data },
-+ { .compatible = "renesas,ether-r7s72100", .data = &r7s72100_data },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(of, sh_eth_match_table);
-+#else
-+static inline struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev)
-+{
-+ return NULL;
-+}
-+#endif
-+
- static int sh_eth_drv_probe(struct platform_device *pdev)
- {
- int ret, devno = 0;
-@@ -2777,6 +2829,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- pm_runtime_enable(&pdev->dev);
- pm_runtime_resume(&pdev->dev);
-
-+ if (pdev->dev.of_node)
-+ pd = sh_eth_parse_dt(&pdev->dev);
- if (!pd) {
- dev_err(&pdev->dev, "no platform data\n");
- ret = -EINVAL;
-@@ -2792,7 +2846,15 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- mdp->ether_link_active_low = pd->ether_link_active_low;
-
- /* set cpu data */
-- mdp->cd = (struct sh_eth_cpu_data *)id->driver_data;
-+ if (id) {
-+ mdp->cd = (struct sh_eth_cpu_data *)id->driver_data;
-+ } else {
-+ const struct of_device_id *match;
-+
-+ match = of_match_device(of_match_ptr(sh_eth_match_table),
-+ &pdev->dev);
-+ mdp->cd = (struct sh_eth_cpu_data *)match->data;
-+ }
- mdp->reg_offset = sh_eth_get_register_offset(mdp->cd->register_type);
- sh_eth_set_default_cpu_data(mdp->cd);
-
-@@ -2934,6 +2996,7 @@ static struct platform_driver sh_eth_driver = {
- .driver = {
- .name = CARDNAME,
- .pm = SH_ETH_PM_OPS,
-+ .of_match_table = of_match_ptr(sh_eth_match_table),
- },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0102-sh_eth-update-OF-PHY-registeration.patch b/patches.renesas/0102-sh_eth-update-OF-PHY-registeration.patch
deleted file mode 100644
index f45b643591dd5..0000000000000
--- a/patches.renesas/0102-sh_eth-update-OF-PHY-registeration.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From ae3d328a5d6e4604fc9e54c57e4da7a36bde7d9d Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 12 Mar 2014 17:47:40 +0000
-Subject: sh_eth: update OF PHY registeration
-
-If the sh_eth device is registered using OF, then the driver
-should call of_mdiobus_register() to register the PHYs described
-in the devicetree and then use of_phy_connect() to connect the
-PHYs to the device.
-
-This ensures that any PHYs registered in the device tree are
-appropriately connected to the parent devices nodes so that
-the PHY drivers can access their OF properties.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 702eca02b7c8574b42359512ebccfa777a71f66e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 59 +++++++++++++++++++++++------------
- 1 file changed, 39 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index b1afdaa7a466..5242fe81ecc7 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -3,6 +3,7 @@
- * Copyright (C) 2006-2012 Nobuhiro Iwamatsu
- * Copyright (C) 2008-2014 Renesas Solutions Corp.
- * Copyright (C) 2013-2014 Cogent Embedded, Inc.
-+ * Copyright (C) 2014 Codethink Limited
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms and conditions of the GNU General Public License,
-@@ -40,6 +41,7 @@
- #include <linux/if_vlan.h>
- #include <linux/clk.h>
- #include <linux/sh_eth.h>
-+#include <linux/of_mdio.h>
-
- #include "sh_eth.h"
-
-@@ -1775,22 +1777,37 @@ static void sh_eth_adjust_link(struct net_device *ndev)
- /* PHY init function */
- static int sh_eth_phy_init(struct net_device *ndev)
- {
-+ struct device_node *np = ndev->dev.parent->of_node;
- struct sh_eth_private *mdp = netdev_priv(ndev);
-- char phy_id[MII_BUS_ID_SIZE + 3];
- struct phy_device *phydev = NULL;
-
-- snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
-- mdp->mii_bus->id, mdp->phy_id);
--
- mdp->link = 0;
- mdp->speed = 0;
- mdp->duplex = -1;
-
- /* Try connect to PHY */
-- phydev = phy_connect(ndev, phy_id, sh_eth_adjust_link,
-- mdp->phy_interface);
-+ if (np) {
-+ struct device_node *pn;
-+
-+ pn = of_parse_phandle(np, "phy-handle", 0);
-+ phydev = of_phy_connect(ndev, pn,
-+ sh_eth_adjust_link, 0,
-+ mdp->phy_interface);
-+
-+ if (!phydev)
-+ phydev = ERR_PTR(-ENOENT);
-+ } else {
-+ char phy_id[MII_BUS_ID_SIZE + 3];
-+
-+ snprintf(phy_id, sizeof(phy_id), PHY_ID_FMT,
-+ mdp->mii_bus->id, mdp->phy_id);
-+
-+ phydev = phy_connect(ndev, phy_id, sh_eth_adjust_link,
-+ mdp->phy_interface);
-+ }
-+
- if (IS_ERR(phydev)) {
-- dev_err(&ndev->dev, "phy_connect failed\n");
-+ dev_err(&ndev->dev, "failed to connect PHY\n");
- return PTR_ERR(phydev);
- }
-
-@@ -2652,13 +2669,19 @@ static int sh_mdio_init(struct net_device *ndev, int id,
- goto out_free_bus;
- }
-
-- for (i = 0; i < PHY_MAX_ADDR; i++)
-- mdp->mii_bus->irq[i] = PHY_POLL;
-- if (pd->phy_irq > 0)
-- mdp->mii_bus->irq[pd->phy] = pd->phy_irq;
--
- /* register mdio bus */
-- ret = mdiobus_register(mdp->mii_bus);
-+ if (ndev->dev.parent->of_node) {
-+ ret = of_mdiobus_register(mdp->mii_bus,
-+ ndev->dev.parent->of_node);
-+ } else {
-+ for (i = 0; i < PHY_MAX_ADDR; i++)
-+ mdp->mii_bus->irq[i] = PHY_POLL;
-+ if (pd->phy_irq > 0)
-+ mdp->mii_bus->irq[pd->phy] = pd->phy_irq;
-+
-+ ret = mdiobus_register(mdp->mii_bus);
-+ }
-+
- if (ret)
- goto out_free_bus;
-
-@@ -2733,7 +2756,6 @@ static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev)
- {
- struct device_node *np = dev->of_node;
- struct sh_eth_plat_data *pdata;
-- struct device_node *phy;
- const char *mac_addr;
-
- pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
-@@ -2742,11 +2764,6 @@ static struct sh_eth_plat_data *sh_eth_parse_dt(struct device *dev)
-
- pdata->phy_interface = of_get_phy_mode(np);
-
-- phy = of_parse_phandle(np, "phy-handle", 0);
-- if (of_property_read_u32(phy, "reg", &pdata->phy))
-- return NULL;
-- pdata->phy_irq = irq_of_parse_and_map(phy, 0);
--
- mac_addr = of_get_mac_address(np);
- if (mac_addr)
- memcpy(pdata->mac_addr, mac_addr, ETH_ALEN);
-@@ -2910,8 +2927,10 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
-
- /* mdio bus init */
- ret = sh_mdio_init(ndev, pdev->id, pd);
-- if (ret)
-+ if (ret) {
-+ dev_err(&ndev->dev, "failed to initialise MDIO\n");
- goto out_unregister;
-+ }
-
- /* print device information */
- pr_info("Base address at 0x%x, %pM, IRQ %d.\n",
---
-2.1.2
-
diff --git a/patches.renesas/0103-sh_eth-exit-probe-with-unknown-register-layout.patch b/patches.renesas/0103-sh_eth-exit-probe-with-unknown-register-layout.patch
deleted file mode 100644
index 0f7d53c35e4aa..0000000000000
--- a/patches.renesas/0103-sh_eth-exit-probe-with-unknown-register-layout.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From dba68b222e510e01a7cd5db2654e356cf2388905 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Mar 2014 03:11:24 +0300
-Subject: sh_eth: exit probe with unknown register layout
-
-Exit the driver's probe() method when the register layout is unknown as the
-driver would cause kernel oops in this case anyway.
-
-While at it, move the corresponding error message printout and convert it from
-pr_err() to dev_err().
-
-Suggested-by: Joe Perches <joe@perches.com>
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 264be2f5a973cc85be3e31d6bf6234b55a256627)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 5242fe81ecc7..4d3b5b704b39 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2717,7 +2717,6 @@ static const u16 *sh_eth_get_register_offset(int register_type)
- reg_offset = sh_eth_offset_fast_sh3_sh2;
- break;
- default:
-- pr_err("Unknown register type (%d)\n", register_type);
- break;
- }
-
-@@ -2873,6 +2872,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- mdp->cd = (struct sh_eth_cpu_data *)match->data;
- }
- mdp->reg_offset = sh_eth_get_register_offset(mdp->cd->register_type);
-+ if (!mdp->reg_offset) {
-+ dev_err(&pdev->dev, "Unknown register type (%d)\n",
-+ mdp->cd->register_type);
-+ ret = -EINVAL;
-+ goto out_release;
-+ }
- sh_eth_set_default_cpu_data(mdp->cd);
-
- /* set function */
---
-2.1.2
-
diff --git a/patches.renesas/0104-sh_eth-convert-pr_-to-netdev_-calls.patch b/patches.renesas/0104-sh_eth-convert-pr_-to-netdev_-calls.patch
deleted file mode 100644
index 9268a399aef23..0000000000000
--- a/patches.renesas/0104-sh_eth-convert-pr_-to-netdev_-calls.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From a62edb24ce7e83dfbb14a5898028a683171d8e47 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Mar 2014 03:27:54 +0300
-Subject: sh_eth: convert pr_*() to netdev_*() calls
-
-Convert pr_*() to netdev_*() calls as the latter provide info on a device.
-
-Suggested-by: Joe Perches <joe@perches.com>
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit f75f14ec2f7b552dc87b4b57b2a19e487378f774)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 4d3b5b704b39..32daff7fa2d1 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -421,7 +421,8 @@ static void sh_eth_select_mii(struct net_device *ndev)
- value = 0x0;
- break;
- default:
-- pr_warn("PHY interface mode was not setup. Set to MII.\n");
-+ netdev_warn(ndev,
-+ "PHY interface mode was not setup. Set to MII.\n");
- value = 0x1;
- break;
- }
-@@ -868,7 +869,7 @@ static int sh_eth_check_reset(struct net_device *ndev)
- cnt--;
- }
- if (cnt <= 0) {
-- pr_err("Device reset failed\n");
-+ netdev_err(ndev, "Device reset failed\n");
- ret = -ETIMEDOUT;
- }
- return ret;
-@@ -2938,8 +2939,8 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- }
-
- /* print device information */
-- pr_info("Base address at 0x%x, %pM, IRQ %d.\n",
-- (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
-+ netdev_info(ndev, "Base address at 0x%x, %pM, IRQ %d.\n",
-+ (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
-
- platform_set_drvdata(pdev, ndev);
-
---
-2.1.2
-
diff --git a/patches.renesas/0105-sh_eth-convert-dev_-to-netdev_-calls.patch b/patches.renesas/0105-sh_eth-convert-dev_-to-netdev_-calls.patch
deleted file mode 100644
index a3b04fb04f409..0000000000000
--- a/patches.renesas/0105-sh_eth-convert-dev_-to-netdev_-calls.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 9f190ca6669f8279bcf16e19db6ad088ffca73f0 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Mar 2014 03:29:14 +0300
-Subject: sh_eth: convert dev_*() to netdev_*() calls
-
-Convert dev_*(&ndev->dev, ...) to netdev_*(ndev, ...) calls since they are a bit
-shorter and at the same time give more information on a device.
-
-Suggested-by: Joe Perches <joe@perches.com>
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit da2468555643efbde3fb026cd46e5245800cc872)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 47 ++++++++++++++++++-----------------
- 1 file changed, 24 insertions(+), 23 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 32daff7fa2d1..185f185b5f6d 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1572,7 +1572,7 @@ ignore_link:
- if (intr_status & EESR_TABT) { /* Transmit Abort int */
- ndev->stats.tx_aborted_errors++;
- if (netif_msg_tx_err(mdp))
-- dev_err(&ndev->dev, "Transmit Abort\n");
-+ netdev_err(ndev, "Transmit Abort\n");
- }
- }
-
-@@ -1582,7 +1582,7 @@ ignore_link:
- /* Receive Frame Overflow int */
- ndev->stats.rx_frame_errors++;
- if (netif_msg_rx_err(mdp))
-- dev_err(&ndev->dev, "Receive Abort\n");
-+ netdev_err(ndev, "Receive Abort\n");
- }
- }
-
-@@ -1590,14 +1590,14 @@ ignore_link:
- /* Transmit Descriptor Empty int */
- ndev->stats.tx_fifo_errors++;
- if (netif_msg_tx_err(mdp))
-- dev_err(&ndev->dev, "Transmit Descriptor Empty\n");
-+ netdev_err(ndev, "Transmit Descriptor Empty\n");
- }
-
- if (intr_status & EESR_TFE) {
- /* FIFO under flow */
- ndev->stats.tx_fifo_errors++;
- if (netif_msg_tx_err(mdp))
-- dev_err(&ndev->dev, "Transmit FIFO Under flow\n");
-+ netdev_err(ndev, "Transmit FIFO Under flow\n");
- }
-
- if (intr_status & EESR_RDE) {
-@@ -1605,21 +1605,21 @@ ignore_link:
- ndev->stats.rx_over_errors++;
-
- if (netif_msg_rx_err(mdp))
-- dev_err(&ndev->dev, "Receive Descriptor Empty\n");
-+ netdev_err(ndev, "Receive Descriptor Empty\n");
- }
-
- if (intr_status & EESR_RFE) {
- /* Receive FIFO Overflow int */
- ndev->stats.rx_fifo_errors++;
- if (netif_msg_rx_err(mdp))
-- dev_err(&ndev->dev, "Receive FIFO Overflow\n");
-+ netdev_err(ndev, "Receive FIFO Overflow\n");
- }
-
- if (!mdp->cd->no_ade && (intr_status & EESR_ADE)) {
- /* Address Error */
- ndev->stats.tx_fifo_errors++;
- if (netif_msg_tx_err(mdp))
-- dev_err(&ndev->dev, "Address Error\n");
-+ netdev_err(ndev, "Address Error\n");
- }
-
- mask = EESR_TWB | EESR_TABT | EESR_ADE | EESR_TDE | EESR_TFE;
-@@ -1630,9 +1630,9 @@ ignore_link:
- u32 edtrr = sh_eth_read(ndev, EDTRR);
-
- /* dmesg */
-- dev_err(&ndev->dev, "TX error. status=%8.8x cur_tx=%8.8x dirty_tx=%8.8x state=%8.8x EDTRR=%8.8x.\n",
-- intr_status, mdp->cur_tx, mdp->dirty_tx,
-- (u32)ndev->state, edtrr);
-+ netdev_err(ndev, "TX error. status=%8.8x cur_tx=%8.8x dirty_tx=%8.8x state=%8.8x EDTRR=%8.8x.\n",
-+ intr_status, mdp->cur_tx, mdp->dirty_tx,
-+ (u32)ndev->state, edtrr);
- /* dirty buffer free */
- sh_eth_txfree(ndev);
-
-@@ -1677,9 +1677,9 @@ static irqreturn_t sh_eth_interrupt(int irq, void *netdev)
- EESIPR);
- __napi_schedule(&mdp->napi);
- } else {
-- dev_warn(&ndev->dev,
-- "ignoring interrupt, status 0x%08lx, mask 0x%08lx.\n",
-- intr_status, intr_enable);
-+ netdev_warn(ndev,
-+ "ignoring interrupt, status 0x%08lx, mask 0x%08lx.\n",
-+ intr_status, intr_enable);
- }
- }
-
-@@ -1808,12 +1808,12 @@ static int sh_eth_phy_init(struct net_device *ndev)
- }
-
- if (IS_ERR(phydev)) {
-- dev_err(&ndev->dev, "failed to connect PHY\n");
-+ netdev_err(ndev, "failed to connect PHY\n");
- return PTR_ERR(phydev);
- }
-
-- dev_info(&ndev->dev, "attached PHY %d (IRQ %d) to driver %s\n",
-- phydev->addr, phydev->irq, phydev->drv->name);
-+ netdev_info(ndev, "attached PHY %d (IRQ %d) to driver %s\n",
-+ phydev->addr, phydev->irq, phydev->drv->name);
-
- mdp->phydev = phydev;
-
-@@ -1994,12 +1994,12 @@ static int sh_eth_set_ringparam(struct net_device *ndev,
-
- ret = sh_eth_ring_init(ndev);
- if (ret < 0) {
-- dev_err(&ndev->dev, "%s: sh_eth_ring_init failed.\n", __func__);
-+ netdev_err(ndev, "%s: sh_eth_ring_init failed.\n", __func__);
- return ret;
- }
- ret = sh_eth_dev_init(ndev, false);
- if (ret < 0) {
-- dev_err(&ndev->dev, "%s: sh_eth_dev_init failed.\n", __func__);
-+ netdev_err(ndev, "%s: sh_eth_dev_init failed.\n", __func__);
- return ret;
- }
-
-@@ -2040,7 +2040,7 @@ static int sh_eth_open(struct net_device *ndev)
- ret = request_irq(ndev->irq, sh_eth_interrupt,
- mdp->cd->irq_flags, ndev->name, ndev);
- if (ret) {
-- dev_err(&ndev->dev, "Can not assign IRQ number\n");
-+ netdev_err(ndev, "Can not assign IRQ number\n");
- goto out_napi_off;
- }
-
-@@ -2079,8 +2079,9 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
- netif_stop_queue(ndev);
-
- if (netif_msg_timer(mdp)) {
-- dev_err(&ndev->dev, "%s: transmit timed out, status %8.8x, resetting...\n",
-- ndev->name, (int)sh_eth_read(ndev, EESR));
-+ netdev_err(ndev,
-+ "transmit timed out, status %8.8x, resetting...\n",
-+ (int)sh_eth_read(ndev, EESR));
- }
-
- /* tx_errors count up */
-@@ -2117,7 +2118,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
- if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
- if (!sh_eth_txfree(ndev)) {
- if (netif_msg_tx_queued(mdp))
-- dev_warn(&ndev->dev, "TxFD exhausted.\n");
-+ netdev_warn(ndev, "TxFD exhausted.\n");
- netif_stop_queue(ndev);
- spin_unlock_irqrestore(&mdp->lock, flags);
- return NETDEV_TX_BUSY;
-@@ -2287,7 +2288,7 @@ static int sh_eth_tsu_busy(struct net_device *ndev)
- udelay(10);
- timeout--;
- if (timeout <= 0) {
-- dev_err(&ndev->dev, "%s: timeout\n", __func__);
-+ netdev_err(ndev, "%s: timeout\n", __func__);
- return -ETIMEDOUT;
- }
- }
---
-2.1.2
-
diff --git a/patches.renesas/0106-sh_eth-fold-netif_msg_-and-netdev_-calls-into-netif_.patch b/patches.renesas/0106-sh_eth-fold-netif_msg_-and-netdev_-calls-into-netif_.patch
deleted file mode 100644
index 7bcbc924d7adc..0000000000000
--- a/patches.renesas/0106-sh_eth-fold-netif_msg_-and-netdev_-calls-into-netif_.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From f8c7dce7c4a327973a8ebfa729e2727f8e8e85fc Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Mar 2014 03:30:59 +0300
-Subject: sh_eth: fold netif_msg_*() and netdev_*() calls into netif_*()
- invocations
-
-Now that we call netdev_*() under netif_msg_*() checks, we can fold these into
-netif_*() macro invocations.
-
-Suggested-by: Joe Perches <joe@perches.com>
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 8d5009f6a9d9f4ef62a39bf68b53379b2b766c1c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 33 +++++++++++----------------------
- 1 file changed, 11 insertions(+), 22 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 185f185b5f6d..062a70f85068 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1571,8 +1571,7 @@ ignore_link:
- /* Unused write back interrupt */
- if (intr_status & EESR_TABT) { /* Transmit Abort int */
- ndev->stats.tx_aborted_errors++;
-- if (netif_msg_tx_err(mdp))
-- netdev_err(ndev, "Transmit Abort\n");
-+ netif_err(mdp, tx_err, ndev, "Transmit Abort\n");
- }
- }
-
-@@ -1581,45 +1580,38 @@ ignore_link:
- if (intr_status & EESR_RFRMER) {
- /* Receive Frame Overflow int */
- ndev->stats.rx_frame_errors++;
-- if (netif_msg_rx_err(mdp))
-- netdev_err(ndev, "Receive Abort\n");
-+ netif_err(mdp, rx_err, ndev, "Receive Abort\n");
- }
- }
-
- if (intr_status & EESR_TDE) {
- /* Transmit Descriptor Empty int */
- ndev->stats.tx_fifo_errors++;
-- if (netif_msg_tx_err(mdp))
-- netdev_err(ndev, "Transmit Descriptor Empty\n");
-+ netif_err(mdp, tx_err, ndev, "Transmit Descriptor Empty\n");
- }
-
- if (intr_status & EESR_TFE) {
- /* FIFO under flow */
- ndev->stats.tx_fifo_errors++;
-- if (netif_msg_tx_err(mdp))
-- netdev_err(ndev, "Transmit FIFO Under flow\n");
-+ netif_err(mdp, tx_err, ndev, "Transmit FIFO Under flow\n");
- }
-
- if (intr_status & EESR_RDE) {
- /* Receive Descriptor Empty int */
- ndev->stats.rx_over_errors++;
--
-- if (netif_msg_rx_err(mdp))
-- netdev_err(ndev, "Receive Descriptor Empty\n");
-+ netif_err(mdp, rx_err, ndev, "Receive Descriptor Empty\n");
- }
-
- if (intr_status & EESR_RFE) {
- /* Receive FIFO Overflow int */
- ndev->stats.rx_fifo_errors++;
-- if (netif_msg_rx_err(mdp))
-- netdev_err(ndev, "Receive FIFO Overflow\n");
-+ netif_err(mdp, rx_err, ndev, "Receive FIFO Overflow\n");
- }
-
- if (!mdp->cd->no_ade && (intr_status & EESR_ADE)) {
- /* Address Error */
- ndev->stats.tx_fifo_errors++;
-- if (netif_msg_tx_err(mdp))
-- netdev_err(ndev, "Address Error\n");
-+ netif_err(mdp, tx_err, ndev, "Address Error\n");
- }
-
- mask = EESR_TWB | EESR_TABT | EESR_ADE | EESR_TDE | EESR_TFE;
-@@ -2078,11 +2070,9 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
-
- netif_stop_queue(ndev);
-
-- if (netif_msg_timer(mdp)) {
-- netdev_err(ndev,
-- "transmit timed out, status %8.8x, resetting...\n",
-- (int)sh_eth_read(ndev, EESR));
-- }
-+ netif_err(mdp, timer, ndev,
-+ "transmit timed out, status %8.8x, resetting...\n",
-+ (int)sh_eth_read(ndev, EESR));
-
- /* tx_errors count up */
- ndev->stats.tx_errors++;
-@@ -2117,8 +2107,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev)
- spin_lock_irqsave(&mdp->lock, flags);
- if ((mdp->cur_tx - mdp->dirty_tx) >= (mdp->num_tx_ring - 4)) {
- if (!sh_eth_txfree(ndev)) {
-- if (netif_msg_tx_queued(mdp))
-- netdev_warn(ndev, "TxFD exhausted.\n");
-+ netif_warn(mdp, tx_queued, ndev, "TxFD exhausted.\n");
- netif_stop_queue(ndev);
- spin_unlock_irqrestore(&mdp->lock, flags);
- return NETDEV_TX_BUSY;
---
-2.1.2
-
diff --git a/patches.renesas/0107-sh_eth-Use-the-platform-device-for-memory-allocation.patch b/patches.renesas/0107-sh_eth-Use-the-platform-device-for-memory-allocation.patch
deleted file mode 100644
index 41debaae3f70b..0000000000000
--- a/patches.renesas/0107-sh_eth-Use-the-platform-device-for-memory-allocation.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From d251430c1ff02123bb7e6a0f9640e0b984a6049a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 20 Mar 2014 15:00:31 +0100
-Subject: sh_eth: Use the platform device for memory allocation
-
-Memory allocated for the MDIO bus with the devm_kzalloc() API is
-associated with the network device. While this will cause memory to be
-freed at the right time, it doesn't allow allocating memory before the
-network device is initialized.
-
-Replace the network device with the parent platform device for memory
-allocation to remove that dependency. This also improves consistency
-with the other devm_* calls in the driver that all use the platform
-device.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit aa8d422510969b705656e49fc0166d862aca9246)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 062a70f85068..361ac103297b 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2620,10 +2620,10 @@ static int sh_mdio_init(struct net_device *ndev, int id,
- int ret, i;
- struct bb_info *bitbang;
- struct sh_eth_private *mdp = netdev_priv(ndev);
-+ struct device *dev = &mdp->pdev->dev;
-
- /* create bit control struct for PHY */
-- bitbang = devm_kzalloc(&ndev->dev, sizeof(struct bb_info),
-- GFP_KERNEL);
-+ bitbang = devm_kzalloc(dev, sizeof(struct bb_info), GFP_KERNEL);
- if (!bitbang) {
- ret = -ENOMEM;
- goto out;
-@@ -2652,8 +2652,7 @@ static int sh_mdio_init(struct net_device *ndev, int id,
- mdp->pdev->name, id);
-
- /* PHY IRQ */
-- mdp->mii_bus->irq = devm_kzalloc(&ndev->dev,
-- sizeof(int) * PHY_MAX_ADDR,
-+ mdp->mii_bus->irq = devm_kzalloc(dev, sizeof(int) * PHY_MAX_ADDR,
- GFP_KERNEL);
- if (!mdp->mii_bus->irq) {
- ret = -ENOMEM;
---
-2.1.2
-
diff --git a/patches.renesas/0108-sh_eth-Use-the-platform-device-as-the-MDIO-bus-paren.patch b/patches.renesas/0108-sh_eth-Use-the-platform-device-as-the-MDIO-bus-paren.patch
deleted file mode 100644
index daad9ddfcba1e..0000000000000
--- a/patches.renesas/0108-sh_eth-Use-the-platform-device-as-the-MDIO-bus-paren.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From da974521644628afd7780e72e57aaf9524e7f219 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 20 Mar 2014 15:00:32 +0100
-Subject: sh_eth: Use the platform device as the MDIO bus parent
-
-The MDIO bus parent is set to the network device. Beside not reflecting
-the hardware topology, this prevents registering the MDIO bus before
-initializing the network device. Fix it by setting the MDIO bus parent
-to the platform device.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit a5bd60608936fbb84471a80592401ce29a68de71)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 361ac103297b..088d8c3edb89 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2647,7 +2647,7 @@ static int sh_mdio_init(struct net_device *ndev, int id,
-
- /* Hook up MII support for ethtool */
- mdp->mii_bus->name = "sh_mii";
-- mdp->mii_bus->parent = &ndev->dev;
-+ mdp->mii_bus->parent = dev;
- snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
- mdp->pdev->name, id);
-
---
-2.1.2
-
diff --git a/patches.renesas/0109-sh_eth-Simplify-MDIO-bus-initialization-and-release.patch b/patches.renesas/0109-sh_eth-Simplify-MDIO-bus-initialization-and-release.patch
deleted file mode 100644
index 497709444e7f5..0000000000000
--- a/patches.renesas/0109-sh_eth-Simplify-MDIO-bus-initialization-and-release.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 5fdcbc07e9aa12bfcbf5bbb3e8ff7727c486edb4 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 20 Mar 2014 15:00:33 +0100
-Subject: sh_eth: Simplify MDIO bus initialization and release
-
-The network device passed to the sh_mdio_init and sh_mdio_release
-functions is only used to access the sh_eth_private instance. Pass it
-directly to those functions.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit bd920ff553ba17f19372501a14e432d9d92b102b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 30 +++++++++++-------------------
- 1 file changed, 11 insertions(+), 19 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 088d8c3edb89..7067fdeb5bb3 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2597,29 +2597,24 @@ static void sh_eth_tsu_init(struct sh_eth_private *mdp)
- }
-
- /* MDIO bus release function */
--static int sh_mdio_release(struct net_device *ndev)
-+static int sh_mdio_release(struct sh_eth_private *mdp)
- {
-- struct mii_bus *bus = dev_get_drvdata(&ndev->dev);
--
- /* unregister mdio bus */
-- mdiobus_unregister(bus);
--
-- /* remove mdio bus info from net_device */
-- dev_set_drvdata(&ndev->dev, NULL);
-+ mdiobus_unregister(mdp->mii_bus);
-
- /* free bitbang info */
-- free_mdio_bitbang(bus);
-+ free_mdio_bitbang(mdp->mii_bus);
-
- return 0;
- }
-
- /* MDIO bus init function */
--static int sh_mdio_init(struct net_device *ndev, int id,
-+static int sh_mdio_init(struct sh_eth_private *mdp,
- struct sh_eth_plat_data *pd)
- {
- int ret, i;
- struct bb_info *bitbang;
-- struct sh_eth_private *mdp = netdev_priv(ndev);
-+ struct platform_device *pdev = mdp->pdev;
- struct device *dev = &mdp->pdev->dev;
-
- /* create bit control struct for PHY */
-@@ -2649,7 +2644,7 @@ static int sh_mdio_init(struct net_device *ndev, int id,
- mdp->mii_bus->name = "sh_mii";
- mdp->mii_bus->parent = dev;
- snprintf(mdp->mii_bus->id, MII_BUS_ID_SIZE, "%s-%x",
-- mdp->pdev->name, id);
-+ pdev->name, pdev->id);
-
- /* PHY IRQ */
- mdp->mii_bus->irq = devm_kzalloc(dev, sizeof(int) * PHY_MAX_ADDR,
-@@ -2659,10 +2654,9 @@ static int sh_mdio_init(struct net_device *ndev, int id,
- goto out_free_bus;
- }
-
-- /* register mdio bus */
-- if (ndev->dev.parent->of_node) {
-- ret = of_mdiobus_register(mdp->mii_bus,
-- ndev->dev.parent->of_node);
-+ /* register MDIO bus */
-+ if (dev->of_node) {
-+ ret = of_mdiobus_register(mdp->mii_bus, dev->of_node);
- } else {
- for (i = 0; i < PHY_MAX_ADDR; i++)
- mdp->mii_bus->irq[i] = PHY_POLL;
-@@ -2675,8 +2669,6 @@ static int sh_mdio_init(struct net_device *ndev, int id,
- if (ret)
- goto out_free_bus;
-
-- dev_set_drvdata(&ndev->dev, mdp->mii_bus);
--
- return 0;
-
- out_free_bus:
-@@ -2921,7 +2913,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- goto out_napi_del;
-
- /* mdio bus init */
-- ret = sh_mdio_init(ndev, pdev->id, pd);
-+ ret = sh_mdio_init(mdp, pd);
- if (ret) {
- dev_err(&ndev->dev, "failed to initialise MDIO\n");
- goto out_unregister;
-@@ -2955,7 +2947,7 @@ static int sh_eth_drv_remove(struct platform_device *pdev)
- struct net_device *ndev = platform_get_drvdata(pdev);
- struct sh_eth_private *mdp = netdev_priv(ndev);
-
-- sh_mdio_release(ndev);
-+ sh_mdio_release(mdp);
- unregister_netdev(ndev);
- netif_napi_del(&mdp->napi);
- pm_runtime_disable(&pdev->dev);
---
-2.1.2
-
diff --git a/patches.renesas/0110-sh_eth-Register-MDIO-bus-before-registering-the-netw.patch b/patches.renesas/0110-sh_eth-Register-MDIO-bus-before-registering-the-netw.patch
deleted file mode 100644
index 72993e5e1a93e..0000000000000
--- a/patches.renesas/0110-sh_eth-Register-MDIO-bus-before-registering-the-netw.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From afc2c0af21e2e8eff5feaedd312d4c7d3f0d6ac4 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 20 Mar 2014 15:00:34 +0100
-Subject: sh_eth: Register MDIO bus before registering the network device
-
-Network API functions that rely on the MDIO bus can be called as soon as
-the driver calls register_netdev(). Register the MDIO bus before the
-network device to avoid race conditions.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit daacf03f0bbfefee3df107c3f7659d22e22538a7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 7067fdeb5bb3..5fc66a52c471 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2905,6 +2905,13 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- }
- }
-
-+ /* MDIO bus init */
-+ ret = sh_mdio_init(mdp, pd);
-+ if (ret) {
-+ dev_err(&ndev->dev, "failed to initialise MDIO\n");
-+ goto out_release;
-+ }
-+
- netif_napi_add(ndev, &mdp->napi, sh_eth_poll, 64);
-
- /* network device register */
-@@ -2912,13 +2919,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- if (ret)
- goto out_napi_del;
-
-- /* mdio bus init */
-- ret = sh_mdio_init(mdp, pd);
-- if (ret) {
-- dev_err(&ndev->dev, "failed to initialise MDIO\n");
-- goto out_unregister;
-- }
--
- /* print device information */
- netdev_info(ndev, "Base address at 0x%x, %pM, IRQ %d.\n",
- (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
-@@ -2927,11 +2927,9 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
-
- return ret;
-
--out_unregister:
-- unregister_netdev(ndev);
--
- out_napi_del:
- netif_napi_del(&mdp->napi);
-+ sh_mdio_release(mdp);
-
- out_release:
- /* net_dev free */
-@@ -2947,9 +2945,9 @@ static int sh_eth_drv_remove(struct platform_device *pdev)
- struct net_device *ndev = platform_get_drvdata(pdev);
- struct sh_eth_private *mdp = netdev_priv(ndev);
-
-- sh_mdio_release(mdp);
- unregister_netdev(ndev);
- netif_napi_del(&mdp->napi);
-+ sh_mdio_release(mdp);
- pm_runtime_disable(&pdev->dev);
- free_netdev(ndev);
-
---
-2.1.2
-
diff --git a/patches.renesas/0111-sh_eth-Remove-goto-statements-that-jump-straight-to-.patch b/patches.renesas/0111-sh_eth-Remove-goto-statements-that-jump-straight-to-.patch
deleted file mode 100644
index 9653c062505f1..0000000000000
--- a/patches.renesas/0111-sh_eth-Remove-goto-statements-that-jump-straight-to-.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 42661cefc91b7c4bd8591a4b7810fb6c8de7cc57 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 20 Mar 2014 15:00:35 +0100
-Subject: sh_eth: Remove goto statements that jump straight to a return
-
-"goto" is well accepted for error paths in the kernel but should not be
-used unnecessarily. Return the correct value directly instead of using a
-goto when possible.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit f738a13d8365b0f824f3f20450b413f55374f175)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 30 +++++++++---------------------
- 1 file changed, 9 insertions(+), 21 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 5fc66a52c471..1043bbb30061 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -887,7 +887,7 @@ static int sh_eth_reset(struct net_device *ndev)
-
- ret = sh_eth_check_reset(ndev);
- if (ret)
-- goto out;
-+ return ret;
-
- /* Table Init */
- sh_eth_write(ndev, 0x0, TDLAR);
-@@ -914,7 +914,6 @@ static int sh_eth_reset(struct net_device *ndev)
- EDMR);
- }
-
--out:
- return ret;
- }
-
-@@ -1278,7 +1277,7 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start)
- /* Soft Reset */
- ret = sh_eth_reset(ndev);
- if (ret)
-- goto out;
-+ return ret;
-
- if (mdp->cd->rmiimode)
- sh_eth_write(ndev, 0x1, RMIIMODE);
-@@ -1357,7 +1356,6 @@ static int sh_eth_dev_init(struct net_device *ndev, bool start)
- netif_start_queue(ndev);
- }
-
--out:
- return ret;
- }
-
-@@ -2619,10 +2617,8 @@ static int sh_mdio_init(struct sh_eth_private *mdp,
-
- /* create bit control struct for PHY */
- bitbang = devm_kzalloc(dev, sizeof(struct bb_info), GFP_KERNEL);
-- if (!bitbang) {
-- ret = -ENOMEM;
-- goto out;
-- }
-+ if (!bitbang)
-+ return -ENOMEM;
-
- /* bitbang init */
- bitbang->addr = mdp->addr + mdp->reg_offset[PIR];
-@@ -2635,10 +2631,8 @@ static int sh_mdio_init(struct sh_eth_private *mdp,
-
- /* MII controller setting */
- mdp->mii_bus = alloc_mdio_bitbang(&bitbang->ctrl);
-- if (!mdp->mii_bus) {
-- ret = -ENOMEM;
-- goto out;
-- }
-+ if (!mdp->mii_bus)
-+ return -ENOMEM;
-
- /* Hook up MII support for ethtool */
- mdp->mii_bus->name = "sh_mii";
-@@ -2673,8 +2667,6 @@ static int sh_mdio_init(struct sh_eth_private *mdp,
-
- out_free_bus:
- free_mdio_bitbang(mdp->mii_bus);
--
--out:
- return ret;
- }
-
-@@ -2787,15 +2779,12 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- if (unlikely(res == NULL)) {
- dev_err(&pdev->dev, "invalid resource\n");
-- ret = -EINVAL;
-- goto out;
-+ return -EINVAL;
- }
-
- ndev = alloc_etherdev(sizeof(struct sh_eth_private));
-- if (!ndev) {
-- ret = -ENOMEM;
-- goto out;
-- }
-+ if (!ndev)
-+ return -ENOMEM;
-
- /* The sh Ether-specific entries in the device structure. */
- ndev->base_addr = res->start;
-@@ -2936,7 +2925,6 @@ out_release:
- if (ndev)
- free_netdev(ndev);
-
--out:
- return ret;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0112-sh_eth-ensure-pm_runtime-cannot-suspend-the-device-d.patch b/patches.renesas/0112-sh_eth-ensure-pm_runtime-cannot-suspend-the-device-d.patch
deleted file mode 100644
index 4dc9616107301..0000000000000
--- a/patches.renesas/0112-sh_eth-ensure-pm_runtime-cannot-suspend-the-device-d.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From f137510aa8ae4e0e87c34f20ec29fae6fda13406 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Fri, 21 Mar 2014 12:09:14 +0100
-Subject: sh_eth: ensure pm_runtime cannot suspend the device during init
-
-The pm_rumtime work queue is causing the device to be suspended during
-initialisation, thus the initialisation may not be able to access registers
-properly. As the code is called from a work queue, it is possible that this
-is not seen from certain configurations/builds due to the asynchronos
-nature of the code.
-
-Another issue has also been found where the network device registration
-calls back into the driver thus causing further pm_runtime calls that
-also caused issues with the MDIO bus code. This has now been checked
-and is the only place the MDIO can be called without the device open.
-
-Use pm_runtime_get_sync() and pm_runtime_put() to ensure that the
-pm system does not suspend it during the probe() call and remove the
-now unnecessary pm_runtime_resume() call. Also add a call in the error
-path to call pm_runtime_disable().
-
-This fixes the external abort that can cause /sbin/init or other such
-init processed to die.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit b5893a08812602de164fa5ac6494f84df8d09a4f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 1043bbb30061..08ed9a30c3a7 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2786,6 +2786,9 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- if (!ndev)
- return -ENOMEM;
-
-+ pm_runtime_enable(&pdev->dev);
-+ pm_runtime_get_sync(&pdev->dev);
-+
- /* The sh Ether-specific entries in the device structure. */
- ndev->base_addr = res->start;
- devno = pdev->id;
-@@ -2813,8 +2816,6 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
-
- spin_lock_init(&mdp->lock);
- mdp->pdev = pdev;
-- pm_runtime_enable(&pdev->dev);
-- pm_runtime_resume(&pdev->dev);
-
- if (pdev->dev.of_node)
- pd = sh_eth_parse_dt(&pdev->dev);
-@@ -2912,6 +2913,7 @@ static int sh_eth_drv_probe(struct platform_device *pdev)
- netdev_info(ndev, "Base address at 0x%x, %pM, IRQ %d.\n",
- (u32)ndev->base_addr, ndev->dev_addr, ndev->irq);
-
-+ pm_runtime_put(&pdev->dev);
- platform_set_drvdata(pdev, ndev);
-
- return ret;
-@@ -2925,6 +2927,8 @@ out_release:
- if (ndev)
- free_netdev(ndev);
-
-+ pm_runtime_put(&pdev->dev);
-+ pm_runtime_disable(&pdev->dev);
- return ret;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0113-mmc-sh_mobile_sdhi-Use-modern-PM-macros-to-define-pm.patch b/patches.renesas/0113-mmc-sh_mobile_sdhi-Use-modern-PM-macros-to-define-pm.patch
deleted file mode 100644
index cd8e33b03896a..0000000000000
--- a/patches.renesas/0113-mmc-sh_mobile_sdhi-Use-modern-PM-macros-to-define-pm.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From fc928a0db3812c3d823c5aa3356110797237efc0 Mon Sep 17 00:00:00 2001
-From: Ulf Hansson <ulf.hansson@linaro.org>
-Date: Wed, 23 Oct 2013 14:51:31 +0200
-Subject: mmc: sh_mobile_sdhi: Use modern PM macros to define pm callbacks
-
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 4e262d7f6fd43d798175cf26223c5bd3ebfd7b13)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mobile_sdhi.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
-index 2d6ce257a273..03fe7518bba4 100644
---- a/drivers/mmc/host/sh_mobile_sdhi.c
-+++ b/drivers/mmc/host/sh_mobile_sdhi.c
-@@ -316,10 +316,10 @@ static int sh_mobile_sdhi_remove(struct platform_device *pdev)
- }
-
- static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
-- .suspend = tmio_mmc_host_suspend,
-- .resume = tmio_mmc_host_resume,
-- .runtime_suspend = tmio_mmc_host_runtime_suspend,
-- .runtime_resume = tmio_mmc_host_runtime_resume,
-+ SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_host_suspend, tmio_mmc_host_resume)
-+ SET_RUNTIME_PM_OPS(tmio_mmc_host_runtime_suspend,
-+ tmio_mmc_host_runtime_resume,
-+ NULL)
- };
-
- static struct platform_driver sh_mobile_sdhi_driver = {
---
-2.1.2
-
diff --git a/patches.renesas/0114-mmc-tmio_mmc-Convert-from-legacy-to-modern-PM-ops.patch b/patches.renesas/0114-mmc-tmio_mmc-Convert-from-legacy-to-modern-PM-ops.patch
deleted file mode 100644
index 25c30e662c301..0000000000000
--- a/patches.renesas/0114-mmc-tmio_mmc-Convert-from-legacy-to-modern-PM-ops.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From b940887b0d91df677ace9b35e3cafeee9b0c4ff9 Mon Sep 17 00:00:00 2001
-From: Ulf Hansson <ulf.hansson@linaro.org>
-Date: Wed, 23 Oct 2013 14:57:50 +0200
-Subject: mmc: tmio_mmc: Convert from legacy to modern PM ops
-
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit c8964481d0273ef77a37ed2c627482fde3a1222c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/tmio_mmc.c | 30 ++++++++++++++++--------------
- 1 file changed, 16 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/mmc/host/tmio_mmc.c b/drivers/mmc/host/tmio_mmc.c
-index 1900abb04236..cfad844730d8 100644
---- a/drivers/mmc/host/tmio_mmc.c
-+++ b/drivers/mmc/host/tmio_mmc.c
-@@ -23,38 +23,37 @@
-
- #include "tmio_mmc.h"
-
--#ifdef CONFIG_PM
--static int tmio_mmc_suspend(struct platform_device *dev, pm_message_t state)
-+#ifdef CONFIG_PM_SLEEP
-+static int tmio_mmc_suspend(struct device *dev)
- {
-- const struct mfd_cell *cell = mfd_get_cell(dev);
-+ struct platform_device *pdev = to_platform_device(dev);
-+ const struct mfd_cell *cell = mfd_get_cell(pdev);
- int ret;
-
-- ret = tmio_mmc_host_suspend(&dev->dev);
-+ ret = tmio_mmc_host_suspend(dev);
-
- /* Tell MFD core it can disable us now.*/
- if (!ret && cell->disable)
-- cell->disable(dev);
-+ cell->disable(pdev);
-
- return ret;
- }
-
--static int tmio_mmc_resume(struct platform_device *dev)
-+static int tmio_mmc_resume(struct device *dev)
- {
-- const struct mfd_cell *cell = mfd_get_cell(dev);
-+ struct platform_device *pdev = to_platform_device(dev);
-+ const struct mfd_cell *cell = mfd_get_cell(pdev);
- int ret = 0;
-
- /* Tell the MFD core we are ready to be enabled */
- if (cell->resume)
-- ret = cell->resume(dev);
-+ ret = cell->resume(pdev);
-
- if (!ret)
-- ret = tmio_mmc_host_resume(&dev->dev);
-+ ret = tmio_mmc_host_resume(dev);
-
- return ret;
- }
--#else
--#define tmio_mmc_suspend NULL
--#define tmio_mmc_resume NULL
- #endif
-
- static int tmio_mmc_probe(struct platform_device *pdev)
-@@ -134,15 +133,18 @@ static int tmio_mmc_remove(struct platform_device *pdev)
-
- /* ------------------- device registration ----------------------- */
-
-+static const struct dev_pm_ops tmio_mmc_dev_pm_ops = {
-+ SET_SYSTEM_SLEEP_PM_OPS(tmio_mmc_suspend, tmio_mmc_resume)
-+};
-+
- static struct platform_driver tmio_mmc_driver = {
- .driver = {
- .name = "tmio-mmc",
- .owner = THIS_MODULE,
-+ .pm = &tmio_mmc_dev_pm_ops,
- },
- .probe = tmio_mmc_probe,
- .remove = tmio_mmc_remove,
-- .suspend = tmio_mmc_suspend,
-- .resume = tmio_mmc_resume,
- };
-
- module_platform_driver(tmio_mmc_driver);
---
-2.1.2
-
diff --git a/patches.renesas/0115-mmc-tmio-Adapt-to-proper-PM-configs-for-exported-fun.patch b/patches.renesas/0115-mmc-tmio-Adapt-to-proper-PM-configs-for-exported-fun.patch
deleted file mode 100644
index f7678845553fc..0000000000000
--- a/patches.renesas/0115-mmc-tmio-Adapt-to-proper-PM-configs-for-exported-fun.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From b79a8672b7083151d151ed2ecd0c1b139f4a6882 Mon Sep 17 00:00:00 2001
-From: Ulf Hansson <ulf.hansson@linaro.org>
-Date: Wed, 23 Oct 2013 14:55:07 +0200
-Subject: mmc: tmio: Adapt to proper PM configs for exported functions
-
-Since the users of the exported PM functions are now using the modern
-PM ops macros, we can convert to the proper corresponding PM configs.
-
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 710dec95d579bf59c157358cc9cf7b42907d1c0f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/tmio_mmc.h | 7 +++----
- drivers/mmc/host/tmio_mmc_pio.c | 7 ++++---
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/mmc/host/tmio_mmc.h b/drivers/mmc/host/tmio_mmc.h
-index aaa9c7e9e730..100ffe0b2faf 100644
---- a/drivers/mmc/host/tmio_mmc.h
-+++ b/drivers/mmc/host/tmio_mmc.h
-@@ -162,16 +162,15 @@ static inline void tmio_mmc_abort_dma(struct tmio_mmc_host *host)
- }
- #endif
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- int tmio_mmc_host_suspend(struct device *dev);
- int tmio_mmc_host_resume(struct device *dev);
--#else
--#define tmio_mmc_host_suspend NULL
--#define tmio_mmc_host_resume NULL
- #endif
-
-+#ifdef CONFIG_PM_RUNTIME
- int tmio_mmc_host_runtime_suspend(struct device *dev);
- int tmio_mmc_host_runtime_resume(struct device *dev);
-+#endif
-
- static inline u16 sd_ctrl_read16(struct tmio_mmc_host *host, int addr)
- {
-diff --git a/drivers/mmc/host/tmio_mmc_pio.c b/drivers/mmc/host/tmio_mmc_pio.c
-index 8d8abf23a611..faf0924e71cb 100644
---- a/drivers/mmc/host/tmio_mmc_pio.c
-+++ b/drivers/mmc/host/tmio_mmc_pio.c
-@@ -1142,7 +1142,7 @@ void tmio_mmc_host_remove(struct tmio_mmc_host *host)
- }
- EXPORT_SYMBOL(tmio_mmc_host_remove);
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- int tmio_mmc_host_suspend(struct device *dev)
- {
- struct mmc_host *mmc = dev_get_drvdata(dev);
-@@ -1165,9 +1165,9 @@ int tmio_mmc_host_resume(struct device *dev)
- return 0;
- }
- EXPORT_SYMBOL(tmio_mmc_host_resume);
-+#endif
-
--#endif /* CONFIG_PM */
--
-+#ifdef CONFIG_PM_RUNTIME
- int tmio_mmc_host_runtime_suspend(struct device *dev)
- {
- return 0;
-@@ -1184,5 +1184,6 @@ int tmio_mmc_host_runtime_resume(struct device *dev)
- return 0;
- }
- EXPORT_SYMBOL(tmio_mmc_host_runtime_resume);
-+#endif
-
- MODULE_LICENSE("GPL v2");
---
-2.1.2
-
diff --git a/patches.renesas/0116-mmc-sdhi-tidyup-sh_mobile_sdhi_of_match-position.patch b/patches.renesas/0116-mmc-sdhi-tidyup-sh_mobile_sdhi_of_match-position.patch
deleted file mode 100644
index ff2f42f66898a..0000000000000
--- a/patches.renesas/0116-mmc-sdhi-tidyup-sh_mobile_sdhi_of_match-position.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 8f550fbf0ea0e211a844a90f025b70039b05d9a2 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 20 Feb 2014 16:54:44 -0800
-Subject: mmc: sdhi: tidyup sh_mobile_sdhi_of_match position
-
-It is easier to read if sh_mobile_sdhi_of_cfg and
-sh_mobile_sdhi_of_match are closer.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 2772ef30eacd72fef013ac2fade2f384342ba6c7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mobile_sdhi.c | 26 +++++++++++++-------------
- 1 file changed, 13 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
-index 03fe7518bba4..a7a3f689a309 100644
---- a/drivers/mmc/host/sh_mobile_sdhi.c
-+++ b/drivers/mmc/host/sh_mobile_sdhi.c
-@@ -45,6 +45,19 @@ static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
- },
- };
-
-+static const struct of_device_id sh_mobile_sdhi_of_match[] = {
-+ { .compatible = "renesas,sdhi-shmobile" },
-+ { .compatible = "renesas,sdhi-sh7372" },
-+ { .compatible = "renesas,sdhi-sh73a0", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7778", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ {},
-+};
-+MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match);
-+
- struct sh_mobile_sdhi {
- struct clk *clk;
- struct tmio_mmc_data mmc_data;
-@@ -114,19 +127,6 @@ static const struct sh_mobile_sdhi_ops sdhi_ops = {
- .cd_wakeup = sh_mobile_sdhi_cd_wakeup,
- };
-
--static const struct of_device_id sh_mobile_sdhi_of_match[] = {
-- { .compatible = "renesas,sdhi-shmobile" },
-- { .compatible = "renesas,sdhi-sh7372" },
-- { .compatible = "renesas,sdhi-sh73a0", .data = &sh_mobile_sdhi_of_cfg[0], },
-- { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], },
-- { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
-- { .compatible = "renesas,sdhi-r8a7778", .data = &sh_mobile_sdhi_of_cfg[0], },
-- { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], },
-- { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
-- {},
--};
--MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match);
--
- static int sh_mobile_sdhi_probe(struct platform_device *pdev)
- {
- const struct of_device_id *of_id =
---
-2.1.2
-
diff --git a/patches.renesas/0117-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7778.patch b/patches.renesas/0117-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7778.patch
deleted file mode 100644
index f0d50bbb3b3ed..0000000000000
--- a/patches.renesas/0117-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7778.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From f560e57a6898b9d118eab107c5888d7fc13c7757 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 20 Feb 2014 16:54:58 -0800
-Subject: mmc: sdhi: update sh_mobile_sdhi_of_data for r8a7778
-
-This patch updates r8a7778 DT data to have SoC specific settings.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit b3a5d4ce65162d27a495b8fa3ac21dcdf58738b1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mobile_sdhi.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
-index a7a3f689a309..e956bc4e28c1 100644
---- a/drivers/mmc/host/sh_mobile_sdhi.c
-+++ b/drivers/mmc/host/sh_mobile_sdhi.c
-@@ -37,6 +37,7 @@
-
- struct sh_mobile_sdhi_of_data {
- unsigned long tmio_flags;
-+ unsigned long capabilities;
- };
-
- static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
-@@ -45,13 +46,18 @@ static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
- },
- };
-
-+static const struct sh_mobile_sdhi_of_data of_rcar_gen1_compatible = {
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
-+ .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
-+};
-+
- static const struct of_device_id sh_mobile_sdhi_of_match[] = {
- { .compatible = "renesas,sdhi-shmobile" },
- { .compatible = "renesas,sdhi-sh7372" },
- { .compatible = "renesas,sdhi-sh73a0", .data = &sh_mobile_sdhi_of_cfg[0], },
- { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], },
- { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
-- { .compatible = "renesas,sdhi-r8a7778", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, },
- { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], },
- { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
- {},
-@@ -212,6 +218,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
- if (of_id && of_id->data) {
- const struct sh_mobile_sdhi_of_data *of_data = of_id->data;
- mmc_data->flags |= of_data->tmio_flags;
-+ mmc_data->capabilities |= of_data->capabilities;
- }
-
- /* SD control register space size is 0x100, 0x200 for bus_shift=1 */
---
-2.1.2
-
diff --git a/patches.renesas/0118-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7779.patch b/patches.renesas/0118-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7779.patch
deleted file mode 100644
index ec1e3e3bc1b6d..0000000000000
--- a/patches.renesas/0118-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7779.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From c36760186a19d0a69a3b410fbea522ae0533daa2 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 20 Feb 2014 16:55:12 -0800
-Subject: mmc: sdhi: update sh_mobile_sdhi_of_data for r8a7779
-
-This patch updates r8a7779 DT data to have SoC specific settings.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 81bbbc7278fa109fb691446a521dcfc18b87e57d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mobile_sdhi.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
-index e956bc4e28c1..38acf2665bdf 100644
---- a/drivers/mmc/host/sh_mobile_sdhi.c
-+++ b/drivers/mmc/host/sh_mobile_sdhi.c
-@@ -58,7 +58,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = {
- { .compatible = "renesas,sdhi-r8a73a4", .data = &sh_mobile_sdhi_of_cfg[0], },
- { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
- { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, },
-- { .compatible = "renesas,sdhi-r8a7779", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7779", .data = &of_rcar_gen1_compatible, },
- { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
- {},
- };
---
-2.1.2
-
diff --git a/patches.renesas/0119-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7790.patch b/patches.renesas/0119-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7790.patch
deleted file mode 100644
index 29c165dc4b5ee..0000000000000
--- a/patches.renesas/0119-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7790.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From f853726927961824e3e637944d17e426db5e8215 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 20 Feb 2014 16:55:27 -0800
-Subject: mmc: sdhi: update sh_mobile_sdhi_of_data for r8a7790
-
-This patch updates r8a7790 DT data to have SoC specific settings.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 423f6c2e977de73b8723e73d8cc585de40893f5b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mobile_sdhi.c | 10 +++++++++-
- 1 file changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
-index 38acf2665bdf..cfc37ec26458 100644
---- a/drivers/mmc/host/sh_mobile_sdhi.c
-+++ b/drivers/mmc/host/sh_mobile_sdhi.c
-@@ -38,6 +38,7 @@
- struct sh_mobile_sdhi_of_data {
- unsigned long tmio_flags;
- unsigned long capabilities;
-+ unsigned long capabilities2;
- };
-
- static const struct sh_mobile_sdhi_of_data sh_mobile_sdhi_of_cfg[] = {
-@@ -51,6 +52,12 @@ static const struct sh_mobile_sdhi_of_data of_rcar_gen1_compatible = {
- .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
- };
-
-+static const struct sh_mobile_sdhi_of_data of_rcar_gen2_compatible = {
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT | TMIO_MMC_WRPROTECT_DISABLE,
-+ .capabilities = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ,
-+ .capabilities2 = MMC_CAP2_NO_MULTI_READ,
-+};
-+
- static const struct of_device_id sh_mobile_sdhi_of_match[] = {
- { .compatible = "renesas,sdhi-shmobile" },
- { .compatible = "renesas,sdhi-sh7372" },
-@@ -59,7 +66,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = {
- { .compatible = "renesas,sdhi-r8a7740", .data = &sh_mobile_sdhi_of_cfg[0], },
- { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, },
- { .compatible = "renesas,sdhi-r8a7779", .data = &of_rcar_gen1_compatible, },
-- { .compatible = "renesas,sdhi-r8a7790", .data = &sh_mobile_sdhi_of_cfg[0], },
-+ { .compatible = "renesas,sdhi-r8a7790", .data = &of_rcar_gen2_compatible, },
- {},
- };
- MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match);
-@@ -219,6 +226,7 @@ static int sh_mobile_sdhi_probe(struct platform_device *pdev)
- const struct sh_mobile_sdhi_of_data *of_data = of_id->data;
- mmc_data->flags |= of_data->tmio_flags;
- mmc_data->capabilities |= of_data->capabilities;
-+ mmc_data->capabilities2 |= of_data->capabilities2;
- }
-
- /* SD control register space size is 0x100, 0x200 for bus_shift=1 */
---
-2.1.2
-
diff --git a/patches.renesas/0120-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7791.patch b/patches.renesas/0120-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7791.patch
deleted file mode 100644
index 9bd3b8a277a8c..0000000000000
--- a/patches.renesas/0120-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7791.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6852ba30f9916efa2c5455fc2b94bb7a798fd1a0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 20 Feb 2014 16:55:40 -0800
-Subject: mmc: sdhi: update sh_mobile_sdhi_of_data for r8a7791
-
-This patch adds DT support for r8a7791.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 81918d25a7ae2a7eada4237d00b8d6dbecffda6c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mobile_sdhi.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/mmc/host/sh_mobile_sdhi.c b/drivers/mmc/host/sh_mobile_sdhi.c
-index cfc37ec26458..91058dabd11a 100644
---- a/drivers/mmc/host/sh_mobile_sdhi.c
-+++ b/drivers/mmc/host/sh_mobile_sdhi.c
-@@ -67,6 +67,7 @@ static const struct of_device_id sh_mobile_sdhi_of_match[] = {
- { .compatible = "renesas,sdhi-r8a7778", .data = &of_rcar_gen1_compatible, },
- { .compatible = "renesas,sdhi-r8a7779", .data = &of_rcar_gen1_compatible, },
- { .compatible = "renesas,sdhi-r8a7790", .data = &of_rcar_gen2_compatible, },
-+ { .compatible = "renesas,sdhi-r8a7791", .data = &of_rcar_gen2_compatible, },
- {},
- };
- MODULE_DEVICE_TABLE(of, sh_mobile_sdhi_of_match);
---
-2.1.2
-
diff --git a/patches.renesas/0121-pinctrl-sh-pfc-r8a7791-Add-QSPI-pin-groups.patch b/patches.renesas/0121-pinctrl-sh-pfc-r8a7791-Add-QSPI-pin-groups.patch
deleted file mode 100644
index c87146b042450..0000000000000
--- a/patches.renesas/0121-pinctrl-sh-pfc-r8a7791-Add-QSPI-pin-groups.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From cb1ae576dc286794f773ec63f41c95c9d8a6c73a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Sun, 12 Jan 2014 12:00:30 +0100
-Subject: pinctrl: sh-pfc: r8a7791: Add QSPI pin groups
-
-A QSPI function set consists of 3 groups:
- - qspi_ctrl (2 control wires)
- - qspi_data2 (2 data wires, for Single/Dual SPI)
- - qspi_data4 (4 data wires, for Quad SPI)
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 2d0c386f135e41865f15e467fa1c6c0ec93d4a60)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 63 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 63 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 567d6918d50b..c515f01378f0 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -2137,6 +2137,53 @@ static const unsigned int msiof2_tx_pins[] = {
- static const unsigned int msiof2_tx_mux[] = {
- MSIOF2_TXD_MARK,
- };
-+/* - QSPI ------------------------------------------------------------------- */
-+static const unsigned int qspi_ctrl_pins[] = {
-+ /* SPCLK, SSL */
-+ RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 9),
-+};
-+static const unsigned int qspi_ctrl_mux[] = {
-+ SPCLK_MARK, SSL_MARK,
-+};
-+static const unsigned int qspi_data2_pins[] = {
-+ /* MOSI_IO0, MISO_IO1 */
-+ RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6),
-+};
-+static const unsigned int qspi_data2_mux[] = {
-+ MOSI_IO0_MARK, MISO_IO1_MARK,
-+};
-+static const unsigned int qspi_data4_pins[] = {
-+ /* MOSI_IO0, MISO_IO1, IO2, IO3 */
-+ RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
-+ RCAR_GP_PIN(1, 8),
-+};
-+static const unsigned int qspi_data4_mux[] = {
-+ MOSI_IO0_MARK, MISO_IO1_MARK, IO2_MARK, IO3_MARK,
-+};
-+
-+static const unsigned int qspi_ctrl_b_pins[] = {
-+ /* SPCLK, SSL */
-+ RCAR_GP_PIN(6, 0), RCAR_GP_PIN(6, 5),
-+};
-+static const unsigned int qspi_ctrl_b_mux[] = {
-+ SPCLK_B_MARK, SSL_B_MARK,
-+};
-+static const unsigned int qspi_data2_b_pins[] = {
-+ /* MOSI_IO0, MISO_IO1 */
-+ RCAR_GP_PIN(6, 1), RCAR_GP_PIN(6, 2),
-+};
-+static const unsigned int qspi_data2_b_mux[] = {
-+ MOSI_IO0_B_MARK, MISO_IO1_B_MARK,
-+};
-+static const unsigned int qspi_data4_b_pins[] = {
-+ /* MOSI_IO0, MISO_IO1, IO2, IO3 */
-+ RCAR_GP_PIN(6, 1), RCAR_GP_PIN(6, 2), RCAR_GP_PIN(6, 3),
-+ RCAR_GP_PIN(6, 4),
-+};
-+static const unsigned int qspi_data4_b_mux[] = {
-+ SPCLK_B_MARK, MOSI_IO0_B_MARK, MISO_IO1_B_MARK,
-+ IO2_B_MARK, IO3_B_MARK, SSL_B_MARK,
-+};
- /* - SCIF0 ------------------------------------------------------------------ */
- static const unsigned int scif0_data_pins[] = {
- /* RX, TX */
-@@ -3151,6 +3198,12 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(msiof2_ss2),
- SH_PFC_PIN_GROUP(msiof2_rx),
- SH_PFC_PIN_GROUP(msiof2_tx),
-+ SH_PFC_PIN_GROUP(qspi_ctrl),
-+ SH_PFC_PIN_GROUP(qspi_data2),
-+ SH_PFC_PIN_GROUP(qspi_data4),
-+ SH_PFC_PIN_GROUP(qspi_ctrl_b),
-+ SH_PFC_PIN_GROUP(qspi_data2_b),
-+ SH_PFC_PIN_GROUP(qspi_data4_b),
- SH_PFC_PIN_GROUP(scif0_data),
- SH_PFC_PIN_GROUP(scif0_data_b),
- SH_PFC_PIN_GROUP(scif0_data_c),
-@@ -3378,6 +3431,15 @@ static const char * const msiof2_groups[] = {
- "msiof2_tx",
- };
-
-+static const char * const qspi_groups[] = {
-+ "qspi_ctrl",
-+ "qspi_data2",
-+ "qspi_data4",
-+ "qspi_ctrl_b",
-+ "qspi_data2_b",
-+ "qspi_data4_b",
-+};
-+
- static const char * const scif0_groups[] = {
- "scif0_data",
- "scif0_data_b",
-@@ -3573,6 +3635,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(msiof0),
- SH_PFC_FUNCTION(msiof1),
- SH_PFC_FUNCTION(msiof2),
-+ SH_PFC_FUNCTION(qspi),
- SH_PFC_FUNCTION(scif0),
- SH_PFC_FUNCTION(scif1),
- SH_PFC_FUNCTION(scif2),
---
-2.1.2
-
diff --git a/patches.renesas/0122-pinctrl-sh-pfc-r8a7790-Break-out-USB0-OVC-VBUS.patch b/patches.renesas/0122-pinctrl-sh-pfc-r8a7790-Break-out-USB0-OVC-VBUS.patch
deleted file mode 100644
index 7e746a6aab987..0000000000000
--- a/patches.renesas/0122-pinctrl-sh-pfc-r8a7790-Break-out-USB0-OVC-VBUS.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 41402e148bb8fc61a9b22cbf980e1d86c8c027bb Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 30 Jan 2014 08:10:19 +0900
-Subject: pinctrl: sh-pfc: r8a7790: Break out USB0 OVC/VBUS
-
-Create a new group for the USB0 OVC/VBUS pin by itself. This
-allows us to monitor PWEN as GPIO on the Lager board.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 97e00faaf16a0642cac47937e26f437651a6b4a4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-index c381ae63c508..ee2ae05c23ad 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-@@ -3231,6 +3231,13 @@ static const unsigned int usb0_pins[] = {
- static const unsigned int usb0_mux[] = {
- USB0_PWEN_MARK, USB0_OVC_VBUS_MARK,
- };
-+static const unsigned int usb0_ovc_vbus_pins[] = {
-+ /* OVC/VBUS */
-+ RCAR_GP_PIN(5, 19),
-+};
-+static const unsigned int usb0_ovc_vbus_mux[] = {
-+ USB0_OVC_VBUS_MARK,
-+};
- /* - USB1 ------------------------------------------------------------------- */
- static const unsigned int usb1_pins[] = {
- /* PWEN, OVC */
-@@ -3789,6 +3796,7 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(tpu0_to2),
- SH_PFC_PIN_GROUP(tpu0_to3),
- SH_PFC_PIN_GROUP(usb0),
-+ SH_PFC_PIN_GROUP(usb0_ovc_vbus),
- SH_PFC_PIN_GROUP(usb1),
- SH_PFC_PIN_GROUP(usb2),
- VIN_DATA_PIN_GROUP(vin0_data, 24),
-@@ -4134,6 +4142,7 @@ static const char * const tpu0_groups[] = {
-
- static const char * const usb0_groups[] = {
- "usb0",
-+ "usb0_ovc_vbus",
- };
-
- static const char * const usb1_groups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0123-pinctrl-sh-pfc-r8a7790-Add-QSPI-pin-groups.patch b/patches.renesas/0123-pinctrl-sh-pfc-r8a7790-Add-QSPI-pin-groups.patch
deleted file mode 100644
index 204c41eadefa3..0000000000000
--- a/patches.renesas/0123-pinctrl-sh-pfc-r8a7790-Add-QSPI-pin-groups.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 52646ba303d8cd0650437c4fb99ed5fce4eabe01 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Mon, 10 Feb 2014 14:00:57 +0100
-Subject: pinctrl: sh-pfc: r8a7790: Add QSPI pin groups
-
-A QSPI function set consists of 3 groups:
- - qspi_ctrl (2 control wires)
- - qspi_data2 (2 data wires, for Single/Dual SPI)
- - qspi_data4 (4 data wires, for Quad SPI)
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 202909cdf117743bdbf8abc0f817950c8955c8cf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-index ee2ae05c23ad..2814440843df 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-@@ -2389,6 +2389,29 @@ static const unsigned int msiof3_tx_pins[] = {
- static const unsigned int msiof3_tx_mux[] = {
- MSIOF3_TXD_MARK,
- };
-+/* - QSPI ------------------------------------------------------------------- */
-+static const unsigned int qspi_ctrl_pins[] = {
-+ /* SPCLK, SSL */
-+ RCAR_GP_PIN(1, 4), RCAR_GP_PIN(1, 9),
-+};
-+static const unsigned int qspi_ctrl_mux[] = {
-+ SPCLK_MARK, SSL_MARK,
-+};
-+static const unsigned int qspi_data2_pins[] = {
-+ /* MOSI_IO0, MISO_IO1 */
-+ RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6),
-+};
-+static const unsigned int qspi_data2_mux[] = {
-+ MOSI_IO0_MARK, MISO_IO1_MARK,
-+};
-+static const unsigned int qspi_data4_pins[] = {
-+ /* MOSI_IO0, MISO_IO1, IO2, IO3 */
-+ RCAR_GP_PIN(1, 5), RCAR_GP_PIN(1, 6), RCAR_GP_PIN(1, 7),
-+ RCAR_GP_PIN(1, 8),
-+};
-+static const unsigned int qspi_data4_mux[] = {
-+ MOSI_IO0_MARK, MISO_IO1_MARK, IO2_MARK, IO3_MARK,
-+};
- /* - SCIF0 ------------------------------------------------------------------ */
- static const unsigned int scif0_data_pins[] = {
- /* RX, TX */
-@@ -3678,6 +3701,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(msiof3_ss2),
- SH_PFC_PIN_GROUP(msiof3_rx),
- SH_PFC_PIN_GROUP(msiof3_tx),
-+ SH_PFC_PIN_GROUP(qspi_ctrl),
-+ SH_PFC_PIN_GROUP(qspi_data2),
-+ SH_PFC_PIN_GROUP(qspi_data4),
- SH_PFC_PIN_GROUP(scif0_data),
- SH_PFC_PIN_GROUP(scif0_clk),
- SH_PFC_PIN_GROUP(scif0_ctrl),
-@@ -3978,6 +4004,12 @@ static const char * const msiof3_groups[] = {
- "msiof3_tx",
- };
-
-+static const char * const qspi_groups[] = {
-+ "qspi_ctrl",
-+ "qspi_data2",
-+ "qspi_data4",
-+};
-+
- static const char * const scif0_groups[] = {
- "scif0_data",
- "scif0_clk",
-@@ -4222,6 +4254,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(msiof1),
- SH_PFC_FUNCTION(msiof2),
- SH_PFC_FUNCTION(msiof3),
-+ SH_PFC_FUNCTION(qspi),
- SH_PFC_FUNCTION(scif0),
- SH_PFC_FUNCTION(scif1),
- SH_PFC_FUNCTION(scif2),
---
-2.1.2
-
diff --git a/patches.renesas/0124-pinctrl-pfc-r8a7791-add-mux-data-for-IIC-B-cores.patch b/patches.renesas/0124-pinctrl-pfc-r8a7791-add-mux-data-for-IIC-B-cores.patch
deleted file mode 100644
index 1e49b3219549b..0000000000000
--- a/patches.renesas/0124-pinctrl-pfc-r8a7791-add-mux-data-for-IIC-B-cores.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 6dfd8163aed88dfcf4e9750f17edd7ad45d29b13 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Sun, 23 Feb 2014 13:38:12 +0100
-Subject: pinctrl: pfc: r8a7791: add mux data for IIC(B) cores
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 6787141361dc77b5d55bf58760029f846244ba3a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 64 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 64 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index c515f01378f0..461e91096845 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -1945,6 +1945,50 @@ static const unsigned int i2c4_c_pins[] = {
- static const unsigned int i2c4_c_mux[] = {
- SCL4_C_MARK, SDA4_C_MARK,
- };
-+/* - I2C7 ------------------------------------------------------------------- */
-+static const unsigned int i2c7_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(5, 15), RCAR_GP_PIN(5, 16),
-+};
-+static const unsigned int i2c7_mux[] = {
-+ SCL7_MARK, SDA7_MARK,
-+};
-+static const unsigned int i2c7_b_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(2, 2), RCAR_GP_PIN(2, 3),
-+};
-+static const unsigned int i2c7_b_mux[] = {
-+ SCL7_B_MARK, SDA7_B_MARK,
-+};
-+static const unsigned int i2c7_c_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(6, 28), RCAR_GP_PIN(6, 29),
-+};
-+static const unsigned int i2c7_c_mux[] = {
-+ SCL7_C_MARK, SDA7_C_MARK,
-+};
-+/* - I2C8 ------------------------------------------------------------------- */
-+static const unsigned int i2c8_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(4, 13), RCAR_GP_PIN(4, 14),
-+};
-+static const unsigned int i2c8_mux[] = {
-+ SCL8_MARK, SDA8_MARK,
-+};
-+static const unsigned int i2c8_b_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(2, 4), RCAR_GP_PIN(2, 5),
-+};
-+static const unsigned int i2c8_b_mux[] = {
-+ SCL8_B_MARK, SDA8_B_MARK,
-+};
-+static const unsigned int i2c8_c_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(6, 22), RCAR_GP_PIN(6, 23),
-+};
-+static const unsigned int i2c8_c_mux[] = {
-+ SCL8_C_MARK, SDA8_C_MARK,
-+};
- /* - INTC ------------------------------------------------------------------- */
- static const unsigned int intc_irq0_pins[] = {
- /* IRQ */
-@@ -3172,6 +3216,12 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(i2c4),
- SH_PFC_PIN_GROUP(i2c4_b),
- SH_PFC_PIN_GROUP(i2c4_c),
-+ SH_PFC_PIN_GROUP(i2c7),
-+ SH_PFC_PIN_GROUP(i2c7_b),
-+ SH_PFC_PIN_GROUP(i2c7_c),
-+ SH_PFC_PIN_GROUP(i2c8),
-+ SH_PFC_PIN_GROUP(i2c8_b),
-+ SH_PFC_PIN_GROUP(i2c8_c),
- SH_PFC_PIN_GROUP(intc_irq0),
- SH_PFC_PIN_GROUP(intc_irq1),
- SH_PFC_PIN_GROUP(intc_irq2),
-@@ -3390,6 +3440,18 @@ static const char * const i2c4_groups[] = {
- "i2c4_c",
- };
-
-+static const char * const i2c7_groups[] = {
-+ "i2c7",
-+ "i2c7_b",
-+ "i2c7_c",
-+};
-+
-+static const char * const i2c8_groups[] = {
-+ "i2c8",
-+ "i2c8_b",
-+ "i2c8_c",
-+};
-+
- static const char * const intc_groups[] = {
- "intc_irq0",
- "intc_irq1",
-@@ -3630,6 +3692,8 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(i2c2),
- SH_PFC_FUNCTION(i2c3),
- SH_PFC_FUNCTION(i2c4),
-+ SH_PFC_FUNCTION(i2c7),
-+ SH_PFC_FUNCTION(i2c8),
- SH_PFC_FUNCTION(intc),
- SH_PFC_FUNCTION(mmc),
- SH_PFC_FUNCTION(msiof0),
---
-2.1.2
-
diff --git a/patches.renesas/0125-pinctrl-sh-pfc-r8a7790-Add-alternative-MSIOF-pin-gro.patch b/patches.renesas/0125-pinctrl-sh-pfc-r8a7790-Add-alternative-MSIOF-pin-gro.patch
deleted file mode 100644
index c4e00850a16da..0000000000000
--- a/patches.renesas/0125-pinctrl-sh-pfc-r8a7790-Add-alternative-MSIOF-pin-gro.patch
+++ /dev/null
@@ -1,212 +0,0 @@
-From 2abe801bdba56180853d170ac6193f0f6399cbea Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 20:53:40 +0100
-Subject: pinctrl: sh-pfc: r8a7790: Add alternative MSIOF pin groups
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 7033168da51e43ebba7870f089d275b4589df0c5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 129 +++++++++++++++++++++++++++++++++++
- 1 file changed, 129 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-index 2814440843df..48093719167a 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-@@ -2260,6 +2260,42 @@ static const unsigned int msiof0_tx_pins[] = {
- static const unsigned int msiof0_tx_mux[] = {
- MSIOF0_TXD_MARK,
- };
-+
-+static const unsigned int msiof0_clk_b_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(1, 23),
-+};
-+static const unsigned int msiof0_clk_b_mux[] = {
-+ MSIOF0_SCK_B_MARK,
-+};
-+static const unsigned int msiof0_ss1_b_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(1, 12),
-+};
-+static const unsigned int msiof0_ss1_b_mux[] = {
-+ MSIOF0_SS1_B_MARK,
-+};
-+static const unsigned int msiof0_ss2_b_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(1, 10),
-+};
-+static const unsigned int msiof0_ss2_b_mux[] = {
-+ MSIOF0_SS2_B_MARK,
-+};
-+static const unsigned int msiof0_rx_b_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(1, 29),
-+};
-+static const unsigned int msiof0_rx_b_mux[] = {
-+ MSIOF0_RXD_B_MARK,
-+};
-+static const unsigned int msiof0_tx_b_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(1, 28),
-+};
-+static const unsigned int msiof0_tx_b_mux[] = {
-+ MSIOF0_TXD_B_MARK,
-+};
- /* - MSIOF1 ----------------------------------------------------------------- */
- static const unsigned int msiof1_clk_pins[] = {
- /* SCK */
-@@ -2303,6 +2339,42 @@ static const unsigned int msiof1_tx_pins[] = {
- static const unsigned int msiof1_tx_mux[] = {
- MSIOF1_TXD_MARK,
- };
-+
-+static const unsigned int msiof1_clk_b_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(1, 16),
-+};
-+static const unsigned int msiof1_clk_b_mux[] = {
-+ MSIOF1_SCK_B_MARK,
-+};
-+static const unsigned int msiof1_ss1_b_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(0, 18),
-+};
-+static const unsigned int msiof1_ss1_b_mux[] = {
-+ MSIOF1_SS1_B_MARK,
-+};
-+static const unsigned int msiof1_ss2_b_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(0, 19),
-+};
-+static const unsigned int msiof1_ss2_b_mux[] = {
-+ MSIOF1_SS2_B_MARK,
-+};
-+static const unsigned int msiof1_rx_b_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(1, 17),
-+};
-+static const unsigned int msiof1_rx_b_mux[] = {
-+ MSIOF1_RXD_B_MARK,
-+};
-+static const unsigned int msiof1_tx_b_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(0, 20),
-+};
-+static const unsigned int msiof1_tx_b_mux[] = {
-+ MSIOF1_TXD_B_MARK,
-+};
- /* - MSIOF2 ----------------------------------------------------------------- */
- static const unsigned int msiof2_clk_pins[] = {
- /* SCK */
-@@ -2389,6 +2461,35 @@ static const unsigned int msiof3_tx_pins[] = {
- static const unsigned int msiof3_tx_mux[] = {
- MSIOF3_TXD_MARK,
- };
-+
-+static const unsigned int msiof3_clk_b_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(0, 0),
-+};
-+static const unsigned int msiof3_clk_b_mux[] = {
-+ MSIOF3_SCK_B_MARK,
-+};
-+static const unsigned int msiof3_sync_b_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(0, 1),
-+};
-+static const unsigned int msiof3_sync_b_mux[] = {
-+ MSIOF3_SYNC_B_MARK,
-+};
-+static const unsigned int msiof3_rx_b_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(0, 2),
-+};
-+static const unsigned int msiof3_rx_b_mux[] = {
-+ MSIOF3_RXD_B_MARK,
-+};
-+static const unsigned int msiof3_tx_b_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(0, 3),
-+};
-+static const unsigned int msiof3_tx_b_mux[] = {
-+ MSIOF3_TXD_B_MARK,
-+};
- /* - QSPI ------------------------------------------------------------------- */
- static const unsigned int qspi_ctrl_pins[] = {
- /* SPCLK, SSL */
-@@ -3683,12 +3784,22 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(msiof0_ss2),
- SH_PFC_PIN_GROUP(msiof0_rx),
- SH_PFC_PIN_GROUP(msiof0_tx),
-+ SH_PFC_PIN_GROUP(msiof0_clk_b),
-+ SH_PFC_PIN_GROUP(msiof0_ss1_b),
-+ SH_PFC_PIN_GROUP(msiof0_ss2_b),
-+ SH_PFC_PIN_GROUP(msiof0_rx_b),
-+ SH_PFC_PIN_GROUP(msiof0_tx_b),
- SH_PFC_PIN_GROUP(msiof1_clk),
- SH_PFC_PIN_GROUP(msiof1_sync),
- SH_PFC_PIN_GROUP(msiof1_ss1),
- SH_PFC_PIN_GROUP(msiof1_ss2),
- SH_PFC_PIN_GROUP(msiof1_rx),
- SH_PFC_PIN_GROUP(msiof1_tx),
-+ SH_PFC_PIN_GROUP(msiof1_clk_b),
-+ SH_PFC_PIN_GROUP(msiof1_ss1_b),
-+ SH_PFC_PIN_GROUP(msiof1_ss2_b),
-+ SH_PFC_PIN_GROUP(msiof1_rx_b),
-+ SH_PFC_PIN_GROUP(msiof1_tx_b),
- SH_PFC_PIN_GROUP(msiof2_clk),
- SH_PFC_PIN_GROUP(msiof2_sync),
- SH_PFC_PIN_GROUP(msiof2_ss1),
-@@ -3701,6 +3812,10 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(msiof3_ss2),
- SH_PFC_PIN_GROUP(msiof3_rx),
- SH_PFC_PIN_GROUP(msiof3_tx),
-+ SH_PFC_PIN_GROUP(msiof3_clk_b),
-+ SH_PFC_PIN_GROUP(msiof3_sync_b),
-+ SH_PFC_PIN_GROUP(msiof3_rx_b),
-+ SH_PFC_PIN_GROUP(msiof3_tx_b),
- SH_PFC_PIN_GROUP(qspi_ctrl),
- SH_PFC_PIN_GROUP(qspi_data2),
- SH_PFC_PIN_GROUP(qspi_data4),
-@@ -3975,6 +4090,11 @@ static const char * const msiof0_groups[] = {
- "msiof0_ss2",
- "msiof0_rx",
- "msiof0_tx",
-+ "msiof0_clk_b",
-+ "msiof0_ss1_b",
-+ "msiof0_ss2_b",
-+ "msiof0_rx_b",
-+ "msiof0_tx_b",
- };
-
- static const char * const msiof1_groups[] = {
-@@ -3984,6 +4104,11 @@ static const char * const msiof1_groups[] = {
- "msiof1_ss2",
- "msiof1_rx",
- "msiof1_tx",
-+ "msiof1_clk_b",
-+ "msiof1_ss1_b",
-+ "msiof1_ss2_b",
-+ "msiof1_rx_b",
-+ "msiof1_tx_b",
- };
-
- static const char * const msiof2_groups[] = {
-@@ -4002,6 +4127,10 @@ static const char * const msiof3_groups[] = {
- "msiof3_ss2",
- "msiof3_rx",
- "msiof3_tx",
-+ "msiof3_clk_b",
-+ "msiof3_sync_b",
-+ "msiof3_rx_b",
-+ "msiof3_tx_b",
- };
-
- static const char * const qspi_groups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0126-pinctrl-sh-pfc-r8a7791-Add-alternative-MSIOF-pin-gro.patch b/patches.renesas/0126-pinctrl-sh-pfc-r8a7791-Add-alternative-MSIOF-pin-gro.patch
deleted file mode 100644
index d92132581d035..0000000000000
--- a/patches.renesas/0126-pinctrl-sh-pfc-r8a7791-Add-alternative-MSIOF-pin-gro.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From 4252f641c9c171a53ec82511ce341eb54e17ddd4 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Wed, 26 Feb 2014 10:16:57 +0100
-Subject: pinctrl: sh-pfc: r8a7791: Add alternative MSIOF pin groups
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit e6fae2d03dc4f9172db88ad18a577c2a45b9e8ac)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 469 +++++++++++++++++++++++++++++++++++
- 1 file changed, 469 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 461e91096845..5186d70c49d4 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -2095,6 +2095,92 @@ static const unsigned int msiof0_tx_pins[] = {
- static const unsigned int msiof0_tx_mux[] = {
- MSIOF0_TXD_MARK,
- };
-+
-+static const unsigned int msiof0_clk_b_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(0, 16),
-+};
-+static const unsigned int msiof0_clk_b_mux[] = {
-+ MSIOF0_SCK_B_MARK,
-+};
-+static const unsigned int msiof0_sync_b_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(0, 17),
-+};
-+static const unsigned int msiof0_sync_b_mux[] = {
-+ MSIOF0_SYNC_B_MARK,
-+};
-+static const unsigned int msiof0_ss1_b_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(0, 18),
-+};
-+static const unsigned int msiof0_ss1_b_mux[] = {
-+ MSIOF0_SS1_B_MARK,
-+};
-+static const unsigned int msiof0_ss2_b_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(0, 19),
-+};
-+static const unsigned int msiof0_ss2_b_mux[] = {
-+ MSIOF0_SS2_B_MARK,
-+};
-+static const unsigned int msiof0_rx_b_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(0, 21),
-+};
-+static const unsigned int msiof0_rx_b_mux[] = {
-+ MSIOF0_RXD_B_MARK,
-+};
-+static const unsigned int msiof0_tx_b_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(0, 20),
-+};
-+static const unsigned int msiof0_tx_b_mux[] = {
-+ MSIOF0_TXD_B_MARK,
-+};
-+
-+static const unsigned int msiof0_clk_c_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(5, 26),
-+};
-+static const unsigned int msiof0_clk_c_mux[] = {
-+ MSIOF0_SCK_C_MARK,
-+};
-+static const unsigned int msiof0_sync_c_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(5, 25),
-+};
-+static const unsigned int msiof0_sync_c_mux[] = {
-+ MSIOF0_SYNC_C_MARK,
-+};
-+static const unsigned int msiof0_ss1_c_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(5, 27),
-+};
-+static const unsigned int msiof0_ss1_c_mux[] = {
-+ MSIOF0_SS1_C_MARK,
-+};
-+static const unsigned int msiof0_ss2_c_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(5, 28),
-+};
-+static const unsigned int msiof0_ss2_c_mux[] = {
-+ MSIOF0_SS2_C_MARK,
-+};
-+static const unsigned int msiof0_rx_c_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(5, 29),
-+};
-+static const unsigned int msiof0_rx_c_mux[] = {
-+ MSIOF0_RXD_C_MARK,
-+};
-+static const unsigned int msiof0_tx_c_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(5, 30),
-+};
-+static const unsigned int msiof0_tx_c_mux[] = {
-+ MSIOF0_TXD_C_MARK,
-+};
- /* - MSIOF1 ----------------------------------------------------------------- */
- static const unsigned int msiof1_clk_pins[] = {
- /* SCK */
-@@ -2138,6 +2224,143 @@ static const unsigned int msiof1_tx_pins[] = {
- static const unsigned int msiof1_tx_mux[] = {
- MSIOF1_TXD_MARK,
- };
-+
-+static const unsigned int msiof1_clk_b_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(2, 29),
-+};
-+static const unsigned int msiof1_clk_b_mux[] = {
-+ MSIOF1_SCK_B_MARK,
-+};
-+static const unsigned int msiof1_sync_b_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(2, 30),
-+};
-+static const unsigned int msiof1_sync_b_mux[] = {
-+ MSIOF1_SYNC_B_MARK,
-+};
-+static const unsigned int msiof1_ss1_b_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(2, 31),
-+};
-+static const unsigned int msiof1_ss1_b_mux[] = {
-+ MSIOF1_SS1_B_MARK,
-+};
-+static const unsigned int msiof1_ss2_b_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(7, 16),
-+};
-+static const unsigned int msiof1_ss2_b_mux[] = {
-+ MSIOF1_SS2_B_MARK,
-+};
-+static const unsigned int msiof1_rx_b_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(7, 18),
-+};
-+static const unsigned int msiof1_rx_b_mux[] = {
-+ MSIOF1_RXD_B_MARK,
-+};
-+static const unsigned int msiof1_tx_b_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(7, 17),
-+};
-+static const unsigned int msiof1_tx_b_mux[] = {
-+ MSIOF1_TXD_B_MARK,
-+};
-+
-+static const unsigned int msiof1_clk_c_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(2, 15),
-+};
-+static const unsigned int msiof1_clk_c_mux[] = {
-+ MSIOF1_SCK_C_MARK,
-+};
-+static const unsigned int msiof1_sync_c_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(2, 16),
-+};
-+static const unsigned int msiof1_sync_c_mux[] = {
-+ MSIOF1_SYNC_C_MARK,
-+};
-+static const unsigned int msiof1_rx_c_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(2, 18),
-+};
-+static const unsigned int msiof1_rx_c_mux[] = {
-+ MSIOF1_RXD_C_MARK,
-+};
-+static const unsigned int msiof1_tx_c_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(2, 17),
-+};
-+static const unsigned int msiof1_tx_c_mux[] = {
-+ MSIOF1_TXD_C_MARK,
-+};
-+
-+static const unsigned int msiof1_clk_d_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(0, 28),
-+};
-+static const unsigned int msiof1_clk_d_mux[] = {
-+ MSIOF1_SCK_D_MARK,
-+};
-+static const unsigned int msiof1_sync_d_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(0, 30),
-+};
-+static const unsigned int msiof1_sync_d_mux[] = {
-+ MSIOF1_SYNC_D_MARK,
-+};
-+static const unsigned int msiof1_ss1_d_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(0, 29),
-+};
-+static const unsigned int msiof1_ss1_d_mux[] = {
-+ MSIOF1_SS1_D_MARK,
-+};
-+static const unsigned int msiof1_rx_d_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(0, 27),
-+};
-+static const unsigned int msiof1_rx_d_mux[] = {
-+ MSIOF1_RXD_D_MARK,
-+};
-+static const unsigned int msiof1_tx_d_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(0, 26),
-+};
-+static const unsigned int msiof1_tx_d_mux[] = {
-+ MSIOF1_TXD_D_MARK,
-+};
-+
-+static const unsigned int msiof1_clk_e_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(5, 18),
-+};
-+static const unsigned int msiof1_clk_e_mux[] = {
-+ MSIOF1_SCK_E_MARK,
-+};
-+static const unsigned int msiof1_sync_e_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(5, 19),
-+};
-+static const unsigned int msiof1_sync_e_mux[] = {
-+ MSIOF1_SYNC_E_MARK,
-+};
-+static const unsigned int msiof1_rx_e_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(5, 17),
-+};
-+static const unsigned int msiof1_rx_e_mux[] = {
-+ MSIOF1_RXD_E_MARK,
-+};
-+static const unsigned int msiof1_tx_e_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(5, 20),
-+};
-+static const unsigned int msiof1_tx_e_mux[] = {
-+ MSIOF1_TXD_E_MARK,
-+};
- /* - MSIOF2 ----------------------------------------------------------------- */
- static const unsigned int msiof2_clk_pins[] = {
- /* SCK */
-@@ -2181,6 +2404,150 @@ static const unsigned int msiof2_tx_pins[] = {
- static const unsigned int msiof2_tx_mux[] = {
- MSIOF2_TXD_MARK,
- };
-+
-+static const unsigned int msiof2_clk_b_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(3, 0),
-+};
-+static const unsigned int msiof2_clk_b_mux[] = {
-+ MSIOF2_SCK_B_MARK,
-+};
-+static const unsigned int msiof2_sync_b_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(3, 1),
-+};
-+static const unsigned int msiof2_sync_b_mux[] = {
-+ MSIOF2_SYNC_B_MARK,
-+};
-+static const unsigned int msiof2_ss1_b_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(3, 8),
-+};
-+static const unsigned int msiof2_ss1_b_mux[] = {
-+ MSIOF2_SS1_B_MARK,
-+};
-+static const unsigned int msiof2_ss2_b_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(3, 9),
-+};
-+static const unsigned int msiof2_ss2_b_mux[] = {
-+ MSIOF2_SS2_B_MARK,
-+};
-+static const unsigned int msiof2_rx_b_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(3, 17),
-+};
-+static const unsigned int msiof2_rx_b_mux[] = {
-+ MSIOF2_RXD_B_MARK,
-+};
-+static const unsigned int msiof2_tx_b_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(3, 16),
-+};
-+static const unsigned int msiof2_tx_b_mux[] = {
-+ MSIOF2_TXD_B_MARK,
-+};
-+
-+static const unsigned int msiof2_clk_c_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(2, 2),
-+};
-+static const unsigned int msiof2_clk_c_mux[] = {
-+ MSIOF2_SCK_C_MARK,
-+};
-+static const unsigned int msiof2_sync_c_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(2, 3),
-+};
-+static const unsigned int msiof2_sync_c_mux[] = {
-+ MSIOF2_SYNC_C_MARK,
-+};
-+static const unsigned int msiof2_rx_c_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(2, 5),
-+};
-+static const unsigned int msiof2_rx_c_mux[] = {
-+ MSIOF2_RXD_C_MARK,
-+};
-+static const unsigned int msiof2_tx_c_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(2, 4),
-+};
-+static const unsigned int msiof2_tx_c_mux[] = {
-+ MSIOF2_TXD_C_MARK,
-+};
-+
-+static const unsigned int msiof2_clk_d_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(2, 14),
-+};
-+static const unsigned int msiof2_clk_d_mux[] = {
-+ MSIOF2_SCK_D_MARK,
-+};
-+static const unsigned int msiof2_sync_d_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(2, 15),
-+};
-+static const unsigned int msiof2_sync_d_mux[] = {
-+ MSIOF2_SYNC_D_MARK,
-+};
-+static const unsigned int msiof2_ss1_d_pins[] = {
-+ /* SS1 */
-+ RCAR_GP_PIN(2, 17),
-+};
-+static const unsigned int msiof2_ss1_d_mux[] = {
-+ MSIOF2_SS1_D_MARK,
-+};
-+static const unsigned int msiof2_ss2_d_pins[] = {
-+ /* SS2 */
-+ RCAR_GP_PIN(2, 19),
-+};
-+static const unsigned int msiof2_ss2_d_mux[] = {
-+ MSIOF2_SS2_D_MARK,
-+};
-+static const unsigned int msiof2_rx_d_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(2, 18),
-+};
-+static const unsigned int msiof2_rx_d_mux[] = {
-+ MSIOF2_RXD_D_MARK,
-+};
-+static const unsigned int msiof2_tx_d_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(2, 16),
-+};
-+static const unsigned int msiof2_tx_d_mux[] = {
-+ MSIOF2_TXD_D_MARK,
-+};
-+
-+static const unsigned int msiof2_clk_e_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(7, 15),
-+};
-+static const unsigned int msiof2_clk_e_mux[] = {
-+ MSIOF2_SCK_E_MARK,
-+};
-+static const unsigned int msiof2_sync_e_pins[] = {
-+ /* SYNC */
-+ RCAR_GP_PIN(7, 16),
-+};
-+static const unsigned int msiof2_sync_e_mux[] = {
-+ MSIOF2_SYNC_E_MARK,
-+};
-+static const unsigned int msiof2_rx_e_pins[] = {
-+ /* RXD */
-+ RCAR_GP_PIN(7, 14),
-+};
-+static const unsigned int msiof2_rx_e_mux[] = {
-+ MSIOF2_RXD_E_MARK,
-+};
-+static const unsigned int msiof2_tx_e_pins[] = {
-+ /* TXD */
-+ RCAR_GP_PIN(7, 13),
-+};
-+static const unsigned int msiof2_tx_e_mux[] = {
-+ MSIOF2_TXD_E_MARK,
-+};
- /* - QSPI ------------------------------------------------------------------- */
- static const unsigned int qspi_ctrl_pins[] = {
- /* SPCLK, SSL */
-@@ -3236,18 +3603,69 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(msiof0_ss2),
- SH_PFC_PIN_GROUP(msiof0_rx),
- SH_PFC_PIN_GROUP(msiof0_tx),
-+ SH_PFC_PIN_GROUP(msiof0_clk_b),
-+ SH_PFC_PIN_GROUP(msiof0_sync_b),
-+ SH_PFC_PIN_GROUP(msiof0_ss1_b),
-+ SH_PFC_PIN_GROUP(msiof0_ss2_b),
-+ SH_PFC_PIN_GROUP(msiof0_rx_b),
-+ SH_PFC_PIN_GROUP(msiof0_tx_b),
-+ SH_PFC_PIN_GROUP(msiof0_clk_c),
-+ SH_PFC_PIN_GROUP(msiof0_sync_c),
-+ SH_PFC_PIN_GROUP(msiof0_ss1_c),
-+ SH_PFC_PIN_GROUP(msiof0_ss2_c),
-+ SH_PFC_PIN_GROUP(msiof0_rx_c),
-+ SH_PFC_PIN_GROUP(msiof0_tx_c),
- SH_PFC_PIN_GROUP(msiof1_clk),
- SH_PFC_PIN_GROUP(msiof1_sync),
- SH_PFC_PIN_GROUP(msiof1_ss1),
- SH_PFC_PIN_GROUP(msiof1_ss2),
- SH_PFC_PIN_GROUP(msiof1_rx),
- SH_PFC_PIN_GROUP(msiof1_tx),
-+ SH_PFC_PIN_GROUP(msiof1_clk_b),
-+ SH_PFC_PIN_GROUP(msiof1_sync_b),
-+ SH_PFC_PIN_GROUP(msiof1_ss1_b),
-+ SH_PFC_PIN_GROUP(msiof1_ss2_b),
-+ SH_PFC_PIN_GROUP(msiof1_rx_b),
-+ SH_PFC_PIN_GROUP(msiof1_tx_b),
-+ SH_PFC_PIN_GROUP(msiof1_clk_c),
-+ SH_PFC_PIN_GROUP(msiof1_sync_c),
-+ SH_PFC_PIN_GROUP(msiof1_rx_c),
-+ SH_PFC_PIN_GROUP(msiof1_tx_c),
-+ SH_PFC_PIN_GROUP(msiof1_clk_d),
-+ SH_PFC_PIN_GROUP(msiof1_sync_d),
-+ SH_PFC_PIN_GROUP(msiof1_ss1_d),
-+ SH_PFC_PIN_GROUP(msiof1_rx_d),
-+ SH_PFC_PIN_GROUP(msiof1_tx_d),
-+ SH_PFC_PIN_GROUP(msiof1_clk_e),
-+ SH_PFC_PIN_GROUP(msiof1_sync_e),
-+ SH_PFC_PIN_GROUP(msiof1_rx_e),
-+ SH_PFC_PIN_GROUP(msiof1_tx_e),
- SH_PFC_PIN_GROUP(msiof2_clk),
- SH_PFC_PIN_GROUP(msiof2_sync),
- SH_PFC_PIN_GROUP(msiof2_ss1),
- SH_PFC_PIN_GROUP(msiof2_ss2),
- SH_PFC_PIN_GROUP(msiof2_rx),
- SH_PFC_PIN_GROUP(msiof2_tx),
-+ SH_PFC_PIN_GROUP(msiof2_clk_b),
-+ SH_PFC_PIN_GROUP(msiof2_sync_b),
-+ SH_PFC_PIN_GROUP(msiof2_ss1_b),
-+ SH_PFC_PIN_GROUP(msiof2_ss2_b),
-+ SH_PFC_PIN_GROUP(msiof2_rx_b),
-+ SH_PFC_PIN_GROUP(msiof2_tx_b),
-+ SH_PFC_PIN_GROUP(msiof2_clk_c),
-+ SH_PFC_PIN_GROUP(msiof2_sync_c),
-+ SH_PFC_PIN_GROUP(msiof2_rx_c),
-+ SH_PFC_PIN_GROUP(msiof2_tx_c),
-+ SH_PFC_PIN_GROUP(msiof2_clk_d),
-+ SH_PFC_PIN_GROUP(msiof2_sync_d),
-+ SH_PFC_PIN_GROUP(msiof2_ss1_d),
-+ SH_PFC_PIN_GROUP(msiof2_ss2_d),
-+ SH_PFC_PIN_GROUP(msiof2_rx_d),
-+ SH_PFC_PIN_GROUP(msiof2_tx_d),
-+ SH_PFC_PIN_GROUP(msiof2_clk_e),
-+ SH_PFC_PIN_GROUP(msiof2_sync_e),
-+ SH_PFC_PIN_GROUP(msiof2_rx_e),
-+ SH_PFC_PIN_GROUP(msiof2_tx_e),
- SH_PFC_PIN_GROUP(qspi_ctrl),
- SH_PFC_PIN_GROUP(qspi_data2),
- SH_PFC_PIN_GROUP(qspi_data4),
-@@ -3473,6 +3891,18 @@ static const char * const msiof0_groups[] = {
- "msiof0_ss2",
- "msiof0_rx",
- "msiof0_tx",
-+ "msiof0_clk_b",
-+ "msiof0_sync_b",
-+ "msiof0_ss1_b",
-+ "msiof0_ss2_b",
-+ "msiof0_rx_b",
-+ "msiof0_tx_b",
-+ "msiof0_clk_c",
-+ "msiof0_sync_c",
-+ "msiof0_ss1_c",
-+ "msiof0_ss2_c",
-+ "msiof0_rx_c",
-+ "msiof0_tx_c",
- };
-
- static const char * const msiof1_groups[] = {
-@@ -3482,6 +3912,25 @@ static const char * const msiof1_groups[] = {
- "msiof1_ss2",
- "msiof1_rx",
- "msiof1_tx",
-+ "msiof1_clk_b",
-+ "msiof1_sync_b",
-+ "msiof1_ss1_b",
-+ "msiof1_ss2_b",
-+ "msiof1_rx_b",
-+ "msiof1_tx_b",
-+ "msiof1_clk_c",
-+ "msiof1_sync_c",
-+ "msiof1_rx_c",
-+ "msiof1_tx_c",
-+ "msiof1_clk_d",
-+ "msiof1_sync_d",
-+ "msiof1_ss1_d",
-+ "msiof1_rx_d",
-+ "msiof1_tx_d",
-+ "msiof1_clk_e",
-+ "msiof1_sync_e",
-+ "msiof1_rx_e",
-+ "msiof1_tx_e",
- };
-
- static const char * const msiof2_groups[] = {
-@@ -3491,6 +3940,26 @@ static const char * const msiof2_groups[] = {
- "msiof2_ss2",
- "msiof2_rx",
- "msiof2_tx",
-+ "msiof2_clk_b",
-+ "msiof2_sync_b",
-+ "msiof2_ss1_b",
-+ "msiof2_ss2_b",
-+ "msiof2_rx_b",
-+ "msiof2_tx_b",
-+ "msiof2_clk_c",
-+ "msiof2_sync_c",
-+ "msiof2_rx_c",
-+ "msiof2_tx_c",
-+ "msiof2_clk_d",
-+ "msiof2_sync_d",
-+ "msiof2_ss1_d",
-+ "msiof2_ss2_d",
-+ "msiof2_rx_d",
-+ "msiof2_tx_d",
-+ "msiof2_clk_e",
-+ "msiof2_sync_e",
-+ "msiof2_rx_e",
-+ "msiof2_tx_e",
- };
-
- static const char * const qspi_groups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0127-sh-pfc-r8a7790-Fix-definition-of-IPSR5.patch b/patches.renesas/0127-sh-pfc-r8a7790-Fix-definition-of-IPSR5.patch
deleted file mode 100644
index bc92fe48c6aea..0000000000000
--- a/patches.renesas/0127-sh-pfc-r8a7790-Fix-definition-of-IPSR5.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 1d1494a483e9b3aa65b6fa56561770c16f39c88f Mon Sep 17 00:00:00 2001
-From: Guido Piasenza <gpiasenza@soft-in.com>
-Date: Tue, 22 Apr 2014 16:28:03 +0100
-Subject: sh-pfc: r8a7790: Fix definition of IPSR5
-
-The extra entry in the table makes SCIFA0_B, and all
-peripherals after it, fail.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 34ce57e9df7d14b52c7613bb2c190e411ca99186)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-index 48093719167a..f5cd3f961808 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-@@ -4794,8 +4794,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
- FN_MSIOF0_SCK_B, 0,
- /* IP5_23_21 [3] */
- FN_WE1_N, FN_IERX, FN_CAN1_RX, FN_VI1_G4,
-- FN_VI1_G4_B, FN_VI2_R6, FN_SCIFA0_CTS_N_B,
-- FN_IERX_C, 0,
-+ FN_VI1_G4_B, FN_VI2_R6, FN_SCIFA0_CTS_N_B, FN_IERX_C,
- /* IP5_20_18 [3] */
- FN_WE0_N, FN_IECLK, FN_CAN_CLK,
- FN_VI2_VSYNC_N, FN_SCIFA0_TXD_B, FN_VI2_VSYNC_N_B, 0, 0,
---
-2.1.2
-
diff --git a/patches.renesas/0128-sh-pfc-r8a7791-Fix-definition-of-MOD_SEL3.patch b/patches.renesas/0128-sh-pfc-r8a7791-Fix-definition-of-MOD_SEL3.patch
deleted file mode 100644
index a6785cc9b7252..0000000000000
--- a/patches.renesas/0128-sh-pfc-r8a7791-Fix-definition-of-MOD_SEL3.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 80fcbac45afe7d8788c01697a5b1214005afc335 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Tue, 22 Apr 2014 17:38:05 +0100
-Subject: sh-pfc: r8a7791: Fix definition of MOD_SEL3
-
-There is a missing 0 entry from the MOD_SEL3 table.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 0c66c5628bbb5e96360032440f53a6cb6f8973d0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 5186d70c49d4..7868bf3a0f91 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -5288,7 +5288,7 @@ static const struct pinmux_cfg_reg pinmux_config_regs[] = {
- /* SEL_SCIF3 [2] */
- FN_SEL_SCIF3_0, FN_SEL_SCIF3_1, FN_SEL_SCIF3_2, FN_SEL_SCIF3_3,
- /* SEL_IEB [2] */
-- FN_SEL_IEB_0, FN_SEL_IEB_1, FN_SEL_IEB_2,
-+ FN_SEL_IEB_0, FN_SEL_IEB_1, FN_SEL_IEB_2, 0,
- /* SEL_MMC [1] */
- FN_SEL_MMC_0, FN_SEL_MMC_1,
- /* SEL_SCIF5 [1] */
---
-2.1.2
-
diff --git a/patches.renesas/0129-serial-sh-sci-Fix-cast-warning.patch b/patches.renesas/0129-serial-sh-sci-Fix-cast-warning.patch
deleted file mode 100644
index 9dc8cd5fecd4e..0000000000000
--- a/patches.renesas/0129-serial-sh-sci-Fix-cast-warning.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 33c5f10c486ddf82497c27f52da7985537e00ee1 Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Wed, 5 Feb 2014 09:56:37 +0900
-Subject: serial: sh-sci: Fix cast warning
-
-Fix the following compile warning about cast to pointer from
-integer of different size.
-
-drivers/tty/serial/sh-sci.c:2021:19: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 3af4e960b8a12b3f07033f1c12504305e6d4df1a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index be33d2b0613b..1668523d31fb 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -2018,7 +2018,7 @@ static int sci_remap_port(struct uart_port *port)
- * need to do any remapping, just cast the cookie
- * directly.
- */
-- port->membase = (void __iomem *)port->mapbase;
-+ port->membase = (void __iomem *)(uintptr_t)port->mapbase;
- }
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0130-serial-sh-sci-Fix-compatible-string-in-DT-bindings-e.patch b/patches.renesas/0130-serial-sh-sci-Fix-compatible-string-in-DT-bindings-e.patch
deleted file mode 100644
index 05cc62cfd0fda..0000000000000
--- a/patches.renesas/0130-serial-sh-sci-Fix-compatible-string-in-DT-bindings-e.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 884ca34025033d8e8d336528af65828056d074eb Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 6 Feb 2014 15:47:40 +0900
-Subject: serial: sh-sci: Fix compatible string in DT bindings example
-
-Remove the -generic suffix from the compatible string in the serial port
-DT bindings example.
-
-Cc: devicetree@vger.kernel.org
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 25eb50b97b61a237168137411550aa792bb27c00)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-index f372cf29068d..53e6c175db6c 100644
---- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-@@ -37,7 +37,7 @@ Example:
- };
-
- scifa0: serial@e6c40000 {
-- compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- reg = <0 0xe6c40000 0 64>;
- interrupt-parent = <&gic>;
- interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
---
-2.1.2
-
diff --git a/patches.renesas/0131-serial-sh-sci-Add-missing-call-to-uart_remove_one_po.patch b/patches.renesas/0131-serial-sh-sci-Add-missing-call-to-uart_remove_one_po.patch
deleted file mode 100644
index 3ba1a33f689d2..0000000000000
--- a/patches.renesas/0131-serial-sh-sci-Add-missing-call-to-uart_remove_one_po.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 2dc17f253c2627524da362ba6824f5098d76687d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 28 Feb 2014 14:21:33 +0100
-Subject: serial: sh-sci: Add missing call to uart_remove_one_port() in failure
- path
-
-If cpufreq_register_notifier() fails, we have to remove the port added by
-sci_probe_single(), which is not done by sci_cleanup_single().
-
-Else the serial port stays active from the point of view of the serial
-subsystem, and it may crash when userspace getty is started, or when the
-loadable driver module is unloaded.
-
-This was introduced by commit 6dae14216c85eea13db7b12c469475c5d30e5499
-("serial: sh-sci: Fix probe error paths").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit bf13c9a894162a91c8bb7d9555933e9fc3ff7d0e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 1668523d31fb..0cb52376f97d 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -2564,6 +2564,7 @@ static int sci_probe(struct platform_device *dev)
- ret = cpufreq_register_notifier(&sp->freq_transition,
- CPUFREQ_TRANSITION_NOTIFIER);
- if (unlikely(ret < 0)) {
-+ uart_remove_one_port(&sci_uart_driver, &sp->port);
- sci_cleanup_single(sp);
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0132-serial-sh-sci-Replace-printk-by-pr_.patch b/patches.renesas/0132-serial-sh-sci-Replace-printk-by-pr_.patch
deleted file mode 100644
index 7be75b360f4fe..0000000000000
--- a/patches.renesas/0132-serial-sh-sci-Replace-printk-by-pr_.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 8a9fcc46f87a1b0d310bbbbdc5dd19c537997ec9 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 11:11:17 +0100
-Subject: serial: sh-sci: Replace printk() by pr_*()
-
-Make banner const while we're at it
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Simon Horman <horms@verge.net.au>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 6c13d5d27c5ecd7a2ce7c104c7726b0d7aa7d7b5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 0cb52376f97d..60a8f7db2948 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -428,7 +428,7 @@ static int sci_probe_regmap(struct plat_sci_port *cfg)
- cfg->regtype = SCIx_HSCIF_REGTYPE;
- break;
- default:
-- printk(KERN_ERR "Can't probe register map for given port\n");
-+ pr_err("Can't probe register map for given port\n");
- return -EINVAL;
- }
-
-@@ -2389,8 +2389,7 @@ static inline int sci_probe_earlyprintk(struct platform_device *pdev)
-
- #endif /* CONFIG_SERIAL_SH_SCI_CONSOLE */
-
--static char banner[] __initdata =
-- KERN_INFO "SuperH (H)SCI(F) driver initialized\n";
-+static const char banner[] __initconst = "SuperH (H)SCI(F) driver initialized";
-
- static struct uart_driver sci_uart_driver = {
- .owner = THIS_MODULE,
-@@ -2616,7 +2615,7 @@ static int __init sci_init(void)
- {
- int ret;
-
-- printk(banner);
-+ pr_info("%s\n", banner);
-
- ret = uart_register_driver(&sci_uart_driver);
- if (likely(ret == 0)) {
---
-2.1.2
-
diff --git a/patches.renesas/0133-serial-sh-sci-Remove-useless-casts.patch b/patches.renesas/0133-serial-sh-sci-Remove-useless-casts.patch
deleted file mode 100644
index 975e74ff85d03..0000000000000
--- a/patches.renesas/0133-serial-sh-sci-Remove-useless-casts.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 6228c70afc56c58203fcbaa93f475504ede42694 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 11:11:18 +0100
-Subject: serial: sh-sci: Remove useless casts
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Simon Horman <horms@verge.net.au>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit ff43da00e0d407cd8e7faaf2ac150001d29827e4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 60a8f7db2948..c93154f690a6 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -2423,25 +2423,25 @@ struct sci_port_info {
- static const struct of_device_id of_sci_match[] = {
- {
- .compatible = "renesas,scif",
-- .data = (void *)&(const struct sci_port_info) {
-+ .data = &(const struct sci_port_info) {
- .type = PORT_SCIF,
- .regtype = SCIx_SH4_SCIF_REGTYPE,
- },
- }, {
- .compatible = "renesas,scifa",
-- .data = (void *)&(const struct sci_port_info) {
-+ .data = &(const struct sci_port_info) {
- .type = PORT_SCIFA,
- .regtype = SCIx_SCIFA_REGTYPE,
- },
- }, {
- .compatible = "renesas,scifb",
-- .data = (void *)&(const struct sci_port_info) {
-+ .data = &(const struct sci_port_info) {
- .type = PORT_SCIFB,
- .regtype = SCIx_SCIFB_REGTYPE,
- },
- }, {
- .compatible = "renesas,hscif",
-- .data = (void *)&(const struct sci_port_info) {
-+ .data = &(const struct sci_port_info) {
- .type = PORT_HSCIF,
- .regtype = SCIx_HSCIF_REGTYPE,
- },
---
-2.1.2
-
diff --git a/patches.renesas/0134-serial-sh-sci-Add-more-register-documentation.patch b/patches.renesas/0134-serial-sh-sci-Add-more-register-documentation.patch
deleted file mode 100644
index d9345bdd83511..0000000000000
--- a/patches.renesas/0134-serial-sh-sci-Add-more-register-documentation.patch
+++ /dev/null
@@ -1,237 +0,0 @@
-From 765cc0c7db581b63c92fb06fd463f929c404e177 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 11:11:19 +0100
-Subject: serial: sh-sci: Add more register documentation
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Simon Horman <horms@verge.net.au>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 26de4f1b2fb45e53a9e8f4f913b9cdf6c294070b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 28 +++++++-------
- include/linux/serial_sci.h | 93 ++++++++++++++++++++++++++++-----------------
- 2 files changed, 73 insertions(+), 48 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index c93154f690a6..22a508a638b9 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -911,7 +911,7 @@ static irqreturn_t sci_rx_interrupt(int irq, void *ptr)
- /* Disable future Rx interrupts */
- if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
- disable_irq_nosync(irq);
-- scr |= 0x4000;
-+ scr |= SCSCR_RDRQE;
- } else {
- scr &= ~SCSCR_RIE;
- }
-@@ -1200,7 +1200,9 @@ static void sci_set_mctrl(struct uart_port *port, unsigned int mctrl)
- */
- reg = sci_getreg(port, SCFCR);
- if (reg->size)
-- serial_port_out(port, SCFCR, serial_port_in(port, SCFCR) | 1);
-+ serial_port_out(port, SCFCR,
-+ serial_port_in(port, SCFCR) |
-+ SCFCR_LOOP);
- }
- }
-
-@@ -1496,9 +1498,9 @@ static void sci_start_tx(struct uart_port *port)
- if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
- u16 new, scr = serial_port_in(port, SCSCR);
- if (s->chan_tx)
-- new = scr | 0x8000;
-+ new = scr | SCSCR_TDRQE;
- else
-- new = scr & ~0x8000;
-+ new = scr & ~SCSCR_TDRQE;
- if (new != scr)
- serial_port_out(port, SCSCR, new);
- }
-@@ -1525,7 +1527,7 @@ static void sci_stop_tx(struct uart_port *port)
- ctrl = serial_port_in(port, SCSCR);
-
- if (port->type == PORT_SCIFA || port->type == PORT_SCIFB)
-- ctrl &= ~0x8000;
-+ ctrl &= ~SCSCR_TDRQE;
-
- ctrl &= ~SCSCR_TIE;
-
-@@ -1539,7 +1541,7 @@ static void sci_start_rx(struct uart_port *port)
- ctrl = serial_port_in(port, SCSCR) | port_rx_irq_mask(port);
-
- if (port->type == PORT_SCIFA || port->type == PORT_SCIFB)
-- ctrl &= ~0x4000;
-+ ctrl &= ~SCSCR_RDRQE;
-
- serial_port_out(port, SCSCR, ctrl);
- }
-@@ -1551,7 +1553,7 @@ static void sci_stop_rx(struct uart_port *port)
- ctrl = serial_port_in(port, SCSCR);
-
- if (port->type == PORT_SCIFA || port->type == PORT_SCIFB)
-- ctrl &= ~0x4000;
-+ ctrl &= ~SCSCR_RDRQE;
-
- ctrl &= ~port_rx_irq_mask(port);
-
-@@ -1614,7 +1616,7 @@ static void rx_timer_fn(unsigned long arg)
- u16 scr = serial_port_in(port, SCSCR);
-
- if (port->type == PORT_SCIFA || port->type == PORT_SCIFB) {
-- scr &= ~0x4000;
-+ scr &= ~SCSCR_RDRQE;
- enable_irq(s->irqs[SCIx_RXI_IRQ]);
- }
- serial_port_out(port, SCSCR, scr | SCSCR_RIE);
-@@ -1871,13 +1873,13 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
- smr_val = serial_port_in(port, SCSMR) & 3;
-
- if ((termios->c_cflag & CSIZE) == CS7)
-- smr_val |= 0x40;
-+ smr_val |= SCSMR_CHR;
- if (termios->c_cflag & PARENB)
-- smr_val |= 0x20;
-+ smr_val |= SCSMR_PE;
- if (termios->c_cflag & PARODD)
-- smr_val |= 0x30;
-+ smr_val |= SCSMR_PE | SCSMR_ODD;
- if (termios->c_cflag & CSTOPB)
-- smr_val |= 0x08;
-+ smr_val |= SCSMR_STOP;
-
- uart_update_timeout(port, termios->c_cflag, baud);
-
-@@ -1885,7 +1887,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
- __func__, smr_val, cks, t, s->cfg->scscr);
-
- if (t >= 0) {
-- serial_port_out(port, SCSMR, (smr_val & ~3) | cks);
-+ serial_port_out(port, SCSMR, (smr_val & ~SCSMR_CKS) | cks);
- serial_port_out(port, SCBRR, t);
- reg = sci_getreg(port, HSSRR);
- if (reg->size)
-diff --git a/include/linux/serial_sci.h b/include/linux/serial_sci.h
-index 22b3640c9424..6c5e3bb282b0 100644
---- a/include/linux/serial_sci.h
-+++ b/include/linux/serial_sci.h
-@@ -10,45 +10,59 @@
-
- #define SCIx_NOT_SUPPORTED (-1)
-
--#define SCSCR_TIE (1 << 7)
--#define SCSCR_RIE (1 << 6)
--#define SCSCR_TE (1 << 5)
--#define SCSCR_RE (1 << 4)
--#define SCSCR_REIE (1 << 3) /* not supported by all parts */
--#define SCSCR_TOIE (1 << 2) /* not supported by all parts */
--#define SCSCR_CKE1 (1 << 1)
--#define SCSCR_CKE0 (1 << 0)
--
--/* SCxSR SCI */
--#define SCI_TDRE 0x80
--#define SCI_RDRF 0x40
--#define SCI_ORER 0x20
--#define SCI_FER 0x10
--#define SCI_PER 0x08
--#define SCI_TEND 0x04
-+/* SCSMR (Serial Mode Register) */
-+#define SCSMR_CHR (1 << 6) /* 7-bit Character Length */
-+#define SCSMR_PE (1 << 5) /* Parity Enable */
-+#define SCSMR_ODD (1 << 4) /* Odd Parity */
-+#define SCSMR_STOP (1 << 3) /* Stop Bit Length */
-+#define SCSMR_CKS 0x0003 /* Clock Select */
-+
-+/* Serial Control Register (@ = not supported by all parts) */
-+#define SCSCR_TIE (1 << 7) /* Transmit Interrupt Enable */
-+#define SCSCR_RIE (1 << 6) /* Receive Interrupt Enable */
-+#define SCSCR_TE (1 << 5) /* Transmit Enable */
-+#define SCSCR_RE (1 << 4) /* Receive Enable */
-+#define SCSCR_REIE (1 << 3) /* Receive Error Interrupt Enable @ */
-+#define SCSCR_TOIE (1 << 2) /* Timeout Interrupt Enable @ */
-+#define SCSCR_CKE1 (1 << 1) /* Clock Enable 1 */
-+#define SCSCR_CKE0 (1 << 0) /* Clock Enable 0 */
-+/* SCIFA/SCIFB only */
-+#define SCSCR_TDRQE (1 << 15) /* Tx Data Transfer Request Enable */
-+#define SCSCR_RDRQE (1 << 14) /* Rx Data Transfer Request Enable */
-+
-+/* SCxSR (Serial Status Register) on SCI */
-+#define SCI_TDRE 0x80 /* Transmit Data Register Empty */
-+#define SCI_RDRF 0x40 /* Receive Data Register Full */
-+#define SCI_ORER 0x20 /* Overrun Error */
-+#define SCI_FER 0x10 /* Framing Error */
-+#define SCI_PER 0x08 /* Parity Error */
-+#define SCI_TEND 0x04 /* Transmit End */
-
- #define SCI_DEFAULT_ERROR_MASK (SCI_PER | SCI_FER)
-
--/* SCxSR SCIF, HSCIF */
--#define SCIF_ER 0x0080
--#define SCIF_TEND 0x0040
--#define SCIF_TDFE 0x0020
--#define SCIF_BRK 0x0010
--#define SCIF_FER 0x0008
--#define SCIF_PER 0x0004
--#define SCIF_RDF 0x0002
--#define SCIF_DR 0x0001
-+/* SCxSR (Serial Status Register) on SCIF, HSCIF */
-+#define SCIF_ER 0x0080 /* Receive Error */
-+#define SCIF_TEND 0x0040 /* Transmission End */
-+#define SCIF_TDFE 0x0020 /* Transmit FIFO Data Empty */
-+#define SCIF_BRK 0x0010 /* Break Detect */
-+#define SCIF_FER 0x0008 /* Framing Error */
-+#define SCIF_PER 0x0004 /* Parity Error */
-+#define SCIF_RDF 0x0002 /* Receive FIFO Data Full */
-+#define SCIF_DR 0x0001 /* Receive Data Ready */
-
- #define SCIF_DEFAULT_ERROR_MASK (SCIF_PER | SCIF_FER | SCIF_ER | SCIF_BRK)
-
--/* SCSPTR, optional */
--#define SCSPTR_RTSIO (1 << 7)
--#define SCSPTR_CTSIO (1 << 5)
--#define SCSPTR_SPB2IO (1 << 1)
--#define SCSPTR_SPB2DT (1 << 0)
-+/* SCFCR (FIFO Control Register) */
-+#define SCFCR_LOOP (1 << 0) /* Loopback Test */
-+
-+/* SCSPTR (Serial Port Register), optional */
-+#define SCSPTR_RTSIO (1 << 7) /* Serial Port RTS Pin Input/Output */
-+#define SCSPTR_CTSIO (1 << 5) /* Serial Port CTS Pin Input/Output */
-+#define SCSPTR_SPB2IO (1 << 1) /* Serial Port Break Input/Output */
-+#define SCSPTR_SPB2DT (1 << 0) /* Serial Port Break Data */
-
- /* HSSRR HSCIF */
--#define HSCIF_SRE 0x8000
-+#define HSCIF_SRE 0x8000 /* Sampling Rate Register Enable */
-
- enum {
- SCIx_PROBE_REGTYPE,
-@@ -73,10 +87,19 @@ enum {
- * Not all registers will exist on all parts.
- */
- enum {
-- SCSMR, SCBRR, SCSCR, SCxSR,
-- SCFCR, SCFDR, SCxTDR, SCxRDR,
-- SCLSR, SCTFDR, SCRFDR, SCSPTR,
-- HSSRR,
-+ SCSMR, /* Serial Mode Register */
-+ SCBRR, /* Bit Rate Register */
-+ SCSCR, /* Serial Control Register */
-+ SCxSR, /* Serial Status Register */
-+ SCFCR, /* FIFO Control Register */
-+ SCFDR, /* FIFO Data Count Register */
-+ SCxTDR, /* Transmit (FIFO) Data Register */
-+ SCxRDR, /* Receive (FIFO) Data Register */
-+ SCLSR, /* Line Status Register */
-+ SCTFDR, /* Transmit FIFO Data Count Register */
-+ SCRFDR, /* Receive FIFO Data Count Register */
-+ SCSPTR, /* Serial Port Register */
-+ HSSRR, /* Sampling Rate Register */
-
- SCIx_NR_REGS,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0135-serial-sh-sci-Replace-hardcoded-3-by-UART_PM_STATE_O.patch b/patches.renesas/0135-serial-sh-sci-Replace-hardcoded-3-by-UART_PM_STATE_O.patch
deleted file mode 100644
index 77b118d93580d..0000000000000
--- a/patches.renesas/0135-serial-sh-sci-Replace-hardcoded-3-by-UART_PM_STATE_O.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From ddc5c39453a1ed61441bb19b59fe15dec6ed35e6 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 11:11:20 +0100
-Subject: serial: sh-sci: Replace hardcoded 3 by UART_PM_STATE_OFF
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Simon Horman <horms@verge.net.au>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit d3dfe5d9b4c8b3156b28f99f7a4a59ad8be09b15)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 22a508a638b9..634ecae2efd4 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -1955,7 +1955,7 @@ static void sci_pm(struct uart_port *port, unsigned int state,
- struct sci_port *sci_port = to_sci_port(port);
-
- switch (state) {
-- case 3:
-+ case UART_PM_STATE_OFF:
- sci_port_disable(sci_port);
- break;
- default:
---
-2.1.2
-
diff --git a/patches.renesas/0136-serial-sh-sci-Neaten-dev_-level-uses.patch b/patches.renesas/0136-serial-sh-sci-Neaten-dev_-level-uses.patch
deleted file mode 100644
index b7df895d34ef7..0000000000000
--- a/patches.renesas/0136-serial-sh-sci-Neaten-dev_-level-uses.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From e4af69de04f1a47a3b8eb7915b950852e4f70417 Mon Sep 17 00:00:00 2001
-From: Joe Perches <joe@perches.com>
-Date: Tue, 11 Mar 2014 10:10:46 -0700
-Subject: serial: sh-sci: Neaten dev_<level> uses
-
-Add missing newlines and coalesce formats.
-Realign arguments.
-
-Signed-off-by: Joe Perches <joe@perches.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 9b971cd206c019fc6aeeb7e04136a49f9312df4a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 38 ++++++++++++++++++--------------------
- 1 file changed, 18 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 634ecae2efd4..7ee5a79222ff 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -788,7 +788,7 @@ static int sci_handle_errors(struct uart_port *port)
- if (tty_insert_flip_char(tport, 0, TTY_OVERRUN))
- copied++;
-
-- dev_notice(port->dev, "overrun error");
-+ dev_notice(port->dev, "overrun error\n");
- }
-
- if (status & SCxSR_FER(port)) {
-@@ -830,7 +830,7 @@ static int sci_handle_errors(struct uart_port *port)
- if (tty_insert_flip_char(tport, 0, TTY_PARITY))
- copied++;
-
-- dev_notice(port->dev, "parity error");
-+ dev_notice(port->dev, "parity error\n");
- }
-
- if (copied)
-@@ -1292,7 +1292,8 @@ static void sci_dma_rx_complete(void *arg)
- unsigned long flags;
- int count;
-
-- dev_dbg(port->dev, "%s(%d) active #%d\n", __func__, port->line, s->active_rx);
-+ dev_dbg(port->dev, "%s(%d) active #%d\n",
-+ __func__, port->line, s->active_rx);
-
- spin_lock_irqsave(&port->lock, flags);
-
-@@ -1368,8 +1369,8 @@ static void sci_submit_rx(struct sci_port *s)
- sci_rx_dma_release(s, true);
- return;
- }
-- dev_dbg(s->port.dev, "%s(): cookie %d to #%d\n", __func__,
-- s->cookie_rx[i], i);
-+ dev_dbg(s->port.dev, "%s(): cookie %d to #%d\n",
-+ __func__, s->cookie_rx[i], i);
- }
-
- s->active_rx = s->cookie_rx[0];
-@@ -1428,8 +1429,8 @@ static void work_fn_rx(struct work_struct *work)
-
- s->active_rx = s->cookie_rx[!new];
-
-- dev_dbg(port->dev, "%s: cookie %d #%d, new active #%d\n", __func__,
-- s->cookie_rx[new], new, s->active_rx);
-+ dev_dbg(port->dev, "%s: cookie %d #%d, new active #%d\n",
-+ __func__, s->cookie_rx[new], new, s->active_rx);
- }
-
- static void work_fn_tx(struct work_struct *work)
-@@ -1482,8 +1483,8 @@ static void work_fn_tx(struct work_struct *work)
- return;
- }
-
-- dev_dbg(port->dev, "%s: %p: %d...%d, cookie %d\n", __func__,
-- xmit->buf, xmit->tail, xmit->head, s->cookie_tx);
-+ dev_dbg(port->dev, "%s: %p: %d...%d, cookie %d\n",
-+ __func__, xmit->buf, xmit->tail, xmit->head, s->cookie_tx);
-
- dma_async_issue_pending(chan);
- }
-@@ -1602,8 +1603,8 @@ static bool filter(struct dma_chan *chan, void *slave)
- {
- struct sh_dmae_slave *param = slave;
-
-- dev_dbg(chan->device->dev, "%s: slave ID %d\n", __func__,
-- param->shdma_slave.slave_id);
-+ dev_dbg(chan->device->dev, "%s: slave ID %d\n",
-+ __func__, param->shdma_slave.slave_id);
-
- chan->private = &param->shdma_slave;
- return true;
-@@ -1632,8 +1633,7 @@ static void sci_request_dma(struct uart_port *port)
- dma_cap_mask_t mask;
- int nent;
-
-- dev_dbg(port->dev, "%s: port %d\n", __func__,
-- port->line);
-+ dev_dbg(port->dev, "%s: port %d\n", __func__, port->line);
-
- if (s->cfg->dma_slave_tx <= 0 || s->cfg->dma_slave_rx <= 0)
- return;
-@@ -1661,7 +1661,8 @@ static void sci_request_dma(struct uart_port *port)
- if (!nent)
- sci_tx_dma_release(s, false);
- else
-- dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n", __func__,
-+ dev_dbg(port->dev, "%s: mapped %d@%p to %pad\n",
-+ __func__,
- sg_dma_len(&s->sg_tx), port->state->xmit.buf,
- &sg_dma_address(&s->sg_tx));
-
-@@ -1935,8 +1936,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
- if (s->chan_rx) {
- s->rx_timeout = (port->timeout - HZ / 50) * s->buf_len_rx * 3 /
- port->fifosize / 2;
-- dev_dbg(port->dev,
-- "DMA Rx t-out %ums, tty t-out %u jiffies\n",
-+ dev_dbg(port->dev, "DMA Rx t-out %ums, tty t-out %u jiffies\n",
- s->rx_timeout * 1000 / HZ, port->timeout);
- if (s->rx_timeout < msecs_to_jiffies(20))
- s->rx_timeout = msecs_to_jiffies(20);
-@@ -2503,11 +2503,9 @@ static int sci_probe_single(struct platform_device *dev,
-
- /* Sanity check */
- if (unlikely(index >= SCI_NPORTS)) {
-- dev_notice(&dev->dev, "Attempting to register port "
-- "%d when only %d are available.\n",
-+ dev_notice(&dev->dev, "Attempting to register port %d when only %d are available\n",
- index+1, SCI_NPORTS);
-- dev_notice(&dev->dev, "Consider bumping "
-- "CONFIG_SERIAL_SH_SCI_NR_UARTS!\n");
-+ dev_notice(&dev->dev, "Consider bumping CONFIG_SERIAL_SH_SCI_NR_UARTS!\n");
- return -EINVAL;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0137-cpufreq-remove-unused-notifier-CPUFREQ_-SUSPENDCHANG.patch b/patches.renesas/0137-cpufreq-remove-unused-notifier-CPUFREQ_-SUSPENDCHANG.patch
deleted file mode 100644
index bb65309414e3a..0000000000000
--- a/patches.renesas/0137-cpufreq-remove-unused-notifier-CPUFREQ_-SUSPENDCHANG.patch
+++ /dev/null
@@ -1,157 +0,0 @@
-From c3a0c39f60e1cea0139d989209bfb7ce6773f3b9 Mon Sep 17 00:00:00 2001
-From: Viresh Kumar <viresh.kumar@linaro.org>
-Date: Wed, 19 Mar 2014 11:24:58 +0530
-Subject: cpufreq: remove unused notifier: CPUFREQ_{SUSPENDCHANGE|RESUMECHANGE}
-
-Two cpufreq notifiers CPUFREQ_RESUMECHANGE and CPUFREQ_SUSPENDCHANGE have
-not been used for some time, so remove them to clean up code a bit.
-
-Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
-Reviewed-by: Srivatsa S. Bhat <srivatsa.bhat@linux.vnet.ibm.com>
-[rjw: Changelog]
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-
-(cherry picked from commit 0b443ead714f0cba797a7f2476dd756f22b5421e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/cpu-freq/core.txt | 4 ----
- arch/arm/kernel/smp.c | 3 +--
- arch/arm/kernel/smp_twd.c | 2 +-
- arch/arm/mach-pxa/viper.c | 3 ---
- arch/powerpc/oprofile/op_model_cell.c | 3 +--
- arch/sparc/kernel/time_64.c | 3 +--
- arch/x86/kernel/tsc.c | 3 +--
- drivers/cpufreq/cpufreq.c | 3 +--
- drivers/pcmcia/sa11xx_base.c | 3 ---
- drivers/tty/serial/sh-sci.c | 3 +--
- include/linux/cpufreq.h | 2 --
- 11 files changed, 7 insertions(+), 25 deletions(-)
-
---- a/Documentation/cpu-freq/core.txt
-+++ b/Documentation/cpu-freq/core.txt
-@@ -92,7 +92,3 @@ values:
- cpu - number of the affected CPU
- old - old frequency
- new - new frequency
--
--If the cpufreq core detects the frequency has changed while the system
--was suspended, these notifiers are called with CPUFREQ_RESUMECHANGE as
--second argument.
---- a/arch/arm/kernel/smp.c
-+++ b/arch/arm/kernel/smp.c
-@@ -683,8 +683,7 @@ static int cpufreq_callback(struct notif
- }
-
- if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
-- (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
-- (val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) {
-+ (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
- loops_per_jiffy = cpufreq_scale(global_l_p_j_ref,
- global_l_p_j_ref_freq,
- freq->new);
---- a/arch/arm/kernel/smp_twd.c
-+++ b/arch/arm/kernel/smp_twd.c
-@@ -166,7 +166,7 @@ static int twd_cpufreq_transition(struct
- * frequency. The timer is local to a cpu, so cross-call to the
- * changing cpu.
- */
-- if (state == CPUFREQ_POSTCHANGE || state == CPUFREQ_RESUMECHANGE)
-+ if (state == CPUFREQ_POSTCHANGE)
- smp_call_function_single(freqs->cpu, twd_update_frequency,
- NULL, 1);
-
---- a/arch/arm/mach-pxa/viper.c
-+++ b/arch/arm/mach-pxa/viper.c
-@@ -885,9 +885,6 @@ static int viper_cpufreq_notifier(struct
- viper_set_core_cpu_voltage(freq->new, 0);
- }
- break;
-- case CPUFREQ_RESUMECHANGE:
-- viper_set_core_cpu_voltage(freq->new, 0);
-- break;
- default:
- /* ignore */
- break;
---- a/arch/powerpc/oprofile/op_model_cell.c
-+++ b/arch/powerpc/oprofile/op_model_cell.c
-@@ -1121,8 +1121,7 @@ oprof_cpufreq_notify(struct notifier_blo
- int ret = 0;
- struct cpufreq_freqs *frq = data;
- if ((val == CPUFREQ_PRECHANGE && frq->old < frq->new) ||
-- (val == CPUFREQ_POSTCHANGE && frq->old > frq->new) ||
-- (val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE))
-+ (val == CPUFREQ_POSTCHANGE && frq->old > frq->new))
- set_spu_profiling_frequency(frq->new, spu_cycle_reset);
- return ret;
- }
---- a/arch/sparc/kernel/time_64.c
-+++ b/arch/sparc/kernel/time_64.c
-@@ -659,8 +659,7 @@ static int sparc64_cpufreq_notifier(stru
- ft->clock_tick_ref = cpu_data(cpu).clock_tick;
- }
- if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
-- (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
-- (val == CPUFREQ_RESUMECHANGE)) {
-+ (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
- cpu_data(cpu).clock_tick =
- cpufreq_scale(ft->clock_tick_ref,
- ft->ref_freq,
---- a/arch/x86/kernel/tsc.c
-+++ b/arch/x86/kernel/tsc.c
-@@ -914,8 +914,7 @@ static int time_cpufreq_notifier(struct
- tsc_khz_ref = tsc_khz;
- }
- if ((val == CPUFREQ_PRECHANGE && freq->old < freq->new) ||
-- (val == CPUFREQ_POSTCHANGE && freq->old > freq->new) ||
-- (val == CPUFREQ_RESUMECHANGE)) {
-+ (val == CPUFREQ_POSTCHANGE && freq->old > freq->new)) {
- *lpj = cpufreq_scale(loops_per_jiffy_ref, ref_freq, freq->new);
-
- tsc_khz = cpufreq_scale(tsc_khz_ref, ref_freq, freq->new);
---- a/drivers/cpufreq/cpufreq.c
-+++ b/drivers/cpufreq/cpufreq.c
-@@ -257,8 +257,7 @@ static void adjust_jiffies(unsigned long
- pr_debug("saving %lu as reference value for loops_per_jiffy; "
- "freq is %u kHz\n", l_p_j_ref, l_p_j_ref_freq);
- }
-- if ((val == CPUFREQ_POSTCHANGE && ci->old != ci->new) ||
-- (val == CPUFREQ_RESUMECHANGE || val == CPUFREQ_SUSPENDCHANGE)) {
-+ if (val == CPUFREQ_POSTCHANGE && ci->old != ci->new) {
- loops_per_jiffy = cpufreq_scale(l_p_j_ref, l_p_j_ref_freq,
- ci->new);
- pr_debug("scaling loops_per_jiffy to %lu "
---- a/drivers/pcmcia/sa11xx_base.c
-+++ b/drivers/pcmcia/sa11xx_base.c
-@@ -125,9 +125,6 @@ sa1100_pcmcia_frequency_change(struct so
- if (freqs->new < freqs->old)
- sa1100_pcmcia_set_mecr(skt, freqs->new);
- break;
-- case CPUFREQ_RESUMECHANGE:
-- sa1100_pcmcia_set_mecr(skt, freqs->new);
-- break;
- }
-
- return 0;
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -1041,8 +1041,7 @@ static int sci_notifier(struct notifier_
-
- sci_port = container_of(self, struct sci_port, freq_transition);
-
-- if ((phase == CPUFREQ_POSTCHANGE) ||
-- (phase == CPUFREQ_RESUMECHANGE)) {
-+ if (phase == CPUFREQ_POSTCHANGE) {
- struct uart_port *port = &sci_port->port;
-
- spin_lock_irqsave(&port->lock, flags);
---- a/include/linux/cpufreq.h
-+++ b/include/linux/cpufreq.h
-@@ -306,8 +306,6 @@ cpufreq_verify_within_cpu_limits(struct
- /* Transition notifiers */
- #define CPUFREQ_PRECHANGE (0)
- #define CPUFREQ_POSTCHANGE (1)
--#define CPUFREQ_RESUMECHANGE (8)
--#define CPUFREQ_SUSPENDCHANGE (9)
-
- /* Policy Notifiers */
- #define CPUFREQ_ADJUST (0)
diff --git a/patches.renesas/0138-media-media-soc_camera-rcar_vin-Add-support-for-10-b.patch b/patches.renesas/0138-media-media-soc_camera-rcar_vin-Add-support-for-10-b.patch
deleted file mode 100644
index beafc0b3dca29..0000000000000
--- a/patches.renesas/0138-media-media-soc_camera-rcar_vin-Add-support-for-10-b.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 5fce7877354041df38ae2f08ba270f4bb8021488 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Tue, 25 Feb 2014 06:10:27 -0300
-Subject: [media] media: soc_camera: rcar_vin: Add support for 10-bit YUV
- cameras
-
-Add support for MBUS YUV10 BT656 and BT601 formats at rcar driver.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit cbe504d4d4d88375ef912975f816d1e3c3f14194)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/soc_camera/rcar_vin.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
-index 3b1c05a72d00..702dc47062a2 100644
---- a/drivers/media/platform/soc_camera/rcar_vin.c
-+++ b/drivers/media/platform/soc_camera/rcar_vin.c
-@@ -68,6 +68,8 @@
- #define VNMC_YCAL (1 << 19)
- #define VNMC_INF_YUV8_BT656 (0 << 16)
- #define VNMC_INF_YUV8_BT601 (1 << 16)
-+#define VNMC_INF_YUV10_BT656 (2 << 16)
-+#define VNMC_INF_YUV10_BT601 (3 << 16)
- #define VNMC_INF_YUV16 (5 << 16)
- #define VNMC_VUP (1 << 10)
- #define VNMC_IM_ODD (0 << 3)
-@@ -275,6 +277,12 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
- /* BT.656 8bit YCbCr422 or BT.601 8bit YCbCr422 */
- vnmc |= priv->pdata->flags & RCAR_VIN_BT656 ?
- VNMC_INF_YUV8_BT656 : VNMC_INF_YUV8_BT601;
-+ break;
-+ case V4L2_MBUS_FMT_YUYV10_2X10:
-+ /* BT.656 10bit YCbCr422 or BT.601 10bit YCbCr422 */
-+ vnmc |= priv->pdata->flags & RCAR_VIN_BT656 ?
-+ VNMC_INF_YUV10_BT656 : VNMC_INF_YUV10_BT601;
-+ break;
- default:
- break;
- }
-@@ -1003,6 +1011,7 @@ static int rcar_vin_get_formats(struct soc_camera_device *icd, unsigned int idx,
- switch (code) {
- case V4L2_MBUS_FMT_YUYV8_1X16:
- case V4L2_MBUS_FMT_YUYV8_2X8:
-+ case V4L2_MBUS_FMT_YUYV10_2X10:
- if (cam->extra_fmt)
- break;
-
---
-2.1.2
-
diff --git a/patches.renesas/0139-i2c-add-deprecation-warning-for-class-based-instanti.patch b/patches.renesas/0139-i2c-add-deprecation-warning-for-class-based-instanti.patch
deleted file mode 100644
index 3bd316bde7b9b..0000000000000
--- a/patches.renesas/0139-i2c-add-deprecation-warning-for-class-based-instanti.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 6a6becd1fa5fedfcb8305618fc68a931b0f0ed66 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@the-dreams.de>
-Date: Mon, 10 Feb 2014 11:03:56 +0100
-Subject: i2c: add deprecation warning for class based instantiation
-
-Class based instantiation can cause noticeable delays when booting. This
-mechanism is used when it is not possible to describe slaves on I2C
-busses. As we do have other mechanisms, most embedded I2C will not need
-classes and for embedded it is explicitly not recommended to use them. Add
-a deprecation warning for drivers which want to disable class based
-instantiation in the near future to gain boot-up time, so users relying
-on this technique can switch to something better. They really should.
-
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 0c176170089c3a7f2a891f9860f5cdc5f481ff78)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/i2c-core.c | 7 +++++++
- include/linux/i2c.h | 1 +
- 2 files changed, 8 insertions(+)
-
---- a/drivers/i2c/i2c-core.c
-+++ b/drivers/i2c/i2c-core.c
-@@ -1944,6 +1944,13 @@ static int i2c_detect_address(struct i2c
- struct i2c_client *client;
-
- /* Detection succeeded, instantiate the device */
-+ if (adapter->class & I2C_CLASS_DEPRECATED)
-+ dev_warn(&adapter->dev,
-+ "This adapter will soon drop class based instantiation of devices. "
-+ "Please make sure client 0x%02x gets instantiated by other means. "
-+ "Check 'Documentation/i2c/instantiating-devices' for details.\n",
-+ info.addr);
-+
- dev_dbg(&adapter->dev, "Creating %s at 0x%02x\n",
- info.type, info.addr);
- client = i2c_new_device(adapter, &info);
---- a/include/linux/i2c.h
-+++ b/include/linux/i2c.h
-@@ -487,6 +487,7 @@ void i2c_unlock_adapter(struct i2c_adapt
- #define I2C_CLASS_HWMON (1<<0) /* lm_sensors, ... */
- #define I2C_CLASS_DDC (1<<3) /* DDC bus on graphics adapters */
- #define I2C_CLASS_SPD (1<<7) /* Memory modules */
-+#define I2C_CLASS_DEPRECATED (1<<8) /* Warn users that adapter will stop using classes */
-
- /* Internal numbers to terminate lists */
- #define I2C_CLIENT_END 0xfffeU
diff --git a/patches.renesas/0140-i2c-rcar-add-compatible-entry-for-r8a7791.patch b/patches.renesas/0140-i2c-rcar-add-compatible-entry-for-r8a7791.patch
deleted file mode 100644
index b812d8935b0ea..0000000000000
--- a/patches.renesas/0140-i2c-rcar-add-compatible-entry-for-r8a7791.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From eb90b9b2e14bb641472568355f2c57e7c5110168 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Thu, 20 Feb 2014 09:03:20 +0100
-Subject: i2c: rcar: add compatible entry for r8a7791
-
-While we are here, also brush up the devicetree binding documentation.
-The example was an inappropriate copy from the sh_mobile driver.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit e89364556824cc7a947f99173af842217074c099)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 14 ++++++++++----
- drivers/i2c/busses/i2c-rcar.c | 1 +
- 2 files changed, 11 insertions(+), 4 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
-index 897cfcd5ce92..dd8b2dd1edeb 100644
---- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
-+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
-@@ -6,6 +6,7 @@ Required properties:
- "renesas,i2c-r8a7778"
- "renesas,i2c-r8a7779"
- "renesas,i2c-r8a7790"
-+ "renesas,i2c-r8a7791"
- - reg: physical base address of the controller and length of memory mapped
- region.
- - interrupts: interrupt specifier.
-@@ -13,11 +14,16 @@ Required properties:
- Optional properties:
- - clock-frequency: desired I2C bus clock frequency in Hz. The absence of this
- propoerty indicates the default frequency 100 kHz.
-+- clocks: clock specifier.
-
- Examples :
-
--i2c0: i2c@e6500000 {
-- compatible = "renesas,i2c-rcar-h2";
-- reg = <0 0xe6500000 0 0x428>;
-- interrupts = <0 174 0x4>;
-+i2c0: i2c@e6508000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6508000 0 0x40>;
-+ interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C0>;
-+ clock-frequency = <400000>;
- };
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index d3c5d6216575..233812c431c3 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -645,6 +645,7 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
- { .compatible = "renesas,i2c-r8a7778", .data = (void *)I2C_RCAR_GEN1 },
- { .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 },
- { .compatible = "renesas,i2c-r8a7790", .data = (void *)I2C_RCAR_GEN2 },
-+ { .compatible = "renesas,i2c-r8a7791", .data = (void *)I2C_RCAR_GEN2 },
- {},
- };
- MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
---
-2.1.2
-
diff --git a/patches.renesas/0141-i2c-i2c-rcar-deprecate-class-based-instantiation.patch b/patches.renesas/0141-i2c-i2c-rcar-deprecate-class-based-instantiation.patch
deleted file mode 100644
index 03d66a3859413..0000000000000
--- a/patches.renesas/0141-i2c-i2c-rcar-deprecate-class-based-instantiation.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6fd642d3cd7ba533c1794b14540fbdb337b93261 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@the-dreams.de>
-Date: Mon, 10 Feb 2014 11:04:06 +0100
-Subject: i2c: i2c-rcar: deprecate class based instantiation
-
-Warn users that class based instantiation is going away soon in favour
-of more robust probing and faster bootup times.
-
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 96c4b6bb5ddb03881dfc1c91410548432138d4ba)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 233812c431c3..06d47aafbb79 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -699,7 +699,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
- adap = &priv->adap;
- adap->nr = pdev->id;
- adap->algo = &rcar_i2c_algo;
-- adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD;
-+ adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD | I2C_CLASS_DEPRECATED;
- adap->retries = 3;
- adap->dev.parent = dev;
- adap->dev.of_node = dev->of_node;
---
-2.1.2
-
diff --git a/patches.renesas/0142-regulator-da9210-Remove-redundant-error-message.patch b/patches.renesas/0142-regulator-da9210-Remove-redundant-error-message.patch
deleted file mode 100644
index 6f1a1b35b4e69..0000000000000
--- a/patches.renesas/0142-regulator-da9210-Remove-redundant-error-message.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 0537baae6b2603fc814a50c0a524a52fe41172b9 Mon Sep 17 00:00:00 2001
-From: Sachin Kamat <sachin.kamat@linaro.org>
-Date: Thu, 20 Feb 2014 14:23:02 +0530
-Subject: regulator: da9210: Remove redundant error message
-
-kzalloc prints its own OOM message upon failure.
-
-Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6c48acfb2affa8b2aed810bb67888e0d1720a884)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/regulator/da9210-regulator.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/drivers/regulator/da9210-regulator.c b/drivers/regulator/da9210-regulator.c
-index 6f5ecbe1132e..7a320dd11c46 100644
---- a/drivers/regulator/da9210-regulator.c
-+++ b/drivers/regulator/da9210-regulator.c
-@@ -134,11 +134,8 @@ static int da9210_i2c_probe(struct i2c_client *i2c,
- int error;
-
- chip = devm_kzalloc(&i2c->dev, sizeof(struct da9210), GFP_KERNEL);
-- if (NULL == chip) {
-- dev_err(&i2c->dev,
-- "Cannot kzalloc memory for regulator structure\n");
-+ if (!chip)
- return -ENOMEM;
-- }
-
- chip->regmap = devm_regmap_init_i2c(i2c, &da9210_regmap_config);
- if (IS_ERR(chip->regmap)) {
---
-2.1.2
-
diff --git a/patches.renesas/0143-spi-Provide-core-support-for-DMA-mapping-transfers.patch b/patches.renesas/0143-spi-Provide-core-support-for-DMA-mapping-transfers.patch
deleted file mode 100644
index c836bc80007a7..0000000000000
--- a/patches.renesas/0143-spi-Provide-core-support-for-DMA-mapping-transfers.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-From ea9312515cb68c7a190c62a7288e5e0ad1447dd1 Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@linaro.org>
-Date: Thu, 16 Jan 2014 12:22:43 +0000
-Subject: spi: Provide core support for DMA mapping transfers
-
-The process of DMA mapping buffers for SPI transfers does not vary between
-devices so in order to save duplication of code in drivers this can be
-factored out into the core, allowing it to be integrated with the work that
-is being done on factoring out the common elements from the data path
-including more sharing of dmaengine code.
-
-In order to use this masters need to provide a can_dma() operation and while
-the hardware is prepared they should ensure that DMA channels are provided
-in tx_dma and rx_dma. The core will then ensure that the buffers are mapped
-for DMA prior to calling transfer_one_message().
-
-Currently the cleanup on error is not complete, this needs to be improved.
-
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 99adef310f682d6343cb40c1f6c9c25a4b3a450d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi.c | 82 ++++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/spi/spi.h | 18 ++++++++++
- 2 files changed, 100 insertions(+)
-
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -24,6 +24,8 @@
- #include <linux/device.h>
- #include <linux/init.h>
- #include <linux/cache.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/dmaengine.h>
- #include <linux/mutex.h>
- #include <linux/of_device.h>
- #include <linux/of_irq.h>
-@@ -580,6 +582,77 @@ static void spi_set_cs(struct spi_device
- spi->master->set_cs(spi, !enable);
- }
-
-+static int spi_map_msg(struct spi_master *master, struct spi_message *msg)
-+{
-+ struct device *dev = master->dev.parent;
-+ struct device *tx_dev, *rx_dev;
-+ struct spi_transfer *xfer;
-+
-+ if (msg->is_dma_mapped || !master->can_dma)
-+ return 0;
-+
-+ tx_dev = &master->dma_tx->dev->device;
-+ rx_dev = &master->dma_rx->dev->device;
-+
-+ list_for_each_entry(xfer, &msg->transfers, transfer_list) {
-+ if (!master->can_dma(master, msg->spi, xfer))
-+ continue;
-+
-+ if (xfer->tx_buf != NULL) {
-+ xfer->tx_dma = dma_map_single(tx_dev,
-+ (void *)xfer->tx_buf,
-+ xfer->len,
-+ DMA_TO_DEVICE);
-+ if (dma_mapping_error(dev, xfer->tx_dma)) {
-+ dev_err(dev, "dma_map_single Tx failed\n");
-+ return -ENOMEM;
-+ }
-+ }
-+
-+ if (xfer->rx_buf != NULL) {
-+ xfer->rx_dma = dma_map_single(rx_dev,
-+ xfer->rx_buf, xfer->len,
-+ DMA_FROM_DEVICE);
-+ if (dma_mapping_error(dev, xfer->rx_dma)) {
-+ dev_err(dev, "dma_map_single Rx failed\n");
-+ dma_unmap_single(tx_dev, xfer->tx_dma,
-+ xfer->len, DMA_TO_DEVICE);
-+ return -ENOMEM;
-+ }
-+ }
-+ }
-+
-+ master->cur_msg_mapped = true;
-+
-+ return 0;
-+}
-+
-+static int spi_unmap_msg(struct spi_master *master, struct spi_message *msg)
-+{
-+ struct spi_transfer *xfer;
-+ struct device *tx_dev, *rx_dev;
-+
-+ if (!master->cur_msg_mapped || msg->is_dma_mapped || !master->can_dma)
-+ return 0;
-+
-+ tx_dev = &master->dma_tx->dev->device;
-+ rx_dev = &master->dma_rx->dev->device;
-+
-+ list_for_each_entry(xfer, &msg->transfers, transfer_list) {
-+ if (!master->can_dma(master, msg->spi, xfer))
-+ continue;
-+
-+ if (xfer->rx_buf)
-+ dma_unmap_single(rx_dev, xfer->rx_dma, xfer->len,
-+ DMA_FROM_DEVICE);
-+ if (xfer->tx_buf)
-+ dma_unmap_single(tx_dev, xfer->tx_dma, xfer->len,
-+ DMA_TO_DEVICE);
-+ }
-+
-+ return 0;
-+}
-+
- /*
- * spi_transfer_one_message - Default implementation of transfer_one_message()
- *
-@@ -752,6 +825,13 @@ static void spi_pump_messages(struct kth
- master->cur_msg_prepared = true;
- }
-
-+ ret = spi_map_msg(master, master->cur_msg);
-+ if (ret) {
-+ master->cur_msg->status = ret;
-+ spi_finalize_current_message(master);
-+ return;
-+ }
-+
- ret = master->transfer_one_message(master, master->cur_msg);
- if (ret) {
- dev_err(&master->dev,
-@@ -836,6 +916,8 @@ void spi_finalize_current_message(struct
- mesg = master->cur_msg;
- spin_unlock_irqrestore(&master->queue_lock, flags);
-
-+ spi_unmap_msg(master, mesg);
-+
- if (master->cur_msg_prepared && master->unprepare_message) {
- ret = master->unprepare_message(master, mesg);
- if (ret) {
---- a/include/linux/spi/spi.h
-+++ b/include/linux/spi/spi.h
-@@ -25,6 +25,8 @@
- #include <linux/kthread.h>
- #include <linux/completion.h>
-
-+struct dma_chan;
-+
- /*
- * INTERFACES between SPI master-side drivers and SPI infrastructure.
- * (There's no SPI slave support for Linux yet...)
-@@ -390,6 +392,17 @@ struct spi_master {
- void (*cleanup)(struct spi_device *spi);
-
- /*
-+ * Used to enable core support for DMA handling, if can_dma()
-+ * exists and returns true then the transfer will be mapped
-+ * prior to transfer_one() being called. The driver should
-+ * not modify or store xfer and dma_tx and dma_rx must be set
-+ * while the device is prepared.
-+ */
-+ bool (*can_dma)(struct spi_master *master,
-+ struct spi_device *spi,
-+ struct spi_transfer *xfer);
-+
-+ /*
- * These hooks are for drivers that want to use the generic
- * master transfer queueing mechanism. If these are used, the
- * transfer() function above must NOT be specified by the driver.
-@@ -407,6 +420,7 @@ struct spi_master {
- bool rt;
- bool auto_runtime_pm;
- bool cur_msg_prepared;
-+ bool cur_msg_mapped;
- struct completion xfer_completion;
-
- int (*prepare_transfer_hardware)(struct spi_master *master);
-@@ -428,6 +442,10 @@ struct spi_master {
-
- /* gpio chip select */
- int *cs_gpios;
-+
-+ /* DMA channels for use with core dmaengine helpers */
-+ struct dma_chan *dma_tx;
-+ struct dma_chan *dma_rx;
- };
-
- static inline void *spi_master_get_devdata(struct spi_master *master)
diff --git a/patches.renesas/0144-spi-Provide-core-support-for-full-duplex-devices.patch b/patches.renesas/0144-spi-Provide-core-support-for-full-duplex-devices.patch
deleted file mode 100644
index df84313a76626..0000000000000
--- a/patches.renesas/0144-spi-Provide-core-support-for-full-duplex-devices.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 36996316db8296af016c6636b2fb5d00974fc2de Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@linaro.org>
-Date: Tue, 28 Jan 2014 20:17:03 +0000
-Subject: spi: Provide core support for full duplex devices
-
-It is fairly common for SPI devices to require that one or both transfer
-directions is always active. Currently drivers open code this in various
-ways with varying degrees of efficiency. Start factoring this out by
-providing flags SPI_MASTER_MUST_TX and SPI_MASTER_MUST_RX. These will cause
-the core to provide buffers for the requested direction if none are
-specified in the underlying transfer.
-
-Currently this is fairly inefficient since we actually allocate a data
-buffer which may get large, support for mapping transfers using a
-scatterlist will allow us to avoid this for DMA based transfers.
-
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 3a2eba9bd0a6447dfbc01635e4cd0689f5f2bdad)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi.c | 47 +++++++++++++++++++++++++++++++++++++++++++++++
- include/linux/spi/spi.h | 6 ++++++
- 2 files changed, 53 insertions(+)
-
-diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
-index 048eb72029a4..dbab6681a1a1 100644
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -587,6 +587,49 @@ static int spi_map_msg(struct spi_master *master, struct spi_message *msg)
- struct device *dev = master->dev.parent;
- struct device *tx_dev, *rx_dev;
- struct spi_transfer *xfer;
-+ void *tmp;
-+ size_t max_tx, max_rx;
-+
-+ if (master->flags & (SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX)) {
-+ max_tx = 0;
-+ max_rx = 0;
-+
-+ list_for_each_entry(xfer, &msg->transfers, transfer_list) {
-+ if ((master->flags & SPI_MASTER_MUST_TX) &&
-+ !xfer->tx_buf)
-+ max_tx = max(xfer->len, max_tx);
-+ if ((master->flags & SPI_MASTER_MUST_RX) &&
-+ !xfer->rx_buf)
-+ max_rx = max(xfer->len, max_rx);
-+ }
-+
-+ if (max_tx) {
-+ tmp = krealloc(master->dummy_tx, max_tx,
-+ GFP_KERNEL | GFP_DMA);
-+ if (!tmp)
-+ return -ENOMEM;
-+ master->dummy_tx = tmp;
-+ memset(tmp, 0, max_tx);
-+ }
-+
-+ if (max_rx) {
-+ tmp = krealloc(master->dummy_rx, max_rx,
-+ GFP_KERNEL | GFP_DMA);
-+ if (!tmp)
-+ return -ENOMEM;
-+ master->dummy_rx = tmp;
-+ }
-+
-+ if (max_tx || max_rx) {
-+ list_for_each_entry(xfer, &msg->transfers,
-+ transfer_list) {
-+ if (!xfer->tx_buf)
-+ xfer->tx_buf = master->dummy_tx;
-+ if (!xfer->rx_buf)
-+ xfer->rx_buf = master->dummy_rx;
-+ }
-+ }
-+ }
-
- if (msg->is_dma_mapped || !master->can_dma)
- return 0;
-@@ -759,6 +802,10 @@ static void spi_pump_messages(struct kthread_work *work)
- }
- master->busy = false;
- spin_unlock_irqrestore(&master->queue_lock, flags);
-+ kfree(master->dummy_rx);
-+ master->dummy_rx = NULL;
-+ kfree(master->dummy_tx);
-+ master->dummy_tx = NULL;
- if (master->unprepare_transfer_hardware &&
- master->unprepare_transfer_hardware(master))
- dev_err(&master->dev,
-diff --git a/include/linux/spi/spi.h b/include/linux/spi/spi.h
-index dd8b91d95110..c4c68093cd7c 100644
---- a/include/linux/spi/spi.h
-+++ b/include/linux/spi/spi.h
-@@ -350,6 +350,8 @@ struct spi_master {
- #define SPI_MASTER_HALF_DUPLEX BIT(0) /* can't do full duplex */
- #define SPI_MASTER_NO_RX BIT(1) /* can't do buffer read */
- #define SPI_MASTER_NO_TX BIT(2) /* can't do buffer write */
-+#define SPI_MASTER_MUST_RX BIT(3) /* requires rx */
-+#define SPI_MASTER_MUST_TX BIT(4) /* requires tx */
-
- /* lock and mutex for SPI bus locking */
- spinlock_t bus_lock_spinlock;
-@@ -446,6 +448,10 @@ struct spi_master {
- /* DMA channels for use with core dmaengine helpers */
- struct dma_chan *dma_tx;
- struct dma_chan *dma_rx;
-+
-+ /* dummy data for full duplex devices */
-+ void *dummy_rx;
-+ void *dummy_tx;
- };
-
- static inline void *spi_master_get_devdata(struct spi_master *master)
---
-2.1.2
-
diff --git a/patches.renesas/0145-spi-core-Ignore-unsupported-spi-tr-x-bus-width-prope.patch b/patches.renesas/0145-spi-core-Ignore-unsupported-spi-tr-x-bus-width-prope.patch
deleted file mode 100644
index 1c8e243180a3e..0000000000000
--- a/patches.renesas/0145-spi-core-Ignore-unsupported-spi-tr-x-bus-width-prope.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 213d3433d7939ab9a1318d32fe7e11d363da42dd Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 26 May 2014 14:05:25 +0200
-Subject: spi: core: Ignore unsupported spi-[tr]x-bus-width property values
-
-Rejecting unsupported values of spi-tx-bus-width and spi-rx-bus-width
-may break compatibility with future DTs. Just ignore them, falling back
-to Single SPI Transfers.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 80874d8c9e9cbfa195572dfea46f2314098b3869)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi.c | 18 ++++++++----------
- 1 file changed, 8 insertions(+), 10 deletions(-)
-
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -1192,11 +1192,10 @@ static void of_register_spi_devices(stru
- spi->mode |= SPI_TX_QUAD;
- break;
- default:
-- dev_err(&master->dev,
-- "spi-tx-bus-width %d not supported\n",
-- value);
-- spi_dev_put(spi);
-- continue;
-+ dev_warn(&master->dev,
-+ "spi-tx-bus-width %d not supported\n",
-+ value);
-+ break;
- }
- }
-
-@@ -1211,11 +1210,10 @@ static void of_register_spi_devices(stru
- spi->mode |= SPI_RX_QUAD;
- break;
- default:
-- dev_err(&master->dev,
-- "spi-rx-bus-width %d not supported\n",
-- value);
-- spi_dev_put(spi);
-- continue;
-+ dev_warn(&master->dev,
-+ "spi-rx-bus-width %d not supported\n",
-+ value);
-+ break;
- }
- }
-
diff --git a/patches.renesas/0146-spi-Make-core-DMA-mapping-functions-generate-scatter.patch b/patches.renesas/0146-spi-Make-core-DMA-mapping-functions-generate-scatter.patch
deleted file mode 100644
index abb9f1eeac442..0000000000000
--- a/patches.renesas/0146-spi-Make-core-DMA-mapping-functions-generate-scatter.patch
+++ /dev/null
@@ -1,285 +0,0 @@
-From bb6b8838d1fbc5eeaaa05fc4323d23bc031780ae Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@linaro.org>
-Date: Sun, 2 Feb 2014 13:47:47 +0000
-Subject: spi: Make core DMA mapping functions generate scatterlists
-
-We cannot unconditionally use dma_map_single() to map data for use with
-SPI since transfers may exceed a page and virtual addresses may not be
-provided with physically contiguous pages. Further, addresses allocated
-using vmalloc() need to be mapped differently to other addresses.
-
-Currently only the MXS driver handles all this, a few drivers do handle
-the possibility that buffers may not be physically contiguous which is
-the main potential problem but many don't even do that. Factoring this
-out into the core will make it easier for drivers to do a good job so if
-the driver is using the core DMA code then generate a scatterlist
-instead of mapping to a single address so do that.
-
-This code is mainly based on a combination of the existing code in the MXS
-and PXA2xx drivers. In future we should be able to extend it to allow the
-core to concatenate adjacent transfers if they are compatible, improving
-performance.
-
-Currently for simplicity clients are not allowed to use the scatterlist
-when they do DMA mapping, in the future the existing single address
-mappings will be replaced with use of the scatterlist most likely as
-part of pre-verifying transfers.
-
-This change makes it mandatory to use scatterlists when using the core DMA
-mapping so update the s3c64xx driver to do this when used with dmaengine.
-Doing so makes the code more ugly but it is expected that the old s3c-dma
-code can be removed very soon.
-
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6ad45a27cbe343ec8d7888e5edf6335499a4b555)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-s3c64xx.c | 14 +++++-
- drivers/spi/spi.c | 101 ++++++++++++++++++++++++++++++++++------------
- include/linux/spi/spi.h | 7 +++
- 3 files changed, 94 insertions(+), 28 deletions(-)
-
---- a/drivers/spi/spi-s3c64xx.c
-+++ b/drivers/spi/spi-s3c64xx.c
-@@ -381,7 +381,7 @@ static void s3c64xx_spi_dma_stop(struct
- #else
-
- static void prepare_dma(struct s3c64xx_spi_dma_data *dma,
-- unsigned len, dma_addr_t buf)
-+ struct sg_table *sgt)
- {
- struct s3c64xx_spi_driver_data *sdd;
- struct dma_slave_config config;
-@@ -407,8 +407,8 @@ static void prepare_dma(struct s3c64xx_s
- dmaengine_slave_config(dma->ch, &config);
- }
-
-- desc = dmaengine_prep_slave_single(dma->ch, buf, len,
-- dma->direction, DMA_PREP_INTERRUPT);
-+ desc = dmaengine_prep_slave_sg(dma->ch, sgt->sgl, sgt->nents,
-+ dma->direction, DMA_PREP_INTERRUPT);
-
- desc->callback = s3c64xx_spi_dmacb;
- desc->callback_param = dma;
-@@ -515,7 +515,11 @@ static void enable_datapath(struct s3c64
- chcfg |= S3C64XX_SPI_CH_TXCH_ON;
- if (dma_mode) {
- modecfg |= S3C64XX_SPI_MODE_TXDMA_ON;
-+#ifndef CONFIG_S3C_DMA
-+ prepare_dma(&sdd->tx_dma, &xfer->tx_sg);
-+#else
- prepare_dma(&sdd->tx_dma, xfer->len, xfer->tx_dma);
-+#endif
- } else {
- switch (sdd->cur_bpw) {
- case 32:
-@@ -547,7 +551,11 @@ static void enable_datapath(struct s3c64
- writel(((xfer->len * 8 / sdd->cur_bpw) & 0xffff)
- | S3C64XX_SPI_PACKET_CNT_EN,
- regs + S3C64XX_SPI_PACKET_CNT);
-+#ifndef CONFIG_S3C_DMA
-+ prepare_dma(&sdd->rx_dma, &xfer->rx_sg);
-+#else
- prepare_dma(&sdd->rx_dma, xfer->len, xfer->rx_dma);
-+#endif
- }
- }
-
---- a/drivers/spi/spi.c
-+++ b/drivers/spi/spi.c
-@@ -582,13 +582,70 @@ static void spi_set_cs(struct spi_device
- spi->master->set_cs(spi, !enable);
- }
-
-+static int spi_map_buf(struct spi_master *master, struct device *dev,
-+ struct sg_table *sgt, void *buf, size_t len,
-+ enum dma_data_direction dir)
-+{
-+ const bool vmalloced_buf = is_vmalloc_addr(buf);
-+ const int desc_len = vmalloced_buf ? PAGE_SIZE : master->max_dma_len;
-+ const int sgs = DIV_ROUND_UP(len, desc_len);
-+ struct page *vm_page;
-+ void *sg_buf;
-+ size_t min;
-+ int i, ret;
-+
-+ ret = sg_alloc_table(sgt, sgs, GFP_KERNEL);
-+ if (ret != 0)
-+ return ret;
-+
-+ for (i = 0; i < sgs; i++) {
-+ min = min_t(size_t, len, desc_len);
-+
-+ if (vmalloced_buf) {
-+ vm_page = vmalloc_to_page(buf);
-+ if (!vm_page) {
-+ sg_free_table(sgt);
-+ return -ENOMEM;
-+ }
-+ sg_buf = page_address(vm_page) +
-+ ((size_t)buf & ~PAGE_MASK);
-+ } else {
-+ sg_buf = buf;
-+ }
-+
-+ sg_set_buf(&sgt->sgl[i], sg_buf, min);
-+
-+ buf += min;
-+ len -= min;
-+ }
-+
-+ ret = dma_map_sg(dev, sgt->sgl, sgt->nents, dir);
-+ if (ret < 0) {
-+ sg_free_table(sgt);
-+ return ret;
-+ }
-+
-+ sgt->nents = ret;
-+
-+ return 0;
-+}
-+
-+static void spi_unmap_buf(struct spi_master *master, struct device *dev,
-+ struct sg_table *sgt, enum dma_data_direction dir)
-+{
-+ if (sgt->orig_nents) {
-+ dma_unmap_sg(dev, sgt->sgl, sgt->orig_nents, dir);
-+ sg_free_table(sgt);
-+ }
-+}
-+
- static int spi_map_msg(struct spi_master *master, struct spi_message *msg)
- {
-- struct device *dev = master->dev.parent;
- struct device *tx_dev, *rx_dev;
- struct spi_transfer *xfer;
- void *tmp;
- size_t max_tx, max_rx;
-+ int ret;
-
- if (master->flags & (SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX)) {
- max_tx = 0;
-@@ -631,7 +688,7 @@ static int spi_map_msg(struct spi_master
- }
- }
-
-- if (msg->is_dma_mapped || !master->can_dma)
-+ if (!master->can_dma)
- return 0;
-
- tx_dev = &master->dma_tx->dev->device;
-@@ -642,25 +699,21 @@ static int spi_map_msg(struct spi_master
- continue;
-
- if (xfer->tx_buf != NULL) {
-- xfer->tx_dma = dma_map_single(tx_dev,
-- (void *)xfer->tx_buf,
-- xfer->len,
-- DMA_TO_DEVICE);
-- if (dma_mapping_error(dev, xfer->tx_dma)) {
-- dev_err(dev, "dma_map_single Tx failed\n");
-- return -ENOMEM;
-- }
-+ ret = spi_map_buf(master, tx_dev, &xfer->tx_sg,
-+ (void *)xfer->tx_buf, xfer->len,
-+ DMA_TO_DEVICE);
-+ if (ret != 0)
-+ return ret;
- }
-
- if (xfer->rx_buf != NULL) {
-- xfer->rx_dma = dma_map_single(rx_dev,
-- xfer->rx_buf, xfer->len,
-- DMA_FROM_DEVICE);
-- if (dma_mapping_error(dev, xfer->rx_dma)) {
-- dev_err(dev, "dma_map_single Rx failed\n");
-- dma_unmap_single(tx_dev, xfer->tx_dma,
-- xfer->len, DMA_TO_DEVICE);
-- return -ENOMEM;
-+ ret = spi_map_buf(master, rx_dev, &xfer->rx_sg,
-+ xfer->rx_buf, xfer->len,
-+ DMA_FROM_DEVICE);
-+ if (ret != 0) {
-+ spi_unmap_buf(master, tx_dev, &xfer->tx_sg,
-+ DMA_TO_DEVICE);
-+ return ret;
- }
- }
- }
-@@ -675,7 +728,7 @@ static int spi_unmap_msg(struct spi_mast
- struct spi_transfer *xfer;
- struct device *tx_dev, *rx_dev;
-
-- if (!master->cur_msg_mapped || msg->is_dma_mapped || !master->can_dma)
-+ if (!master->cur_msg_mapped || !master->can_dma)
- return 0;
-
- tx_dev = &master->dma_tx->dev->device;
-@@ -685,12 +738,8 @@ static int spi_unmap_msg(struct spi_mast
- if (!master->can_dma(master, msg->spi, xfer))
- continue;
-
-- if (xfer->rx_buf)
-- dma_unmap_single(rx_dev, xfer->rx_dma, xfer->len,
-- DMA_FROM_DEVICE);
-- if (xfer->tx_buf)
-- dma_unmap_single(tx_dev, xfer->tx_dma, xfer->len,
-- DMA_TO_DEVICE);
-+ spi_unmap_buf(master, rx_dev, &xfer->rx_sg, DMA_FROM_DEVICE);
-+ spi_unmap_buf(master, tx_dev, &xfer->tx_sg, DMA_TO_DEVICE);
- }
-
- return 0;
-@@ -1501,6 +1550,8 @@ int spi_register_master(struct spi_maste
- mutex_init(&master->bus_lock_mutex);
- master->bus_lock_flag = 0;
- init_completion(&master->xfer_completion);
-+ if (!master->max_dma_len)
-+ master->max_dma_len = INT_MAX;
-
- /* register the device, then userspace will see it.
- * registration fails if the bus ID is in use.
---- a/include/linux/spi/spi.h
-+++ b/include/linux/spi/spi.h
-@@ -24,6 +24,7 @@
- #include <linux/slab.h>
- #include <linux/kthread.h>
- #include <linux/completion.h>
-+#include <linux/scatterlist.h>
-
- struct dma_chan;
-
-@@ -268,6 +269,7 @@ static inline void spi_unregister_driver
- * @auto_runtime_pm: the core should ensure a runtime PM reference is held
- * while the hardware is prepared, using the parent
- * device for the spidev
-+ * @max_dma_len: Maximum length of a DMA transfer for the device.
- * @prepare_transfer_hardware: a message will soon arrive from the queue
- * so the subsystem requests the driver to prepare the transfer hardware
- * by issuing this call
-@@ -424,6 +426,7 @@ struct spi_master {
- bool cur_msg_prepared;
- bool cur_msg_mapped;
- struct completion xfer_completion;
-+ size_t max_dma_len;
-
- int (*prepare_transfer_hardware)(struct spi_master *master);
- int (*transfer_one_message)(struct spi_master *master,
-@@ -536,6 +539,8 @@ extern struct spi_master *spi_busnum_to_
- * (optionally) changing the chipselect status, then starting
- * the next transfer or completing this @spi_message.
- * @transfer_list: transfers are sequenced through @spi_message.transfers
-+ * @tx_sg: Scatterlist for transmit, currently not for client use
-+ * @rx_sg: Scatterlist for receive, currently not for client use
- *
- * SPI transfers always write the same number of bytes as they read.
- * Protocol drivers should always provide @rx_buf and/or @tx_buf.
-@@ -603,6 +608,8 @@ struct spi_transfer {
-
- dma_addr_t tx_dma;
- dma_addr_t rx_dma;
-+ struct sg_table tx_sg;
-+ struct sg_table rx_sg;
-
- unsigned cs_change:1;
- unsigned tx_nbits:3;
diff --git a/patches.renesas/0147-regulator-core-Allow-regulator_set_voltage-for-fixed.patch b/patches.renesas/0147-regulator-core-Allow-regulator_set_voltage-for-fixed.patch
deleted file mode 100644
index a059069422453..0000000000000
--- a/patches.renesas/0147-regulator-core-Allow-regulator_set_voltage-for-fixed.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From da34517710552131881039400947fec6ec621ee7 Mon Sep 17 00:00:00 2001
-From: Bjorn Andersson <bjorn@kryo.se>
-Date: Wed, 5 Feb 2014 12:30:26 -0800
-Subject: regulator: core: Allow regulator_set_voltage for fixed regulators
-
-Make it okay to call regulator_set_voltage on regulators with fixed
-voltage if the requested range overlaps the current/configured voltage.
-
-Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c00dc359e5e0b10de993651d8e73e60c41bf29cd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d5c3595331d512c6af6b636cef687421c2ba11e3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/regulator/core.c | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
---- a/drivers/regulator/core.c
-+++ b/drivers/regulator/core.c
-@@ -2405,6 +2405,7 @@ int regulator_set_voltage(struct regulat
- struct regulator_dev *rdev = regulator->rdev;
- int ret = 0;
- int old_min_uV, old_max_uV;
-+ int current_uV;
-
- mutex_lock(&rdev->mutex);
-
-@@ -2415,6 +2416,19 @@ int regulator_set_voltage(struct regulat
- if (regulator->min_uV == min_uV && regulator->max_uV == max_uV)
- goto out;
-
-+ /* If we're trying to set a range that overlaps the current voltage,
-+ * return succesfully even though the regulator does not support
-+ * changing the voltage.
-+ */
-+ if (!(rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE)) {
-+ current_uV = _regulator_get_voltage(rdev);
-+ if (min_uV <= current_uV && current_uV <= max_uV) {
-+ regulator->min_uV = min_uV;
-+ regulator->max_uV = max_uV;
-+ goto out;
-+ }
-+ }
-+
- /* sanity check */
- if (!rdev->desc->ops->set_voltage &&
- !rdev->desc->ops->set_voltage_sel) {
diff --git a/patches.renesas/0148-DMA-shdma-Fix-warnings-due-to-improper-casts-and-pri.patch b/patches.renesas/0148-DMA-shdma-Fix-warnings-due-to-improper-casts-and-pri.patch
deleted file mode 100644
index 21bb4554601fe..0000000000000
--- a/patches.renesas/0148-DMA-shdma-Fix-warnings-due-to-improper-casts-and-pri.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 05def426e1d6c75750069a663f0f43c12ada76c4 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 11 Dec 2013 15:29:15 +0100
-Subject: DMA: shdma: Fix warnings due to improper casts and printk formats
-
-Use the %zu and %pad printk specifiers to print size_t and dma_addr_t
-variables, and cast pointers to uintptr_t instead of unsigned int where
-applicable. This fixes warnings on platforms where pointers and/or
-dma_addr_t have a different size than int
-
-Cc: Guennadi Liakhovetski <g.liakhovetski+renesas@gmail.com>
-Cc: Vinod Koul <vinod.koul@intel.com>
-Cc: dmaengine@vger.kernel.org
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-(cherry picked from commit 42e4a12a0d92d09de66d8b5b2c85855b8051c15e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/dma/sh/shdma-base.c | 10 +++++-----
- drivers/dma/sh/shdma-of.c | 3 ++-
- drivers/dma/sh/sudmac.c | 4 ++--
- 3 files changed, 9 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
-index 2e7b394def80..52396771acbe 100644
---- a/drivers/dma/sh/shdma-base.c
-+++ b/drivers/dma/sh/shdma-base.c
-@@ -227,7 +227,7 @@ bool shdma_chan_filter(struct dma_chan *chan, void *arg)
- struct shdma_chan *schan = to_shdma_chan(chan);
- struct shdma_dev *sdev = to_shdma_dev(schan->dma_chan.device);
- const struct shdma_ops *ops = sdev->ops;
-- int match = (int)arg;
-+ int match = (long)arg;
- int ret;
-
- if (match < 0)
-@@ -491,8 +491,8 @@ static struct shdma_desc *shdma_add_desc(struct shdma_chan *schan,
- }
-
- dev_dbg(schan->dev,
-- "chaining (%u/%u)@%x -> %x with %p, cookie %d\n",
-- copy_size, *len, *src, *dst, &new->async_tx,
-+ "chaining (%zu/%zu)@%pad -> %pad with %p, cookie %d\n",
-+ copy_size, *len, src, dst, &new->async_tx,
- new->async_tx.cookie);
-
- new->mark = DESC_PREPARED;
-@@ -555,8 +555,8 @@ static struct dma_async_tx_descriptor *shdma_prep_sg(struct shdma_chan *schan,
- goto err_get_desc;
-
- do {
-- dev_dbg(schan->dev, "Add SG #%d@%p[%d], dma %llx\n",
-- i, sg, len, (unsigned long long)sg_addr);
-+ dev_dbg(schan->dev, "Add SG #%d@%p[%zu], dma %pad\n",
-+ i, sg, len, &sg_addr);
-
- if (direction == DMA_DEV_TO_MEM)
- new = shdma_add_desc(schan, flags,
-diff --git a/drivers/dma/sh/shdma-of.c b/drivers/dma/sh/shdma-of.c
-index 06473a05fe4e..b4ff9d3e56d1 100644
---- a/drivers/dma/sh/shdma-of.c
-+++ b/drivers/dma/sh/shdma-of.c
-@@ -33,7 +33,8 @@ static struct dma_chan *shdma_of_xlate(struct of_phandle_args *dma_spec,
- /* Only slave DMA channels can be allocated via DT */
- dma_cap_set(DMA_SLAVE, mask);
-
-- chan = dma_request_channel(mask, shdma_chan_filter, (void *)id);
-+ chan = dma_request_channel(mask, shdma_chan_filter,
-+ (void *)(uintptr_t)id);
- if (chan)
- to_shdma_chan(chan)->hw_req = id;
-
-diff --git a/drivers/dma/sh/sudmac.c b/drivers/dma/sh/sudmac.c
-index c7e9cdff0708..4e7df43b50d6 100644
---- a/drivers/dma/sh/sudmac.c
-+++ b/drivers/dma/sh/sudmac.c
-@@ -178,8 +178,8 @@ static int sudmac_desc_setup(struct shdma_chan *schan,
- struct sudmac_chan *sc = to_chan(schan);
- struct sudmac_desc *sd = to_desc(sdesc);
-
-- dev_dbg(sc->shdma_chan.dev, "%s: src=%x, dst=%x, len=%d\n",
-- __func__, src, dst, *len);
-+ dev_dbg(sc->shdma_chan.dev, "%s: src=%pad, dst=%pad, len=%zu\n",
-+ __func__, &src, &dst, *len);
-
- if (*len > schan->max_xfer_len)
- *len = schan->max_xfer_len;
---
-2.1.2
-
diff --git a/patches.renesas/0149-shdma-add-R-Car-Audio-DMAC-peri-peri-driver.patch b/patches.renesas/0149-shdma-add-R-Car-Audio-DMAC-peri-peri-driver.patch
deleted file mode 100644
index dcc73a9c5f2b1..0000000000000
--- a/patches.renesas/0149-shdma-add-R-Car-Audio-DMAC-peri-peri-driver.patch
+++ /dev/null
@@ -1,419 +0,0 @@
-From 4a005a3a4332c487525abd14a3df9634b4bd55bd Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 10 Mar 2014 18:11:50 -0700
-Subject: shdma: add R-Car Audio DMAC peri peri driver
-
-Add support Audio DMAC peri peri driver
-for Renesas R-Car Gen2 SoC, using 'shdma-base'
-DMA driver framework.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-[fixed checkpatch error]
-Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-
-(cherry picked from commit e43a34e3ec5d1b14a11c3220f5a12aa797d73cd1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/dma/sh/Kconfig | 6 +
- drivers/dma/sh/Makefile | 1 +
- drivers/dma/sh/rcar-audmapp.c | 320 +++++++++++++++++++++++++
- include/linux/platform_data/dma-rcar-audmapp.h | 34 +++
- 4 files changed, 361 insertions(+)
- create mode 100644 drivers/dma/sh/rcar-audmapp.c
- create mode 100644 include/linux/platform_data/dma-rcar-audmapp.h
-
-diff --git a/drivers/dma/sh/Kconfig b/drivers/dma/sh/Kconfig
-index dadd9e010c0b..b4c813831006 100644
---- a/drivers/dma/sh/Kconfig
-+++ b/drivers/dma/sh/Kconfig
-@@ -29,6 +29,12 @@ config RCAR_HPB_DMAE
- help
- Enable support for the Renesas R-Car series DMA controllers.
-
-+config RCAR_AUDMAC_PP
-+ tristate "Renesas R-Car Audio DMAC Peripheral Peripheral support"
-+ depends on SH_DMAE_BASE
-+ help
-+ Enable support for the Renesas R-Car Audio DMAC Peripheral Peripheral controllers.
-+
- config SHDMA_R8A73A4
- def_bool y
- depends on ARCH_R8A73A4 && SH_DMAE != n
-diff --git a/drivers/dma/sh/Makefile b/drivers/dma/sh/Makefile
-index e856af23b789..1ce88b28cfc6 100644
---- a/drivers/dma/sh/Makefile
-+++ b/drivers/dma/sh/Makefile
-@@ -7,3 +7,4 @@ endif
- shdma-objs := $(shdma-y)
- obj-$(CONFIG_SUDMAC) += sudmac.o
- obj-$(CONFIG_RCAR_HPB_DMAE) += rcar-hpbdma.o
-+obj-$(CONFIG_RCAR_AUDMAC_PP) += rcar-audmapp.o
-diff --git a/drivers/dma/sh/rcar-audmapp.c b/drivers/dma/sh/rcar-audmapp.c
-new file mode 100644
-index 000000000000..2de77289a2e9
---- /dev/null
-+++ b/drivers/dma/sh/rcar-audmapp.c
-@@ -0,0 +1,320 @@
-+/*
-+ * This is for Renesas R-Car Audio-DMAC-peri-peri.
-+ *
-+ * Copyright (C) 2014 Renesas Electronics Corporation
-+ * Copyright (C) 2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-+ *
-+ * based on the drivers/dma/sh/shdma.c
-+ *
-+ * Copyright (C) 2011-2012 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-+ * Copyright (C) 2009 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com>
-+ * Copyright (C) 2009 Renesas Solutions, Inc. All rights reserved.
-+ * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved.
-+ *
-+ * This is free software; you can redistribute it and/or modify
-+ * it under the terms of the GNU General Public License as published by
-+ * the Free Software Foundation; either version 2 of the License, or
-+ * (at your option) any later version.
-+ *
-+ */
-+#include <linux/delay.h>
-+#include <linux/init.h>
-+#include <linux/module.h>
-+#include <linux/slab.h>
-+#include <linux/dmaengine.h>
-+#include <linux/platform_data/dma-rcar-audmapp.h>
-+#include <linux/platform_device.h>
-+#include <linux/shdma-base.h>
-+
-+/*
-+ * DMA register
-+ */
-+#define PDMASAR 0x00
-+#define PDMADAR 0x04
-+#define PDMACHCR 0x0c
-+
-+/* PDMACHCR */
-+#define PDMACHCR_DE (1 << 0)
-+
-+#define AUDMAPP_MAX_CHANNELS 29
-+
-+/* Default MEMCPY transfer size = 2^2 = 4 bytes */
-+#define LOG2_DEFAULT_XFER_SIZE 2
-+#define AUDMAPP_SLAVE_NUMBER 256
-+#define AUDMAPP_LEN_MAX (16 * 1024 * 1024)
-+
-+struct audmapp_chan {
-+ struct shdma_chan shdma_chan;
-+ struct audmapp_slave_config *config;
-+ void __iomem *base;
-+};
-+
-+struct audmapp_device {
-+ struct shdma_dev shdma_dev;
-+ struct audmapp_pdata *pdata;
-+ struct device *dev;
-+ void __iomem *chan_reg;
-+};
-+
-+#define to_chan(chan) container_of(chan, struct audmapp_chan, shdma_chan)
-+#define to_dev(chan) container_of(chan->shdma_chan.dma_chan.device, \
-+ struct audmapp_device, shdma_dev.dma_dev)
-+
-+static void audmapp_write(struct audmapp_chan *auchan, u32 data, u32 reg)
-+{
-+ struct audmapp_device *audev = to_dev(auchan);
-+ struct device *dev = audev->dev;
-+
-+ dev_dbg(dev, "w %p : %08x\n", auchan->base + reg, data);
-+
-+ iowrite32(data, auchan->base + reg);
-+}
-+
-+static u32 audmapp_read(struct audmapp_chan *auchan, u32 reg)
-+{
-+ return ioread32(auchan->base + reg);
-+}
-+
-+static void audmapp_halt(struct shdma_chan *schan)
-+{
-+ struct audmapp_chan *auchan = to_chan(schan);
-+ int i;
-+
-+ audmapp_write(auchan, 0, PDMACHCR);
-+
-+ for (i = 0; i < 1024; i++) {
-+ if (0 == audmapp_read(auchan, PDMACHCR))
-+ return;
-+ udelay(1);
-+ }
-+}
-+
-+static void audmapp_start_xfer(struct shdma_chan *schan,
-+ struct shdma_desc *sdecs)
-+{
-+ struct audmapp_chan *auchan = to_chan(schan);
-+ struct audmapp_device *audev = to_dev(auchan);
-+ struct audmapp_slave_config *cfg = auchan->config;
-+ struct device *dev = audev->dev;
-+ u32 chcr = cfg->chcr | PDMACHCR_DE;
-+
-+ dev_dbg(dev, "src/dst/chcr = %pad/%pad/%x\n",
-+ &cfg->src, &cfg->dst, cfg->chcr);
-+
-+ audmapp_write(auchan, cfg->src, PDMASAR);
-+ audmapp_write(auchan, cfg->dst, PDMADAR);
-+ audmapp_write(auchan, chcr, PDMACHCR);
-+}
-+
-+static struct audmapp_slave_config *
-+audmapp_find_slave(struct audmapp_chan *auchan, int slave_id)
-+{
-+ struct audmapp_device *audev = to_dev(auchan);
-+ struct audmapp_pdata *pdata = audev->pdata;
-+ struct audmapp_slave_config *cfg;
-+ int i;
-+
-+ if (slave_id >= AUDMAPP_SLAVE_NUMBER)
-+ return NULL;
-+
-+ for (i = 0, cfg = pdata->slave; i < pdata->slave_num; i++, cfg++)
-+ if (cfg->slave_id == slave_id)
-+ return cfg;
-+
-+ return NULL;
-+}
-+
-+static int audmapp_set_slave(struct shdma_chan *schan, int slave_id,
-+ dma_addr_t slave_addr, bool try)
-+{
-+ struct audmapp_chan *auchan = to_chan(schan);
-+ struct audmapp_slave_config *cfg =
-+ audmapp_find_slave(auchan, slave_id);
-+
-+ if (!cfg)
-+ return -ENODEV;
-+ if (try)
-+ return 0;
-+
-+ auchan->config = cfg;
-+
-+ return 0;
-+}
-+
-+static int audmapp_desc_setup(struct shdma_chan *schan,
-+ struct shdma_desc *sdecs,
-+ dma_addr_t src, dma_addr_t dst, size_t *len)
-+{
-+ struct audmapp_chan *auchan = to_chan(schan);
-+ struct audmapp_slave_config *cfg = auchan->config;
-+
-+ if (!cfg)
-+ return -ENODEV;
-+
-+ if (*len > (size_t)AUDMAPP_LEN_MAX)
-+ *len = (size_t)AUDMAPP_LEN_MAX;
-+
-+ return 0;
-+}
-+
-+static void audmapp_setup_xfer(struct shdma_chan *schan,
-+ int slave_id)
-+{
-+}
-+
-+static dma_addr_t audmapp_slave_addr(struct shdma_chan *schan)
-+{
-+ return 0; /* always fixed address */
-+}
-+
-+static bool audmapp_channel_busy(struct shdma_chan *schan)
-+{
-+ struct audmapp_chan *auchan = to_chan(schan);
-+ u32 chcr = audmapp_read(auchan, PDMACHCR);
-+
-+ return chcr & ~PDMACHCR_DE;
-+}
-+
-+static bool audmapp_desc_completed(struct shdma_chan *schan,
-+ struct shdma_desc *sdesc)
-+{
-+ return true;
-+}
-+
-+static struct shdma_desc *audmapp_embedded_desc(void *buf, int i)
-+{
-+ return &((struct shdma_desc *)buf)[i];
-+}
-+
-+static const struct shdma_ops audmapp_shdma_ops = {
-+ .halt_channel = audmapp_halt,
-+ .desc_setup = audmapp_desc_setup,
-+ .set_slave = audmapp_set_slave,
-+ .start_xfer = audmapp_start_xfer,
-+ .embedded_desc = audmapp_embedded_desc,
-+ .setup_xfer = audmapp_setup_xfer,
-+ .slave_addr = audmapp_slave_addr,
-+ .channel_busy = audmapp_channel_busy,
-+ .desc_completed = audmapp_desc_completed,
-+};
-+
-+static int audmapp_chan_probe(struct platform_device *pdev,
-+ struct audmapp_device *audev, int id)
-+{
-+ struct shdma_dev *sdev = &audev->shdma_dev;
-+ struct audmapp_chan *auchan;
-+ struct shdma_chan *schan;
-+ struct device *dev = audev->dev;
-+
-+ auchan = devm_kzalloc(dev, sizeof(*auchan), GFP_KERNEL);
-+ if (!auchan)
-+ return -ENOMEM;
-+
-+ schan = &auchan->shdma_chan;
-+ schan->max_xfer_len = AUDMAPP_LEN_MAX;
-+
-+ shdma_chan_probe(sdev, schan, id);
-+
-+ auchan->base = audev->chan_reg + 0x20 + (0x10 * id);
-+ dev_dbg(dev, "%02d : %p / %p", id, auchan->base, audev->chan_reg);
-+
-+ return 0;
-+}
-+
-+static void audmapp_chan_remove(struct audmapp_device *audev)
-+{
-+ struct dma_device *dma_dev = &audev->shdma_dev.dma_dev;
-+ struct shdma_chan *schan;
-+ int i;
-+
-+ shdma_for_each_chan(schan, &audev->shdma_dev, i) {
-+ BUG_ON(!schan);
-+ shdma_chan_remove(schan);
-+ }
-+ dma_dev->chancnt = 0;
-+}
-+
-+static int audmapp_probe(struct platform_device *pdev)
-+{
-+ struct audmapp_pdata *pdata = pdev->dev.platform_data;
-+ struct audmapp_device *audev;
-+ struct shdma_dev *sdev;
-+ struct dma_device *dma_dev;
-+ struct resource *res;
-+ int err, i;
-+
-+ if (!pdata)
-+ return -ENODEV;
-+
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
-+ audev = devm_kzalloc(&pdev->dev, sizeof(*audev), GFP_KERNEL);
-+ if (!audev)
-+ return -ENOMEM;
-+
-+ audev->dev = &pdev->dev;
-+ audev->pdata = pdata;
-+ audev->chan_reg = devm_ioremap_resource(&pdev->dev, res);
-+ if (IS_ERR(audev->chan_reg))
-+ return PTR_ERR(audev->chan_reg);
-+
-+ sdev = &audev->shdma_dev;
-+ sdev->ops = &audmapp_shdma_ops;
-+ sdev->desc_size = sizeof(struct shdma_desc);
-+
-+ dma_dev = &sdev->dma_dev;
-+ dma_dev->copy_align = LOG2_DEFAULT_XFER_SIZE;
-+ dma_cap_set(DMA_SLAVE, dma_dev->cap_mask);
-+
-+ err = shdma_init(&pdev->dev, sdev, AUDMAPP_MAX_CHANNELS);
-+ if (err < 0)
-+ return err;
-+
-+ platform_set_drvdata(pdev, audev);
-+
-+ /* Create DMA Channel */
-+ for (i = 0; i < AUDMAPP_MAX_CHANNELS; i++) {
-+ err = audmapp_chan_probe(pdev, audev, i);
-+ if (err)
-+ goto chan_probe_err;
-+ }
-+
-+ err = dma_async_device_register(dma_dev);
-+ if (err < 0)
-+ goto chan_probe_err;
-+
-+ return err;
-+
-+chan_probe_err:
-+ audmapp_chan_remove(audev);
-+ shdma_cleanup(sdev);
-+
-+ return err;
-+}
-+
-+static int audmapp_remove(struct platform_device *pdev)
-+{
-+ struct audmapp_device *audev = platform_get_drvdata(pdev);
-+ struct dma_device *dma_dev = &audev->shdma_dev.dma_dev;
-+
-+ dma_async_device_unregister(dma_dev);
-+
-+ audmapp_chan_remove(audev);
-+ shdma_cleanup(&audev->shdma_dev);
-+
-+ return 0;
-+}
-+
-+static struct platform_driver audmapp_driver = {
-+ .probe = audmapp_probe,
-+ .remove = audmapp_remove,
-+ .driver = {
-+ .owner = THIS_MODULE,
-+ .name = "rcar-audmapp-engine",
-+ },
-+};
-+module_platform_driver(audmapp_driver);
-+
-+MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
-+MODULE_DESCRIPTION("Renesas R-Car Audio DMAC peri-peri driver");
-+MODULE_LICENSE("GPL");
-diff --git a/include/linux/platform_data/dma-rcar-audmapp.h b/include/linux/platform_data/dma-rcar-audmapp.h
-new file mode 100644
-index 000000000000..471fffebbeb4
---- /dev/null
-+++ b/include/linux/platform_data/dma-rcar-audmapp.h
-@@ -0,0 +1,34 @@
-+/*
-+ * This is for Renesas R-Car Audio-DMAC-peri-peri.
-+ *
-+ * Copyright (C) 2014 Renesas Electronics Corporation
-+ * Copyright (C) 2014 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-+ *
-+ * This file is based on the include/linux/sh_dma.h
-+ *
-+ * Header for the new SH dmaengine driver
-+ *
-+ * Copyright (C) 2010 Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-+ *
-+ * 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 SH_AUDMAPP_H
-+#define SH_AUDMAPP_H
-+
-+#include <linux/dmaengine.h>
-+
-+struct audmapp_slave_config {
-+ int slave_id;
-+ dma_addr_t src;
-+ dma_addr_t dst;
-+ u32 chcr;
-+};
-+
-+struct audmapp_pdata {
-+ struct audmapp_slave_config *slave;
-+ int slave_num;
-+};
-+
-+#endif /* SH_AUDMAPP_H */
---
-2.1.2
-
diff --git a/patches.renesas/0150-of-add-functions-to-count-number-of-elements-in-a-pr.patch b/patches.renesas/0150-of-add-functions-to-count-number-of-elements-in-a-pr.patch
deleted file mode 100644
index b901981b820d3..0000000000000
--- a/patches.renesas/0150-of-add-functions-to-count-number-of-elements-in-a-pr.patch
+++ /dev/null
@@ -1,164 +0,0 @@
-From ae34ad43660203b9c5264ef2f281eb4aea5240a0 Mon Sep 17 00:00:00 2001
-From: Heiko Stuebner <heiko.stuebner@bqreaders.com>
-Date: Wed, 12 Feb 2014 01:00:34 +0100
-Subject: of: add functions to count number of elements in a property
-
-The need to know the number of array elements in a property is
-a common pattern. To prevent duplication of open-coded implementations
-add a helper static function that also centralises strict sanity
-checking and DTB format details, as well as a set of wrapper functions
-for u8, u16, u32 and u64.
-
-Suggested-by: Mark Rutland <mark.rutland@arm.com>
-Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
-Acked-by: Rob Herring <robh@kernel.org>
-Acked-by: Grant Likely <grant.likely@linaro.org>
-Acked-by: Mark Rutland <mark.rutland@arm.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ad54a0cfbeb4bd4033d09017557ccbc423f9d5ff)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/of/base.c | 32 ++++++++++++++++++++++
- include/linux/of.h | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 108 insertions(+)
-
---- a/drivers/of/base.c
-+++ b/drivers/of/base.c
-@@ -904,6 +904,38 @@ struct device_node *of_find_node_by_phan
- EXPORT_SYMBOL(of_find_node_by_phandle);
-
- /**
-+ * of_property_count_elems_of_size - Count the number of elements in a property
-+ *
-+ * @np: device node from which the property value is to be read.
-+ * @propname: name of the property to be searched.
-+ * @elem_size: size of the individual element
-+ *
-+ * Search for a property in a device node and count the number of elements of
-+ * size elem_size in it. Returns number of elements on sucess, -EINVAL if the
-+ * property does not exist or its length does not match a multiple of elem_size
-+ * and -ENODATA if the property does not have a value.
-+ */
-+int of_property_count_elems_of_size(const struct device_node *np,
-+ const char *propname, int elem_size)
-+{
-+ struct property *prop = of_find_property(np, propname, NULL);
-+
-+ if (!prop)
-+ return -EINVAL;
-+ if (!prop->value)
-+ return -ENODATA;
-+
-+ if (prop->length % elem_size != 0) {
-+ pr_err("size of %s in node %s is not a multiple of %d\n",
-+ propname, np->full_name, elem_size);
-+ return -EINVAL;
-+ }
-+
-+ return prop->length / elem_size;
-+}
-+EXPORT_SYMBOL_GPL(of_property_count_elems_of_size);
-+
-+/**
- * of_find_property_value_of_size
- *
- * @np: device node from which the property value is to be read.
---- a/include/linux/of.h
-+++ b/include/linux/of.h
-@@ -198,6 +198,8 @@ extern struct device_node *of_find_node_
- extern struct property *of_find_property(const struct device_node *np,
- const char *name,
- int *lenp);
-+extern int of_property_count_elems_of_size(const struct device_node *np,
-+ const char *propname, int elem_size);
- extern int of_property_read_u32_index(const struct device_node *np,
- const char *propname,
- u32 index, u32 *out_value);
-@@ -388,6 +390,12 @@ static inline struct device_node *of_fin
- return NULL;
- }
-
-+static inline int of_property_count_elems_of_size(const struct device_node *np,
-+ const char *propname, int elem_size)
-+{
-+ return -ENOSYS;
-+}
-+
- static inline int of_property_read_u32_index(const struct device_node *np,
- const char *propname, u32 index, u32 *out_value)
- {
-@@ -595,6 +603,74 @@ static inline int of_property_read_strin
- }
-
- /**
-+ * of_property_count_u8_elems - Count the number of u8 elements in a property
-+ *
-+ * @np: device node from which the property value is to be read.
-+ * @propname: name of the property to be searched.
-+ *
-+ * Search for a property in a device node and count the number of u8 elements
-+ * in it. Returns number of elements on sucess, -EINVAL if the property does
-+ * not exist or its length does not match a multiple of u8 and -ENODATA if the
-+ * property does not have a value.
-+ */
-+static inline int of_property_count_u8_elems(const struct device_node *np,
-+ const char *propname)
-+{
-+ return of_property_count_elems_of_size(np, propname, sizeof(u8));
-+}
-+
-+/**
-+ * of_property_count_u16_elems - Count the number of u16 elements in a property
-+ *
-+ * @np: device node from which the property value is to be read.
-+ * @propname: name of the property to be searched.
-+ *
-+ * Search for a property in a device node and count the number of u16 elements
-+ * in it. Returns number of elements on sucess, -EINVAL if the property does
-+ * not exist or its length does not match a multiple of u16 and -ENODATA if the
-+ * property does not have a value.
-+ */
-+static inline int of_property_count_u16_elems(const struct device_node *np,
-+ const char *propname)
-+{
-+ return of_property_count_elems_of_size(np, propname, sizeof(u16));
-+}
-+
-+/**
-+ * of_property_count_u32_elems - Count the number of u32 elements in a property
-+ *
-+ * @np: device node from which the property value is to be read.
-+ * @propname: name of the property to be searched.
-+ *
-+ * Search for a property in a device node and count the number of u32 elements
-+ * in it. Returns number of elements on sucess, -EINVAL if the property does
-+ * not exist or its length does not match a multiple of u32 and -ENODATA if the
-+ * property does not have a value.
-+ */
-+static inline int of_property_count_u32_elems(const struct device_node *np,
-+ const char *propname)
-+{
-+ return of_property_count_elems_of_size(np, propname, sizeof(u32));
-+}
-+
-+/**
-+ * of_property_count_u64_elems - Count the number of u64 elements in a property
-+ *
-+ * @np: device node from which the property value is to be read.
-+ * @propname: name of the property to be searched.
-+ *
-+ * Search for a property in a device node and count the number of u64 elements
-+ * in it. Returns number of elements on sucess, -EINVAL if the property does
-+ * not exist or its length does not match a multiple of u64 and -ENODATA if the
-+ * property does not have a value.
-+ */
-+static inline int of_property_count_u64_elems(const struct device_node *np,
-+ const char *propname)
-+{
-+ return of_property_count_elems_of_size(np, propname, sizeof(u64));
-+}
-+
-+/**
- * of_property_read_bool - Findfrom a property
- * @np: device node from which the property value is to be read.
- * @propname: name of the property to be searched.
diff --git a/patches.renesas/0151-ASoC-add-snd_soc_of_parse_audio_simple_widgets-for-D.patch b/patches.renesas/0151-ASoC-add-snd_soc_of_parse_audio_simple_widgets-for-D.patch
deleted file mode 100644
index a34a1bf03f851..0000000000000
--- a/patches.renesas/0151-ASoC-add-snd_soc_of_parse_audio_simple_widgets-for-D.patch
+++ /dev/null
@@ -1,144 +0,0 @@
-From 1a9a16b92ac95caea67821067224e19da1597f4c Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Sat, 8 Feb 2014 15:59:52 +0800
-Subject: ASoC: add snd_soc_of_parse_audio_simple_widgets for DT
-
-This patch adds snd_soc_of_parse_audio_simple_widgets() and supports
-below style of widgets name on DT:
-
- "template-wname", "user supplied wname"
-
-For instance:
- simple-audio-widgets =
- "Microphone", "Microphone Jack",
- "Line", "Line In Jack",
- "Line", "Line Out Jack",
- "Headphone", "Headphone Jack",
- "Speaker", "Speaker External";
-
-The "template-wname" currently includes: "Microphone", "Line", "Headphone"
-and "Speaker".
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9a6d48605e632e84db2895cf752c65b3c908cd09)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/soc.h | 2 ++
- sound/soc/soc-core.c | 87 ++++++++++++++++++++++++++++++++++++++++++++++++++++
- 2 files changed, 89 insertions(+)
-
-diff --git a/include/sound/soc.h b/include/sound/soc.h
-index 9a001472b96a..465dc6e0674d 100644
---- a/include/sound/soc.h
-+++ b/include/sound/soc.h
-@@ -1173,6 +1173,8 @@ void snd_soc_util_exit(void);
-
- int snd_soc_of_parse_card_name(struct snd_soc_card *card,
- const char *propname);
-+int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
-+ const char *propname);
- int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
- const char *propname);
- unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
-diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
-index fe1df50805a3..0540cb08e0ea 100644
---- a/sound/soc/soc-core.c
-+++ b/sound/soc/soc-core.c
-@@ -4417,6 +4417,93 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
- }
- EXPORT_SYMBOL_GPL(snd_soc_of_parse_card_name);
-
-+static const struct snd_soc_dapm_widget simple_widgets[] = {
-+ SND_SOC_DAPM_MIC("Microphone", NULL),
-+ SND_SOC_DAPM_LINE("Line", NULL),
-+ SND_SOC_DAPM_HP("Headphone", NULL),
-+ SND_SOC_DAPM_SPK("Speaker", NULL),
-+};
-+
-+int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
-+ const char *propname)
-+{
-+ struct device_node *np = card->dev->of_node;
-+ struct snd_soc_dapm_widget *widgets;
-+ const char *template, *wname;
-+ int i, j, num_widgets, ret;
-+
-+ num_widgets = of_property_count_strings(np, propname);
-+ if (num_widgets < 0) {
-+ dev_err(card->dev,
-+ "ASoC: Property '%s' does not exist\n", propname);
-+ return -EINVAL;
-+ }
-+ if (num_widgets & 1) {
-+ dev_err(card->dev,
-+ "ASoC: Property '%s' length is not even\n", propname);
-+ return -EINVAL;
-+ }
-+
-+ num_widgets /= 2;
-+ if (!num_widgets) {
-+ dev_err(card->dev, "ASoC: Property '%s's length is zero\n",
-+ propname);
-+ return -EINVAL;
-+ }
-+
-+ widgets = devm_kcalloc(card->dev, num_widgets, sizeof(*widgets),
-+ GFP_KERNEL);
-+ if (!widgets) {
-+ dev_err(card->dev,
-+ "ASoC: Could not allocate memory for widgets\n");
-+ return -ENOMEM;
-+ }
-+
-+ for (i = 0; i < num_widgets; i++) {
-+ ret = of_property_read_string_index(np, propname,
-+ 2 * i, &template);
-+ if (ret) {
-+ dev_err(card->dev,
-+ "ASoC: Property '%s' index %d read error:%d\n",
-+ propname, 2 * i, ret);
-+ return -EINVAL;
-+ }
-+
-+ for (j = 0; j < ARRAY_SIZE(simple_widgets); j++) {
-+ if (!strncmp(template, simple_widgets[j].name,
-+ strlen(simple_widgets[j].name))) {
-+ widgets[i] = simple_widgets[j];
-+ break;
-+ }
-+ }
-+
-+ if (j >= ARRAY_SIZE(simple_widgets)) {
-+ dev_err(card->dev,
-+ "ASoC: DAPM widget '%s' is not supported\n",
-+ template);
-+ return -EINVAL;
-+ }
-+
-+ ret = of_property_read_string_index(np, propname,
-+ (2 * i) + 1,
-+ &wname);
-+ if (ret) {
-+ dev_err(card->dev,
-+ "ASoC: Property '%s' index %d read error:%d\n",
-+ propname, (2 * i) + 1, ret);
-+ return -EINVAL;
-+ }
-+
-+ widgets[i].name = wname;
-+ }
-+
-+ card->dapm_widgets = widgets;
-+ card->num_dapm_widgets = num_widgets;
-+
-+ return 0;
-+}
-+EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_simple_widgets);
-+
- int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
- const char *propname)
- {
---
-2.1.2
-
diff --git a/patches.renesas/0152-ASoC-core-add-TDM-slot-parsing-from-DT-supports.patch b/patches.renesas/0152-ASoC-core-add-TDM-slot-parsing-from-DT-supports.patch
deleted file mode 100644
index 7e2b1592b009f..0000000000000
--- a/patches.renesas/0152-ASoC-core-add-TDM-slot-parsing-from-DT-supports.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From 0063caf83ab43e26efc2c1b9e829b1a7a024e7c0 Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Fri, 14 Feb 2014 09:34:35 +0800
-Subject: ASoC: core: add TDM slot parsing from DT supports
-
-For some CPU/CODEC DAI devices the TDM slot infomation maybe needed. This
-patch adds the slot parsing from DT supports.
-
-TDM slot properties:
- dai-tdm-slot-num : Number of slots in use.
- dai-tdm-slot-width : Width in bits for each slot.
-
-For instance:
- dai-tdm-slot-num = <2>;
- dai-tdm-slot-width = <8>;
-
-And for each spcified driver, there could be one .of_xlate_tdm_slot_mask()
-to specify a explicit mapping of the channels and the slots. If it's absent
-the default snd_soc_of_xlate_tdm_slot_mask() will be used to generating the
-tx and rx masks.
-
-For snd_soc_of_xlate_tdm_slot_mask(), the tx and rx masks will use a 1 bit
-for an active slot as default, and the default active bits are at the LSB of
-the masks.
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 89c6785715592a6b082b3f9f28c27bb14b041c7d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/soc-dai.h | 2 ++
- include/sound/soc.h | 3 +++
- sound/soc/soc-core.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 64 insertions(+)
-
-diff --git a/include/sound/soc-dai.h b/include/sound/soc-dai.h
-index 71f27c403194..d86e0fc41e80 100644
---- a/include/sound/soc-dai.h
-+++ b/include/sound/soc-dai.h
-@@ -142,6 +142,8 @@ struct snd_soc_dai_ops {
- * Called by soc_card drivers, normally in their hw_params.
- */
- int (*set_fmt)(struct snd_soc_dai *dai, unsigned int fmt);
-+ int (*of_xlate_tdm_slot_mask)(unsigned int slots,
-+ unsigned int *tx_mask, unsigned int *rx_mask);
- int (*set_tdm_slot)(struct snd_soc_dai *dai,
- unsigned int tx_mask, unsigned int rx_mask,
- int slots, int slot_width);
-diff --git a/include/sound/soc.h b/include/sound/soc.h
-index 465dc6e0674d..2a878d03c147 100644
---- a/include/sound/soc.h
-+++ b/include/sound/soc.h
-@@ -1175,6 +1175,9 @@ int snd_soc_of_parse_card_name(struct snd_soc_card *card,
- const char *propname);
- int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
- const char *propname);
-+int snd_soc_of_parse_tdm_slot(struct device_node *np,
-+ unsigned int *slots,
-+ unsigned int *slot_width);
- int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
- const char *propname);
- unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
-diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
-index 0540cb08e0ea..5b7d3ba87c7a 100644
---- a/sound/soc/soc-core.c
-+++ b/sound/soc/soc-core.c
-@@ -3609,6 +3609,30 @@ int snd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
- EXPORT_SYMBOL_GPL(snd_soc_dai_set_fmt);
-
- /**
-+ * snd_soc_of_xlate_tdm_slot - generate tx/rx slot mask.
-+ * @slots: Number of slots in use.
-+ * @tx_mask: bitmask representing active TX slots.
-+ * @rx_mask: bitmask representing active RX slots.
-+ *
-+ * Generates the TDM tx and rx slot default masks for DAI.
-+ */
-+static int snd_soc_of_xlate_tdm_slot_mask(unsigned int slots,
-+ unsigned int *tx_mask,
-+ unsigned int *rx_mask)
-+{
-+ if (*tx_mask || *rx_mask)
-+ return 0;
-+
-+ if (!slots)
-+ return -EINVAL;
-+
-+ *tx_mask = (1 << slots) - 1;
-+ *rx_mask = (1 << slots) - 1;
-+
-+ return 0;
-+}
-+
-+/**
- * snd_soc_dai_set_tdm_slot - configure DAI TDM.
- * @dai: DAI
- * @tx_mask: bitmask representing active TX slots.
-@@ -3622,6 +3646,12 @@ EXPORT_SYMBOL_GPL(snd_soc_dai_set_fmt);
- int snd_soc_dai_set_tdm_slot(struct snd_soc_dai *dai,
- unsigned int tx_mask, unsigned int rx_mask, int slots, int slot_width)
- {
-+ if (dai->driver && dai->driver->ops->of_xlate_tdm_slot_mask)
-+ dai->driver->ops->of_xlate_tdm_slot_mask(slots,
-+ &tx_mask, &rx_mask);
-+ else
-+ snd_soc_of_xlate_tdm_slot_mask(slots, &tx_mask, &rx_mask);
-+
- if (dai->driver && dai->driver->ops->set_tdm_slot)
- return dai->driver->ops->set_tdm_slot(dai, tx_mask, rx_mask,
- slots, slot_width);
-@@ -4504,6 +4534,35 @@ int snd_soc_of_parse_audio_simple_widgets(struct snd_soc_card *card,
- }
- EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_simple_widgets);
-
-+int snd_soc_of_parse_tdm_slot(struct device_node *np,
-+ unsigned int *slots,
-+ unsigned int *slot_width)
-+{
-+ u32 val;
-+ int ret;
-+
-+ if (of_property_read_bool(np, "dai-tdm-slot-num")) {
-+ ret = of_property_read_u32(np, "dai-tdm-slot-num", &val);
-+ if (ret)
-+ return ret;
-+
-+ if (slots)
-+ *slots = val;
-+ }
-+
-+ if (of_property_read_bool(np, "dai-tdm-slot-width")) {
-+ ret = of_property_read_u32(np, "dai-tdm-slot-width", &val);
-+ if (ret)
-+ return ret;
-+
-+ if (slot_width)
-+ *slot_width = val;
-+ }
-+
-+ return 0;
-+}
-+EXPORT_SYMBOL_GPL(snd_soc_of_parse_tdm_slot);
-+
- int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
- const char *propname)
- {
---
-2.1.2
-
diff --git a/patches.renesas/0153-clocksource-Add-Kconfig-entries-for-CMT-MTU2-TMU-and.patch b/patches.renesas/0153-clocksource-Add-Kconfig-entries-for-CMT-MTU2-TMU-and.patch
deleted file mode 100644
index a327f977f74b1..0000000000000
--- a/patches.renesas/0153-clocksource-Add-Kconfig-entries-for-CMT-MTU2-TMU-and.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 6a415e552e53b859d7127464270c251165e72f30 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 20 Feb 2014 12:54:45 +0100
-Subject: clocksource: Add Kconfig entries for CMT, MTU2, TMU and STI
-
-Add Kconfig entries for CMT, MTU2, TMU and STI to
-drivers/clocksource/Kconfig. This will allow us to
-get rid of duplicated entires in architecture code
-such as arch/sh and arch/arm/mach-shmobile.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-(cherry picked from commit fd3f1270d237d1afb344ee6bfd0e50c488c29e34)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/Kconfig | 44 ++++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
-index cd6950fd8caf..4f754a972139 100644
---- a/drivers/clocksource/Kconfig
-+++ b/drivers/clocksource/Kconfig
-@@ -140,3 +140,47 @@ config VF_PIT_TIMER
- bool
- help
- Support for Period Interrupt Timer on Freescale Vybrid Family SoCs.
-+
-+config SYS_SUPPORTS_SH_CMT
-+ bool
-+
-+config SYS_SUPPORTS_SH_MTU2
-+ bool
-+
-+config SYS_SUPPORTS_SH_TMU
-+ bool
-+
-+config SYS_SUPPORTS_EM_STI
-+ bool
-+
-+config SH_TIMER_CMT
-+ bool "Renesas CMT timer driver" if COMPILE_TEST
-+ default SYS_SUPPORTS_SH_CMT
-+ help
-+ This enables build of a clocksource and clockevent driver for
-+ the Compare Match Timer (CMT) hardware available in 16/32/48-bit
-+ variants on a wide range of Mobile and Automotive SoCs from Renesas.
-+
-+config SH_TIMER_MTU2
-+ bool "Renesas MTU2 timer driver" if COMPILE_TEST
-+ default SYS_SUPPORTS_SH_MTU2
-+ help
-+ This enables build of a clockevent driver for the Multi-Function
-+ Timer Pulse Unit 2 (TMU2) hardware available on SoCs from Renesas.
-+ This hardware comes with 16 bit-timer registers.
-+
-+config SH_TIMER_TMU
-+ bool "Renesas TMU timer driver" if COMPILE_TEST
-+ default SYS_SUPPORTS_SH_TMU
-+ help
-+ This enables build of a clocksource and clockevent driver for
-+ the 32-bit Timer Unit (TMU) hardware available on a wide range
-+ SoCs from Renesas.
-+
-+config EM_TIMER_STI
-+ bool "Renesas STI timer driver" if COMPILE_TEST
-+ default SYS_SUPPORTS_EM_STI
-+ help
-+ This enables build of a clocksource and clockevent driver for
-+ the 48-bit System Timer (STI) hardware available on a SoCs
-+ such as EMEV2 from former NEC Electronics.
---
-2.1.2
-
diff --git a/patches.renesas/0154-clocksource-CMT-MTU2-TMU-and-STI-should-depend-on-GE.patch b/patches.renesas/0154-clocksource-CMT-MTU2-TMU-and-STI-should-depend-on-GE.patch
deleted file mode 100644
index 0a0edbe436b01..0000000000000
--- a/patches.renesas/0154-clocksource-CMT-MTU2-TMU-and-STI-should-depend-on-GE.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 6eebf8e07c5018c43adc98bd244d27878e2770d8 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 20 Mar 2014 15:05:50 +0100
-Subject: clocksource: CMT, MTU2, TMU and STI should depend on
- GENERIC_CLOCKEVENTS
-
-If GENERIC_CLOCKEVENTS=n:
-
-drivers/clocksource/sh_cmt.c:54:28: error: field 'ced' has incomplete type
-drivers/clocksource/sh_cmt.c: In function 'sh_cmt_interrupt':
-drivers/clocksource/sh_cmt.c:407:23: error: 'CLOCK_EVT_MODE_ONESHOT' undeclared (first use in this function)
-
-drivers/clocksource/sh_mtu2.c:44:28: error: field 'ced' has incomplete type
-drivers/clocksource/sh_mtu2.c: In function 'ced_to_sh_mtu2':
-drivers/clocksource/sh_mtu2.c:184:70: warning: initialization from incompatible pointer type [enabled by default]
-drivers/clocksource/sh_mtu2.c: At top level:
-drivers/clocksource/sh_mtu2.c:188:16: warning: 'enum clock_event_mode' declared inside parameter list [enabled by default]
-
-drivers/clocksource/sh_tmu.c:45:28: error: field 'ced' has incomplete type
-drivers/clocksource/sh_tmu.c: In function 'sh_tmu_interrupt':
-drivers/clocksource/sh_tmu.c:207:21: error: 'CLOCK_EVT_MODE_ONESHOT' undeclared (first use in this function)
-
-drivers/clocksource/em_sti.c:44:28: error: field 'ced' has incomplete type
-drivers/clocksource/em_sti.c: In function 'ced_to_em_sti':
-drivers/clocksource/em_sti.c:251:69: warning: initialization from incompatible pointer type [enabled by default]
-drivers/clocksource/em_sti.c: At top level:
-drivers/clocksource/em_sti.c:255:16: warning: 'enum clock_event_mode' declared inside parameter list [enabled by default]
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: Magnus Damm <damm@opensource.se>
-Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
-Link: http://lkml.kernel.org/r/1395324352-9146-1-git-send-email-geert@linux-m68k.org
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-(cherry picked from commit 87291a9267ecc0a8efceb4d9cbd4da870f958fc1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/Kconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/drivers/clocksource/Kconfig b/drivers/clocksource/Kconfig
-index 4f754a972139..52e9329e3c51 100644
---- a/drivers/clocksource/Kconfig
-+++ b/drivers/clocksource/Kconfig
-@@ -155,6 +155,7 @@ config SYS_SUPPORTS_EM_STI
-
- config SH_TIMER_CMT
- bool "Renesas CMT timer driver" if COMPILE_TEST
-+ depends on GENERIC_CLOCKEVENTS
- default SYS_SUPPORTS_SH_CMT
- help
- This enables build of a clocksource and clockevent driver for
-@@ -163,6 +164,7 @@ config SH_TIMER_CMT
-
- config SH_TIMER_MTU2
- bool "Renesas MTU2 timer driver" if COMPILE_TEST
-+ depends on GENERIC_CLOCKEVENTS
- default SYS_SUPPORTS_SH_MTU2
- help
- This enables build of a clockevent driver for the Multi-Function
-@@ -171,6 +173,7 @@ config SH_TIMER_MTU2
-
- config SH_TIMER_TMU
- bool "Renesas TMU timer driver" if COMPILE_TEST
-+ depends on GENERIC_CLOCKEVENTS
- default SYS_SUPPORTS_SH_TMU
- help
- This enables build of a clocksource and clockevent driver for
-@@ -179,6 +182,7 @@ config SH_TIMER_TMU
-
- config EM_TIMER_STI
- bool "Renesas STI timer driver" if COMPILE_TEST
-+ depends on GENERIC_CLOCKEVENTS
- default SYS_SUPPORTS_EM_STI
- help
- This enables build of a clocksource and clockevent driver for
---
-2.1.2
-
diff --git a/patches.renesas/0155-regulator-gpio-regulator-Remove-unneeded-OOM-error-m.patch b/patches.renesas/0155-regulator-gpio-regulator-Remove-unneeded-OOM-error-m.patch
deleted file mode 100644
index 473c0a9f5d531..0000000000000
--- a/patches.renesas/0155-regulator-gpio-regulator-Remove-unneeded-OOM-error-m.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4a44aab126539a33973bd8ff676876eda0ab2732 Mon Sep 17 00:00:00 2001
-From: Fabio Estevam <fabio.estevam@freescale.com>
-Date: Fri, 24 Jan 2014 15:48:18 -0200
-Subject: regulator: gpio-regulator: Remove unneeded OOM error message
-
-There is no need to print an OOM message after devm_kzalloc, since there is
-a generic OOM message in place.
-
-Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9c25960cbba1fb452adf6a7b9d740fc4358f7d92)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/regulator/gpio-regulator.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
-index c0a1d00b78c9..bad44f366b3f 100644
---- a/drivers/regulator/gpio-regulator.c
-+++ b/drivers/regulator/gpio-regulator.c
-@@ -239,10 +239,8 @@ static int gpio_regulator_probe(struct platform_device *pdev)
-
- drvdata = devm_kzalloc(&pdev->dev, sizeof(struct gpio_regulator_data),
- GFP_KERNEL);
-- if (drvdata == NULL) {
-- dev_err(&pdev->dev, "Failed to allocate device data\n");
-+ if (drvdata == NULL)
- return -ENOMEM;
-- }
-
- drvdata->desc.name = kstrdup(config->supply_name, GFP_KERNEL);
- if (drvdata->desc.name == NULL) {
---
-2.1.2
-
diff --git a/patches.renesas/0156-regulator-gpio-add-gpios-status-for-DT.patch b/patches.renesas/0156-regulator-gpio-add-gpios-status-for-DT.patch
deleted file mode 100644
index 9d3d8aab0e34e..0000000000000
--- a/patches.renesas/0156-regulator-gpio-add-gpios-status-for-DT.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 4182ab8f3cbbf0495bb760341da9631fd6981aec Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 30 Jan 2014 21:25:14 -0800
-Subject: regulator: gpio: add gpios-status for DT
-
-config->gpios[x].flags indicates initial pin status,
-and it will be used for drvdata->state
-on gpio_regulator_probe().
-But, current of_get_gpio_regulator_config() doesn't care
-about this flags.
-This patch adds new gpios-status property in order to
-care about initial pin status.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 0094050d783bbadffe83effef11a0bda901153ce)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/regulator/gpio-regulator.txt | 1 +
- drivers/regulator/gpio-regulator.c | 11 +++++++++++
- 2 files changed, 12 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-index 63c659800c03..3ecb585e786c 100644
---- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-@@ -8,6 +8,7 @@ Required properties:
- Optional properties:
- - enable-gpio : GPIO to use to enable/disable the regulator.
- - gpios : GPIO group used to control voltage.
-+- gpios-states : gpios pin's initial states. 1 means HIGH
- - startup-delay-us : Startup time in microseconds.
- - enable-active-high : Polarity of GPIO is active high (default is low).
-
-diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
-index bad44f366b3f..ac3a8c732dd8 100644
---- a/drivers/regulator/gpio-regulator.c
-+++ b/drivers/regulator/gpio-regulator.c
-@@ -172,11 +172,22 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- if (!config->gpios)
- return ERR_PTR(-ENOMEM);
-
-+ prop = of_find_property(np, "gpios-states", NULL);
-+ if (prop) {
-+ proplen = prop->length / sizeof(int);
-+ if (proplen != config->nr_gpios) {
-+ /* gpios <-> gpios-states mismatch */
-+ prop = NULL;
-+ }
-+ }
-+
- for (i = 0; i < config->nr_gpios; i++) {
- gpio = of_get_named_gpio(np, "gpios", i);
- if (gpio < 0)
- break;
- config->gpios[i].gpio = gpio;
-+ if (prop && be32_to_cpup((int *)prop->value + i))
-+ config->gpios[i].flags = GPIOF_OUT_INIT_HIGH;
- }
-
- /* Fetch states. */
---
-2.1.2
-
diff --git a/patches.renesas/0157-regulator-gpio-Document-regulator-type-property.patch b/patches.renesas/0157-regulator-gpio-Document-regulator-type-property.patch
deleted file mode 100644
index b895bbdda102f..0000000000000
--- a/patches.renesas/0157-regulator-gpio-Document-regulator-type-property.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 1af393e5d993bbe2913c596f76be0a0948eee85d Mon Sep 17 00:00:00 2001
-From: Mark Brown <broonie@linaro.org>
-Date: Thu, 5 Dec 2013 19:08:55 +0000
-Subject: regulator: gpio: Document regulator-type property
-
-Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 7f196ec938967af7c3aa2506b8edcd7da5f5ebc6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/regulator/gpio-regulator.txt | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-index 3ecb585e786c..5da9a66e6981 100644
---- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-@@ -11,6 +11,8 @@ Optional properties:
- - gpios-states : gpios pin's initial states. 1 means HIGH
- - startup-delay-us : Startup time in microseconds.
- - enable-active-high : Polarity of GPIO is active high (default is low).
-+- regulator-type : Specifies what is being regulated, must be either
-+ "voltage" or "current", defaults to current.
-
- Any property defined as part of the core regulator binding defined in
- regulator.txt can also be used.
---
-2.1.2
-
diff --git a/patches.renesas/0158-regulator-gpio-print-warning-if-gpios-gpios-states-m.patch b/patches.renesas/0158-regulator-gpio-print-warning-if-gpios-gpios-states-m.patch
deleted file mode 100644
index 09a46b9430663..0000000000000
--- a/patches.renesas/0158-regulator-gpio-print-warning-if-gpios-gpios-states-m.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6c2dc14f9bfc3067723b3b99573c7f7fccd36b2d Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 11 Feb 2014 17:27:08 -0800
-Subject: regulator: gpio: print warning if gpios <-> gpios-states mismatch on
- DT
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5676ddc5c62861467582b10b88aadb25ea9c3b52)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/regulator/gpio-regulator.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
-index ac3a8c732dd8..5491ceeb53cc 100644
---- a/drivers/regulator/gpio-regulator.c
-+++ b/drivers/regulator/gpio-regulator.c
-@@ -176,7 +176,7 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- if (prop) {
- proplen = prop->length / sizeof(int);
- if (proplen != config->nr_gpios) {
-- /* gpios <-> gpios-states mismatch */
-+ dev_warn(dev, "gpios <-> gpios-states mismatch\n");
- prop = NULL;
- }
- }
---
-2.1.2
-
diff --git a/patches.renesas/0159-regulator-gpio-explain-detail-of-gpios-states.patch b/patches.renesas/0159-regulator-gpio-explain-detail-of-gpios-states.patch
deleted file mode 100644
index 1caf60bd142a2..0000000000000
--- a/patches.renesas/0159-regulator-gpio-explain-detail-of-gpios-states.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 705b3dd4d35c60ff13f5b749423b39fc22a5d85e Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 11 Feb 2014 17:27:27 -0800
-Subject: regulator: gpio: explain detail of gpios-states
-
-gpios-states is array, and default is 0
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 907339818ecd66c20f57bbf53d1160c3dc9d34a8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/regulator/gpio-regulator.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-index 5da9a66e6981..e5cac1e0ca8a 100644
---- a/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-+++ b/Documentation/devicetree/bindings/regulator/gpio-regulator.txt
-@@ -8,7 +8,8 @@ Required properties:
- Optional properties:
- - enable-gpio : GPIO to use to enable/disable the regulator.
- - gpios : GPIO group used to control voltage.
--- gpios-states : gpios pin's initial states. 1 means HIGH
-+- gpios-states : gpios pin's initial states array. 0: LOW, 1: HIGH.
-+ defualt is LOW if nothing is specified.
- - startup-delay-us : Startup time in microseconds.
- - enable-active-high : Polarity of GPIO is active high (default is low).
- - regulator-type : Specifies what is being regulated, must be either
---
-2.1.2
-
diff --git a/patches.renesas/0160-regulator-gpio-regulator-do-not-open-code-counting-a.patch b/patches.renesas/0160-regulator-gpio-regulator-do-not-open-code-counting-a.patch
deleted file mode 100644
index 6709c6e422cfc..0000000000000
--- a/patches.renesas/0160-regulator-gpio-regulator-do-not-open-code-counting-a.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 51aa410393648a2969fc7bbe5d23ea4009e782b2 Mon Sep 17 00:00:00 2001
-From: Heiko Stuebner <heiko.stuebner@bqreaders.com>
-Date: Wed, 12 Feb 2014 01:01:08 +0100
-Subject: regulator: gpio-regulator: do not open-code counting and access of dt
- array elements
-
-Open coding the counting of elements in a dt-property is abstracted by the newly
-introduced of_property_count_uXX_elems functions. Additionally the raw iteration
-over the states element exposes the endian conversion and dtb-format details,
-which according to Mark Rutland "would be nice to limit [...] to of_ helper
-functions".
-
-Thus change gpio-regulator to use the helper for element counting and
-of_property_read_u32_index for retrieval of individual values.
-
-This makes it possible to remove the raw access to the states property entirely.
-
-Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
-Acked-by: Mark Rutland <mark.rutland@arm.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 934624d6e9f0b3d41557c4105c286e8daeaadb4e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/regulator/gpio-regulator.c | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
-index 5491ceeb53cc..9fd55611016c 100644
---- a/drivers/regulator/gpio-regulator.c
-+++ b/drivers/regulator/gpio-regulator.c
-@@ -136,7 +136,6 @@ static struct gpio_regulator_config *
- of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- {
- struct gpio_regulator_config *config;
-- struct property *prop;
- const char *regtype;
- int proplen, gpio, i;
- int ret;
-@@ -191,14 +190,12 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- }
-
- /* Fetch states. */
-- prop = of_find_property(np, "states", NULL);
-- if (!prop) {
-+ proplen = of_property_count_u32_elems(np, "states");
-+ if (proplen < 0) {
- dev_err(dev, "No 'states' property found\n");
- return ERR_PTR(-EINVAL);
- }
-
-- proplen = prop->length / sizeof(int);
--
- config->states = devm_kzalloc(dev,
- sizeof(struct gpio_regulator_state)
- * (proplen / 2),
-@@ -207,10 +204,10 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- return ERR_PTR(-ENOMEM);
-
- for (i = 0; i < proplen / 2; i++) {
-- config->states[i].value =
-- be32_to_cpup((int *)prop->value + (i * 2));
-- config->states[i].gpios =
-- be32_to_cpup((int *)prop->value + (i * 2 + 1));
-+ of_property_read_u32_index(np, "states", i * 2,
-+ &config->states[i].value);
-+ of_property_read_u32_index(np, "states", i * 2 + 1,
-+ &config->states[i].gpios);
- }
- config->nr_states = i;
-
---
-2.1.2
-
diff --git a/patches.renesas/0161-regulator-gpio-regulator-fix-forgotten-gpios-states-.patch b/patches.renesas/0161-regulator-gpio-regulator-fix-forgotten-gpios-states-.patch
deleted file mode 100644
index f275960676ef5..0000000000000
--- a/patches.renesas/0161-regulator-gpio-regulator-fix-forgotten-gpios-states-.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From facd79f6c32c24f249898acc436f7d95dda23f13 Mon Sep 17 00:00:00 2001
-From: Heiko Stuebner <heiko.stuebner@bqreaders.com>
-Date: Thu, 13 Feb 2014 16:34:32 +0100
-Subject: regulator: gpio-regulator: fix forgotten gpios-states reading
-
-Commit 934624d6e9f0 ("regulator: gpio-regulator: do not open-code counting
-and access of dt array elements") forgot to convert the recently added
-gpios-states property using the same pattern.
-
-Convert this instance to use the of-helpers too, resolving the build error.
-
-Signed-off-by: Heiko Stuebner <heiko.stuebner@bqreaders.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 1f5a9623eb4300a722eab2f6c6a31a194c804cec)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/regulator/gpio-regulator.c | 22 +++++++++++++---------
- 1 file changed, 13 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/regulator/gpio-regulator.c b/drivers/regulator/gpio-regulator.c
-index 9fd55611016c..989b23b377c0 100644
---- a/drivers/regulator/gpio-regulator.c
-+++ b/drivers/regulator/gpio-regulator.c
-@@ -171,13 +171,14 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- if (!config->gpios)
- return ERR_PTR(-ENOMEM);
-
-- prop = of_find_property(np, "gpios-states", NULL);
-- if (prop) {
-- proplen = prop->length / sizeof(int);
-- if (proplen != config->nr_gpios) {
-- dev_warn(dev, "gpios <-> gpios-states mismatch\n");
-- prop = NULL;
-- }
-+ proplen = of_property_count_u32_elems(np, "gpios-states");
-+ /* optional property */
-+ if (proplen < 0)
-+ proplen = 0;
-+
-+ if (proplen > 0 && proplen != config->nr_gpios) {
-+ dev_warn(dev, "gpios <-> gpios-states mismatch\n");
-+ proplen = 0;
- }
-
- for (i = 0; i < config->nr_gpios; i++) {
-@@ -185,8 +186,11 @@ of_get_gpio_regulator_config(struct device *dev, struct device_node *np)
- if (gpio < 0)
- break;
- config->gpios[i].gpio = gpio;
-- if (prop && be32_to_cpup((int *)prop->value + i))
-- config->gpios[i].flags = GPIOF_OUT_INIT_HIGH;
-+ if (proplen > 0) {
-+ of_property_read_u32_index(np, "gpios-states", i, &ret);
-+ if (ret)
-+ config->gpios[i].flags = GPIOF_OUT_INIT_HIGH;
-+ }
- }
-
- /* Fetch states. */
---
-2.1.2
-
diff --git a/patches.renesas/0162-ASoC-simple-card-simplify-code.patch b/patches.renesas/0162-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index b2388a59f2691..0000000000000
--- a/patches.renesas/0162-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 9ae721191b07d3c659d1c2a0dc8df9da6fa637fc Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:33 +0100
-Subject: ASoC: simple-card: simplify code
-
-The check of the mandatory fields is done for DT in its specific sequence.
-Move the global check to the non-DT sequence.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 7722f830a45f7fbb8f2f7b23265793980bdf3397)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 2a1b1b5b5221..f0784ca4d3c8 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -225,16 +225,16 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
-
- memcpy(cinfo, dev->platform_data, sizeof(*cinfo));
- cinfo->snd_card.dev = dev;
-- }
-
-- if (!cinfo->name ||
-- !cinfo->card ||
-- !cinfo->codec_dai.name ||
-- !(cinfo->codec || of_codec) ||
-- !(cinfo->platform || of_platform) ||
-- !(cinfo->cpu_dai.name || of_cpu)) {
-- dev_err(dev, "insufficient asoc_simple_card_info settings\n");
-- return -EINVAL;
-+ if (!cinfo->name ||
-+ !cinfo->card ||
-+ !cinfo->codec_dai.name ||
-+ !cinfo->codec ||
-+ !cinfo->platform ||
-+ !cinfo->cpu_dai.name) {
-+ dev_err(dev, "insufficient asoc_simple_card_info settings\n");
-+ return -EINVAL;
-+ }
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0163-ASoC-simple-card-simplify-code.patch b/patches.renesas/0163-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index 22aefb9a13b2e..0000000000000
--- a/patches.renesas/0163-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 00000822b08bbb965096c3a6cb60b4e9ee10c24a Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:37 +0100
-Subject: ASoC: simple-card: simplify code
-
-The DT values are copied to the non-DT structure before being moved to
-the card structure.
-Set directly the DT values in the card and move the non-DT copy to the
-non-DT sequence.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2bee991460a838ee3c8064a6d880c4e7bc41717a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 22 ++++++++++++----------
- 1 file changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index f0784ca4d3c8..7c5dc7336c0b 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -169,12 +169,13 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- strlen(info->codec_dai.name) + 2,
- GFP_KERNEL);
- sprintf(name, "%s-%s", info->cpu_dai.name, info->codec_dai.name);
-- info->name = info->card = name;
-+ info->snd_card.name = name;
-+ info->snd_link.name = info->snd_link.stream_name = name;
-
- /* simple-card assumes platform == cpu */
- *of_platform = *of_cpu;
-
-- dev_dbg(dev, "card-name : %s\n", info->card);
-+ dev_dbg(dev, "card-name : %s\n", name);
- dev_dbg(dev, "platform : %04x\n", info->daifmt);
- dev_dbg(dev, "cpu : %s / %04x / %d\n",
- info->cpu_dai.name,
-@@ -217,6 +218,9 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- dev_err(dev, "parse error %d\n", ret);
- return ret;
- }
-+ cinfo->snd_link.cpu_of_node = of_cpu;
-+ cinfo->snd_link.codec_of_node = of_codec;
-+ cinfo->snd_link.platform_of_node = of_platform;
- } else {
- if (!dev->platform_data) {
- dev_err(dev, "no info for asoc-simple-card\n");
-@@ -235,26 +239,24 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- dev_err(dev, "insufficient asoc_simple_card_info settings\n");
- return -EINVAL;
- }
-+
-+ cinfo->snd_card.name = cinfo->card;
-+ cinfo->snd_link.name = cinfo->name;
-+ cinfo->snd_link.stream_name = cinfo->name;
-+ cinfo->snd_link.platform_name = cinfo->platform;
-+ cinfo->snd_link.codec_name = cinfo->codec;
- }
-
- /*
- * init snd_soc_dai_link
- */
-- cinfo->snd_link.name = cinfo->name;
-- cinfo->snd_link.stream_name = cinfo->name;
- cinfo->snd_link.cpu_dai_name = cinfo->cpu_dai.name;
-- cinfo->snd_link.platform_name = cinfo->platform;
-- cinfo->snd_link.codec_name = cinfo->codec;
- cinfo->snd_link.codec_dai_name = cinfo->codec_dai.name;
-- cinfo->snd_link.cpu_of_node = of_cpu;
-- cinfo->snd_link.codec_of_node = of_codec;
-- cinfo->snd_link.platform_of_node = of_platform;
- cinfo->snd_link.init = asoc_simple_card_dai_init;
-
- /*
- * init snd_soc_card
- */
-- cinfo->snd_card.name = cinfo->card;
- cinfo->snd_card.owner = THIS_MODULE;
- cinfo->snd_card.dai_link = &cinfo->snd_link;
- cinfo->snd_card.num_links = 1;
---
-2.1.2
-
diff --git a/patches.renesas/0164-ASoC-simple-card-simplify-code.patch b/patches.renesas/0164-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index 627a5b527adb3..0000000000000
--- a/patches.renesas/0164-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,171 +0,0 @@
-From ab179d3e5e79eec540dfccc8d5e3aaa857c180bf Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:41 +0100
-Subject: ASoC: simple-card: simplify code
-
-The OF pointers are put in the stack and then copied to the card
-descriptor.
-Put them directly at their right place.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 201a0eac7fe5e7a8fa33f0742304f885bc344d0d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 55 +++++++++++++++--------------------------
- 1 file changed, 20 insertions(+), 35 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 7c5dc7336c0b..89f83b32d86d 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -60,8 +60,9 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- static int
- asoc_simple_card_sub_parse_of(struct device_node *np,
- struct asoc_simple_dai *dai,
-- struct device_node **node)
-+ const struct device_node **p_node)
- {
-+ struct device_node *node;
- struct clk *clk;
- int ret;
-
-@@ -69,9 +70,10 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- * get node via "sound-dai = <&phandle port>"
- * it will be used as xxx_of_node on soc_bind_dai_link()
- */
-- *node = of_parse_phandle(np, "sound-dai", 0);
-- if (!*node)
-+ node = of_parse_phandle(np, "sound-dai", 0);
-+ if (!node)
- return -ENODEV;
-+ *p_node = node;
-
- /* get dai->name */
- ret = snd_soc_of_get_dai_name(np, &dai->name);
-@@ -104,7 +106,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- "system-clock-frequency",
- &dai->sysclk);
- } else {
-- clk = of_clk_get(*node, 0);
-+ clk = of_clk_get(node, 0);
- if (!IS_ERR(clk))
- dai->sysclk = clk_get_rate(clk);
- }
-@@ -112,17 +114,14 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- ret = 0;
-
- parse_error:
-- of_node_put(*node);
-+ of_node_put(node);
-
- return ret;
- }
-
- static int asoc_simple_card_parse_of(struct device_node *node,
- struct asoc_simple_card_info *info,
-- struct device *dev,
-- struct device_node **of_cpu,
-- struct device_node **of_codec,
-- struct device_node **of_platform)
-+ struct device *dev)
- {
- struct device_node *np;
- char *name;
-@@ -146,7 +145,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
- &info->cpu_dai,
-- of_cpu);
-+ &info->snd_link.cpu_of_node);
- if (ret < 0)
- return ret;
-
-@@ -156,7 +155,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
- &info->codec_dai,
-- of_codec);
-+ &info->snd_link.codec_of_node);
- if (ret < 0)
- return ret;
-
-@@ -173,7 +172,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- info->snd_link.name = info->snd_link.stream_name = name;
-
- /* simple-card assumes platform == cpu */
-- *of_platform = *of_cpu;
-+ info->snd_link.platform_of_node = info->snd_link.cpu_of_node;
-
- dev_dbg(dev, "card-name : %s\n", name);
- dev_dbg(dev, "platform : %04x\n", info->daifmt);
-@@ -193,34 +192,29 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- {
- struct asoc_simple_card_info *cinfo;
- struct device_node *np = pdev->dev.of_node;
-- struct device_node *of_cpu, *of_codec, *of_platform;
- struct device *dev = &pdev->dev;
- int ret;
-
-- cinfo = NULL;
-- of_cpu = NULL;
-- of_codec = NULL;
-- of_platform = NULL;
--
- cinfo = devm_kzalloc(dev, sizeof(*cinfo), GFP_KERNEL);
- if (!cinfo)
- return -ENOMEM;
-
-+ /*
-+ * init snd_soc_card
-+ */
-+ cinfo->snd_card.owner = THIS_MODULE;
-+ cinfo->snd_card.dev = dev;
-+ cinfo->snd_card.dai_link = &cinfo->snd_link;
-+ cinfo->snd_card.num_links = 1;
-+
- if (np && of_device_is_available(np)) {
-- cinfo->snd_card.dev = dev;
-
-- ret = asoc_simple_card_parse_of(np, cinfo, dev,
-- &of_cpu,
-- &of_codec,
-- &of_platform);
-+ ret = asoc_simple_card_parse_of(np, cinfo, dev);
- if (ret < 0) {
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "parse error %d\n", ret);
- return ret;
- }
-- cinfo->snd_link.cpu_of_node = of_cpu;
-- cinfo->snd_link.codec_of_node = of_codec;
-- cinfo->snd_link.platform_of_node = of_platform;
- } else {
- if (!dev->platform_data) {
- dev_err(dev, "no info for asoc-simple-card\n");
-@@ -228,8 +222,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- }
-
- memcpy(cinfo, dev->platform_data, sizeof(*cinfo));
-- cinfo->snd_card.dev = dev;
--
- if (!cinfo->name ||
- !cinfo->card ||
- !cinfo->codec_dai.name ||
-@@ -254,13 +246,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- cinfo->snd_link.codec_dai_name = cinfo->codec_dai.name;
- cinfo->snd_link.init = asoc_simple_card_dai_init;
-
-- /*
-- * init snd_soc_card
-- */
-- cinfo->snd_card.owner = THIS_MODULE;
-- cinfo->snd_card.dai_link = &cinfo->snd_link;
-- cinfo->snd_card.num_links = 1;
--
- snd_soc_card_set_drvdata(&cinfo->snd_card, cinfo);
-
- return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card);
---
-2.1.2
-
diff --git a/patches.renesas/0165-ASoC-simple-card-simplify-code.patch b/patches.renesas/0165-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index a7ac24cde8ca5..0000000000000
--- a/patches.renesas/0165-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From f1c279a8a8f3e2222757ac866e6004aeaec4916e Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:45 +0100
-Subject: ASoC: simple-card: simplify code
-
-Have a cleaner code using a DAI link pointer.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5ca8ba4180a6f629d51dba699b4a6428cc5eeba7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 29 ++++++++++++++++-------------
- 1 file changed, 16 insertions(+), 13 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 89f83b32d86d..797696fc6f12 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -123,6 +123,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- struct asoc_simple_card_info *info,
- struct device *dev)
- {
-+ struct snd_soc_dai_link *dai_link = info->snd_card.dai_link;
- struct device_node *np;
- char *name;
- int ret;
-@@ -145,7 +146,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
- &info->cpu_dai,
-- &info->snd_link.cpu_of_node);
-+ &dai_link->cpu_of_node);
- if (ret < 0)
- return ret;
-
-@@ -155,7 +156,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
- &info->codec_dai,
-- &info->snd_link.codec_of_node);
-+ &dai_link->codec_of_node);
- if (ret < 0)
- return ret;
-
-@@ -169,10 +170,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- GFP_KERNEL);
- sprintf(name, "%s-%s", info->cpu_dai.name, info->codec_dai.name);
- info->snd_card.name = name;
-- info->snd_link.name = info->snd_link.stream_name = name;
-+ dai_link->name = dai_link->stream_name = name;
-
- /* simple-card assumes platform == cpu */
-- info->snd_link.platform_of_node = info->snd_link.cpu_of_node;
-+ dai_link->platform_of_node = dai_link->cpu_of_node;
-
- dev_dbg(dev, "card-name : %s\n", name);
- dev_dbg(dev, "platform : %04x\n", info->daifmt);
-@@ -191,6 +192,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- static int asoc_simple_card_probe(struct platform_device *pdev)
- {
- struct asoc_simple_card_info *cinfo;
-+ struct snd_soc_dai_link *dai_link;
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
- int ret;
-@@ -204,8 +206,9 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- */
- cinfo->snd_card.owner = THIS_MODULE;
- cinfo->snd_card.dev = dev;
-- cinfo->snd_card.dai_link = &cinfo->snd_link;
-- cinfo->snd_card.num_links = 1;
-+ dai_link = &cinfo->snd_link;
-+ cinfo->snd_card.dai_link = dai_link;
-+ cinfo->snd_card.num_links = 1;
-
- if (np && of_device_is_available(np)) {
-
-@@ -233,18 +236,18 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- }
-
- cinfo->snd_card.name = cinfo->card;
-- cinfo->snd_link.name = cinfo->name;
-- cinfo->snd_link.stream_name = cinfo->name;
-- cinfo->snd_link.platform_name = cinfo->platform;
-- cinfo->snd_link.codec_name = cinfo->codec;
-+ dai_link->name = cinfo->name;
-+ dai_link->stream_name = cinfo->name;
-+ dai_link->platform_name = cinfo->platform;
-+ dai_link->codec_name = cinfo->codec;
- }
-
- /*
- * init snd_soc_dai_link
- */
-- cinfo->snd_link.cpu_dai_name = cinfo->cpu_dai.name;
-- cinfo->snd_link.codec_dai_name = cinfo->codec_dai.name;
-- cinfo->snd_link.init = asoc_simple_card_dai_init;
-+ dai_link->cpu_dai_name = cinfo->cpu_dai.name;
-+ dai_link->codec_dai_name = cinfo->codec_dai.name;
-+ dai_link->init = asoc_simple_card_dai_init;
-
- snd_soc_card_set_drvdata(&cinfo->snd_card, cinfo);
-
---
-2.1.2
-
diff --git a/patches.renesas/0166-ASoC-simple-card-simplify-code.patch b/patches.renesas/0166-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index a96c1d5dfc1a1..0000000000000
--- a/patches.renesas/0166-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 6689ffb95b3c8047e373d00505ecf7d2265a3a22 Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:48 +0100
-Subject: ASoC: simple-card: simplify code
-
-The CPU and CODEC DAI names are still copied to the user info structure.
-Put them directly in the DAI links.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 520084729267ac8df1651ad2f118a1d4a631a10a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 28 ++++++++++++++++------------
- 1 file changed, 16 insertions(+), 12 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 797696fc6f12..9068ab474ab4 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -60,7 +60,8 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- static int
- asoc_simple_card_sub_parse_of(struct device_node *np,
- struct asoc_simple_dai *dai,
-- const struct device_node **p_node)
-+ const struct device_node **p_node,
-+ const char **name)
- {
- struct device_node *node;
- struct clk *clk;
-@@ -76,7 +77,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- *p_node = node;
-
- /* get dai->name */
-- ret = snd_soc_of_get_dai_name(np, &dai->name);
-+ ret = snd_soc_of_get_dai_name(np, name);
- if (ret < 0)
- goto parse_error;
-
-@@ -146,7 +147,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
- &info->cpu_dai,
-- &dai_link->cpu_of_node);
-+ &dai_link->cpu_of_node,
-+ &dai_link->cpu_dai_name);
- if (ret < 0)
- return ret;
-
-@@ -156,19 +158,21 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
- &info->codec_dai,
-- &dai_link->codec_of_node);
-+ &dai_link->codec_of_node,
-+ &dai_link->codec_dai_name);
- if (ret < 0)
- return ret;
-
-- if (!info->cpu_dai.name || !info->codec_dai.name)
-+ if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name)
- return -EINVAL;
-
- /* card name is created from CPU/CODEC dai name */
- name = devm_kzalloc(dev,
-- strlen(info->cpu_dai.name) +
-- strlen(info->codec_dai.name) + 2,
-+ strlen(dai_link->cpu_dai_name) +
-+ strlen(dai_link->codec_dai_name) + 2,
- GFP_KERNEL);
-- sprintf(name, "%s-%s", info->cpu_dai.name, info->codec_dai.name);
-+ sprintf(name, "%s-%s", dai_link->cpu_dai_name,
-+ dai_link->codec_dai_name);
- info->snd_card.name = name;
- dai_link->name = dai_link->stream_name = name;
-
-@@ -178,11 +182,11 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- dev_dbg(dev, "card-name : %s\n", name);
- dev_dbg(dev, "platform : %04x\n", info->daifmt);
- dev_dbg(dev, "cpu : %s / %04x / %d\n",
-- info->cpu_dai.name,
-+ dai_link->cpu_dai_name,
- info->cpu_dai.fmt,
- info->cpu_dai.sysclk);
- dev_dbg(dev, "codec : %s / %04x / %d\n",
-- info->codec_dai.name,
-+ dai_link->codec_dai_name,
- info->codec_dai.fmt,
- info->codec_dai.sysclk);
-
-@@ -240,13 +244,13 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- dai_link->stream_name = cinfo->name;
- dai_link->platform_name = cinfo->platform;
- dai_link->codec_name = cinfo->codec;
-+ dai_link->cpu_dai_name = cinfo->cpu_dai.name;
-+ dai_link->codec_dai_name = cinfo->codec_dai.name;
- }
-
- /*
- * init snd_soc_dai_link
- */
-- dai_link->cpu_dai_name = cinfo->cpu_dai.name;
-- dai_link->codec_dai_name = cinfo->codec_dai.name;
- dai_link->init = asoc_simple_card_dai_init;
-
- snd_soc_card_set_drvdata(&cinfo->snd_card, cinfo);
---
-2.1.2
-
diff --git a/patches.renesas/0167-ASoC-simple-card-simplify-code.patch b/patches.renesas/0167-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index 45fbbd6b7e69b..0000000000000
--- a/patches.renesas/0167-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 9308ee506aa7a68c8af387e9c94956cf8cc4fbd5 Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:52 +0100
-Subject: ASoC: simple-card: simplify code
-
-In the non-DT sequence, the platform data is copied as a whole to the
-dynamic card info and the same pointer 'cinfo' is used to copy the
-platform information to the card.
-
-Use 'priv' as the pointer to the dynamic card info and copy only the
-useful information from the platform data.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ca65b492c7a265b220f763fd68bf87391213248f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 34 ++++++++++++++++++++--------------
- 1 file changed, 20 insertions(+), 14 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 9068ab474ab4..90c6fd5c2c7e 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -195,40 +195,42 @@ static int asoc_simple_card_parse_of(struct device_node *node,
-
- static int asoc_simple_card_probe(struct platform_device *pdev)
- {
-- struct asoc_simple_card_info *cinfo;
-+ struct asoc_simple_card_info *priv;
- struct snd_soc_dai_link *dai_link;
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
- int ret;
-
-- cinfo = devm_kzalloc(dev, sizeof(*cinfo), GFP_KERNEL);
-- if (!cinfo)
-+ priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-+ if (!priv)
- return -ENOMEM;
-
- /*
- * init snd_soc_card
- */
-- cinfo->snd_card.owner = THIS_MODULE;
-- cinfo->snd_card.dev = dev;
-- dai_link = &cinfo->snd_link;
-- cinfo->snd_card.dai_link = dai_link;
-- cinfo->snd_card.num_links = 1;
-+ priv->snd_card.owner = THIS_MODULE;
-+ priv->snd_card.dev = dev;
-+ dai_link = &priv->snd_link;
-+ priv->snd_card.dai_link = dai_link;
-+ priv->snd_card.num_links = 1;
-
- if (np && of_device_is_available(np)) {
-
-- ret = asoc_simple_card_parse_of(np, cinfo, dev);
-+ ret = asoc_simple_card_parse_of(np, priv, dev);
- if (ret < 0) {
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "parse error %d\n", ret);
- return ret;
- }
- } else {
-- if (!dev->platform_data) {
-+ struct asoc_simple_card_info *cinfo;
-+
-+ cinfo = dev->platform_data;
-+ if (!cinfo) {
- dev_err(dev, "no info for asoc-simple-card\n");
- return -EINVAL;
- }
-
-- memcpy(cinfo, dev->platform_data, sizeof(*cinfo));
- if (!cinfo->name ||
- !cinfo->card ||
- !cinfo->codec_dai.name ||
-@@ -239,13 +241,17 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- return -EINVAL;
- }
-
-- cinfo->snd_card.name = cinfo->card;
-+ priv->snd_card.name = cinfo->card;
- dai_link->name = cinfo->name;
- dai_link->stream_name = cinfo->name;
- dai_link->platform_name = cinfo->platform;
- dai_link->codec_name = cinfo->codec;
- dai_link->cpu_dai_name = cinfo->cpu_dai.name;
- dai_link->codec_dai_name = cinfo->codec_dai.name;
-+ memcpy(&priv->cpu_dai, &cinfo->cpu_dai,
-+ sizeof(priv->cpu_dai));
-+ memcpy(&priv->codec_dai, &cinfo->codec_dai,
-+ sizeof(priv->codec_dai));
- }
-
- /*
-@@ -253,9 +259,9 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- */
- dai_link->init = asoc_simple_card_dai_init;
-
-- snd_soc_card_set_drvdata(&cinfo->snd_card, cinfo);
-+ snd_soc_card_set_drvdata(&priv->snd_card, priv);
-
-- return devm_snd_soc_register_card(&pdev->dev, &cinfo->snd_card);
-+ return devm_snd_soc_register_card(&pdev->dev, &priv->snd_card);
- }
-
- static const struct of_device_id asoc_simple_of_match[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0168-ASoC-simple-card-simplify-code.patch b/patches.renesas/0168-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index 04692ad3923b8..0000000000000
--- a/patches.renesas/0168-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 922158e47a1ed84669281b4b394010e620a58c5d Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:51:56 +0100
-Subject: ASoC: simple-card: simplify code
-
-The platform data structure contains information which is used only by
-the driver, and the driver allocates platform information fields which
-are of no use.
-Move the driver specific data to a new private structure and cleanup
-the platform data structure.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 45fce59496cbabd46761e6980c05c82d94d08eaa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/simple_card.h | 4 ----
- sound/soc/generic/simple-card.c | 14 +++++++++++---
- 2 files changed, 11 insertions(+), 7 deletions(-)
-
-diff --git a/include/sound/simple_card.h b/include/sound/simple_card.h
-index 6c74527d4926..e1ac996c8feb 100644
---- a/include/sound/simple_card.h
-+++ b/include/sound/simple_card.h
-@@ -29,10 +29,6 @@ struct asoc_simple_card_info {
- unsigned int daifmt;
- struct asoc_simple_dai cpu_dai;
- struct asoc_simple_dai codec_dai;
--
-- /* used in simple-card.c */
-- struct snd_soc_dai_link snd_link;
-- struct snd_soc_card snd_card;
- };
-
- #endif /* __SIMPLE_CARD_H */
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 90c6fd5c2c7e..0f11c2808437 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -15,6 +15,14 @@
- #include <linux/string.h>
- #include <sound/simple_card.h>
-
-+struct simple_card_data {
-+ struct snd_soc_card snd_card;
-+ unsigned int daifmt;
-+ struct asoc_simple_dai cpu_dai;
-+ struct asoc_simple_dai codec_dai;
-+ struct snd_soc_dai_link snd_link;
-+};
-+
- static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
- struct asoc_simple_dai *set,
- unsigned int daifmt)
-@@ -39,7 +47,7 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
-
- static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- {
-- struct asoc_simple_card_info *info =
-+ struct simple_card_data *info =
- snd_soc_card_get_drvdata(rtd->card);
- struct snd_soc_dai *codec = rtd->codec_dai;
- struct snd_soc_dai *cpu = rtd->cpu_dai;
-@@ -121,7 +129,7 @@ parse_error:
- }
-
- static int asoc_simple_card_parse_of(struct device_node *node,
-- struct asoc_simple_card_info *info,
-+ struct simple_card_data *info,
- struct device *dev)
- {
- struct snd_soc_dai_link *dai_link = info->snd_card.dai_link;
-@@ -195,7 +203,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
-
- static int asoc_simple_card_probe(struct platform_device *pdev)
- {
-- struct asoc_simple_card_info *priv;
-+ struct simple_card_data *priv;
- struct snd_soc_dai_link *dai_link;
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
---
-2.1.2
-
diff --git a/patches.renesas/0169-ASoC-simple-card-simplify-code.patch b/patches.renesas/0169-ASoC-simple-card-simplify-code.patch
deleted file mode 100644
index e0ff4bf6bf478..0000000000000
--- a/patches.renesas/0169-ASoC-simple-card-simplify-code.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From 9ee1e0f1085a7ddb1c55639eaf45c9a1ec65263b Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Wed, 15 Jan 2014 16:52:00 +0100
-Subject: ASoC: simple-card: simplify code
-
-Rename the pointer to the private data structure to 'priv' to avoid confusion with the platform data pointer.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b367a3252b365fd545fc589a40cad3976e73d7d7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 32 ++++++++++++++++----------------
- 1 file changed, 16 insertions(+), 16 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 0f11c2808437..6443c87e8625 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -47,18 +47,18 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
-
- static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- {
-- struct simple_card_data *info =
-+ struct simple_card_data *priv =
- snd_soc_card_get_drvdata(rtd->card);
- struct snd_soc_dai *codec = rtd->codec_dai;
- struct snd_soc_dai *cpu = rtd->cpu_dai;
-- unsigned int daifmt = info->daifmt;
-+ unsigned int daifmt = priv->daifmt;
- int ret;
-
-- ret = __asoc_simple_card_dai_init(codec, &info->codec_dai, daifmt);
-+ ret = __asoc_simple_card_dai_init(codec, &priv->codec_dai, daifmt);
- if (ret < 0)
- return ret;
-
-- ret = __asoc_simple_card_dai_init(cpu, &info->cpu_dai, daifmt);
-+ ret = __asoc_simple_card_dai_init(cpu, &priv->cpu_dai, daifmt);
- if (ret < 0)
- return ret;
-
-@@ -129,21 +129,21 @@ parse_error:
- }
-
- static int asoc_simple_card_parse_of(struct device_node *node,
-- struct simple_card_data *info,
-+ struct simple_card_data *priv,
- struct device *dev)
- {
-- struct snd_soc_dai_link *dai_link = info->snd_card.dai_link;
-+ struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link;
- struct device_node *np;
- char *name;
- int ret;
-
- /* get CPU/CODEC common format via simple-audio-card,format */
-- info->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
-+ priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
- (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
-
- /* DAPM routes */
- if (of_property_read_bool(node, "simple-audio-card,routing")) {
-- ret = snd_soc_of_parse_audio_routing(&info->snd_card,
-+ ret = snd_soc_of_parse_audio_routing(&priv->snd_card,
- "simple-audio-card,routing");
- if (ret)
- return ret;
-@@ -154,7 +154,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- np = of_get_child_by_name(node, "simple-audio-card,cpu");
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
-- &info->cpu_dai,
-+ &priv->cpu_dai,
- &dai_link->cpu_of_node,
- &dai_link->cpu_dai_name);
- if (ret < 0)
-@@ -165,7 +165,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- np = of_get_child_by_name(node, "simple-audio-card,codec");
- if (np)
- ret = asoc_simple_card_sub_parse_of(np,
-- &info->codec_dai,
-+ &priv->codec_dai,
- &dai_link->codec_of_node,
- &dai_link->codec_dai_name);
- if (ret < 0)
-@@ -181,22 +181,22 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- GFP_KERNEL);
- sprintf(name, "%s-%s", dai_link->cpu_dai_name,
- dai_link->codec_dai_name);
-- info->snd_card.name = name;
-+ priv->snd_card.name = name;
- dai_link->name = dai_link->stream_name = name;
-
- /* simple-card assumes platform == cpu */
- dai_link->platform_of_node = dai_link->cpu_of_node;
-
- dev_dbg(dev, "card-name : %s\n", name);
-- dev_dbg(dev, "platform : %04x\n", info->daifmt);
-+ dev_dbg(dev, "platform : %04x\n", priv->daifmt);
- dev_dbg(dev, "cpu : %s / %04x / %d\n",
- dai_link->cpu_dai_name,
-- info->cpu_dai.fmt,
-- info->cpu_dai.sysclk);
-+ priv->cpu_dai.fmt,
-+ priv->cpu_dai.sysclk);
- dev_dbg(dev, "codec : %s / %04x / %d\n",
- dai_link->codec_dai_name,
-- info->codec_dai.fmt,
-- info->codec_dai.sysclk);
-+ priv->codec_dai.fmt,
-+ priv->codec_dai.sysclk);
-
- return 0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0170-ASoC-simple-card-fix-__asoc_simple_card_dai_init.patch b/patches.renesas/0170-ASoC-simple-card-fix-__asoc_simple_card_dai_init.patch
deleted file mode 100644
index d6a23a65847bf..0000000000000
--- a/patches.renesas/0170-ASoC-simple-card-fix-__asoc_simple_card_dai_init.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 63a1b5c98152c812cc9d5ed4686e076d46eb86a1 Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Fri, 24 Jan 2014 15:43:00 +0800
-Subject: ASoC: simple-card: fix __asoc_simple_card_dai_init
-
-If the CPU/CODEC DAI set_sysclk() is not support, the -ENOTSUPP will returnd.
-Here do the check like set_fmt().
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 4763ebe226156db985fe75bfe930c4069d1f4207)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 22 +++++++++++++++-------
- 1 file changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 6443c87e8625..6366f3fa6a37 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -27,21 +27,29 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
- struct asoc_simple_dai *set,
- unsigned int daifmt)
- {
-- int ret = 0;
-+ int ret;
-
- daifmt |= set->fmt;
-
-- if (daifmt)
-+ if (daifmt) {
- ret = snd_soc_dai_set_fmt(dai, daifmt);
--
-- if (ret == -ENOTSUPP) {
-- dev_dbg(dai->dev, "ASoC: set_fmt is not supported\n");
-- ret = 0;
-+ if (ret && ret != -ENOTSUPP) {
-+ dev_err(dai->dev, "simple-card: set_fmt error\n");
-+ goto err;
-+ }
- }
-
-- if (!ret && set->sysclk)
-+ if (set->sysclk) {
- ret = snd_soc_dai_set_sysclk(dai, 0, set->sysclk, 0);
-+ if (ret && ret != -ENOTSUPP) {
-+ dev_err(dai->dev, "simple-card: set_sysclk error\n");
-+ goto err;
-+ }
-+ }
-+
-+ ret = 0;
-
-+err:
- return ret;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0171-ASoC-simple-card-simplify-the-daifmt-code.patch b/patches.renesas/0171-ASoC-simple-card-simplify-the-daifmt-code.patch
deleted file mode 100644
index cbc7b93f3e133..0000000000000
--- a/patches.renesas/0171-ASoC-simple-card-simplify-the-daifmt-code.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 6b2d2c734c95551123c40088d09e10524a7b1170 Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Fri, 24 Jan 2014 15:43:01 +0800
-Subject: ASoC: simple-card: simplify the daifmt code
-
-In the asoc_simple_card_parse_of() will parse the device node's CPU/CODEC
-DAI commone fmts, and then in asoc_simple_card_sub_parse_of() will parse
-the CPU/CODEC DAI's sub-node fmts, so we can combine the info->daifmt and
-info->set.fmt in asoc_simple_card_sub_parse_of() not while just before
-_set_fmt().
-
-And this will be more easy to add new functions, such as supporting
-_set_tdm_slot(), etc.
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 30d0341e7da0c012f64fb290dd1153360fb49a8d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 6366f3fa6a37..65833feb995f 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -24,15 +24,12 @@ struct simple_card_data {
- };
-
- static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
-- struct asoc_simple_dai *set,
-- unsigned int daifmt)
-+ struct asoc_simple_dai *set)
- {
- int ret;
-
-- daifmt |= set->fmt;
--
-- if (daifmt) {
-- ret = snd_soc_dai_set_fmt(dai, daifmt);
-+ if (set->fmt) {
-+ ret = snd_soc_dai_set_fmt(dai, set->fmt);
- if (ret && ret != -ENOTSUPP) {
- dev_err(dai->dev, "simple-card: set_fmt error\n");
- goto err;
-@@ -59,14 +56,13 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- snd_soc_card_get_drvdata(rtd->card);
- struct snd_soc_dai *codec = rtd->codec_dai;
- struct snd_soc_dai *cpu = rtd->cpu_dai;
-- unsigned int daifmt = priv->daifmt;
- int ret;
-
-- ret = __asoc_simple_card_dai_init(codec, &priv->codec_dai, daifmt);
-+ ret = __asoc_simple_card_dai_init(codec, &priv->codec_dai);
- if (ret < 0)
- return ret;
-
-- ret = __asoc_simple_card_dai_init(cpu, &priv->cpu_dai, daifmt);
-+ ret = __asoc_simple_card_dai_init(cpu, &priv->cpu_dai);
- if (ret < 0)
- return ret;
-
-@@ -75,6 +71,7 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
-
- static int
- asoc_simple_card_sub_parse_of(struct device_node *np,
-+ unsigned int daifmt,
- struct asoc_simple_dai *dai,
- const struct device_node **p_node,
- const char **name)
-@@ -103,6 +100,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- * and specific "format" if it has
- */
- dai->fmt = snd_soc_of_parse_daifmt(np, NULL);
-+ dai->fmt |= daifmt;
-
- /*
- * dai->sysclk come from
-@@ -161,7 +159,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- ret = -EINVAL;
- np = of_get_child_by_name(node, "simple-audio-card,cpu");
- if (np)
-- ret = asoc_simple_card_sub_parse_of(np,
-+ ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
- &priv->cpu_dai,
- &dai_link->cpu_of_node,
- &dai_link->cpu_dai_name);
-@@ -172,7 +170,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- ret = -EINVAL;
- np = of_get_child_by_name(node, "simple-audio-card,codec");
- if (np)
-- ret = asoc_simple_card_sub_parse_of(np,
-+ ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
- &priv->codec_dai,
- &dai_link->codec_of_node,
- &dai_link->codec_dai_name);
---
-2.1.2
-
diff --git a/patches.renesas/0172-ASoC-simple-card-Add-snd_card-s-name-parsing-from-DT.patch b/patches.renesas/0172-ASoC-simple-card-Add-snd_card-s-name-parsing-from-DT.patch
deleted file mode 100644
index 5d81f62562219..0000000000000
--- a/patches.renesas/0172-ASoC-simple-card-Add-snd_card-s-name-parsing-from-DT.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 695ec77ddc6580a80c38097ab9d269cedd8a3386 Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Fri, 24 Jan 2014 15:43:02 +0800
-Subject: ASoC: simple-card: Add snd_card's name parsing from DT node support
-
-If the DT is used and the CPU DAI device has only one DAI, the card
-name will be like :
-
-ALSA device list:
-0: 40031000.sai-sgtl5000
-
-And this name maybe a little ugly to some customers, so here the
-card name parsing from DT node is supported.
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2772555b6c5ba79783c04ea6c60549530d737e2e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 65833feb995f..0890fcdc9251 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -143,6 +143,9 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- char *name;
- int ret;
-
-+ /* parsing the card name from DT */
-+ snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
-+
- /* get CPU/CODEC common format via simple-audio-card,format */
- priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
- (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
-@@ -187,7 +190,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- GFP_KERNEL);
- sprintf(name, "%s-%s", dai_link->cpu_dai_name,
- dai_link->codec_dai_name);
-- priv->snd_card.name = name;
-+ if (!priv->snd_card.name)
-+ priv->snd_card.name = name;
- dai_link->name = dai_link->stream_name = name;
-
- /* simple-card assumes platform == cpu */
---
-2.1.2
-
diff --git a/patches.renesas/0173-ASoC-simple-card-add-off-codec-widgets-supports.patch b/patches.renesas/0173-ASoC-simple-card-add-off-codec-widgets-supports.patch
deleted file mode 100644
index 323940c4b04f4..0000000000000
--- a/patches.renesas/0173-ASoC-simple-card-add-off-codec-widgets-supports.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 5712429e5e3059094d59136cd111c5b5f97e3ca5 Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Sat, 8 Feb 2014 15:59:53 +0800
-Subject: ASoC: simple-card: add off-codec widgets supports.
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9d681f5bfc85515a7b4a4af09337ed5e74f39ad9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 0890fcdc9251..4fe8abc6e216 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -150,6 +150,14 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
- (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
-
-+ /* off-codec widgets */
-+ if (of_property_read_bool(node, "simple-audio-card,widgets")) {
-+ ret = snd_soc_of_parse_audio_simple_widgets(&priv->snd_card,
-+ "simple-audio-card,widgets");
-+ if (ret)
-+ return ret;
-+ }
-+
- /* DAPM routes */
- if (of_property_read_bool(node, "simple-audio-card,routing")) {
- ret = snd_soc_of_parse_audio_routing(&priv->snd_card,
---
-2.1.2
-
diff --git a/patches.renesas/0174-ASoC-simple-card-for-new-properties-documenting-and-.patch b/patches.renesas/0174-ASoC-simple-card-for-new-properties-documenting-and-.patch
deleted file mode 100644
index a448eac16a163..0000000000000
--- a/patches.renesas/0174-ASoC-simple-card-for-new-properties-documenting-and-.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 83733acc05d08f1455376dabf5a1c693d6f8d236 Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Sat, 8 Feb 2014 15:59:55 +0800
-Subject: ASoC: simple-card: for new properties documenting and usage
-
-This add the following three new properties documenting and usage
-for simple card:
-
-"simple-audio-card,name",
-"simple-audio-card,widgets",
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 66841345073b049c0c194486bac4d7f07266a57e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/sound/simple-card.txt | 12 ++++++++++--
- 1 file changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
-index 19c84df5fffa..05273583490c 100644
---- a/Documentation/devicetree/bindings/sound/simple-card.txt
-+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
-@@ -8,9 +8,12 @@ Required properties:
-
- Optional properties:
-
-+- simple-audio-card,name : User specified audio sound card name, one string
-+ property.
- - simple-audio-card,format : CPU/CODEC common audio format.
- "i2s", "right_j", "left_j" , "dsp_a"
- "dsp_b", "ac97", "pdm", "msb", "lsb"
-+- simple-audio-card,widgets : Please refer to widgets.txt.
- - simple-audio-card,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
-@@ -42,11 +45,16 @@ Example:
-
- sound {
- compatible = "simple-audio-card";
-+ simple-audio-card,name = "VF610-Tower-Sound-Card";
- simple-audio-card,format = "left_j";
-+ simple-audio-card,widgets =
-+ "Microphone", "Microphone Jack",
-+ "Headphone", "Headphone Jack",
-+ "Speaker", "External Speaker";
- simple-audio-card,routing =
-- "MIC_IN", "Mic Jack",
-+ "MIC_IN", "Microphone Jack",
- "Headphone Jack", "HP_OUT",
-- "Ext Spk", "LINE_OUT";
-+ "External Speaker", "LINE_OUT";
-
- simple-audio-card,cpu {
- sound-dai = <&sh_fsi2 0>;
---
-2.1.2
-
diff --git a/patches.renesas/0175-ASoC-simple-card-add-slot-information-parsing-suppor.patch b/patches.renesas/0175-ASoC-simple-card-add-slot-information-parsing-suppor.patch
deleted file mode 100644
index 1c7c16a221ef8..0000000000000
--- a/patches.renesas/0175-ASoC-simple-card-add-slot-information-parsing-suppor.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 990b46defa1032606071010a7890b64d81c5748c Mon Sep 17 00:00:00 2001
-From: Xiubo Li <Li.Xiubo@freescale.com>
-Date: Fri, 14 Feb 2014 09:34:36 +0800
-Subject: ASoC: simple-card: add slot information parsing supports
-
-For some CPU/CODEC DAI devices the slot information maybe needed. This
-patch adds the slot information parsing for simple-card driver.
-
-Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6ff62eedce4f7756b092d276165d8e11edab9f28)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/simple-card.txt | 5 +++++
- include/sound/simple_card.h | 2 ++
- sound/soc/generic/simple-card.c | 18 ++++++++++++++++++
- 3 files changed, 25 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
-index 05273583490c..b30c222f9cd3 100644
---- a/Documentation/devicetree/bindings/sound/simple-card.txt
-+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
-@@ -18,6 +18,8 @@ Optional properties:
- Each entry is a pair of strings, the first being the
- connection's sink, the second being the connection's
- source.
-+- dai-tdm-slot-num : Please refer to tdm-slot.txt.
-+- dai-tdm-slot-width : Please refer to tdm-slot.txt.
-
- Required subnodes:
-
-@@ -56,6 +58,9 @@ sound {
- "Headphone Jack", "HP_OUT",
- "External Speaker", "LINE_OUT";
-
-+ dai-tdm-slot-num = <2>;
-+ dai-tdm-slot-width = <8>;
-+
- simple-audio-card,cpu {
- sound-dai = <&sh_fsi2 0>;
- };
-diff --git a/include/sound/simple_card.h b/include/sound/simple_card.h
-index e1ac996c8feb..9b0ac77177b6 100644
---- a/include/sound/simple_card.h
-+++ b/include/sound/simple_card.h
-@@ -18,6 +18,8 @@ struct asoc_simple_dai {
- const char *name;
- unsigned int fmt;
- unsigned int sysclk;
-+ int slots;
-+ int slot_width;
- };
-
- struct asoc_simple_card_info {
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 4fe8abc6e216..bdd176ddff07 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -9,11 +9,14 @@
- * published by the Free Software Foundation.
- */
- #include <linux/clk.h>
-+#include <linux/device.h>
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/platform_device.h>
- #include <linux/string.h>
- #include <sound/simple_card.h>
-+#include <sound/soc-dai.h>
-+#include <sound/soc.h>
-
- struct simple_card_data {
- struct snd_soc_card snd_card;
-@@ -44,6 +47,16 @@ static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
- }
- }
-
-+ if (set->slots) {
-+ ret = snd_soc_dai_set_tdm_slot(dai, 0, 0,
-+ set->slots,
-+ set->slot_width);
-+ if (ret && ret != -ENOTSUPP) {
-+ dev_err(dai->dev, "simple-card: set_tdm_slot error\n");
-+ goto err;
-+ }
-+ }
-+
- ret = 0;
-
- err:
-@@ -94,6 +107,11 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- if (ret < 0)
- goto parse_error;
-
-+ /* parse TDM slot */
-+ ret = snd_soc_of_parse_tdm_slot(np, &dai->slots, &dai->slot_width);
-+ if (ret)
-+ goto parse_error;
-+
- /*
- * bitclock-inversion, frame-inversion
- * bitclock-master, frame-master
---
-2.1.2
-
diff --git a/patches.renesas/0176-ASoC-simple-card-cpu_dai_name-creates-confusion-when.patch b/patches.renesas/0176-ASoC-simple-card-cpu_dai_name-creates-confusion-when.patch
deleted file mode 100644
index 4aa5d4d487ddc..0000000000000
--- a/patches.renesas/0176-ASoC-simple-card-cpu_dai_name-creates-confusion-when.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 718a1e6e627eb549d62058cbd1ad55ef3d4fd90c Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 27 Feb 2014 18:25:24 -0800
-Subject: ASoC: simple-card: cpu_dai_name creates confusion when DT case
-
-Basically, soc_bind_dai_link() checks
-cpu_dai->dev->of_node and dai_link->cpu_of_node in DT case.
-But after that it will check
-cpu_dai->name and dai_link->cpu_dai_name too.
-
-On the other hand, snd_soc_dai :: name is created by
-fmt_single_name() or fmt_multiple_name().
-
-There is no confusion if dai name is created by fmt_multiple_name(),
-since cpu_dai->name is same as dai_link->cpu_dai_name.
-but, if dai name is created by fmt_single_name(), CPU DAI never match.
-
-Thus, simple-card not set dai_link->cpu_dai_name if DT case
-to skip naming match on soc_bind_dai_link()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit f687d900d30a61dda38db2a99239f5284a86a309)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index bdd176ddff07..034a2b73f6c1 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -234,6 +234,17 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- priv->codec_dai.fmt,
- priv->codec_dai.sysclk);
-
-+ /*
-+ * soc_bind_dai_link() will check cpu name
-+ * after of_node matching if dai_link has cpu_dai_name.
-+ * but, it will never match if name was created by fmt_single_name()
-+ * remove cpu_dai_name to escape name matching.
-+ * see
-+ * fmt_single_name()
-+ * fmt_multiple_name()
-+ */
-+ dai_link->cpu_dai_name = NULL;
-+
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0177-ASoC-simple-card-tidyup-cpu-codec-dai_fmt-settings-f.patch b/patches.renesas/0177-ASoC-simple-card-tidyup-cpu-codec-dai_fmt-settings-f.patch
deleted file mode 100644
index 32b6ac7705be3..0000000000000
--- a/patches.renesas/0177-ASoC-simple-card-tidyup-cpu-codec-dai_fmt-settings-f.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From c0f6e1ee2b931622ad9940b79556917e46309db3 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 2 Mar 2014 20:32:43 -0800
-Subject: ASoC: simple-card: tidyup cpu/codec dai_fmt settings for non-DT
-
-30d0341e7da0c012f64fb290dd1153360fb49a8d
-(ASoC: simple-card: simplify the daifmt code)
-simplify cpu/codec dai_fmt which consists from
-dai specific format + common format.
-But, it didn't care about non-DT case.
-This patch fixes it
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 81985bd63f6f1711035aa8d97caf2fb203250a95)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 034a2b73f6c1..7cabcc5c8703 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -307,6 +307,9 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- sizeof(priv->cpu_dai));
- memcpy(&priv->codec_dai, &cinfo->codec_dai,
- sizeof(priv->codec_dai));
-+
-+ priv->cpu_dai.fmt |= cinfo->daifmt;
-+ priv->codec_dai.fmt |= cinfo->daifmt;
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0178-ASoC-simple-card-card-name-can-be-option.patch b/patches.renesas/0178-ASoC-simple-card-card-name-can-be-option.patch
deleted file mode 100644
index 4398ae0b168a4..0000000000000
--- a/patches.renesas/0178-ASoC-simple-card-card-name-can-be-option.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 93ef9849ef6367b07e8d2a0fea35b8b1d9431054 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 9 Mar 2014 19:37:56 -0700
-Subject: ASoC: simple-card: card name can be option
-
-snd_card.name is now option on DT case.
-non-DT case can follow same style,
-and it is understandable from platform point of view.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 12ffa6fc1958879a81b6af1624c1a2edd83ec04a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 7cabcc5c8703..5dd47691ba41 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -287,7 +287,6 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- }
-
- if (!cinfo->name ||
-- !cinfo->card ||
- !cinfo->codec_dai.name ||
- !cinfo->codec ||
- !cinfo->platform ||
-@@ -296,7 +295,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- return -EINVAL;
- }
-
-- priv->snd_card.name = cinfo->card;
-+ priv->snd_card.name = (cinfo->card) ? cinfo->card : cinfo->name;
- dai_link->name = cinfo->name;
- dai_link->stream_name = cinfo->name;
- dai_link->platform_name = cinfo->platform;
---
-2.1.2
-
diff --git a/patches.renesas/0179-ASoC-simple-card-Fix-the-reference-count-of-device-n.patch b/patches.renesas/0179-ASoC-simple-card-Fix-the-reference-count-of-device-n.patch
deleted file mode 100644
index 98e99b093886e..0000000000000
--- a/patches.renesas/0179-ASoC-simple-card-Fix-the-reference-count-of-device-n.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From c7fad9dbd74462c996d8ba651f8d65f7a5e24170 Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Tue, 11 Mar 2014 10:03:40 +0100
-Subject: ASoC: simple-card: Fix the reference count of device nodes
-
-The reference count of some device nodes is not correctly reset
-at end of card probe.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e512e001dafa54e5ac7244416e340750a4356b41)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 50 ++++++++++++++++++++++++++++++-----------
- 1 file changed, 37 insertions(+), 13 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 5dd47691ba41..dcf37fb69b35 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -105,12 +105,12 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- /* get dai->name */
- ret = snd_soc_of_get_dai_name(np, name);
- if (ret < 0)
-- goto parse_error;
-+ return ret;
-
- /* parse TDM slot */
- ret = snd_soc_of_parse_tdm_slot(np, &dai->slots, &dai->slot_width);
- if (ret)
-- goto parse_error;
-+ return ret;
-
- /*
- * bitclock-inversion, frame-inversion
-@@ -130,7 +130,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- clk = of_clk_get(np, 0);
- if (IS_ERR(clk)) {
- ret = PTR_ERR(clk);
-- goto parse_error;
-+ return ret;
- }
-
- dai->sysclk = clk_get_rate(clk);
-@@ -144,12 +144,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- dai->sysclk = clk_get_rate(clk);
- }
-
-- ret = 0;
--
--parse_error:
-- of_node_put(node);
--
-- return ret;
-+ return 0;
- }
-
- static int asoc_simple_card_parse_of(struct device_node *node,
-@@ -187,22 +182,26 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- /* CPU sub-node */
- ret = -EINVAL;
- np = of_get_child_by_name(node, "simple-audio-card,cpu");
-- if (np)
-+ if (np) {
- ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
- &priv->cpu_dai,
- &dai_link->cpu_of_node,
- &dai_link->cpu_dai_name);
-+ of_node_put(np);
-+ }
- if (ret < 0)
- return ret;
-
- /* CODEC sub-node */
- ret = -EINVAL;
- np = of_get_child_by_name(node, "simple-audio-card,codec");
-- if (np)
-+ if (np) {
- ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
- &priv->codec_dai,
- &dai_link->codec_of_node,
- &dai_link->codec_dai_name);
-+ of_node_put(np);
-+ }
- if (ret < 0)
- return ret;
-
-@@ -248,6 +247,27 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- return 0;
- }
-
-+/* update the reference count of the devices nodes at end of probe */
-+static int asoc_simple_card_unref(struct platform_device *pdev)
-+{
-+ struct snd_soc_card *card = platform_get_drvdata(pdev);
-+ struct snd_soc_dai_link *dai_link;
-+ struct device_node *np;
-+ int num_links;
-+
-+ for (num_links = 0, dai_link = card->dai_link;
-+ num_links < card->num_links;
-+ num_links++, dai_link++) {
-+ np = (struct device_node *) dai_link->cpu_of_node;
-+ if (np)
-+ of_node_put(np);
-+ np = (struct device_node *) dai_link->codec_of_node;
-+ if (np)
-+ of_node_put(np);
-+ }
-+ return 0;
-+}
-+
- static int asoc_simple_card_probe(struct platform_device *pdev)
- {
- struct simple_card_data *priv;
-@@ -275,7 +295,7 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- if (ret < 0) {
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "parse error %d\n", ret);
-- return ret;
-+ goto err;
- }
- } else {
- struct asoc_simple_card_info *cinfo;
-@@ -318,7 +338,11 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
-
- snd_soc_card_set_drvdata(&priv->snd_card, priv);
-
-- return devm_snd_soc_register_card(&pdev->dev, &priv->snd_card);
-+ ret = devm_snd_soc_register_card(&pdev->dev, &priv->snd_card);
-+
-+err:
-+ asoc_simple_card_unref(pdev);
-+ return ret;
- }
-
- static const struct of_device_id asoc_simple_of_match[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0180-ASoC-simple-card-Simplify-code.patch b/patches.renesas/0180-ASoC-simple-card-Simplify-code.patch
deleted file mode 100644
index a7b1898aa1e59..0000000000000
--- a/patches.renesas/0180-ASoC-simple-card-Simplify-code.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From 43bb142a3e38762de866fca588942385100a6903 Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Sat, 15 Mar 2014 11:32:42 +0100
-Subject: ASoC: simple-card: Simplify code
-
-The global DAI format is used only in the function
-asoc_simple_card_parse_of(). So, move it from the private data
-to the stack.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Reviewed-by: Xiubo Li <Li.Xiubo@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c56c4d74c6f96d0ff605d8948e127099cf5e6681)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index dcf37fb69b35..ca7e63ef858a 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -20,7 +20,6 @@
-
- struct simple_card_data {
- struct snd_soc_card snd_card;
-- unsigned int daifmt;
- struct asoc_simple_dai cpu_dai;
- struct asoc_simple_dai codec_dai;
- struct snd_soc_dai_link snd_link;
-@@ -154,13 +153,14 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link;
- struct device_node *np;
- char *name;
-+ unsigned int daifmt;
- int ret;
-
- /* parsing the card name from DT */
- snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
-
- /* get CPU/CODEC common format via simple-audio-card,format */
-- priv->daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
-+ daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
- (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
-
- /* off-codec widgets */
-@@ -183,7 +183,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- ret = -EINVAL;
- np = of_get_child_by_name(node, "simple-audio-card,cpu");
- if (np) {
-- ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
-+ ret = asoc_simple_card_sub_parse_of(np, daifmt,
- &priv->cpu_dai,
- &dai_link->cpu_of_node,
- &dai_link->cpu_dai_name);
-@@ -196,7 +196,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- ret = -EINVAL;
- np = of_get_child_by_name(node, "simple-audio-card,codec");
- if (np) {
-- ret = asoc_simple_card_sub_parse_of(np, priv->daifmt,
-+ ret = asoc_simple_card_sub_parse_of(np, daifmt,
- &priv->codec_dai,
- &dai_link->codec_of_node,
- &dai_link->codec_dai_name);
-@@ -223,7 +223,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- dai_link->platform_of_node = dai_link->cpu_of_node;
-
- dev_dbg(dev, "card-name : %s\n", name);
-- dev_dbg(dev, "platform : %04x\n", priv->daifmt);
-+ dev_dbg(dev, "platform : %04x\n", daifmt);
- dev_dbg(dev, "cpu : %s / %04x / %d\n",
- dai_link->cpu_dai_name,
- priv->cpu_dai.fmt,
---
-2.1.2
-
diff --git a/patches.renesas/0181-ASoC-simple-card-overwrite-cpu_dai-fmt-with-codec_da.patch b/patches.renesas/0181-ASoC-simple-card-overwrite-cpu_dai-fmt-with-codec_da.patch
deleted file mode 100644
index 5e45bcf8713f3..0000000000000
--- a/patches.renesas/0181-ASoC-simple-card-overwrite-cpu_dai-fmt-with-codec_da.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From 2ee7150df5dc5a5652f483b97302640ab1273b15 Mon Sep 17 00:00:00 2001
-From: Nicolin Chen <Guangyu.Chen@freescale.com>
-Date: Wed, 12 Mar 2014 11:02:11 +0800
-Subject: ASoC: simple-card: overwrite cpu_dai->fmt with codec_dai->fmt
-
-The current simple-card driver separates the daimft for cpu_dai and codec_dai.
-So we might get different values for them (0x4003 and 0x1003 for example):
-
-asoc-simple-card sound-cs42888.12: cpu : 2024000.esai / 4003 / 132000000
-asoc-simple-card sound-cs42888.12: codec : cs42888 / 1003 / 24576000
-asoc-simple-card sound-cs42888.12: cs42888 <-> 2024000.esai mapping ok
-
-This is not allowed at all as we need to keep the DAIFMT settings identical
-for both the ends of the link.
-
-Thus this patch fixes it by overwriting the cpu_dai->fmt with codec_dai->fmt
-since we defined the DAIFMT_MASTER basing on CODEC at the first place while
-the other bits are same.
-
-Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 46c39cae292fd691f32e573e6c2c854e36614c93)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/simple-card.txt | 6 ++++++
- sound/soc/generic/simple-card.c | 20 ++++++++++++++------
- 2 files changed, 20 insertions(+), 6 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
-index b30c222f9cd3..881914b139ca 100644
---- a/Documentation/devicetree/bindings/sound/simple-card.txt
-+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
-@@ -43,6 +43,12 @@ Optional CPU/CODEC subnodes properties:
- clock node (= common clock), or "system-clock-frequency"
- (if system doens't support common clock)
-
-+Note:
-+ * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and
-+ 'frame-inversion', the simple card will use the settings of CODEC for both
-+ CPU and CODEC sides as we need to keep the settings identical for both ends
-+ of the link.
-+
- Example:
-
- sound {
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index ca7e63ef858a..2ee8ed56bcf1 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -151,6 +151,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- struct device *dev)
- {
- struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link;
-+ struct asoc_simple_dai *codec_dai = &priv->codec_dai;
-+ struct asoc_simple_dai *cpu_dai = &priv->cpu_dai;
- struct device_node *np;
- char *name;
- unsigned int daifmt;
-@@ -184,7 +186,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- np = of_get_child_by_name(node, "simple-audio-card,cpu");
- if (np) {
- ret = asoc_simple_card_sub_parse_of(np, daifmt,
-- &priv->cpu_dai,
-+ cpu_dai,
- &dai_link->cpu_of_node,
- &dai_link->cpu_dai_name);
- of_node_put(np);
-@@ -197,7 +199,7 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- np = of_get_child_by_name(node, "simple-audio-card,codec");
- if (np) {
- ret = asoc_simple_card_sub_parse_of(np, daifmt,
-- &priv->codec_dai,
-+ codec_dai,
- &dai_link->codec_of_node,
- &dai_link->codec_dai_name);
- of_node_put(np);
-@@ -205,6 +207,12 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- if (ret < 0)
- return ret;
-
-+ /*
-+ * overwrite cpu_dai->fmt as its DAIFMT_MASTER bit is based on CODEC
-+ * while the other bits should be identical unless buggy SW/HW design.
-+ */
-+ cpu_dai->fmt = codec_dai->fmt;
-+
- if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name)
- return -EINVAL;
-
-@@ -226,12 +234,12 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- dev_dbg(dev, "platform : %04x\n", daifmt);
- dev_dbg(dev, "cpu : %s / %04x / %d\n",
- dai_link->cpu_dai_name,
-- priv->cpu_dai.fmt,
-- priv->cpu_dai.sysclk);
-+ cpu_dai->fmt,
-+ cpu_dai->sysclk);
- dev_dbg(dev, "codec : %s / %04x / %d\n",
- dai_link->codec_dai_name,
-- priv->codec_dai.fmt,
-- priv->codec_dai.sysclk);
-+ codec_dai->fmt,
-+ codec_dai->sysclk);
-
- /*
- * soc_bind_dai_link() will check cpu name
---
-2.1.2
-
diff --git a/patches.renesas/0182-ASoC-simple-card-dynamically-allocate-the-DAI-link-a.patch b/patches.renesas/0182-ASoC-simple-card-dynamically-allocate-the-DAI-link-a.patch
deleted file mode 100644
index 21aaa9a9b618a..0000000000000
--- a/patches.renesas/0182-ASoC-simple-card-dynamically-allocate-the-DAI-link-a.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 2ba1400d369b523229ae524e73160377e9a878bb Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Thu, 20 Mar 2014 10:52:41 +0100
-Subject: ASoC: simple-card: dynamically allocate the DAI link and properties
-
-The DAI link array and the properties (fmt, sysclk slots) are
-hard-coded for a single CPU / CODEC link.
-
-This patch dynamically allocates the DAI link array and the
-properties with the aim of supporting many DAI links.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit cf7dc23cbfd5c4c5ab2136f19522d9b3b41acf99)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 42 ++++++++++++++++++++++++++---------------
- 1 file changed, 27 insertions(+), 15 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 2ee8ed56bcf1..1e865c5d377f 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -20,9 +20,11 @@
-
- struct simple_card_data {
- struct snd_soc_card snd_card;
-- struct asoc_simple_dai cpu_dai;
-- struct asoc_simple_dai codec_dai;
-- struct snd_soc_dai_link snd_link;
-+ struct simple_dai_props {
-+ struct asoc_simple_dai cpu_dai;
-+ struct asoc_simple_dai codec_dai;
-+ } *dai_props;
-+ struct snd_soc_dai_link dai_link[]; /* dynamically allocated */
- };
-
- static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
-@@ -70,11 +72,11 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- struct snd_soc_dai *cpu = rtd->cpu_dai;
- int ret;
-
-- ret = __asoc_simple_card_dai_init(codec, &priv->codec_dai);
-+ ret = __asoc_simple_card_dai_init(codec, &priv->dai_props->codec_dai);
- if (ret < 0)
- return ret;
-
-- ret = __asoc_simple_card_dai_init(cpu, &priv->cpu_dai);
-+ ret = __asoc_simple_card_dai_init(cpu, &priv->dai_props->cpu_dai);
- if (ret < 0)
- return ret;
-
-@@ -151,8 +153,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- struct device *dev)
- {
- struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link;
-- struct asoc_simple_dai *codec_dai = &priv->codec_dai;
-- struct asoc_simple_dai *cpu_dai = &priv->cpu_dai;
-+ struct asoc_simple_dai *codec_dai = &priv->dai_props->codec_dai;
-+ struct asoc_simple_dai *cpu_dai = &priv->dai_props->cpu_dai;
- struct device_node *np;
- char *name;
- unsigned int daifmt;
-@@ -284,7 +286,10 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- struct device *dev = &pdev->dev;
- int ret;
-
-- priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-+ /* allocate the private data and the DAI link array */
-+ priv = devm_kzalloc(dev,
-+ sizeof(*priv) + sizeof(*dai_link),
-+ GFP_KERNEL);
- if (!priv)
- return -ENOMEM;
-
-@@ -293,10 +298,17 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- */
- priv->snd_card.owner = THIS_MODULE;
- priv->snd_card.dev = dev;
-- dai_link = &priv->snd_link;
-+ dai_link = priv->dai_link;
- priv->snd_card.dai_link = dai_link;
- priv->snd_card.num_links = 1;
-
-+ /* get room for the other properties */
-+ priv->dai_props = devm_kzalloc(dev,
-+ sizeof(*priv->dai_props),
-+ GFP_KERNEL);
-+ if (!priv->dai_props)
-+ return -ENOMEM;
-+
- if (np && of_device_is_available(np)) {
-
- ret = asoc_simple_card_parse_of(np, priv, dev);
-@@ -330,13 +342,13 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- dai_link->codec_name = cinfo->codec;
- dai_link->cpu_dai_name = cinfo->cpu_dai.name;
- dai_link->codec_dai_name = cinfo->codec_dai.name;
-- memcpy(&priv->cpu_dai, &cinfo->cpu_dai,
-- sizeof(priv->cpu_dai));
-- memcpy(&priv->codec_dai, &cinfo->codec_dai,
-- sizeof(priv->codec_dai));
-+ memcpy(&priv->dai_props->cpu_dai, &cinfo->cpu_dai,
-+ sizeof(priv->dai_props->cpu_dai));
-+ memcpy(&priv->dai_props->codec_dai, &cinfo->codec_dai,
-+ sizeof(priv->dai_props->codec_dai));
-
-- priv->cpu_dai.fmt |= cinfo->daifmt;
-- priv->codec_dai.fmt |= cinfo->daifmt;
-+ priv->dai_props->cpu_dai.fmt |= cinfo->daifmt;
-+ priv->dai_props->codec_dai.fmt |= cinfo->daifmt;
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0183-ASoC-simple-card-Add-DT-documentation-for-multi-DAI-.patch b/patches.renesas/0183-ASoC-simple-card-Add-DT-documentation-for-multi-DAI-.patch
deleted file mode 100644
index b66ac51f4b2ea..0000000000000
--- a/patches.renesas/0183-ASoC-simple-card-Add-DT-documentation-for-multi-DAI-.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 1cf5ea91c65ef200e19cdd7ffa3176768e8d9fee Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Thu, 20 Mar 2014 11:04:16 +0100
-Subject: ASoC: simple-card: Add DT documentation for multi-DAI links
-
-Many couples of CPU/CODEC DAI links may be described in the DT
-thanks to 'simple-audio-card,dai-link' containers.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 015f630de86c8a79df45c475c34087d3e96b882a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/simple-card.txt | 42 +++++++++++++++++++++-
- 1 file changed, 41 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
-index 881914b139ca..131aa2ad7f1a 100644
---- a/Documentation/devicetree/bindings/sound/simple-card.txt
-+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
-@@ -23,6 +23,11 @@ Optional properties:
-
- Required subnodes:
-
-+- simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes
-+ This container may be omitted when the
-+ card has only one DAI link.
-+ See the examples.
-+
- - simple-audio-card,cpu : CPU sub-node
- - simple-audio-card,codec : CODEC sub-node
-
-@@ -49,7 +54,7 @@ Note:
- CPU and CODEC sides as we need to keep the settings identical for both ends
- of the link.
-
--Example:
-+Example 1 - single DAI link:
-
- sound {
- compatible = "simple-audio-card";
-@@ -94,3 +99,38 @@ sh_fsi2: sh_fsi2@ec230000 {
- interrupt-parent = <&gic>;
- interrupts = <0 146 0x4>;
- };
-+
-+Example 2 - many DAI links:
-+
-+sound {
-+ compatible = "simple-audio-card";
-+ simple-audio-card,name = "Cubox Audio";
-+ simple-audio-card,format = "i2s";
-+
-+ simple-audio-card,dai-link@0 { /* I2S - HDMI */
-+ simple-audio-card,cpu {
-+ sound-dai = <&audio1 0>;
-+ };
-+ simple-audio-card,codec {
-+ sound-dai = <&tda998x 0>;
-+ };
-+ };
-+
-+ simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
-+ simple-audio-card,cpu {
-+ sound-dai = <&audio1 1>;
-+ };
-+ simple-audio-card,codec {
-+ sound-dai = <&tda998x 1>;
-+ };
-+ };
-+
-+ simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
-+ simple-audio-card,cpu {
-+ sound-dai = <&audio1 1>;
-+ };
-+ simple-audio-card,codec {
-+ sound-dai = <&spdif_codec>;
-+ };
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0184-ASoC-simple-card-Handle-many-DAI-links.patch b/patches.renesas/0184-ASoC-simple-card-Handle-many-DAI-links.patch
deleted file mode 100644
index 1807ed0104e13..0000000000000
--- a/patches.renesas/0184-ASoC-simple-card-Handle-many-DAI-links.patch
+++ /dev/null
@@ -1,287 +0,0 @@
-From f0c379cb595d7e31fa6784f29470e433e6dbb287 Mon Sep 17 00:00:00 2001
-From: Jean-Francois Moine <moinejf@free.fr>
-Date: Thu, 20 Mar 2014 11:49:55 +0100
-Subject: ASoC: simple-card: Handle many DAI links
-
-Some simple audio cards may have many DAI links.
-This patch extends the simple-card driver for handling such cards.
-
-Signed-off-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6a91a17bd7b92b2d2aa9ece85457f52a62fd7708)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 190 +++++++++++++++++++++++++---------------
- 1 file changed, 121 insertions(+), 69 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 1e865c5d377f..21f1ccbdf582 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -70,13 +70,16 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- snd_soc_card_get_drvdata(rtd->card);
- struct snd_soc_dai *codec = rtd->codec_dai;
- struct snd_soc_dai *cpu = rtd->cpu_dai;
-- int ret;
-+ struct simple_dai_props *dai_props;
-+ int num, ret;
-
-- ret = __asoc_simple_card_dai_init(codec, &priv->dai_props->codec_dai);
-+ num = rtd - rtd->card->rtd;
-+ dai_props = &priv->dai_props[num];
-+ ret = __asoc_simple_card_dai_init(codec, &dai_props->codec_dai);
- if (ret < 0)
- return ret;
-
-- ret = __asoc_simple_card_dai_init(cpu, &priv->dai_props->cpu_dai);
-+ ret = __asoc_simple_card_dai_init(cpu, &dai_props->cpu_dai);
- if (ret < 0)
- return ret;
-
-@@ -148,13 +151,47 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- return 0;
- }
-
-+static int simple_card_cpu_codec_of(struct device_node *node,
-+ int daifmt,
-+ struct snd_soc_dai_link *dai_link,
-+ struct simple_dai_props *dai_props)
-+{
-+ struct device_node *np;
-+ int ret;
-+
-+ /* CPU sub-node */
-+ ret = -EINVAL;
-+ np = of_get_child_by_name(node, "simple-audio-card,cpu");
-+ if (np) {
-+ ret = asoc_simple_card_sub_parse_of(np, daifmt,
-+ &dai_props->cpu_dai,
-+ &dai_link->cpu_of_node,
-+ &dai_link->cpu_dai_name);
-+ of_node_put(np);
-+ }
-+ if (ret < 0)
-+ return ret;
-+
-+ /* CODEC sub-node */
-+ ret = -EINVAL;
-+ np = of_get_child_by_name(node, "simple-audio-card,codec");
-+ if (np) {
-+ ret = asoc_simple_card_sub_parse_of(np, daifmt,
-+ &dai_props->codec_dai,
-+ &dai_link->codec_of_node,
-+ &dai_link->codec_dai_name);
-+ of_node_put(np);
-+ }
-+ return ret;
-+}
-+
- static int asoc_simple_card_parse_of(struct device_node *node,
- struct simple_card_data *priv,
-- struct device *dev)
-+ struct device *dev,
-+ int multi)
- {
- struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link;
-- struct asoc_simple_dai *codec_dai = &priv->dai_props->codec_dai;
-- struct asoc_simple_dai *cpu_dai = &priv->dai_props->cpu_dai;
-+ struct simple_dai_props *dai_props = priv->dai_props;
- struct device_node *np;
- char *name;
- unsigned int daifmt;
-@@ -183,78 +220,71 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- return ret;
- }
-
-- /* CPU sub-node */
-- ret = -EINVAL;
-- np = of_get_child_by_name(node, "simple-audio-card,cpu");
-- if (np) {
-- ret = asoc_simple_card_sub_parse_of(np, daifmt,
-- cpu_dai,
-- &dai_link->cpu_of_node,
-- &dai_link->cpu_dai_name);
-- of_node_put(np);
-- }
-- if (ret < 0)
-- return ret;
-+ /* loop on the DAI links */
-+ np = NULL;
-+ for (;;) {
-+ if (multi) {
-+ np = of_get_next_child(node, np);
-+ if (!np)
-+ break;
-+ }
-
-- /* CODEC sub-node */
-- ret = -EINVAL;
-- np = of_get_child_by_name(node, "simple-audio-card,codec");
-- if (np) {
-- ret = asoc_simple_card_sub_parse_of(np, daifmt,
-- codec_dai,
-- &dai_link->codec_of_node,
-- &dai_link->codec_dai_name);
-- of_node_put(np);
-- }
-- if (ret < 0)
-- return ret;
-+ ret = simple_card_cpu_codec_of(multi ? np : node,
-+ daifmt, dai_link, dai_props);
-+ if (ret < 0)
-+ goto err;
-
-- /*
-- * overwrite cpu_dai->fmt as its DAIFMT_MASTER bit is based on CODEC
-- * while the other bits should be identical unless buggy SW/HW design.
-- */
-- cpu_dai->fmt = codec_dai->fmt;
-+ /*
-+ * overwrite cpu_dai->fmt as its DAIFMT_MASTER bit is based on CODEC
-+ * while the other bits should be identical unless buggy SW/HW design.
-+ */
-+ dai_props->cpu_dai.fmt = dai_props->codec_dai.fmt;
-+
-+ if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) {
-+ ret = -EINVAL;
-+ goto err;
-+ }
-+
-+ /* simple-card assumes platform == cpu */
-+ dai_link->platform_of_node = dai_link->cpu_of_node;
-
-- if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name)
-- return -EINVAL;
-+ name = devm_kzalloc(dev,
-+ strlen(dai_link->cpu_dai_name) +
-+ strlen(dai_link->codec_dai_name) + 2,
-+ GFP_KERNEL);
-+ sprintf(name, "%s-%s", dai_link->cpu_dai_name,
-+ dai_link->codec_dai_name);
-+ dai_link->name = dai_link->stream_name = name;
-+
-+ if (!multi)
-+ break;
-+
-+ dai_link++;
-+ dai_props++;
-+ }
-
- /* card name is created from CPU/CODEC dai name */
-- name = devm_kzalloc(dev,
-- strlen(dai_link->cpu_dai_name) +
-- strlen(dai_link->codec_dai_name) + 2,
-- GFP_KERNEL);
-- sprintf(name, "%s-%s", dai_link->cpu_dai_name,
-- dai_link->codec_dai_name);
-+ dai_link = priv->snd_card.dai_link;
- if (!priv->snd_card.name)
-- priv->snd_card.name = name;
-- dai_link->name = dai_link->stream_name = name;
--
-- /* simple-card assumes platform == cpu */
-- dai_link->platform_of_node = dai_link->cpu_of_node;
-+ priv->snd_card.name = dai_link->name;
-
-- dev_dbg(dev, "card-name : %s\n", name);
-+ dev_dbg(dev, "card-name : %s\n", priv->snd_card.name);
- dev_dbg(dev, "platform : %04x\n", daifmt);
-+ dai_props = priv->dai_props;
- dev_dbg(dev, "cpu : %s / %04x / %d\n",
- dai_link->cpu_dai_name,
-- cpu_dai->fmt,
-- cpu_dai->sysclk);
-+ dai_props->cpu_dai.fmt,
-+ dai_props->cpu_dai.sysclk);
- dev_dbg(dev, "codec : %s / %04x / %d\n",
- dai_link->codec_dai_name,
-- codec_dai->fmt,
-- codec_dai->sysclk);
--
-- /*
-- * soc_bind_dai_link() will check cpu name
-- * after of_node matching if dai_link has cpu_dai_name.
-- * but, it will never match if name was created by fmt_single_name()
-- * remove cpu_dai_name to escape name matching.
-- * see
-- * fmt_single_name()
-- * fmt_multiple_name()
-- */
-- dai_link->cpu_dai_name = NULL;
-+ dai_props->codec_dai.fmt,
-+ dai_props->codec_dai.sysclk);
-
- return 0;
-+
-+err:
-+ of_node_put(np);
-+ return ret;
- }
-
- /* update the reference count of the devices nodes at end of probe */
-@@ -284,11 +314,20 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- struct snd_soc_dai_link *dai_link;
- struct device_node *np = pdev->dev.of_node;
- struct device *dev = &pdev->dev;
-- int ret;
-+ int num_links, multi, ret;
-+
-+ /* get the number of DAI links */
-+ if (np && of_get_child_by_name(np, "simple-audio-card,dai-link")) {
-+ num_links = of_get_child_count(np);
-+ multi = 1;
-+ } else {
-+ num_links = 1;
-+ multi = 0;
-+ }
-
- /* allocate the private data and the DAI link array */
- priv = devm_kzalloc(dev,
-- sizeof(*priv) + sizeof(*dai_link),
-+ sizeof(*priv) + sizeof(*dai_link) * num_links,
- GFP_KERNEL);
- if (!priv)
- return -ENOMEM;
-@@ -300,23 +339,36 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- priv->snd_card.dev = dev;
- dai_link = priv->dai_link;
- priv->snd_card.dai_link = dai_link;
-- priv->snd_card.num_links = 1;
-+ priv->snd_card.num_links = num_links;
-
- /* get room for the other properties */
- priv->dai_props = devm_kzalloc(dev,
-- sizeof(*priv->dai_props),
-+ sizeof(*priv->dai_props) * num_links,
- GFP_KERNEL);
- if (!priv->dai_props)
- return -ENOMEM;
-
- if (np && of_device_is_available(np)) {
-
-- ret = asoc_simple_card_parse_of(np, priv, dev);
-+ ret = asoc_simple_card_parse_of(np, priv, dev, multi);
- if (ret < 0) {
- if (ret != -EPROBE_DEFER)
- dev_err(dev, "parse error %d\n", ret);
- goto err;
- }
-+
-+ /*
-+ * soc_bind_dai_link() will check cpu name
-+ * after of_node matching if dai_link has cpu_dai_name.
-+ * but, it will never match if name was created by fmt_single_name()
-+ * remove cpu_dai_name to escape name matching.
-+ * see
-+ * fmt_single_name()
-+ * fmt_multiple_name()
-+ */
-+ if (num_links == 1)
-+ dai_link->cpu_dai_name = NULL;
-+
- } else {
- struct asoc_simple_card_info *cinfo;
-
---
-2.1.2
-
diff --git a/patches.renesas/0185-spi-delete-non-required-instances-of-include-linux-i.patch b/patches.renesas/0185-spi-delete-non-required-instances-of-include-linux-i.patch
deleted file mode 100644
index 7c258a0232ab0..0000000000000
--- a/patches.renesas/0185-spi-delete-non-required-instances-of-include-linux-i.patch
+++ /dev/null
@@ -1,397 +0,0 @@
-From db415ed6fbe8adfb1e2ae191166c0a0cd883ed2d Mon Sep 17 00:00:00 2001
-From: Paul Gortmaker <paul.gortmaker@windriver.com>
-Date: Tue, 21 Jan 2014 16:22:47 -0500
-Subject: spi: delete non-required instances of include <linux/init.h>
-
-None of these files are actually using any __init type directives
-and hence don't need to include <linux/init.h>. Most are just a
-left over from __devinit and __cpuinit removal, or simply due to
-code getting copied from one driver to the next.
-
-Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 3a44623d5e1404b29786f1afd225d1aa04a4ae90)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-altera.c | 1 -
- drivers/spi/spi-ath79.c | 1 -
- drivers/spi/spi-atmel.c | 1 -
- drivers/spi/spi-bcm63xx.c | 1 -
- drivers/spi/spi-bfin-sport.c | 1 -
- drivers/spi/spi-bitbang.c | 1 -
- drivers/spi/spi-clps711x.c | 1 -
- drivers/spi/spi-gpio.c | 1 -
- drivers/spi/spi-imx.c | 1 -
- drivers/spi/spi-mpc512x-psc.c | 1 -
- drivers/spi/spi-mpc52xx-psc.c | 1 -
- drivers/spi/spi-mpc52xx.c | 1 -
- drivers/spi/spi-mxs.c | 1 -
- drivers/spi/spi-nuc900.c | 1 -
- drivers/spi/spi-oc-tiny.c | 1 -
- drivers/spi/spi-octeon.c | 1 -
- drivers/spi/spi-omap2-mcspi.c | 1 -
- drivers/spi/spi-orion.c | 1 -
- drivers/spi/spi-ppc4xx.c | 1 -
- drivers/spi/spi-pxa2xx-dma.c | 1 -
- drivers/spi/spi-pxa2xx-pxadma.c | 1 -
- drivers/spi/spi-s3c24xx.c | 1 -
- drivers/spi/spi-sh-msiof.c | 1 -
- drivers/spi/spi-sh-sci.c | 1 -
- drivers/spi/spi-tegra114.c | 1 -
- drivers/spi/spi-tegra20-sflash.c | 1 -
- drivers/spi/spi-tegra20-slink.c | 1 -
- drivers/spi/spi-xcomm.c | 1 -
- drivers/spi/spi-xilinx.c | 1 -
- 29 files changed, 29 deletions(-)
-
-diff --git a/drivers/spi/spi-altera.c b/drivers/spi/spi-altera.c
-index 5d7deaf62867..1928b835e870 100644
---- a/drivers/spi/spi-altera.c
-+++ b/drivers/spi/spi-altera.c
-@@ -13,7 +13,6 @@
- * published by the Free Software Foundation.
- */
-
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/errno.h>
- #include <linux/module.h>
-diff --git a/drivers/spi/spi-ath79.c b/drivers/spi/spi-ath79.c
-index c3b2fb9b6713..3898b0b9ee77 100644
---- a/drivers/spi/spi-ath79.c
-+++ b/drivers/spi/spi-ath79.c
-@@ -14,7 +14,6 @@
-
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/delay.h>
- #include <linux/spinlock.h>
- #include <linux/workqueue.h>
-diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
-index 5d7b07f08326..af8a3361970c 100644
---- a/drivers/spi/spi-atmel.c
-+++ b/drivers/spi/spi-atmel.c
-@@ -9,7 +9,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/clk.h>
- #include <linux/module.h>
- #include <linux/platform_device.h>
-diff --git a/drivers/spi/spi-bcm63xx.c b/drivers/spi/spi-bcm63xx.c
-index 77286aef2adf..9e9ee5f08647 100644
---- a/drivers/spi/spi-bcm63xx.c
-+++ b/drivers/spi/spi-bcm63xx.c
-@@ -20,7 +20,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/clk.h>
- #include <linux/io.h>
- #include <linux/module.h>
-diff --git a/drivers/spi/spi-bfin-sport.c b/drivers/spi/spi-bfin-sport.c
-index 38941e5920b5..f515c5e9db57 100644
---- a/drivers/spi/spi-bfin-sport.c
-+++ b/drivers/spi/spi-bfin-sport.c
-@@ -8,7 +8,6 @@
- * Licensed under the GPL-2 or later.
- */
-
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/delay.h>
- #include <linux/device.h>
-diff --git a/drivers/spi/spi-bitbang.c b/drivers/spi/spi-bitbang.c
-index bd222f6b677d..3bfdb851960b 100644
---- a/drivers/spi/spi-bitbang.c
-+++ b/drivers/spi/spi-bitbang.c
-@@ -16,7 +16,6 @@
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
--#include <linux/init.h>
- #include <linux/spinlock.h>
- #include <linux/workqueue.h>
- #include <linux/interrupt.h>
-diff --git a/drivers/spi/spi-clps711x.c b/drivers/spi/spi-clps711x.c
-index 374ba4a48a9e..bee864de5305 100644
---- a/drivers/spi/spi-clps711x.c
-+++ b/drivers/spi/spi-clps711x.c
-@@ -11,7 +11,6 @@
-
- #include <linux/io.h>
- #include <linux/clk.h>
--#include <linux/init.h>
- #include <linux/gpio.h>
- #include <linux/delay.h>
- #include <linux/module.h>
-diff --git a/drivers/spi/spi-gpio.c b/drivers/spi/spi-gpio.c
-index 7beeb29472ac..cfc9fb3048d8 100644
---- a/drivers/spi/spi-gpio.c
-+++ b/drivers/spi/spi-gpio.c
-@@ -19,7 +19,6 @@
- */
- #include <linux/kernel.h>
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/platform_device.h>
- #include <linux/gpio.h>
- #include <linux/of.h>
-diff --git a/drivers/spi/spi-imx.c b/drivers/spi/spi-imx.c
-index 47f15d97e7fa..3af247c71dbd 100644
---- a/drivers/spi/spi-imx.c
-+++ b/drivers/spi/spi-imx.c
-@@ -23,7 +23,6 @@
- #include <linux/delay.h>
- #include <linux/err.h>
- #include <linux/gpio.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
- #include <linux/irq.h>
-diff --git a/drivers/spi/spi-mpc512x-psc.c b/drivers/spi/spi-mpc512x-psc.c
-index 5032141eeeec..56cead98e7a5 100644
---- a/drivers/spi/spi-mpc512x-psc.c
-+++ b/drivers/spi/spi-mpc512x-psc.c
-@@ -16,7 +16,6 @@
-
- #include <linux/module.h>
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/errno.h>
- #include <linux/interrupt.h>
- #include <linux/of_address.h>
-diff --git a/drivers/spi/spi-mpc52xx-psc.c b/drivers/spi/spi-mpc52xx-psc.c
-index 00ba910ab302..3d18d9351185 100644
---- a/drivers/spi/spi-mpc52xx-psc.c
-+++ b/drivers/spi/spi-mpc52xx-psc.c
-@@ -12,7 +12,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/types.h>
- #include <linux/errno.h>
- #include <linux/interrupt.h>
-diff --git a/drivers/spi/spi-mpc52xx.c b/drivers/spi/spi-mpc52xx.c
-index 7c675fe83101..f573c3c09968 100644
---- a/drivers/spi/spi-mpc52xx.c
-+++ b/drivers/spi/spi-mpc52xx.c
-@@ -12,7 +12,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/errno.h>
- #include <linux/of_platform.h>
- #include <linux/interrupt.h>
-diff --git a/drivers/spi/spi-mxs.c b/drivers/spi/spi-mxs.c
-index 79e5aa2250c8..17bb9a9285ab 100644
---- a/drivers/spi/spi-mxs.c
-+++ b/drivers/spi/spi-mxs.c
-@@ -29,7 +29,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/ioport.h>
- #include <linux/of.h>
- #include <linux/of_device.h>
-diff --git a/drivers/spi/spi-nuc900.c b/drivers/spi/spi-nuc900.c
-index bae97ffec4b9..d8d55c7f7075 100644
---- a/drivers/spi/spi-nuc900.c
-+++ b/drivers/spi/spi-nuc900.c
-@@ -9,7 +9,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/spinlock.h>
- #include <linux/workqueue.h>
- #include <linux/interrupt.h>
-diff --git a/drivers/spi/spi-oc-tiny.c b/drivers/spi/spi-oc-tiny.c
-index f7c896e2981e..022774e158f1 100644
---- a/drivers/spi/spi-oc-tiny.c
-+++ b/drivers/spi/spi-oc-tiny.c
-@@ -15,7 +15,6 @@
- * published by the Free Software Foundation.
- */
-
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/errno.h>
- #include <linux/module.h>
-diff --git a/drivers/spi/spi-octeon.c b/drivers/spi/spi-octeon.c
-index 67249a48b391..5665ae9ed92f 100644
---- a/drivers/spi/spi-octeon.c
-+++ b/drivers/spi/spi-octeon.c
-@@ -11,7 +11,6 @@
- #include <linux/spi/spi.h>
- #include <linux/module.h>
- #include <linux/delay.h>
--#include <linux/init.h>
- #include <linux/io.h>
- #include <linux/of.h>
-
-diff --git a/drivers/spi/spi-omap2-mcspi.c b/drivers/spi/spi-omap2-mcspi.c
-index a72127f08e39..94f133cb2770 100644
---- a/drivers/spi/spi-omap2-mcspi.c
-+++ b/drivers/spi/spi-omap2-mcspi.c
-@@ -22,7 +22,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/module.h>
- #include <linux/device.h>
-diff --git a/drivers/spi/spi-orion.c b/drivers/spi/spi-orion.c
-index 7f2121fe2622..a362425400ea 100644
---- a/drivers/spi/spi-orion.c
-+++ b/drivers/spi/spi-orion.c
-@@ -9,7 +9,6 @@
- * published by the Free Software Foundation.
- */
-
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/delay.h>
- #include <linux/platform_device.h>
-diff --git a/drivers/spi/spi-ppc4xx.c b/drivers/spi/spi-ppc4xx.c
-index 5ee56726f8d0..80b8408ac3e3 100644
---- a/drivers/spi/spi-ppc4xx.c
-+++ b/drivers/spi/spi-ppc4xx.c
-@@ -24,7 +24,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/sched.h>
- #include <linux/slab.h>
- #include <linux/errno.h>
-diff --git a/drivers/spi/spi-pxa2xx-dma.c b/drivers/spi/spi-pxa2xx-dma.c
-index 3c0b55125f1e..713af4806f26 100644
---- a/drivers/spi/spi-pxa2xx-dma.c
-+++ b/drivers/spi/spi-pxa2xx-dma.c
-@@ -9,7 +9,6 @@
- * published by the Free Software Foundation.
- */
-
--#include <linux/init.h>
- #include <linux/device.h>
- #include <linux/dma-mapping.h>
- #include <linux/dmaengine.h>
-diff --git a/drivers/spi/spi-pxa2xx-pxadma.c b/drivers/spi/spi-pxa2xx-pxadma.c
-index 2916efc7cfe5..e8a26f25d5c0 100644
---- a/drivers/spi/spi-pxa2xx-pxadma.c
-+++ b/drivers/spi/spi-pxa2xx-pxadma.c
-@@ -18,7 +18,6 @@
- * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
--#include <linux/init.h>
- #include <linux/delay.h>
- #include <linux/device.h>
- #include <linux/dma-mapping.h>
-diff --git a/drivers/spi/spi-s3c24xx.c b/drivers/spi/spi-s3c24xx.c
-index 746424aa5353..c20df45204e2 100644
---- a/drivers/spi/spi-s3c24xx.c
-+++ b/drivers/spi/spi-s3c24xx.c
-@@ -9,7 +9,6 @@
- *
- */
-
--#include <linux/init.h>
- #include <linux/spinlock.h>
- #include <linux/workqueue.h>
- #include <linux/interrupt.h>
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 81cc02f5f9b0..33474061b742 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -15,7 +15,6 @@
- #include <linux/delay.h>
- #include <linux/err.h>
- #include <linux/gpio.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
-diff --git a/drivers/spi/spi-sh-sci.c b/drivers/spi/spi-sh-sci.c
-index 38eb24df796c..85c2efd57c80 100644
---- a/drivers/spi/spi-sh-sci.c
-+++ b/drivers/spi/spi-sh-sci.c
-@@ -14,7 +14,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/delay.h>
- #include <linux/spinlock.h>
- #include <linux/workqueue.h>
-diff --git a/drivers/spi/spi-tegra114.c b/drivers/spi/spi-tegra114.c
-index 413c71843492..3f61bbf643e2 100644
---- a/drivers/spi/spi-tegra114.c
-+++ b/drivers/spi/spi-tegra114.c
-@@ -23,7 +23,6 @@
- #include <linux/dma-mapping.h>
- #include <linux/dmapool.h>
- #include <linux/err.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
-diff --git a/drivers/spi/spi-tegra20-sflash.c b/drivers/spi/spi-tegra20-sflash.c
-index 08794977f21a..18037ab646d6 100644
---- a/drivers/spi/spi-tegra20-sflash.c
-+++ b/drivers/spi/spi-tegra20-sflash.c
-@@ -22,7 +22,6 @@
- #include <linux/completion.h>
- #include <linux/delay.h>
- #include <linux/err.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
-diff --git a/drivers/spi/spi-tegra20-slink.c b/drivers/spi/spi-tegra20-slink.c
-index be3a069879c3..8d62710d587e 100644
---- a/drivers/spi/spi-tegra20-slink.c
-+++ b/drivers/spi/spi-tegra20-slink.c
-@@ -23,7 +23,6 @@
- #include <linux/dma-mapping.h>
- #include <linux/dmapool.h>
- #include <linux/err.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
-diff --git a/drivers/spi/spi-xcomm.c b/drivers/spi/spi-xcomm.c
-index 24c40b13dab1..350a76b7e8d4 100644
---- a/drivers/spi/spi-xcomm.c
-+++ b/drivers/spi/spi-xcomm.c
-@@ -8,7 +8,6 @@
- */
-
- #include <linux/kernel.h>
--#include <linux/init.h>
- #include <linux/module.h>
- #include <linux/delay.h>
- #include <linux/i2c.h>
-diff --git a/drivers/spi/spi-xilinx.c b/drivers/spi/spi-xilinx.c
-index 6d4ce4615163..e6cd1112ae40 100644
---- a/drivers/spi/spi-xilinx.c
-+++ b/drivers/spi/spi-xilinx.c
-@@ -14,7 +14,6 @@
- */
-
- #include <linux/module.h>
--#include <linux/init.h>
- #include <linux/interrupt.h>
- #include <linux/of.h>
- #include <linux/platform_device.h>
---
-2.1.2
-
diff --git a/patches.renesas/0186-spi-sh-msiof-Fix-SPI-bus-population-from-DT.patch b/patches.renesas/0186-spi-sh-msiof-Fix-SPI-bus-population-from-DT.patch
deleted file mode 100644
index b95225d9c731d..0000000000000
--- a/patches.renesas/0186-spi-sh-msiof-Fix-SPI-bus-population-from-DT.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4c1aed6f26cac18e43786211ab888bb38b7a7b41 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 15:43:00 +0100
-Subject: spi: sh-msiof: Fix SPI bus population from DT
-
-DT doesn't instantiate SPI children if spi_master.dev.of_node is not set up
-properly.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit f7c05e837df794d2aaf19174269a270c93a52eca)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 33474061b742..e6f79b2f2616 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -710,6 +710,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->mode_bits |= SPI_LSB_FIRST | SPI_3WIRE;
- master->flags = 0;
- master->bus_num = pdev->id;
-+ master->dev.of_node = pdev->dev.of_node;
- master->num_chipselect = p->info->num_chipselect;
- master->setup = spi_bitbang_setup;
- master->cleanup = spi_bitbang_cleanup;
---
-2.1.2
-
diff --git a/patches.renesas/0187-spi-sh-msiof-Typo-in-comment-s-tx-rx.patch b/patches.renesas/0187-spi-sh-msiof-Typo-in-comment-s-tx-rx.patch
deleted file mode 100644
index ecb9908e5ad43..0000000000000
--- a/patches.renesas/0187-spi-sh-msiof-Typo-in-comment-s-tx-rx.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 69c74785dc7cd2b3b7f1b15eca00549f8d5eca08 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 15:43:01 +0100
-Subject: spi: sh-msiof: Typo in comment s/tx/rx/
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit a669c11a0df07477afbfeb53bc9d8fc989d1ed59)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index e6f79b2f2616..cc12e755131d 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -486,7 +486,7 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- /* clear status bits */
- sh_msiof_reset_str(p);
-
-- /* shut down frame, tx/tx and clock signals */
-+ /* shut down frame, rx/tx and clock signals */
- ret = sh_msiof_modify_ctr_wait(p, CTR_TFSE, 0);
- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, CTR_TXE, 0);
- if (rx_buf)
---
-2.1.2
-
diff --git a/patches.renesas/0188-spi-sh-msiof-Change-hz-from-unsigned-long-to-u32.patch b/patches.renesas/0188-spi-sh-msiof-Change-hz-from-unsigned-long-to-u32.patch
deleted file mode 100644
index e402192d5dbf8..0000000000000
--- a/patches.renesas/0188-spi-sh-msiof-Change-hz-from-unsigned-long-to-u32.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 81ed312fbb994257d636e6857849c4e5b0cdc4b0 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 15:43:02 +0100
-Subject: spi: sh-msiof: Change hz from unsigned long to u32
-
-Both spi_transfer.speed_hz and spi_master.max_speed_hz are u32
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6a85fc5af1f09982e50abe56efc70eda9ad24632)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index cc12e755131d..af9f2db41b16 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -144,8 +144,7 @@ static struct {
- };
-
- static void sh_msiof_spi_set_clk_regs(struct sh_msiof_spi_priv *p,
-- unsigned long parent_rate,
-- unsigned long spi_hz)
-+ unsigned long parent_rate, u32 spi_hz)
- {
- unsigned long div = 1024;
- size_t k;
-@@ -372,10 +371,9 @@ static int sh_msiof_spi_bits(struct spi_device *spi, struct spi_transfer *t)
- return bits;
- }
-
--static unsigned long sh_msiof_spi_hz(struct spi_device *spi,
-- struct spi_transfer *t)
-+static u32 sh_msiof_spi_hz(struct spi_device *spi, struct spi_transfer *t)
- {
-- unsigned long hz;
-+ u32 hz;
-
- hz = t ? t->speed_hz : 0;
- if (!hz)
---
-2.1.2
-
diff --git a/patches.renesas/0189-spi-sh-msiof-Add-more-register-documentation.patch b/patches.renesas/0189-spi-sh-msiof-Add-more-register-documentation.patch
deleted file mode 100644
index 31cbb57bc7f83..0000000000000
--- a/patches.renesas/0189-spi-sh-msiof-Add-more-register-documentation.patch
+++ /dev/null
@@ -1,215 +0,0 @@
-From 2733d8ec32c4e3ebc6aef2e46e68435488203cd4 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 15:43:03 +0100
-Subject: spi: sh-msiof: Add more register documentation
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 01cfef57efe9c8ef445d4a5ad3bf26770fd5942a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 152 +++++++++++++++++++++++++++++----------------
- 1 file changed, 100 insertions(+), 52 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index af9f2db41b16..79e14586049b 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -41,32 +41,80 @@ struct sh_msiof_spi_priv {
- int rx_fifo_size;
- };
-
--#define TMDR1 0x00
--#define TMDR2 0x04
--#define TMDR3 0x08
--#define RMDR1 0x10
--#define RMDR2 0x14
--#define RMDR3 0x18
--#define TSCR 0x20
--#define RSCR 0x22
--#define CTR 0x28
--#define FCTR 0x30
--#define STR 0x40
--#define IER 0x44
--#define TDR1 0x48
--#define TDR2 0x4c
--#define TFDR 0x50
--#define RDR1 0x58
--#define RDR2 0x5c
--#define RFDR 0x60
--
--#define CTR_TSCKE (1 << 15)
--#define CTR_TFSE (1 << 14)
--#define CTR_TXE (1 << 9)
--#define CTR_RXE (1 << 8)
--
--#define STR_TEOF (1 << 23)
--#define STR_REOF (1 << 7)
-+#define TMDR1 0x00 /* Transmit Mode Register 1 */
-+#define TMDR2 0x04 /* Transmit Mode Register 2 */
-+#define TMDR3 0x08 /* Transmit Mode Register 3 */
-+#define RMDR1 0x10 /* Receive Mode Register 1 */
-+#define RMDR2 0x14 /* Receive Mode Register 2 */
-+#define RMDR3 0x18 /* Receive Mode Register 3 */
-+#define TSCR 0x20 /* Transmit Clock Select Register */
-+#define RSCR 0x22 /* Receive Clock Select Register (SH, A1, APE6) */
-+#define CTR 0x28 /* Control Register */
-+#define FCTR 0x30 /* FIFO Control Register */
-+#define STR 0x40 /* Status Register */
-+#define IER 0x44 /* Interrupt Enable Register */
-+#define TDR1 0x48 /* Transmit Control Data Register 1 (SH, A1) */
-+#define TDR2 0x4c /* Transmit Control Data Register 2 (SH, A1) */
-+#define TFDR 0x50 /* Transmit FIFO Data Register */
-+#define RDR1 0x58 /* Receive Control Data Register 1 (SH, A1) */
-+#define RDR2 0x5c /* Receive Control Data Register 2 (SH, A1) */
-+#define RFDR 0x60 /* Receive FIFO Data Register */
-+
-+/* TMDR1 and RMDR1 */
-+#define MDR1_TRMD 0x80000000 /* Transfer Mode (1 = Master mode) */
-+#define MDR1_SYNCMD_MASK 0x30000000 /* SYNC Mode */
-+#define MDR1_SYNCMD_SPI 0x20000000 /* Level mode/SPI */
-+#define MDR1_SYNCMD_LR 0x30000000 /* L/R mode */
-+#define MDR1_SYNCAC_SHIFT 25 /* Sync Polarity (1 = Active-low) */
-+#define MDR1_BITLSB_SHIFT 24 /* MSB/LSB First (1 = LSB first) */
-+#define MDR1_FLD_MASK 0x000000c0 /* Frame Sync Signal Interval (0-3) */
-+#define MDR1_FLD_SHIFT 2
-+#define MDR1_XXSTP 0x00000001 /* Transmission/Reception Stop on FIFO */
-+/* TMDR1 */
-+#define TMDR1_PCON 0x40000000 /* Transfer Signal Connection */
-+
-+/* TMDR2 and RMDR2 */
-+#define MDR2_BITLEN1(i) (((i) - 1) << 24) /* Data Size (8-32 bits) */
-+#define MDR2_WDLEN1(i) (((i) - 1) << 16) /* Word Count (1-64/256 (SH, A1))) */
-+#define MDR2_GRPMASK1 0x00000001 /* Group Output Mask 1 (SH, A1) */
-+
-+/* TSCR and RSCR */
-+#define SCR_BRPS_MASK 0x1f00 /* Prescaler Setting (1-32) */
-+#define SCR_BRPS(i) (((i) - 1) << 8)
-+#define SCR_BRDV_MASK 0x0007 /* Baud Rate Generator's Division Ratio */
-+#define SCR_BRDV_DIV_2 0x0000
-+#define SCR_BRDV_DIV_4 0x0001
-+#define SCR_BRDV_DIV_8 0x0002
-+#define SCR_BRDV_DIV_16 0x0003
-+#define SCR_BRDV_DIV_32 0x0004
-+#define SCR_BRDV_DIV_1 0x0007
-+
-+/* CTR */
-+#define CTR_TSCKIZ_MASK 0xc0000000 /* Transmit Clock I/O Polarity Select */
-+#define CTR_TSCKIZ_SCK 0x80000000 /* Disable SCK when TX disabled */
-+#define CTR_TSCKIZ_POL_SHIFT 30 /* Transmit Clock Polarity */
-+#define CTR_RSCKIZ_MASK 0x30000000 /* Receive Clock Polarity Select */
-+#define CTR_RSCKIZ_SCK 0x20000000 /* Must match CTR_TSCKIZ_SCK */
-+#define CTR_RSCKIZ_POL_SHIFT 28 /* Receive Clock Polarity */
-+#define CTR_TEDG_SHIFT 27 /* Transmit Timing (1 = falling edge) */
-+#define CTR_REDG_SHIFT 26 /* Receive Timing (1 = falling edge) */
-+#define CTR_TXDIZ_MASK 0x00c00000 /* Pin Output When TX is Disabled */
-+#define CTR_TXDIZ_LOW 0x00000000 /* 0 */
-+#define CTR_TXDIZ_HIGH 0x00400000 /* 1 */
-+#define CTR_TXDIZ_HIZ 0x00800000 /* High-impedance */
-+#define CTR_TSCKE 0x00008000 /* Transmit Serial Clock Output Enable */
-+#define CTR_TFSE 0x00004000 /* Transmit Frame Sync Signal Output Enable */
-+#define CTR_TXE 0x00000200 /* Transmit Enable */
-+#define CTR_RXE 0x00000100 /* Receive Enable */
-+
-+/* STR and IER */
-+#define STR_TEOF 0x00800000 /* Frame Transmission End */
-+#define STR_REOF 0x00000080 /* Frame Reception End */
-+
-+
-+#define DEFAULT_TX_FIFO_SIZE 64
-+#define DEFAULT_RX_FIFO_SIZE 64
-+
-
- static u32 sh_msiof_read(struct sh_msiof_spi_priv *p, int reg_offs)
- {
-@@ -130,17 +178,17 @@ static struct {
- unsigned short div;
- unsigned short scr;
- } const sh_msiof_spi_clk_table[] = {
-- { 1, 0x0007 },
-- { 2, 0x0000 },
-- { 4, 0x0001 },
-- { 8, 0x0002 },
-- { 16, 0x0003 },
-- { 32, 0x0004 },
-- { 64, 0x1f00 },
-- { 128, 0x1f01 },
-- { 256, 0x1f02 },
-- { 512, 0x1f03 },
-- { 1024, 0x1f04 },
-+ { 1, SCR_BRPS( 1) | SCR_BRDV_DIV_1 },
-+ { 2, SCR_BRPS( 1) | SCR_BRDV_DIV_2 },
-+ { 4, SCR_BRPS( 1) | SCR_BRDV_DIV_4 },
-+ { 8, SCR_BRPS( 1) | SCR_BRDV_DIV_8 },
-+ { 16, SCR_BRPS( 1) | SCR_BRDV_DIV_16 },
-+ { 32, SCR_BRPS( 1) | SCR_BRDV_DIV_32 },
-+ { 64, SCR_BRPS(32) | SCR_BRDV_DIV_2 },
-+ { 128, SCR_BRPS(32) | SCR_BRDV_DIV_4 },
-+ { 256, SCR_BRPS(32) | SCR_BRDV_DIV_8 },
-+ { 512, SCR_BRPS(32) | SCR_BRDV_DIV_16 },
-+ { 1024, SCR_BRPS(32) | SCR_BRDV_DIV_32 },
- };
-
- static void sh_msiof_spi_set_clk_regs(struct sh_msiof_spi_priv *p,
-@@ -181,21 +229,21 @@ static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p,
- */
- sh_msiof_write(p, FCTR, 0);
-
-- tmp = 0;
-- tmp |= !cs_high << 25;
-- tmp |= lsb_first << 24;
-- sh_msiof_write(p, TMDR1, 0xe0000005 | tmp);
-- sh_msiof_write(p, RMDR1, 0x20000005 | tmp);
-+ tmp = MDR1_SYNCMD_SPI | 1 << MDR1_FLD_SHIFT | MDR1_XXSTP;
-+ tmp |= !cs_high << MDR1_SYNCAC_SHIFT;
-+ tmp |= lsb_first << MDR1_BITLSB_SHIFT;
-+ sh_msiof_write(p, TMDR1, tmp | MDR1_TRMD | TMDR1_PCON);
-+ sh_msiof_write(p, RMDR1, tmp);
-
-- tmp = 0xa0000000;
-- tmp |= cpol << 30; /* TSCKIZ */
-- tmp |= cpol << 28; /* RSCKIZ */
-+ tmp = 0;
-+ tmp |= CTR_TSCKIZ_SCK | cpol << CTR_TSCKIZ_POL_SHIFT;
-+ tmp |= CTR_RSCKIZ_SCK | cpol << CTR_RSCKIZ_POL_SHIFT;
-
- edge = cpol ^ !cpha;
-
-- tmp |= edge << 27; /* TEDG */
-- tmp |= edge << 26; /* REDG */
-- tmp |= (tx_hi_z ? 2 : 0) << 22; /* TXDIZ */
-+ tmp |= edge << CTR_TEDG_SHIFT;
-+ tmp |= edge << CTR_REDG_SHIFT;
-+ tmp |= tx_hi_z ? CTR_TXDIZ_HIZ : CTR_TXDIZ_LOW;
- sh_msiof_write(p, CTR, tmp);
- }
-
-@@ -203,12 +251,12 @@ static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p,
- const void *tx_buf, void *rx_buf,
- u32 bits, u32 words)
- {
-- u32 dr2 = ((bits - 1) << 24) | ((words - 1) << 16);
-+ u32 dr2 = MDR2_BITLEN1(bits) | MDR2_WDLEN1(words);
-
- if (tx_buf)
- sh_msiof_write(p, TMDR2, dr2);
- else
-- sh_msiof_write(p, TMDR2, dr2 | 1);
-+ sh_msiof_write(p, TMDR2, dr2 | MDR2_GRPMASK1);
-
- if (rx_buf)
- sh_msiof_write(p, RMDR2, dr2);
-@@ -694,8 +742,8 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- pm_runtime_enable(&pdev->dev);
-
- /* The standard version of MSIOF use 64 word FIFOs */
-- p->tx_fifo_size = 64;
-- p->rx_fifo_size = 64;
-+ p->tx_fifo_size = DEFAULT_TX_FIFO_SIZE;
-+ p->rx_fifo_size = DEFAULT_RX_FIFO_SIZE;
-
- /* Platform data may override FIFO sizes */
- if (p->info->tx_fifo_override)
---
-2.1.2
-
diff --git a/patches.renesas/0190-spi-sh-msiof-Use-the-core-cs_gpio-field-and-make-it-.patch b/patches.renesas/0190-spi-sh-msiof-Use-the-core-cs_gpio-field-and-make-it-.patch
deleted file mode 100644
index 87b95545414ec..0000000000000
--- a/patches.renesas/0190-spi-sh-msiof-Use-the-core-cs_gpio-field-and-make-it-.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4ae0982e5e5fced013fd175b7947e965bfffcc1a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 15:43:04 +0100
-Subject: spi: sh-msiof: Use the core cs_gpio field, and make it optional
-
-In current implementation, CS is controlled by GPIO, which is passed
-through spi->controller_data. However, the MSIOF HW module has a function
-to output CS by itself, which is already enabled and actual switch will be
-done by pinmux.
-
-Store the GPIO number in the core cs_gpio field, and ignore it if it is
-an invalid (negative) GPIO number.
-
-Loosely based on a patch from Takashi Yoshii <takasi-y@ops.dti.ne.jp>.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8d19534a8d539bb2e598e56e017a423f205e909e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 21 ++++++++++++++++++---
- 1 file changed, 18 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 79e14586049b..92515c1ececa 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -445,6 +445,21 @@ static int sh_msiof_spi_setup_transfer(struct spi_device *spi,
- return spi_bitbang_setup_transfer(spi, t);
- }
-
-+static int sh_msiof_spi_setup(struct spi_device *spi)
-+{
-+ struct device_node *np = spi->master->dev.of_node;
-+
-+ if (!np) {
-+ /*
-+ * Use spi->controller_data for CS (same strategy as spi_gpio),
-+ * if any. otherwise let HW control CS
-+ */
-+ spi->cs_gpio = (uintptr_t)spi->controller_data;
-+ }
-+
-+ return spi_bitbang_setup(spi);
-+}
-+
- static void sh_msiof_spi_chipselect(struct spi_device *spi, int is_on)
- {
- struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
-@@ -470,8 +485,8 @@ static void sh_msiof_spi_chipselect(struct spi_device *spi, int is_on)
- !!(spi->mode & SPI_CS_HIGH));
- }
-
-- /* use spi->controller data for CS (same strategy as spi_gpio) */
-- gpio_set_value((uintptr_t)spi->controller_data, value);
-+ if (spi->cs_gpio >= 0)
-+ gpio_set_value(spi->cs_gpio, value);
-
- if (is_on == BITBANG_CS_INACTIVE) {
- if (test_and_clear_bit(0, &p->flags)) {
-@@ -758,7 +773,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->bus_num = pdev->id;
- master->dev.of_node = pdev->dev.of_node;
- master->num_chipselect = p->info->num_chipselect;
-- master->setup = spi_bitbang_setup;
-+ master->setup = sh_msiof_spi_setup;
- master->cleanup = spi_bitbang_cleanup;
-
- p->bitbang.master = master;
---
-2.1.2
-
diff --git a/patches.renesas/0191-spi-sh-msiof-Improve-bindings.patch b/patches.renesas/0191-spi-sh-msiof-Improve-bindings.patch
deleted file mode 100644
index 7824bd3fcd923..0000000000000
--- a/patches.renesas/0191-spi-sh-msiof-Improve-bindings.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 68c878089cde013cc27e0746257851bad51351d5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:21:08 +0100
-Subject: spi: sh-msiof: Improve bindings
-
-Documentation:
- - Add missing "interrupt-parent", "#address-cells", "#size-cells", and
- "clocks" properties,
- - Add missing default values for "num-cs", "renesas,tx-fifo-size" and
- "renesas,rx-fifo-size",
- - Add a reference to the pinctrl documentation.
-
-Implementation:
- - As "num-cs" is marked optional, provide a sensible default.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 32d3b2d1ddeafe105ab6f738fba427242141194e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/spi/sh-msiof.txt | 24 +++++++++++++++-------
- drivers/spi/spi-sh-msiof.c | 2 +-
- 2 files changed, 18 insertions(+), 8 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt
-index e6222106ca36..eae3c8c9300e 100644
---- a/Documentation/devicetree/bindings/spi/sh-msiof.txt
-+++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt
-@@ -1,12 +1,22 @@
- Renesas MSIOF spi controller
-
- Required properties:
--- compatible : "renesas,sh-msiof" for SuperH or
-- "renesas,sh-mobile-msiof" for SH Mobile series
--- reg : Offset and length of the register set for the device
--- interrupts : interrupt line used by MSIOF
-+- compatible : "renesas,sh-msiof" for SuperH, or
-+ "renesas,sh-mobile-msiof" for SH Mobile series.
-+- reg : Offset and length of the register set for the device
-+- interrupt-parent : The phandle for the interrupt controller that
-+ services interrupts for this device
-+- interrupts : Interrupt specifier
-+- #address-cells : Must be <1>
-+- #size-cells : Must be <0>
-
- Optional properties:
--- num-cs : total number of chip-selects
--- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
--- renesas,rx-fifo-size : Overrides the default rx fifo size given in words
-+- clocks : Must contain a reference to the functional clock.
-+- num-cs : Total number of chip-selects (default is 1)
-+- renesas,tx-fifo-size : Overrides the default tx fifo size given in words
-+ (default is 64)
-+- renesas,rx-fifo-size : Overrides the default rx fifo size given in words
-+ (default is 64)
-+
-+Pinctrl properties might be needed, too. See
-+Documentation/devicetree/bindings/pinctrl/renesas,*.
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 92515c1ececa..bbe963018e1a 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -663,7 +663,7 @@ static struct sh_msiof_spi_info *sh_msiof_spi_parse_dt(struct device *dev)
- {
- struct sh_msiof_spi_info *info;
- struct device_node *np = dev->of_node;
-- u32 num_cs = 0;
-+ u32 num_cs = 1;
-
- info = devm_kzalloc(dev, sizeof(struct sh_msiof_spi_info), GFP_KERNEL);
- if (!info) {
---
-2.1.2
-
diff --git a/patches.renesas/0192-spi-sh-msiof-Move-default-FIFO-sizes-to-device-ID-da.patch b/patches.renesas/0192-spi-sh-msiof-Move-default-FIFO-sizes-to-device-ID-da.patch
deleted file mode 100644
index 00e0c8dc4174d..0000000000000
--- a/patches.renesas/0192-spi-sh-msiof-Move-default-FIFO-sizes-to-device-ID-da.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From db842577457f6a542fcfb6f106c1b6c81fcb6014 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:21:09 +0100
-Subject: spi: sh-msiof: Move default FIFO sizes to device ID data
-
-As different variants of MSIOF have different FIFO sizes, move the default
-FIFO sizes to a new struct sh_msiof_chipdata, pointed to from the device
-ID data.
-
-[Moved ifdef to fix build -- broonie]
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 50a7e23f53677918bf521b09ce9bb20fb87cd175)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 50 +++++++++++++++++++++++++++++++---------------
- 1 file changed, 34 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index bbe963018e1a..42bcb95f03dc 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -20,6 +20,7 @@
- #include <linux/kernel.h>
- #include <linux/module.h>
- #include <linux/of.h>
-+#include <linux/of_device.h>
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
-
-@@ -29,11 +30,18 @@
-
- #include <asm/unaligned.h>
-
-+
-+struct sh_msiof_chipdata {
-+ u16 tx_fifo_size;
-+ u16 rx_fifo_size;
-+};
-+
- struct sh_msiof_spi_priv {
- struct spi_bitbang bitbang; /* must be first for spi_bitbang.c */
- void __iomem *mapbase;
- struct clk *clk;
- struct platform_device *pdev;
-+ const struct sh_msiof_chipdata *chipdata;
- struct sh_msiof_spi_info *info;
- struct completion done;
- unsigned long flags;
-@@ -112,10 +120,6 @@ struct sh_msiof_spi_priv {
- #define STR_REOF 0x00000080 /* Frame Reception End */
-
-
--#define DEFAULT_TX_FIFO_SIZE 64
--#define DEFAULT_RX_FIFO_SIZE 64
--
--
- static u32 sh_msiof_read(struct sh_msiof_spi_priv *p, int reg_offs)
- {
- switch (reg_offs) {
-@@ -658,6 +662,18 @@ static u32 sh_msiof_spi_txrx_word(struct spi_device *spi, unsigned nsecs,
- return 0;
- }
-
-+static const struct sh_msiof_chipdata sh_data = {
-+ .tx_fifo_size = 64,
-+ .rx_fifo_size = 64,
-+};
-+
-+static const struct of_device_id sh_msiof_match[] = {
-+ { .compatible = "renesas,sh-msiof", .data = &sh_data },
-+ { .compatible = "renesas,sh-mobile-msiof", .data = &sh_data },
-+ {},
-+};
-+MODULE_DEVICE_TABLE(of, sh_msiof_match);
-+
- #ifdef CONFIG_OF
- static struct sh_msiof_spi_info *sh_msiof_spi_parse_dt(struct device *dev)
- {
-@@ -693,6 +709,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- {
- struct resource *r;
- struct spi_master *master;
-+ const struct of_device_id *of_id;
- struct sh_msiof_spi_priv *p;
- int i;
- int ret;
-@@ -706,10 +723,15 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- p = spi_master_get_devdata(master);
-
- platform_set_drvdata(pdev, p);
-- if (pdev->dev.of_node)
-+
-+ of_id = of_match_device(sh_msiof_match, &pdev->dev);
-+ if (of_id) {
-+ p->chipdata = of_id->data;
- p->info = sh_msiof_spi_parse_dt(&pdev->dev);
-- else
-+ } else {
-+ p->chipdata = (const void *)pdev->id_entry->driver_data;
- p->info = dev_get_platdata(&pdev->dev);
-+ }
-
- if (!p->info) {
- dev_err(&pdev->dev, "failed to obtain device info\n");
-@@ -756,11 +778,9 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- p->pdev = pdev;
- pm_runtime_enable(&pdev->dev);
-
-- /* The standard version of MSIOF use 64 word FIFOs */
-- p->tx_fifo_size = DEFAULT_TX_FIFO_SIZE;
-- p->rx_fifo_size = DEFAULT_RX_FIFO_SIZE;
--
- /* Platform data may override FIFO sizes */
-+ p->tx_fifo_size = p->chipdata->tx_fifo_size;
-+ p->rx_fifo_size = p->chipdata->rx_fifo_size;
- if (p->info->tx_fifo_override)
- p->tx_fifo_size = p->info->tx_fifo_override;
- if (p->info->rx_fifo_override)
-@@ -810,18 +830,16 @@ static int sh_msiof_spi_remove(struct platform_device *pdev)
- return ret;
- }
-
--#ifdef CONFIG_OF
--static const struct of_device_id sh_msiof_match[] = {
-- { .compatible = "renesas,sh-msiof", },
-- { .compatible = "renesas,sh-mobile-msiof", },
-+static struct platform_device_id spi_driver_ids[] = {
-+ { "spi_sh_msiof", (kernel_ulong_t)&sh_data },
- {},
- };
--MODULE_DEVICE_TABLE(of, sh_msiof_match);
--#endif
-+MODULE_DEVICE_TABLE(platform, spi_driver_ids);
-
- static struct platform_driver sh_msiof_spi_drv = {
- .probe = sh_msiof_spi_probe,
- .remove = sh_msiof_spi_remove,
-+ .id_table = spi_driver_ids,
- .driver = {
- .name = "spi_sh_msiof",
- .owner = THIS_MODULE,
---
-2.1.2
-
diff --git a/patches.renesas/0193-spi-sh-msiof-Add-support-for-R-Car-H2-and-M2.patch b/patches.renesas/0193-spi-sh-msiof-Add-support-for-R-Car-H2-and-M2.patch
deleted file mode 100644
index c9952de7237fe..0000000000000
--- a/patches.renesas/0193-spi-sh-msiof-Add-support-for-R-Car-H2-and-M2.patch
+++ /dev/null
@@ -1,174 +0,0 @@
-From 9710d9e170cb1d3955613e43619feca1ff43c389 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:21:10 +0100
-Subject: spi: sh-msiof: Add support for R-Car H2 and M2
-
-Add support for the MSIOF variant in the R-Car H2 (r8a7790) and M2
-(r8a7791) SoCs.
-
-Binding documentation:
- - Add future-proof "renesas,msiof-<soctype>" compatible values,
- - The default for "renesas,rx-fifo-size" is 256 on R-Car H2 and M2,
- - "renesas,tx-fifo-size" and "renesas,rx-fifo-size" are deprecated for
- soctype-specific bindings,
- - Add example bindings.
-
-Implementation:
- - MSIOF on R-Car H2 and M2 requires the transmission of dummy data if
- data is being received only (cfr. "Set SICTR.TSCKE to 1" and "Write
- dummy transmission data to SITFDR" in paragraph "Transmit and Receive
- Procedures" of the Hardware User's Manual).
- - As RX depends on TX, MSIOF on R-Car H2 and M2 also lacks the RSCR
- register (Receive Clock Select Register), and some bits in the RMDR1
- (Receive Mode Register 1) and TMDR2 (Transmit Mode Register 2)
- registers.
- - Use the recently introduced SPI_MASTER_MUST_TX flag to enable support
- for dummy transmission in the SPI core, and to differentiate from other
- MSIOF implementations in code paths that need this.
- - New DT compatible values ("renesas,msiof-r8a7790" and
- "renesas,msiof-r8a7791") are added, as well as new platform device
- names ("spi_r8a7790_msiof" and "spi_r8a7791_msiof").
- - The default RX FIFO size is 256 words on R-Car H2 and M2.
-
-This is loosely based on a set of patches from Takashi Yoshii
-<takasi-y@ops.dti.ne.jp>.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit beb74bb0875579c409778d853b8a050c124b3c79)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/spi/sh-msiof.txt | 23 ++++++++++++++++++++--
- drivers/spi/spi-sh-msiof.c | 23 +++++++++++++++++++---
- 2 files changed, 41 insertions(+), 5 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt
-index eae3c8c9300e..1f0cb33763a1 100644
---- a/Documentation/devicetree/bindings/spi/sh-msiof.txt
-+++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt
-@@ -1,8 +1,13 @@
- Renesas MSIOF spi controller
-
- Required properties:
--- compatible : "renesas,sh-msiof" for SuperH, or
-+- compatible : "renesas,msiof-<soctype>" for SoCs,
-+ "renesas,sh-msiof" for SuperH, or
- "renesas,sh-mobile-msiof" for SH Mobile series.
-+ Examples with soctypes are:
-+ "renesas,msiof-sh7724" (SH)
-+ "renesas,msiof-r8a7790" (R-Car H2)
-+ "renesas,msiof-r8a7791" (R-Car M2)
- - reg : Offset and length of the register set for the device
- - interrupt-parent : The phandle for the interrupt controller that
- services interrupts for this device
-@@ -13,10 +18,24 @@ Required properties:
- Optional properties:
- - clocks : Must contain a reference to the functional clock.
- - num-cs : Total number of chip-selects (default is 1)
-+
-+Optional properties, deprecated for soctype-specific bindings:
- - renesas,tx-fifo-size : Overrides the default tx fifo size given in words
- (default is 64)
- - renesas,rx-fifo-size : Overrides the default rx fifo size given in words
-- (default is 64)
-+ (default is 64, or 256 on R-Car H2 and M2)
-
- Pinctrl properties might be needed, too. See
- Documentation/devicetree/bindings/pinctrl/renesas,*.
-+
-+Example:
-+
-+ msiof0: spi@e6e20000 {
-+ compatible = "renesas,msiof-r8a7791";
-+ reg = <0 0xe6e20000 0 0x0064>;
-+ interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 42bcb95f03dc..aa609551ba84 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -34,6 +34,7 @@
- struct sh_msiof_chipdata {
- u16 tx_fifo_size;
- u16 rx_fifo_size;
-+ u16 master_flags;
- };
-
- struct sh_msiof_spi_priv {
-@@ -214,7 +215,8 @@ static void sh_msiof_spi_set_clk_regs(struct sh_msiof_spi_priv *p,
- k = min_t(int, k, ARRAY_SIZE(sh_msiof_spi_clk_table) - 1);
-
- sh_msiof_write(p, TSCR, sh_msiof_spi_clk_table[k].scr);
-- sh_msiof_write(p, RSCR, sh_msiof_spi_clk_table[k].scr);
-+ if (!(p->chipdata->master_flags & SPI_MASTER_MUST_TX))
-+ sh_msiof_write(p, RSCR, sh_msiof_spi_clk_table[k].scr);
- }
-
- static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p,
-@@ -237,6 +239,10 @@ static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p,
- tmp |= !cs_high << MDR1_SYNCAC_SHIFT;
- tmp |= lsb_first << MDR1_BITLSB_SHIFT;
- sh_msiof_write(p, TMDR1, tmp | MDR1_TRMD | TMDR1_PCON);
-+ if (p->chipdata->master_flags & SPI_MASTER_MUST_TX) {
-+ /* These bits are reserved if RX needs TX */
-+ tmp &= ~0x0000ffff;
-+ }
- sh_msiof_write(p, RMDR1, tmp);
-
- tmp = 0;
-@@ -257,7 +263,7 @@ static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p,
- {
- u32 dr2 = MDR2_BITLEN1(bits) | MDR2_WDLEN1(words);
-
-- if (tx_buf)
-+ if (tx_buf || (p->chipdata->master_flags & SPI_MASTER_MUST_TX))
- sh_msiof_write(p, TMDR2, dr2);
- else
- sh_msiof_write(p, TMDR2, dr2 | MDR2_GRPMASK1);
-@@ -665,11 +671,20 @@ static u32 sh_msiof_spi_txrx_word(struct spi_device *spi, unsigned nsecs,
- static const struct sh_msiof_chipdata sh_data = {
- .tx_fifo_size = 64,
- .rx_fifo_size = 64,
-+ .master_flags = 0,
-+};
-+
-+static const struct sh_msiof_chipdata r8a779x_data = {
-+ .tx_fifo_size = 64,
-+ .rx_fifo_size = 256,
-+ .master_flags = SPI_MASTER_MUST_TX,
- };
-
- static const struct of_device_id sh_msiof_match[] = {
- { .compatible = "renesas,sh-msiof", .data = &sh_data },
- { .compatible = "renesas,sh-mobile-msiof", .data = &sh_data },
-+ { .compatible = "renesas,msiof-r8a7790", .data = &r8a779x_data },
-+ { .compatible = "renesas,msiof-r8a7791", .data = &r8a779x_data },
- {},
- };
- MODULE_DEVICE_TABLE(of, sh_msiof_match);
-@@ -789,7 +804,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- /* init master and bitbang code */
- master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
- master->mode_bits |= SPI_LSB_FIRST | SPI_3WIRE;
-- master->flags = 0;
-+ master->flags = p->chipdata->master_flags;
- master->bus_num = pdev->id;
- master->dev.of_node = pdev->dev.of_node;
- master->num_chipselect = p->info->num_chipselect;
-@@ -832,6 +847,8 @@ static int sh_msiof_spi_remove(struct platform_device *pdev)
-
- static struct platform_device_id spi_driver_ids[] = {
- { "spi_sh_msiof", (kernel_ulong_t)&sh_data },
-+ { "spi_r8a7790_msiof", (kernel_ulong_t)&r8a779x_data },
-+ { "spi_r8a7791_msiof", (kernel_ulong_t)&r8a779x_data },
- {},
- };
- MODULE_DEVICE_TABLE(platform, spi_driver_ids);
---
-2.1.2
-
diff --git a/patches.renesas/0194-spi-sh-msiof-Move-clock-management-to-un-prepare_mes.patch b/patches.renesas/0194-spi-sh-msiof-Move-clock-management-to-un-prepare_mes.patch
deleted file mode 100644
index 8c6521efd9fd7..0000000000000
--- a/patches.renesas/0194-spi-sh-msiof-Move-clock-management-to-un-prepare_mes.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From 7b51bccda1cc5aaf48247b7b0799fdcfb2e2e415 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:21:11 +0100
-Subject: spi: sh-msiof: Move clock management to (un)prepare_message()
-
-Move clock management and pin configuration from the bitbang chipselect()
-method to the SPI core prepare_message() and unprepare_message() methods.
-
-As spi_master.{,un}prepare_message() is guaranteed to be called in
-matching pairs, the clock management synchronization is no longer needed.
-
-As sh_msiof_spi_set_pin_regs() is no longer called at spi_master.setup()
-time (through spi_bitbang_setup() and the spi_bitbang.chipselect()
-callback), we now have to take care of that ourselves.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c833ff7304511805ce5a3378d1637e39e00e00ea)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 61 +++++++++++++++++++++++++++++-----------------
- 1 file changed, 38 insertions(+), 23 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index aa609551ba84..9e891c3c8642 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -45,7 +45,6 @@ struct sh_msiof_spi_priv {
- const struct sh_msiof_chipdata *chipdata;
- struct sh_msiof_spi_info *info;
- struct completion done;
-- unsigned long flags;
- int tx_fifo_size;
- int rx_fifo_size;
- };
-@@ -458,6 +457,7 @@ static int sh_msiof_spi_setup_transfer(struct spi_device *spi,
- static int sh_msiof_spi_setup(struct spi_device *spi)
- {
- struct device_node *np = spi->master->dev.of_node;
-+ struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
-
- if (!np) {
- /*
-@@ -467,12 +467,46 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
- spi->cs_gpio = (uintptr_t)spi->controller_data;
- }
-
-+ /* Configure pins before deasserting CS */
-+ sh_msiof_spi_set_pin_regs(p, !!(spi->mode & SPI_CPOL),
-+ !!(spi->mode & SPI_CPHA),
-+ !!(spi->mode & SPI_3WIRE),
-+ !!(spi->mode & SPI_LSB_FIRST),
-+ !!(spi->mode & SPI_CS_HIGH));
-+
- return spi_bitbang_setup(spi);
- }
-
-+static int sh_msiof_prepare_message(struct spi_master *master,
-+ struct spi_message *msg)
-+{
-+ struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
-+ const struct spi_device *spi = msg->spi;
-+
-+ pm_runtime_get_sync(&p->pdev->dev);
-+ clk_enable(p->clk);
-+
-+ /* Configure pins before asserting CS */
-+ sh_msiof_spi_set_pin_regs(p, !!(spi->mode & SPI_CPOL),
-+ !!(spi->mode & SPI_CPHA),
-+ !!(spi->mode & SPI_3WIRE),
-+ !!(spi->mode & SPI_LSB_FIRST),
-+ !!(spi->mode & SPI_CS_HIGH));
-+ return 0;
-+}
-+
-+static int sh_msiof_unprepare_message(struct spi_master *master,
-+ struct spi_message *msg)
-+{
-+ struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
-+
-+ clk_disable(p->clk);
-+ pm_runtime_put(&p->pdev->dev);
-+ return 0;
-+}
-+
- static void sh_msiof_spi_chipselect(struct spi_device *spi, int is_on)
- {
-- struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
- int value;
-
- /* chip select is active low unless SPI_CS_HIGH is set */
-@@ -481,29 +515,8 @@ static void sh_msiof_spi_chipselect(struct spi_device *spi, int is_on)
- else
- value = (is_on == BITBANG_CS_ACTIVE) ? 0 : 1;
-
-- if (is_on == BITBANG_CS_ACTIVE) {
-- if (!test_and_set_bit(0, &p->flags)) {
-- pm_runtime_get_sync(&p->pdev->dev);
-- clk_enable(p->clk);
-- }
--
-- /* Configure pins before asserting CS */
-- sh_msiof_spi_set_pin_regs(p, !!(spi->mode & SPI_CPOL),
-- !!(spi->mode & SPI_CPHA),
-- !!(spi->mode & SPI_3WIRE),
-- !!(spi->mode & SPI_LSB_FIRST),
-- !!(spi->mode & SPI_CS_HIGH));
-- }
--
- if (spi->cs_gpio >= 0)
- gpio_set_value(spi->cs_gpio, value);
--
-- if (is_on == BITBANG_CS_INACTIVE) {
-- if (test_and_clear_bit(0, &p->flags)) {
-- clk_disable(p->clk);
-- pm_runtime_put(&p->pdev->dev);
-- }
-- }
- }
-
- static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
-@@ -810,6 +823,8 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->num_chipselect = p->info->num_chipselect;
- master->setup = sh_msiof_spi_setup;
- master->cleanup = spi_bitbang_cleanup;
-+ master->prepare_message = sh_msiof_prepare_message;
-+ master->unprepare_message = sh_msiof_unprepare_message;
-
- p->bitbang.master = master;
- p->bitbang.chipselect = sh_msiof_spi_chipselect;
---
-2.1.2
-
diff --git a/patches.renesas/0195-spi-sh-msiof-Convert-to-let-spi-core-validate-xfer-b.patch b/patches.renesas/0195-spi-sh-msiof-Convert-to-let-spi-core-validate-xfer-b.patch
deleted file mode 100644
index 2762f22ea356a..0000000000000
--- a/patches.renesas/0195-spi-sh-msiof-Convert-to-let-spi-core-validate-xfer-b.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 99ed7507c9464d099df0f5704b691fe4147aadf2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:21:12 +0100
-Subject: spi: sh-msiof: Convert to let spi core validate xfer->bits_per_word
-
-Set bits_per_word_mask so the spi core will reject transfers that attempt
-to use an unsupported bits_per_word value.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2416289c714343ea855e725d59d42668a9ab3cf6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 19 ++-----------------
- 1 file changed, 2 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 9e891c3c8642..e41e78abc4d7 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -438,22 +438,6 @@ static u32 sh_msiof_spi_hz(struct spi_device *spi, struct spi_transfer *t)
- return hz;
- }
-
--static int sh_msiof_spi_setup_transfer(struct spi_device *spi,
-- struct spi_transfer *t)
--{
-- int bits;
--
-- /* noting to check hz values against since parent clock is disabled */
--
-- bits = sh_msiof_spi_bits(spi, t);
-- if (bits < 8)
-- return -EINVAL;
-- if (bits > 32)
-- return -EINVAL;
--
-- return spi_bitbang_setup_transfer(spi, t);
--}
--
- static int sh_msiof_spi_setup(struct spi_device *spi)
- {
- struct device_node *np = spi->master->dev.of_node;
-@@ -825,10 +809,11 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->cleanup = spi_bitbang_cleanup;
- master->prepare_message = sh_msiof_prepare_message;
- master->unprepare_message = sh_msiof_unprepare_message;
-+ master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 32);
-
- p->bitbang.master = master;
- p->bitbang.chipselect = sh_msiof_spi_chipselect;
-- p->bitbang.setup_transfer = sh_msiof_spi_setup_transfer;
-+ p->bitbang.setup_transfer = spi_bitbang_setup_transfer;
- p->bitbang.txrx_bufs = sh_msiof_spi_txrx;
- p->bitbang.txrx_word[SPI_MODE_0] = sh_msiof_spi_txrx_word;
- p->bitbang.txrx_word[SPI_MODE_1] = sh_msiof_spi_txrx_word;
---
-2.1.2
-
diff --git a/patches.renesas/0196-spi-sh-msiof-Use-core-message-handling-instead-of-sp.patch b/patches.renesas/0196-spi-sh-msiof-Use-core-message-handling-instead-of-sp.patch
deleted file mode 100644
index cc817088b7506..0000000000000
--- a/patches.renesas/0196-spi-sh-msiof-Use-core-message-handling-instead-of-sp.patch
+++ /dev/null
@@ -1,186 +0,0 @@
-From 636c9b22e1b2b86399ba6c3c73b12e995558d648 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:21:13 +0100
-Subject: spi: sh-msiof: Use core message handling instead of spi-bitbang
-
-The only remaining feature of spi-bitbang used by this driver is the
-chipselect() callback, which just does conditional GPIO.
-This is handled fine by the SPI core's spi_set_cs(), hence switch the
-driver to use the core message handling through our own transfer_one()
-method.
-
-As the (optional) GPIO CS is no longer deasserted at spi_master.setup()
-time (through spi_bitbang_setup() and the spi_bitbang.chipselect()
-callback), we now have to take care of that ourselves.
-
-Remove the call to spi_master_put() in sh_msiof_spi_remove(), as our SPI
-master is now registered using devm_spi_register_master()
-(spi_bitbang_start() uses the non-managed version).
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 1bd6363bc0c69ff6120b53daa35cf9459c3628ad)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/Kconfig | 1 -
- drivers/spi/spi-sh-msiof.c | 67 ++++++++++++++--------------------------------
- 2 files changed, 20 insertions(+), 48 deletions(-)
-
-diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
-index 581ee2a8856b..90c623116ec8 100644
---- a/drivers/spi/Kconfig
-+++ b/drivers/spi/Kconfig
-@@ -416,7 +416,6 @@ config SPI_SH_MSIOF
- tristate "SuperH MSIOF SPI controller"
- depends on HAVE_CLK
- depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
-- select SPI_BITBANG
- help
- SPI driver for SuperH and SH Mobile MSIOF blocks.
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index e41e78abc4d7..1b59804b43ad 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -26,7 +26,6 @@
-
- #include <linux/spi/sh_msiof.h>
- #include <linux/spi/spi.h>
--#include <linux/spi/spi_bitbang.h>
-
- #include <asm/unaligned.h>
-
-@@ -38,7 +37,6 @@ struct sh_msiof_chipdata {
- };
-
- struct sh_msiof_spi_priv {
-- struct spi_bitbang bitbang; /* must be first for spi_bitbang.c */
- void __iomem *mapbase;
- struct clk *clk;
- struct platform_device *pdev;
-@@ -458,7 +456,10 @@ static int sh_msiof_spi_setup(struct spi_device *spi)
- !!(spi->mode & SPI_LSB_FIRST),
- !!(spi->mode & SPI_CS_HIGH));
-
-- return spi_bitbang_setup(spi);
-+ if (spi->cs_gpio >= 0)
-+ gpio_set_value(spi->cs_gpio, !(spi->mode & SPI_CS_HIGH));
-+
-+ return 0;
- }
-
- static int sh_msiof_prepare_message(struct spi_master *master,
-@@ -489,20 +490,6 @@ static int sh_msiof_unprepare_message(struct spi_master *master,
- return 0;
- }
-
--static void sh_msiof_spi_chipselect(struct spi_device *spi, int is_on)
--{
-- int value;
--
-- /* chip select is active low unless SPI_CS_HIGH is set */
-- if (spi->mode & SPI_CS_HIGH)
-- value = (is_on == BITBANG_CS_ACTIVE) ? 1 : 0;
-- else
-- value = (is_on == BITBANG_CS_ACTIVE) ? 0 : 1;
--
-- if (spi->cs_gpio >= 0)
-- gpio_set_value(spi->cs_gpio, value);
--}
--
- static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- void (*tx_fifo)(struct sh_msiof_spi_priv *,
- const void *, int, int),
-@@ -572,9 +559,11 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- return ret;
- }
-
--static int sh_msiof_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
-+static int sh_msiof_transfer_one(struct spi_master *master,
-+ struct spi_device *spi,
-+ struct spi_transfer *t)
- {
-- struct sh_msiof_spi_priv *p = spi_master_get_devdata(spi->master);
-+ struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
- void (*tx_fifo)(struct sh_msiof_spi_priv *, const void *, int, int);
- void (*rx_fifo)(struct sh_msiof_spi_priv *, void *, int, int);
- int bits;
-@@ -655,13 +644,6 @@ static int sh_msiof_spi_txrx(struct spi_device *spi, struct spi_transfer *t)
- words -= n;
- }
-
-- return bytes_done;
--}
--
--static u32 sh_msiof_spi_txrx_word(struct spi_device *spi, unsigned nsecs,
-- u32 word, u8 bits)
--{
-- BUG(); /* unused but needed by bitbang code */
- return 0;
- }
-
-@@ -798,7 +780,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- if (p->info->rx_fifo_override)
- p->rx_fifo_size = p->info->rx_fifo_override;
-
-- /* init master and bitbang code */
-+ /* init master code */
- master->mode_bits = SPI_CPOL | SPI_CPHA | SPI_CS_HIGH;
- master->mode_bits |= SPI_LSB_FIRST | SPI_3WIRE;
- master->flags = p->chipdata->master_flags;
-@@ -806,24 +788,20 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->dev.of_node = pdev->dev.of_node;
- master->num_chipselect = p->info->num_chipselect;
- master->setup = sh_msiof_spi_setup;
-- master->cleanup = spi_bitbang_cleanup;
- master->prepare_message = sh_msiof_prepare_message;
- master->unprepare_message = sh_msiof_unprepare_message;
- master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 32);
-+ master->transfer_one = sh_msiof_transfer_one;
-
-- p->bitbang.master = master;
-- p->bitbang.chipselect = sh_msiof_spi_chipselect;
-- p->bitbang.setup_transfer = spi_bitbang_setup_transfer;
-- p->bitbang.txrx_bufs = sh_msiof_spi_txrx;
-- p->bitbang.txrx_word[SPI_MODE_0] = sh_msiof_spi_txrx_word;
-- p->bitbang.txrx_word[SPI_MODE_1] = sh_msiof_spi_txrx_word;
-- p->bitbang.txrx_word[SPI_MODE_2] = sh_msiof_spi_txrx_word;
-- p->bitbang.txrx_word[SPI_MODE_3] = sh_msiof_spi_txrx_word;
-+ ret = devm_spi_register_master(&pdev->dev, master);
-+ if (ret < 0) {
-+ dev_err(&pdev->dev, "spi_register_master error.\n");
-+ goto err2;
-+ }
-
-- ret = spi_bitbang_start(&p->bitbang);
-- if (ret == 0)
-- return 0;
-+ return 0;
-
-+ err2:
- pm_runtime_disable(&pdev->dev);
- clk_unprepare(p->clk);
- err1:
-@@ -834,15 +812,10 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- static int sh_msiof_spi_remove(struct platform_device *pdev)
- {
- struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
-- int ret;
-
-- ret = spi_bitbang_stop(&p->bitbang);
-- if (!ret) {
-- pm_runtime_disable(&pdev->dev);
-- clk_unprepare(p->clk);
-- spi_master_put(p->bitbang.master);
-- }
-- return ret;
-+ pm_runtime_disable(&pdev->dev);
-+ clk_unprepare(p->clk);
-+ return 0;
- }
-
- static struct platform_device_id spi_driver_ids[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0197-spi-sh-msiof-Kill-sh_msiof_spi_bits-and-sh_msiof_spi.patch b/patches.renesas/0197-spi-sh-msiof-Kill-sh_msiof_spi_bits-and-sh_msiof_spi.patch
deleted file mode 100644
index f83ab8a7d2c65..0000000000000
--- a/patches.renesas/0197-spi-sh-msiof-Kill-sh_msiof_spi_bits-and-sh_msiof_spi.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 78adfee5b79ef12d2cf9c189984028d4484aa31a Mon Sep 17 00:00:00 2001
-From: Axel Lin <axel.lin@ingics.com>
-Date: Sun, 2 Mar 2014 22:30:32 +0800
-Subject: spi: sh-msiof: Kill sh_msiof_spi_bits and sh_msiof_spi_hz functions
-
-In the implementation of __spi_validate(), spi core will set transfer
-bits_per_word and max speed as spi device default if it is not set for
-this transfer. So we can remove the same implementation in this driver.
-
-Signed-off-by: Axel Lin <axel.lin@ingics.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b14158603288b9d898716b41f2f0acb7d49dad2c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 25 ++-----------------------
- 1 file changed, 2 insertions(+), 23 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 1b59804b43ad..739eb2f12ecc 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -416,26 +416,6 @@ static void sh_msiof_spi_read_fifo_s32u(struct sh_msiof_spi_priv *p,
- put_unaligned(swab32(sh_msiof_read(p, RFDR) >> fs), &buf_32[k]);
- }
-
--static int sh_msiof_spi_bits(struct spi_device *spi, struct spi_transfer *t)
--{
-- int bits;
--
-- bits = t ? t->bits_per_word : 0;
-- if (!bits)
-- bits = spi->bits_per_word;
-- return bits;
--}
--
--static u32 sh_msiof_spi_hz(struct spi_device *spi, struct spi_transfer *t)
--{
-- u32 hz;
--
-- hz = t ? t->speed_hz : 0;
-- if (!hz)
-- hz = spi->max_speed_hz;
-- return hz;
--}
--
- static int sh_msiof_spi_setup(struct spi_device *spi)
- {
- struct device_node *np = spi->master->dev.of_node;
-@@ -573,7 +553,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- int n;
- bool swab;
-
-- bits = sh_msiof_spi_bits(spi, t);
-+ bits = t->bits_per_word;
-
- if (bits <= 8 && t->len > 15 && !(t->len & 3)) {
- bits = 32;
-@@ -623,8 +603,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- }
-
- /* setup clocks (clock already enabled in chipselect()) */
-- sh_msiof_spi_set_clk_regs(p, clk_get_rate(p->clk),
-- sh_msiof_spi_hz(spi, t));
-+ sh_msiof_spi_set_clk_regs(p, clk_get_rate(p->clk), t->speed_hz);
-
- /* transfer in fifo sized chunks */
- words = t->len / bytes_per_word;
---
-2.1.2
-
diff --git a/patches.renesas/0198-spi-sh-msiof-Remove-renesas-msiof-sh7724-from-bindin.patch b/patches.renesas/0198-spi-sh-msiof-Remove-renesas-msiof-sh7724-from-bindin.patch
deleted file mode 100644
index 1cae4790984a1..0000000000000
--- a/patches.renesas/0198-spi-sh-msiof-Remove-renesas-msiof-sh7724-from-bindin.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 9b94596a82a90f71cc942225fdbccc293471cccc Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 10:43:26 +0100
-Subject: spi: sh-msiof: Remove "renesas,msiof-sh7724" from bindings
-
-It's not implemented in the driver, so it's a bad example.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit f9ee821ebc5e58ff5da08d625ea4e2d74b221317)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/spi/sh-msiof.txt | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/spi/sh-msiof.txt b/Documentation/devicetree/bindings/spi/sh-msiof.txt
-index 1f0cb33763a1..f24baf3b6cc1 100644
---- a/Documentation/devicetree/bindings/spi/sh-msiof.txt
-+++ b/Documentation/devicetree/bindings/spi/sh-msiof.txt
-@@ -5,7 +5,6 @@ Required properties:
- "renesas,sh-msiof" for SuperH, or
- "renesas,sh-mobile-msiof" for SH Mobile series.
- Examples with soctypes are:
-- "renesas,msiof-sh7724" (SH)
- "renesas,msiof-r8a7790" (R-Car H2)
- "renesas,msiof-r8a7791" (R-Car M2)
- - reg : Offset and length of the register set for the device
---
-2.1.2
-
diff --git a/patches.renesas/0199-spi-sh-msiof-Convert-to-spi-core-auto_runtime_pm-fra.patch b/patches.renesas/0199-spi-sh-msiof-Convert-to-spi-core-auto_runtime_pm-fra.patch
deleted file mode 100644
index d954c94dc3813..0000000000000
--- a/patches.renesas/0199-spi-sh-msiof-Convert-to-spi-core-auto_runtime_pm-fra.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From e617ec74615934ac2d23ae18d14fe82cbcec39d7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 11 Mar 2014 10:59:11 +0100
-Subject: spi: sh-msiof: Convert to spi core auto_runtime_pm framework
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e2a0ba547ba31cd7b217cc948d93e4edc78cbcb1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 25 +------------------------
- 1 file changed, 1 insertion(+), 24 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 739eb2f12ecc..e850d03e7190 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -448,9 +448,6 @@ static int sh_msiof_prepare_message(struct spi_master *master,
- struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
- const struct spi_device *spi = msg->spi;
-
-- pm_runtime_get_sync(&p->pdev->dev);
-- clk_enable(p->clk);
--
- /* Configure pins before asserting CS */
- sh_msiof_spi_set_pin_regs(p, !!(spi->mode & SPI_CPOL),
- !!(spi->mode & SPI_CPHA),
-@@ -460,16 +457,6 @@ static int sh_msiof_prepare_message(struct spi_master *master,
- return 0;
- }
-
--static int sh_msiof_unprepare_message(struct spi_master *master,
-- struct spi_message *msg)
--{
-- struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
--
-- clk_disable(p->clk);
-- pm_runtime_put(&p->pdev->dev);
-- return 0;
--}
--
- static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- void (*tx_fifo)(struct sh_msiof_spi_priv *,
- const void *, int, int),
-@@ -742,12 +729,6 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- goto err1;
- }
-
-- ret = clk_prepare(p->clk);
-- if (ret < 0) {
-- dev_err(&pdev->dev, "unable to prepare clock\n");
-- goto err1;
-- }
--
- p->pdev = pdev;
- pm_runtime_enable(&pdev->dev);
-
-@@ -768,8 +749,8 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->num_chipselect = p->info->num_chipselect;
- master->setup = sh_msiof_spi_setup;
- master->prepare_message = sh_msiof_prepare_message;
-- master->unprepare_message = sh_msiof_unprepare_message;
- master->bits_per_word_mask = SPI_BPW_RANGE_MASK(8, 32);
-+ master->auto_runtime_pm = true;
- master->transfer_one = sh_msiof_transfer_one;
-
- ret = devm_spi_register_master(&pdev->dev, master);
-@@ -782,7 +763,6 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
-
- err2:
- pm_runtime_disable(&pdev->dev);
-- clk_unprepare(p->clk);
- err1:
- spi_master_put(master);
- return ret;
-@@ -790,10 +770,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
-
- static int sh_msiof_spi_remove(struct platform_device *pdev)
- {
-- struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
--
- pm_runtime_disable(&pdev->dev);
-- clk_unprepare(p->clk);
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0200-ARM-shmobile-dts-Remove-r8a7791-koelsch-reference.dt.patch b/patches.renesas/0200-ARM-shmobile-dts-Remove-r8a7791-koelsch-reference.dt.patch
deleted file mode 100644
index 2842764c07fcb..0000000000000
--- a/patches.renesas/0200-ARM-shmobile-dts-Remove-r8a7791-koelsch-reference.dt.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 0ee5347bde9524dc0301713cfbf173e68a4331c1 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 29 Dec 2013 22:41:56 +0100
-Subject: ARM: shmobile: dts: Remove r8a7791-koelsch-reference.dts
-
-The dts file has been superseded by r8a7791-koelsch.dts and been removed
-from the ARCH_SHMOBILE_LEGACY dtb target. Remove it.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 52e62f7f4b25d4f087395f805768e985e9d91bd0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch-reference.dts | 115 ------------------------
- 1 file changed, 115 deletions(-)
- delete mode 100644 arch/arm/boot/dts/r8a7791-koelsch-reference.dts
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts b/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
-deleted file mode 100644
-index 588ca17ea1f0..000000000000
---- a/arch/arm/boot/dts/r8a7791-koelsch-reference.dts
-+++ /dev/null
-@@ -1,115 +0,0 @@
--/*
-- * Device Tree Source for the Koelsch board
-- *
-- * Copyright (C) 2013 Renesas Electronics Corporation
-- * Copyright (C) 2013 Renesas Solutions Corp.
-- *
-- * This file is licensed under the terms of the GNU General Public License
-- * version 2. This program is licensed "as is" without any warranty of any
-- * kind, whether express or implied.
-- */
--
--/dts-v1/;
--#include "r8a7791.dtsi"
--#include <dt-bindings/gpio/gpio.h>
--
--/ {
-- model = "Koelsch";
-- compatible = "renesas,koelsch-reference", "renesas,r8a7791";
--
-- chosen {
-- bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
-- };
--
-- memory@40000000 {
-- device_type = "memory";
-- reg = <0 0x40000000 0 0x80000000>;
-- };
--
-- lbsc {
-- #address-cells = <1>;
-- #size-cells = <1>;
-- };
--
-- gpio-keys {
-- compatible = "gpio-keys";
--
-- key-a {
-- gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
-- linux,code = <30>;
-- label = "SW30";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- key-b {
-- gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
-- linux,code = <48>;
-- label = "SW31";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- key-c {
-- gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
-- linux,code = <46>;
-- label = "SW32";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- key-d {
-- gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
-- linux,code = <32>;
-- label = "SW33";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- key-e {
-- gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
-- linux,code = <18>;
-- label = "SW34";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- key-f {
-- gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
-- linux,code = <33>;
-- label = "SW35";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- key-g {
-- gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
-- linux,code = <34>;
-- label = "SW36";
-- gpio-key,wakeup;
-- debounce-interval = <20>;
-- };
-- };
--
-- leds {
-- compatible = "gpio-leds";
-- led6 {
-- gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
-- };
-- led7 {
-- gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
-- };
-- led8 {
-- gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
-- };
-- };
--};
--
--&pfc {
-- pinctrl-0 = <&scif0_pins &scif1_pins>;
-- pinctrl-names = "default";
--
-- scif0_pins: serial0 {
-- renesas,groups = "scif0_data_d";
-- renesas,function = "scif0";
-- };
--
-- scif1_pins: serial1 {
-- renesas,groups = "scif1_data_d";
-- renesas,function = "scif1";
-- };
--};
---
-2.1.2
-
diff --git a/patches.renesas/0201-ARM-shmobile-Add-GPIO-keys-to-Koelsch-DTS.patch b/patches.renesas/0201-ARM-shmobile-Add-GPIO-keys-to-Koelsch-DTS.patch
deleted file mode 100644
index 29315cd757d6d..0000000000000
--- a/patches.renesas/0201-ARM-shmobile-Add-GPIO-keys-to-Koelsch-DTS.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 1f3c536042861ef87270356bb361d3a4f5cea83a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 19 Dec 2013 16:28:42 +0100
-Subject: ARM: shmobile: Add GPIO keys to Koelsch DTS
-
-The Koelsh reference device tree is going away, copy the missing GPIO
-keys device node to the Koeslch device tree file.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit aff5274fdc5b53a44d906c39a834efa6ba9c30ef)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 54 +++++++++++++++++++++++++++++++++++
- 1 file changed, 54 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index fd556c3483e3..c6f5de385940 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -31,6 +31,60 @@
- #size-cells = <1>;
- };
-
-+ gpio-keys {
-+ compatible = "gpio-keys";
-+
-+ key-a {
-+ gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
-+ linux,code = <30>;
-+ label = "SW30";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-b {
-+ gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
-+ linux,code = <48>;
-+ label = "SW31";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-c {
-+ gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
-+ linux,code = <46>;
-+ label = "SW32";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-d {
-+ gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
-+ linux,code = <32>;
-+ label = "SW33";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-e {
-+ gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
-+ linux,code = <18>;
-+ label = "SW34";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-f {
-+ gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
-+ linux,code = <33>;
-+ label = "SW35";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-g {
-+ gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
-+ linux,code = <34>;
-+ label = "SW36";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ };
-+
- leds {
- compatible = "gpio-leds";
- led6 {
---
-2.1.2
-
diff --git a/patches.renesas/0202-ARM-shmobile-koelsch-1-1-GiB-memory-in-DT.patch b/patches.renesas/0202-ARM-shmobile-koelsch-1-1-GiB-memory-in-DT.patch
deleted file mode 100644
index de6744a96c4c7..0000000000000
--- a/patches.renesas/0202-ARM-shmobile-koelsch-1-1-GiB-memory-in-DT.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ce2284e7a95cd52dbf62e37cdf3fef8ea21a09a1 Mon Sep 17 00:00:00 2001
-From: Takashi Yoshii <takasi-y@ops.dti.ne.jp>
-Date: Sun, 22 Dec 2013 18:27:23 +0900
-Subject: ARM: shmobile: koelsch: (1+1)GiB memory in DT
-
-Fix dts to have memory 1GiB @ 0_4000_0000 + 1GiB @ 2_0000_0000
-according to Koelsch's hardware manual.
-
-Signed-off-by: Takashi Yoshii <takasi-y@ops.dti.ne.jp>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4cd1bad45182c7f1426353d73a481e0260d236b1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index c6f5de385940..d30527dee0c9 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -23,7 +23,12 @@
-
- memory@40000000 {
- device_type = "memory";
-- reg = <0 0x40000000 0 0x80000000>;
-+ reg = <0 0x40000000 0 0x40000000>;
-+ };
-+
-+ memory@200000000 {
-+ device_type = "memory";
-+ reg = <2 0x00000000 0 0x40000000>;
- };
-
- lbsc {
---
-2.1.2
-
diff --git a/patches.renesas/0203-ARM-shmobile-r8a7791-Add-thermal-clock-in-device-tre.patch b/patches.renesas/0203-ARM-shmobile-r8a7791-Add-thermal-clock-in-device-tre.patch
deleted file mode 100644
index 9b45b1bef33e7..0000000000000
--- a/patches.renesas/0203-ARM-shmobile-r8a7791-Add-thermal-clock-in-device-tre.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 70839422c4fec0da1aacd39eb4cf401386b82796 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 7 Jan 2014 19:57:13 +0100
-Subject: ARM: shmobile: r8a7791: Add thermal clock in device tree
-
-Add the missing thermal MSTP clock to the thermal device node.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 563bc8eb0243783afd7a71204ad696e8bdf44391)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 19c65509a22d..34f5d39220e3 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -151,6 +151,7 @@
- reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
- interrupt-parent = <&gic>;
- interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp5_clks R8A7791_CLK_THERMAL>;
- };
-
- timer {
---
-2.1.2
-
diff --git a/patches.renesas/0204-ARM-shmobile-r8a7790-Add-thermal-clock-in-device-tre.patch b/patches.renesas/0204-ARM-shmobile-r8a7790-Add-thermal-clock-in-device-tre.patch
deleted file mode 100644
index 4976707e8fe27..0000000000000
--- a/patches.renesas/0204-ARM-shmobile-r8a7790-Add-thermal-clock-in-device-tre.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 8ca4c5e9193e9934af3b5f76086a8ba65691958d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 7 Jan 2014 19:57:14 +0100
-Subject: ARM: shmobile: r8a7790: Add thermal clock in device tree
-
-Add the missing thermal MSTP clock to the thermal device node.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d3a439dbe3ff1610156c39cdffcc2c3257fadd62)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 71b1251f79c7..96fc7313149c 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -168,6 +168,7 @@
- reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
- interrupt-parent = <&gic>;
- interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp5_clks R8A7790_CLK_THERMAL>;
- };
-
- timer {
---
-2.1.2
-
diff --git a/patches.renesas/0205-ARM-shmobile-r8a7791-Add-serial-ports-to-the-device-.patch b/patches.renesas/0205-ARM-shmobile-r8a7791-Add-serial-ports-to-the-device-.patch
deleted file mode 100644
index 4786240e1b5c8..0000000000000
--- a/patches.renesas/0205-ARM-shmobile-r8a7791-Add-serial-ports-to-the-device-.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From 9b5c5af0b9dda9225120b6039bec3e7b94f20f78 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 11 Dec 2013 14:14:22 +0100
-Subject: ARM: shmobile: r8a7791: Add serial ports to the device tree
-
-Add all serial ports marked as disabled.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9640cf259c9496d56bf44df8ae86f00f7b417ecc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 180 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 180 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 34f5d39220e3..00ed0e0a9bcb 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -186,6 +186,186 @@
- #gpio-range-cells = <3>;
- };
-
-+ scifa0: serial@e6c40000 {
-+ compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-+ reg = <0 0xe6c40000 0 64>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_SCIFA0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa1: serial@e6c50000 {
-+ compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c50000 0 64>;
-+ interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_SCIFA1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa2: serial@e6c60000 {
-+ compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c60000 0 64>;
-+ interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_SCIFA2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa3: serial@e6c70000 {
-+ compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c70000 0 64>;
-+ interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp11_clks R8A7791_CLK_SCIFA3>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa4: serial@e6c78000 {
-+ compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c78000 0 64>;
-+ interrupts = <0 30 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp11_clks R8A7791_CLK_SCIFA4>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa5: serial@e6c80000 {
-+ compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c80000 0 64>;
-+ interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp11_clks R8A7791_CLK_SCIFA5>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifb0: serial@e6c20000 {
-+ compatible = "renesas,scifb-r8a7791", "renesas,scifb";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c20000 0 64>;
-+ interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_SCIFB0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifb1: serial@e6c30000 {
-+ compatible = "renesas,scifb-r8a7791", "renesas,scifb";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c30000 0 64>;
-+ interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_SCIFB1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifb2: serial@e6ce0000 {
-+ compatible = "renesas,scifb-r8a7791", "renesas,scifb";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6ce0000 0 64>;
-+ interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_SCIFB2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif0: serial@e6e60000 {
-+ compatible = "renesas,scif-r8a7791", "renesas,scif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6e60000 0 64>;
-+ interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_SCIF0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif1: serial@e6e68000 {
-+ compatible = "renesas,scif-r8a7791", "renesas,scif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6e68000 0 64>;
-+ interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_SCIF1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif2: serial@e6e58000 {
-+ compatible = "renesas,scif-r8a7791", "renesas,scif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6e58000 0 64>;
-+ interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_SCIF2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif3: serial@e6ea8000 {
-+ compatible = "renesas,scif-r8a7791", "renesas,scif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6ea8000 0 64>;
-+ interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_SCIF3>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif4: serial@e6ee0000 {
-+ compatible = "renesas,scif-r8a7791", "renesas,scif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6ee0000 0 64>;
-+ interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_SCIF4>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif5: serial@e6ee8000 {
-+ compatible = "renesas,scif-r8a7791", "renesas,scif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6ee8000 0 64>;
-+ interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_SCIF5>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ hscif0: serial@e62c0000 {
-+ compatible = "renesas,hscif-r8a7791", "renesas,hscif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe62c0000 0 96>;
-+ interrupts = <0 154 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_HSCIF0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ hscif1: serial@e62c8000 {
-+ compatible = "renesas,hscif-r8a7791", "renesas,hscif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe62c8000 0 96>;
-+ interrupts = <0 155 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_HSCIF1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ hscif2: serial@e62d0000 {
-+ compatible = "renesas,hscif-r8a7791", "renesas,hscif";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe62d0000 0 96>;
-+ interrupts = <0 21 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp7_clks R8A7791_CLK_HSCIF2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
- clocks {
- #address-cells = <2>;
- #size-cells = <2>;
---
-2.1.2
-
diff --git a/patches.renesas/0206-ARM-shmobile-r8a7790-Add-serial-ports-to-the-device-.patch b/patches.renesas/0206-ARM-shmobile-r8a7790-Add-serial-ports-to-the-device-.patch
deleted file mode 100644
index c14c80ad70c1e..0000000000000
--- a/patches.renesas/0206-ARM-shmobile-r8a7790-Add-serial-ports-to-the-device-.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From ee1276e604c375c33fecb0a6b30e71da9b4bcd18 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 29 Oct 2013 16:23:12 +0100
-Subject: ARM: shmobile: r8a7790: Add serial ports to the device tree
-
-The platform code serial port instantiation mechanism is kept for the
-non-DT platforms only.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 597af20fa8f810a26c84179a8ac58cb3fce6c102)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 100 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 100 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 96fc7313149c..15e2a97e5bdf 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -300,6 +300,106 @@
- status = "disabled";
- };
-
-+ scifa0: serial@e6c40000 {
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ reg = <0 0xe6c40000 0 64>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 144 4>;
-+ clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa1: serial@e6c50000 {
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c50000 0 64>;
-+ interrupts = <0 145 4>;
-+ clocks = <&mstp2_clks R8A7790_CLK_SCIFA1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifa2: serial@e6c60000 {
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c60000 0 64>;
-+ interrupts = <0 151 4>;
-+ clocks = <&mstp2_clks R8A7790_CLK_SCIFA2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifb0: serial@e6c20000 {
-+ compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c20000 0 64>;
-+ interrupts = <0 148 4>;
-+ clocks = <&mstp2_clks R8A7790_CLK_SCIFB0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifb1: serial@e6c30000 {
-+ compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6c30000 0 64>;
-+ interrupts = <0 149 4>;
-+ clocks = <&mstp2_clks R8A7790_CLK_SCIFB1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scifb2: serial@e6ce0000 {
-+ compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6ce0000 0 64>;
-+ interrupts = <0 150 4>;
-+ clocks = <&mstp2_clks R8A7790_CLK_SCIFB2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif0: serial@e6e60000 {
-+ compatible = "renesas,scif-r8a7790", "renesas,scif-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6e60000 0 64>;
-+ interrupts = <0 152 4>;
-+ clocks = <&mstp7_clks R8A7790_CLK_SCIF0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif1: serial@e6e68000 {
-+ compatible = "renesas,scif-r8a7790", "renesas,scif-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe6e68000 0 64>;
-+ interrupts = <0 153 4>;
-+ clocks = <&mstp7_clks R8A7790_CLK_SCIF1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ hscif0: serial@e62c0000 {
-+ compatible = "renesas,hscif-r8a7790", "renesas,hscif-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe62c0000 0 96>;
-+ interrupts = <0 154 4>;
-+ clocks = <&mstp7_clks R8A7790_CLK_HSCIF0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ hscif1: serial@e62c8000 {
-+ compatible = "renesas,hscif-r8a7790", "renesas,hscif-generic";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xe62c8000 0 96>;
-+ interrupts = <0 155 4>;
-+ clocks = <&mstp7_clks R8A7790_CLK_HSCIF1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
- clocks {
- #address-cells = <2>;
- #size-cells = <2>;
---
-2.1.2
-
diff --git a/patches.renesas/0207-ARM-shmobile-r8a7790-Add-VIN-clocks-to-device-tree.patch b/patches.renesas/0207-ARM-shmobile-r8a7790-Add-VIN-clocks-to-device-tree.patch
deleted file mode 100644
index 9d43d418accbc..0000000000000
--- a/patches.renesas/0207-ARM-shmobile-r8a7790-Add-VIN-clocks-to-device-tree.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 1a21796cf22fa65df85aab413b649869b22de54c Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 7 Jan 2014 09:22:53 +0100
-Subject: ARM: shmobile: r8a7790: Add VIN clocks to device tree
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3f2beaa9f2d7229c041975e40868dee2e3c4a598)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 15e2a97e5bdf..9e4202c92819 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -708,10 +708,13 @@
- mstp8_clks: mstp8_clks@e6150990 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
-- clocks = <&p_clk>;
-+ clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&zg_clk>, <&p_clk>;
- #clock-cells = <1>;
-- renesas,clock-indices = <R8A7790_CLK_ETHER>;
-- clock-output-names = "ether";
-+ renesas,clock-indices = <
-+ R8A7790_CLK_VIN3 R8A7790_CLK_VIN2 R8A7790_CLK_VIN1
-+ R8A7790_CLK_VIN0 R8A7790_CLK_ETHER
-+ >;
-+ clock-output-names = "vin3", "vin2", "vin1", "vin0", "ether";
- };
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0208-ARM-shmobile-r8a7791-Add-VIN-clocks-to-device-tree.patch b/patches.renesas/0208-ARM-shmobile-r8a7791-Add-VIN-clocks-to-device-tree.patch
deleted file mode 100644
index 5279ea6e83639..0000000000000
--- a/patches.renesas/0208-ARM-shmobile-r8a7791-Add-VIN-clocks-to-device-tree.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From d19d848bd0b51d8daa810f41f38dcdbd9daa2457 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 7 Jan 2014 09:22:54 +0100
-Subject: ARM: shmobile: r8a7791: Add VIN clocks to device tree
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 09c983463dd576d005c95dfdc0997f064629d321)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 00ed0e0a9bcb..93c6f4d2866c 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -655,10 +655,13 @@
- mstp8_clks: mstp8_clks@e6150990 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
-- clocks = <&p_clk>;
-+ clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&p_clk>;
- #clock-cells = <1>;
-- renesas,clock-indices = <R8A7791_CLK_ETHER>;
-- clock-output-names = "ether";
-+ renesas,clock-indices = <
-+ R8A7791_CLK_VIN2 R8A7791_CLK_VIN1 R8A7791_CLK_VIN0
-+ R8A7791_CLK_ETHER
-+ >;
-+ clock-output-names = "vin2", "vin1", "vin0", "ether";
- };
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0209-ARM-shmobile-r8a7790-Add-SATA-clocks-to-device-tree.patch b/patches.renesas/0209-ARM-shmobile-r8a7790-Add-SATA-clocks-to-device-tree.patch
deleted file mode 100644
index 7f79e5789bf89..0000000000000
--- a/patches.renesas/0209-ARM-shmobile-r8a7790-Add-SATA-clocks-to-device-tree.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From bba2a70bad22477b7d1cd7f294d551ff0a190b17 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 7 Jan 2014 09:22:55 +0100
-Subject: ARM: shmobile: r8a7790: Add SATA clocks to device tree
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bccccc3d861567876a87441bc92f2e3b46cb38a9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 9 ++++++---
- 1 file changed, 6 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 9e4202c92819..8cc68f78cd24 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -708,13 +708,16 @@
- mstp8_clks: mstp8_clks@e6150990 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
-- clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&zg_clk>, <&p_clk>;
-+ clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&zg_clk>, <&p_clk>,
-+ <&zs_clk>, <&zs_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7790_CLK_VIN3 R8A7790_CLK_VIN2 R8A7790_CLK_VIN1
-- R8A7790_CLK_VIN0 R8A7790_CLK_ETHER
-+ R8A7790_CLK_VIN0 R8A7790_CLK_ETHER R8A7790_CLK_SATA1
-+ R8A7790_CLK_SATA0
- >;
-- clock-output-names = "vin3", "vin2", "vin1", "vin0", "ether";
-+ clock-output-names =
-+ "vin3", "vin2", "vin1", "vin0", "ether", "sata1", "sata0";
- };
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0210-ARM-shmobile-r8a7791-Add-SATA-clocks-to-device-tree.patch b/patches.renesas/0210-ARM-shmobile-r8a7791-Add-SATA-clocks-to-device-tree.patch
deleted file mode 100644
index d601856c88f5f..0000000000000
--- a/patches.renesas/0210-ARM-shmobile-r8a7791-Add-SATA-clocks-to-device-tree.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From c9e8be6a5319a3b533926055650659f872e0b200 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 7 Jan 2014 09:22:56 +0100
-Subject: ARM: shmobile: r8a7791: Add SATA clocks to device tree
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 65f05c38749f393f775c360b9b247fa4d63b72de)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 93c6f4d2866c..94e3cc17448c 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -655,13 +655,15 @@
- mstp8_clks: mstp8_clks@e6150990 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150990 0 4>, <0 0xe61509a0 0 4>;
-- clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&p_clk>;
-+ clocks = <&zg_clk>, <&zg_clk>, <&zg_clk>, <&p_clk>, <&zs_clk>,
-+ <&zs_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7791_CLK_VIN2 R8A7791_CLK_VIN1 R8A7791_CLK_VIN0
-- R8A7791_CLK_ETHER
-+ R8A7791_CLK_ETHER R8A7791_CLK_SATA1 R8A7791_CLK_SATA0
- >;
-- clock-output-names = "vin2", "vin1", "vin0", "ether";
-+ clock-output-names =
-+ "vin2", "vin1", "vin0", "ether", "sata1", "sata0";
- };
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0211-ARM-shmobile-r8a7791-Add-SATA-nodes-to-r8a7791.dtsi.patch b/patches.renesas/0211-ARM-shmobile-r8a7791-Add-SATA-nodes-to-r8a7791.dtsi.patch
deleted file mode 100644
index ac53d1caabd2f..0000000000000
--- a/patches.renesas/0211-ARM-shmobile-r8a7791-Add-SATA-nodes-to-r8a7791.dtsi.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From f862aa85ecb9a04e39b68258a97c88bb063d9b90 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Tue, 14 Jan 2014 21:05:40 +0400
-Subject: ARM: shmobile: r8a7791: Add SATA nodes to r8a7791.dtsi
-
-This adds SATA[01] device nodes to r8a7791.dtsi.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b8532c699a163702bfcadaaa4c23c4ff71b67eec)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 94e3cc17448c..d5cc3626dd60 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -366,6 +366,24 @@
- status = "disabled";
- };
-
-+ sata0: sata@ee300000 {
-+ compatible = "renesas,sata-r8a7791";
-+ reg = <0 0xee300000 0 0x2000>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
-+ status = "disabled";
-+ };
-+
-+ sata1: sata@ee500000 {
-+ compatible = "renesas,sata-r8a7791";
-+ reg = <0 0xee500000 0 0x2000>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7791_CLK_SATA1>;
-+ status = "disabled";
-+ };
-+
- clocks {
- #address-cells = <2>;
- #size-cells = <2>;
---
-2.1.2
-
diff --git a/patches.renesas/0212-ARM-shmobile-koelsch-Enable-SATA0-in-r8a7791-koelsch.patch b/patches.renesas/0212-ARM-shmobile-koelsch-Enable-SATA0-in-r8a7791-koelsch.patch
deleted file mode 100644
index 9c6e3fc3d8095..0000000000000
--- a/patches.renesas/0212-ARM-shmobile-koelsch-Enable-SATA0-in-r8a7791-koelsch.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4d5054b6386393bead91ef01ea84fda19a11d42b Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Tue, 14 Jan 2014 21:05:41 +0400
-Subject: ARM: shmobile: koelsch: Enable SATA0 in r8a7791-koelsch.dts
-
-This enables SATA0 in Koelsch device tree.
-SATA1 is not available on Koelsch since
-its pinmux configuration is fixed to PCIe.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 760c277b23973a3db181b2ae98d9a87f6e8f843e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index d30527dee0c9..74f098596b5c 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -122,3 +122,7 @@
- renesas,function = "scif1";
- };
- };
-+
-+&sata0 {
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0213-ARM-shmobile-r8a7790-Add-SATA-nodes-to-r8a7790.dtsi.patch b/patches.renesas/0213-ARM-shmobile-r8a7790-Add-SATA-nodes-to-r8a7790.dtsi.patch
deleted file mode 100644
index 4b7d1735eca49..0000000000000
--- a/patches.renesas/0213-ARM-shmobile-r8a7790-Add-SATA-nodes-to-r8a7790.dtsi.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From cfd82740c79944acabec2bb8041b2e95fd43c069 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Tue, 14 Jan 2014 21:05:30 +0400
-Subject: ARM: shmobile: r8a7790: Add SATA nodes to r8a7790.dtsi
-
-This adds SATA[01] device nodes to r8a7790.dtsi
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit cde630f763b07ff5d8ff7d34969f9dd05a2a4001)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 8cc68f78cd24..091492152911 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -400,6 +400,24 @@
- status = "disabled";
- };
-
-+ sata0: sata@ee300000 {
-+ compatible = "renesas,sata-r8a7790";
-+ reg = <0 0xee300000 0 0x2000>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7790_CLK_SATA0>;
-+ status = "disabled";
-+ };
-+
-+ sata1: sata@ee500000 {
-+ compatible = "renesas,sata-r8a7790";
-+ reg = <0 0xee500000 0 0x2000>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7790_CLK_SATA1>;
-+ status = "disabled";
-+ };
-+
- clocks {
- #address-cells = <2>;
- #size-cells = <2>;
---
-2.1.2
-
diff --git a/patches.renesas/0214-ARM-shmobile-lager-Enable-SATA1-in-r8a7790-lager.dts.patch b/patches.renesas/0214-ARM-shmobile-lager-Enable-SATA1-in-r8a7790-lager.dts.patch
deleted file mode 100644
index 9a518a113ab03..0000000000000
--- a/patches.renesas/0214-ARM-shmobile-lager-Enable-SATA1-in-r8a7790-lager.dts.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 7aca02f9622035a1f9b9e311170574f191ac3679 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Tue, 14 Jan 2014 21:05:31 +0400
-Subject: ARM: shmobile: lager: Enable SATA1 in r8a7790-lager.dts
-
-This enables SATA1 in Lager device tree.
-SATA0 is not available on Lager since its
-pinmux is fixed to USB3.0.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c6181b9f06b0821e8d34e47174e044801f03edce)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 57569cba1528..1081c5e91ac4 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -91,3 +91,7 @@
- non-removable;
- status = "okay";
- };
-+
-+&sata1 {
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0215-ARM-shmobile-r8a7790-Fix-serial-ports-DT-compatible-.patch b/patches.renesas/0215-ARM-shmobile-r8a7790-Fix-serial-ports-DT-compatible-.patch
deleted file mode 100644
index 597703286ea5b..0000000000000
--- a/patches.renesas/0215-ARM-shmobile-r8a7790-Fix-serial-ports-DT-compatible-.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 5d8c893ffe8363ca4094fe4070279f4a465efb06 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 21 Jan 2014 13:48:38 +0100
-Subject: ARM: shmobile: r8a7790: Fix serial ports DT compatible strings
-
-Remove the -generic suffix that has been added by mistake from the
-serial port compatible strings.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 59d2b5173bbe8dbc324e34263ceae4d6131058f2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 091492152911..51c897835628 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -301,7 +301,7 @@
- };
-
- scifa0: serial@e6c40000 {
-- compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- reg = <0 0xe6c40000 0 64>;
- interrupt-parent = <&gic>;
- interrupts = <0 144 4>;
-@@ -311,7 +311,7 @@
- };
-
- scifa1: serial@e6c50000 {
-- compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c50000 0 64>;
- interrupts = <0 145 4>;
-@@ -321,7 +321,7 @@
- };
-
- scifa2: serial@e6c60000 {
-- compatible = "renesas,scifa-r8a7790", "renesas,scifa-generic";
-+ compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c60000 0 64>;
- interrupts = <0 151 4>;
-@@ -331,7 +331,7 @@
- };
-
- scifb0: serial@e6c20000 {
-- compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
-+ compatible = "renesas,scifb-r8a7790", "renesas,scifb";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c20000 0 64>;
- interrupts = <0 148 4>;
-@@ -341,7 +341,7 @@
- };
-
- scifb1: serial@e6c30000 {
-- compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
-+ compatible = "renesas,scifb-r8a7790", "renesas,scifb";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c30000 0 64>;
- interrupts = <0 149 4>;
-@@ -351,7 +351,7 @@
- };
-
- scifb2: serial@e6ce0000 {
-- compatible = "renesas,scifb-r8a7790", "renesas,scifb-generic";
-+ compatible = "renesas,scifb-r8a7790", "renesas,scifb";
- interrupt-parent = <&gic>;
- reg = <0 0xe6ce0000 0 64>;
- interrupts = <0 150 4>;
-@@ -361,7 +361,7 @@
- };
-
- scif0: serial@e6e60000 {
-- compatible = "renesas,scif-r8a7790", "renesas,scif-generic";
-+ compatible = "renesas,scif-r8a7790", "renesas,scif";
- interrupt-parent = <&gic>;
- reg = <0 0xe6e60000 0 64>;
- interrupts = <0 152 4>;
-@@ -371,7 +371,7 @@
- };
-
- scif1: serial@e6e68000 {
-- compatible = "renesas,scif-r8a7790", "renesas,scif-generic";
-+ compatible = "renesas,scif-r8a7790", "renesas,scif";
- interrupt-parent = <&gic>;
- reg = <0 0xe6e68000 0 64>;
- interrupts = <0 153 4>;
-@@ -381,7 +381,7 @@
- };
-
- hscif0: serial@e62c0000 {
-- compatible = "renesas,hscif-r8a7790", "renesas,hscif-generic";
-+ compatible = "renesas,hscif-r8a7790", "renesas,hscif";
- interrupt-parent = <&gic>;
- reg = <0 0xe62c0000 0 96>;
- interrupts = <0 154 4>;
-@@ -391,7 +391,7 @@
- };
-
- hscif1: serial@e62c8000 {
-- compatible = "renesas,hscif-r8a7790", "renesas,hscif-generic";
-+ compatible = "renesas,hscif-r8a7790", "renesas,hscif";
- interrupt-parent = <&gic>;
- reg = <0 0xe62c8000 0 96>;
- interrupts = <0 155 4>;
---
-2.1.2
-
diff --git a/patches.renesas/0216-ARM-shmobile-r8a7790-Replace-IRQ-type-numerical-valu.patch b/patches.renesas/0216-ARM-shmobile-r8a7790-Replace-IRQ-type-numerical-valu.patch
deleted file mode 100644
index 6215fd06b5152..0000000000000
--- a/patches.renesas/0216-ARM-shmobile-r8a7790-Replace-IRQ-type-numerical-valu.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From d395353d60021ede96a57c3f195ac8ede98fc430 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 21 Jan 2014 13:48:39 +0100
-Subject: ARM: shmobile: r8a7790: Replace IRQ type numerical values with macros
-
-Replace the hardcoded value 4 with IRQ_TYPE_LEVEL_HIGH.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1f4c745b2c5a083c49dc11d2f0827d9a381f1ee1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 51c897835628..ba0ef9a864c8 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -304,7 +304,7 @@
- compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- reg = <0 0xe6c40000 0 64>;
- interrupt-parent = <&gic>;
-- interrupts = <0 144 4>;
-+ interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -314,7 +314,7 @@
- compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c50000 0 64>;
-- interrupts = <0 145 4>;
-+ interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFA1>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -324,7 +324,7 @@
- compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c60000 0 64>;
-- interrupts = <0 151 4>;
-+ interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFA2>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -334,7 +334,7 @@
- compatible = "renesas,scifb-r8a7790", "renesas,scifb";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c20000 0 64>;
-- interrupts = <0 148 4>;
-+ interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFB0>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -344,7 +344,7 @@
- compatible = "renesas,scifb-r8a7790", "renesas,scifb";
- interrupt-parent = <&gic>;
- reg = <0 0xe6c30000 0 64>;
-- interrupts = <0 149 4>;
-+ interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFB1>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -354,7 +354,7 @@
- compatible = "renesas,scifb-r8a7790", "renesas,scifb";
- interrupt-parent = <&gic>;
- reg = <0 0xe6ce0000 0 64>;
-- interrupts = <0 150 4>;
-+ interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFB2>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -364,7 +364,7 @@
- compatible = "renesas,scif-r8a7790", "renesas,scif";
- interrupt-parent = <&gic>;
- reg = <0 0xe6e60000 0 64>;
-- interrupts = <0 152 4>;
-+ interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_SCIF0>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -374,7 +374,7 @@
- compatible = "renesas,scif-r8a7790", "renesas,scif";
- interrupt-parent = <&gic>;
- reg = <0 0xe6e68000 0 64>;
-- interrupts = <0 153 4>;
-+ interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_SCIF1>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -384,7 +384,7 @@
- compatible = "renesas,hscif-r8a7790", "renesas,hscif";
- interrupt-parent = <&gic>;
- reg = <0 0xe62c0000 0 96>;
-- interrupts = <0 154 4>;
-+ interrupts = <0 154 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_HSCIF0>;
- clock-names = "sci_ick";
- status = "disabled";
-@@ -394,7 +394,7 @@
- compatible = "renesas,hscif-r8a7790", "renesas,hscif";
- interrupt-parent = <&gic>;
- reg = <0 0xe62c8000 0 96>;
-- interrupts = <0 155 4>;
-+ interrupts = <0 155 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_HSCIF1>;
- clock-names = "sci_ick";
- status = "disabled";
---
-2.1.2
-
diff --git a/patches.renesas/0217-ARM-shmobile-Lager-conditionally-select-CONFIG_MICRE.patch b/patches.renesas/0217-ARM-shmobile-Lager-conditionally-select-CONFIG_MICRE.patch
deleted file mode 100644
index 1b1c334b8249f..0000000000000
--- a/patches.renesas/0217-ARM-shmobile-Lager-conditionally-select-CONFIG_MICRE.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 209ee92c33331a4ec858ece05e158b24363f9f47 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Fri, 20 Dec 2013 02:20:54 +0300
-Subject: ARM: shmobile: Lager: conditionally select CONFIG_MICREL_PHY
-
-Now that support for KSZ8041RNLI is added to the Micrel PHY driver and we intend
-to support PHY IRQs on the Lager board, we have to enable the Micrel driver.
-Do this by selecting CONFIG_MICREL_PHY for Lager if CONFIG_SH_ETH is enabled.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a2a4759b5262979cbe4bc1f681ec5a6ab064fce3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 05fa505df585..d99a952cfb11 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -54,6 +54,7 @@ config MACH_KZM9D
- config MACH_LAGER
- bool "Lager board"
- depends on ARCH_R8A7790
-+ select MICREL_PHY if SH_ETH
-
- comment "Renesas ARM SoCs System Configuration"
- endif
-@@ -261,6 +262,7 @@ config MACH_LAGER
- bool "Lager board"
- depends on ARCH_R8A7790
- select USE_OF
-+ select MICREL_PHY if SH_ETH
-
- config MACH_KOELSCH
- bool "Koelsch board"
---
-2.1.2
-
diff --git a/patches.renesas/0218-ARM-shmobile-bockw-use-SSI-DMAEngine-for-sound.patch b/patches.renesas/0218-ARM-shmobile-bockw-use-SSI-DMAEngine-for-sound.patch
deleted file mode 100644
index f9b1924e90ca1..0000000000000
--- a/patches.renesas/0218-ARM-shmobile-bockw-use-SSI-DMAEngine-for-sound.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From f089d31632617d1a1c35561be7716aee07c9be65 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 23 Dec 2013 20:44:15 -0800
-Subject: ARM: shmobile: bockw: use SSI DMAEngine for sound
-
-R-Car sound driver is supporting Mem <-> SSI
-direct transfer via DMAEngine.
-Current HPB-DMA is using double plane transfer,
-but the sound may have noise since SSI doesn't have FIFO.
-This patch supports it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6d0ef79743abd39c1867a7fb9eaccdda0b2136db)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index c475220545f2..bdb78a77e78f 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -332,12 +332,12 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = {
- RSND_SSI_UNUSED, /* SSI 0 */
- RSND_SSI_UNUSED, /* SSI 1 */
- RSND_SSI_UNUSED, /* SSI 2 */
-- RSND_SSI_SET(1, 0, gic_iid(0x85), RSND_SSI_PLAY),
-- RSND_SSI_SET(2, 0, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
-- RSND_SSI_SET(0, 0, gic_iid(0x86), RSND_SSI_PLAY),
-- RSND_SSI_SET(0, 0, gic_iid(0x86), 0),
-- RSND_SSI_SET(3, 0, gic_iid(0x86), RSND_SSI_PLAY),
-- RSND_SSI_SET(4, 0, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI_SET(1, HPBDMA_SLAVE_SSI3_TX, gic_iid(0x85), RSND_SSI_PLAY),
-+ RSND_SSI_SET(2, HPBDMA_SLAVE_SSI4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI_SET(0, HPBDMA_SLAVE_SSI5_TX, gic_iid(0x86), RSND_SSI_PLAY),
-+ RSND_SSI_SET(0, HPBDMA_SLAVE_SSI6_RX, gic_iid(0x86), 0),
-+ RSND_SSI_SET(3, HPBDMA_SLAVE_SSI7_TX, gic_iid(0x86), RSND_SSI_PLAY),
-+ RSND_SSI_SET(4, HPBDMA_SLAVE_SSI8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
- };
-
- static struct rsnd_scu_platform_info rsnd_scu[9] = {
---
-2.1.2
-
diff --git a/patches.renesas/0219-ARM-shmobile-bockw-use-HPBIF-DMAEngine-for-sound.patch b/patches.renesas/0219-ARM-shmobile-bockw-use-HPBIF-DMAEngine-for-sound.patch
deleted file mode 100644
index ab155c61ac3f2..0000000000000
--- a/patches.renesas/0219-ARM-shmobile-bockw-use-HPBIF-DMAEngine-for-sound.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From bd361810671d2919f205f34bf74fe7df91af6314 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 23 Dec 2013 20:44:23 -0800
-Subject: ARM: shmobile: bockw: use HPBIF DMAEngine for sound
-
-R-Car sound driver is supporting Mem <-> SRU <-> SSI
-transfer via DMAEngine.
-The sound will be less noise if it uses SRU path
-since it has FIFO.
-This patch supports it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 88bf7f6846dea22bd50f8abf4c30530bbe2b6424)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 22 +++++++++++++++-------
- 1 file changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index bdb78a77e78f..24b41613eabe 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -332,16 +332,24 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = {
- RSND_SSI_UNUSED, /* SSI 0 */
- RSND_SSI_UNUSED, /* SSI 1 */
- RSND_SSI_UNUSED, /* SSI 2 */
-- RSND_SSI_SET(1, HPBDMA_SLAVE_SSI3_TX, gic_iid(0x85), RSND_SSI_PLAY),
-- RSND_SSI_SET(2, HPBDMA_SLAVE_SSI4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
-- RSND_SSI_SET(0, HPBDMA_SLAVE_SSI5_TX, gic_iid(0x86), RSND_SSI_PLAY),
-- RSND_SSI_SET(0, HPBDMA_SLAVE_SSI6_RX, gic_iid(0x86), 0),
-- RSND_SSI_SET(3, HPBDMA_SLAVE_SSI7_TX, gic_iid(0x86), RSND_SSI_PLAY),
-- RSND_SSI_SET(4, HPBDMA_SLAVE_SSI8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI_SET(1, HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), RSND_SSI_PLAY),
-+ RSND_SSI_SET(2, HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), RSND_SSI_PLAY),
-+ RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0),
-+ RSND_SSI_SET(3, HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), RSND_SSI_PLAY),
-+ RSND_SSI_SET(4, HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
- };
-
- static struct rsnd_scu_platform_info rsnd_scu[9] = {
-- /* no member at this point */
-+ { .flags = 0, }, /* SRU 0 */
-+ { .flags = 0, }, /* SRU 1 */
-+ { .flags = 0, }, /* SRU 2 */
-+ { .flags = RSND_SCU_USE_HPBIF, },
-+ { .flags = RSND_SCU_USE_HPBIF, },
-+ { .flags = RSND_SCU_USE_HPBIF, },
-+ { .flags = RSND_SCU_USE_HPBIF, },
-+ { .flags = RSND_SCU_USE_HPBIF, },
-+ { .flags = RSND_SCU_USE_HPBIF, },
- };
-
- enum {
---
-2.1.2
-
diff --git a/patches.renesas/0220-ARM-shmobile-bockw-add-USB-Func-DMAEngine-support.patch b/patches.renesas/0220-ARM-shmobile-bockw-add-USB-Func-DMAEngine-support.patch
deleted file mode 100644
index eaf2923913e3a..0000000000000
--- a/patches.renesas/0220-ARM-shmobile-bockw-add-USB-Func-DMAEngine-support.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 11f36f546f19bcb16918ac1f55ee863465275a49 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 23 Dec 2013 20:44:30 -0800
-Subject: ARM: shmobile: bockw: add USB Func DMAEngine support
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f3ffa47c8d563d8ea3e378fa59aca5dde9624a01)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index 24b41613eabe..684a529e400d 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -168,6 +168,8 @@ static struct renesas_usbhs_platform_info usbhs_info __initdata = {
- },
- .driver_param = {
- .buswait_bwait = 4,
-+ .d0_tx_id = HPBDMA_SLAVE_USBFUNC_TX,
-+ .d1_rx_id = HPBDMA_SLAVE_USBFUNC_RX,
- },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0221-ARM-shmobile-koelsch-Conditionally-select-MICREL_PHY.patch b/patches.renesas/0221-ARM-shmobile-koelsch-Conditionally-select-MICREL_PHY.patch
deleted file mode 100644
index 9503971ba60df..0000000000000
--- a/patches.renesas/0221-ARM-shmobile-koelsch-Conditionally-select-MICREL_PHY.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 3d981c9883f146b00480026235c2ac6147529d28 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 26 Dec 2013 14:30:38 +0900
-Subject: ARM: shmobile: koelsch: Conditionally select MICREL_PHY for
- Multiplatform
-
-The koelsch board uses has an SH ethernet controller which uses a Micrel
-phy. Select MICREL_PHY for koelsch if SH_ETH is enabled to make use of the
-Micrel-specific phy driver rather than relying on the generic phy driver.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit aefe88ba044bdcd91bc0cd1e75ab2dc524ed5107)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index d99a952cfb11..96ebc05a0d9b 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -45,6 +45,7 @@ config MACH_GENMAI
- config MACH_KOELSCH
- bool "Koelsch board"
- depends on ARCH_R8A7791
-+ select MICREL_PHY if SH_ETH
-
- config MACH_KZM9D
- bool "KZM9D board"
---
-2.1.2
-
diff --git a/patches.renesas/0222-ARM-mach-shmobile-kzm9g-add-zboot-support.patch b/patches.renesas/0222-ARM-mach-shmobile-kzm9g-add-zboot-support.patch
deleted file mode 100644
index bd2033a0cbcfe..0000000000000
--- a/patches.renesas/0222-ARM-mach-shmobile-kzm9g-add-zboot-support.patch
+++ /dev/null
@@ -1,506 +0,0 @@
-From a348afa382f8f4cdff53a20eb4bf549f384e2d1c Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <ulrich.hecht@gmail.com>
-Date: Tue, 26 Nov 2013 21:53:20 +0100
-Subject: ARM: mach-shmobile: kzm9g: add zboot support
-
-Adds support to run the kernel on the uninitialized KZM9G board, using for
-instance the mask ROM boot loader or JTAG. This patch tries to emulate the
-style of the corresponding "mackerel" implementation. The DRAM controller
-setup code has been adapted from u-boot.
-
-Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a56585d12cbe8903dcc71332579b9e2e0807fe44)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/head-kzm9g.txt | 410 +++++++++++++++++++++
- arch/arm/mach-shmobile/include/mach/zboot.h | 3 +
- arch/arm/mach-shmobile/include/mach/zboot_macros.h | 43 +++
- 3 files changed, 456 insertions(+)
- create mode 100644 arch/arm/mach-shmobile/include/mach/head-kzm9g.txt
-
-diff --git a/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt
-new file mode 100644
-index 000000000000..9531f46a822a
---- /dev/null
-+++ b/arch/arm/mach-shmobile/include/mach/head-kzm9g.txt
-@@ -0,0 +1,410 @@
-+LIST "KZM9G low-level initialization routine."
-+LIST "Adapted from u-boot KZM9G support code."
-+
-+LIST "Copyright (C) 2013 Ulrich Hecht"
-+
-+LIST "This program is free software; you can redistribute it and/or modify"
-+LIST "it under the terms of the GNU General Public License version 2 as"
-+LIST "published by the Free Software Foundation."
-+
-+LIST "This program is distributed in the hope that it will be useful,"
-+LIST "but WITHOUT ANY WARRANTY; without even the implied warranty of"
-+LIST "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the"
-+LIST "GNU General Public License for more details."
-+
-+
-+LIST "Register definitions:"
-+
-+LIST "Secure control register"
-+#define LIFEC_SEC_SRC (0xE6110008)
-+
-+LIST "RWDT"
-+#define RWDT_BASE (0xE6020000)
-+#define RWTCSRA0 (RWDT_BASE + 0x04)
-+
-+LIST "HPB Semaphore Control Registers"
-+#define HPBSCR_BASE (0xE6000000)
-+#define HPBCTRL6 (HPBSCR_BASE + 0x1030)
-+
-+#define SBSC1_BASE (0xFE400000)
-+#define SDCR0A (SBSC1_BASE + 0x0008)
-+#define SDCR1A (SBSC1_BASE + 0x000C)
-+#define SDPCRA (SBSC1_BASE + 0x0010)
-+#define SDCR0SA (SBSC1_BASE + 0x0018)
-+#define SDCR1SA (SBSC1_BASE + 0x001C)
-+#define RTCSRA (SBSC1_BASE + 0x0020)
-+#define RTCORA (SBSC1_BASE + 0x0028)
-+#define RTCORHA (SBSC1_BASE + 0x002C)
-+#define SDWCRC0A (SBSC1_BASE + 0x0040)
-+#define SDWCRC1A (SBSC1_BASE + 0x0044)
-+#define SDWCR00A (SBSC1_BASE + 0x0048)
-+#define SDWCR01A (SBSC1_BASE + 0x004C)
-+#define SDWCR10A (SBSC1_BASE + 0x0050)
-+#define SDWCR11A (SBSC1_BASE + 0x0054)
-+#define SDWCR2A (SBSC1_BASE + 0x0060)
-+#define SDWCRC2A (SBSC1_BASE + 0x0064)
-+#define ZQCCRA (SBSC1_BASE + 0x0068)
-+#define SDMRACR0A (SBSC1_BASE + 0x0084)
-+#define SDMRTMPCRA (SBSC1_BASE + 0x008C)
-+#define SDMRTMPMSKA (SBSC1_BASE + 0x0094)
-+#define SDGENCNTA (SBSC1_BASE + 0x009C)
-+#define SDDRVCR0A (SBSC1_BASE + 0x00B4)
-+#define DLLCNT0A (SBSC1_BASE + 0x0354)
-+
-+#define SDMRA1 (0xFE500000)
-+#define SDMRA2 (0xFE5C0000)
-+#define SDMRA3 (0xFE504000)
-+
-+#define SBSC2_BASE (0xFB400000)
-+#define SDCR0B (SBSC2_BASE + 0x0008)
-+#define SDCR1B (SBSC2_BASE + 0x000C)
-+#define SDPCRB (SBSC2_BASE + 0x0010)
-+#define SDCR0SB (SBSC2_BASE + 0x0018)
-+#define SDCR1SB (SBSC2_BASE + 0x001C)
-+#define RTCSRB (SBSC2_BASE + 0x0020)
-+#define RTCORB (SBSC2_BASE + 0x0028)
-+#define RTCORHB (SBSC2_BASE + 0x002C)
-+#define SDWCRC0B (SBSC2_BASE + 0x0040)
-+#define SDWCRC1B (SBSC2_BASE + 0x0044)
-+#define SDWCR00B (SBSC2_BASE + 0x0048)
-+#define SDWCR01B (SBSC2_BASE + 0x004C)
-+#define SDWCR10B (SBSC2_BASE + 0x0050)
-+#define SDWCR11B (SBSC2_BASE + 0x0054)
-+#define SDPDCR0B (SBSC2_BASE + 0x0058)
-+#define SDWCR2B (SBSC2_BASE + 0x0060)
-+#define SDWCRC2B (SBSC2_BASE + 0x0064)
-+#define ZQCCRB (SBSC2_BASE + 0x0068)
-+#define SDMRACR0B (SBSC2_BASE + 0x0084)
-+#define SDMRTMPCRB (SBSC2_BASE + 0x008C)
-+#define SDMRTMPMSKB (SBSC2_BASE + 0x0094)
-+#define SDGENCNTB (SBSC2_BASE + 0x009C)
-+#define DPHYCNT0B (SBSC2_BASE + 0x00A0)
-+#define DPHYCNT1B (SBSC2_BASE + 0x00A4)
-+#define DPHYCNT2B (SBSC2_BASE + 0x00A8)
-+#define SDDRVCR0B (SBSC2_BASE + 0x00B4)
-+#define DLLCNT0B (SBSC2_BASE + 0x0354)
-+
-+#define SDMRB1 (0xFB500000)
-+#define SDMRB2 (0xFB5C0000)
-+#define SDMRB3 (0xFB504000)
-+
-+#define CPG_BASE (0xE6150000)
-+#define FRQCRA (CPG_BASE + 0x0000)
-+#define FRQCRB (CPG_BASE + 0x0004)
-+#define FRQCRD (CPG_BASE + 0x00E4)
-+#define VCLKCR1 (CPG_BASE + 0x0008)
-+#define VCLKCR2 (CPG_BASE + 0x000C)
-+#define VCLKCR3 (CPG_BASE + 0x001C)
-+#define ZBCKCR (CPG_BASE + 0x0010)
-+#define FLCKCR (CPG_BASE + 0x0014)
-+#define SD0CKCR (CPG_BASE + 0x0074)
-+#define SD1CKCR (CPG_BASE + 0x0078)
-+#define SD2CKCR (CPG_BASE + 0x007C)
-+#define FSIACKCR (CPG_BASE + 0x0018)
-+#define SUBCKCR (CPG_BASE + 0x0080)
-+#define SPUACKCR (CPG_BASE + 0x0084)
-+#define SPUVCKCR (CPG_BASE + 0x0094)
-+#define MSUCKCR (CPG_BASE + 0x0088)
-+#define HSICKCR (CPG_BASE + 0x008C)
-+#define FSIBCKCR (CPG_BASE + 0x0090)
-+#define MFCK1CR (CPG_BASE + 0x0098)
-+#define MFCK2CR (CPG_BASE + 0x009C)
-+#define DSITCKCR (CPG_BASE + 0x0060)
-+#define DSI0PCKCR (CPG_BASE + 0x0064)
-+#define DSI1PCKCR (CPG_BASE + 0x0068)
-+#define DSI0PHYCR (CPG_BASE + 0x006C)
-+#define DVFSCR3 (CPG_BASE + 0x0174)
-+#define DVFSCR4 (CPG_BASE + 0x0178)
-+#define DVFSCR5 (CPG_BASE + 0x017C)
-+#define MPMODE (CPG_BASE + 0x00CC)
-+
-+#define PLLECR (CPG_BASE + 0x00D0)
-+#define PLL0CR (CPG_BASE + 0x00D8)
-+#define PLL1CR (CPG_BASE + 0x0028)
-+#define PLL2CR (CPG_BASE + 0x002C)
-+#define PLL3CR (CPG_BASE + 0x00DC)
-+#define PLL0STPCR (CPG_BASE + 0x00F0)
-+#define PLL1STPCR (CPG_BASE + 0x00C8)
-+#define PLL2STPCR (CPG_BASE + 0x00F8)
-+#define PLL3STPCR (CPG_BASE + 0x00FC)
-+#define RMSTPCR0 (CPG_BASE + 0x0110)
-+#define RMSTPCR1 (CPG_BASE + 0x0114)
-+#define RMSTPCR2 (CPG_BASE + 0x0118)
-+#define RMSTPCR3 (CPG_BASE + 0x011C)
-+#define RMSTPCR4 (CPG_BASE + 0x0120)
-+#define RMSTPCR5 (CPG_BASE + 0x0124)
-+#define SMSTPCR0 (CPG_BASE + 0x0130)
-+#define SMSTPCR2 (CPG_BASE + 0x0138)
-+#define SMSTPCR3 (CPG_BASE + 0x013C)
-+#define CPGXXCR4 (CPG_BASE + 0x0150)
-+#define SRCR0 (CPG_BASE + 0x80A0)
-+#define SRCR2 (CPG_BASE + 0x80B0)
-+#define SRCR3 (CPG_BASE + 0x80A8)
-+#define VREFCR (CPG_BASE + 0x00EC)
-+#define PCLKCR (CPG_BASE + 0x1020)
-+
-+#define PORT32CR (0xE6051020)
-+#define PORT33CR (0xE6051021)
-+#define PORT34CR (0xE6051022)
-+#define PORT35CR (0xE6051023)
-+
-+LIST "DRAM initialization code:"
-+
-+EW RWTCSRA0, 0xA507
-+
-+ED_AND LIFEC_SEC_SRC, 0xFFFF7FFF
-+
-+ED_AND SMSTPCR3,0xFFFF7FFF
-+ED_AND SRCR3, 0xFFFF7FFF
-+ED_AND SMSTPCR2,0xFFFBFFFF
-+ED_AND SRCR2, 0xFFFBFFFF
-+ED PLLECR, 0x00000000
-+
-+WAIT_MASK PLLECR, 0x00000F00, 0x00000000
-+WAIT_MASK FRQCRB, 0x80000000, 0x00000000
-+
-+ED PLL0CR, 0x2D000000
-+ED PLL1CR, 0x17100000
-+ED FRQCRB, 0x96235880
-+WAIT_MASK FRQCRB, 0x80000000, 0x00000000
-+
-+ED FLCKCR, 0x0000000B
-+ED_AND SMSTPCR0, 0xFFFFFFFD
-+
-+ED_AND SRCR0, 0xFFFFFFFD
-+ED 0xE6001628, 0x514
-+ED 0xE6001648, 0x514
-+ED 0xE6001658, 0x514
-+ED 0xE6001678, 0x514
-+
-+ED DVFSCR4, 0x00092000
-+ED DVFSCR5, 0x000000DC
-+ED PLLECR, 0x00000000
-+WAIT_MASK PLLECR, 0x00000F00, 0x00000000
-+
-+ED FRQCRA, 0x0012453C
-+ED FRQCRB, 0x80431350
-+WAIT_MASK FRQCRB, 0x80000000, 0x00000000
-+ED FRQCRD, 0x00000B0B
-+WAIT_MASK FRQCRD, 0x80000000, 0x00000000
-+
-+ED PCLKCR, 0x00000003
-+ED VCLKCR1, 0x0000012F
-+ED VCLKCR2, 0x00000119
-+ED VCLKCR3, 0x00000119
-+ED ZBCKCR, 0x00000002
-+ED FLCKCR, 0x00000005
-+ED SD0CKCR, 0x00000080
-+ED SD1CKCR, 0x00000080
-+ED SD2CKCR, 0x00000080
-+ED FSIACKCR, 0x0000003F
-+ED FSIBCKCR, 0x0000003F
-+ED SUBCKCR, 0x00000080
-+ED SPUACKCR, 0x0000000B
-+ED SPUVCKCR, 0x0000000B
-+ED MSUCKCR, 0x0000013F
-+ED HSICKCR, 0x00000080
-+ED MFCK1CR, 0x0000003F
-+ED MFCK2CR, 0x0000003F
-+ED DSITCKCR, 0x00000107
-+ED DSI0PCKCR, 0x00000313
-+ED DSI1PCKCR, 0x0000130D
-+ED DSI0PHYCR, 0x2A800E0E
-+ED PLL0CR, 0x1E000000
-+ED PLL0CR, 0x2D000000
-+ED PLL1CR, 0x17100000
-+ED PLL2CR, 0x27000080
-+ED PLL3CR, 0x1D000000
-+ED PLL0STPCR, 0x00080000
-+ED PLL1STPCR, 0x000120C0
-+ED PLL2STPCR, 0x00012000
-+ED PLL3STPCR, 0x00000030
-+ED PLLECR, 0x0000000B
-+WAIT_MASK PLLECR, 0x00000B00, 0x00000B00
-+
-+ED DVFSCR3, 0x000120F0
-+ED MPMODE, 0x00000020
-+ED VREFCR, 0x0000028A
-+ED RMSTPCR0, 0xE4628087
-+ED RMSTPCR1, 0xFFFFFFFF
-+ED RMSTPCR2, 0x53FFFFFF
-+ED RMSTPCR3, 0xFFFFFFFF
-+ED RMSTPCR4, 0x00800D3D
-+ED RMSTPCR5, 0xFFFFF3FF
-+ED SMSTPCR2, 0x00000000
-+ED SRCR2, 0x00040000
-+ED_AND PLLECR, 0xFFFFFFF7
-+WAIT_MASK PLLECR, 0x00000800, 0x00000000
-+
-+LIST "set SBSC operational"
-+ED HPBCTRL6, 0x00000001
-+WAIT_MASK HPBCTRL6, 0x00000001, 0x00000001
-+
-+LIST "set SBSC operating frequency"
-+ED FRQCRD, 0x00001414
-+WAIT_MASK FRQCRD, 0x80000000, 0x00000000
-+ED PLL3CR, 0x1D000000
-+ED_OR PLLECR, 0x00000008
-+WAIT_MASK PLLECR, 0x00000800, 0x00000800
-+
-+LIST "enable DLL oscillation in DDRPHY"
-+ED_OR DLLCNT0A, 0x00000002
-+
-+LIST "wait >= 100 ns"
-+ED SDGENCNTA, 0x00000005
-+WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000
-+
-+LIST "target LPDDR2 device settings"
-+ED SDCR0A, 0xACC90159
-+ED SDCR1A, 0x00010059
-+ED SDWCRC0A, 0x50874114
-+ED SDWCRC1A, 0x33199B37
-+ED SDWCRC2A, 0x008F2313
-+ED SDWCR00A, 0x31020707
-+ED SDWCR01A, 0x0017040A
-+ED SDWCR10A, 0x31020707
-+ED SDWCR11A, 0x0017040A
-+
-+ED SDDRVCR0A, 0x055557ff
-+
-+ED SDWCR2A, 0x30000000
-+
-+LIST "drive CKE high"
-+ED_OR SDPCRA, 0x00000080
-+WAIT_MASK SDPCRA, 0x00000080, 0x00000080
-+
-+LIST "wait >= 200 us"
-+ED SDGENCNTA, 0x00002710
-+WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000
-+
-+LIST "issue reset command to LPDDR2 device"
-+ED SDMRACR0A, 0x0000003F
-+ED SDMRA1, 0x00000000
-+
-+LIST "wait >= 10 (or 1) us (docs inconsistent)"
-+ED SDGENCNTA, 0x000001F4
-+WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000
-+
-+LIST "MRW ZS initialization calibration command"
-+ED SDMRACR0A, 0x0000FF0A
-+ED SDMRA3, 0x00000000
-+
-+LIST "wait >= 1 us"
-+ED SDGENCNTA, 0x00000032
-+WAIT_MASK SDGENCNTA, 0xFFFFFFFF, 0x00000000
-+
-+LIST "specify operating mode in LPDDR2"
-+ED SDMRACR0A, 0x00002201
-+ED SDMRA1, 0x00000000
-+ED SDMRACR0A, 0x00000402
-+ED SDMRA1, 0x00000000
-+ED SDMRACR0A, 0x00000203
-+ED SDMRA1, 0x00000000
-+
-+LIST "initialize DDR interface"
-+ED SDMRA2, 0x00000000
-+
-+LIST "temperature sensor control"
-+ED SDMRTMPCRA, 0x88800004
-+ED SDMRTMPMSKA,0x00000004
-+
-+LIST "auto-refreshing control"
-+ED RTCORA, 0xA55A0032
-+ED RTCORHA, 0xA55A000C
-+ED RTCSRA, 0xA55A2048
-+
-+ED_OR SDCR0A, 0x00000800
-+ED_OR SDCR1A, 0x00000400
-+
-+LIST "auto ZQ calibration control"
-+ED ZQCCRA, 0xFFF20000
-+
-+ED_OR DLLCNT0B, 0x00000002
-+ED SDGENCNTB, 0x00000005
-+WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000
-+
-+ED SDCR0B, 0xACC90159
-+ED SDCR1B, 0x00010059
-+ED SDWCRC0B, 0x50874114
-+ED SDWCRC1B, 0x33199B37
-+ED SDWCRC2B, 0x008F2313
-+ED SDWCR00B, 0x31020707
-+ED SDWCR01B, 0x0017040A
-+ED SDWCR10B, 0x31020707
-+ED SDWCR11B, 0x0017040A
-+ED SDDRVCR0B, 0x055557ff
-+ED SDWCR2B, 0x30000000
-+ED_OR SDPCRB, 0x00000080
-+WAIT_MASK SDPCRB, 0x00000080, 0x00000080
-+
-+ED SDGENCNTB, 0x00002710
-+WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000
-+ED SDMRACR0B, 0x0000003F
-+
-+LIST "upstream u-boot writes to SDMRA1A for both SBSC 1 and 2, which does"
-+LIST "not seem to make a lot of sense..."
-+ED SDMRB1, 0x00000000
-+
-+ED SDGENCNTB, 0x000001F4
-+WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000
-+
-+ED SDMRACR0B, 0x0000FF0A
-+ED SDMRB3, 0x00000000
-+ED SDGENCNTB, 0x00000032
-+WAIT_MASK SDGENCNTB, 0xFFFFFFFF, 0x00000000
-+
-+ED SDMRACR0B, 0x00002201
-+ED SDMRB1, 0x00000000
-+ED SDMRACR0B, 0x00000402
-+ED SDMRB1, 0x00000000
-+ED SDMRACR0B, 0x00000203
-+ED SDMRB1, 0x00000000
-+ED SDMRB2, 0x00000000
-+ED SDMRTMPCRB, 0x88800004
-+ED SDMRTMPMSKB, 0x00000004
-+ED RTCORB, 0xA55A0032
-+ED RTCORHB, 0xA55A000C
-+ED RTCSRB, 0xA55A2048
-+ED_OR SDCR0B, 0x00000800
-+ED_OR SDCR1B, 0x00000400
-+ED ZQCCRB, 0xFFF20000
-+ED_OR SDPDCR0B, 0x00030000
-+ED DPHYCNT1B, 0xA5390000
-+ED DPHYCNT0B, 0x00001200
-+ED DPHYCNT1B, 0x07CE0000
-+ED DPHYCNT0B, 0x00001247
-+WAIT_MASK DPHYCNT2B, 0xFFFFFFFF, 0x07CE0000
-+
-+ED_AND SDPDCR0B, 0xFFFCFFFF
-+
-+ED FRQCRD, 0x00000B0B
-+WAIT_MASK FRQCRD, 0x80000000, 0x00000000
-+
-+ED CPGXXCR4, 0xfffffffc
-+
-+LIST "Setup SCIF4 / workaround"
-+EB PORT32CR, 0x12
-+EB PORT33CR, 0x22
-+EB PORT34CR, 0x12
-+EB PORT35CR, 0x22
-+
-+EW 0xE6C80000, 0
-+EB 0xE6C80004, 0x19
-+EW 0xE6C80008, 0x0030
-+EW 0xE6C80018, 0
-+EW 0xE6C80030, 0x0014
-+
-+LIST "Magic to avoid hangs and corruption on DRAM writes."
-+
-+LIST "It has been observed that the system would most often hang while"
-+LIST "decompressing the kernel, and if it didn't it would always write"
-+LIST "a corrupt image to DRAM."
-+LIST "This problem does not occur in u-boot, and the reason is that"
-+LIST "u-boot performs an additional cache invalidation after setting up"
-+LIST "the DRAM controller. Such an invalidation should not be necessary at"
-+LIST "this point, and attempts at removing parts of the routine to arrive"
-+LIST "at the minimal snippet of code necessary to avoid the DRAM stability"
-+LIST "problem yielded the following:"
-+
-+MRC p15, 0, r0, c1, c0, 0
-+MCR p15, 0, r0, c1, c0, 0
-diff --git a/arch/arm/mach-shmobile/include/mach/zboot.h b/arch/arm/mach-shmobile/include/mach/zboot.h
-index c3c4669a2d72..727cc78ac8ec 100644
---- a/arch/arm/mach-shmobile/include/mach/zboot.h
-+++ b/arch/arm/mach-shmobile/include/mach/zboot.h
-@@ -12,6 +12,9 @@
- #ifdef CONFIG_MACH_MACKEREL
- #define MEMORY_START 0x40000000
- #include "mach/head-mackerel.txt"
-+#elif defined(CONFIG_MACH_KZM9G) || defined(CONFIG_MACH_KZM9G_REFERENCE)
-+#define MEMORY_START 0x43000000
-+#include "mach/head-kzm9g.txt"
- #else
- #error "unsupported board."
- #endif
-diff --git a/arch/arm/mach-shmobile/include/mach/zboot_macros.h b/arch/arm/mach-shmobile/include/mach/zboot_macros.h
-index aa6111fbc989..14fd3d538e9a 100644
---- a/arch/arm/mach-shmobile/include/mach/zboot_macros.h
-+++ b/arch/arm/mach-shmobile/include/mach/zboot_macros.h
-@@ -62,4 +62,47 @@
- 2 :
- .endm
-
-+/* loop until a given value has been read (with mask) */
-+.macro WAIT_MASK, addr, data, cmp
-+ LDR r0, 2f
-+ LDR r1, 3f
-+ LDR r2, 4f
-+1:
-+ LDR r3, [r0, #0]
-+ AND r3, r1, r3
-+ CMP r2, r3
-+ BNE 1b
-+ B 5f
-+2: .long \addr
-+3: .long \data
-+4: .long \cmp
-+5:
-+.endm
-+
-+/* read 32-bit value from addr, "or" an immediate and write back */
-+.macro ED_OR, addr, data
-+ LDR r4, 1f
-+ LDR r5, 2f
-+ LDR r6, [r4]
-+ ORR r5, r6, r5
-+ STR r5, [r4]
-+ B 3f
-+1: .long \addr
-+2: .long \data
-+3:
-+.endm
-+
-+/* read 32-bit value from addr, "and" an immediate and write back */
-+.macro ED_AND, addr, data
-+ LDR r4, 1f
-+ LDR r5, 2f
-+ LDR r6, [r4]
-+ AND r5, r6, r5
-+ STR r5, [r4]
-+ B 3f
-+1: .long \addr
-+2: .long \data
-+3:
-+.endm
-+
- #endif /* __ZBOOT_MACRO_H */
---
-2.1.2
-
diff --git a/patches.renesas/0223-ARM-shmobile-lager-Add-VIN1-SoC-camera-support.patch b/patches.renesas/0223-ARM-shmobile-lager-Add-VIN1-SoC-camera-support.patch
deleted file mode 100644
index 32a42564e26a9..0000000000000
--- a/patches.renesas/0223-ARM-shmobile-lager-Add-VIN1-SoC-camera-support.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From f9511459c1288c40f860520b8df6b85f0a95482a Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Fri, 27 Dec 2013 15:44:04 +0400
-Subject: ARM: shmobile: lager: Add VIN1 SoC camera support
-
-This adds VIN1 SoC camera along with ADV7180 subdevice support to Lager.
-VIN0 camera is not registered because it has ADV7612 I2C subdevice
-which is not supported yet.
-
-Changes in V2:
-* made lager_add_vin_device function static.
-
-Changes in V3:
-* capitalized ARM in the subject.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 094a804aa6943de0e9939e1c48341e87be93b3d2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 76 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 76 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index f20c10a18543..c5643e1d647a 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -27,6 +27,7 @@
- #include <linux/mmc/host.h>
- #include <linux/mmc/sh_mmcif.h>
- #include <linux/pinctrl/machine.h>
-+#include <linux/platform_data/camera-rcar.h>
- #include <linux/platform_data/gpio-rcar.h>
- #include <linux/platform_data/rcar-du.h>
- #include <linux/platform_device.h>
-@@ -39,6 +40,7 @@
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/r8a7790.h>
-+#include <media/soc_camera.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <linux/mtd/partitions.h>
-@@ -291,6 +293,62 @@ static const struct resource qspi_resources[] __initconst = {
- DEFINE_RES_IRQ(gic_spi(184)),
- };
-
-+/* VIN */
-+static const struct resource vin_resources[] __initconst = {
-+ /* VIN0 */
-+ DEFINE_RES_MEM(0xe6ef0000, 0x1000),
-+ DEFINE_RES_IRQ(gic_spi(188)),
-+ /* VIN1 */
-+ DEFINE_RES_MEM(0xe6ef1000, 0x1000),
-+ DEFINE_RES_IRQ(gic_spi(189)),
-+};
-+
-+static void __init lager_add_vin_device(unsigned idx,
-+ struct rcar_vin_platform_data *pdata)
-+{
-+ struct platform_device_info vin_info = {
-+ .parent = &platform_bus,
-+ .name = "r8a7790-vin",
-+ .id = idx,
-+ .res = &vin_resources[idx * 2],
-+ .num_res = 2,
-+ .dma_mask = DMA_BIT_MASK(32),
-+ .data = pdata,
-+ .size_data = sizeof(*pdata),
-+ };
-+
-+ BUG_ON(idx > 1);
-+
-+ platform_device_register_full(&vin_info);
-+}
-+
-+#define LAGER_CAMERA(idx, name, addr, pdata, flag) \
-+static struct i2c_board_info i2c_cam##idx##_device = { \
-+ I2C_BOARD_INFO(name, addr), \
-+}; \
-+ \
-+static struct rcar_vin_platform_data vin##idx##_pdata = { \
-+ .flags = flag, \
-+}; \
-+ \
-+static struct soc_camera_link cam##idx##_link = { \
-+ .bus_id = idx, \
-+ .board_info = &i2c_cam##idx##_device, \
-+ .i2c_adapter_id = 2, \
-+ .module_name = name, \
-+ .priv = pdata, \
-+}
-+
-+/* Camera 0 is not currently supported due to adv7612 support missing */
-+LAGER_CAMERA(1, "adv7180", 0x20, NULL, RCAR_VIN_BT656);
-+
-+static void __init lager_add_camera1_device(void)
-+{
-+ platform_device_register_data(&platform_bus, "soc-camera-pdrv", 1,
-+ &cam1_link, sizeof(cam1_link));
-+ lager_add_vin_device(1, &vin1_pdata);
-+}
-+
- static const struct pinctrl_map lager_pinctrl_map[] = {
- /* DU (CN10: ARGB0, CN13: LVDS) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
-@@ -319,6 +377,22 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- "eth_rmii", "eth"),
- PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-ether", "pfc-r8a7790",
- "intc_irq0", "intc"),
-+ /* VIN0 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790",
-+ "vin0_data24", "vin0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790",
-+ "vin0_sync", "vin0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790",
-+ "vin0_field", "vin0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790",
-+ "vin0_clkenb", "vin0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.0", "pfc-r8a7790",
-+ "vin0_clk", "vin0"),
-+ /* VIN1 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.1", "pfc-r8a7790",
-+ "vin1_data8", "vin1"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.1", "pfc-r8a7790",
-+ "vin1_clk", "vin1"),
- };
-
- static void __init lager_add_standard_devices(void)
-@@ -368,6 +442,8 @@ static void __init lager_add_standard_devices(void)
- &vccq_sdhi0_info, sizeof(struct gpio_regulator_config));
- platform_device_register_data(&platform_bus, "gpio-regulator", gpio_regulator_idx++,
- &vccq_sdhi2_info, sizeof(struct gpio_regulator_config));
-+
-+ lager_add_camera1_device();
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0224-ARM-shmobile-kzm9d-Use-common-clock-framework.patch b/patches.renesas/0224-ARM-shmobile-kzm9d-Use-common-clock-framework.patch
deleted file mode 100644
index 51636a937ad8c..0000000000000
--- a/patches.renesas/0224-ARM-shmobile-kzm9d-Use-common-clock-framework.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2ce7cca86459fb56b33451ab0a3076242c4f353a Mon Sep 17 00:00:00 2001
-From: Takashi Yoshii <takasi-y@ops.dti.ne.jp>
-Date: Tue, 8 Oct 2013 14:34:03 +0900
-Subject: ARM: shmobile: kzm9d: Use common clock framework
-
-Use common clock framework version of clock
- drivers/clk/shmobile/clk-emev2.c
-instead of sh-clkfwk version
- arch/arm/mach-shmobile/clock-emev2.c
-when it is configured as a part of multi-platform.
-
-Signed-off-by: Takashi Yoshii <takasi-y@ops.dti.ne.jp>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ef5ecd1f20de2d1919714f029f5016bf6d061e66)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-kzm9d-reference.c | 5 ++---
- 1 file changed, 2 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c
-index 054d8d5c8fc1..853003c8988a 100644
---- a/arch/arm/mach-shmobile/board-kzm9d-reference.c
-+++ b/arch/arm/mach-shmobile/board-kzm9d-reference.c
-@@ -20,15 +20,14 @@
-
- #include <linux/init.h>
- #include <linux/of_platform.h>
-+#include <linux/clk-provider.h>
- #include <mach/emev2.h>
- #include <mach/common.h>
- #include <asm/mach/arch.h>
-
- static void __init kzm9d_add_standard_devices(void)
- {
-- if (!IS_ENABLED(CONFIG_COMMON_CLK))
-- emev2_clock_init();
--
-+ of_clk_init(NULL);
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0225-ARM-shmobile-lager-Make-spi_flash_data-const.patch b/patches.renesas/0225-ARM-shmobile-lager-Make-spi_flash_data-const.patch
deleted file mode 100644
index 8b681169b7604..0000000000000
--- a/patches.renesas/0225-ARM-shmobile-lager-Make-spi_flash_data-const.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 5d1b0b6919a209bf614cd632c959f86d571ff9a4 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 3 Jan 2014 16:48:48 +0100
-Subject: ARM: shmobile: lager: Make spi_flash_data const
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d422c451a9795c7a10c3ae1ab7ca87ce7518546b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index c5643e1d647a..aa8f1d915865 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -265,7 +265,7 @@ static struct mtd_partition spi_flash_part[] = {
- },
- };
-
--static struct flash_platform_data spi_flash_data = {
-+static const struct flash_platform_data spi_flash_data = {
- .name = "m25p80",
- .parts = spi_flash_part,
- .nr_parts = ARRAY_SIZE(spi_flash_part),
---
-2.1.2
-
diff --git a/patches.renesas/0226-ARM-shmobile-lager-Add-SATA-support.patch b/patches.renesas/0226-ARM-shmobile-lager-Add-SATA-support.patch
deleted file mode 100644
index 8a6fdffd6c796..0000000000000
--- a/patches.renesas/0226-ARM-shmobile-lager-Add-SATA-support.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From d1b57a4fa24216294e160b0b4f38b0707e57794f Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Thu, 19 Dec 2013 21:57:23 +0400
-Subject: ARM: shmobile: lager: Add SATA support
-
-This adds SATA support to Lager board. Only SATA1 port is available.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: resolved trivial conflicts]
-[horms+renesas@verge.net.au: capitalised "ARM" in subject]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 1e0d2c495316862fa3da73150ee86ba30c9faf0c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index aa8f1d915865..8dde4462f600 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -349,6 +349,21 @@ static void __init lager_add_camera1_device(void)
- lager_add_vin_device(1, &vin1_pdata);
- }
-
-+/* SATA1 */
-+static const struct resource sata1_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xee500000, 0x2000),
-+ DEFINE_RES_IRQ(gic_spi(106)),
-+};
-+
-+static const struct platform_device_info sata1_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "sata-r8a7790",
-+ .id = 1,
-+ .res = sata1_resources,
-+ .num_res = ARRAY_SIZE(sata1_resources),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
- static const struct pinctrl_map lager_pinctrl_map[] = {
- /* DU (CN10: ARGB0, CN13: LVDS) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
-@@ -444,6 +459,8 @@ static void __init lager_add_standard_devices(void)
- &vccq_sdhi2_info, sizeof(struct gpio_regulator_config));
-
- lager_add_camera1_device();
-+
-+ platform_device_register_full(&sata1_info);
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0227-ARM-shmobile-koelsch-Add-SATA0-support.patch b/patches.renesas/0227-ARM-shmobile-koelsch-Add-SATA0-support.patch
deleted file mode 100644
index 2073dfc54e085..0000000000000
--- a/patches.renesas/0227-ARM-shmobile-koelsch-Add-SATA0-support.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From fc32ac31759f9a319b399f1d82169c36462c5cbd Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Thu, 9 Jan 2014 19:23:22 +0400
-Subject: ARM: shmobile: koelsch: Add SATA0 support
-
-This adds SATA0 support to Koelsch board.
-SATA1 is not available since its pinmux
-configuration is fixed to PCIe.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4fc0a0b93f178c0b077201ab70a53e1be6a69054)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index de7cc64b1f37..2ab5c75ba2c2 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -148,6 +148,21 @@ static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = {
- .nbuttons = ARRAY_SIZE(gpio_buttons),
- };
-
-+/* SATA0 */
-+static const struct resource sata0_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xee300000, 0x2000),
-+ DEFINE_RES_IRQ(gic_spi(105)),
-+};
-+
-+static const struct platform_device_info sata0_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "sata-r8a7791",
-+ .id = 0,
-+ .res = sata0_resources,
-+ .num_res = ARRAY_SIZE(sata0_resources),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
- static const struct pinctrl_map koelsch_pinctrl_map[] = {
- /* DU */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
-@@ -192,6 +207,8 @@ static void __init koelsch_add_standard_devices(void)
- sizeof(koelsch_keys_pdata));
-
- koelsch_add_du_device();
-+
-+ platform_device_register_full(&sata0_info);
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0228-ARM-shmobile-ape6evm-Conditionally-select-SMSC_PHY.patch b/patches.renesas/0228-ARM-shmobile-ape6evm-Conditionally-select-SMSC_PHY.patch
deleted file mode 100644
index 130a22a6b7b26..0000000000000
--- a/patches.renesas/0228-ARM-shmobile-ape6evm-Conditionally-select-SMSC_PHY.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 97ea497808fda65d694c22abe57c1e625024c63a Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 7 Jan 2014 15:23:47 +0900
-Subject: ARM: shmobile: ape6evm: Conditionally select SMSC_PHY
-
-The ape6evm board uses has an SMSC911X ethernet controller which uses an
-SMSC phy. Select SMSC_PHY for ape6evm if SMSC911X is enabled to make use of the
-SMSC-specific phy driver rather than relying on the generic phy driver.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9edaca863ea6807aca7bb8aa5c7791f7387f6022)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 96ebc05a0d9b..2fbdf53809b0 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -156,11 +156,13 @@ comment "Renesas ARM SoCs Board Type"
- config MACH_APE6EVM
- bool "APE6EVM board"
- depends on ARCH_R8A73A4
-+ select SMSC_PHY if SMSC911X
- select USE_OF
-
- config MACH_APE6EVM_REFERENCE
- bool "APE6EVM board - Reference Device Tree Implementation"
- depends on ARCH_R8A73A4
-+ select SMSC_PHY if SMSC911X
- select USE_OF
- ---help---
- Use reference implementation of APE6EVM board support
---
-2.1.2
-
diff --git a/patches.renesas/0229-ARM-shmobile-armadillo800eva-Conditionally-select-SM.patch b/patches.renesas/0229-ARM-shmobile-armadillo800eva-Conditionally-select-SM.patch
deleted file mode 100644
index 42f78f8527272..0000000000000
--- a/patches.renesas/0229-ARM-shmobile-armadillo800eva-Conditionally-select-SM.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 8dfbca9b5cd32182d5f2bfcdf1c4a8da1b00264f Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 7 Jan 2014 15:55:49 +0900
-Subject: ARM: shmobile: armadillo800eva: Conditionally select SMSC_PHY
-
-The armadillo800eva board uses has an SH ethernet controller which uses an
-SMSC phy. Select SMSC_PHY for koelsch if SH_ETH is enabled to make use of the
-SMSC-specific phy driver rather than relying on the generic phy driver.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6a517b114d007a35fc264ef16b09db35548f0290)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 2fbdf53809b0..be7aec02be30 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -184,6 +184,7 @@ config MACH_ARMADILLO800EVA
- depends on ARCH_R8A7740
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+ select SMSC_PHY if SH_ETH
- select SND_SOC_WM8978 if SND_SIMPLE_CARD
- select USE_OF
-
-@@ -192,6 +193,7 @@ config MACH_ARMADILLO800EVA_REFERENCE
- depends on ARCH_R8A7740
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+ select SMSC_PHY if SH_ETH
- select SND_SOC_WM8978 if SND_SIMPLE_CARD
- select USE_OF
- ---help---
---
-2.1.2
-
diff --git a/patches.renesas/0230-ARM-shmobile-bockw-Sort-Kconfig-node-s-selections.patch b/patches.renesas/0230-ARM-shmobile-bockw-Sort-Kconfig-node-s-selections.patch
deleted file mode 100644
index cc71aedfbf2d9..0000000000000
--- a/patches.renesas/0230-ARM-shmobile-bockw-Sort-Kconfig-node-s-selections.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 506dd28366213f8f3455c98ae0f8f464dd42038f Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 7 Jan 2014 16:40:32 +0900
-Subject: ARM: shmobile: bockw: Sort Kconfig node's selections
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2b2fd2755182d43e149259330c7b1fe0aa3243d6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index be7aec02be30..055b0b819719 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -207,11 +207,11 @@ config MACH_BOCKW
- bool "BOCK-W platform"
- depends on ARCH_R8A7778
- select ARCH_REQUIRE_GPIOLIB
-- select RENESAS_INTC_IRQPIN
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-- select USE_OF
-+ select RENESAS_INTC_IRQPIN
- select SND_SOC_AK4554 if SND_SIMPLE_CARD
- select SND_SOC_AK4642 if SND_SIMPLE_CARD
-+ select USE_OF
-
- config MACH_BOCKW_REFERENCE
- bool "BOCK-W - Reference Device Tree Implementation"
---
-2.1.2
-
diff --git a/patches.renesas/0231-ARM-shmobile-r8a7779-Wait-for-status-on-selected-MST.patch b/patches.renesas/0231-ARM-shmobile-r8a7779-Wait-for-status-on-selected-MST.patch
deleted file mode 100644
index 59172ecf63e0c..0000000000000
--- a/patches.renesas/0231-ARM-shmobile-r8a7779-Wait-for-status-on-selected-MST.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 2632c11ee1416998150d68f9bfc21ae05d0c8970 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Date: Sat, 14 Dec 2013 16:23:52 +0100
-Subject: ARM: shmobile: r8a7779: Wait for status on selected MSTP clocks
-
-When enabling some of the module clocks by clearing stop bits in the
-MSTP control registers, the CPG requires waiting for the status
-registers to signal that the clocks have started. Failure to do so will
-result in returning from the clk_enable() call with the clock
-potentially still disabled, leading to various race conditions and
-difficult to debug errors.
-
-Enable status wait for all the r8a7779 MSTP clocks that report their
-status.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 017410f686b8d9928ce30e4eb146175ea672f4c9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7779.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index f1fb89b76786..93a562531d53 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -127,16 +127,16 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP322] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 22, 0), /* SDHI1 */
- [MSTP321] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 21, 0), /* SDHI2 */
- [MSTP320] = SH_CLK_MSTP32(&clkp_clk, MSTPCR3, 20, 0), /* SDHI3 */
-- [MSTP120] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 20, 0), /* VIN3 */
-- [MSTP116] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 16, 0), /* PCIe */
-- [MSTP115] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 15, 0), /* SATA */
-- [MSTP114] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 14, 0), /* Ether */
-- [MSTP110] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 10, 0), /* VIN0 */
-- [MSTP109] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 9, 0), /* VIN1 */
-- [MSTP108] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 8, 0), /* VIN2 */
-- [MSTP103] = SH_CLK_MSTP32(&clks_clk, MSTPCR1, 3, 0), /* DU */
-- [MSTP101] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 1, 0), /* USB2 */
-- [MSTP100] = SH_CLK_MSTP32(&clkp_clk, MSTPCR1, 0, 0), /* USB0/1 */
-+ [MSTP120] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 20, MSTPSR1, 0), /* VIN3 */
-+ [MSTP116] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 16, MSTPSR1, 0), /* PCIe */
-+ [MSTP115] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 15, MSTPSR1, 0), /* SATA */
-+ [MSTP114] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 14, MSTPSR1, 0), /* Ether */
-+ [MSTP110] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 10, MSTPSR1, 0), /* VIN0 */
-+ [MSTP109] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 9, MSTPSR1, 0), /* VIN1 */
-+ [MSTP108] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 8, MSTPSR1, 0), /* VIN2 */
-+ [MSTP103] = SH_CLK_MSTP32_STS(&clks_clk, MSTPCR1, 3, MSTPSR1, 0), /* DU */
-+ [MSTP101] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 1, MSTPSR1, 0), /* USB2 */
-+ [MSTP100] = SH_CLK_MSTP32_STS(&clkp_clk, MSTPCR1, 0, MSTPSR1, 0), /* USB0/1 */
- [MSTP030] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 30, 0), /* I2C0 */
- [MSTP029] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 29, 0), /* I2C1 */
- [MSTP028] = SH_CLK_MSTP32(&clkp_clk, MSTPCR0, 28, 0), /* I2C2 */
---
-2.1.2
-
diff --git a/patches.renesas/0232-ARM-shmobile-r8a7790-Wait-for-status-on-all-MSTP-clo.patch b/patches.renesas/0232-ARM-shmobile-r8a7790-Wait-for-status-on-all-MSTP-clo.patch
deleted file mode 100644
index e9265fd029b9e..0000000000000
--- a/patches.renesas/0232-ARM-shmobile-r8a7790-Wait-for-status-on-all-MSTP-clo.patch
+++ /dev/null
@@ -1,158 +0,0 @@
-From a8c1317bc014c63db7eca0f52020891653bcc71b Mon Sep 17 00:00:00 2001
-From: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
-Date: Sat, 14 Dec 2013 16:23:53 +0100
-Subject: ARM: shmobile: r8a7790: Wait for status on all MSTP clocks
-
-When enabling a module clock by clearing its bit in the MSTP control
-register, the CPG requires waiting for the status register to signal
-that the clock has started. Failure to do so will result in returning
-from the clk_enable() call with the clock potentially still disabled,
-leading to various race conditions and difficult to debug errors.
-
-Enable status wait for all MSTP clocks on the r8a7790.
-
-Signed-off-by: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit cb9ec3adf882688831cdc9e7b84bb388f215f8ce)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 115 ++++++++++++++++++---------------
- 1 file changed, 62 insertions(+), 53 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index f44987a92ad4..a028f96ad1b0 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -43,17 +43,26 @@
- * see "p1 / 2" on R8A7790_CLOCK_ROOT() below
- */
-
--#define CPG_BASE 0xe6150000
--#define CPG_LEN 0x1000
--
--#define SMSTPCR1 0xe6150134
--#define SMSTPCR2 0xe6150138
--#define SMSTPCR3 0xe615013c
--#define SMSTPCR5 0xe6150144
--#define SMSTPCR7 0xe615014c
--#define SMSTPCR8 0xe6150990
--#define SMSTPCR9 0xe6150994
--#define SMSTPCR10 0xe6150998
-+#define CPG_BASE 0xe6150000
-+#define CPG_LEN 0x1000
-+
-+#define SMSTPCR1 0xe6150134
-+#define SMSTPCR2 0xe6150138
-+#define SMSTPCR3 0xe615013c
-+#define SMSTPCR5 0xe6150144
-+#define SMSTPCR7 0xe615014c
-+#define SMSTPCR8 0xe6150990
-+#define SMSTPCR9 0xe6150994
-+#define SMSTPCR10 0xe6150998
-+
-+#define MSTPSR1 IOMEM(0xe6150038)
-+#define MSTPSR2 IOMEM(0xe6150040)
-+#define MSTPSR3 IOMEM(0xe6150048)
-+#define MSTPSR5 IOMEM(0xe615003c)
-+#define MSTPSR7 IOMEM(0xe61501c4)
-+#define MSTPSR8 IOMEM(0xe61509a0)
-+#define MSTPSR9 IOMEM(0xe61509a4)
-+#define MSTPSR10 IOMEM(0xe61509a8)
-
- #define SDCKCR 0xE6150074
- #define SD2CKCR 0xE6150078
-@@ -199,48 +208,48 @@ enum {
- };
-
- static struct clk mstp_clks[MSTP_NR] = {
-- [MSTP1015] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 15, 0), /* SSI0 */
-- [MSTP1014] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 14, 0), /* SSI1 */
-- [MSTP1013] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 13, 0), /* SSI2 */
-- [MSTP1012] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 12, 0), /* SSI3 */
-- [MSTP1011] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 11, 0), /* SSI4 */
-- [MSTP1010] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 10, 0), /* SSI5 */
-- [MSTP1009] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 9, 0), /* SSI6 */
-- [MSTP1008] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 8, 0), /* SSI7 */
-- [MSTP1007] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 7, 0), /* SSI8 */
-- [MSTP1006] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 6, 0), /* SSI9 */
-- [MSTP1005] = SH_CLK_MSTP32(&p_clk, SMSTPCR10, 5, 0), /* SSI ALL */
-- [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */
-- [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */
-- [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */
-- [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */
-- [MSTP917] = SH_CLK_MSTP32(&qspi_clk, SMSTPCR9, 17, 0), /* QSPI */
-- [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
-- [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
-- [MSTP725] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 25, 0), /* LVDS1 */
-- [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */
-- [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */
-- [MSTP722] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 22, 0), /* DU2 */
-- [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
-- [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
-- [MSTP717] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 17, 0), /* HSCIF0 */
-- [MSTP716] = SH_CLK_MSTP32(&zs_clk, SMSTPCR7, 16, 0), /* HSCIF1 */
-- [MSTP704] = SH_CLK_MSTP32(&mp_clk, SMSTPCR7, 4, 0), /* HSUSB */
-- [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */
-- [MSTP315] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, 0), /* MMC0 */
-- [MSTP314] = SH_CLK_MSTP32(&div4_clks[DIV4_SD0], SMSTPCR3, 14, 0), /* SDHI0 */
-- [MSTP313] = SH_CLK_MSTP32(&div4_clks[DIV4_SD1], SMSTPCR3, 13, 0), /* SDHI1 */
-- [MSTP312] = SH_CLK_MSTP32(&div6_clks[DIV6_SD2], SMSTPCR3, 12, 0), /* SDHI2 */
-- [MSTP311] = SH_CLK_MSTP32(&div6_clks[DIV6_SD3], SMSTPCR3, 11, 0), /* SDHI3 */
-- [MSTP305] = SH_CLK_MSTP32(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, 0), /* MMC1 */
-- [MSTP304] = SH_CLK_MSTP32(&cp_clk, SMSTPCR3, 4, 0), /* TPU0 */
-- [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */
-- [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */
-- [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */
-- [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
-- [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */
-- [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */
-- [MSTP124] = SH_CLK_MSTP32(&rclk_clk, SMSTPCR1, 24, 0), /* CMT0 */
-+ [MSTP1015] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 15, MSTPSR10, 0), /* SSI0 */
-+ [MSTP1014] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 14, MSTPSR10, 0), /* SSI1 */
-+ [MSTP1013] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 13, MSTPSR10, 0), /* SSI2 */
-+ [MSTP1012] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 12, MSTPSR10, 0), /* SSI3 */
-+ [MSTP1011] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 11, MSTPSR10, 0), /* SSI4 */
-+ [MSTP1010] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 10, MSTPSR10, 0), /* SSI5 */
-+ [MSTP1009] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 9, MSTPSR10, 0), /* SSI6 */
-+ [MSTP1008] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 8, MSTPSR10, 0), /* SSI7 */
-+ [MSTP1007] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 7, MSTPSR10, 0), /* SSI8 */
-+ [MSTP1006] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 6, MSTPSR10, 0), /* SSI9 */
-+ [MSTP1005] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 5, MSTPSR10, 0), /* SSI ALL */
-+ [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
-+ [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
-+ [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-+ [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
-+ [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
-+ [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
-+ [MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
-+ [MSTP725] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 25, MSTPSR7, 0), /* LVDS1 */
-+ [MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */
-+ [MSTP723] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 23, MSTPSR7, 0), /* DU1 */
-+ [MSTP722] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 22, MSTPSR7, 0), /* DU2 */
-+ [MSTP721] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 21, MSTPSR7, 0), /* SCIF0 */
-+ [MSTP720] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 20, MSTPSR7, 0), /* SCIF1 */
-+ [MSTP717] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 17, MSTPSR7, 0), /* HSCIF0 */
-+ [MSTP716] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 16, MSTPSR7, 0), /* HSCIF1 */
-+ [MSTP704] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR7, 4, MSTPSR7, 0), /* HSUSB */
-+ [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
-+ [MSTP315] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, MSTPSR3, 0), /* MMC0 */
-+ [MSTP314] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD0], SMSTPCR3, 14, MSTPSR3, 0), /* SDHI0 */
-+ [MSTP313] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD1], SMSTPCR3, 13, MSTPSR3, 0), /* SDHI1 */
-+ [MSTP312] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD2], SMSTPCR3, 12, MSTPSR3, 0), /* SDHI2 */
-+ [MSTP311] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD3], SMSTPCR3, 11, MSTPSR3, 0), /* SDHI3 */
-+ [MSTP305] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_MMC1], SMSTPCR3, 5, MSTPSR3, 0), /* MMC1 */
-+ [MSTP304] = SH_CLK_MSTP32_STS(&cp_clk, SMSTPCR3, 4, MSTPSR3, 0), /* TPU0 */
-+ [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */
-+ [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */
-+ [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */
-+ [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */
-+ [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */
-+ [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */
-+ [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */
- };
-
- static struct clk_lookup lookups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0233-ARM-shmobile-r8a7791-Add-I2C-clocks.patch b/patches.renesas/0233-ARM-shmobile-r8a7791-Add-I2C-clocks.patch
deleted file mode 100644
index 3c9ed6200ae16..0000000000000
--- a/patches.renesas/0233-ARM-shmobile-r8a7791-Add-I2C-clocks.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 3c9d63e8c6a5bc9a760190781fce4356007ba1e4 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Fri, 27 Dec 2013 15:27:38 +0400
-Subject: ARM: shmobile: r8a7791: Add I2C clocks
-
-This adds I2C[0-5] clock support to R8A7791 SoC.
-
-Changes in V2:
-* Capitalized ARM in the subject.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 106c0e8fa3a2f7a40d25583e193e34af3861564d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index f5461262ee25..fe4a774b6211 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -122,6 +122,7 @@ static struct clk *main_clks[] = {
-
- /* MSTP */
- enum {
-+ MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
- MSTP813,
- MSTP726, MSTP724, MSTP723, MSTP721, MSTP720,
- MSTP719, MSTP718, MSTP715, MSTP714,
-@@ -133,6 +134,12 @@ enum {
- };
-
- static struct clk mstp_clks[MSTP_NR] = {
-+ [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */
-+ [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */
-+ [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */
-+ [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */
-+ [MSTP927] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 27, 0), /* I2C4 */
-+ [MSTP925] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 25, 0), /* I2C5 */
- [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
- [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
- [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */
-@@ -194,6 +201,12 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
-+ CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
-+ CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
-+ CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]),
-+ CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
-+ CLKDEV_DEV_ID("i2c-rcar_gen2.4", &mstp_clks[MSTP927]),
-+ CLKDEV_DEV_ID("i2c-rcar_gen2.5", &mstp_clks[MSTP925]),
- CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0234-ARM-shmobile-r8a7791-Add-VIN-clocks.patch b/patches.renesas/0234-ARM-shmobile-r8a7791-Add-VIN-clocks.patch
deleted file mode 100644
index 3359209c68460..0000000000000
--- a/patches.renesas/0234-ARM-shmobile-r8a7791-Add-VIN-clocks.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 2656932494c3f1beb04a7958bf940ef3b78f146e Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Fri, 27 Dec 2013 15:57:50 +0400
-Subject: ARM: shmobile: r8a7791: Add VIN clocks
-
-This adds VIN[0-2] clock support to R8A7791 SoC.
-
-Changes in V2:
-* none.
-
-Changes in V3:
-* capitalized ARM in the subject.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5f3fbe63b39923294cfd4bce84ab16948467d30f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index fe4a774b6211..191ad606860c 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -103,6 +103,7 @@ SH_FIXED_RATIO_CLK_SET(hp_clk, pll1_clk, 1, 12);
- SH_FIXED_RATIO_CLK_SET(p_clk, pll1_clk, 1, 24);
- SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024));
- SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15);
-+SH_FIXED_RATIO_CLK_SET(zg_clk, pll1_clk, 1, 3);
- SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3);
-
- static struct clk *main_clks[] = {
-@@ -117,6 +118,7 @@ static struct clk *main_clks[] = {
- &rclk_clk,
- &mp_clk,
- &cp_clk,
-+ &zg_clk,
- &zx_clk,
- };
-
-@@ -124,6 +126,7 @@ static struct clk *main_clks[] = {
- enum {
- MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
- MSTP813,
-+ MSTP811, MSTP810, MSTP809,
- MSTP726, MSTP724, MSTP723, MSTP721, MSTP720,
- MSTP719, MSTP718, MSTP715, MSTP714,
- MSTP522,
-@@ -141,6 +144,9 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP927] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 27, 0), /* I2C4 */
- [MSTP925] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 25, 0), /* I2C5 */
- [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
-+ [MSTP811] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 11, 0), /* VIN0 */
-+ [MSTP810] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 10, 0), /* VIN1 */
-+ [MSTP809] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 9, 0), /* VIN2 */
- [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
- [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */
- [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */
-@@ -172,6 +178,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("pll1", &pll1_clk),
- CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
- CLKDEV_CON_ID("pll3", &pll3_clk),
-+ CLKDEV_CON_ID("zg", &zg_clk),
- CLKDEV_CON_ID("hp", &hp_clk),
- CLKDEV_CON_ID("p", &p_clk),
- CLKDEV_CON_ID("rclk", &rclk_clk),
-@@ -208,6 +215,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("i2c-rcar_gen2.4", &mstp_clks[MSTP927]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.5", &mstp_clks[MSTP925]),
- CLKDEV_DEV_ID("r8a7791-ether", &mstp_clks[MSTP813]), /* Ether */
-+ CLKDEV_DEV_ID("r8a7791-vin.0", &mstp_clks[MSTP811]),
-+ CLKDEV_DEV_ID("r8a7791-vin.1", &mstp_clks[MSTP810]),
-+ CLKDEV_DEV_ID("r8a7791-vin.2", &mstp_clks[MSTP809]),
- };
-
- #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \
---
-2.1.2
-
diff --git a/patches.renesas/0235-ARM-shmobile-Remove-duplicate-shmobile_invalidate_st.patch b/patches.renesas/0235-ARM-shmobile-Remove-duplicate-shmobile_invalidate_st.patch
deleted file mode 100644
index 2a74e41219d05..0000000000000
--- a/patches.renesas/0235-ARM-shmobile-Remove-duplicate-shmobile_invalidate_st.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From c7d0114a9d9b59ae6c3ed1d7f882d94c8c7aa8b0 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 3 Jan 2014 16:48:47 +0100
-Subject: ARM: shmobile: Remove duplicate shmobile_invalidate_start()
- declaration
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 891fa525dc29cbed3ef0b74d5e0ab2fb5233f9a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/common.h | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
-index e31980590eb4..cb8e32deb2a3 100644
---- a/arch/arm/mach-shmobile/include/mach/common.h
-+++ b/arch/arm/mach-shmobile/include/mach/common.h
-@@ -25,7 +25,6 @@ extern int shmobile_smp_apmu_boot_secondary(unsigned int cpu,
- struct task_struct *idle);
- extern void shmobile_smp_apmu_cpu_die(unsigned int cpu);
- extern int shmobile_smp_apmu_cpu_kill(unsigned int cpu);
--extern void shmobile_invalidate_start(void);
- struct clk;
- extern int shmobile_clk_init(void);
- extern void shmobile_handle_irq_intc(struct pt_regs *);
---
-2.1.2
-
diff --git a/patches.renesas/0236-ARM-shmobile-r8a7779-Remove-unused-clock-constants.patch b/patches.renesas/0236-ARM-shmobile-r8a7779-Remove-unused-clock-constants.patch
deleted file mode 100644
index d05b1fc4a1d62..0000000000000
--- a/patches.renesas/0236-ARM-shmobile-r8a7779-Remove-unused-clock-constants.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From f1dae1c435d14297697fa934997cfd2b7204f89c Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Wed, 8 Jan 2014 13:34:39 +0900
-Subject: ARM: shmobile: r8a7779: Remove unused clock constants
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-(cherry picked from commit d690f4681ceddeb3f077c661a19af0b8e0411ae7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7779.c | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index 93a562531d53..8e403ae0c7b2 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -47,17 +47,10 @@
-
- #define MD(nr) BIT(nr)
-
--#define FRQMR IOMEM(0xffc80014)
- #define MSTPCR0 IOMEM(0xffc80030)
- #define MSTPCR1 IOMEM(0xffc80034)
- #define MSTPCR3 IOMEM(0xffc8003c)
- #define MSTPSR1 IOMEM(0xffc80044)
--#define MSTPSR4 IOMEM(0xffc80048)
--#define MSTPSR6 IOMEM(0xffc8004c)
--#define MSTPCR4 IOMEM(0xffc80050)
--#define MSTPCR5 IOMEM(0xffc80054)
--#define MSTPCR6 IOMEM(0xffc80058)
--#define MSTPCR7 IOMEM(0xffc80040)
-
- #define MODEMR 0xffcc0020
-
---
-2.1.2
-
diff --git a/patches.renesas/0237-ARM-shmobile-emev2-Use-__initconst-for-const-init-de.patch b/patches.renesas/0237-ARM-shmobile-emev2-Use-__initconst-for-const-init-de.patch
deleted file mode 100644
index fabc99127c381..0000000000000
--- a/patches.renesas/0237-ARM-shmobile-emev2-Use-__initconst-for-const-init-de.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From acd1dd5870a0c0cce50faeb546bc36205819347a Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 27 Dec 2013 12:14:08 +0900
-Subject: ARM: shmobile: emev2: Use __initconst for const init definition
-
-__initconst must be used instead of __initdata for
-const init definitions.
-
-This problem was introduced by 3d5de27174955702 ("mach-shmobile: Emma
-Mobile EV2 DT support V3") in v3.4-rc7.
-
-Reported-by: Fengguang Wu <fengguang.wu@intel.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d24d1780c340777942061ef3445edcf228e8d35b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-emev2.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
-index c8f2a1a69a52..c71d667007b8 100644
---- a/arch/arm/mach-shmobile/setup-emev2.c
-+++ b/arch/arm/mach-shmobile/setup-emev2.c
-@@ -58,7 +58,7 @@ static void __init emev2_add_standard_devices_dt(void)
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
-
--static const char *emev2_boards_compat_dt[] __initdata = {
-+static const char *emev2_boards_compat_dt[] __initconst = {
- "renesas,emev2",
- NULL,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0238-ARM-shmobile-r8a7791-Wait-for-status-on-all-MSTP-clo.patch b/patches.renesas/0238-ARM-shmobile-r8a7791-Wait-for-status-on-all-MSTP-clo.patch
deleted file mode 100644
index 9ef0e05a57f0f..0000000000000
--- a/patches.renesas/0238-ARM-shmobile-r8a7791-Wait-for-status-on-all-MSTP-clo.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From e3c402240b19c64d55dc5865e7377809380f27c7 Mon Sep 17 00:00:00 2001
-From: Shinya Kuribayashi <shinya.kuribayashi.px@renesas.com>
-Date: Wed, 8 Jan 2014 08:54:46 +0100
-Subject: ARM: shmobile: r8a7791: Wait for status on all MSTP clocks
-
-When enabling a module clock by clearing its bit in the MSTP control
-register, the CPG requires waiting for the status register to signal
-that the clock has started. Failure to do so will result in returning
-from the clk_enable() call with the clock potentially still disabled,
-leading to various race conditions and difficult to debug errors.
-
-Enable status wait for all MSTP clocks on the r8a7791.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit dd6fc76d2f61e732a14f3592bdd83c2c0b7d2dcc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 68 +++++++++++++++++++---------------
- 1 file changed, 38 insertions(+), 30 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 191ad606860c..1074ba4c3817 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -59,6 +59,14 @@
- #define SMSTPCR10 0xE6150998
- #define SMSTPCR11 0xE615099C
-
-+#define MSTPSR1 IOMEM(0xe6150038)
-+#define MSTPSR2 IOMEM(0xe6150040)
-+#define MSTPSR5 IOMEM(0xe615003c)
-+#define MSTPSR7 IOMEM(0xe61501c4)
-+#define MSTPSR8 IOMEM(0xe61509a0)
-+#define MSTPSR9 IOMEM(0xe61509a4)
-+#define MSTPSR11 IOMEM(0xe61509ac)
-+
- #define MODEMR 0xE6160060
- #define SDCKCR 0xE6150074
- #define SD2CKCR 0xE6150078
-@@ -137,36 +145,36 @@ enum {
- };
-
- static struct clk mstp_clks[MSTP_NR] = {
-- [MSTP931] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 31, 0), /* I2C0 */
-- [MSTP930] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 30, 0), /* I2C1 */
-- [MSTP929] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 29, 0), /* I2C2 */
-- [MSTP928] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 28, 0), /* I2C3 */
-- [MSTP927] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 27, 0), /* I2C4 */
-- [MSTP925] = SH_CLK_MSTP32(&p_clk, SMSTPCR9, 25, 0), /* I2C5 */
-- [MSTP813] = SH_CLK_MSTP32(&p_clk, SMSTPCR8, 13, 0), /* Ether */
-- [MSTP811] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 11, 0), /* VIN0 */
-- [MSTP810] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 10, 0), /* VIN1 */
-- [MSTP809] = SH_CLK_MSTP32(&zg_clk, SMSTPCR8, 9, 0), /* VIN2 */
-- [MSTP726] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 26, 0), /* LVDS0 */
-- [MSTP724] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 24, 0), /* DU0 */
-- [MSTP723] = SH_CLK_MSTP32(&zx_clk, SMSTPCR7, 23, 0), /* DU1 */
-- [MSTP721] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 21, 0), /* SCIF0 */
-- [MSTP720] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 20, 0), /* SCIF1 */
-- [MSTP719] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 19, 0), /* SCIF2 */
-- [MSTP718] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 18, 0), /* SCIF3 */
-- [MSTP715] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 15, 0), /* SCIF4 */
-- [MSTP714] = SH_CLK_MSTP32(&p_clk, SMSTPCR7, 14, 0), /* SCIF5 */
-- [MSTP522] = SH_CLK_MSTP32(&extal_clk, SMSTPCR5, 22, 0), /* Thermal */
-- [MSTP216] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 16, 0), /* SCIFB2 */
-- [MSTP207] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 7, 0), /* SCIFB1 */
-- [MSTP206] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 6, 0), /* SCIFB0 */
-- [MSTP204] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 4, 0), /* SCIFA0 */
-- [MSTP203] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 3, 0), /* SCIFA1 */
-- [MSTP202] = SH_CLK_MSTP32(&mp_clk, SMSTPCR2, 2, 0), /* SCIFA2 */
-- [MSTP1105] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 5, 0), /* SCIFA3 */
-- [MSTP1106] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 6, 0), /* SCIFA4 */
-- [MSTP1107] = SH_CLK_MSTP32(&mp_clk, SMSTPCR11, 7, 0), /* SCIFA5 */
-- [MSTP124] = SH_CLK_MSTP32(&rclk_clk, SMSTPCR1, 24, 0), /* CMT0 */
-+ [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
-+ [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
-+ [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-+ [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
-+ [MSTP927] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
-+ [MSTP925] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
-+ [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
-+ [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
-+ [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
-+ [MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 9, MSTPSR8, 0), /* VIN2 */
-+ [MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
-+ [MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */
-+ [MSTP723] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 23, MSTPSR7, 0), /* DU1 */
-+ [MSTP721] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 21, MSTPSR7, 0), /* SCIF0 */
-+ [MSTP720] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 20, MSTPSR7, 0), /* SCIF1 */
-+ [MSTP719] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 19, MSTPSR7, 0), /* SCIF2 */
-+ [MSTP718] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 18, MSTPSR7, 0), /* SCIF3 */
-+ [MSTP715] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 15, MSTPSR7, 0), /* SCIF4 */
-+ [MSTP714] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 14, MSTPSR7, 0), /* SCIF5 */
-+ [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
-+ [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */
-+ [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */
-+ [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */
-+ [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */
-+ [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */
-+ [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */
-+ [MSTP1105] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 5, MSTPSR11, 0), /* SCIFA3 */
-+ [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA4 */
-+ [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA5 */
-+ [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */
- };
-
- static struct clk_lookup lookups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0239-ARM-shmobile-r8a7790-add-Audio-DMAC-clock.patch b/patches.renesas/0239-ARM-shmobile-r8a7790-add-Audio-DMAC-clock.patch
deleted file mode 100644
index 741e02fdd9ffa..0000000000000
--- a/patches.renesas/0239-ARM-shmobile-r8a7790-add-Audio-DMAC-clock.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 8c8ba12b5ea2b98e04d800e79bbede1cfc2fd1ca Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 7 Jan 2014 22:08:40 -0800
-Subject: ARM: shmobile: r8a7790: add Audio DMAC clock
-
-Audio DMAC can be controlled via sh-dma-engine
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f5b2947e4a6589f07d485ca149d606283294979f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index a028f96ad1b0..58f3dcf322fd 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -201,6 +201,7 @@ enum {
- MSTP717, MSTP716,
- MSTP704,
- MSTP522,
-+ MSTP502, MSTP501,
- MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304,
- MSTP216, MSTP207, MSTP206, MSTP204, MSTP203, MSTP202,
- MSTP124,
-@@ -236,6 +237,8 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP716] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 16, MSTPSR7, 0), /* HSCIF1 */
- [MSTP704] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR7, 4, MSTPSR7, 0), /* HSUSB */
- [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
-+ [MSTP502] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR5, 2, MSTPSR5, 0), /* Audio-DMAC low */
-+ [MSTP501] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR5, 1, MSTPSR5, 0), /* Audio-DMAC hi */
- [MSTP315] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_MMC0], SMSTPCR3, 15, MSTPSR3, 0), /* MMC0 */
- [MSTP314] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD0], SMSTPCR3, 14, MSTPSR3, 0), /* SDHI0 */
- [MSTP313] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD1], SMSTPCR3, 13, MSTPSR3, 0), /* SDHI1 */
-@@ -311,6 +314,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
-+ CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]),
-+ CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP501]),
- CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]),
- CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
- CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]),
---
-2.1.2
-
diff --git a/patches.renesas/0240-ARM-shmobile-r8a7790-add-Audio-DMAC-support.patch b/patches.renesas/0240-ARM-shmobile-r8a7790-add-Audio-DMAC-support.patch
deleted file mode 100644
index 2988bed8cd5c5..0000000000000
--- a/patches.renesas/0240-ARM-shmobile-r8a7790-add-Audio-DMAC-support.patch
+++ /dev/null
@@ -1,177 +0,0 @@
-From 08bd27dad0340c37d6ff01bd88a01d693d17692a Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 6 Jan 2014 00:32:54 -0800
-Subject: ARM: shmobile: r8a7790: add Audio DMAC support
-
-R-Car H2 has many DMACs
-(ex SYS-DMAC, 2D-DMAC, Audio-DMAC, USB-DMAC etc)
-and, these DMAEngine needs DMA slave IDs to use it.
-
-This patch adds new DMA slave ID list for r8a7790.
-There, common part has RCAR_DMA_xxx prefix,
-and Audio DMAC part has AUDIO_DMAC_SLAVE_xxx prefix.
-
-Audio DMAC can be controlled via sh-dma-engine
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2c578a1be846bde49cb0a916c20f526f27b59e89)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r8a7790.h | 25 ++++++++
- arch/arm/mach-shmobile/setup-r8a7790.c | 90 +++++++++++++++++++++++++++
- 2 files changed, 115 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-index 5fbfa28b40b6..2177325af22f 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-@@ -3,6 +3,31 @@
-
- #include <mach/rcar-gen2.h>
-
-+/* DMA slave IDs */
-+enum {
-+ RCAR_DMA_SLAVE_INVALID,
-+ AUDIO_DMAC_SLAVE_SSI0_TX,
-+ AUDIO_DMAC_SLAVE_SSI0_RX,
-+ AUDIO_DMAC_SLAVE_SSI1_TX,
-+ AUDIO_DMAC_SLAVE_SSI1_RX,
-+ AUDIO_DMAC_SLAVE_SSI2_TX,
-+ AUDIO_DMAC_SLAVE_SSI2_RX,
-+ AUDIO_DMAC_SLAVE_SSI3_TX,
-+ AUDIO_DMAC_SLAVE_SSI3_RX,
-+ AUDIO_DMAC_SLAVE_SSI4_TX,
-+ AUDIO_DMAC_SLAVE_SSI4_RX,
-+ AUDIO_DMAC_SLAVE_SSI5_TX,
-+ AUDIO_DMAC_SLAVE_SSI5_RX,
-+ AUDIO_DMAC_SLAVE_SSI6_TX,
-+ AUDIO_DMAC_SLAVE_SSI6_RX,
-+ AUDIO_DMAC_SLAVE_SSI7_TX,
-+ AUDIO_DMAC_SLAVE_SSI7_RX,
-+ AUDIO_DMAC_SLAVE_SSI8_TX,
-+ AUDIO_DMAC_SLAVE_SSI8_RX,
-+ AUDIO_DMAC_SLAVE_SSI9_TX,
-+ AUDIO_DMAC_SLAVE_SSI9_RX,
-+};
-+
- void r8a7790_add_standard_devices(void);
- void r8a7790_add_dt_devices(void);
- void r8a7790_clock_init(void);
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 6ab37aa1e919..c4616f0698c6 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -24,12 +24,100 @@
- #include <linux/platform_data/gpio-rcar.h>
- #include <linux/platform_data/irq-renesas-irqc.h>
- #include <linux/serial_sci.h>
-+#include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
-+#include <mach/dma-register.h>
- #include <mach/irqs.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
-
-+/* Audio-DMAC */
-+#define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \
-+{ \
-+ .slave_id = AUDIO_DMAC_SLAVE_## _id ##_TX, \
-+ .addr = _addr + 0x8, \
-+ .chcr = CHCR_TX(XMIT_SZ_32BIT), \
-+ .mid_rid = t, \
-+}, { \
-+ .slave_id = AUDIO_DMAC_SLAVE_## _id ##_RX, \
-+ .addr = _addr + 0xc, \
-+ .chcr = CHCR_RX(XMIT_SZ_32BIT), \
-+ .mid_rid = r, \
-+}
-+
-+static const struct sh_dmae_slave_config r8a7790_audio_dmac_slaves[] = {
-+ AUDIO_DMAC_SLAVE(SSI0, 0xec241000, 0x01, 0x02),
-+ AUDIO_DMAC_SLAVE(SSI1, 0xec241040, 0x03, 0x04),
-+ AUDIO_DMAC_SLAVE(SSI2, 0xec241080, 0x05, 0x06),
-+ AUDIO_DMAC_SLAVE(SSI3, 0xec2410c0, 0x07, 0x08),
-+ AUDIO_DMAC_SLAVE(SSI4, 0xec241100, 0x09, 0x0a),
-+ AUDIO_DMAC_SLAVE(SSI5, 0xec241140, 0x0b, 0x0c),
-+ AUDIO_DMAC_SLAVE(SSI6, 0xec241180, 0x0d, 0x0e),
-+ AUDIO_DMAC_SLAVE(SSI7, 0xec2411c0, 0x0f, 0x10),
-+ AUDIO_DMAC_SLAVE(SSI8, 0xec241200, 0x11, 0x12),
-+ AUDIO_DMAC_SLAVE(SSI9, 0xec241240, 0x13, 0x14),
-+};
-+
-+#define DMAE_CHANNEL(a, b) \
-+{ \
-+ .offset = (a) - 0x20, \
-+ .dmars = (a) - 0x20 + 0x40, \
-+ .chclr_bit = (b), \
-+ .chclr_offset = 0x80 - 0x20, \
-+}
-+
-+static const struct sh_dmae_channel r8a7790_audio_dmac_channels[] = {
-+ DMAE_CHANNEL(0x8000, 0),
-+ DMAE_CHANNEL(0x8080, 1),
-+ DMAE_CHANNEL(0x8100, 2),
-+ DMAE_CHANNEL(0x8180, 3),
-+ DMAE_CHANNEL(0x8200, 4),
-+ DMAE_CHANNEL(0x8280, 5),
-+ DMAE_CHANNEL(0x8300, 6),
-+ DMAE_CHANNEL(0x8380, 7),
-+ DMAE_CHANNEL(0x8400, 8),
-+ DMAE_CHANNEL(0x8480, 9),
-+ DMAE_CHANNEL(0x8500, 10),
-+ DMAE_CHANNEL(0x8580, 11),
-+ DMAE_CHANNEL(0x8600, 12),
-+};
-+
-+static struct sh_dmae_pdata r8a7790_audio_dmac_platform_data = {
-+ .slave = r8a7790_audio_dmac_slaves,
-+ .slave_num = ARRAY_SIZE(r8a7790_audio_dmac_slaves),
-+ .channel = r8a7790_audio_dmac_channels,
-+ .channel_num = ARRAY_SIZE(r8a7790_audio_dmac_channels),
-+ .ts_low_shift = TS_LOW_SHIFT,
-+ .ts_low_mask = TS_LOW_BIT << TS_LOW_SHIFT,
-+ .ts_high_shift = TS_HI_SHIFT,
-+ .ts_high_mask = TS_HI_BIT << TS_HI_SHIFT,
-+ .ts_shift = dma_ts_shift,
-+ .ts_shift_num = ARRAY_SIZE(dma_ts_shift),
-+ .dmaor_init = DMAOR_DME,
-+ .chclr_present = 1,
-+ .chclr_bitwise = 1,
-+};
-+
-+static struct resource r8a7790_audio_dmac_resources[] = {
-+ /* Channel registers and DMAOR for low */
-+ DEFINE_RES_MEM(0xec700020, 0x8663 - 0x20),
-+ DEFINE_RES_IRQ(gic_spi(346)),
-+ DEFINE_RES_NAMED(gic_spi(320), 13, NULL, IORESOURCE_IRQ),
-+
-+ /* Channel registers and DMAOR for hi */
-+ DEFINE_RES_MEM(0xec720020, 0x8663 - 0x20), /* hi */
-+ DEFINE_RES_IRQ(gic_spi(347)),
-+ DEFINE_RES_NAMED(gic_spi(333), 13, NULL, IORESOURCE_IRQ),
-+};
-+
-+#define r8a7790_register_audio_dmac(id) \
-+ platform_device_register_resndata( \
-+ &platform_bus, "sh-dma-engine", id, \
-+ &r8a7790_audio_dmac_resources[id * 3], 3, \
-+ &r8a7790_audio_dmac_platform_data, \
-+ sizeof(r8a7790_audio_dmac_platform_data))
-+
- static const struct resource pfc_resources[] __initconst = {
- DEFINE_RES_MEM(0xe6060000, 0x250),
- };
-@@ -101,6 +189,8 @@ void __init r8a7790_pinmux_init(void)
- r8a7790_register_i2c(1);
- r8a7790_register_i2c(2);
- r8a7790_register_i2c(3);
-+ r8a7790_register_audio_dmac(0);
-+ r8a7790_register_audio_dmac(1);
- }
-
- #define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \
---
-2.1.2
-
diff --git a/patches.renesas/0241-ARM-shmobile-r8a7790-Add-VIN-clock-support.patch b/patches.renesas/0241-ARM-shmobile-r8a7790-Add-VIN-clock-support.patch
deleted file mode 100644
index f6df00e22e22c..0000000000000
--- a/patches.renesas/0241-ARM-shmobile-r8a7790-Add-VIN-clock-support.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 1b7e08aa8f4a674f9db33d6cf118b22dc4f7cf55 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Wed, 8 Jan 2014 20:31:23 +0400
-Subject: ARM: shmobile: r8a7790: Add VIN clock support
-
-This adds VIN[0-3] clock support to R8A7790 SoC.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-[horms+renesas@verge.net.au: manually applied]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit b89dfdfad949798e1624dd2ff494bdb7ac943b04)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 58f3dcf322fd..b2b232335ceb 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -197,6 +197,7 @@ enum {
- MSTP931, MSTP930, MSTP929, MSTP928,
- MSTP917,
- MSTP813,
-+ MSTP811, MSTP810, MSTP809, MSTP808,
- MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
- MSTP717, MSTP716,
- MSTP704,
-@@ -226,6 +227,10 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
- [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
- [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
-+ [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
-+ [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
-+ [MSTP809] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 9, MSTPSR8, 0), /* VIN2 */
-+ [MSTP808] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 8, MSTPSR8, 0), /* VIN3 */
- [MSTP726] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 26, MSTPSR7, 0), /* LVDS0 */
- [MSTP725] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 25, MSTPSR7, 0), /* LVDS1 */
- [MSTP724] = SH_CLK_MSTP32_STS(&zx_clk, SMSTPCR7, 24, MSTPSR7, 0), /* DU0 */
-@@ -312,6 +317,10 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
- CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
-+ CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]),
-+ CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]),
-+ CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]),
-+ CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]),
- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]),
---
-2.1.2
-
diff --git a/patches.renesas/0242-ARM-shmobile-r8a7790-Add-SATA-clocks.patch b/patches.renesas/0242-ARM-shmobile-r8a7790-Add-SATA-clocks.patch
deleted file mode 100644
index 47a65123ea9c9..0000000000000
--- a/patches.renesas/0242-ARM-shmobile-r8a7790-Add-SATA-clocks.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 53bfac96de73bf08cbd70ecfa7f5724f84eccbe4 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Wed, 8 Jan 2014 20:31:25 +0400
-Subject: ARM: shmobile: r8a7790: Add SATA clocks
-
-This adds SATA[01] clock support to R8A7790 SoC.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-[horms+renesas@verge.net.au: resolved trivial conflicts]
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 64b7f9aca549db8a8bbcf68c911e9bd24efe76f7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index b2b232335ceb..f25b43a1fd73 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -196,6 +196,7 @@ enum {
- MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005,
- MSTP931, MSTP930, MSTP929, MSTP928,
- MSTP917,
-+ MSTP815, MSTP814,
- MSTP813,
- MSTP811, MSTP810, MSTP809, MSTP808,
- MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
-@@ -226,6 +227,8 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
- [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
- [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
-+ [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
-+ [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
- [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
- [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
- [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
-@@ -340,6 +343,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
- CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]),
-+ CLKDEV_DEV_ID("sata-r8a7790.0", &mstp_clks[MSTP815]),
-+ CLKDEV_DEV_ID("sata-r8a7790.1", &mstp_clks[MSTP814]),
-
- /* ICK */
- CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]),
---
-2.1.2
-
diff --git a/patches.renesas/0243-ARM-shmobile-r8a7791-Add-ZS-clock.patch b/patches.renesas/0243-ARM-shmobile-r8a7791-Add-ZS-clock.patch
deleted file mode 100644
index da224ad6d42dd..0000000000000
--- a/patches.renesas/0243-ARM-shmobile-r8a7791-Add-ZS-clock.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 9a9a163109066b790377f6802c06d70373d50af3 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Thu, 9 Jan 2014 19:23:20 +0400
-Subject: ARM: shmobile: r8a7791: Add ZS clock
-
-This adds fixed ratio zs_clk to R8A7791 clocks.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5a6f994abbfde8e17671541db04399dfc4aebe62)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 1074ba4c3817..52d7d13609ce 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -113,6 +113,7 @@ SH_FIXED_RATIO_CLK_SET(rclk_clk, pll1_clk, 1, (48 * 1024));
- SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15);
- SH_FIXED_RATIO_CLK_SET(zg_clk, pll1_clk, 1, 3);
- SH_FIXED_RATIO_CLK_SET(zx_clk, pll1_clk, 1, 3);
-+SH_FIXED_RATIO_CLK_SET(zs_clk, pll1_clk, 1, 6);
-
- static struct clk *main_clks[] = {
- &extal_clk,
-@@ -128,6 +129,7 @@ static struct clk *main_clks[] = {
- &cp_clk,
- &zg_clk,
- &zx_clk,
-+ &zs_clk,
- };
-
- /* MSTP */
-@@ -187,6 +189,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("pll1_div2", &pll1_div2_clk),
- CLKDEV_CON_ID("pll3", &pll3_clk),
- CLKDEV_CON_ID("zg", &zg_clk),
-+ CLKDEV_CON_ID("zs", &zs_clk),
- CLKDEV_CON_ID("hp", &hp_clk),
- CLKDEV_CON_ID("p", &p_clk),
- CLKDEV_CON_ID("rclk", &rclk_clk),
---
-2.1.2
-
diff --git a/patches.renesas/0244-ARM-shmobile-r8a7791-Add-SATA-clocks.patch b/patches.renesas/0244-ARM-shmobile-r8a7791-Add-SATA-clocks.patch
deleted file mode 100644
index 84e14b4762339..0000000000000
--- a/patches.renesas/0244-ARM-shmobile-r8a7791-Add-SATA-clocks.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 4c6b8edf97fed4a868017e82b00cda8b8d6a4d6c Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Thu, 9 Jan 2014 19:23:21 +0400
-Subject: ARM: shmobile: r8a7791: Add SATA clocks
-
-This adds SATA[01] clock support to R8A7791 SoC.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 373ababd4896d6012871f03a3f6d96083dc50610)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 52d7d13609ce..e4e4dfac85e9 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -135,6 +135,7 @@ static struct clk *main_clks[] = {
- /* MSTP */
- enum {
- MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
-+ MSTP815, MSTP814,
- MSTP813,
- MSTP811, MSTP810, MSTP809,
- MSTP726, MSTP724, MSTP723, MSTP721, MSTP720,
-@@ -153,6 +154,8 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
- [MSTP927] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
- [MSTP925] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
-+ [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
-+ [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
- [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
- [MSTP811] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 11, MSTPSR8, 0), /* VIN0 */
- [MSTP810] = SH_CLK_MSTP32_STS(&zg_clk, SMSTPCR8, 10, MSTPSR8, 0), /* VIN1 */
-@@ -229,6 +232,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("r8a7791-vin.0", &mstp_clks[MSTP811]),
- CLKDEV_DEV_ID("r8a7791-vin.1", &mstp_clks[MSTP810]),
- CLKDEV_DEV_ID("r8a7791-vin.2", &mstp_clks[MSTP809]),
-+ CLKDEV_DEV_ID("sata-r8a7791.0", &mstp_clks[MSTP815]),
-+ CLKDEV_DEV_ID("sata-r8a7791.1", &mstp_clks[MSTP814]),
- };
-
- #define R8A7791_CLOCK_ROOT(e, m, p0, p1, p30, p31) \
---
-2.1.2
-
diff --git a/patches.renesas/0245-ARM-shmobile-r7s72100-really-add-i2c-clocks.patch b/patches.renesas/0245-ARM-shmobile-r7s72100-really-add-i2c-clocks.patch
deleted file mode 100644
index d83e5ea492a0f..0000000000000
--- a/patches.renesas/0245-ARM-shmobile-r7s72100-really-add-i2c-clocks.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 7375c87bc090361c28f8533e460d1f83ba3c3b5d Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Fri, 27 Dec 2013 05:15:24 +0100
-Subject: ARM: shmobile: r7s72100: really add i2c clocks
-
-Due to a merge conflict, addition of the clocks was lost. Tested with
-RIIC2 on a genmai board. Others untested but hopefully trivial enough to
-be added.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-[horms+renesas@verge.net.au: Capitalised "ARM" in subject]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 3440cb28627d7fbaf25c0d60cb9c6cf6d66d61ad)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index e6ab0cd5b286..dd8ce87596de 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -176,6 +176,10 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
-
- /* MSTP clocks */
-+ CLKDEV_DEV_ID("fcfee000.i2c", &mstp_clks[MSTP97]),
-+ CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]),
-+ CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
-+ CLKDEV_DEV_ID("fcfeec00.i2c", &mstp_clks[MSTP94]),
- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]),
-
- /* ICK */
---
-2.1.2
-
diff --git a/patches.renesas/0246-ARM-shmobile-r8a7790-Add-PCI-USB-host-clock-support.patch b/patches.renesas/0246-ARM-shmobile-r8a7790-Add-PCI-USB-host-clock-support.patch
deleted file mode 100644
index 01f7601c4c86a..0000000000000
--- a/patches.renesas/0246-ARM-shmobile-r8a7790-Add-PCI-USB-host-clock-support.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From a6650cb7dbba1fc0c4313dd21c47ac528cbb219e Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Sat, 25 Jan 2014 02:28:48 +0400
-Subject: ARM: shmobile: r8a7790: Add PCI USB host clock support
-
-This adds internal PCI USB host clock support.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 012a7069b5a10a0851584d71a1facdc40a972319)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index f25b43a1fd73..507073e9d455 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -201,7 +201,7 @@ enum {
- MSTP811, MSTP810, MSTP809, MSTP808,
- MSTP726, MSTP725, MSTP724, MSTP723, MSTP722, MSTP721, MSTP720,
- MSTP717, MSTP716,
-- MSTP704,
-+ MSTP704, MSTP703,
- MSTP522,
- MSTP502, MSTP501,
- MSTP315, MSTP314, MSTP313, MSTP312, MSTP311, MSTP305, MSTP304,
-@@ -244,6 +244,7 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP717] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 17, MSTPSR7, 0), /* HSCIF0 */
- [MSTP716] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR7, 16, MSTPSR7, 0), /* HSCIF1 */
- [MSTP704] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR7, 4, MSTPSR7, 0), /* HSUSB */
-+ [MSTP703] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR7, 3, MSTPSR7, 0), /* EHCI */
- [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
- [MSTP502] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR5, 2, MSTPSR5, 0), /* Audio-DMAC low */
- [MSTP501] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR5, 1, MSTPSR5, 0), /* Audio-DMAC hi */
-@@ -343,6 +344,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
- CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]),
-+ CLKDEV_DEV_ID("pci-rcar-gen2.0", &mstp_clks[MSTP703]),
-+ CLKDEV_DEV_ID("pci-rcar-gen2.1", &mstp_clks[MSTP703]),
-+ CLKDEV_DEV_ID("pci-rcar-gen2.2", &mstp_clks[MSTP703]),
- CLKDEV_DEV_ID("sata-r8a7790.0", &mstp_clks[MSTP815]),
- CLKDEV_DEV_ID("sata-r8a7790.1", &mstp_clks[MSTP814]),
-
---
-2.1.2
-
diff --git a/patches.renesas/0247-ARM-shmobile-lager-Enable-VIN-along-with-ADV7180-dec.patch b/patches.renesas/0247-ARM-shmobile-lager-Enable-VIN-along-with-ADV7180-dec.patch
deleted file mode 100644
index 89182b3ca75b2..0000000000000
--- a/patches.renesas/0247-ARM-shmobile-lager-Enable-VIN-along-with-ADV7180-dec.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 8ed5b0bb57d791fab8534ec3094beb39a6a7e40d Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Mon, 6 Jan 2014 18:55:41 +0400
-Subject: ARM: shmobile: lager: Enable VIN along with ADV7180 decoder in
- defconfig
-
-This enables R-Car VIN SoC camera along with ADV7180 decoder,
-which can be found on Lager board, to lager_defconfig.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5d738332973d1b33cd9fb77062d3959d6c7e7a74)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/lager_defconfig | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig
-index 883443f8f4f3..89b6e71006cb 100644
---- a/arch/arm/configs/lager_defconfig
-+++ b/arch/arm/configs/lager_defconfig
-@@ -90,6 +90,14 @@ CONFIG_RCAR_THERMAL=y
- CONFIG_REGULATOR=y
- CONFIG_REGULATOR_FIXED_VOLTAGE=y
- CONFIG_REGULATOR_GPIO=y
-+CONFIG_MEDIA_SUPPORT=y
-+CONFIG_MEDIA_CAMERA_SUPPORT=y
-+CONFIG_V4L_PLATFORM_DRIVERS=y
-+CONFIG_SOC_CAMERA=y
-+CONFIG_SOC_CAMERA_PLATFORM=y
-+CONFIG_VIDEO_RCAR_VIN=y
-+# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
-+CONFIG_VIDEO_ADV7180=y
- CONFIG_DRM=y
- CONFIG_DRM_RCAR_DU=y
- # CONFIG_USB_SUPPORT is not set
---
-2.1.2
-
diff --git a/patches.renesas/0248-ARM-shmobile-koelsch-Enable-SATA-in-defconfig.patch b/patches.renesas/0248-ARM-shmobile-koelsch-Enable-SATA-in-defconfig.patch
deleted file mode 100644
index 17f9f7edbf596..0000000000000
--- a/patches.renesas/0248-ARM-shmobile-koelsch-Enable-SATA-in-defconfig.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 7babd16f537ffde58f925a4ad56cb165d7b717d4 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Thu, 9 Jan 2014 19:23:23 +0400
-Subject: ARM: shmobile: koelsch: Enable SATA in defconfig
-
-This enables block layer, R-Car SATA and SCSI disk in koelsch_defconfig.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7f03e3bf2bca488e1471e00b6b8b74242b065020)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/koelsch_defconfig | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
-index e248f49d5549..4071e61d808f 100644
---- a/arch/arm/configs/koelsch_defconfig
-+++ b/arch/arm/configs/koelsch_defconfig
-@@ -8,7 +8,6 @@ CONFIG_SYSCTL_SYSCALL=y
- CONFIG_EMBEDDED=y
- CONFIG_PERF_EVENTS=y
- CONFIG_SLAB=y
--# CONFIG_BLOCK is not set
- CONFIG_ARCH_SHMOBILE_LEGACY=y
- CONFIG_ARCH_R8A7791=y
- CONFIG_MACH_KOELSCH=y
-@@ -36,6 +35,9 @@ CONFIG_INET=y
- CONFIG_IP_PNP=y
- CONFIG_IP_PNP_DHCP=y
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_BLK_DEV_SD=y
-+CONFIG_ATA=y
-+CONFIG_SATA_RCAR=y
- CONFIG_NETDEVICES=y
- # CONFIG_NET_VENDOR_ARC is not set
- # CONFIG_NET_CADENCE is not set
---
-2.1.2
-
diff --git a/patches.renesas/0249-ARM-shmobile-koelsch-Enable-DEVTMPFS_MOUNT-in-defcon.patch b/patches.renesas/0249-ARM-shmobile-koelsch-Enable-DEVTMPFS_MOUNT-in-defcon.patch
deleted file mode 100644
index 0ec7112bbc211..0000000000000
--- a/patches.renesas/0249-ARM-shmobile-koelsch-Enable-DEVTMPFS_MOUNT-in-defcon.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From eb31397f2cd2df2ad30f00d18cf440de9afd3079 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Sun, 12 Jan 2014 12:15:49 +0100
-Subject: ARM: shmobile: koelsch: Enable DEVTMPFS_MOUNT in defconfig
-
-Without this, a Debian jessie nfsroot hangs early in the boot process.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-[horms+renesas@verge.net.au: resolved trivial conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 9a4e2a5a11efb7734dabef77a6e1515cbfdd9f42)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/koelsch_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
-index 4071e61d808f..30157975998a 100644
---- a/arch/arm/configs/koelsch_defconfig
-+++ b/arch/arm/configs/koelsch_defconfig
-@@ -34,6 +34,8 @@ CONFIG_UNIX=y
- CONFIG_INET=y
- CONFIG_IP_PNP=y
- CONFIG_IP_PNP_DHCP=y
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- CONFIG_BLK_DEV_SD=y
- CONFIG_ATA=y
---
-2.1.2
-
diff --git a/patches.renesas/0250-ARM-shmobile-lager-Enable-SATA-in-defconfig.patch b/patches.renesas/0250-ARM-shmobile-lager-Enable-SATA-in-defconfig.patch
deleted file mode 100644
index 3820e11a90ed2..0000000000000
--- a/patches.renesas/0250-ARM-shmobile-lager-Enable-SATA-in-defconfig.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From adba6f5501a2a077cfe65032e843071e3de46989 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Thu, 9 Jan 2014 18:24:37 +0400
-Subject: ARM: shmobile: lager: Enable SATA in defconfig
-
-This enables R-Car SATA and SCSI disk in lager_defconfig.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0e02971e4047e61edc913c997ba9124df33d5112)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/lager_defconfig | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig
-index 89b6e71006cb..ee93b8a55cf9 100644
---- a/arch/arm/configs/lager_defconfig
-+++ b/arch/arm/configs/lager_defconfig
-@@ -49,6 +49,9 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_BLK_DEV_SD=y
-+CONFIG_ATA=y
-+CONFIG_SATA_RCAR=y
- CONFIG_NETDEVICES=y
- # CONFIG_NET_CORE is not set
- # CONFIG_NET_VENDOR_ARC is not set
---
-2.1.2
-
diff --git a/patches.renesas/0251-ARM-shmobile-marzen-enable-CONFIG_DEVTMPFS-in-defcon.patch b/patches.renesas/0251-ARM-shmobile-marzen-enable-CONFIG_DEVTMPFS-in-defcon.patch
deleted file mode 100644
index 7500f2de46e13..0000000000000
--- a/patches.renesas/0251-ARM-shmobile-marzen-enable-CONFIG_DEVTMPFS-in-defcon.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ea5805e4e87d4c38879499525a4bd60fef2ac574 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:56:01 -0800
-Subject: ARM: shmobile: marzen: enable CONFIG_DEVTMPFS in defconfig
-
-This reverts commit 41307133da4b6f242ecbb45950b9d043c0b21b96
-("ARM: shmobile: marzen: Do not enable CONFIG_DEVTMPFS defconfig").
-
-DEVTMPFS is needed for udev.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-[horms+renesas@verge.net.au: Added subject of reverted patch to changelog]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit edcde600a0bf778d98d945bd27f51c941e35bb8c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/marzen_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/marzen_defconfig b/arch/arm/configs/marzen_defconfig
-index f21bd405cc2a..92994f7f6fd8 100644
---- a/arch/arm/configs/marzen_defconfig
-+++ b/arch/arm/configs/marzen_defconfig
-@@ -43,6 +43,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- # CONFIG_STANDALONE is not set
- # CONFIG_PREVENT_FIRMWARE_BUILD is not set
- # CONFIG_FW_LOADER is not set
---
-2.1.2
-
diff --git a/patches.renesas/0252-ARM-shmobile-mackerel-enable-CONFIG_DEVTMPFS-in-defc.patch b/patches.renesas/0252-ARM-shmobile-mackerel-enable-CONFIG_DEVTMPFS-in-defc.patch
deleted file mode 100644
index ecc28b4726882..0000000000000
--- a/patches.renesas/0252-ARM-shmobile-mackerel-enable-CONFIG_DEVTMPFS-in-defc.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 898b9552f1a16bf1f1a3ef5d09e56a969890e13f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:56:17 -0800
-Subject: ARM: shmobile: mackerel: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 97b3fbccfae2d1fee679073f1690e2428868754c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/mackerel_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/mackerel_defconfig b/arch/arm/configs/mackerel_defconfig
-index a61e1653fc5e..57ececba2ae6 100644
---- a/arch/arm/configs/mackerel_defconfig
-+++ b/arch/arm/configs/mackerel_defconfig
-@@ -42,6 +42,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- # CONFIG_FIRMWARE_IN_KERNEL is not set
- CONFIG_MTD=y
- CONFIG_MTD_CONCAT=y
---
-2.1.2
-
diff --git a/patches.renesas/0253-ARM-shmobile-lager-enable-CONFIG_DEVTMPFS-in-defconf.patch b/patches.renesas/0253-ARM-shmobile-lager-enable-CONFIG_DEVTMPFS-in-defconf.patch
deleted file mode 100644
index f4fc79c97b1ea..0000000000000
--- a/patches.renesas/0253-ARM-shmobile-lager-enable-CONFIG_DEVTMPFS-in-defconf.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2d8f81ddddaabd34ced3e4e542729b19758e59c4 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:56:33 -0800
-Subject: ARM: shmobile: lager: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-[horms+renesas@verge.net.au: resolved trivial conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 6ea8b5ff7ca2d200875ddd774faa8ca40d990d86)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/lager_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig
-index ee93b8a55cf9..3e7e0aef26c9 100644
---- a/arch/arm/configs/lager_defconfig
-+++ b/arch/arm/configs/lager_defconfig
-@@ -49,6 +49,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- CONFIG_BLK_DEV_SD=y
- CONFIG_ATA=y
- CONFIG_SATA_RCAR=y
---
-2.1.2
-
diff --git a/patches.renesas/0254-ARM-shmobile-kzm9g-enable-CONFIG_DEVTMPFS-in-defconf.patch b/patches.renesas/0254-ARM-shmobile-kzm9g-enable-CONFIG_DEVTMPFS-in-defconf.patch
deleted file mode 100644
index 98aa4fc101b77..0000000000000
--- a/patches.renesas/0254-ARM-shmobile-kzm9g-enable-CONFIG_DEVTMPFS-in-defconf.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 61f892a9f9e96dd5be90a36cc40cef5c4d666691 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:56:55 -0800
-Subject: ARM: shmobile: kzm9g: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 19bc39274b42052a198ae836c059652b65e2a21e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/kzm9g_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
-index 9934dbc23d64..12bd1f63c399 100644
---- a/arch/arm/configs/kzm9g_defconfig
-+++ b/arch/arm/configs/kzm9g_defconfig
-@@ -60,6 +60,8 @@ CONFIG_IRDA=y
- CONFIG_SH_IRDA=y
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- CONFIG_SCSI=y
- CONFIG_BLK_DEV_SD=y
- CONFIG_NETDEVICES=y
---
-2.1.2
-
diff --git a/patches.renesas/0255-ARM-shmobile-kzm9d-enable-CONFIG_DEVTMPFS-in-defconf.patch b/patches.renesas/0255-ARM-shmobile-kzm9d-enable-CONFIG_DEVTMPFS-in-defconf.patch
deleted file mode 100644
index c0c463e5dbdd8..0000000000000
--- a/patches.renesas/0255-ARM-shmobile-kzm9d-enable-CONFIG_DEVTMPFS-in-defconf.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 89ac6eb28734a34601e0341fc55b65f8d3aef351 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:57:04 -0800
-Subject: ARM: shmobile: kzm9d: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c5aa40f8485b9b6aaeae14e5bddd5e569829ac2f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/kzm9d_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/kzm9d_defconfig b/arch/arm/configs/kzm9d_defconfig
-index e42ce3756af3..1cc330b06bf6 100644
---- a/arch/arm/configs/kzm9d_defconfig
-+++ b/arch/arm/configs/kzm9d_defconfig
-@@ -50,6 +50,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- # CONFIG_BLK_DEV is not set
- CONFIG_NETDEVICES=y
- # CONFIG_NET_VENDOR_BROADCOM is not set
---
-2.1.2
-
diff --git a/patches.renesas/0256-ARM-shmobile-genmai-enable-CONFIG_DEVTMPFS-in-defcon.patch b/patches.renesas/0256-ARM-shmobile-genmai-enable-CONFIG_DEVTMPFS-in-defcon.patch
deleted file mode 100644
index 128847fa25bcb..0000000000000
--- a/patches.renesas/0256-ARM-shmobile-genmai-enable-CONFIG_DEVTMPFS-in-defcon.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 8ce37ea5dd7f46ab8a71dde7558baf3d2135bce0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:57:24 -0800
-Subject: ARM: shmobile: genmai: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2304de6ef7479b12fa4529c12a53cac631a2c67b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/genmai_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig
-index aa0b704f48af..c56a7ff1dcd7 100644
---- a/arch/arm/configs/genmai_defconfig
-+++ b/arch/arm/configs/genmai_defconfig
-@@ -50,6 +50,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- CONFIG_NETDEVICES=y
- # CONFIG_NET_CORE is not set
- # CONFIG_NET_VENDOR_ARC is not set
---
-2.1.2
-
diff --git a/patches.renesas/0257-ARM-shmobile-bockw-enable-CONFIG_DEVTMPFS-in-defconf.patch b/patches.renesas/0257-ARM-shmobile-bockw-enable-CONFIG_DEVTMPFS-in-defconf.patch
deleted file mode 100644
index 618ff14b28975..0000000000000
--- a/patches.renesas/0257-ARM-shmobile-bockw-enable-CONFIG_DEVTMPFS-in-defconf.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a4325fe514faf9a2768a495820473a1b059d0c3a Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:57:39 -0800
-Subject: ARM: shmobile: bockw: enable CONFIG_DEVTMPFS in defconfig
-
-This reverts commit e14ee5deab24200e4b70fe31a8c806f0acd3d37c
-("ARM: shmobile: bockw: Do not enable CONFIG_DEVTMPFS defconfig").
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-[horms+renesas@verge.net.au: Added subject of reverted commit to changelog]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit f921163add46d0dd8321f9d59496bbc17fb38850)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/bockw_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/bockw_defconfig b/arch/arm/configs/bockw_defconfig
-index 80cff50beb34..e816140d81c5 100644
---- a/arch/arm/configs/bockw_defconfig
-+++ b/arch/arm/configs/bockw_defconfig
-@@ -44,6 +44,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_INET_DIAG is not set
- # CONFIG_IPV6 is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- # CONFIG_STANDALONE is not set
- # CONFIG_PREVENT_FIRMWARE_BUILD is not set
- # CONFIG_FW_LOADER is not set
---
-2.1.2
-
diff --git a/patches.renesas/0258-ARM-shmobile-armadillo-enable-CONFIG_DEVTMPFS-in-def.patch b/patches.renesas/0258-ARM-shmobile-armadillo-enable-CONFIG_DEVTMPFS-in-def.patch
deleted file mode 100644
index 33fcaeb445c57..0000000000000
--- a/patches.renesas/0258-ARM-shmobile-armadillo-enable-CONFIG_DEVTMPFS-in-def.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f67d72e912ccffe918eb5219e6020fafc70e631c Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:57:49 -0800
-Subject: ARM: shmobile: armadillo: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a3b74d3e45f2e28e7c57d5c16a94b59c1a68dd09)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/armadillo800eva_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig
-index 9287a62de830..065adddeee3e 100644
---- a/arch/arm/configs/armadillo800eva_defconfig
-+++ b/arch/arm/configs/armadillo800eva_defconfig
-@@ -58,6 +58,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6 is not set
- # CONFIG_WIRELESS is not set
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- CONFIG_SCSI=y
- CONFIG_BLK_DEV_SD=y
- CONFIG_MD=y
---
-2.1.2
-
diff --git a/patches.renesas/0259-ARM-shmobile-ape6evm-enable-CONFIG_DEVTMPFS-in-defco.patch b/patches.renesas/0259-ARM-shmobile-ape6evm-enable-CONFIG_DEVTMPFS-in-defco.patch
deleted file mode 100644
index d397825390dbb..0000000000000
--- a/patches.renesas/0259-ARM-shmobile-ape6evm-enable-CONFIG_DEVTMPFS-in-defco.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 7a8d0839cfb2d9aea4bc56617865b1a7ffca22ee Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 29 Jan 2014 16:57:59 -0800
-Subject: ARM: shmobile: ape6evm: enable CONFIG_DEVTMPFS in defconfig
-
-DEVTMPFS is needed for udev
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0771ddff31186836f62a20c42e7958bd37f7b4ed)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/ape6evm_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/ape6evm_defconfig b/arch/arm/configs/ape6evm_defconfig
-index cb26c62dc722..bb396c0e5fda 100644
---- a/arch/arm/configs/ape6evm_defconfig
-+++ b/arch/arm/configs/ape6evm_defconfig
-@@ -48,6 +48,8 @@ CONFIG_IP_PNP_DHCP=y
- # CONFIG_IPV6_SIT is not set
- CONFIG_NETFILTER=y
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
- # CONFIG_FW_LOADER_USER_HELPER is not set
- CONFIG_NETDEVICES=y
- # CONFIG_NET_CADENCE is not set
---
-2.1.2
-
diff --git a/patches.renesas/0260-ARM-shmobile-kzm9d-Conditionally-select-SMSC_PHY.patch b/patches.renesas/0260-ARM-shmobile-kzm9d-Conditionally-select-SMSC_PHY.patch
deleted file mode 100644
index 6ed868487f41e..0000000000000
--- a/patches.renesas/0260-ARM-shmobile-kzm9d-Conditionally-select-SMSC_PHY.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d572070dfe2694c0a96017eceabc14f5d5334d19 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 7 Jan 2014 15:23:47 +0900
-Subject: ARM: shmobile: kzm9d: Conditionally select SMSC_PHY
-
-The kzm9d board uses has an SMSC911X ethernet controller which uses an
-SMSC phy. Select SMSC_PHY for kzm9d if SMSC911X is enabled to make use of the
-SMSC-specific phy driver rather than relying on the generic phy driver.
-
-This only covers the case of multiplatform kzm9d
-as there is currently no Kconfig node for non-multiplatform kzm9d.
-One could be added if desired.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 682100f59c0051e2b6f5af294da79df2419db157)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 055b0b819719..b4a42e5401a8 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -51,6 +51,7 @@ config MACH_KZM9D
- bool "KZM9D board"
- depends on ARCH_EMEV2
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+ select SMSC_PHY if SMSC911X
-
- config MACH_LAGER
- bool "Lager board"
---
-2.1.2
-
diff --git a/patches.renesas/0261-ARM-shmobile-mackerel-Conditionally-select-SMSC_PHY.patch b/patches.renesas/0261-ARM-shmobile-mackerel-Conditionally-select-SMSC_PHY.patch
deleted file mode 100644
index b24d410684fcb..0000000000000
--- a/patches.renesas/0261-ARM-shmobile-mackerel-Conditionally-select-SMSC_PHY.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6c5f9da5c2e65c6fb3e66a8194c78b62002c68cf Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 7 Jan 2014 15:23:47 +0900
-Subject: ARM: shmobile: mackerel: Conditionally select SMSC_PHY
-
-The mackerel board uses has an SMSC911X ethernet controller which uses an
-SMSC phy. Select SMSC_PHY for mackerel if SMSC911X is enabled to make use of the
-SMSC-specific phy driver rather than relying on the generic phy driver.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c5c2a294a4b24778cd3cab880bf05becee471edb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index b4a42e5401a8..86f2644cc387 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -177,6 +177,7 @@ config MACH_MACKEREL
- depends on ARCH_SH7372
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+ select SMSC_PHY if SMSC911X
- select SND_SOC_AK4642 if SND_SIMPLE_CARD
- select USE_OF
-
---
-2.1.2
-
diff --git a/patches.renesas/0262-ARM-shmobile-marzen-Conditionally-select-SMSC_PHY.patch b/patches.renesas/0262-ARM-shmobile-marzen-Conditionally-select-SMSC_PHY.patch
deleted file mode 100644
index e515a159f0844..0000000000000
--- a/patches.renesas/0262-ARM-shmobile-marzen-Conditionally-select-SMSC_PHY.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 63d4b3d3855dbc8cc57a57d2694725fb6ef2c68e Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 7 Jan 2014 15:23:47 +0900
-Subject: ARM: shmobile: marzen: Conditionally select SMSC_PHY
-
-The marzen board uses has an SMSC911X ethernet controller which uses an
-SMSC phy. Select SMSC_PHY for marzen if SMSC911X is enabled to make use of the
-SMSC-specific phy driver rather than relying on the generic phy driver.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 317af6612ee29dfcb5ae04df9c58e9f79fc8d4ff)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 86f2644cc387..d67f4b9774f6 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -250,6 +250,7 @@ config MACH_MARZEN
- depends on ARCH_R8A7779
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+ select SMSC_PHY if SMSC911X
- select USE_OF
-
- config MACH_MARZEN_REFERENCE
-@@ -257,6 +258,7 @@ config MACH_MARZEN_REFERENCE
- depends on ARCH_R8A7779
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+ select SMSC_PHY if SMSC911X
- select USE_OF
- ---help---
- Use reference implementation of Marzen board support
---
-2.1.2
-
diff --git a/patches.renesas/0263-ARM-shmobile-lager-fix-error-return-code-check-from-.patch b/patches.renesas/0263-ARM-shmobile-lager-fix-error-return-code-check-from-.patch
deleted file mode 100644
index 7927f811e3dc6..0000000000000
--- a/patches.renesas/0263-ARM-shmobile-lager-fix-error-return-code-check-from-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From bf8ed5ec6bcae9971d44937dc4b5915fa2547c4c Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Tue, 14 Jan 2014 18:43:26 +0000
-Subject: ARM: shmobile: lager: fix error return code check from clk_get()
-
-The lager_add_standard_devices() function calls clk_get() but then fails
-to check that it returns an error pointer instead of NULL on failure.
-
-This was added by 4a606af2 ("ARM: shmobile: lager-reference: Instantiate
-clkdevs for SCIF and CMT") patch in Simon Horman's renesas-boards2-for-v3.14
-tag.
-
-The issue is not serious as it does not cause a crash and seems to not be
-actually causing any issues now the other clock bugs have been fixed.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-[horms+renesas@verge.net.au: tweaked changelog]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 7a543d8124e7e23190d36e7c57d3b9c394c4e4c1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index a6e271d92af0..dc8d76b9a9f1 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -44,14 +44,14 @@ static void __init lager_add_standard_devices(void)
-
- for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
- clk = clk_get(NULL, scif_names[i]);
-- if (clk) {
-+ if (!IS_ERR(clk)) {
- clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
- clk_put(clk);
- }
- }
-
- clk = clk_get(NULL, "cmt0");
-- if (clk) {
-+ if (!IS_ERR(clk)) {
- clk_register_clkdev(clk, NULL, "sh_cmt.0");
- clk_put(clk);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0264-ARM-shmobile-koelsch-fix-error-return-code-check-fro.patch b/patches.renesas/0264-ARM-shmobile-koelsch-fix-error-return-code-check-fro.patch
deleted file mode 100644
index 4bfc11fe38527..0000000000000
--- a/patches.renesas/0264-ARM-shmobile-koelsch-fix-error-return-code-check-fro.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 4e386a2f54ec540bb0da28ab0442563f0d7ad87f Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Tue, 14 Jan 2014 18:43:27 +0000
-Subject: ARM: shmobile: koelsch: fix error return code check from clk_get()
-
-The koelsch_add_standard_devices() function calls clk_get() but then fails
-to check that it returns an error pointer instead of NULL on failure.
-
-This was added by f31239ef ("ARM: shmobile: koelsch-reference:
-Instantiate clkdevs for SCIF and CMT") in Simon Horman's
-renesas-boards2-for-v3.14 tag.
-
-The issue is not serious as it does not cause a crash and seems to not be
-actually causing any issues now the other clock bugs have been fixed.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-[horms+renesas@verge.net.au: tweaked changelog]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit ca1187521b78ce4f980cd1b457f8c634dd401021)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 652b59268416..feb8d97ea2f7 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -45,14 +45,14 @@ static void __init koelsch_add_standard_devices(void)
-
- for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
- clk = clk_get(NULL, scif_names[i]);
-- if (clk) {
-+ if (!IS_ERR(clk)) {
- clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
- clk_put(clk);
- }
- }
-
- clk = clk_get(NULL, "cmt0");
-- if (clk) {
-+ if (!IS_ERR(clk)) {
- clk_register_clkdev(clk, NULL, "sh_cmt.0");
- clk_put(clk);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0265-ARM-shmobile-lager-Add-USBHS-support.patch b/patches.renesas/0265-ARM-shmobile-lager-Add-USBHS-support.patch
deleted file mode 100644
index 1a28084737bc1..0000000000000
--- a/patches.renesas/0265-ARM-shmobile-lager-Add-USBHS-support.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-From 5fe073b39a005a914c0650290142642afbe27f95 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Sat, 25 Jan 2014 02:28:47 +0400
-Subject: ARM: shmobile: lager: Add USBHS support
-
-This adds USBHS PHY and registers USBHS device if the driver is enabled.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1eabe028f8aacd7367fbdda9596cd3d64659a49f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 138 +++++++++++++++++++++++++++++++++++
- 1 file changed, 138 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 8dde4462f600..4a95a4593eb1 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -30,6 +30,7 @@
- #include <linux/platform_data/camera-rcar.h>
- #include <linux/platform_data/gpio-rcar.h>
- #include <linux/platform_data/rcar-du.h>
-+#include <linux/platform_data/usb-rcar-gen2-phy.h>
- #include <linux/platform_device.h>
- #include <linux/phy.h>
- #include <linux/regulator/driver.h>
-@@ -37,6 +38,8 @@
- #include <linux/regulator/gpio-regulator.h>
- #include <linux/regulator/machine.h>
- #include <linux/sh_eth.h>
-+#include <linux/usb/phy.h>
-+#include <linux/usb/renesas_usbhs.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/r8a7790.h>
-@@ -364,6 +367,131 @@ static const struct platform_device_info sata1_info __initconst = {
- .dma_mask = DMA_BIT_MASK(32),
- };
-
-+/* USBHS */
-+#if IS_ENABLED(CONFIG_USB_RENESAS_USBHS_UDC)
-+static const struct resource usbhs_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xe6590000, 0x100),
-+ DEFINE_RES_IRQ(gic_spi(107)),
-+};
-+
-+struct usbhs_private {
-+ struct renesas_usbhs_platform_info info;
-+ struct usb_phy *phy;
-+};
-+
-+#define usbhs_get_priv(pdev) \
-+ container_of(renesas_usbhs_get_info(pdev), struct usbhs_private, info)
-+
-+static int usbhs_power_ctrl(struct platform_device *pdev,
-+ void __iomem *base, int enable)
-+{
-+ struct usbhs_private *priv = usbhs_get_priv(pdev);
-+
-+ if (!priv->phy)
-+ return -ENODEV;
-+
-+ if (enable) {
-+ int retval = usb_phy_init(priv->phy);
-+
-+ if (!retval)
-+ retval = usb_phy_set_suspend(priv->phy, 0);
-+ return retval;
-+ }
-+
-+ usb_phy_set_suspend(priv->phy, 1);
-+ usb_phy_shutdown(priv->phy);
-+ return 0;
-+}
-+
-+static int usbhs_hardware_init(struct platform_device *pdev)
-+{
-+ struct usbhs_private *priv = usbhs_get_priv(pdev);
-+ struct usb_phy *phy;
-+
-+ phy = usb_get_phy_dev(&pdev->dev, 0);
-+ if (IS_ERR(phy))
-+ return PTR_ERR(phy);
-+
-+ priv->phy = phy;
-+ return 0;
-+}
-+
-+static int usbhs_hardware_exit(struct platform_device *pdev)
-+{
-+ struct usbhs_private *priv = usbhs_get_priv(pdev);
-+
-+ if (!priv->phy)
-+ return 0;
-+
-+ usb_put_phy(priv->phy);
-+ priv->phy = NULL;
-+ return 0;
-+}
-+
-+static int usbhs_get_id(struct platform_device *pdev)
-+{
-+ return USBHS_GADGET;
-+}
-+
-+static u32 lager_usbhs_pipe_type[] = {
-+ USB_ENDPOINT_XFER_CONTROL,
-+ USB_ENDPOINT_XFER_ISOC,
-+ USB_ENDPOINT_XFER_ISOC,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_INT,
-+ USB_ENDPOINT_XFER_INT,
-+ USB_ENDPOINT_XFER_INT,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+};
-+
-+static struct usbhs_private usbhs_priv __initdata = {
-+ .info = {
-+ .platform_callback = {
-+ .power_ctrl = usbhs_power_ctrl,
-+ .hardware_init = usbhs_hardware_init,
-+ .hardware_exit = usbhs_hardware_exit,
-+ .get_id = usbhs_get_id,
-+ },
-+ .driver_param = {
-+ .buswait_bwait = 4,
-+ .pipe_type = lager_usbhs_pipe_type,
-+ .pipe_size = ARRAY_SIZE(lager_usbhs_pipe_type),
-+ },
-+ }
-+};
-+
-+static void __init lager_register_usbhs(void)
-+{
-+ usb_bind_phy("renesas_usbhs", 0, "usb_phy_rcar_gen2");
-+ platform_device_register_resndata(&platform_bus,
-+ "renesas_usbhs", -1,
-+ usbhs_resources,
-+ ARRAY_SIZE(usbhs_resources),
-+ &usbhs_priv.info,
-+ sizeof(usbhs_priv.info));
-+}
-+#else /* CONFIG_USB_RENESAS_USBHS_UDC */
-+static inline void lager_register_usbhs(void) { }
-+#endif /* CONFIG_USB_RENESAS_USBHS_UDC */
-+
-+/* USBHS PHY */
-+static const struct rcar_gen2_phy_platform_data usbhs_phy_pdata __initconst = {
-+ .chan0_pci = 0, /* Channel 0 is USBHS */
-+ .chan2_pci = 1, /* Channel 2 is PCI USB */
-+};
-+
-+static const struct resource usbhs_phy_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xe6590100, 0x100),
-+};
-+
- static const struct pinctrl_map lager_pinctrl_map[] = {
- /* DU (CN10: ARGB0, CN13: LVDS) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
-@@ -408,6 +536,9 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- "vin1_data8", "vin1"),
- PIN_MAP_MUX_GROUP_DEFAULT("r8a7790-vin.1", "pfc-r8a7790",
- "vin1_clk", "vin1"),
-+ /* USB0 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790",
-+ "usb0", "usb0"),
- };
-
- static void __init lager_add_standard_devices(void)
-@@ -461,6 +592,13 @@ static void __init lager_add_standard_devices(void)
- lager_add_camera1_device();
-
- platform_device_register_full(&sata1_info);
-+
-+ platform_device_register_resndata(&platform_bus, "usb_phy_rcar_gen2",
-+ -1, usbhs_phy_resources,
-+ ARRAY_SIZE(usbhs_phy_resources),
-+ &usbhs_phy_pdata,
-+ sizeof(usbhs_phy_pdata));
-+ lager_register_usbhs();
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0266-ARM-shmobile-Remove-Lager-USBHS-UDC-ifdefs.patch b/patches.renesas/0266-ARM-shmobile-Remove-Lager-USBHS-UDC-ifdefs.patch
deleted file mode 100644
index b95e67690ddf5..0000000000000
--- a/patches.renesas/0266-ARM-shmobile-Remove-Lager-USBHS-UDC-ifdefs.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 08fd6f65fe0bd9c7f77c0d9bf3b7d6d9359640ed Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 30 Jan 2014 08:10:09 +0900
-Subject: ARM: shmobile: Remove Lager USBHS UDC ifdefs
-
-Remove ifdefs to make the Lager USBHS device always present.
-This makes it more like other devices, no need to be special.
-
-Also, these ifdefs by themselves do not hurt much, but combined
-with USB Host device ifdefs that were proposed earlier we could
-basically end up with a kernel that drives VBUS incorrectly
-depending on the kernel configuration - lets not do that.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 235cda29e4d5047622ff9b82b1f0b4cb6cf95f6c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 4a95a4593eb1..fdcc868de1fa 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -368,7 +368,6 @@ static const struct platform_device_info sata1_info __initconst = {
- };
-
- /* USBHS */
--#if IS_ENABLED(CONFIG_USB_RENESAS_USBHS_UDC)
- static const struct resource usbhs_resources[] __initconst = {
- DEFINE_RES_MEM(0xe6590000, 0x100),
- DEFINE_RES_IRQ(gic_spi(107)),
-@@ -478,9 +477,6 @@ static void __init lager_register_usbhs(void)
- &usbhs_priv.info,
- sizeof(usbhs_priv.info));
- }
--#else /* CONFIG_USB_RENESAS_USBHS_UDC */
--static inline void lager_register_usbhs(void) { }
--#endif /* CONFIG_USB_RENESAS_USBHS_UDC */
-
- /* USBHS PHY */
- static const struct rcar_gen2_phy_platform_data usbhs_phy_pdata __initconst = {
---
-2.1.2
-
diff --git a/patches.renesas/0267-ARM-shmobile-Lager-pass-Ether-PHY-IRQ.patch b/patches.renesas/0267-ARM-shmobile-Lager-pass-Ether-PHY-IRQ.patch
deleted file mode 100644
index fce3935ab5164..0000000000000
--- a/patches.renesas/0267-ARM-shmobile-Lager-pass-Ether-PHY-IRQ.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 545c226e7992deed9123d1853e1016bcd188549a Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 4 Feb 2014 18:53:50 +0300
-Subject: ARM: shmobile: Lager: pass Ether PHY IRQ
-
-Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
-trigger type to be low-level as per the Micrel PHY driver's setup.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Magnus Damm <magnus.damm@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5812b8b2bcc35e7928c0e5616bbe35a0e97c7749)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index fdcc868de1fa..30ebd0805a34 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -22,6 +22,7 @@
- #include <linux/gpio_keys.h>
- #include <linux/input.h>
- #include <linux/interrupt.h>
-+#include <linux/irq.h>
- #include <linux/kernel.h>
- #include <linux/leds.h>
- #include <linux/mmc/host.h>
-@@ -233,6 +234,7 @@ static const struct resource mmcif1_resources[] __initconst = {
- /* Ether */
- static const struct sh_eth_plat_data ether_pdata __initconst = {
- .phy = 0x1,
-+ .phy_irq = irq_pin(0),
- .edmac_endian = EDMAC_LITTLE_ENDIAN,
- .phy_interface = PHY_INTERFACE_MODE_RMII,
- .ether_link_active_low = 1,
-@@ -618,6 +620,8 @@ static void __init lager_init(void)
- {
- lager_add_standard_devices();
-
-+ irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
-+
- if (IS_ENABLED(CONFIG_PHYLIB))
- phy_register_fixup_for_id("r8a7790-ether-ff:01",
- lager_ksz8041_fixup);
---
-2.1.2
-
diff --git a/patches.renesas/0268-ARM-shmobile-Koelsch-pass-Ether-PHY-IRQ.patch b/patches.renesas/0268-ARM-shmobile-Koelsch-pass-Ether-PHY-IRQ.patch
deleted file mode 100644
index 4047e676a71c8..0000000000000
--- a/patches.renesas/0268-ARM-shmobile-Koelsch-pass-Ether-PHY-IRQ.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 5915cb53ebd071e4123fae6b9bc7016fde68bd24 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 4 Feb 2014 18:55:32 +0300
-Subject: ARM: shmobile: Koelsch: pass Ether PHY IRQ
-
-Pass Ether's PHY IRQ (which is IRQC's IRQ0) to the 'sh_eth' driver. Set the IRQ
-trigger type to be low-level as per the Micrel PHY driver's setup.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Magnus Damm <magnus.damm@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 29d9f010d7103f2b83ce1c25999a6f3a1e57f5e2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 2ab5c75ba2c2..1ec3b91b475c 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -23,6 +23,7 @@
- #include <linux/gpio.h>
- #include <linux/gpio_keys.h>
- #include <linux/input.h>
-+#include <linux/irq.h>
- #include <linux/kernel.h>
- #include <linux/leds.h>
- #include <linux/phy.h>
-@@ -92,6 +93,7 @@ static void __init koelsch_add_du_device(void)
- /* Ether */
- static const struct sh_eth_plat_data ether_pdata __initconst = {
- .phy = 0x1,
-+ .phy_irq = irq_pin(0),
- .edmac_endian = EDMAC_LITTLE_ENDIAN,
- .phy_interface = PHY_INTERFACE_MODE_RMII,
- .ether_link_active_low = 1,
-@@ -232,6 +234,8 @@ static void __init koelsch_init(void)
- {
- koelsch_add_standard_devices();
-
-+ irq_set_irq_type(irq_pin(0), IRQ_TYPE_LEVEL_LOW);
-+
- if (IS_ENABLED(CONFIG_PHYLIB))
- phy_register_fixup_for_id("r8a7791-ether-ff:01",
- koelsch_ksz8041_fixup);
---
-2.1.2
-
diff --git a/patches.renesas/0269-ARM-shmobile-koelsch-Add-I2C-support.patch b/patches.renesas/0269-ARM-shmobile-koelsch-Add-I2C-support.patch
deleted file mode 100644
index f1bbd77a8c981..0000000000000
--- a/patches.renesas/0269-ARM-shmobile-koelsch-Add-I2C-support.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 625fc194e833471fd38b79383d284e62a3b9a6c8 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Tue, 4 Feb 2014 22:48:20 +0400
-Subject: ARM: shmobile: koelsch: Add I2C support
-
-This adds I2C[1245] busses support to Koelsch board.
-I2C[03] do not have any slave devices connected and
-are not used because of the following:
-* I2C0 pins are multiplexed with LBSC pins;
-* I2C3 pins are multiplexed with EtherMAC and VIN0 pins.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 12c1d5a54e874f26d08fa27f13f63ef7ccf38a2a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 46 ++++++++++++++++++++++++++++++++++
- 1 file changed, 46 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 1ec3b91b475c..2741dba74aaa 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -165,6 +165,38 @@ static const struct platform_device_info sata0_info __initconst = {
- .dma_mask = DMA_BIT_MASK(32),
- };
-
-+/* I2C */
-+static const struct resource i2c_resources[] __initconst = {
-+ /* I2C0 */
-+ DEFINE_RES_MEM(0xE6508000, 0x40),
-+ DEFINE_RES_IRQ(gic_spi(287)),
-+ /* I2C1 */
-+ DEFINE_RES_MEM(0xE6518000, 0x40),
-+ DEFINE_RES_IRQ(gic_spi(288)),
-+ /* I2C2 */
-+ DEFINE_RES_MEM(0xE6530000, 0x40),
-+ DEFINE_RES_IRQ(gic_spi(286)),
-+ /* I2C3 */
-+ DEFINE_RES_MEM(0xE6540000, 0x40),
-+ DEFINE_RES_IRQ(gic_spi(290)),
-+ /* I2C4 */
-+ DEFINE_RES_MEM(0xE6520000, 0x40),
-+ DEFINE_RES_IRQ(gic_spi(19)),
-+ /* I2C5 */
-+ DEFINE_RES_MEM(0xE6528000, 0x40),
-+ DEFINE_RES_IRQ(gic_spi(20)),
-+};
-+
-+static void __init koelsch_add_i2c(unsigned idx)
-+{
-+ unsigned res_idx = idx * 2;
-+
-+ BUG_ON(res_idx >= ARRAY_SIZE(i2c_resources));
-+
-+ platform_device_register_simple("i2c-rcar_gen2", idx,
-+ i2c_resources + res_idx, 2);
-+}
-+
- static const struct pinctrl_map koelsch_pinctrl_map[] = {
- /* DU */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
-@@ -188,6 +220,15 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = {
- /* SCIF1 (CN20: DEBUG SERIAL1) */
- PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7791",
- "scif1_data_d", "scif1"),
-+ /* I2C1 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.1", "pfc-r8a7791",
-+ "i2c1_e", "i2c1"),
-+ /* I2C2 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.2", "pfc-r8a7791",
-+ "i2c2", "i2c2"),
-+ /* I2C4 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791",
-+ "i2c4_c", "i2c4"),
- };
-
- static void __init koelsch_add_standard_devices(void)
-@@ -211,6 +252,11 @@ static void __init koelsch_add_standard_devices(void)
- koelsch_add_du_device();
-
- platform_device_register_full(&sata0_info);
-+
-+ koelsch_add_i2c(1);
-+ koelsch_add_i2c(2);
-+ koelsch_add_i2c(4);
-+ koelsch_add_i2c(5);
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0270-ARM-shmobile-koelsch-Enable-I2C-in-defconfig.patch b/patches.renesas/0270-ARM-shmobile-koelsch-Enable-I2C-in-defconfig.patch
deleted file mode 100644
index 7fa23cee02d37..0000000000000
--- a/patches.renesas/0270-ARM-shmobile-koelsch-Enable-I2C-in-defconfig.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 832bfcf55e8b312b66e0a8965a6284e69f18ea91 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Tue, 4 Feb 2014 22:48:22 +0400
-Subject: ARM: shmobile: koelsch: Enable I2C in defconfig
-
-This enables I2C support in koelsch_defconfig.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ab44f75f1142edde5737203a0d259853f34686fb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/koelsch_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
-index 30157975998a..c3b3c9d1d4e8 100644
---- a/arch/arm/configs/koelsch_defconfig
-+++ b/arch/arm/configs/koelsch_defconfig
-@@ -62,6 +62,8 @@ CONFIG_SH_ETH=y
- CONFIG_SERIAL_SH_SCI=y
- CONFIG_SERIAL_SH_SCI_NR_UARTS=20
- CONFIG_SERIAL_SH_SCI_CONSOLE=y
-+CONFIG_I2C=y
-+CONFIG_I2C_RCAR=y
- # CONFIG_HWMON is not set
- CONFIG_THERMAL=y
- CONFIG_RCAR_THERMAL=y
---
-2.1.2
-
diff --git a/patches.renesas/0271-ARM-shmobile-bockw-use-wp-gpios-instead-of-WP-pin.patch b/patches.renesas/0271-ARM-shmobile-bockw-use-wp-gpios-instead-of-WP-pin.patch
deleted file mode 100644
index 9f8e24920cd2f..0000000000000
--- a/patches.renesas/0271-ARM-shmobile-bockw-use-wp-gpios-instead-of-WP-pin.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 0cbe1f20051b79e7b649af4030cd5c7edf1a7e99 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 30 Jan 2014 21:39:40 -0800
-Subject: ARM: shmobile: bockw: use wp-gpios instead of WP pin
-
-Latest Renesas Chip has some SDHI channels and the WP pin
-availability depends on its channel or HW implementation.
-Thus, this patch decides new policy whch indicates
-WP is disabled as default.
-But, we can use wp-gpios property to enable it as
-other method.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f729dd554e9a04a55950693ea8eca0d3aaa28d22)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-index bb62c7a906f4..06cda19dac6a 100644
---- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-@@ -17,6 +17,7 @@
- /dts-v1/;
- #include "r8a7778.dtsi"
- #include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/gpio/gpio.h>
-
- / {
- model = "bockw";
-@@ -84,7 +85,7 @@
-
- sdhi0_pins: sd0 {
- renesas,groups = "sdhi0_data4", "sdhi0_ctrl",
-- "sdhi0_cd", "sdhi0_wp";
-+ "sdhi0_cd";
- renesas,function = "sdhi0";
- };
-
-@@ -101,6 +102,7 @@
- vmmc-supply = <&fixedregulator3v3>;
- bus-width = <4>;
- status = "okay";
-+ wp-gpios = <&gpio3 18 GPIO_ACTIVE_HIGH>;
- };
-
- &hspi0 {
---
-2.1.2
-
diff --git a/patches.renesas/0272-ARM-shmobile-Lager-USB0-cable-detection-workaround.patch b/patches.renesas/0272-ARM-shmobile-Lager-USB0-cable-detection-workaround.patch
deleted file mode 100644
index 80d049e671a93..0000000000000
--- a/patches.renesas/0272-ARM-shmobile-Lager-USB0-cable-detection-workaround.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 74be9c7a78fea88c2504448fff201d44e8ec0ef9 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 30 Jan 2014 08:10:29 +0900
-Subject: ARM: shmobile: Lager USB0 cable detection workaround
-
-Add Lager board code to check the PWEN GPIO signal and refuse to
-allow probe of the USBHS driver in case of DIP misconfiguration.
-
-For correct operation Lager DIP switches SW5 and SW6 shall be
-configured in 2-3 position to enable USB Function support.
-
-If the DIP switch is configured incorrectly then the user can
-simply adjust the hardware and either reboot or use the bind interface
-to try to probe again:
-
-# echo renesas_usbhs > /sys/bus/platform/drivers/renesas_usbhs/bind
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 36be7686caa05334ca8d52df157b373a41d8d9f1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 25 ++++++++++++++++++++++---
- 1 file changed, 22 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 30ebd0805a34..6a7041f9afa6 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -408,13 +408,30 @@ static int usbhs_hardware_init(struct platform_device *pdev)
- {
- struct usbhs_private *priv = usbhs_get_priv(pdev);
- struct usb_phy *phy;
-+ int ret;
-+
-+ /* USB0 Function - use PWEN as GPIO input to detect DIP Switch SW5
-+ * setting to avoid VBUS short circuit due to wrong cable.
-+ * PWEN should be pulled up high if USB Function is selected by SW5
-+ */
-+ gpio_request_one(RCAR_GP_PIN(5, 18), GPIOF_IN, NULL); /* USB0_PWEN */
-+ if (!gpio_get_value(RCAR_GP_PIN(5, 18))) {
-+ pr_warn("Error: USB Function not selected - check SW5 + SW6\n");
-+ ret = -ENOTSUPP;
-+ goto error;
-+ }
-
- phy = usb_get_phy_dev(&pdev->dev, 0);
-- if (IS_ERR(phy))
-- return PTR_ERR(phy);
-+ if (IS_ERR(phy)) {
-+ ret = PTR_ERR(phy);
-+ goto error;
-+ }
-
- priv->phy = phy;
- return 0;
-+ error:
-+ gpio_free(RCAR_GP_PIN(5, 18));
-+ return ret;
- }
-
- static int usbhs_hardware_exit(struct platform_device *pdev)
-@@ -426,6 +443,8 @@ static int usbhs_hardware_exit(struct platform_device *pdev)
-
- usb_put_phy(priv->phy);
- priv->phy = NULL;
-+
-+ gpio_free(RCAR_GP_PIN(5, 18));
- return 0;
- }
-
-@@ -536,7 +555,7 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- "vin1_clk", "vin1"),
- /* USB0 */
- PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790",
-- "usb0", "usb0"),
-+ "usb0_ovc_vbus", "usb0"),
- };
-
- static void __init lager_add_standard_devices(void)
---
-2.1.2
-
diff --git a/patches.renesas/0273-ARM-shmobile-lager-add-sound-support.patch b/patches.renesas/0273-ARM-shmobile-lager-add-sound-support.patch
deleted file mode 100644
index 4ad23ae3d45ac..0000000000000
--- a/patches.renesas/0273-ARM-shmobile-lager-add-sound-support.patch
+++ /dev/null
@@ -1,179 +0,0 @@
-From 9032548b7e7ad43969dbd51d27c628fa708746da Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 13 Jan 2014 18:25:50 -0800
-Subject: ARM: shmobile: lager: add sound support
-
-This patch adds sound support for Lager board.
-But, it is using PIO transfer at this point.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-[horms+renesas@verge.net.au: resolved conflicts]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit d58922ce8cadba7e758608fef9438bc183b46b0f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 1 +
- arch/arm/mach-shmobile/board-lager.c | 100 +++++++++++++++++++++++++++++++++++
- 2 files changed, 101 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index d67f4b9774f6..eb25bb9a5d4d 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -272,6 +272,7 @@ config MACH_LAGER
- depends on ARCH_R8A7790
- select USE_OF
- select MICREL_PHY if SH_ETH
-+ select SND_SOC_AK4642 if SND_SIMPLE_CARD
-
- config MACH_KOELSCH
- bool "Koelsch board"
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 6a7041f9afa6..e8242c552da1 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -20,6 +20,7 @@
-
- #include <linux/gpio.h>
- #include <linux/gpio_keys.h>
-+#include <linux/i2c.h>
- #include <linux/input.h>
- #include <linux/interrupt.h>
- #include <linux/irq.h>
-@@ -52,6 +53,20 @@
- #include <linux/spi/flash.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
-+#include <sound/rcar_snd.h>
-+#include <sound/simple_card.h>
-+
-+/*
-+ * SSI-AK4643
-+ *
-+ * SW1: 1: AK4643
-+ * 2: CN22
-+ * 3: ADV7511
-+ *
-+ * this command is required when playback.
-+ *
-+ * # amixer set "LINEOUT Mixer DACL" on
-+ */
-
- /* DU */
- static struct rcar_du_encoder_data lager_du_encoders[] = {
-@@ -509,6 +524,77 @@ static const struct resource usbhs_phy_resources[] __initconst = {
- DEFINE_RES_MEM(0xe6590100, 0x100),
- };
-
-+/* I2C */
-+static struct i2c_board_info i2c2_devices[] = {
-+ {
-+ I2C_BOARD_INFO("ak4643", 0x12),
-+ }
-+};
-+
-+/* Sound */
-+static struct resource rsnd_resources[] __initdata = {
-+ [RSND_GEN2_SCU] = DEFINE_RES_MEM(0xec500000, 0x1000),
-+ [RSND_GEN2_ADG] = DEFINE_RES_MEM(0xec5a0000, 0x100),
-+ [RSND_GEN2_SSIU] = DEFINE_RES_MEM(0xec540000, 0x1000),
-+ [RSND_GEN2_SSI] = DEFINE_RES_MEM(0xec541000, 0x1280),
-+};
-+
-+static struct rsnd_ssi_platform_info rsnd_ssi[] = {
-+ RSND_SSI_SET(0, 0, gic_spi(370), RSND_SSI_PLAY),
-+ RSND_SSI_SET(0, 0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE),
-+};
-+
-+static struct rsnd_scu_platform_info rsnd_scu[2] = {
-+ /* no member at this point */
-+};
-+
-+static struct rcar_snd_info rsnd_info = {
-+ .flags = RSND_GEN2,
-+ .ssi_info = rsnd_ssi,
-+ .ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
-+ .scu_info = rsnd_scu,
-+ .scu_info_nr = ARRAY_SIZE(rsnd_scu),
-+};
-+
-+static struct asoc_simple_card_info rsnd_card_info = {
-+ .name = "AK4643",
-+ .card = "SSI01-AK4643",
-+ .codec = "ak4642-codec.2-0012",
-+ .platform = "rcar_sound",
-+ .daifmt = SND_SOC_DAIFMT_LEFT_J,
-+ .cpu_dai = {
-+ .name = "rcar_sound",
-+ .fmt = SND_SOC_DAIFMT_CBS_CFS,
-+ },
-+ .codec_dai = {
-+ .name = "ak4642-hifi",
-+ .fmt = SND_SOC_DAIFMT_CBM_CFM,
-+ .sysclk = 11289600,
-+ },
-+};
-+
-+static void __init lager_add_rsnd_device(void)
-+{
-+ struct platform_device_info cardinfo = {
-+ .parent = &platform_bus,
-+ .name = "asoc-simple-card",
-+ .id = -1,
-+ .data = &rsnd_card_info,
-+ .size_data = sizeof(struct asoc_simple_card_info),
-+ .dma_mask = DMA_BIT_MASK(32),
-+ };
-+
-+ i2c_register_board_info(2, i2c2_devices,
-+ ARRAY_SIZE(i2c2_devices));
-+
-+ platform_device_register_resndata(
-+ &platform_bus, "rcar_sound", -1,
-+ rsnd_resources, ARRAY_SIZE(rsnd_resources),
-+ &rsnd_info, sizeof(rsnd_info));
-+
-+ platform_device_register_full(&cardinfo);
-+}
-+
- static const struct pinctrl_map lager_pinctrl_map[] = {
- /* DU (CN10: ARGB0, CN13: LVDS) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
-@@ -517,12 +603,24 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- "du_sync_1", "du"),
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
- "du_clk_out_0", "du"),
-+ /* I2C2 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar.2", "pfc-r8a7790",
-+ "i2c2", "i2c2"),
- /* SCIF0 (CN19: DEBUG SERIAL0) */
- PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
- "scif0_data", "scif0"),
- /* SCIF1 (CN20: DEBUG SERIAL1) */
- PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
- "scif1_data", "scif1"),
-+ /* SSI (CN17: sound) */
-+ PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790",
-+ "ssi0129_ctrl", "ssi"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790",
-+ "ssi0_data", "ssi"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790",
-+ "ssi1_data", "ssi"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790",
-+ "audio_clk_a", "audio_clk"),
- /* MMCIF1 */
- PIN_MAP_MUX_GROUP_DEFAULT("sh_mmcif.1", "pfc-r8a7790",
- "mmc1_data8", "mmc1"),
-@@ -616,6 +714,8 @@ static void __init lager_add_standard_devices(void)
- &usbhs_phy_pdata,
- sizeof(usbhs_phy_pdata));
- lager_register_usbhs();
-+
-+ lager_add_rsnd_device();
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0274-ARM-shmobile-lager-add-sound-support-on-defconfig.patch b/patches.renesas/0274-ARM-shmobile-lager-add-sound-support-on-defconfig.patch
deleted file mode 100644
index 12b6aa4b671ae..0000000000000
--- a/patches.renesas/0274-ARM-shmobile-lager-add-sound-support-on-defconfig.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 921bd6b201d76e68860485af07e24e86fcfc0187 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 13 Jan 2014 18:26:00 -0800
-Subject: ARM: shmobile: lager: add sound support on defconfig
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 90bdadf5b05be16e7ba663ba8b9e42d20dcef861)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/lager_defconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig
-index 3e7e0aef26c9..b17f48739013 100644
---- a/arch/arm/configs/lager_defconfig
-+++ b/arch/arm/configs/lager_defconfig
-@@ -105,6 +105,10 @@ CONFIG_VIDEO_RCAR_VIN=y
- CONFIG_VIDEO_ADV7180=y
- CONFIG_DRM=y
- CONFIG_DRM_RCAR_DU=y
-+CONFIG_SOUND=y
-+CONFIG_SND=y
-+CONFIG_SND_SOC=y
-+CONFIG_SND_SOC_RCAR=y
- # CONFIG_USB_SUPPORT is not set
- CONFIG_MMC=y
- CONFIG_MMC_SDHI=y
---
-2.1.2
-
diff --git a/patches.renesas/0275-Revert-ARM-shmobile-marzen-Conditionally-select-SMSC.patch b/patches.renesas/0275-Revert-ARM-shmobile-marzen-Conditionally-select-SMSC.patch
deleted file mode 100644
index ea6cd0228240e..0000000000000
--- a/patches.renesas/0275-Revert-ARM-shmobile-marzen-Conditionally-select-SMSC.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From bedc61eb247902b7b27c6a5295bb598ea2e49320 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 6 Feb 2014 17:54:02 +0900
-Subject: Revert "ARM: shmobile: marzen: Conditionally select SMSC_PHY"
-
-This reverts commit 317af6612ee29dfcb5ae04df9c58e9f79fc8d4ff.
-
-This seems to prevent the board from booting now that the tree has been
-rebased on v3.14-rc1.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c73c7ff8d5b1f4ee0bb9cd7c57c37782954b2246)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index eb25bb9a5d4d..deb6dc884bf0 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -250,7 +250,6 @@ config MACH_MARZEN
- depends on ARCH_R8A7779
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-- select SMSC_PHY if SMSC911X
- select USE_OF
-
- config MACH_MARZEN_REFERENCE
-@@ -258,7 +257,6 @@ config MACH_MARZEN_REFERENCE
- depends on ARCH_R8A7779
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-- select SMSC_PHY if SMSC911X
- select USE_OF
- ---help---
- Use reference implementation of Marzen board support
---
-2.1.2
-
diff --git a/patches.renesas/0276-ARM-shmobile-genmai-legacy-Add-RSPI-support.patch b/patches.renesas/0276-ARM-shmobile-genmai-legacy-Add-RSPI-support.patch
deleted file mode 100644
index 45722429c04ba..0000000000000
--- a/patches.renesas/0276-ARM-shmobile-genmai-legacy-Add-RSPI-support.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 20b54b0aeb02bcab6df237edd65fb9b69eaaf6c5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:23:56 +0100
-Subject: ARM: shmobile: genmai legacy: Add RSPI support
-
-Add RSPI platform device, resources, platform data, and SPI child.
-
-On this board, only rspi4 is in use. Its bus contains a single device
-(a wm8978 audio codec).
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 664517474c4993c5d560d0e394c36583b7c99535)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai.c | 44 +++++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index 3e92e3c62d4c..c4064610e223 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -20,15 +20,59 @@
-
- #include <linux/kernel.h>
- #include <linux/platform_device.h>
-+#include <linux/spi/rspi.h>
-+#include <linux/spi/spi.h>
- #include <mach/common.h>
-+#include <mach/irqs.h>
- #include <mach/r7s72100.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-
-+/* RSPI */
-+#define RSPI_RESOURCE(idx, baseaddr, irq) \
-+static const struct resource rspi##idx##_resources[] __initconst = { \
-+ DEFINE_RES_MEM(baseaddr, 0x24), \
-+ DEFINE_RES_IRQ_NAMED(irq, "error"), \
-+ DEFINE_RES_IRQ_NAMED(irq + 1, "rx"), \
-+ DEFINE_RES_IRQ_NAMED(irq + 2, "tx"), \
-+}
-+
-+RSPI_RESOURCE(0, 0xe800c800, gic_iid(270));
-+RSPI_RESOURCE(1, 0xe800d000, gic_iid(273));
-+RSPI_RESOURCE(2, 0xe800d800, gic_iid(276));
-+RSPI_RESOURCE(3, 0xe800e000, gic_iid(279));
-+RSPI_RESOURCE(4, 0xe800e800, gic_iid(282));
-+
-+static const struct rspi_plat_data rspi_pdata __initconst = {
-+ .num_chipselect = 1,
-+};
-+
-+#define r7s72100_register_rspi(idx) \
-+ platform_device_register_resndata(&platform_bus, "rspi-rz", idx, \
-+ rspi##idx##_resources, \
-+ ARRAY_SIZE(rspi##idx##_resources), \
-+ &rspi_pdata, sizeof(rspi_pdata))
-+
-+static const struct spi_board_info spi_info[] __initconst = {
-+ {
-+ .modalias = "wm8978",
-+ .max_speed_hz = 5000000,
-+ .bus_num = 4,
-+ .chip_select = 0,
-+ },
-+};
-+
- static void __init genmai_add_standard_devices(void)
- {
- r7s72100_clock_init();
- r7s72100_add_dt_devices();
-+
-+ r7s72100_register_rspi(0);
-+ r7s72100_register_rspi(1);
-+ r7s72100_register_rspi(2);
-+ r7s72100_register_rspi(3);
-+ r7s72100_register_rspi(4);
-+ spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
- }
-
- static const char * const genmai_boards_compat_dt[] __initconst = {
---
-2.1.2
-
diff --git a/patches.renesas/0277-ARM-shmobile-r7s72100-dtsi-Add-RSPI-nodes.patch b/patches.renesas/0277-ARM-shmobile-r7s72100-dtsi-Add-RSPI-nodes.patch
deleted file mode 100644
index 7d42936702715..0000000000000
--- a/patches.renesas/0277-ARM-shmobile-r7s72100-dtsi-Add-RSPI-nodes.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From f50707e0e538412cdcc0109d01eb7fe69053c0de Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:23:59 +0100
-Subject: ARM: shmobile: r7s72100 dtsi: Add RSPI nodes
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4b18e83f5d77c783d2d2092d0015ccda5fecaa8c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 2 +-
- arch/arm/boot/dts/r7s72100.dtsi | 75 +++++++++++++++++++++++++
- 2 files changed, 76 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-index da19c70ed82b..0849017e9d2f 100644
---- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-+++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-@@ -9,7 +9,7 @@
- */
-
- /dts-v1/;
--/include/ "r7s72100.dtsi"
-+#include "r7s72100.dtsi"
-
- / {
- model = "Genmai";
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index 46b82aa7dc4e..9be67a16fc6f 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -8,12 +8,22 @@
- * kind, whether express or implied.
- */
-
-+#include <dt-bindings/interrupt-controller/irq.h>
-+
- / {
- compatible = "renesas,r7s72100";
- interrupt-parent = <&gic>;
- #address-cells = <1>;
- #size-cells = <1>;
-
-+ aliases {
-+ spi0 = &spi0;
-+ spi1 = &spi1;
-+ spi2 = &spi2;
-+ spi3 = &spi3;
-+ spi4 = &spi4;
-+ };
-+
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -33,4 +43,69 @@
- reg = <0xe8201000 0x1000>,
- <0xe8202000 0x1000>;
- };
-+
-+ spi0: spi@e800c800 {
-+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
-+ reg = <0xe800c800 0x24>;
-+ interrupts = <0 238 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 239 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 240 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "error", "rx", "tx";
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ spi1: spi@e800d000 {
-+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
-+ reg = <0xe800d000 0x24>;
-+ interrupts = <0 241 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 242 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 243 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "error", "rx", "tx";
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ spi2: spi@e800d800 {
-+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
-+ reg = <0xe800d800 0x24>;
-+ interrupts = <0 244 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 245 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 246 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "error", "rx", "tx";
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ spi3: spi@e800e000 {
-+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
-+ reg = <0xe800e000 0x24>;
-+ interrupts = <0 247 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 248 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 249 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "error", "rx", "tx";
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ spi4: spi@e800e800 {
-+ compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
-+ reg = <0xe800e800 0x24>;
-+ interrupts = <0 250 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 251 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 252 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "error", "rx", "tx";
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0278-ARM-shmobile-koelsch-legacy-Add-QSPI-support.patch b/patches.renesas/0278-ARM-shmobile-koelsch-legacy-Add-QSPI-support.patch
deleted file mode 100644
index 9742cbeeac396..0000000000000
--- a/patches.renesas/0278-ARM-shmobile-koelsch-legacy-Add-QSPI-support.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 1a8313127bdf45d896daa16b4dcd6ba31226c644 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:24:01 +0100
-Subject: ARM: shmobile: koelsch legacy: Add QSPI support
-
-Enable support for the Spansion s25fl512s SPI FLASH on the Koelsch board:
- - Add QSPI platform device, resources, platform data, and pinmux,
- - Add FLASH data and MTD partitions.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bcca4e8e5b6383cea9a2b310d5a964d8db18b9c7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 64 ++++++++++++++++++++++++++++++++++
- 1 file changed, 64 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 2741dba74aaa..d42637db596a 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -26,12 +26,17 @@
- #include <linux/irq.h>
- #include <linux/kernel.h>
- #include <linux/leds.h>
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
- #include <linux/phy.h>
- #include <linux/pinctrl/machine.h>
- #include <linux/platform_data/gpio-rcar.h>
- #include <linux/platform_data/rcar-du.h>
- #include <linux/platform_device.h>
- #include <linux/sh_eth.h>
-+#include <linux/spi/flash.h>
-+#include <linux/spi/rspi.h>
-+#include <linux/spi/spi.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/r8a7791.h>
-@@ -150,6 +155,55 @@ static const struct gpio_keys_platform_data koelsch_keys_pdata __initconst = {
- .nbuttons = ARRAY_SIZE(gpio_buttons),
- };
-
-+/* QSPI */
-+static const struct resource qspi_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xe6b10000, 0x1000),
-+ DEFINE_RES_IRQ_NAMED(gic_spi(184), "mux"),
-+};
-+
-+static const struct rspi_plat_data qspi_pdata __initconst = {
-+ .num_chipselect = 1,
-+};
-+
-+/* SPI Flash memory (Spansion S25FL512SAGMFIG11 64 MiB) */
-+static struct mtd_partition spi_flash_part[] = {
-+ {
-+ .name = "loader",
-+ .offset = 0x00000000,
-+ .size = 512 * 1024,
-+ .mask_flags = MTD_WRITEABLE,
-+ },
-+ {
-+ .name = "bootenv",
-+ .offset = MTDPART_OFS_APPEND,
-+ .size = 512 * 1024,
-+ .mask_flags = MTD_WRITEABLE,
-+ },
-+ {
-+ .name = "data",
-+ .offset = MTDPART_OFS_APPEND,
-+ .size = MTDPART_SIZ_FULL,
-+ },
-+};
-+
-+static const struct flash_platform_data spi_flash_data = {
-+ .name = "m25p80",
-+ .parts = spi_flash_part,
-+ .nr_parts = ARRAY_SIZE(spi_flash_part),
-+ .type = "s25fl512s",
-+};
-+
-+static const struct spi_board_info spi_info[] __initconst = {
-+ {
-+ .modalias = "m25p80",
-+ .platform_data = &spi_flash_data,
-+ .mode = SPI_MODE_0,
-+ .max_speed_hz = 30000000,
-+ .bus_num = 0,
-+ .chip_select = 0,
-+ },
-+};
-+
- /* SATA0 */
- static const struct resource sata0_resources[] __initconst = {
- DEFINE_RES_MEM(0xee300000, 0x2000),
-@@ -214,6 +268,11 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = {
- "eth_rmii", "eth"),
- PIN_MAP_MUX_GROUP_DEFAULT("r8a7791-ether", "pfc-r8a7791",
- "intc_irq0", "intc"),
-+ /* QSPI */
-+ PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791",
-+ "qspi_ctrl", "qspi"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7791",
-+ "qspi_data4", "qspi"),
- /* SCIF0 (CN19: DEBUG SERIAL0) */
- PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7791",
- "scif0_data_d", "scif0"),
-@@ -248,6 +307,11 @@ static void __init koelsch_add_standard_devices(void)
- platform_device_register_data(&platform_bus, "gpio-keys", -1,
- &koelsch_keys_pdata,
- sizeof(koelsch_keys_pdata));
-+ platform_device_register_resndata(&platform_bus, "qspi", 0,
-+ qspi_resources,
-+ ARRAY_SIZE(qspi_resources),
-+ &qspi_pdata, sizeof(qspi_pdata));
-+ spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
-
- koelsch_add_du_device();
-
---
-2.1.2
-
diff --git a/patches.renesas/0279-ARM-shmobile-r8a7791-dtsi-Add-QSPI-node.patch b/patches.renesas/0279-ARM-shmobile-r8a7791-dtsi-Add-QSPI-node.patch
deleted file mode 100644
index 20cd69c68ec14..0000000000000
--- a/patches.renesas/0279-ARM-shmobile-r8a7791-dtsi-Add-QSPI-node.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From bfdabacff00abc1373f4bd2f8fb4e1762253ed06 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:24:03 +0100
-Subject: ARM: shmobile: r8a7791 dtsi: Add QSPI node
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4d5b59cde5b900a1f4a3a07a7a7b709dac1938f9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index d5cc3626dd60..240c4ece1f0c 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -710,4 +710,16 @@
- clock-output-names = "scifa3", "scifa4", "scifa5";
- };
- };
-+
-+ spi: spi@e6b10000 {
-+ compatible = "renesas,qspi-r8a7791", "renesas,qspi";
-+ reg = <0 0xe6b10000 0 0x2c>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_QSPI_MOD>;
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0280-ARM-shmobile-koelsch-dts-Add-QSPI-nodes.patch b/patches.renesas/0280-ARM-shmobile-koelsch-dts-Add-QSPI-nodes.patch
deleted file mode 100644
index ed9db87afebc1..0000000000000
--- a/patches.renesas/0280-ARM-shmobile-koelsch-dts-Add-QSPI-nodes.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 297b07d22adf627ebc5100391fb07a70b36f8aa1 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:24:04 +0100
-Subject: ARM: shmobile: koelsch dts: Add QSPI nodes
-
-Add pinctrl and SPI devices for QSPI on Koelsch.
-Add Spansion s25fl512s SPI FLASH and MTD partitions.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e02ee513eed4bb780848a5cedbd4b39afb395d3e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 36 +++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 74f098596b5c..d4b9bba38685 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -121,8 +121,44 @@
- renesas,groups = "scif1_data_d";
- renesas,function = "scif1";
- };
-+
-+ qspi_pins: spi {
-+ renesas,groups = "qspi_ctrl", "qspi_data4";
-+ renesas,function = "qspi";
-+ };
- };
-
- &sata0 {
- status = "okay";
- };
-+
-+&spi {
-+ pinctrl-0 = <&qspi_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ flash: flash@0 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "spansion,s25fl512s";
-+ reg = <0>;
-+ spi-max-frequency = <30000000>;
-+ m25p,fast-read;
-+
-+ partition@0 {
-+ label = "loader";
-+ reg = <0x00000000 0x00080000>;
-+ read-only;
-+ };
-+ partition@80000 {
-+ label = "bootenv";
-+ reg = <0x00080000 0x00080000>;
-+ read-only;
-+ };
-+ partition@100000 {
-+ label = "data";
-+ reg = <0x00100000 0x03f00000>;
-+ };
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0281-ARM-shmobile-lager-legacy-Switch-QSPI-to-named-IRQs.patch b/patches.renesas/0281-ARM-shmobile-lager-legacy-Switch-QSPI-to-named-IRQs.patch
deleted file mode 100644
index d9059fb60bf40..0000000000000
--- a/patches.renesas/0281-ARM-shmobile-lager-legacy-Switch-QSPI-to-named-IRQs.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5a2a77735877bb7052137266af4af5ae43e9c3a6 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:24:05 +0100
-Subject: ARM: shmobile: lager legacy: Switch QSPI to named IRQs
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a70eda7e40d09b8bf1a817488a255ce907587a71)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index e8242c552da1..317574864e7b 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -310,7 +310,7 @@ static const struct spi_board_info spi_info[] __initconst = {
- /* QSPI resource */
- static const struct resource qspi_resources[] __initconst = {
- DEFINE_RES_MEM(0xe6b10000, 0x1000),
-- DEFINE_RES_IRQ(gic_spi(184)),
-+ DEFINE_RES_IRQ_NAMED(gic_spi(184), "mux"),
- };
-
- /* VIN */
---
-2.1.2
-
diff --git a/patches.renesas/0282-ARM-shmobile-koelsch-defconfig-Enable-RSPI-and-MTD_M.patch b/patches.renesas/0282-ARM-shmobile-koelsch-defconfig-Enable-RSPI-and-MTD_M.patch
deleted file mode 100644
index 332ef4742df64..0000000000000
--- a/patches.renesas/0282-ARM-shmobile-koelsch-defconfig-Enable-RSPI-and-MTD_M.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 4606290dcbe85b2fc28650e450acb024cc1c1e4e Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:24:02 +0100
-Subject: ARM: shmobile: koelsch defconfig: Enable RSPI and MTD_M25P80
-
-This enables support for the Spansion s25fl512s SPI FLASH on QSPI.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 201bd5ddcd9f11bb3942a062f0e907c3edc61f87)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/koelsch_defconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
-index c3b3c9d1d4e8..95611392a20e 100644
---- a/arch/arm/configs/koelsch_defconfig
-+++ b/arch/arm/configs/koelsch_defconfig
-@@ -40,6 +40,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- CONFIG_BLK_DEV_SD=y
- CONFIG_ATA=y
- CONFIG_SATA_RCAR=y
-+CONFIG_MTD=y
-+CONFIG_MTD_M25P80=y
- CONFIG_NETDEVICES=y
- # CONFIG_NET_VENDOR_ARC is not set
- # CONFIG_NET_CADENCE is not set
-@@ -64,6 +66,8 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=20
- CONFIG_SERIAL_SH_SCI_CONSOLE=y
- CONFIG_I2C=y
- CONFIG_I2C_RCAR=y
-+CONFIG_SPI=y
-+CONFIG_SPI_RSPI=y
- # CONFIG_HWMON is not set
- CONFIG_THERMAL=y
- CONFIG_RCAR_THERMAL=y
---
-2.1.2
-
diff --git a/patches.renesas/0283-ARM-shmobile-genmai-defconfig-Enable-RSPI.patch b/patches.renesas/0283-ARM-shmobile-genmai-defconfig-Enable-RSPI.patch
deleted file mode 100644
index 126fef52d13e7..0000000000000
--- a/patches.renesas/0283-ARM-shmobile-genmai-defconfig-Enable-RSPI.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From bd978100d36621438ab50eea55944022717a7770 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:23:57 +0100
-Subject: ARM: shmobile: genmai defconfig: Enable RSPI
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8f33d31ee270f2a6bcc661815a520f76565674c3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/genmai_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig
-index c56a7ff1dcd7..5ee6ac0931f7 100644
---- a/arch/arm/configs/genmai_defconfig
-+++ b/arch/arm/configs/genmai_defconfig
-@@ -81,6 +81,8 @@ CONFIG_SERIAL_SH_SCI_NR_UARTS=10
- CONFIG_SERIAL_SH_SCI_CONSOLE=y
- # CONFIG_HW_RANDOM is not set
- CONFIG_I2C_SH_MOBILE=y
-+CONFIG_SPI=y
-+CONFIG_SPI_RSPI=y
- # CONFIG_HWMON is not set
- CONFIG_THERMAL=y
- CONFIG_RCAR_THERMAL=y
---
-2.1.2
-
diff --git a/patches.renesas/0284-ARM-shmobile-genmai-Enable-r7s72100-ether.patch b/patches.renesas/0284-ARM-shmobile-genmai-Enable-r7s72100-ether.patch
deleted file mode 100644
index 58721b65ecb95..0000000000000
--- a/patches.renesas/0284-ARM-shmobile-genmai-Enable-r7s72100-ether.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 1192790d47eb2b1579553bafbe9352ec14873c36 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Wed, 4 Dec 2013 13:12:20 +0900
-Subject: ARM: shmobile: genmai: Enable r7s72100-ether
-
-Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms@verge.net.au>
-(cherry picked from commit 03fec7dee502d43114f384a1588ce84a3c9bf38d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index c4064610e223..e240980cc227 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -20,6 +20,7 @@
-
- #include <linux/kernel.h>
- #include <linux/platform_device.h>
-+#include <linux/sh_eth.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
- #include <mach/common.h>
-@@ -28,6 +29,20 @@
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-
-+/* Ether */
-+static const struct sh_eth_plat_data ether_pdata __initconst = {
-+ .phy = 0x00, /* PD60610 */
-+ .edmac_endian = EDMAC_LITTLE_ENDIAN,
-+ .phy_interface = PHY_INTERFACE_MODE_MII,
-+ .no_ether_link = 1
-+};
-+
-+static const struct resource ether_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xe8203000, 0x800),
-+ DEFINE_RES_MEM(0xe8204800, 0x200),
-+ DEFINE_RES_IRQ(gic_iid(359)),
-+};
-+
- /* RSPI */
- #define RSPI_RESOURCE(idx, baseaddr, irq) \
- static const struct resource rspi##idx##_resources[] __initconst = { \
-@@ -67,6 +82,11 @@ static void __init genmai_add_standard_devices(void)
- r7s72100_clock_init();
- r7s72100_add_dt_devices();
-
-+ platform_device_register_resndata(&platform_bus, "r7s72100-ether", -1,
-+ ether_resources,
-+ ARRAY_SIZE(ether_resources),
-+ &ether_pdata, sizeof(ether_pdata));
-+
- r7s72100_register_rspi(0);
- r7s72100_register_rspi(1);
- r7s72100_register_rspi(2);
---
-2.1.2
-
diff --git a/patches.renesas/0285-ARM-shmobile-Add-SDHI-devices-for-legacy-Koelsch.patch b/patches.renesas/0285-ARM-shmobile-Add-SDHI-devices-for-legacy-Koelsch.patch
deleted file mode 100644
index a5b2177714717..0000000000000
--- a/patches.renesas/0285-ARM-shmobile-Add-SDHI-devices-for-legacy-Koelsch.patch
+++ /dev/null
@@ -1,214 +0,0 @@
-From 76f8106a169c91f40109918b4e83663958fedfd6 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 12 Feb 2014 13:26:21 +0900
-Subject: ARM: shmobile: Add SDHI devices for legacy Koelsch
-
-Add SDHI0, SDHI1 and SDHI2 as platform devices to the
-legacy Koelsch board code. Also include regulators that
-are needed to control VCCQ and VDD.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d12e699f44b8277b7b72b546c69948a2f20514f8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 155 +++++++++++++++++++++++++++++++++
- 1 file changed, 155 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index d42637db596a..893d47c7d7a6 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -26,6 +26,9 @@
- #include <linux/irq.h>
- #include <linux/kernel.h>
- #include <linux/leds.h>
-+#include <linux/mfd/tmio.h>
-+#include <linux/mmc/host.h>
-+#include <linux/mmc/sh_mobile_sdhi.h>
- #include <linux/mtd/mtd.h>
- #include <linux/mtd/partitions.h>
- #include <linux/phy.h>
-@@ -33,6 +36,10 @@
- #include <linux/platform_data/gpio-rcar.h>
- #include <linux/platform_data/rcar-du.h>
- #include <linux/platform_device.h>
-+#include <linux/regulator/driver.h>
-+#include <linux/regulator/fixed.h>
-+#include <linux/regulator/gpio-regulator.h>
-+#include <linux/regulator/machine.h>
- #include <linux/sh_eth.h>
- #include <linux/spi/flash.h>
- #include <linux/spi/rspi.h>
-@@ -251,6 +258,103 @@ static void __init koelsch_add_i2c(unsigned idx)
- i2c_resources + res_idx, 2);
- }
-
-+#define SDHI_REGULATOR(idx, vdd_pin, vccq_pin) \
-+static struct regulator_consumer_supply vcc_sdhi##idx##_consumer = \
-+ REGULATOR_SUPPLY("vmmc", "sh_mobile_sdhi." #idx); \
-+ \
-+static struct regulator_init_data vcc_sdhi##idx##_init_data = { \
-+ .constraints = { \
-+ .valid_ops_mask = REGULATOR_CHANGE_STATUS, \
-+ }, \
-+ .consumer_supplies = &vcc_sdhi##idx##_consumer, \
-+ .num_consumer_supplies = 1, \
-+}; \
-+ \
-+static const struct fixed_voltage_config vcc_sdhi##idx##_info __initconst = {\
-+ .supply_name = "SDHI" #idx "Vcc", \
-+ .microvolts = 3300000, \
-+ .gpio = vdd_pin, \
-+ .enable_high = 1, \
-+ .init_data = &vcc_sdhi##idx##_init_data, \
-+}; \
-+ \
-+static struct regulator_consumer_supply vccq_sdhi##idx##_consumer = \
-+ REGULATOR_SUPPLY("vqmmc", "sh_mobile_sdhi." #idx); \
-+ \
-+static struct regulator_init_data vccq_sdhi##idx##_init_data = { \
-+ .constraints = { \
-+ .input_uV = 3300000, \
-+ .min_uV = 1800000, \
-+ .max_uV = 3300000, \
-+ .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | \
-+ REGULATOR_CHANGE_STATUS, \
-+ }, \
-+ .consumer_supplies = &vccq_sdhi##idx##_consumer, \
-+ .num_consumer_supplies = 1, \
-+}; \
-+ \
-+static struct gpio vccq_sdhi##idx##_gpio = \
-+ { vccq_pin, GPIOF_OUT_INIT_HIGH, "vccq-sdhi" #idx }; \
-+ \
-+static struct gpio_regulator_state vccq_sdhi##idx##_states[] = { \
-+ { .value = 1800000, .gpios = 0 }, \
-+ { .value = 3300000, .gpios = 1 }, \
-+}; \
-+ \
-+static const struct gpio_regulator_config vccq_sdhi##idx##_info __initconst = {\
-+ .supply_name = "vqmmc", \
-+ .gpios = &vccq_sdhi##idx##_gpio, \
-+ .nr_gpios = 1, \
-+ .states = vccq_sdhi##idx##_states, \
-+ .nr_states = ARRAY_SIZE(vccq_sdhi##idx##_states), \
-+ .type = REGULATOR_VOLTAGE, \
-+ .init_data = &vccq_sdhi##idx##_init_data, \
-+};
-+
-+SDHI_REGULATOR(0, RCAR_GP_PIN(7, 17), RCAR_GP_PIN(2, 12));
-+SDHI_REGULATOR(1, RCAR_GP_PIN(7, 18), RCAR_GP_PIN(2, 13));
-+SDHI_REGULATOR(2, RCAR_GP_PIN(7, 19), RCAR_GP_PIN(2, 26));
-+
-+/* SDHI0 */
-+static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
-+ .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-+ MMC_CAP_POWER_OFF_CARD,
-+ .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
-+};
-+
-+static struct resource sdhi0_resources[] __initdata = {
-+ DEFINE_RES_MEM(0xee100000, 0x200),
-+ DEFINE_RES_IRQ(gic_spi(165)),
-+};
-+
-+/* SDHI1 */
-+static struct sh_mobile_sdhi_info sdhi1_info __initdata = {
-+ .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-+ MMC_CAP_POWER_OFF_CARD,
-+ .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT,
-+};
-+
-+static struct resource sdhi1_resources[] __initdata = {
-+ DEFINE_RES_MEM(0xee140000, 0x100),
-+ DEFINE_RES_IRQ(gic_spi(167)),
-+};
-+
-+/* SDHI2 */
-+static struct sh_mobile_sdhi_info sdhi2_info __initdata = {
-+ .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-+ MMC_CAP_POWER_OFF_CARD,
-+ .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
-+ TMIO_MMC_WRPROTECT_DISABLE,
-+};
-+
-+static struct resource sdhi2_resources[] __initdata = {
-+ DEFINE_RES_MEM(0xee160000, 0x100),
-+ DEFINE_RES_IRQ(gic_spi(168)),
-+};
-+
- static const struct pinctrl_map koelsch_pinctrl_map[] = {
- /* DU */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7791", "pfc-r8a7791",
-@@ -288,6 +392,31 @@ static const struct pinctrl_map koelsch_pinctrl_map[] = {
- /* I2C4 */
- PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar_gen2.4", "pfc-r8a7791",
- "i2c4_c", "i2c4"),
-+ /* SDHI0 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
-+ "sdhi0_data4", "sdhi0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
-+ "sdhi0_ctrl", "sdhi0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
-+ "sdhi0_cd", "sdhi0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7791",
-+ "sdhi0_wp", "sdhi0"),
-+ /* SDHI2 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
-+ "sdhi1_data4", "sdhi1"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
-+ "sdhi1_ctrl", "sdhi1"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
-+ "sdhi1_cd", "sdhi1"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.1", "pfc-r8a7791",
-+ "sdhi1_wp", "sdhi1"),
-+ /* SDHI2 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
-+ "sdhi2_data4", "sdhi2"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
-+ "sdhi2_ctrl", "sdhi2"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7791",
-+ "sdhi2_cd", "sdhi2"),
- };
-
- static void __init koelsch_add_standard_devices(void)
-@@ -321,6 +450,32 @@ static void __init koelsch_add_standard_devices(void)
- koelsch_add_i2c(2);
- koelsch_add_i2c(4);
- koelsch_add_i2c(5);
-+
-+ platform_device_register_data(&platform_bus, "reg-fixed-voltage", 0,
-+ &vcc_sdhi0_info, sizeof(struct fixed_voltage_config));
-+ platform_device_register_data(&platform_bus, "reg-fixed-voltage", 1,
-+ &vcc_sdhi1_info, sizeof(struct fixed_voltage_config));
-+ platform_device_register_data(&platform_bus, "reg-fixed-voltage", 2,
-+ &vcc_sdhi2_info, sizeof(struct fixed_voltage_config));
-+ platform_device_register_data(&platform_bus, "gpio-regulator", 0,
-+ &vccq_sdhi0_info, sizeof(struct gpio_regulator_config));
-+ platform_device_register_data(&platform_bus, "gpio-regulator", 1,
-+ &vccq_sdhi1_info, sizeof(struct gpio_regulator_config));
-+ platform_device_register_data(&platform_bus, "gpio-regulator", 2,
-+ &vccq_sdhi2_info, sizeof(struct gpio_regulator_config));
-+
-+ platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
-+ sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
-+ &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
-+
-+ platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 1,
-+ sdhi1_resources, ARRAY_SIZE(sdhi1_resources),
-+ &sdhi1_info, sizeof(struct sh_mobile_sdhi_info));
-+
-+ platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2,
-+ sdhi2_resources, ARRAY_SIZE(sdhi2_resources),
-+ &sdhi2_info, sizeof(struct sh_mobile_sdhi_info));
-+
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0286-ARM-shmobile-lager-add-SDHI0-2-support.patch b/patches.renesas/0286-ARM-shmobile-lager-add-SDHI0-2-support.patch
deleted file mode 100644
index 04a4829cd87c4..0000000000000
--- a/patches.renesas/0286-ARM-shmobile-lager-add-SDHI0-2-support.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 8e9afeb19a7d975b86bf01a1d7fd417a58798ba8 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 12 Feb 2014 20:29:24 -0800
-Subject: ARM: shmobile: lager: add SDHI0/2 support
-
-SDHI0 (CN8) needs JP/SW settings
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 40e6a51e0cf44e944eed29697eb849140bf8258f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 64 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 64 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 317574864e7b..90d7e812d97b 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -26,8 +26,10 @@
- #include <linux/irq.h>
- #include <linux/kernel.h>
- #include <linux/leds.h>
-+#include <linux/mfd/tmio.h>
- #include <linux/mmc/host.h>
- #include <linux/mmc/sh_mmcif.h>
-+#include <linux/mmc/sh_mobile_sdhi.h>
- #include <linux/pinctrl/machine.h>
- #include <linux/platform_data/camera-rcar.h>
- #include <linux/platform_data/gpio-rcar.h>
-@@ -68,6 +70,19 @@
- * # amixer set "LINEOUT Mixer DACL" on
- */
-
-+/*
-+ * SDHI0 (CN8)
-+ *
-+ * JP3: pin1
-+ * SW20: pin1
-+
-+ * GP5_24: 1: VDD 3.3V (defult)
-+ * 0: VDD 0.0V
-+ * GP5_29: 1: VccQ 3.3V (defult)
-+ * 0: VccQ 1.8V
-+ *
-+ */
-+
- /* DU */
- static struct rcar_du_encoder_data lager_du_encoders[] = {
- {
-@@ -595,6 +610,34 @@ static void __init lager_add_rsnd_device(void)
- platform_device_register_full(&cardinfo);
- }
-
-+/* SDHI0 */
-+static struct sh_mobile_sdhi_info sdhi0_info __initdata = {
-+ .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-+ MMC_CAP_POWER_OFF_CARD,
-+ .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
-+ TMIO_MMC_WRPROTECT_DISABLE,
-+};
-+
-+static struct resource sdhi0_resources[] __initdata = {
-+ DEFINE_RES_MEM(0xee100000, 0x200),
-+ DEFINE_RES_IRQ(gic_spi(165)),
-+};
-+
-+/* SDHI2 */
-+static struct sh_mobile_sdhi_info sdhi2_info __initdata = {
-+ .tmio_caps = MMC_CAP_SD_HIGHSPEED | MMC_CAP_SDIO_IRQ |
-+ MMC_CAP_POWER_OFF_CARD,
-+ .tmio_caps2 = MMC_CAP2_NO_MULTI_READ,
-+ .tmio_flags = TMIO_MMC_HAS_IDLE_WAIT |
-+ TMIO_MMC_WRPROTECT_DISABLE,
-+};
-+
-+static struct resource sdhi2_resources[] __initdata = {
-+ DEFINE_RES_MEM(0xee140000, 0x100),
-+ DEFINE_RES_IRQ(gic_spi(167)),
-+};
-+
- static const struct pinctrl_map lager_pinctrl_map[] = {
- /* DU (CN10: ARGB0, CN13: LVDS) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
-@@ -612,6 +655,20 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- /* SCIF1 (CN20: DEBUG SERIAL1) */
- PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.7", "pfc-r8a7790",
- "scif1_data", "scif1"),
-+ /* SDHI0 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790",
-+ "sdhi0_data4", "sdhi0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790",
-+ "sdhi0_ctrl", "sdhi0"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.0", "pfc-r8a7790",
-+ "sdhi0_cd", "sdhi0"),
-+ /* SDHI2 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790",
-+ "sdhi2_data4", "sdhi2"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790",
-+ "sdhi2_ctrl", "sdhi2"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("sh_mobile_sdhi.2", "pfc-r8a7790",
-+ "sdhi2_cd", "sdhi2"),
- /* SSI (CN17: sound) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar_sound", "pfc-r8a7790",
- "ssi0129_ctrl", "ssi"),
-@@ -716,6 +773,13 @@ static void __init lager_add_standard_devices(void)
- lager_register_usbhs();
-
- lager_add_rsnd_device();
-+
-+ platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 0,
-+ sdhi0_resources, ARRAY_SIZE(sdhi0_resources),
-+ &sdhi0_info, sizeof(struct sh_mobile_sdhi_info));
-+ platform_device_register_resndata(&platform_bus, "sh_mobile_sdhi", 2,
-+ sdhi2_resources, ARRAY_SIZE(sdhi2_resources),
-+ &sdhi2_info, sizeof(struct sh_mobile_sdhi_info));
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0287-ARM-shmobile-lager-legacy-Add-QSPI-pinmux.patch b/patches.renesas/0287-ARM-shmobile-lager-legacy-Add-QSPI-pinmux.patch
deleted file mode 100644
index e461c698ffcbc..0000000000000
--- a/patches.renesas/0287-ARM-shmobile-lager-legacy-Add-QSPI-pinmux.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a5e489849b2ed5f73876a9899067afba05c7d917 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Mon, 10 Feb 2014 11:47:28 +0100
-Subject: ARM: shmobile: lager legacy: Add QSPI pinmux
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 248deabbd4a2f4c696338536fdaad3a01f66bee7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 90d7e812d97b..72886af7b737 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -649,6 +649,11 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- /* I2C2 */
- PIN_MAP_MUX_GROUP_DEFAULT("i2c-rcar.2", "pfc-r8a7790",
- "i2c2", "i2c2"),
-+ /* QSPI */
-+ PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7790",
-+ "qspi_ctrl", "qspi"),
-+ PIN_MAP_MUX_GROUP_DEFAULT("qspi.0", "pfc-r8a7790",
-+ "qspi_data4", "qspi"),
- /* SCIF0 (CN19: DEBUG SERIAL0) */
- PIN_MAP_MUX_GROUP_DEFAULT("sh-sci.6", "pfc-r8a7790",
- "scif0_data", "scif0"),
---
-2.1.2
-
diff --git a/patches.renesas/0288-ARM-shmobile-r8a7790-dtsi-Add-QSPI-node.patch b/patches.renesas/0288-ARM-shmobile-r8a7790-dtsi-Add-QSPI-node.patch
deleted file mode 100644
index 5d95768fda240..0000000000000
--- a/patches.renesas/0288-ARM-shmobile-r8a7790-dtsi-Add-QSPI-node.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 4b676879c228c2a96f8fb3330782f9ac19e51577 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Mon, 10 Feb 2014 11:47:29 +0100
-Subject: ARM: shmobile: r8a7790 dtsi: Add QSPI node
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7053e134a17d29e023dd4c55643ea4af9c534ccf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index ba0ef9a864c8..858fc58c4298 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -752,4 +752,16 @@
- "rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0";
- };
- };
-+
-+ spi: spi@e6b10000 {
-+ compatible = "renesas,qspi-r8a7790", "renesas,qspi";
-+ reg = <0 0xe6b10000 0 0x2c>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7790_CLK_QSPI_MOD>;
-+ num-cs = <1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0289-ARM-shmobile-lager-dts-Add-QSPI-nodes.patch b/patches.renesas/0289-ARM-shmobile-lager-dts-Add-QSPI-nodes.patch
deleted file mode 100644
index 072814b077919..0000000000000
--- a/patches.renesas/0289-ARM-shmobile-lager-dts-Add-QSPI-nodes.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 8370266506607823b406ea7aced9b5ace63aec5d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Mon, 10 Feb 2014 11:47:30 +0100
-Subject: ARM: shmobile: lager dts: Add QSPI nodes
-
-Add pinctrl and SPI devices for QSPI on Lager.
-Add Spansion s25fl512s SPI FLASH and MTD partitions.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9fe7c4f810a7e82c4a1a9765017f9cb2c2b40a65)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 36 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 1081c5e91ac4..adff2dc4012d 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -80,6 +80,11 @@
- renesas,groups = "mmc1_data8", "mmc1_ctrl";
- renesas,function = "mmc1";
- };
-+
-+ qspi_pins: spi {
-+ renesas,groups = "qspi_ctrl", "qspi_data4";
-+ renesas,function = "qspi";
-+ };
- };
-
- &mmcif1 {
-@@ -95,3 +100,34 @@
- &sata1 {
- status = "okay";
- };
-+
-+&spi {
-+ pinctrl-0 = <&qspi_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ flash: flash@0 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "spansion,s25fl512s";
-+ reg = <0>;
-+ spi-max-frequency = <30000000>;
-+ m25p,fast-read;
-+
-+ partition@0 {
-+ label = "loader";
-+ reg = <0x00000000 0x00040000>;
-+ read-only;
-+ };
-+ partition@40000 {
-+ label = "user";
-+ reg = <0x00040000 0x00400000>;
-+ read-only;
-+ };
-+ partition@440000 {
-+ label = "flash";
-+ reg = <0x00440000 0x03bc0000>;
-+ };
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0290-ARM-shmobile-lager-defconfig-Enable-RSPI-and-MTD_M25.patch b/patches.renesas/0290-ARM-shmobile-lager-defconfig-Enable-RSPI-and-MTD_M25.patch
deleted file mode 100644
index 840e9098dd0bc..0000000000000
--- a/patches.renesas/0290-ARM-shmobile-lager-defconfig-Enable-RSPI-and-MTD_M25.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From c433ab2ecdde8196d2bbf401cc1fdf5b93c4309f Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Mon, 10 Feb 2014 11:47:31 +0100
-Subject: ARM: shmobile: lager defconfig: Enable RSPI and MTD_M25P80
-
-This enables support for the Spansion s25fl512s SPI FLASH on QSPI.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 917163578a3dcfa3bfc05cc3bfc2653e2994971b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/lager_defconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/configs/lager_defconfig b/arch/arm/configs/lager_defconfig
-index b17f48739013..58702440472a 100644
---- a/arch/arm/configs/lager_defconfig
-+++ b/arch/arm/configs/lager_defconfig
-@@ -51,6 +51,8 @@ CONFIG_IP_PNP_DHCP=y
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- CONFIG_DEVTMPFS=y
- CONFIG_DEVTMPFS_MOUNT=y
-+CONFIG_MTD=y
-+CONFIG_MTD_M25P80=y
- CONFIG_BLK_DEV_SD=y
- CONFIG_ATA=y
- CONFIG_SATA_RCAR=y
-@@ -86,6 +88,8 @@ CONFIG_SERIAL_SH_SCI_CONSOLE=y
- CONFIG_I2C=y
- CONFIG_I2C_GPIO=y
- CONFIG_I2C_RCAR=y
-+CONFIG_SPI=y
-+CONFIG_SPI_RSPI=y
- CONFIG_GPIO_SH_PFC=y
- CONFIG_GPIOLIB=y
- CONFIG_GPIO_RCAR=y
---
-2.1.2
-
diff --git a/patches.renesas/0291-ARM-shmobile-lager-add-SDHI0-2-support-on-DTS.patch b/patches.renesas/0291-ARM-shmobile-lager-add-SDHI0-2-support-on-DTS.patch
deleted file mode 100644
index 22ba4638a4223..0000000000000
--- a/patches.renesas/0291-ARM-shmobile-lager-add-SDHI0-2-support-on-DTS.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From f9ef80cbec5dd0d8bb56820afe49804f9d518fa0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 12 Feb 2014 21:43:19 -0800
-Subject: ARM: shmobile: lager: add SDHI0/2 support on DTS
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c6119944a421c416818a9ff11f8bd77aa4d683a5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 78 +++++++++++++++++++++++++++++++++++++
- 1 file changed, 78 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index adff2dc4012d..5466fe4ed43e 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -56,6 +56,54 @@
- regulator-boot-on;
- regulator-always-on;
- };
-+
-+ vcc_sdhi0: regulator@1 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI0 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpio = <&gpio5 24 GPIO_ACTIVE_HIGH>;
-+ enable-active-high;
-+ };
-+
-+ vccq_sdhi0: regulator@2 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI0 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
-+
-+ vcc_sdhi2: regulator@3 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI2 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpio = <&gpio5 25 GPIO_ACTIVE_HIGH>;
-+ enable-active-high;
-+ };
-+
-+ vccq_sdhi2: regulator@4 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI2 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
- };
-
- &extal_clk {
-@@ -76,6 +124,16 @@
- renesas,function = "scif1";
- };
-
-+ sdhi0_pins: sd0 {
-+ renesas,gpios = "sdhi0_data4", "sdhi0_ctrl";
-+ renesas,function = "sdhi0";
-+ };
-+
-+ sdhi2_pins: sd2 {
-+ renesas,gpios = "sdhi2_data4", "sdhi2_ctrl";
-+ renesas,function = "sdhi2";
-+ };
-+
- mmc1_pins: mmc1 {
- renesas,groups = "mmc1_data8", "mmc1_ctrl";
- renesas,function = "mmc1";
-@@ -131,3 +189,23 @@
- };
- };
- };
-+
-+&sdhi0 {
-+ pinctrl-0 = <&sdhi0_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi0>;
-+ vqmmc-supply = <&vccq_sdhi0>;
-+ cd-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>;
-+ status = "okay";
-+};
-+
-+&sdhi2 {
-+ pinctrl-0 = <&sdhi2_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi2>;
-+ vqmmc-supply = <&vccq_sdhi2>;
-+ cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0292-ARM-shmobile-r8a7778-dtsi-Remove-duplicate-i2c-nodes.patch b/patches.renesas/0292-ARM-shmobile-r8a7778-dtsi-Remove-duplicate-i2c-nodes.patch
deleted file mode 100644
index 4e2539f2ac5ee..0000000000000
--- a/patches.renesas/0292-ARM-shmobile-r8a7778-dtsi-Remove-duplicate-i2c-nodes.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 4c47024073df1d61639d93b2ab8574f71ba77f35 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Mon, 10 Feb 2014 14:42:19 +0100
-Subject: ARM: shmobile: r8a7778 dtsi: Remove duplicate i2c nodes
-
-"ARM: shmobile: r8a7778: add I2C support on DTSI" was applied twice:
-
- commit ae4273ec7b25c8b9c895a4aae31f2fced980b7bf
- commit 3acb51b9215bd99da403ecf8200f8425176b1926
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 08517b212726e90b1755e3c917ba064b24e97cbe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7778.dtsi | 40 ----------------------------------------
- 1 file changed, 40 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
-index ddb3bd7a8838..85c5b3b99f5e 100644
---- a/arch/arm/boot/dts/r8a7778.dtsi
-+++ b/arch/arm/boot/dts/r8a7778.dtsi
-@@ -203,46 +203,6 @@
- status = "disabled";
- };
-
-- i2c0: i2c@ffc70000 {
-- #address-cells = <1>;
-- #size-cells = <0>;
-- compatible = "renesas,i2c-r8a7778";
-- reg = <0xffc70000 0x1000>;
-- interrupt-parent = <&gic>;
-- interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
-- status = "disabled";
-- };
--
-- i2c1: i2c@ffc71000 {
-- #address-cells = <1>;
-- #size-cells = <0>;
-- compatible = "renesas,i2c-r8a7778";
-- reg = <0xffc71000 0x1000>;
-- interrupt-parent = <&gic>;
-- interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
-- status = "disabled";
-- };
--
-- i2c2: i2c@ffc72000 {
-- #address-cells = <1>;
-- #size-cells = <0>;
-- compatible = "renesas,i2c-r8a7778";
-- reg = <0xffc72000 0x1000>;
-- interrupt-parent = <&gic>;
-- interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
-- status = "disabled";
-- };
--
-- i2c3: i2c@ffc73000 {
-- #address-cells = <1>;
-- #size-cells = <0>;
-- compatible = "renesas,i2c-r8a7778";
-- reg = <0xffc73000 0x1000>;
-- interrupt-parent = <&gic>;
-- interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
-- status = "disabled";
-- };
--
- hspi0: spi@fffc7000 {
- compatible = "renesas,hspi";
- reg = <0xfffc7000 0x18>;
---
-2.1.2
-
diff --git a/patches.renesas/0293-ARM-shmobile-Add-defconfig-for-shmobile-multiplatfor.patch b/patches.renesas/0293-ARM-shmobile-Add-defconfig-for-shmobile-multiplatfor.patch
deleted file mode 100644
index 90ef99c6ba77f..0000000000000
--- a/patches.renesas/0293-ARM-shmobile-Add-defconfig-for-shmobile-multiplatfor.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From dbf4e54cea6b1e4d5e6bd5a6ced7fbf47ceca826 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 14 Feb 2014 09:15:54 +0900
-Subject: ARM: shmobile: Add defconfig for shmobile multiplatform
-
-This is intended to be a base for a defconfig to cover all
-shmobile multiplatform boards. It currently includes configuration
-for the following boards:
-
-* KZM9D
-* Lager
-* Koelsch
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Magnus Damm <damm@opensource.se>
-(cherry picked from commit 8a76f048dc7fff769aa899f5ffc7975b57de0b16)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 129 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 129 insertions(+)
- create mode 100644 arch/arm/configs/shmobile_defconfig
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-new file mode 100644
-index 000000000000..83b07258a385
---- /dev/null
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -0,0 +1,129 @@
-+CONFIG_SYSVIPC=y
-+CONFIG_NO_HZ=y
-+CONFIG_IKCONFIG=y
-+CONFIG_IKCONFIG_PROC=y
-+CONFIG_LOG_BUF_SHIFT=16
-+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
-+CONFIG_SYSCTL_SYSCALL=y
-+CONFIG_EMBEDDED=y
-+CONFIG_PERF_EVENTS=y
-+CONFIG_SLAB=y
-+CONFIG_ARCH_SHMOBILE_MULTI=y
-+CONFIG_ARCH_EMEV2=y
-+CONFIG_ARCH_R8A7790=y
-+CONFIG_ARCH_R8A7791=y
-+CONFIG_MACH_KOELSCH=y
-+CONFIG_MACH_LAGER=y
-+# CONFIG_SWP_EMULATE is not set
-+CONFIG_CPU_BPREDICT_DISABLE=y
-+CONFIG_PL310_ERRATA_588369=y
-+CONFIG_ARM_ERRATA_754322=y
-+CONFIG_PCI=y
-+CONFIG_PCI_RCAR_GEN2=y
-+CONFIG_SMP=y
-+CONFIG_SCHED_MC=y
-+CONFIG_HAVE_ARM_ARCH_TIMER=y
-+CONFIG_NR_CPUS=8
-+CONFIG_AEABI=y
-+CONFIG_ZBOOT_ROM_TEXT=0x0
-+CONFIG_ZBOOT_ROM_BSS=0x0
-+CONFIG_ARM_APPENDED_DTB=y
-+CONFIG_KEXEC=y
-+CONFIG_VFP=y
-+CONFIG_NEON=y
-+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-+CONFIG_NET=y
-+CONFIG_PACKET=y
-+CONFIG_UNIX=y
-+CONFIG_INET=y
-+CONFIG_IP_PNP=y
-+CONFIG_IP_PNP_DHCP=y
-+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
-+CONFIG_DEVTMPFS=y
-+CONFIG_DEVTMPFS_MOUNT=y
-+CONFIG_MTD=y
-+CONFIG_MTD_M25P80=y
-+CONFIG_BLK_DEV_SD=y
-+CONFIG_ATA=y
-+CONFIG_SATA_RCAR=y
-+CONFIG_NETDEVICES=y
-+# CONFIG_NET_VENDOR_ARC is not set
-+# CONFIG_NET_CADENCE is not set
-+# CONFIG_NET_VENDOR_BROADCOM is not set
-+# CONFIG_NET_VENDOR_CIRRUS is not set
-+# CONFIG_NET_VENDOR_FARADAY is not set
-+# CONFIG_NET_VENDOR_INTEL is not set
-+# CONFIG_NET_VENDOR_MARVELL is not set
-+# CONFIG_NET_VENDOR_MICREL is not set
-+# CONFIG_NET_VENDOR_NATSEMI is not set
-+CONFIG_SH_ETH=y
-+# CONFIG_NET_VENDOR_SEEQ is not set
-+CONFIG_SMSC911X=y
-+# CONFIG_NET_VENDOR_STMICRO is not set
-+# CONFIG_NET_VENDOR_VIA is not set
-+# CONFIG_NET_VENDOR_WIZNET is not set
-+CONFIG_SMSC_PHY=y
-+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-+CONFIG_KEYBOARD_GPIO=y
-+# CONFIG_INPUT_MOUSE is not set
-+# CONFIG_LEGACY_PTYS is not set
-+CONFIG_SERIAL_8250=y
-+CONFIG_SERIAL_8250_CONSOLE=y
-+CONFIG_SERIAL_8250_EXTENDED=y
-+CONFIG_SERIAL_8250_EM=y
-+CONFIG_SERIAL_SH_SCI=y
-+CONFIG_SERIAL_SH_SCI_NR_UARTS=20
-+CONFIG_SERIAL_SH_SCI_CONSOLE=y
-+CONFIG_I2C_GPIO=y
-+CONFIG_I2C_RCAR=y
-+CONFIG_SPI=y
-+CONFIG_SPI_RSPI=y
-+CONFIG_GPIO_EM=y
-+CONFIG_GPIO_RCAR=y
-+# CONFIG_HWMON is not set
-+CONFIG_THERMAL=y
-+CONFIG_RCAR_THERMAL=y
-+CONFIG_REGULATOR=y
-+CONFIG_REGULATOR_FIXED_VOLTAGE=y
-+CONFIG_REGULATOR_GPIO=y
-+CONFIG_MEDIA_SUPPORT=y
-+CONFIG_MEDIA_CAMERA_SUPPORT=y
-+CONFIG_V4L_PLATFORM_DRIVERS=y
-+CONFIG_SOC_CAMERA=y
-+CONFIG_SOC_CAMERA_PLATFORM=y
-+CONFIG_VIDEO_RCAR_VIN=y
-+# CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
-+CONFIG_VIDEO_ADV7180=y
-+CONFIG_DRM=y
-+CONFIG_DRM_RCAR_DU=y
-+CONFIG_SOUND=y
-+CONFIG_SND=y
-+CONFIG_SND_SOC=y
-+CONFIG_SND_SOC_RCAR=y
-+CONFIG_USB_RCAR_GEN2_PHY=y
-+CONFIG_MMC=y
-+CONFIG_MMC_SDHI=y
-+CONFIG_MMC_SH_MMCIF=y
-+CONFIG_NEW_LEDS=y
-+CONFIG_LEDS_CLASS=y
-+CONFIG_LEDS_GPIO=y
-+CONFIG_RTC_CLASS=y
-+CONFIG_DMADEVICES=y
-+CONFIG_SH_DMAE=y
-+# CONFIG_IOMMU_SUPPORT is not set
-+# CONFIG_DNOTIFY is not set
-+CONFIG_MSDOS_FS=y
-+CONFIG_VFAT_FS=y
-+CONFIG_TMPFS=y
-+CONFIG_CONFIGFS_FS=y
-+# CONFIG_MISC_FILESYSTEMS is not set
-+CONFIG_NFS_FS=y
-+CONFIG_NFS_V3_ACL=y
-+CONFIG_NFS_V4=y
-+CONFIG_NFS_V4_1=y
-+CONFIG_ROOT_NFS=y
-+CONFIG_NLS_CODEPAGE_437=y
-+CONFIG_NLS_ISO8859_1=y
-+# CONFIG_ENABLE_WARN_DEPRECATED is not set
-+# CONFIG_ENABLE_MUST_CHECK is not set
-+# CONFIG_ARM_UNWIND is not set
---
-2.1.2
-
diff --git a/patches.renesas/0294-ARM-shmobile-lager-Add-internal-USB-PCI-support.patch b/patches.renesas/0294-ARM-shmobile-lager-Add-internal-USB-PCI-support.patch
deleted file mode 100644
index 5658f551892cf..0000000000000
--- a/patches.renesas/0294-ARM-shmobile-lager-Add-internal-USB-PCI-support.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 5bc080b4e62d04746800adef7b74810e739ca6e4 Mon Sep 17 00:00:00 2001
-From: Valentine Barshak <valentine.barshak@cogentembedded.com>
-Date: Fri, 14 Feb 2014 12:29:48 +0900
-Subject: ARM: shmobile: lager: Add internal USB PCI support
-
-This adds internal PCI USB host devices to R-Car H2 Lager board.
-
-Signed-off-by: Valentine Barshak <valentine.barshak@cogentembedded.com>
-[damm@opensource.se: Rebased and reworked to only include USB1 and USB2]
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 849f7b6c10d8016b55e13b7ad2e9f299e2da817b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 50 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 50 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 72886af7b737..193dff0267d8 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -638,6 +638,48 @@ static struct resource sdhi2_resources[] __initdata = {
- DEFINE_RES_IRQ(gic_spi(167)),
- };
-
-+/* Internal PCI1 */
-+static const struct resource pci1_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xee0b0000, 0x10000), /* CFG */
-+ DEFINE_RES_MEM(0xee0a0000, 0x10000), /* MEM */
-+ DEFINE_RES_IRQ(gic_spi(112)),
-+};
-+
-+static const struct platform_device_info pci1_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "pci-rcar-gen2",
-+ .id = 1,
-+ .res = pci1_resources,
-+ .num_res = ARRAY_SIZE(pci1_resources),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
-+static void __init lager_add_usb1_device(void)
-+{
-+ platform_device_register_full(&pci1_info);
-+}
-+
-+/* Internal PCI2 */
-+static const struct resource pci2_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xee0d0000, 0x10000), /* CFG */
-+ DEFINE_RES_MEM(0xee0c0000, 0x10000), /* MEM */
-+ DEFINE_RES_IRQ(gic_spi(113)),
-+};
-+
-+static const struct platform_device_info pci2_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "pci-rcar-gen2",
-+ .id = 2,
-+ .res = pci2_resources,
-+ .num_res = ARRAY_SIZE(pci2_resources),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
-+static void __init lager_add_usb2_device(void)
-+{
-+ platform_device_register_full(&pci2_info);
-+}
-+
- static const struct pinctrl_map lager_pinctrl_map[] = {
- /* DU (CN10: ARGB0, CN13: LVDS) */
- PIN_MAP_MUX_GROUP_DEFAULT("rcar-du-r8a7790", "pfc-r8a7790",
-@@ -716,6 +758,12 @@ static const struct pinctrl_map lager_pinctrl_map[] = {
- /* USB0 */
- PIN_MAP_MUX_GROUP_DEFAULT("renesas_usbhs", "pfc-r8a7790",
- "usb0_ovc_vbus", "usb0"),
-+ /* USB1 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.1", "pfc-r8a7790",
-+ "usb1", "usb1"),
-+ /* USB2 */
-+ PIN_MAP_MUX_GROUP_DEFAULT("pci-rcar-gen2.2", "pfc-r8a7790",
-+ "usb2", "usb2"),
- };
-
- static void __init lager_add_standard_devices(void)
-@@ -776,6 +824,8 @@ static void __init lager_add_standard_devices(void)
- &usbhs_phy_pdata,
- sizeof(usbhs_phy_pdata));
- lager_register_usbhs();
-+ lager_add_usb1_device();
-+ lager_add_usb2_device();
-
- lager_add_rsnd_device();
-
---
-2.1.2
-
diff --git a/patches.renesas/0295-ARM-shmobile-lager-reference-Refactor-clock-lookup-h.patch b/patches.renesas/0295-ARM-shmobile-lager-reference-Refactor-clock-lookup-h.patch
deleted file mode 100644
index f6547e19718f6..0000000000000
--- a/patches.renesas/0295-ARM-shmobile-lager-reference-Refactor-clock-lookup-h.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 6b977b7a7a84690242539e1ac13fba46c6540e61 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 16 Feb 2014 22:31:58 +0100
-Subject: ARM: shmobile: lager-reference: Refactor clock lookup hack
-
-Make the clock lookup hack more generic to ease the addition of more
-devices.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9a8c3ab9c0286a6c81012eaf9e95ec2d3e58d21f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 37 +++++++++++++++-----------
- 1 file changed, 22 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index dc8d76b9a9f1..634ef15e73e3 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -31,30 +31,37 @@ static void __init lager_add_standard_devices(void)
- {
- #ifdef CONFIG_COMMON_CLK
- /*
-- * This is a really crude hack to provide clkdev support to the SCIF
-- * and CMT devices until they get moved to DT.
-+ * This is a really crude hack to provide clkdev support to platform
-+ * devices until they get moved to DT.
- */
-- static const char * const scif_names[] = {
-- "scifa0", "scifa1", "scifb0", "scifb1",
-- "scifb2", "scifa2", "scif0", "scif1",
-- "hscif0", "hscif1",
-+ static const struct clk_name {
-+ const char *clk;
-+ const char *con_id;
-+ const char *dev_id;
-+ } clk_names[] = {
-+ { "cmt0", NULL, "sh_cmt.0" },
-+ { "scifa0", NULL, "sh-sci.0" },
-+ { "scifa1", NULL, "sh-sci.1" },
-+ { "scifb0", NULL, "sh-sci.2" },
-+ { "scifb1", NULL, "sh-sci.3" },
-+ { "scifb2", NULL, "sh-sci.4" },
-+ { "scifa2", NULL, "sh-sci.5" },
-+ { "scif0", NULL, "sh-sci.6" },
-+ { "scif1", NULL, "sh-sci.7" },
-+ { "hscif0", NULL, "sh-sci.8" },
-+ { "hscif1", NULL, "sh-sci.9" },
- };
- struct clk *clk;
- unsigned int i;
-
-- for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
-- clk = clk_get(NULL, scif_names[i]);
-+ for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
-+ clk = clk_get(NULL, clk_names[i].clk);
- if (!IS_ERR(clk)) {
-- clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
-+ clk_register_clkdev(clk, clk_names[i].con_id,
-+ clk_names[i].dev_id);
- clk_put(clk);
- }
- }
--
-- clk = clk_get(NULL, "cmt0");
-- if (!IS_ERR(clk)) {
-- clk_register_clkdev(clk, NULL, "sh_cmt.0");
-- clk_put(clk);
-- }
- #else
- r8a7790_clock_init();
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0296-ARM-shmobile-lager-Add-DU-device-to-DTS.patch b/patches.renesas/0296-ARM-shmobile-lager-Add-DU-device-to-DTS.patch
deleted file mode 100644
index ed7454498fbc3..0000000000000
--- a/patches.renesas/0296-ARM-shmobile-lager-Add-DU-device-to-DTS.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 67090ae1ba2f95a89271a065ef0ba13be4cabf0f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 16 Feb 2014 22:31:59 +0100
-Subject: ARM: shmobile: lager: Add DU device to DTS
-
-The DU device has no DT bindings yet, instantiate it as a platform
-device for now.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: broken out of larger patch that
- included board changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 3024f507e1dc2b30fc64ed6106db6aea6e69cf0b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 5466fe4ed43e..26a90106e96c 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -111,9 +111,14 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scif0_pins &scif1_pins>;
-+ pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
- pinctrl-names = "default";
-
-+ du_pins: du {
-+ renesas,groups = "du_rgb666", "du_sync_1", "du_clk_out_0";
-+ renesas,function = "du";
-+ };
-+
- scif0_pins: serial0 {
- renesas,groups = "scif0_data";
- renesas,function = "scif0";
---
-2.1.2
-
diff --git a/patches.renesas/0297-ARM-shmobile-lager-reference-Add-DU-device.patch b/patches.renesas/0297-ARM-shmobile-lager-reference-Add-DU-device.patch
deleted file mode 100644
index 0ed0427f5eafe..0000000000000
--- a/patches.renesas/0297-ARM-shmobile-lager-reference-Add-DU-device.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 785f5dd6ad42a39b83c75f3363ba29cbb4179e75 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 16 Feb 2014 22:31:59 +0100
-Subject: ARM: shmobile: lager-reference: Add DU device
-
-The DU device has no DT bindings yet, instantiate it as a platform
-device for now.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: omitted DTS portion]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 433aa851d4b32dc3b3de1e84dc20b57e157b25b9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 66 ++++++++++++++++++++++++++
- 1 file changed, 66 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 634ef15e73e3..6ba8b3b41609 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -20,13 +20,72 @@
-
- #include <linux/clk.h>
- #include <linux/clkdev.h>
-+#include <linux/dma-mapping.h>
- #include <linux/init.h>
- #include <linux/of_platform.h>
-+#include <linux/platform_data/rcar-du.h>
- #include <mach/common.h>
-+#include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
-
-+/* DU */
-+static struct rcar_du_encoder_data lager_du_encoders[] = {
-+ {
-+ .type = RCAR_DU_ENCODER_VGA,
-+ .output = RCAR_DU_OUTPUT_DPAD0,
-+ }, {
-+ .type = RCAR_DU_ENCODER_NONE,
-+ .output = RCAR_DU_OUTPUT_LVDS1,
-+ .connector.lvds.panel = {
-+ .width_mm = 210,
-+ .height_mm = 158,
-+ .mode = {
-+ .clock = 65000,
-+ .hdisplay = 1024,
-+ .hsync_start = 1048,
-+ .hsync_end = 1184,
-+ .htotal = 1344,
-+ .vdisplay = 768,
-+ .vsync_start = 771,
-+ .vsync_end = 777,
-+ .vtotal = 806,
-+ .flags = 0,
-+ },
-+ },
-+ },
-+};
-+
-+static struct rcar_du_platform_data lager_du_pdata = {
-+ .encoders = lager_du_encoders,
-+ .num_encoders = ARRAY_SIZE(lager_du_encoders),
-+};
-+
-+static const struct resource du_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xfeb00000, 0x70000),
-+ DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
-+ DEFINE_RES_MEM_NAMED(0xfeb94000, 0x1c, "lvds.1"),
-+ DEFINE_RES_IRQ(gic_spi(256)),
-+ DEFINE_RES_IRQ(gic_spi(268)),
-+ DEFINE_RES_IRQ(gic_spi(269)),
-+};
-+
-+static void __init lager_add_du_device(void)
-+{
-+ struct platform_device_info info = {
-+ .name = "rcar-du-r8a7790",
-+ .id = -1,
-+ .res = du_resources,
-+ .num_res = ARRAY_SIZE(du_resources),
-+ .data = &lager_du_pdata,
-+ .size_data = sizeof(lager_du_pdata),
-+ .dma_mask = DMA_BIT_MASK(32),
-+ };
-+
-+ platform_device_register_full(&info);
-+}
-+
- static void __init lager_add_standard_devices(void)
- {
- #ifdef CONFIG_COMMON_CLK
-@@ -50,6 +109,11 @@ static void __init lager_add_standard_devices(void)
- { "scif1", NULL, "sh-sci.7" },
- { "hscif0", NULL, "sh-sci.8" },
- { "hscif1", NULL, "sh-sci.9" },
-+ { "du0", "du.0", "rcar-du-r8a7790" },
-+ { "du1", "du.1", "rcar-du-r8a7790" },
-+ { "du2", "du.2", "rcar-du-r8a7790" },
-+ { "lvds0", "lvds.0", "rcar-du-r8a7790" },
-+ { "lvds1", "lvds.1", "rcar-du-r8a7790" },
- };
- struct clk *clk;
- unsigned int i;
-@@ -68,6 +132,8 @@ static void __init lager_add_standard_devices(void)
-
- r8a7790_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-+
-+ lager_add_du_device();
- }
-
- static const char *lager_boards_compat_dt[] __initdata = {
---
-2.1.2
-
diff --git a/patches.renesas/0298-ARM-shmobile-koelsch-reference-Refactor-clock-lookup.patch b/patches.renesas/0298-ARM-shmobile-koelsch-reference-Refactor-clock-lookup.patch
deleted file mode 100644
index f53cd7a9b93ba..0000000000000
--- a/patches.renesas/0298-ARM-shmobile-koelsch-reference-Refactor-clock-lookup.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From f771751a4cc27bfddb1e7293ae093cece086fdc5 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 16 Feb 2014 22:32:00 +0100
-Subject: ARM: shmobile: koelsch-reference: Refactor clock lookup hack
-
-Make the clock lookup hack more generic to ease the addition of more
-devices.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 189ef3d62df6701e58d216cf81277b88bb4ac7a8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 42 +++++++++++++++---------
- 1 file changed, 27 insertions(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index feb8d97ea2f7..42c6eb4c3e67 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -32,30 +32,42 @@ static void __init koelsch_add_standard_devices(void)
- {
- #ifdef CONFIG_COMMON_CLK
- /*
-- * This is a really crude hack to provide clkdev support to the SCIF
-- * and CMT devices until they get moved to DT.
-+ * This is a really crude hack to provide clkdev support to the CMT and
-+ * DU devices until they get moved to DT.
- */
-- static const char * const scif_names[] = {
-- "scifa0", "scifa1", "scifb0", "scifb1", "scifb2", "scifa2",
-- "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scifa3",
-- "scifa4", "scifa5",
-+ static const struct clk_name {
-+ const char *clk;
-+ const char *con_id;
-+ const char *dev_id;
-+ } clk_names[] = {
-+ { "cmt0", NULL, "sh_cmt.0" },
-+ { "scifa0", NULL, "sh-sci.0" },
-+ { "scifa1", NULL, "sh-sci.1" },
-+ { "scifb0", NULL, "sh-sci.2" },
-+ { "scifb1", NULL, "sh-sci.3" },
-+ { "scifb2", NULL, "sh-sci.4" },
-+ { "scifa2", NULL, "sh-sci.5" },
-+ { "scif0", NULL, "sh-sci.6" },
-+ { "scif1", NULL, "sh-sci.7" },
-+ { "scif2", NULL, "sh-sci.8" },
-+ { "scif3", NULL, "sh-sci.9" },
-+ { "scif4", NULL, "sh-sci.10" },
-+ { "scif5", NULL, "sh-sci.11" },
-+ { "scifa3", NULL, "sh-sci.12" },
-+ { "scifa4", NULL, "sh-sci.13" },
-+ { "scifa5", NULL, "sh-sci.14" },
- };
- struct clk *clk;
- unsigned int i;
-
-- for (i = 0; i < ARRAY_SIZE(scif_names); ++i) {
-- clk = clk_get(NULL, scif_names[i]);
-+ for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
-+ clk = clk_get(NULL, clk_names[i].clk);
- if (!IS_ERR(clk)) {
-- clk_register_clkdev(clk, NULL, "sh-sci.%u", i);
-+ clk_register_clkdev(clk, clk_names[i].con_id,
-+ clk_names[i].dev_id);
- clk_put(clk);
- }
- }
--
-- clk = clk_get(NULL, "cmt0");
-- if (!IS_ERR(clk)) {
-- clk_register_clkdev(clk, NULL, "sh_cmt.0");
-- clk_put(clk);
-- }
- #else
- r8a7791_clock_init();
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0299-ARM-shmobile-koelsch-reference-Add-DU-device.patch b/patches.renesas/0299-ARM-shmobile-koelsch-reference-Add-DU-device.patch
deleted file mode 100644
index 6cb83f52bd0f1..0000000000000
--- a/patches.renesas/0299-ARM-shmobile-koelsch-reference-Add-DU-device.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 761af436d9e603d675e61c51a04c81bfeecdd14d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 16 Feb 2014 22:32:01 +0100
-Subject: ARM: shmobile: koelsch-reference: Add DU device
-
-The DU device has no DT bindings yet, instantiate it as a platform
-device for now.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: omitted DTS portion]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 14c5ce178ee46b205ff4e9087d5ecba298798edc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 59 ++++++++++++++++++++++++
- 1 file changed, 59 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 42c6eb4c3e67..267fe8358cfe 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -21,13 +21,67 @@
-
- #include <linux/clk.h>
- #include <linux/clkdev.h>
-+#include <linux/dma-mapping.h>
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
-+#include <linux/platform_data/rcar-du.h>
- #include <mach/common.h>
-+#include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7791.h>
- #include <asm/mach/arch.h>
-
-+/* DU */
-+static struct rcar_du_encoder_data koelsch_du_encoders[] = {
-+ {
-+ .type = RCAR_DU_ENCODER_NONE,
-+ .output = RCAR_DU_OUTPUT_LVDS0,
-+ .connector.lvds.panel = {
-+ .width_mm = 210,
-+ .height_mm = 158,
-+ .mode = {
-+ .clock = 65000,
-+ .hdisplay = 1024,
-+ .hsync_start = 1048,
-+ .hsync_end = 1184,
-+ .htotal = 1344,
-+ .vdisplay = 768,
-+ .vsync_start = 771,
-+ .vsync_end = 777,
-+ .vtotal = 806,
-+ .flags = 0,
-+ },
-+ },
-+ },
-+};
-+
-+static struct rcar_du_platform_data koelsch_du_pdata = {
-+ .encoders = koelsch_du_encoders,
-+ .num_encoders = ARRAY_SIZE(koelsch_du_encoders),
-+};
-+
-+static const struct resource du_resources[] __initconst = {
-+ DEFINE_RES_MEM(0xfeb00000, 0x40000),
-+ DEFINE_RES_MEM_NAMED(0xfeb90000, 0x1c, "lvds.0"),
-+ DEFINE_RES_IRQ(gic_spi(256)),
-+ DEFINE_RES_IRQ(gic_spi(268)),
-+};
-+
-+static void __init koelsch_add_du_device(void)
-+{
-+ struct platform_device_info info = {
-+ .name = "rcar-du-r8a7791",
-+ .id = -1,
-+ .res = du_resources,
-+ .num_res = ARRAY_SIZE(du_resources),
-+ .data = &koelsch_du_pdata,
-+ .size_data = sizeof(koelsch_du_pdata),
-+ .dma_mask = DMA_BIT_MASK(32),
-+ };
-+
-+ platform_device_register_full(&info);
-+}
-+
- static void __init koelsch_add_standard_devices(void)
- {
- #ifdef CONFIG_COMMON_CLK
-@@ -56,6 +110,9 @@ static void __init koelsch_add_standard_devices(void)
- { "scifa3", NULL, "sh-sci.12" },
- { "scifa4", NULL, "sh-sci.13" },
- { "scifa5", NULL, "sh-sci.14" },
-+ { "du0", "du.0", "rcar-du-r8a7791" },
-+ { "du1", "du.1", "rcar-du-r8a7791" },
-+ { "lvds0", "lvds.0", "rcar-du-r8a7791" },
- };
- struct clk *clk;
- unsigned int i;
-@@ -73,6 +130,8 @@ static void __init koelsch_add_standard_devices(void)
- #endif
- r8a7791_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-+
-+ koelsch_add_du_device();
- }
-
- static const char * const koelsch_boards_compat_dt[] __initconst = {
---
-2.1.2
-
diff --git a/patches.renesas/0300-ARM-shmobile-koelsch-reference-Add-DU-device-to-DTS.patch b/patches.renesas/0300-ARM-shmobile-koelsch-reference-Add-DU-device-to-DTS.patch
deleted file mode 100644
index 42150712f495d..0000000000000
--- a/patches.renesas/0300-ARM-shmobile-koelsch-reference-Add-DU-device-to-DTS.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 41fa672d8e597e19c6e33235bd4a8f7600bab27f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sun, 16 Feb 2014 22:32:01 +0100
-Subject: ARM: shmobile: koelsch-reference: Add DU device to DTS
-
-The DU device has no DT bindings yet, instantiate it as a platform
-device for now.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: broken out of larger patch that
- included board changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit afba941c18985ffd473f7bad85f89eb7c7121de4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index d4b9bba38685..f67d2d0abded 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -109,9 +109,14 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scif0_pins &scif1_pins>;
-+ pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
- pinctrl-names = "default";
-
-+ du_pins: du {
-+ renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
-+ renesas,function = "du";
-+ };
-+
- scif0_pins: serial0 {
- renesas,groups = "scif0_data_d";
- renesas,function = "scif0";
---
-2.1.2
-
diff --git a/patches.renesas/0301-ARM-shmobile-r8a7791-remove-superfluous-interrupt-pa.patch b/patches.renesas/0301-ARM-shmobile-r8a7791-remove-superfluous-interrupt-pa.patch
deleted file mode 100644
index 1f9cbf87b2b44..0000000000000
--- a/patches.renesas/0301-ARM-shmobile-r8a7791-remove-superfluous-interrupt-pa.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From 0732ffd18a9cb17a4063cb02e1205805ef1558cc Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Sun, 16 Feb 2014 10:40:54 +0100
-Subject: ARM: shmobile: r8a7791: remove superfluous interrupt-parents
-
-These values are inherited, so don't need to be specified again.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9db389f29e2c9660e22e20bf53aec07c669d0eae)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 31 -------------------------------
- 1 file changed, 31 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 240c4ece1f0c..41194fe18c3c 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -53,7 +53,6 @@
- gpio0: gpio@e6050000 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6050000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -65,7 +64,6 @@
- gpio1: gpio@e6051000 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6051000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -77,7 +75,6 @@
- gpio2: gpio@e6052000 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6052000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -89,7 +86,6 @@
- gpio3: gpio@e6053000 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6053000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -101,7 +97,6 @@
- gpio4: gpio@e6054000 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6054000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -113,7 +108,6 @@
- gpio5: gpio@e6055000 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6055000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -125,7 +119,6 @@
- gpio6: gpio@e6055400 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6055400 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 10 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -137,7 +130,6 @@
- gpio7: gpio@e6055800 {
- compatible = "renesas,gpio-r8a7791", "renesas,gpio-rcar";
- reg = <0 0xe6055800 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 11 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -149,7 +141,6 @@
- thermal@e61f0000 {
- compatible = "renesas,thermal-r8a7791", "renesas,rcar-thermal";
- reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
-- interrupt-parent = <&gic>;
- interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp5_clks R8A7791_CLK_THERMAL>;
- };
-@@ -167,7 +158,6 @@
- #interrupt-cells = <2>;
- interrupt-controller;
- reg = <0 0xe61c0000 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>,
- <0 1 IRQ_TYPE_LEVEL_HIGH>,
- <0 2 IRQ_TYPE_LEVEL_HIGH>,
-@@ -189,7 +179,6 @@
- scifa0: serial@e6c40000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
- reg = <0 0xe6c40000 0 64>;
-- interrupt-parent = <&gic>;
- interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7791_CLK_SCIFA0>;
- clock-names = "sci_ick";
-@@ -198,7 +187,6 @@
-
- scifa1: serial@e6c50000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c50000 0 64>;
- interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7791_CLK_SCIFA1>;
-@@ -208,7 +196,6 @@
-
- scifa2: serial@e6c60000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c60000 0 64>;
- interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7791_CLK_SCIFA2>;
-@@ -218,7 +205,6 @@
-
- scifa3: serial@e6c70000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c70000 0 64>;
- interrupts = <0 29 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp11_clks R8A7791_CLK_SCIFA3>;
-@@ -228,7 +214,6 @@
-
- scifa4: serial@e6c78000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c78000 0 64>;
- interrupts = <0 30 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp11_clks R8A7791_CLK_SCIFA4>;
-@@ -238,7 +223,6 @@
-
- scifa5: serial@e6c80000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c80000 0 64>;
- interrupts = <0 31 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp11_clks R8A7791_CLK_SCIFA5>;
-@@ -248,7 +232,6 @@
-
- scifb0: serial@e6c20000 {
- compatible = "renesas,scifb-r8a7791", "renesas,scifb";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c20000 0 64>;
- interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7791_CLK_SCIFB0>;
-@@ -258,7 +241,6 @@
-
- scifb1: serial@e6c30000 {
- compatible = "renesas,scifb-r8a7791", "renesas,scifb";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c30000 0 64>;
- interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7791_CLK_SCIFB1>;
-@@ -268,7 +250,6 @@
-
- scifb2: serial@e6ce0000 {
- compatible = "renesas,scifb-r8a7791", "renesas,scifb";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6ce0000 0 64>;
- interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7791_CLK_SCIFB2>;
-@@ -278,7 +259,6 @@
-
- scif0: serial@e6e60000 {
- compatible = "renesas,scif-r8a7791", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6e60000 0 64>;
- interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_SCIF0>;
-@@ -288,7 +268,6 @@
-
- scif1: serial@e6e68000 {
- compatible = "renesas,scif-r8a7791", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6e68000 0 64>;
- interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_SCIF1>;
-@@ -298,7 +277,6 @@
-
- scif2: serial@e6e58000 {
- compatible = "renesas,scif-r8a7791", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6e58000 0 64>;
- interrupts = <0 22 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_SCIF2>;
-@@ -308,7 +286,6 @@
-
- scif3: serial@e6ea8000 {
- compatible = "renesas,scif-r8a7791", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6ea8000 0 64>;
- interrupts = <0 23 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_SCIF3>;
-@@ -318,7 +295,6 @@
-
- scif4: serial@e6ee0000 {
- compatible = "renesas,scif-r8a7791", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6ee0000 0 64>;
- interrupts = <0 24 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_SCIF4>;
-@@ -328,7 +304,6 @@
-
- scif5: serial@e6ee8000 {
- compatible = "renesas,scif-r8a7791", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6ee8000 0 64>;
- interrupts = <0 25 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_SCIF5>;
-@@ -338,7 +313,6 @@
-
- hscif0: serial@e62c0000 {
- compatible = "renesas,hscif-r8a7791", "renesas,hscif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe62c0000 0 96>;
- interrupts = <0 154 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_HSCIF0>;
-@@ -348,7 +322,6 @@
-
- hscif1: serial@e62c8000 {
- compatible = "renesas,hscif-r8a7791", "renesas,hscif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe62c8000 0 96>;
- interrupts = <0 155 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_HSCIF1>;
-@@ -358,7 +331,6 @@
-
- hscif2: serial@e62d0000 {
- compatible = "renesas,hscif-r8a7791", "renesas,hscif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe62d0000 0 96>;
- interrupts = <0 21 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7791_CLK_HSCIF2>;
-@@ -369,7 +341,6 @@
- sata0: sata@ee300000 {
- compatible = "renesas,sata-r8a7791";
- reg = <0 0xee300000 0 0x2000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp8_clks R8A7791_CLK_SATA0>;
- status = "disabled";
-@@ -378,7 +349,6 @@
- sata1: sata@ee500000 {
- compatible = "renesas,sata-r8a7791";
- reg = <0 0xee500000 0 0x2000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp8_clks R8A7791_CLK_SATA1>;
- status = "disabled";
-@@ -714,7 +684,6 @@
- spi: spi@e6b10000 {
- compatible = "renesas,qspi-r8a7791", "renesas,qspi";
- reg = <0 0xe6b10000 0 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp9_clks R8A7791_CLK_QSPI_MOD>;
- num-cs = <1>;
---
-2.1.2
-
diff --git a/patches.renesas/0302-ARM-shmobile-r8a7790-remove-superfluous-interrupt-pa.patch b/patches.renesas/0302-ARM-shmobile-r8a7790-remove-superfluous-interrupt-pa.patch
deleted file mode 100644
index 681d2992d1ffb..0000000000000
--- a/patches.renesas/0302-ARM-shmobile-r8a7790-remove-superfluous-interrupt-pa.patch
+++ /dev/null
@@ -1,271 +0,0 @@
-From eb84ec43b16d5855c8e98d94d6a249a704e5b7c6 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Sun, 16 Feb 2014 10:40:57 +0100
-Subject: ARM: shmobile: r8a7790: remove superfluous interrupt-parents
-
-These values are inherited, so don't need to be specified again.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 951dc909b22afd52f57e1f74e86415941a057d31)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 31 -------------------------------
- 1 file changed, 31 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 858fc58c4298..d7bde1ee2bb0 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -94,7 +94,6 @@
- gpio0: gpio@e6050000 {
- compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
- reg = <0 0xe6050000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 4 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -106,7 +105,6 @@
- gpio1: gpio@e6051000 {
- compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
- reg = <0 0xe6051000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 5 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -118,7 +116,6 @@
- gpio2: gpio@e6052000 {
- compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
- reg = <0 0xe6052000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 6 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -130,7 +127,6 @@
- gpio3: gpio@e6053000 {
- compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
- reg = <0 0xe6053000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 7 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -142,7 +138,6 @@
- gpio4: gpio@e6054000 {
- compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
- reg = <0 0xe6054000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 8 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -154,7 +149,6 @@
- gpio5: gpio@e6055000 {
- compatible = "renesas,gpio-r8a7790", "renesas,gpio-rcar";
- reg = <0 0xe6055000 0 0x50>;
-- interrupt-parent = <&gic>;
- interrupts = <0 9 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -166,7 +160,6 @@
- thermal@e61f0000 {
- compatible = "renesas,thermal-r8a7790", "renesas,rcar-thermal";
- reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>;
-- interrupt-parent = <&gic>;
- interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp5_clks R8A7790_CLK_THERMAL>;
- };
-@@ -184,7 +177,6 @@
- #interrupt-cells = <2>;
- interrupt-controller;
- reg = <0 0xe61c0000 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>,
- <0 1 IRQ_TYPE_LEVEL_HIGH>,
- <0 2 IRQ_TYPE_LEVEL_HIGH>,
-@@ -196,7 +188,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7790";
- reg = <0 0xe6508000 0 0x40>;
-- interrupt-parent = <&gic>;
- interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp9_clks R8A7790_CLK_I2C0>;
- status = "disabled";
-@@ -207,7 +198,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7790";
- reg = <0 0xe6518000 0 0x40>;
-- interrupt-parent = <&gic>;
- interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp9_clks R8A7790_CLK_I2C1>;
- status = "disabled";
-@@ -218,7 +208,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7790";
- reg = <0 0xe6530000 0 0x40>;
-- interrupt-parent = <&gic>;
- interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp9_clks R8A7790_CLK_I2C2>;
- status = "disabled";
-@@ -229,7 +218,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7790";
- reg = <0 0xe6540000 0 0x40>;
-- interrupt-parent = <&gic>;
- interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp9_clks R8A7790_CLK_I2C3>;
- status = "disabled";
-@@ -238,7 +226,6 @@
- mmcif0: mmcif@ee200000 {
- compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
- reg = <0 0xee200000 0 0x80>;
-- interrupt-parent = <&gic>;
- interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7790_CLK_MMCIF0>;
- reg-io-width = <4>;
-@@ -248,7 +235,6 @@
- mmcif1: mmc@ee220000 {
- compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
- reg = <0 0xee220000 0 0x80>;
-- interrupt-parent = <&gic>;
- interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7790_CLK_MMCIF1>;
- reg-io-width = <4>;
-@@ -263,7 +249,6 @@
- sdhi0: sd@ee100000 {
- compatible = "renesas,sdhi-r8a7790";
- reg = <0 0xee100000 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7790_CLK_SDHI0>;
- cap-sd-highspeed;
-@@ -273,7 +258,6 @@
- sdhi1: sd@ee120000 {
- compatible = "renesas,sdhi-r8a7790";
- reg = <0 0xee120000 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7790_CLK_SDHI1>;
- cap-sd-highspeed;
-@@ -283,7 +267,6 @@
- sdhi2: sd@ee140000 {
- compatible = "renesas,sdhi-r8a7790";
- reg = <0 0xee140000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7790_CLK_SDHI2>;
- cap-sd-highspeed;
-@@ -293,7 +276,6 @@
- sdhi3: sd@ee160000 {
- compatible = "renesas,sdhi-r8a7790";
- reg = <0 0xee160000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7790_CLK_SDHI3>;
- cap-sd-highspeed;
-@@ -303,7 +285,6 @@
- scifa0: serial@e6c40000 {
- compatible = "renesas,scifa-r8a7790", "renesas,scifa";
- reg = <0 0xe6c40000 0 64>;
-- interrupt-parent = <&gic>;
- interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFA0>;
- clock-names = "sci_ick";
-@@ -312,7 +293,6 @@
-
- scifa1: serial@e6c50000 {
- compatible = "renesas,scifa-r8a7790", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c50000 0 64>;
- interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFA1>;
-@@ -322,7 +302,6 @@
-
- scifa2: serial@e6c60000 {
- compatible = "renesas,scifa-r8a7790", "renesas,scifa";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c60000 0 64>;
- interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFA2>;
-@@ -332,7 +311,6 @@
-
- scifb0: serial@e6c20000 {
- compatible = "renesas,scifb-r8a7790", "renesas,scifb";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c20000 0 64>;
- interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFB0>;
-@@ -342,7 +320,6 @@
-
- scifb1: serial@e6c30000 {
- compatible = "renesas,scifb-r8a7790", "renesas,scifb";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6c30000 0 64>;
- interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFB1>;
-@@ -352,7 +329,6 @@
-
- scifb2: serial@e6ce0000 {
- compatible = "renesas,scifb-r8a7790", "renesas,scifb";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6ce0000 0 64>;
- interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp2_clks R8A7790_CLK_SCIFB2>;
-@@ -362,7 +338,6 @@
-
- scif0: serial@e6e60000 {
- compatible = "renesas,scif-r8a7790", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6e60000 0 64>;
- interrupts = <0 152 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_SCIF0>;
-@@ -372,7 +347,6 @@
-
- scif1: serial@e6e68000 {
- compatible = "renesas,scif-r8a7790", "renesas,scif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe6e68000 0 64>;
- interrupts = <0 153 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_SCIF1>;
-@@ -382,7 +356,6 @@
-
- hscif0: serial@e62c0000 {
- compatible = "renesas,hscif-r8a7790", "renesas,hscif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe62c0000 0 96>;
- interrupts = <0 154 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_HSCIF0>;
-@@ -392,7 +365,6 @@
-
- hscif1: serial@e62c8000 {
- compatible = "renesas,hscif-r8a7790", "renesas,hscif";
-- interrupt-parent = <&gic>;
- reg = <0 0xe62c8000 0 96>;
- interrupts = <0 155 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp7_clks R8A7790_CLK_HSCIF1>;
-@@ -403,7 +375,6 @@
- sata0: sata@ee300000 {
- compatible = "renesas,sata-r8a7790";
- reg = <0 0xee300000 0 0x2000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp8_clks R8A7790_CLK_SATA0>;
- status = "disabled";
-@@ -412,7 +383,6 @@
- sata1: sata@ee500000 {
- compatible = "renesas,sata-r8a7790";
- reg = <0 0xee500000 0 0x2000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp8_clks R8A7790_CLK_SATA1>;
- status = "disabled";
-@@ -756,7 +726,6 @@
- spi: spi@e6b10000 {
- compatible = "renesas,qspi-r8a7790", "renesas,qspi";
- reg = <0 0xe6b10000 0 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp9_clks R8A7790_CLK_QSPI_MOD>;
- num-cs = <1>;
---
-2.1.2
-
diff --git a/patches.renesas/0303-ARM-shmobile-r8a7790-add-i2c-aliases-to-dtsi.patch b/patches.renesas/0303-ARM-shmobile-r8a7790-add-i2c-aliases-to-dtsi.patch
deleted file mode 100644
index 20d2d696fe108..0000000000000
--- a/patches.renesas/0303-ARM-shmobile-r8a7790-add-i2c-aliases-to-dtsi.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 5fb0c320be6a0ce9ee02c12a2aa73cc023b721cb Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Sun, 16 Feb 2014 10:40:58 +0100
-Subject: ARM: shmobile: r8a7790: add i2c aliases to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6b1d7c68b255be81ef174d9621869fde5c95bc20)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index d7bde1ee2bb0..6eb9613d9c8d 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -18,6 +18,13 @@
- #address-cells = <2>;
- #size-cells = <2>;
-
-+ aliases {
-+ i2c0 = &i2c0;
-+ i2c1 = &i2c1;
-+ i2c2 = &i2c2;
-+ i2c3 = &i2c3;
-+ };
-+
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
---
-2.1.2
-
diff --git a/patches.renesas/0304-ARM-shmobile-Armadillo-800-EVA-set-proper-DMA-masks-.patch b/patches.renesas/0304-ARM-shmobile-Armadillo-800-EVA-set-proper-DMA-masks-.patch
deleted file mode 100644
index 8d676ad38c7be..0000000000000
--- a/patches.renesas/0304-ARM-shmobile-Armadillo-800-EVA-set-proper-DMA-masks-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From d6567a62240ca32a7b4b11ef92eb1ed5ef57ae97 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Feb 2014 04:26:52 +0300
-Subject: ARM: shmobile: Armadillo 800 EVA: set proper DMA masks for Ether
- device
-
-Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and
-'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing
-ability.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 78060840cd2286c0e382641e60dcd4145f82f881)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 93533e2710a8..4da3da7be3fa 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -383,6 +383,8 @@ static struct platform_device sh_eth_device = {
- .id = -1,
- .dev = {
- .platform_data = &sh_eth_platdata,
-+ .dma_mask = &sh_eth_device.dev.coherent_dma_mask,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
- },
- .resource = sh_eth_resources,
- .num_resources = ARRAY_SIZE(sh_eth_resources),
---
-2.1.2
-
diff --git a/patches.renesas/0305-ARM-shmobile-BOCK-W-set-proper-DMA-masks-for-Ether-d.patch b/patches.renesas/0305-ARM-shmobile-BOCK-W-set-proper-DMA-masks-for-Ether-d.patch
deleted file mode 100644
index a3f7df7c8f592..0000000000000
--- a/patches.renesas/0305-ARM-shmobile-BOCK-W-set-proper-DMA-masks-for-Ether-d.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From dc324a879198844ad7d73b4e53accd6ec9f9a540 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Feb 2014 04:28:43 +0300
-Subject: ARM: shmobile: BOCK-W: set proper DMA masks for Ether device
-
-Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and
-'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing
-ability.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ca6da5319761308e38bb97af9030d16e223355d1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 21 ++++++++++++++-------
- 1 file changed, 14 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index 684a529e400d..aaed215e96b9 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -1,9 +1,9 @@
- /*
- * Bock-W board support
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
- * Copyright (C) 2013 Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-- * Copyright (C) 2013 Cogent Embedded, Inc.
-+ * Copyright (C) 2013-2014 Cogent Embedded, 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
-@@ -235,6 +235,17 @@ static struct sh_eth_plat_data ether_platform_data __initdata = {
- .no_ether_link = 1,
- };
-
-+static struct platform_device_info ether_info __initdata = {
-+ .parent = &platform_bus,
-+ .name = "r8a777x-ether",
-+ .id = -1,
-+ .res = ether_resources,
-+ .num_res = ARRAY_SIZE(ether_resources),
-+ .data = &ether_platform_data,
-+ .size_data = sizeof(ether_platform_data),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
- /* I2C */
- static struct i2c_board_info i2c0_devices[] = {
- {
-@@ -592,11 +603,7 @@ static void __init bockw_init(void)
- r8a7778_init_irq_extpin(1);
- r8a7778_add_standard_devices();
-
-- platform_device_register_resndata(&platform_bus, "r8a777x-ether", -1,
-- ether_resources,
-- ARRAY_SIZE(ether_resources),
-- &ether_platform_data,
-- sizeof(ether_platform_data));
-+ platform_device_register_full(&ether_info);
-
- platform_device_register_full(&vin0_info);
- /* VIN1 has a pin conflict with Ether */
---
-2.1.2
-
diff --git a/patches.renesas/0306-ARM-shmobile-Lager-set-proper-DMA-masks-for-Ether-de.patch b/patches.renesas/0306-ARM-shmobile-Lager-set-proper-DMA-masks-for-Ether-de.patch
deleted file mode 100644
index 3a8eb4848a1e7..0000000000000
--- a/patches.renesas/0306-ARM-shmobile-Lager-set-proper-DMA-masks-for-Ether-de.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From fc8175afbf103fd16afa7dd2a00c185dc06cc803 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Feb 2014 04:30:20 +0300
-Subject: ARM: shmobile: Lager: set proper DMA masks for Ether device
-
-Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and
-'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing
-ability.
-
-Currently, the code works without DMA masks but as we would have to enable
-CONFIG_HIGHMEM to access the full board memory in the future, when support for
-NETIF_F_SG would be added to the 'sh_eth' driver as well, the correct DMA masks
-should start to matter...
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5d5a87a5b6572426f8eae6e26ebcf9664d2d001a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 193dff0267d8..f0104bfe544e 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -1,8 +1,9 @@
- /*
- * Lager board support
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
- * Copyright (C) 2013 Magnus Damm
-+ * Copyright (C) 2014 Cogent Embedded, 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
-@@ -275,6 +276,17 @@ static const struct resource ether_resources[] __initconst = {
- DEFINE_RES_IRQ(gic_spi(162)),
- };
-
-+static const struct platform_device_info ether_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "r8a7790-ether",
-+ .id = -1,
-+ .res = ether_resources,
-+ .num_res = ARRAY_SIZE(ether_resources),
-+ .data = &ether_pdata,
-+ .size_data = sizeof(ether_pdata),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
- /* SPI Flash memory (Spansion S25FL512SAGMFIG11 64Mb) */
- static struct mtd_partition spi_flash_part[] = {
- /* Reserved for user loader program, read-only */
-@@ -791,10 +803,7 @@ static void __init lager_add_standard_devices(void)
- mmcif1_resources, ARRAY_SIZE(mmcif1_resources),
- &mmcif1_pdata, sizeof(mmcif1_pdata));
-
-- platform_device_register_resndata(&platform_bus, "r8a7790-ether", -1,
-- ether_resources,
-- ARRAY_SIZE(ether_resources),
-- &ether_pdata, sizeof(ether_pdata));
-+ platform_device_register_full(&ether_info);
-
- lager_add_du_device();
-
---
-2.1.2
-
diff --git a/patches.renesas/0307-ARM-shmobile-Koelsch-set-proper-DMA-masks-for-Ether-.patch b/patches.renesas/0307-ARM-shmobile-Koelsch-set-proper-DMA-masks-for-Ether-.patch
deleted file mode 100644
index f7fd7ab84b7e3..0000000000000
--- a/patches.renesas/0307-ARM-shmobile-Koelsch-set-proper-DMA-masks-for-Ether-.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From c12f03d5c12b2b7807b435e1f59d977d6e41cc89 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Feb 2014 04:36:19 +0300
-Subject: ARM: shmobile: Koelsch: set proper DMA masks for Ether device
-
-Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and
-'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing
-ability.
-
-Currently, the code works without DMA masks but as we would have to enable
-CONFIG_HIGHMEM to access the full board memory in the future, when support for
-NETIF_F_SG would be added to the 'sh_eth' driver as well, the correct DMA masks
-should start to matter...
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 379bfd7134bccccf58962b39e504bd639a5e75b2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 893d47c7d7a6..5a034ff405d0 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -2,8 +2,9 @@
- * Koelsch board support
- *
- * Copyright (C) 2013 Renesas Electronics Corporation
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
- * Copyright (C) 2013 Magnus Damm
-+ * Copyright (C) 2014 Cogent Embedded, 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
-@@ -116,6 +117,17 @@ static const struct resource ether_resources[] __initconst = {
- DEFINE_RES_IRQ(gic_spi(162)),
- };
-
-+static const struct platform_device_info ether_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "r8a7791-ether",
-+ .id = -1,
-+ .res = ether_resources,
-+ .num_res = ARRAY_SIZE(ether_resources),
-+ .data = &ether_pdata,
-+ .size_data = sizeof(ether_pdata),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
- /* LEDS */
- static struct gpio_led koelsch_leds[] = {
- {
-@@ -426,10 +438,7 @@ static void __init koelsch_add_standard_devices(void)
- ARRAY_SIZE(koelsch_pinctrl_map));
- r8a7791_pinmux_init();
- r8a7791_add_standard_devices();
-- platform_device_register_resndata(&platform_bus, "r8a7791-ether", -1,
-- ether_resources,
-- ARRAY_SIZE(ether_resources),
-- &ether_pdata, sizeof(ether_pdata));
-+ platform_device_register_full(&ether_info);
- platform_device_register_data(&platform_bus, "leds-gpio", -1,
- &koelsch_leds_pdata,
- sizeof(koelsch_leds_pdata));
---
-2.1.2
-
diff --git a/patches.renesas/0308-ARM-shmobile-Genmai-set-proper-DMA-masks-for-Ether-d.patch b/patches.renesas/0308-ARM-shmobile-Genmai-set-proper-DMA-masks-for-Ether-d.patch
deleted file mode 100644
index 74e9e2a3b094e..0000000000000
--- a/patches.renesas/0308-ARM-shmobile-Genmai-set-proper-DMA-masks-for-Ether-d.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 9647cda80b6ddae3db73a078148f4db9ecb3e1b2 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 15 Feb 2014 04:37:32 +0300
-Subject: ARM: shmobile: Genmai: set proper DMA masks for Ether device
-
-Ether MAC is a DMA-capable device and so should have 'dev.dma_mask' and
-'dev.coherent_dma_mask' fields set properly, to reflect 32-bit DMA addressing
-ability.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 583e2448629cc9fb3b1a0c850ddbe06819421d3e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index e240980cc227..6c328d63b819 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -1,8 +1,9 @@
- /*
- * Genmai board support
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
- * Copyright (C) 2013 Magnus Damm
-+ * Copyright (C) 2014 Cogent Embedded, 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
-@@ -43,6 +44,17 @@ static const struct resource ether_resources[] __initconst = {
- DEFINE_RES_IRQ(gic_iid(359)),
- };
-
-+static const struct platform_device_info ether_info __initconst = {
-+ .parent = &platform_bus,
-+ .name = "r7s72100-ether",
-+ .id = -1,
-+ .res = ether_resources,
-+ .num_res = ARRAY_SIZE(ether_resources),
-+ .data = &ether_pdata,
-+ .size_data = sizeof(ether_pdata),
-+ .dma_mask = DMA_BIT_MASK(32),
-+};
-+
- /* RSPI */
- #define RSPI_RESOURCE(idx, baseaddr, irq) \
- static const struct resource rspi##idx##_resources[] __initconst = { \
-@@ -82,10 +94,7 @@ static void __init genmai_add_standard_devices(void)
- r7s72100_clock_init();
- r7s72100_add_dt_devices();
-
-- platform_device_register_resndata(&platform_bus, "r7s72100-ether", -1,
-- ether_resources,
-- ARRAY_SIZE(ether_resources),
-- &ether_pdata, sizeof(ether_pdata));
-+ platform_device_register_full(&ether_info);
-
- r7s72100_register_rspi(0);
- r7s72100_register_rspi(1);
---
-2.1.2
-
diff --git a/patches.renesas/0309-ARM-shmobile-Get-rid-of-legacy-KZM9D-defconfig.patch b/patches.renesas/0309-ARM-shmobile-Get-rid-of-legacy-KZM9D-defconfig.patch
deleted file mode 100644
index 0bc7db077a344..0000000000000
--- a/patches.renesas/0309-ARM-shmobile-Get-rid-of-legacy-KZM9D-defconfig.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From ceb1e6b080fcf968f8f9f3ee29d4c558623b5fb9 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 13 Feb 2014 17:26:28 +0900
-Subject: ARM: shmobile: Get rid of legacy KZM9D defconfig
-
-Get rid of the kzm9d_defconfig. The KZM9D is now supported
-as DT only in case of EMEV2 is selected in the kernel
-configuration.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 30023bb4fae3eb30106c5f8986fc7ac87387aebc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/kzm9d_defconfig | 91 ----------------------------------------
- 1 file changed, 91 deletions(-)
- delete mode 100644 arch/arm/configs/kzm9d_defconfig
-
-diff --git a/arch/arm/configs/kzm9d_defconfig b/arch/arm/configs/kzm9d_defconfig
-deleted file mode 100644
-index 1cc330b06bf6..000000000000
---- a/arch/arm/configs/kzm9d_defconfig
-+++ /dev/null
-@@ -1,91 +0,0 @@
--# CONFIG_ARM_PATCH_PHYS_VIRT is not set
--CONFIG_EXPERIMENTAL=y
--CONFIG_SYSVIPC=y
--CONFIG_NO_HZ=y
--CONFIG_IKCONFIG=y
--CONFIG_IKCONFIG_PROC=y
--CONFIG_LOG_BUF_SHIFT=16
--CONFIG_CC_OPTIMIZE_FOR_SIZE=y
--CONFIG_SYSCTL_SYSCALL=y
--CONFIG_EMBEDDED=y
--CONFIG_PERF_EVENTS=y
--CONFIG_SLAB=y
--# CONFIG_BLK_DEV_BSG is not set
--# CONFIG_IOSCHED_DEADLINE is not set
--# CONFIG_IOSCHED_CFQ is not set
--CONFIG_ARCH_SHMOBILE_LEGACY=y
--CONFIG_ARCH_EMEV2=y
--CONFIG_MACH_KZM9D=y
--CONFIG_MEMORY_START=0x40000000
--CONFIG_MEMORY_SIZE=0x10000000
--# CONFIG_SH_TIMER_TMU is not set
--# CONFIG_SWP_EMULATE is not set
--# CONFIG_CACHE_L2X0 is not set
--CONFIG_SMP=y
--CONFIG_NR_CPUS=2
--CONFIG_HOTPLUG_CPU=y
--# CONFIG_LOCAL_TIMERS is not set
--CONFIG_AEABI=y
--# CONFIG_OABI_COMPAT is not set
--# CONFIG_CROSS_MEMORY_ATTACH is not set
--CONFIG_FORCE_MAX_ZONEORDER=13
--CONFIG_ZBOOT_ROM_TEXT=0x0
--CONFIG_ZBOOT_ROM_BSS=0x0
--CONFIG_ARM_APPENDED_DTB=y
--CONFIG_AUTO_ZRELADDR=y
--CONFIG_VFP=y
--# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
--CONFIG_PM_RUNTIME=y
--CONFIG_NET=y
--CONFIG_PACKET=y
--CONFIG_UNIX=y
--CONFIG_INET=y
--CONFIG_IP_PNP=y
--CONFIG_IP_PNP_DHCP=y
--# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
--# CONFIG_INET_XFRM_MODE_TUNNEL is not set
--# CONFIG_INET_XFRM_MODE_BEET is not set
--# CONFIG_INET_LRO is not set
--# CONFIG_INET_DIAG is not set
--# CONFIG_IPV6 is not set
--# CONFIG_WIRELESS is not set
--CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
--CONFIG_DEVTMPFS=y
--CONFIG_DEVTMPFS_MOUNT=y
--# CONFIG_BLK_DEV is not set
--CONFIG_NETDEVICES=y
--# CONFIG_NET_VENDOR_BROADCOM is not set
--# CONFIG_NET_VENDOR_CHELSIO is not set
--# CONFIG_NET_VENDOR_CIRRUS is not set
--# CONFIG_NET_VENDOR_FARADAY is not set
--# CONFIG_NET_VENDOR_INTEL is not set
--# CONFIG_NET_VENDOR_MARVELL is not set
--# CONFIG_NET_VENDOR_MICREL is not set
--# CONFIG_NET_VENDOR_NATSEMI is not set
--# CONFIG_NET_VENDOR_SEEQ is not set
--CONFIG_SMSC911X=y
--# CONFIG_NET_VENDOR_STMICRO is not set
--# CONFIG_NET_VENDOR_WIZNET is not set
--# CONFIG_WLAN is not set
--# CONFIG_INPUT_MOUSEDEV is not set
--# CONFIG_INPUT_KEYBOARD is not set
--# CONFIG_INPUT_MOUSE is not set
--# CONFIG_SERIO is not set
--# CONFIG_LEGACY_PTYS is not set
--# CONFIG_DEVKMEM is not set
--CONFIG_SERIAL_8250=y
--CONFIG_SERIAL_8250_CONSOLE=y
--CONFIG_SERIAL_8250_EM=y
--# CONFIG_HW_RANDOM is not set
--CONFIG_GPIOLIB=y
--CONFIG_GPIO_EM=y
--# CONFIG_HWMON is not set
--# CONFIG_HID_SUPPORT is not set
--# CONFIG_USB_SUPPORT is not set
--# CONFIG_IOMMU_SUPPORT is not set
--# CONFIG_DNOTIFY is not set
--CONFIG_TMPFS=y
--# CONFIG_MISC_FILESYSTEMS is not set
--CONFIG_NFS_FS=y
--CONFIG_ROOT_NFS=y
--# CONFIG_FTRACE is not set
---
-2.1.2
-
diff --git a/patches.renesas/0310-ARM-shmobile-koelsch-Enable-SDHI-GPIO-and-regulators.patch b/patches.renesas/0310-ARM-shmobile-koelsch-Enable-SDHI-GPIO-and-regulators.patch
deleted file mode 100644
index f9cbfd6decb60..0000000000000
--- a/patches.renesas/0310-ARM-shmobile-koelsch-Enable-SDHI-GPIO-and-regulators.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 5784792a2f757b86549adb5d7c6bfea1281988e4 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 13 Feb 2014 15:39:47 +0900
-Subject: ARM: shmobile: koelsch: Enable SDHI, GPIO and regulators in defconfig
-
-Enable the following:
-* regulators (needed for SDHI)
-* SDHI
-* GPIO
-* GPIO keys
-* GPIO LEDs
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 62f95adf45722e14338d80d2bcfce2e00ad86026)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/koelsch_defconfig | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/arch/arm/configs/koelsch_defconfig b/arch/arm/configs/koelsch_defconfig
-index 95611392a20e..86faab565a96 100644
---- a/arch/arm/configs/koelsch_defconfig
-+++ b/arch/arm/configs/koelsch_defconfig
-@@ -59,6 +59,7 @@ CONFIG_SH_ETH=y
- # CONFIG_NET_VENDOR_VIA is not set
- # CONFIG_NET_VENDOR_WIZNET is not set
- # CONFIG_INPUT_MOUSEDEV_PSAUX is not set
-+CONFIG_KEYBOARD_GPIO=y
- # CONFIG_INPUT_MOUSE is not set
- # CONFIG_LEGACY_PTYS is not set
- CONFIG_SERIAL_SH_SCI=y
-@@ -68,13 +69,21 @@ CONFIG_I2C=y
- CONFIG_I2C_RCAR=y
- CONFIG_SPI=y
- CONFIG_SPI_RSPI=y
-+CONFIG_GPIOLIB=y
-+CONFIG_GPIO_RCAR=y
- # CONFIG_HWMON is not set
- CONFIG_THERMAL=y
- CONFIG_RCAR_THERMAL=y
-+CONFIG_REGULATOR=y
-+CONFIG_REGULATOR_FIXED_VOLTAGE=y
-+CONFIG_REGULATOR_GPIO=y
- # CONFIG_HID is not set
- # CONFIG_USB_SUPPORT is not set
-+CONFIG_MMC=y
-+CONFIG_MMC_SDHI=y
- CONFIG_NEW_LEDS=y
- CONFIG_LEDS_CLASS=y
-+CONFIG_LEDS_GPIO=y
- # CONFIG_IOMMU_SUPPORT is not set
- # CONFIG_DNOTIFY is not set
- CONFIG_TMPFS=y
---
-2.1.2
-
diff --git a/patches.renesas/0311-ARM-shmobile-Remove-KZM9D-board-code.patch b/patches.renesas/0311-ARM-shmobile-Remove-KZM9D-board-code.patch
deleted file mode 100644
index c3e93681269d5..0000000000000
--- a/patches.renesas/0311-ARM-shmobile-Remove-KZM9D-board-code.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 88202c18dd83fb741a05460ac153d305ee44ed26 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 17 Feb 2014 16:24:19 +0900
-Subject: ARM: shmobile: Remove KZM9D board code
-
-Get rid of KZM9D board code written in C. This version of the
-C board code was used in the case of multiplatform, but these
-days DT can be used instead, so because of that simply get rid
-of the C code to simplify and save space.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1ee101d9c416823f960a4841ef81044d461034b5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 6 ----
- arch/arm/mach-shmobile/Makefile | 1 -
- arch/arm/mach-shmobile/board-kzm9d-reference.c | 47 --------------------------
- 3 files changed, 54 deletions(-)
- delete mode 100644 arch/arm/mach-shmobile/board-kzm9d-reference.c
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index deb6dc884bf0..2f5c6f319a71 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -47,12 +47,6 @@ config MACH_KOELSCH
- depends on ARCH_R8A7791
- select MICREL_PHY if SH_ETH
-
--config MACH_KZM9D
-- bool "KZM9D board"
-- depends on ARCH_EMEV2
-- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-- select SMSC_PHY if SMSC911X
--
- config MACH_LAGER
- bool "Lager board"
- depends on ARCH_R8A7790
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index fe7d4ff706e4..1402d602f5a4 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -58,7 +58,6 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o
- ifdef CONFIG_ARCH_SHMOBILE_MULTI
- obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o
- obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o
--obj-$(CONFIG_MACH_KZM9D) += board-kzm9d-reference.o
- obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o
- else
- obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
-diff --git a/arch/arm/mach-shmobile/board-kzm9d-reference.c b/arch/arm/mach-shmobile/board-kzm9d-reference.c
-deleted file mode 100644
-index 853003c8988a..000000000000
---- a/arch/arm/mach-shmobile/board-kzm9d-reference.c
-+++ /dev/null
-@@ -1,47 +0,0 @@
--/*
-- * kzm9d board support - Reference DT implementation
-- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-- * Copyright (C) 2013 Magnus Damm
-- *
-- * 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 of the License.
-- *
-- * 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 St, Fifth Floor, Boston, MA 02110-1301 USA
-- */
--
--#include <linux/init.h>
--#include <linux/of_platform.h>
--#include <linux/clk-provider.h>
--#include <mach/emev2.h>
--#include <mach/common.h>
--#include <asm/mach/arch.h>
--
--static void __init kzm9d_add_standard_devices(void)
--{
-- of_clk_init(NULL);
-- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
--}
--
--static const char *kzm9d_boards_compat_dt[] __initdata = {
-- "renesas,kzm9d",
-- "renesas,kzm9d-reference",
-- NULL,
--};
--
--DT_MACHINE_START(KZM9D_DT, "kzm9d")
-- .smp = smp_ops(emev2_smp_ops),
-- .map_io = emev2_map_io,
-- .init_early = emev2_init_delay,
-- .init_machine = kzm9d_add_standard_devices,
-- .init_late = shmobile_init_late,
-- .dt_compat = kzm9d_boards_compat_dt,
--MACHINE_END
---
-2.1.2
-
diff --git a/patches.renesas/0312-ARM-shmobile-Remove-Koelsch-DT-reference-legacy-cloc.patch b/patches.renesas/0312-ARM-shmobile-Remove-Koelsch-DT-reference-legacy-cloc.patch
deleted file mode 100644
index 055455c9c1551..0000000000000
--- a/patches.renesas/0312-ARM-shmobile-Remove-Koelsch-DT-reference-legacy-cloc.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From dd8c9b74ae07db85558e533fca30f83ee5b46bbf Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 17 Feb 2014 16:21:28 +0900
-Subject: ARM: shmobile: Remove Koelsch DT reference legacy clock bits
-
-Koelsch DT reference is these days built for multiplatform
-only which means that CCF comes with the package. Remove
-unused legacy code ifdefs to clean up the code.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 34b6a241de1d965b1c047a97fad602687218a866)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 267fe8358cfe..a3fd30242bd8 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -84,7 +84,6 @@ static void __init koelsch_add_du_device(void)
-
- static void __init koelsch_add_standard_devices(void)
- {
--#ifdef CONFIG_COMMON_CLK
- /*
- * This is a really crude hack to provide clkdev support to the CMT and
- * DU devices until they get moved to DT.
-@@ -125,9 +124,7 @@ static void __init koelsch_add_standard_devices(void)
- clk_put(clk);
- }
- }
--#else
-- r8a7791_clock_init();
--#endif
-+
- r8a7791_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0313-ARM-shmobile-Remove-Lager-DT-reference-legacy-clock-.patch b/patches.renesas/0313-ARM-shmobile-Remove-Lager-DT-reference-legacy-clock-.patch
deleted file mode 100644
index c3bc50999c5a7..0000000000000
--- a/patches.renesas/0313-ARM-shmobile-Remove-Lager-DT-reference-legacy-clock-.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 3924d1936ab4b8b75458844ec1b86a5608a07f6e Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 17 Feb 2014 16:19:45 +0900
-Subject: ARM: shmobile: Remove Lager DT reference legacy clock bits
-
-Lager DT reference is these days built for multiplatform
-only which means that CCF comes with the package. Remove
-unused legacy code ifdefs to clean up the code.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6197c08ab81cf1430cbe7346fd6ca0b5a18580bf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 6ba8b3b41609..440aac36d693 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -88,7 +88,6 @@ static void __init lager_add_du_device(void)
-
- static void __init lager_add_standard_devices(void)
- {
--#ifdef CONFIG_COMMON_CLK
- /*
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
-@@ -126,9 +125,6 @@ static void __init lager_add_standard_devices(void)
- clk_put(clk);
- }
- }
--#else
-- r8a7790_clock_init();
--#endif
-
- r8a7790_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
---
-2.1.2
-
diff --git a/patches.renesas/0314-ARM-shmobile-r8a7791-add-i2c-master-nodes-to-dtsi.patch b/patches.renesas/0314-ARM-shmobile-r8a7791-add-i2c-master-nodes-to-dtsi.patch
deleted file mode 100644
index e58b66371be42..0000000000000
--- a/patches.renesas/0314-ARM-shmobile-r8a7791-add-i2c-master-nodes-to-dtsi.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 4f0e0162dd52c97f44ef16628e984ebadd5af79c Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 17 Feb 2014 11:44:41 +0100
-Subject: ARM: shmobile: r8a7791: add i2c master nodes to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5bd3de7ba7b28c885d534260800693fe57e55ec8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 69 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 69 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 41194fe18c3c..1ab4f3d5a8c2 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -19,6 +19,15 @@
- #address-cells = <2>;
- #size-cells = <2>;
-
-+ aliases {
-+ i2c0 = &i2c0;
-+ i2c1 = &i2c1;
-+ i2c2 = &i2c2;
-+ i2c3 = &i2c3;
-+ i2c4 = &i2c4;
-+ i2c5 = &i2c5;
-+ };
-+
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -170,6 +179,66 @@
- <0 17 IRQ_TYPE_LEVEL_HIGH>;
- };
-
-+ i2c0: i2c@e6508000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6508000 0 0x40>;
-+ interrupts = <0 287 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C0>;
-+ status = "disabled";
-+ };
-+
-+ i2c1: i2c@e6518000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6518000 0 0x40>;
-+ interrupts = <0 288 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C1>;
-+ status = "disabled";
-+ };
-+
-+ i2c2: i2c@e6530000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6530000 0 0x40>;
-+ interrupts = <0 286 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C2>;
-+ status = "disabled";
-+ };
-+
-+ i2c3: i2c@e6540000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6540000 0 0x40>;
-+ interrupts = <0 290 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C3>;
-+ status = "disabled";
-+ };
-+
-+ i2c4: i2c@e6520000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6520000 0 0x40>;
-+ interrupts = <0 19 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C4>;
-+ status = "disabled";
-+ };
-+
-+ i2c5: i2c@e6528000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,i2c-r8a7791";
-+ reg = <0 0xe6528000 0 0x40>;
-+ interrupts = <0 20 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_I2C5>;
-+ status = "disabled";
-+ };
-+
- pfc: pfc@e6060000 {
- compatible = "renesas,pfc-r8a7791";
- reg = <0 0xe6060000 0 0x250>;
---
-2.1.2
-
diff --git a/patches.renesas/0315-ARM-shmobile-r8a7791-add-i2c2-bus-to-koelsch-dt.patch b/patches.renesas/0315-ARM-shmobile-r8a7791-add-i2c2-bus-to-koelsch-dt.patch
deleted file mode 100644
index 9e5e51abc17a0..0000000000000
--- a/patches.renesas/0315-ARM-shmobile-r8a7791-add-i2c2-bus-to-koelsch-dt.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 5507755d638c2adef9307dad002fbd9c4e42b4a0 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 17 Feb 2014 11:44:42 +0100
-Subject: ARM: shmobile: r8a7791: add i2c2 bus to koelsch dt
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 38c53516729925d2123ed800e5f4182d77e450a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index f67d2d0abded..bf6ba0c7faa0 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -108,10 +108,29 @@
- clock-frequency = <20000000>;
- };
-
-+&i2c2 {
-+ pinctrl-0 = <&i2c2_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+ clock-frequency = <400000>;
-+
-+ eeprom@50 {
-+ compatible = "renesas,24c02";
-+ reg = <0x50>;
-+ pagesize = <16>;
-+ };
-+};
-+
- &pfc {
- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
- pinctrl-names = "default";
-
-+ i2c2_pins: i2c {
-+ renesas,groups = "i2c2";
-+ renesas,function = "i2c2";
-+ };
-+
- du_pins: du {
- renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
- renesas,function = "du";
---
-2.1.2
-
diff --git a/patches.renesas/0316-ARM-shmobile-r7s72100-add-nodes-for-i2c-controllers-.patch b/patches.renesas/0316-ARM-shmobile-r7s72100-add-nodes-for-i2c-controllers-.patch
deleted file mode 100644
index d5a20e1abad2f..0000000000000
--- a/patches.renesas/0316-ARM-shmobile-r7s72100-add-nodes-for-i2c-controllers-.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From 04709d6d5eee52219e01c9983ec1e80c1916a806 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 17 Feb 2014 22:19:17 +0100
-Subject: ARM: shmobile: r7s72100: add nodes for i2c controllers to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c81a4d3dfd33e097d3eef89e4eb830effb8b8d31)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100.dtsi | 72 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 72 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index 9be67a16fc6f..ee700717a34b 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -17,6 +17,10 @@
- #size-cells = <1>;
-
- aliases {
-+ i2c0 = &i2c0;
-+ i2c1 = &i2c1;
-+ i2c2 = &i2c2;
-+ i2c3 = &i2c3;
- spi0 = &spi0;
- spi1 = &spi1;
- spi2 = &spi2;
-@@ -44,6 +48,74 @@
- <0xe8202000 0x1000>;
- };
-
-+ i2c0: i2c@fcfee000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
-+ reg = <0xfcfee000 0x44>;
-+ interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 158 IRQ_TYPE_EDGE_RISING>,
-+ <0 159 IRQ_TYPE_EDGE_RISING>,
-+ <0 160 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 161 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 162 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 163 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 164 IRQ_TYPE_LEVEL_HIGH>;
-+ clock-frequency = <100000>;
-+ status = "disabled";
-+ };
-+
-+ i2c1: i2c@fcfee400 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
-+ reg = <0xfcfee400 0x44>;
-+ interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 166 IRQ_TYPE_EDGE_RISING>,
-+ <0 167 IRQ_TYPE_EDGE_RISING>,
-+ <0 168 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 169 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 170 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 171 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 172 IRQ_TYPE_LEVEL_HIGH>;
-+ clock-frequency = <100000>;
-+ status = "disabled";
-+ };
-+
-+ i2c2: i2c@fcfee800 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
-+ reg = <0xfcfee800 0x44>;
-+ interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 174 IRQ_TYPE_EDGE_RISING>,
-+ <0 175 IRQ_TYPE_EDGE_RISING>,
-+ <0 176 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 177 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 178 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 179 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 180 IRQ_TYPE_LEVEL_HIGH>;
-+ clock-frequency = <100000>;
-+ status = "disabled";
-+ };
-+
-+ i2c3: i2c@fcfeec00 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,riic-r7s72100", "renesas,riic-rz";
-+ reg = <0xfcfeec00 0x44>;
-+ interrupts = <0 181 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 182 IRQ_TYPE_EDGE_RISING>,
-+ <0 183 IRQ_TYPE_EDGE_RISING>,
-+ <0 184 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 185 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 186 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 187 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 188 IRQ_TYPE_LEVEL_HIGH>;
-+ clock-frequency = <100000>;
-+ status = "disabled";
-+ };
-+
- spi0: spi@e800c800 {
- compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
- reg = <0xe800c800 0x24>;
---
-2.1.2
-
diff --git a/patches.renesas/0317-ARM-shmobile-genmai-adapt-dts-to-use-native-i2c-driv.patch b/patches.renesas/0317-ARM-shmobile-genmai-adapt-dts-to-use-native-i2c-driv.patch
deleted file mode 100644
index 31ee59fc6254b..0000000000000
--- a/patches.renesas/0317-ARM-shmobile-genmai-adapt-dts-to-use-native-i2c-driv.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 4680eeab02046c0d994c74c0d67d4dd516731f6b Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 17 Feb 2014 22:19:18 +0100
-Subject: ARM: shmobile: genmai: adapt dts to use native i2c driver
-
-Activate the shiny new riic driver for i2c2. Tested by accessing the
-eeprom on the genmai board.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 367aaaea1d6c6496695ffd06b49590b8cfcb8aa5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-index 0849017e9d2f..e664611a47c8 100644
---- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-+++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-@@ -29,3 +29,14 @@
- #size-cells = <1>;
- };
- };
-+
-+&i2c2 {
-+ status = "okay";
-+ clock-frequency = <400000>;
-+
-+ eeprom@50 {
-+ compatible = "renesas,24c128";
-+ reg = <0x50>;
-+ pagesize = <64>;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0318-ARM-shmobile-r7s72100-update-defconfig-for-I2C-usage.patch b/patches.renesas/0318-ARM-shmobile-r7s72100-update-defconfig-for-I2C-usage.patch
deleted file mode 100644
index d02cfca74fb3d..0000000000000
--- a/patches.renesas/0318-ARM-shmobile-r7s72100-update-defconfig-for-I2C-usage.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 1090b7547952ed11da187c16b48940c32f18ff56 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 17 Feb 2014 22:19:19 +0100
-Subject: ARM: shmobile: r7s72100: update defconfig for I2C usage
-
-Select the correct I2C driver and activate EEPROM support to have a
-slave device for testing. Also activate i2c-dev, so i2c-tools will work.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7573e89ba1fcbe492c52d5b1e72fcf5d23da21d1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/genmai_defconfig | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig
-index 5ee6ac0931f7..d238fafb6762 100644
---- a/arch/arm/configs/genmai_defconfig
-+++ b/arch/arm/configs/genmai_defconfig
-@@ -52,6 +52,7 @@ CONFIG_IP_PNP_DHCP=y
- CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
- CONFIG_DEVTMPFS=y
- CONFIG_DEVTMPFS_MOUNT=y
-+CONFIG_EEPROM_AT24=y
- CONFIG_NETDEVICES=y
- # CONFIG_NET_CORE is not set
- # CONFIG_NET_VENDOR_ARC is not set
-@@ -80,7 +81,8 @@ CONFIG_SERIAL_SH_SCI=y
- CONFIG_SERIAL_SH_SCI_NR_UARTS=10
- CONFIG_SERIAL_SH_SCI_CONSOLE=y
- # CONFIG_HW_RANDOM is not set
--CONFIG_I2C_SH_MOBILE=y
-+CONFIG_I2C_CHARDEV=y
-+CONFIG_I2C_RIIC=y
- CONFIG_SPI=y
- CONFIG_SPI_RSPI=y
- # CONFIG_HWMON is not set
---
-2.1.2
-
diff --git a/patches.renesas/0319-usb-host-remove-selects-of-USB_ARCH_HAS_-HCI.patch b/patches.renesas/0319-usb-host-remove-selects-of-USB_ARCH_HAS_-HCI.patch
deleted file mode 100644
index 0028c54d7174b..0000000000000
--- a/patches.renesas/0319-usb-host-remove-selects-of-USB_ARCH_HAS_-HCI.patch
+++ /dev/null
@@ -1,310 +0,0 @@
-From 3c89ce3c9e853c91d9ab004a3021e66c708df310 Mon Sep 17 00:00:00 2001
-From: Paul Bolle <pebolle@tiscali.nl>
-Date: Sun, 16 Feb 2014 20:46:20 +0100
-Subject: usb: host: remove selects of USB_ARCH_HAS_?HCI
-
-USB_ARCH_HAS_EHCI, USB_ARCH_HAS_OHCI, and USB_ARCH_HAS_XHCI were just
-removed. Selecting them is a nop. The select statements for these
-symbols can be removed too.
-
-Signed-off-by: Paul Bolle <pebolle@tiscali.nl>
-Acked-by: Alan Stern <stern@rowland.harvard.edu>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit f6723b569a67aa4042b4ddc72822bf7f4395f3d2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/Kconfig | 3 ---
- arch/arm/mach-exynos/Kconfig | 1 -
- arch/arm/mach-omap2/Kconfig | 2 --
- arch/arm/mach-shmobile/Kconfig | 4 ----
- arch/arm/mach-tegra/Kconfig | 1 -
- arch/mips/Kconfig | 7 -------
- arch/mips/ath79/Kconfig | 8 --------
- arch/mips/ralink/Kconfig | 6 ------
- arch/powerpc/platforms/44x/Kconfig | 1 -
- arch/powerpc/platforms/ps3/Kconfig | 2 --
- arch/sh/Kconfig | 9 ---------
- 11 files changed, 44 deletions(-)
-
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 4733d327cfb1..3d58483486c1 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -535,7 +535,6 @@ config ARCH_DOVE
- select PINCTRL
- select PINCTRL_DOVE
- select PLAT_ORION_LEGACY
-- select USB_ARCH_HAS_EHCI
- help
- Support for the Marvell Dove SoC 88AP510
-
-@@ -634,7 +633,6 @@ config ARCH_LPC32XX
- select GENERIC_CLOCKEVENTS
- select HAVE_IDE
- select HAVE_PWM
-- select USB_ARCH_HAS_OHCI
- select USE_OF
- help
- Support for the NXP LPC32XX family of processors
-@@ -771,7 +769,6 @@ config ARCH_S3C64XX
- select SAMSUNG_ATAGS
- select SAMSUNG_WAKEMASK
- select SAMSUNG_WDT_RESET
-- select USB_ARCH_HAS_OHCI
- help
- Samsung S3C64XX series based systems
-
-diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
-index 4c414af75ef0..8d197dcdd2c0 100644
---- a/arch/arm/mach-exynos/Kconfig
-+++ b/arch/arm/mach-exynos/Kconfig
-@@ -36,7 +36,6 @@ config ARCH_EXYNOS5
- select HAVE_ARM_SCU if SMP
- select HAVE_SMP
- select PINCTRL
-- select USB_ARCH_HAS_XHCI
- help
- Samsung EXYNOS5 (Cortex-A15) SoC based systems
-
-diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
-index 0af7ca02314d..6fb91fb604a0 100644
---- a/arch/arm/mach-omap2/Kconfig
-+++ b/arch/arm/mach-omap2/Kconfig
-@@ -21,7 +21,6 @@ config ARCH_OMAP3
- select PM_OPP if PM
- select PM_RUNTIME if CPU_IDLE
- select SOC_HAS_OMAP2_SDRC
-- select USB_ARCH_HAS_EHCI if USB_SUPPORT
-
- config ARCH_OMAP4
- bool "TI OMAP4"
-@@ -42,7 +41,6 @@ config ARCH_OMAP4
- select PL310_ERRATA_727915
- select PM_OPP if PM
- select PM_RUNTIME if CPU_IDLE
-- select USB_ARCH_HAS_EHCI if USB_SUPPORT
- select ARM_ERRATA_754322
- select ARM_ERRATA_775420
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 2f5c6f319a71..5e3fb956ff08 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -99,8 +99,6 @@ config ARCH_R8A7778
- select CPU_V7
- select SH_CLK_CPG
- select ARM_GIC
-- select USB_ARCH_HAS_EHCI
-- select USB_ARCH_HAS_OHCI
-
- config ARCH_R8A7779
- bool "R-Car H1 (R8A77790)"
-@@ -108,8 +106,6 @@ config ARCH_R8A7779
- select ARM_GIC
- select CPU_V7
- select SH_CLK_CPG
-- select USB_ARCH_HAS_EHCI
-- select USB_ARCH_HAS_OHCI
- select RENESAS_INTC_IRQPIN
-
- config ARCH_R8A7790
-diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
-index b1232d8be6f5..4926bd11f190 100644
---- a/arch/arm/mach-tegra/Kconfig
-+++ b/arch/arm/mach-tegra/Kconfig
-@@ -19,7 +19,6 @@ config ARCH_TEGRA
- select RESET_CONTROLLER
- select SOC_BUS
- select SPARSE_IRQ
-- select USB_ARCH_HAS_EHCI if USB_SUPPORT
- select USB_ULPI if USB_PHY
- select USB_ULPI_VIEWPORT if USB_PHY
- select USE_OF
-diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index 95fa1f1d5c8b..cb1da372346c 100644
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -67,8 +67,6 @@ config MIPS_ALCHEMY
- select SYS_SUPPORTS_APM_EMULATION
- select ARCH_REQUIRE_GPIOLIB
- select SYS_SUPPORTS_ZBOOT
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
-
- config AR7
- bool "Texas Instruments AR7"
-@@ -360,7 +358,6 @@ config MIPS_SEAD3
- select SYS_SUPPORTS_LITTLE_ENDIAN
- select SYS_SUPPORTS_SMARTMIPS
- select SYS_SUPPORTS_MICROMIPS
-- select USB_ARCH_HAS_EHCI
- select USB_EHCI_BIG_ENDIAN_DESC
- select USB_EHCI_BIG_ENDIAN_MMIO
- select USE_OF
-@@ -718,8 +715,6 @@ config CAVIUM_OCTEON_SOC
- select SWAP_IO_SPACE
- select HW_HAS_PCI
- select ZONE_DMA32
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
- select HOLES_IN_ZONE
- select ARCH_REQUIRE_GPIOLIB
- help
-@@ -756,8 +751,6 @@ config NLM_XLR_BOARD
- select ZONE_DMA32 if 64BIT
- select SYNC_R4K
- select SYS_HAS_EARLY_PRINTK
-- select USB_ARCH_HAS_OHCI if USB_SUPPORT
-- select USB_ARCH_HAS_EHCI if USB_SUPPORT
- select SYS_SUPPORTS_ZBOOT
- select SYS_SUPPORTS_ZBOOT_UART16550
- help
-diff --git a/arch/mips/ath79/Kconfig b/arch/mips/ath79/Kconfig
-index 3995e31a73e2..dfc60209dc63 100644
---- a/arch/mips/ath79/Kconfig
-+++ b/arch/mips/ath79/Kconfig
-@@ -74,34 +74,26 @@ config ATH79_MACH_UBNT_XM
- endmenu
-
- config SOC_AR71XX
-- select USB_ARCH_HAS_EHCI
-- select USB_ARCH_HAS_OHCI
- select HW_HAS_PCI
- def_bool n
-
- config SOC_AR724X
-- select USB_ARCH_HAS_EHCI
-- select USB_ARCH_HAS_OHCI
- select HW_HAS_PCI
- select PCI_AR724X if PCI
- def_bool n
-
- config SOC_AR913X
-- select USB_ARCH_HAS_EHCI
- def_bool n
-
- config SOC_AR933X
-- select USB_ARCH_HAS_EHCI
- def_bool n
-
- config SOC_AR934X
-- select USB_ARCH_HAS_EHCI
- select HW_HAS_PCI
- select PCI_AR724X if PCI
- def_bool n
-
- config SOC_QCA955X
-- select USB_ARCH_HAS_EHCI
- select HW_HAS_PCI
- select PCI_AR724X if PCI
- def_bool n
-diff --git a/arch/mips/ralink/Kconfig b/arch/mips/ralink/Kconfig
-index 1bfd1c17b3c2..4a296655f446 100644
---- a/arch/mips/ralink/Kconfig
-+++ b/arch/mips/ralink/Kconfig
-@@ -20,19 +20,13 @@ choice
- config SOC_RT305X
- bool "RT305x"
- select USB_ARCH_HAS_HCD
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
-
- config SOC_RT3883
- bool "RT3883"
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
- select HW_HAS_PCI
-
- config SOC_MT7620
- bool "MT7620"
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
-
- endchoice
-
-diff --git a/arch/powerpc/platforms/44x/Kconfig b/arch/powerpc/platforms/44x/Kconfig
-index d6c7506ec7d9..dc1a264ec6e6 100644
---- a/arch/powerpc/platforms/44x/Kconfig
-+++ b/arch/powerpc/platforms/44x/Kconfig
-@@ -265,7 +265,6 @@ config 440EP
- select PPC_FPU
- select IBM440EP_ERR42
- select IBM_EMAC_ZMII
-- select USB_ARCH_HAS_OHCI
-
- config 440EPX
- bool
-diff --git a/arch/powerpc/platforms/ps3/Kconfig b/arch/powerpc/platforms/ps3/Kconfig
-index e87c19473973..56f274064d6c 100644
---- a/arch/powerpc/platforms/ps3/Kconfig
-+++ b/arch/powerpc/platforms/ps3/Kconfig
-@@ -2,10 +2,8 @@ config PPC_PS3
- bool "Sony PS3"
- depends on PPC64 && PPC_BOOK3S
- select PPC_CELL
-- select USB_ARCH_HAS_OHCI
- select USB_OHCI_LITTLE_ENDIAN
- select USB_OHCI_BIG_ENDIAN_MMIO
-- select USB_ARCH_HAS_EHCI
- select USB_EHCI_BIG_ENDIAN_MMIO
- select PPC_PCI_CHOICE
- help
-diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
-index 6357710753d5..64455daa63a1 100644
---- a/arch/sh/Kconfig
-+++ b/arch/sh/Kconfig
-@@ -356,7 +356,6 @@ config CPU_SUBTYPE_SH7720
- select CPU_HAS_DSP
- select SYS_SUPPORTS_CMT
- select ARCH_WANT_OPTIONAL_GPIOLIB
-- select USB_ARCH_HAS_OHCI
- select USB_OHCI_SH if USB_OHCI_HCD
- select PINCTRL
- help
-@@ -367,7 +366,6 @@ config CPU_SUBTYPE_SH7721
- select CPU_SH3
- select CPU_HAS_DSP
- select SYS_SUPPORTS_CMT
-- select USB_ARCH_HAS_OHCI
- select USB_OHCI_SH if USB_OHCI_HCD
- help
- Select SH7721 if you have a SH3-DSP SH7721 CPU.
-@@ -445,8 +443,6 @@ config CPU_SUBTYPE_SH7734
- select CPU_SH4A
- select CPU_SHX2
- select ARCH_WANT_OPTIONAL_GPIOLIB
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
- select PINCTRL
- help
- Select SH7734 if you have a SH4A SH7734 CPU.
-@@ -456,8 +452,6 @@ config CPU_SUBTYPE_SH7757
- select CPU_SH4A
- select CPU_SHX2
- select ARCH_WANT_OPTIONAL_GPIOLIB
-- select USB_ARCH_HAS_OHCI
-- select USB_ARCH_HAS_EHCI
- select PINCTRL
- help
- Select SH7757 if you have a SH4A SH7757 CPU.
-@@ -465,7 +459,6 @@ config CPU_SUBTYPE_SH7757
- config CPU_SUBTYPE_SH7763
- bool "Support SH7763 processor"
- select CPU_SH4A
-- select USB_ARCH_HAS_OHCI
- select USB_OHCI_SH if USB_OHCI_HCD
- help
- Select SH7763 if you have a SH4A SH7763(R5S77631) CPU.
-@@ -494,9 +487,7 @@ config CPU_SUBTYPE_SH7786
- select CPU_HAS_PTEAEX
- select GENERIC_CLOCKEVENTS_BROADCAST if SMP
- select ARCH_WANT_OPTIONAL_GPIOLIB
-- select USB_ARCH_HAS_OHCI
- select USB_OHCI_SH if USB_OHCI_HCD
-- select USB_ARCH_HAS_EHCI
- select USB_EHCI_SH if USB_EHCI_HCD
- select PINCTRL
-
---
-2.1.2
-
diff --git a/patches.renesas/0320-ARM-centralize-common-multi-platform-kconfig-options.patch b/patches.renesas/0320-ARM-centralize-common-multi-platform-kconfig-options.patch
deleted file mode 100644
index c6baa82b4c6dc..0000000000000
--- a/patches.renesas/0320-ARM-centralize-common-multi-platform-kconfig-options.patch
+++ /dev/null
@@ -1,768 +0,0 @@
-From e883df7b70824763bae3860cfcbbaffef6b5da94 Mon Sep 17 00:00:00 2001
-From: Rob Herring <robh@kernel.org>
-Date: Fri, 22 Nov 2013 09:29:37 -0600
-Subject: ARM: centralize common multi-platform kconfig options
-
-Multi-platform requires various kconfig options to be selected, so
-platforms don't need to select them individually.
-
-Signed-off-by: Rob Herring <robh@kernel.org>
-Acked-by: Linus Walleij <linus.walleij@linaro.org>
-Cc: Russell King <linux@arm.linux.org.uk>
-Acked-by: Stephen Warren <swarren@nvidia.com>
-Tested-by: Stephen Warren <swarren@wwwdotorg.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-(cherry picked from commit ddb902cc34593ecb88c368f6e15db3cf829c56fe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/mach-omap2/Kconfig
- arch/arm/mach-tegra/Kconfig
----
- arch/arm/Kconfig | 2 ++
- arch/arm/mach-bcm/Kconfig | 5 -----
- arch/arm/mach-bcm2835/Kconfig | 3 ---
- arch/arm/mach-berlin/Kconfig | 3 ---
- arch/arm/mach-cns3xxx/Kconfig | 1 -
- arch/arm/mach-highbank/Kconfig | 6 ------
- arch/arm/mach-hisi/Kconfig | 3 ---
- arch/arm/mach-imx/Kconfig | 11 -----------
- arch/arm/mach-keystone/Kconfig | 3 ---
- arch/arm/mach-moxart/Kconfig | 5 -----
- arch/arm/mach-mvebu/Kconfig | 5 -----
- arch/arm/mach-mxs/Kconfig | 4 ----
- arch/arm/mach-nomadik/Kconfig | 5 -----
- arch/arm/mach-nspire/Kconfig | 5 -----
- arch/arm/mach-omap2/Kconfig | 15 ---------------
- arch/arm/mach-picoxcell/Kconfig | 4 ----
- arch/arm/mach-prima2/Kconfig | 4 ----
- arch/arm/mach-rockchip/Kconfig | 2 --
- arch/arm/mach-shmobile/Kconfig | 3 ---
- arch/arm/mach-socfpga/Kconfig | 6 ------
- arch/arm/mach-spear/Kconfig | 8 --------
- arch/arm/mach-sti/Kconfig | 2 --
- arch/arm/mach-sunxi/Kconfig | 4 ----
- arch/arm/mach-tegra/Kconfig | 6 ------
- arch/arm/mach-u300/Kconfig | 6 ------
- arch/arm/mach-ux500/Kconfig | 4 ----
- arch/arm/mach-vexpress/Kconfig | 3 ---
- arch/arm/mach-virt/Kconfig | 4 ----
- arch/arm/mach-vt8500/Kconfig | 3 ---
- arch/arm/mach-zynq/Kconfig | 5 -----
- 30 files changed, 2 insertions(+), 138 deletions(-)
-
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 3d58483486c1..f7717d4ce420 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -307,9 +307,11 @@ choice
- config ARCH_MULTIPLATFORM
- bool "Allow multiple platforms to be selected"
- depends on MMU
-+ select ARCH_WANT_OPTIONAL_GPIOLIB
- select ARM_PATCH_PHYS_VIRT
- select AUTO_ZRELADDR
- select COMMON_CLK
-+ select GENERIC_CLOCKEVENTS
- select MULTI_IRQ_HANDLER
- select SPARSE_IRQ
- select USE_OF
-diff --git a/arch/arm/mach-bcm/Kconfig b/arch/arm/mach-bcm/Kconfig
-index b1aa6a9b3bd1..af4f2dfda40c 100644
---- a/arch/arm/mach-bcm/Kconfig
-+++ b/arch/arm/mach-bcm/Kconfig
-@@ -16,12 +16,7 @@ config ARCH_BCM_MOBILE
- select ARM_ERRATA_754322
- select ARM_ERRATA_764369 if SMP
- select ARM_GIC
-- select CPU_V7
-- select CLKSRC_OF
-- select GENERIC_CLOCKEVENTS
-- select GENERIC_TIME
- select GPIO_BCM_KONA
-- select SPARSE_IRQ
- select TICK_ONESHOT
- select CACHE_L2X0
- select HAVE_ARM_ARCH_TIMER
-diff --git a/arch/arm/mach-bcm2835/Kconfig b/arch/arm/mach-bcm2835/Kconfig
-index d1f9612f8c15..1c0decd7e07a 100644
---- a/arch/arm/mach-bcm2835/Kconfig
-+++ b/arch/arm/mach-bcm2835/Kconfig
-@@ -4,10 +4,7 @@ config ARCH_BCM2835
- select ARM_AMBA
- select ARM_ERRATA_411920
- select ARM_TIMER_SP804
-- select CLKDEV_LOOKUP
-- select CLKSRC_OF
- select CPU_V6
-- select GENERIC_CLOCKEVENTS
- select PINCTRL
- select PINCTRL_BCM2835
- help
-diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig
-index 7a02d222c378..b346f598a595 100644
---- a/arch/arm/mach-berlin/Kconfig
-+++ b/arch/arm/mach-berlin/Kconfig
-@@ -1,9 +1,7 @@
- config ARCH_BERLIN
- bool "Marvell Berlin SoCs" if ARCH_MULTI_V7
- select ARM_GIC
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
-- select COMMON_CLK
- select DW_APB_ICTL
- select DW_APB_TIMER_OF
-
-@@ -21,7 +19,6 @@ config MACH_BERLIN_BG2
- config MACH_BERLIN_BG2CD
- bool "Marvell Armada 1500-mini (BG2CD)"
- select CACHE_L2X0
-- select CPU_V7
- select HAVE_ARM_TWD if SMP
-
- endmenu
-diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
-index dbf0df8bb0ac..e3466887f62c 100644
---- a/arch/arm/mach-cns3xxx/Kconfig
-+++ b/arch/arm/mach-cns3xxx/Kconfig
-@@ -2,7 +2,6 @@ config ARCH_CNS3XXX
- bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
- select ARM_GIC
- select CPU_V6K
-- select GENERIC_CLOCKEVENTS
- select MIGHT_HAVE_CACHE_L2X0
- select MIGHT_HAVE_PCI
- select PCI_DOMAINS if PCI
-diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
-index 0aded64a9ebc..59274a7fd7c5 100644
---- a/arch/arm/mach-highbank/Kconfig
-+++ b/arch/arm/mach-highbank/Kconfig
-@@ -5,7 +5,6 @@ config ARCH_HIGHBANK
- select ARCH_HAS_HOLES_MEMORYMODEL
- select ARCH_HAS_OPP
- select ARCH_SUPPORTS_BIG_ENDIAN
-- select ARCH_WANT_OPTIONAL_GPIOLIB
- select ARM_AMBA
- select ARM_ERRATA_764369 if SMP
- select ARM_ERRATA_775420
-@@ -14,14 +13,9 @@ config ARCH_HIGHBANK
- select ARM_PSCI
- select ARM_TIMER_SP804
- select CACHE_L2X0
-- select COMMON_CLK
-- select CPU_V7
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
- select MAILBOX
- select PL320_MBOX
-- select SPARSE_IRQ
-- select USE_OF
- select ZONE_DMA if ARM_LPAE
-diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
-index 1abae5f6a418..95492d715166 100644
---- a/arch/arm/mach-hisi/Kconfig
-+++ b/arch/arm/mach-hisi/Kconfig
-@@ -3,10 +3,7 @@ config ARCH_HI3xxx
- select ARM_AMBA
- select ARM_GIC
- select ARM_TIMER_SP804
-- select ARCH_WANT_OPTIONAL_GPIOLIB
- select CACHE_L2X0
-- select CLKSRC_OF
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
-index 33567aa5880f..3dd2c601fea2 100644
---- a/arch/arm/mach-imx/Kconfig
-+++ b/arch/arm/mach-imx/Kconfig
-@@ -2,18 +2,12 @@ config ARCH_MXC
- bool "Freescale i.MX family" if ARCH_MULTI_V4_V5 || ARCH_MULTI_V6_V7
- select ARCH_REQUIRE_GPIOLIB
- select ARM_CPU_SUSPEND if PM
-- select ARM_PATCH_PHYS_VIRT
- select CLKSRC_MMIO
-- select COMMON_CLK
- select GENERIC_ALLOCATOR
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
- select MIGHT_HAVE_CACHE_L2X0 if ARCH_MULTI_V6_V7
-- select MULTI_IRQ_HANDLER
- select PINCTRL
- select SOC_BUS
-- select SPARSE_IRQ
-- select USE_OF
- help
- Support for Freescale MXC/iMX-based family of processors
-
-@@ -132,7 +126,6 @@ config SOC_IMX5
- select ARCH_HAS_CPUFREQ
- select ARCH_HAS_OPP
- select ARCH_MXC_IOMUX_V3
-- select CPU_V7
- select MXC_TZIC
-
- config SOC_IMX51
-@@ -792,7 +785,6 @@ config SOC_IMX6Q
- select ARM_ERRATA_764369 if SMP
- select ARM_ERRATA_775420
- select ARM_GIC
-- select CPU_V7
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_IMX_ANATOP
-@@ -817,7 +809,6 @@ config SOC_IMX6SL
- select ARM_ERRATA_754322
- select ARM_ERRATA_775420
- select ARM_GIC
-- select CPU_V7
- select HAVE_IMX_ANATOP
- select HAVE_IMX_GPC
- select HAVE_IMX_MMDC
-@@ -833,9 +824,7 @@ config SOC_IMX6SL
-
- config SOC_VF610
- bool "Vybrid Family VF610 support"
-- select CPU_V7
- select ARM_GIC
-- select CLKSRC_OF
- select PINCTRL_VF610
- select VF_PIT_TIMER
- select PL310_ERRATA_588369 if CACHE_PL310
-diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
-index 90a708fef541..00ed74473eaf 100644
---- a/arch/arm/mach-keystone/Kconfig
-+++ b/arch/arm/mach-keystone/Kconfig
-@@ -1,13 +1,10 @@
- config ARCH_KEYSTONE
- bool "Texas Instruments Keystone Devices"
- depends on ARCH_MULTI_V7
-- select CPU_V7
- select ARM_GIC
- select HAVE_ARM_ARCH_TIMER
- select HAVE_SMP
- select CLKSRC_MMIO
-- select GENERIC_CLOCKEVENTS
-- select ARCH_WANT_OPTIONAL_GPIOLIB
- select ARM_ERRATA_798181 if SMP
- select COMMON_CLK_KEYSTONE
- select ARCH_SUPPORTS_BIG_ENDIAN
-diff --git a/arch/arm/mach-moxart/Kconfig b/arch/arm/mach-moxart/Kconfig
-index 3795ae28a613..95a6a4b43c37 100644
---- a/arch/arm/mach-moxart/Kconfig
-+++ b/arch/arm/mach-moxart/Kconfig
-@@ -2,14 +2,9 @@ config ARCH_MOXART
- bool "MOXA ART SoC" if ARCH_MULTI_V4T
- select CPU_FA526
- select ARM_DMA_MEM_BUFFERABLE
-- select USE_OF
-- select CLKSRC_OF
- select CLKSRC_MMIO
-- select HAVE_CLK
-- select COMMON_CLK
- select GENERIC_IRQ_CHIP
- select ARCH_REQUIRE_GPIOLIB
-- select GENERIC_CLOCKEVENTS
- select PHYLIB if NETDEVICES
- help
- Say Y here if you want to run your kernel on hardware with a
-diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
-index 5e269d7263ce..d581e846d922 100644
---- a/arch/arm/mach-mvebu/Kconfig
-+++ b/arch/arm/mach-mvebu/Kconfig
-@@ -2,15 +2,10 @@ config ARCH_MVEBU
- bool "Marvell SOCs with Device Tree support" if ARCH_MULTI_V7
- select ARCH_SUPPORTS_BIG_ENDIAN
- select CLKSRC_MMIO
-- select COMMON_CLK
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
- select IRQ_DOMAIN
-- select MULTI_IRQ_HANDLER
- select PINCTRL
- select PLAT_ORION
-- select SPARSE_IRQ
-- select CLKDEV_LOOKUP
- select MVEBU_MBUS
- select ZONE_DMA if ARM_LPAE
- select ARCH_REQUIRE_GPIOLIB
-diff --git a/arch/arm/mach-mxs/Kconfig b/arch/arm/mach-mxs/Kconfig
-index 8cde9e05b5d6..84794137b175 100644
---- a/arch/arm/mach-mxs/Kconfig
-+++ b/arch/arm/mach-mxs/Kconfig
-@@ -16,11 +16,7 @@ config ARCH_MXS
- bool "Freescale MXS (i.MX23, i.MX28) support"
- depends on ARCH_MULTI_V5
- select ARCH_REQUIRE_GPIOLIB
-- select CLKDEV_LOOKUP
- select CLKSRC_MMIO
-- select CLKSRC_OF
-- select GENERIC_CLOCKEVENTS
-- select HAVE_CLK_PREPARE
- select PINCTRL
- select SOC_BUS
- select SOC_IMX23
-diff --git a/arch/arm/mach-nomadik/Kconfig b/arch/arm/mach-nomadik/Kconfig
-index 4d42da49753c..486d301f43fd 100644
---- a/arch/arm/mach-nomadik/Kconfig
-+++ b/arch/arm/mach-nomadik/Kconfig
-@@ -6,16 +6,11 @@ config ARCH_NOMADIK
- select ARM_VIC
- select CLKSRC_NOMADIK_MTU
- select CLKSRC_NOMADIK_MTU_SCHED_CLOCK
-- select CLKSRC_OF
-- select COMMON_CLK
- select CPU_ARM926T
-- select GENERIC_CLOCKEVENTS
- select MIGHT_HAVE_CACHE_L2X0
- select PINCTRL
- select PINCTRL_NOMADIK
- select PINCTRL_STN8815
-- select SPARSE_IRQ
-- select USE_OF
- help
- Support for the Nomadik platform by ST-Ericsson
-
-diff --git a/arch/arm/mach-nspire/Kconfig b/arch/arm/mach-nspire/Kconfig
-index 59d8f0a70919..bc41f26c1a12 100644
---- a/arch/arm/mach-nspire/Kconfig
-+++ b/arch/arm/mach-nspire/Kconfig
-@@ -3,14 +3,9 @@ config ARCH_NSPIRE
- depends on ARCH_MULTI_V4_V5
- depends on MMU
- select CPU_ARM926T
-- select COMMON_CLK
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
-- select SPARSE_IRQ
- select ARM_AMBA
- select ARM_VIC
- select ARM_TIMER_SP804
-- select USE_OF
-- select CLKSRC_OF
- help
- This enables support for systems using the TI-NSPIRE CPU
-diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
-index 6fb91fb604a0..d54bddb9c093 100644
---- a/arch/arm/mach-omap2/Kconfig
-+++ b/arch/arm/mach-omap2/Kconfig
-@@ -6,7 +6,6 @@ config ARCH_OMAP2
- depends on ARCH_MULTI_V6
- select ARCH_OMAP2PLUS
- select CPU_V6
-- select MULTI_IRQ_HANDLER
- select SOC_HAS_OMAP2_SDRC
-
- config ARCH_OMAP3
-@@ -15,8 +14,6 @@ config ARCH_OMAP3
- select ARCH_OMAP2PLUS
- select ARCH_HAS_OPP
- select ARM_CPU_SUSPEND if PM
-- select CPU_V7
-- select MULTI_IRQ_HANDLER
- select OMAP_INTERCONNECT
- select PM_OPP if PM
- select PM_RUNTIME if CPU_IDLE
-@@ -32,7 +29,6 @@ config ARCH_OMAP4
- select ARM_ERRATA_720789
- select ARM_GIC
- select CACHE_L2X0
-- select CPU_V7
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-@@ -51,7 +47,6 @@ config SOC_OMAP5
- select ARCH_HAS_OPP
- select ARM_CPU_SUSPEND if PM
- select ARM_GIC
-- select CPU_V7
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-@@ -64,16 +59,12 @@ config SOC_AM33XX
- select ARCH_OMAP2PLUS
- select ARCH_HAS_OPP
- select ARM_CPU_SUSPEND if PM
-- select CPU_V7
-- select MULTI_IRQ_HANDLER
-
- config SOC_AM43XX
- bool "TI AM43x"
- depends on ARCH_MULTI_V7
-- select CPU_V7
- select ARCH_OMAP2PLUS
- select ARCH_HAS_OPP
-- select MULTI_IRQ_HANDLER
- select ARM_GIC
- select MACH_OMAP_GENERIC
-
-@@ -84,8 +75,6 @@ config SOC_DRA7XX
- select ARCH_HAS_OPP
- select ARM_CPU_SUSPEND if PM
- select ARM_GIC
-- select CPU_V7
-- select HAVE_SMP
- select HAVE_ARM_ARCH_TIMER
-
- config ARCH_OMAP2PLUS
-@@ -96,17 +85,13 @@ config ARCH_OMAP2PLUS
- select ARCH_OMAP
- select ARCH_REQUIRE_GPIOLIB
- select CLKSRC_MMIO
-- select COMMON_CLK
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
- select MACH_OMAP_GENERIC
- select OMAP_DM_TIMER
- select PINCTRL
- select PROC_DEVICETREE if PROC_FS
- select SOC_BUS
-- select SPARSE_IRQ
- select TI_PRIV_EDMA
-- select USE_OF
- help
- Systems based on OMAP2, OMAP3, OMAP4 or OMAP5
-
-diff --git a/arch/arm/mach-picoxcell/Kconfig b/arch/arm/mach-picoxcell/Kconfig
-index b1022f4315f7..c88ff74d86fe 100644
---- a/arch/arm/mach-picoxcell/Kconfig
-+++ b/arch/arm/mach-picoxcell/Kconfig
-@@ -1,12 +1,8 @@
- config ARCH_PICOXCELL
- bool "Picochip PicoXcell" if ARCH_MULTI_V6
- select ARCH_REQUIRE_GPIOLIB
-- select ARM_PATCH_PHYS_VIRT
- select ARM_VIC
- select CPU_V6K
- select DW_APB_TIMER_OF
-- select GENERIC_CLOCKEVENTS
- select HAVE_TCM
- select NO_IOPORT
-- select SPARSE_IRQ
-- select USE_OF
-diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
-index 6988b117fc17..16c2d90762f0 100644
---- a/arch/arm/mach-prima2/Kconfig
-+++ b/arch/arm/mach-prima2/Kconfig
-@@ -1,7 +1,6 @@
- config ARCH_SIRF
- bool "CSR SiRF" if ARCH_MULTI_V7
- select ARCH_REQUIRE_GPIOLIB
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
- select MIGHT_HAVE_CACHE_L2X0
- select NO_IOPORT
-@@ -17,7 +16,6 @@ menu "CSR SiRF atlas6/primaII/Marco/Polo Specific Features"
- config ARCH_ATLAS6
- bool "CSR SiRFSoC ATLAS6 ARM Cortex A9 Platform"
- default y
-- select CPU_V7
- select SIRF_IRQ
- help
- Support for CSR SiRFSoC ARM Cortex A9 Platform
-@@ -25,7 +23,6 @@ config ARCH_ATLAS6
- config ARCH_PRIMA2
- bool "CSR SiRFSoC PRIMA2 ARM Cortex A9 Platform"
- default y
-- select CPU_V7
- select SIRF_IRQ
- select ZONE_DMA
- help
-@@ -35,7 +32,6 @@ config ARCH_MARCO
- bool "CSR SiRFSoC MARCO ARM Cortex A9 Platform"
- default y
- select ARM_GIC
-- select CPU_V7
- select HAVE_ARM_SCU if SMP
- select HAVE_SMP
- select SMP_ON_UP if SMP
-diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
-index cf073dea5784..2a695bc977b2 100644
---- a/arch/arm/mach-rockchip/Kconfig
-+++ b/arch/arm/mach-rockchip/Kconfig
-@@ -7,8 +7,6 @@ config ARCH_ROCKCHIP
- select CACHE_L2X0
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-- select COMMON_CLK
-- select GENERIC_CLOCKEVENTS
- select DW_APB_TIMER_OF
- select ARM_GLOBAL_TIMER
- select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 5e3fb956ff08..30bfa25e3dbe 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -5,8 +5,6 @@ config ARCH_SHMOBILE_MULTI
- bool "Renesas ARM SoCs" if ARCH_MULTI_V7
- depends on MMU
- select ARCH_SHMOBILE
-- select CPU_V7
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-@@ -16,7 +14,6 @@ config ARCH_SHMOBILE_MULTI
- select NO_IOPORT
- select PINCTRL
- select ARCH_REQUIRE_GPIOLIB
-- select CLKDEV_LOOKUP
-
- if ARCH_SHMOBILE_MULTI
-
-diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
-index aee77f06f887..224913770509 100644
---- a/arch/arm/mach-socfpga/Kconfig
-+++ b/arch/arm/mach-socfpga/Kconfig
-@@ -1,17 +1,11 @@
- config ARCH_SOCFPGA
- bool "Altera SOCFPGA family" if ARCH_MULTI_V7
-- select ARCH_WANT_OPTIONAL_GPIOLIB
- select ARM_AMBA
- select ARM_GIC
- select CACHE_L2X0
-- select COMMON_CLK
-- select CPU_V7
- select DW_APB_TIMER_OF
-- select GENERIC_CLOCKEVENTS
- select GPIO_PL061 if GPIOLIB
- select HAVE_ARM_SCU
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
- select MFD_SYSCON
-- select SPARSE_IRQ
-- select USE_OF
-diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
-index ac1710e64d9a..a7a28eadd93c 100644
---- a/arch/arm/mach-spear/Kconfig
-+++ b/arch/arm/mach-spear/Kconfig
-@@ -8,8 +8,6 @@ menuconfig PLAT_SPEAR
- select ARCH_REQUIRE_GPIOLIB
- select ARM_AMBA
- select CLKSRC_MMIO
-- select COMMON_CLK
-- select GENERIC_CLOCKEVENTS
-
- if PLAT_SPEAR
-
-@@ -18,14 +16,12 @@ config ARCH_SPEAR13XX
- depends on ARCH_MULTI_V7 || PLAT_SPEAR_SINGLE
- select ARCH_HAS_CPUFREQ
- select ARM_GIC
-- select CPU_V7
- select GPIO_SPEAR_SPICS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- select PINCTRL
-- select USE_OF
- help
- Supports for ARM's SPEAR13XX family
-
-@@ -50,9 +46,7 @@ config ARCH_SPEAR3XX
- depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
- depends on !ARCH_SPEAR13XX
- select ARM_VIC
-- select CPU_ARM926T
- select PINCTRL
-- select USE_OF
- help
- Supports for ARM's SPEAR3XX family
-
-@@ -83,14 +77,12 @@ config ARCH_SPEAR6XX
- depends on ARCH_MULTI_V5 || PLAT_SPEAR_SINGLE
- depends on !ARCH_SPEAR13XX
- select ARM_VIC
-- select CPU_ARM926T
- help
- Supports for ARM's SPEAR6XX family
-
- config MACH_SPEAR600
- def_bool y
- depends on ARCH_SPEAR6XX
-- select USE_OF
- help
- Supports ST SPEAr600 boards configured via the device-treesource "arch/arm/mach-spear6xx/Kconfig"
-
-diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
-index d71654bc8d54..9c6dda85d587 100644
---- a/arch/arm/mach-sti/Kconfig
-+++ b/arch/arm/mach-sti/Kconfig
-@@ -1,7 +1,5 @@
- menuconfig ARCH_STI
- bool "STMicroelectronics Consumer Electronics SOCs with Device Trees" if ARCH_MULTI_V7
-- select GENERIC_CLOCKEVENTS
-- select CLKDEV_LOOKUP
- select ARM_GIC
- select ARM_GLOBAL_TIMER
- select PINCTRL
-diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
-index b9d6cad8669b..201ef9b526fd 100644
---- a/arch/arm/mach-sunxi/Kconfig
-+++ b/arch/arm/mach-sunxi/Kconfig
-@@ -5,14 +5,10 @@ config ARCH_SUNXI
- select ARM_GIC
- select ARM_PSCI
- select CLKSRC_MMIO
-- select CLKSRC_OF
-- select COMMON_CLK
-- select GENERIC_CLOCKEVENTS
- select GENERIC_IRQ_CHIP
- select HAVE_SMP
- select PINCTRL
- select PINCTRL_SUNXI
- select RESET_CONTROLLER
-- select SPARSE_IRQ
- select SUN4I_TIMER
- select SUN5I_HSTIMER
-diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
-index 4926bd11f190..b3a1dab90604 100644
---- a/arch/arm/mach-tegra/Kconfig
-+++ b/arch/arm/mach-tegra/Kconfig
-@@ -5,10 +5,6 @@ config ARCH_TEGRA
- select ARCH_SUPPORTS_TRUSTED_FOUNDATIONS
- select ARM_GIC
- select CLKSRC_MMIO
-- select CLKSRC_OF
-- select COMMON_CLK
-- select CPU_V7
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-@@ -18,10 +14,8 @@ config ARCH_TEGRA
- select ARCH_HAS_RESET_CONTROLLER
- select RESET_CONTROLLER
- select SOC_BUS
-- select SPARSE_IRQ
- select USB_ULPI if USB_PHY
- select USB_ULPI_VIEWPORT if USB_PHY
-- select USE_OF
- help
- This enables support for NVIDIA Tegra based systems.
-
-diff --git a/arch/arm/mach-u300/Kconfig b/arch/arm/mach-u300/Kconfig
-index 8e23071bd1b3..e3a96d7302e9 100644
---- a/arch/arm/mach-u300/Kconfig
-+++ b/arch/arm/mach-u300/Kconfig
-@@ -3,20 +3,14 @@ config ARCH_U300
- depends on MMU
- select ARCH_REQUIRE_GPIOLIB
- select ARM_AMBA
-- select ARM_PATCH_PHYS_VIRT
- select ARM_VIC
- select CLKSRC_MMIO
-- select CLKSRC_OF
-- select COMMON_CLK
- select CPU_ARM926T
-- select GENERIC_CLOCKEVENTS
- select HAVE_TCM
- select PINCTRL
- select PINCTRL_COH901
- select PINCTRL_U300
-- select SPARSE_IRQ
- select MFD_SYSCON
-- select USE_OF
- help
- Support for ST-Ericsson U300 series mobile platforms.
-
-diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
-index 0034d2cd6973..5d71c825e9d5 100644
---- a/arch/arm/mach-ux500/Kconfig
-+++ b/arch/arm/mach-ux500/Kconfig
-@@ -11,9 +11,6 @@ config ARCH_U8500
- select ARM_GIC
- select CACHE_L2X0
- select CLKSRC_NOMADIK_MTU
-- select COMMON_CLK
-- select CPU_V7
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_SMP
-@@ -76,7 +73,6 @@ config UX500_AUTO_PLATFORM
- config MACH_UX500_DT
- bool "Generic U8500 support using device tree"
- depends on MACH_MOP500
-- select USE_OF
-
- endmenu
-
-diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
-index 4a70be485ff8..fa2922292a58 100644
---- a/arch/arm/mach-vexpress/Kconfig
-+++ b/arch/arm/mach-vexpress/Kconfig
-@@ -5,10 +5,7 @@ config ARCH_VEXPRESS
- select ARM_AMBA
- select ARM_GIC
- select ARM_TIMER_SP804
-- select COMMON_CLK
- select COMMON_CLK_VERSATILE
-- select CPU_V7
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
-diff --git a/arch/arm/mach-virt/Kconfig b/arch/arm/mach-virt/Kconfig
-index 081d46929436..eaad072c725b 100644
---- a/arch/arm/mach-virt/Kconfig
-+++ b/arch/arm/mach-virt/Kconfig
-@@ -1,10 +1,6 @@
- config ARCH_VIRT
- bool "Dummy Virtual Machine" if ARCH_MULTI_V7
-- select ARCH_WANT_OPTIONAL_GPIOLIB
- select ARM_GIC
- select HAVE_ARM_ARCH_TIMER
- select ARM_PSCI
- select HAVE_SMP
-- select CPU_V7
-- select SPARSE_IRQ
-- select USE_OF
-diff --git a/arch/arm/mach-vt8500/Kconfig b/arch/arm/mach-vt8500/Kconfig
-index 927be93b692e..c581ed290dfd 100644
---- a/arch/arm/mach-vt8500/Kconfig
-+++ b/arch/arm/mach-vt8500/Kconfig
-@@ -3,8 +3,6 @@ config ARCH_VT8500
- select ARCH_HAS_CPUFREQ
- select ARCH_REQUIRE_GPIOLIB
- select CLKDEV_LOOKUP
-- select CLKSRC_OF
-- select GENERIC_CLOCKEVENTS
- select VT8500_TIMER
- select PINCTRL
- help
-@@ -29,6 +27,5 @@ config ARCH_WM8850
- bool "WonderMedia WM8850"
- depends on ARCH_MULTI_V7
- select ARCH_VT8500
-- select CPU_V7
- help
- Support for WonderMedia WM8850 System-on-Chip.
-diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
-index 6b04260aa142..85d180583402 100644
---- a/arch/arm/mach-zynq/Kconfig
-+++ b/arch/arm/mach-zynq/Kconfig
-@@ -2,16 +2,11 @@ config ARCH_ZYNQ
- bool "Xilinx Zynq ARM Cortex A9 Platform" if ARCH_MULTI_V7
- select ARM_AMBA
- select ARM_GIC
-- select COMMON_CLK
-- select CPU_V7
-- select GENERIC_CLOCKEVENTS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select ICST
- select MIGHT_HAVE_CACHE_L2X0
-- select USE_OF
- select HAVE_SMP
-- select SPARSE_IRQ
- select CADENCE_TTC_TIMER
- select ARM_GLOBAL_TIMER
- help
---
-2.1.2
-
diff --git a/patches.renesas/0321-ARM-select-HAVE_SMP-for-V7-multi-platform.patch b/patches.renesas/0321-ARM-select-HAVE_SMP-for-V7-multi-platform.patch
deleted file mode 100644
index 0cdb73787dc0c..0000000000000
--- a/patches.renesas/0321-ARM-select-HAVE_SMP-for-V7-multi-platform.patch
+++ /dev/null
@@ -1,272 +0,0 @@
-From fe67ea0fd226a4b5fca0c755bbe6009a31b68771 Mon Sep 17 00:00:00 2001
-From: Rob Herring <robh@kernel.org>
-Date: Fri, 31 Jan 2014 15:32:02 -0600
-Subject: ARM: select HAVE_SMP for V7 multi-platform
-
-All V7 platforms can run SMP kernels, so make CONFIG_SMP visible for V7
-multi-platform builds.
-
-Signed-off-by: Rob Herring <robh@kernel.org>
-Acked-by: Stephen Warren <swarren@nvidia.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-(cherry picked from commit 90bc8ac77dc85d2184da3d5280215b33253adffc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/Kconfig | 1 +
- arch/arm/mach-berlin/Kconfig | 1 -
- arch/arm/mach-highbank/Kconfig | 1 -
- arch/arm/mach-hisi/Kconfig | 1 -
- arch/arm/mach-imx/Kconfig | 1 -
- arch/arm/mach-keystone/Kconfig | 1 -
- arch/arm/mach-mvebu/Kconfig | 1 -
- arch/arm/mach-omap2/Kconfig | 2 --
- arch/arm/mach-prima2/Kconfig | 1 -
- arch/arm/mach-rockchip/Kconfig | 1 -
- arch/arm/mach-shmobile/Kconfig | 1 -
- arch/arm/mach-socfpga/Kconfig | 1 -
- arch/arm/mach-spear/Kconfig | 1 -
- arch/arm/mach-sti/Kconfig | 1 -
- arch/arm/mach-sunxi/Kconfig | 1 -
- arch/arm/mach-tegra/Kconfig | 1 -
- arch/arm/mach-ux500/Kconfig | 1 -
- arch/arm/mach-vexpress/Kconfig | 1 -
- arch/arm/mach-zynq/Kconfig | 1 -
- 19 files changed, 1 insertion(+), 19 deletions(-)
-
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index f7717d4ce420..145c9cb8a422 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -915,6 +915,7 @@ config ARCH_MULTI_V7
- default y
- select ARCH_MULTI_V6_V7
- select CPU_V7
-+ select HAVE_SMP
-
- config ARCH_MULTI_V6_V7
- bool
-diff --git a/arch/arm/mach-berlin/Kconfig b/arch/arm/mach-berlin/Kconfig
-index b346f598a595..b0cb0722acd2 100644
---- a/arch/arm/mach-berlin/Kconfig
-+++ b/arch/arm/mach-berlin/Kconfig
-@@ -14,7 +14,6 @@ config MACH_BERLIN_BG2
- select CACHE_L2X0
- select CPU_PJ4B
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
-
- config MACH_BERLIN_BG2CD
- bool "Marvell Armada 1500-mini (BG2CD)"
-diff --git a/arch/arm/mach-highbank/Kconfig b/arch/arm/mach-highbank/Kconfig
-index 59274a7fd7c5..830b76e70250 100644
---- a/arch/arm/mach-highbank/Kconfig
-+++ b/arch/arm/mach-highbank/Kconfig
-@@ -15,7 +15,6 @@ config ARCH_HIGHBANK
- select CACHE_L2X0
- select HAVE_ARM_SCU
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select MAILBOX
- select PL320_MBOX
- select ZONE_DMA if ARM_LPAE
-diff --git a/arch/arm/mach-hisi/Kconfig b/arch/arm/mach-hisi/Kconfig
-index 95492d715166..9d0a87b025e3 100644
---- a/arch/arm/mach-hisi/Kconfig
-+++ b/arch/arm/mach-hisi/Kconfig
-@@ -6,7 +6,6 @@ config ARCH_HI3xxx
- select CACHE_L2X0
- select HAVE_ARM_SCU
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select PINCTRL
- select PINCTRL_SINGLE
- help
-diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
-index 3dd2c601fea2..1a6a843aad66 100644
---- a/arch/arm/mach-imx/Kconfig
-+++ b/arch/arm/mach-imx/Kconfig
-@@ -791,7 +791,6 @@ config SOC_IMX6Q
- select HAVE_IMX_GPC
- select HAVE_IMX_MMDC
- select HAVE_IMX_SRC
-- select HAVE_SMP
- select MFD_SYSCON
- select MIGHT_HAVE_PCI
- select PCI_DOMAINS if PCI
-diff --git a/arch/arm/mach-keystone/Kconfig b/arch/arm/mach-keystone/Kconfig
-index 00ed74473eaf..f50bc936cb84 100644
---- a/arch/arm/mach-keystone/Kconfig
-+++ b/arch/arm/mach-keystone/Kconfig
-@@ -3,7 +3,6 @@ config ARCH_KEYSTONE
- depends on ARCH_MULTI_V7
- select ARM_GIC
- select HAVE_ARM_ARCH_TIMER
-- select HAVE_SMP
- select CLKSRC_MMIO
- select ARM_ERRATA_798181 if SMP
- select COMMON_CLK_KEYSTONE
-diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
-index d581e846d922..875a35263dc3 100644
---- a/arch/arm/mach-mvebu/Kconfig
-+++ b/arch/arm/mach-mvebu/Kconfig
-@@ -19,7 +19,6 @@ menu "Marvell SOC with device tree"
- config MACH_ARMADA_370_XP
- bool
- select ARMADA_370_XP_TIMER
-- select HAVE_SMP
- select CACHE_L2X0
- select CPU_PJ4B
-
-diff --git a/arch/arm/mach-omap2/Kconfig b/arch/arm/mach-omap2/Kconfig
-index d54bddb9c093..0dc337d02f69 100644
---- a/arch/arm/mach-omap2/Kconfig
-+++ b/arch/arm/mach-omap2/Kconfig
-@@ -31,7 +31,6 @@ config ARCH_OMAP4
- select CACHE_L2X0
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select OMAP_INTERCONNECT
- select PL310_ERRATA_588369
- select PL310_ERRATA_727915
-@@ -49,7 +48,6 @@ config SOC_OMAP5
- select ARM_GIC
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select HAVE_ARM_ARCH_TIMER
- select ARM_ERRATA_798181 if SMP
-
-diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
-index 16c2d90762f0..59aa3ea8ccaf 100644
---- a/arch/arm/mach-prima2/Kconfig
-+++ b/arch/arm/mach-prima2/Kconfig
-@@ -33,7 +33,6 @@ config ARCH_MARCO
- default y
- select ARM_GIC
- select HAVE_ARM_SCU if SMP
-- select HAVE_SMP
- select SMP_ON_UP if SMP
- help
- Support for CSR SiRFSoC ARM Cortex A9 Platform
-diff --git a/arch/arm/mach-rockchip/Kconfig b/arch/arm/mach-rockchip/Kconfig
-index 2a695bc977b2..6b2f58645a73 100644
---- a/arch/arm/mach-rockchip/Kconfig
-+++ b/arch/arm/mach-rockchip/Kconfig
-@@ -6,7 +6,6 @@ config ARCH_ROCKCHIP
- select ARM_GIC
- select CACHE_L2X0
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select DW_APB_TIMER_OF
- select ARM_GLOBAL_TIMER
- select CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 30bfa25e3dbe..76e450aceb46 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -7,7 +7,6 @@ config ARCH_SHMOBILE_MULTI
- select ARCH_SHMOBILE
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select ARM_GIC
- select MIGHT_HAVE_CACHE_L2X0
- select MIGHT_HAVE_PCI
-diff --git a/arch/arm/mach-socfpga/Kconfig b/arch/arm/mach-socfpga/Kconfig
-index 224913770509..b5f8d75d51a0 100644
---- a/arch/arm/mach-socfpga/Kconfig
-+++ b/arch/arm/mach-socfpga/Kconfig
-@@ -7,5 +7,4 @@ config ARCH_SOCFPGA
- select GPIO_PL061 if GPIOLIB
- select HAVE_ARM_SCU
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select MFD_SYSCON
-diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
-index a7a28eadd93c..601b8d831a56 100644
---- a/arch/arm/mach-spear/Kconfig
-+++ b/arch/arm/mach-spear/Kconfig
-@@ -19,7 +19,6 @@ config ARCH_SPEAR13XX
- select GPIO_SPEAR_SPICS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- select PINCTRL
- help
-diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
-index 9c6dda85d587..c3fdceee4ecb 100644
---- a/arch/arm/mach-sti/Kconfig
-+++ b/arch/arm/mach-sti/Kconfig
-@@ -6,7 +6,6 @@ menuconfig ARCH_STI
- select PINCTRL_ST
- select MFD_SYSCON
- select MIGHT_HAVE_CACHE_L2X0
-- select HAVE_SMP
- select HAVE_ARM_SCU if SMP
- select ARCH_REQUIRE_GPIOLIB
- select ARM_ERRATA_754322
-diff --git a/arch/arm/mach-sunxi/Kconfig b/arch/arm/mach-sunxi/Kconfig
-index 201ef9b526fd..9de27cfa688f 100644
---- a/arch/arm/mach-sunxi/Kconfig
-+++ b/arch/arm/mach-sunxi/Kconfig
-@@ -6,7 +6,6 @@ config ARCH_SUNXI
- select ARM_PSCI
- select CLKSRC_MMIO
- select GENERIC_IRQ_CHIP
-- select HAVE_SMP
- select PINCTRL
- select PINCTRL_SUNXI
- select RESET_CONTROLLER
-diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
-index b3a1dab90604..d58022939d5d 100644
---- a/arch/arm/mach-tegra/Kconfig
-+++ b/arch/arm/mach-tegra/Kconfig
-@@ -7,7 +7,6 @@ config ARCH_TEGRA
- select CLKSRC_MMIO
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- select MIGHT_HAVE_PCI
- select PINCTRL
-diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
-index 5d71c825e9d5..731b9197e0e3 100644
---- a/arch/arm/mach-ux500/Kconfig
-+++ b/arch/arm/mach-ux500/Kconfig
-@@ -13,7 +13,6 @@ config ARCH_U8500
- select CLKSRC_NOMADIK_MTU
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- select PINCTRL
- select PINCTRL_ABX500
-diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
-index fa2922292a58..6cbddb825fee 100644
---- a/arch/arm/mach-vexpress/Kconfig
-+++ b/arch/arm/mach-vexpress/Kconfig
-@@ -9,7 +9,6 @@ config ARCH_VEXPRESS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
-- select HAVE_SMP
- select ICST
- select MIGHT_HAVE_CACHE_L2X0
- select NO_IOPORT
-diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
-index 85d180583402..70e247dd1f08 100644
---- a/arch/arm/mach-zynq/Kconfig
-+++ b/arch/arm/mach-zynq/Kconfig
-@@ -6,7 +6,6 @@ config ARCH_ZYNQ
- select HAVE_ARM_TWD if SMP
- select ICST
- select MIGHT_HAVE_CACHE_L2X0
-- select HAVE_SMP
- select CADENCE_TTC_TIMER
- select ARM_GLOBAL_TIMER
- help
---
-2.1.2
-
diff --git a/patches.renesas/0322-ARM-select-MIGHT_HAVE_CACHE_L2X0-for-V6-and-V7-multi.patch b/patches.renesas/0322-ARM-select-MIGHT_HAVE_CACHE_L2X0-for-V6-and-V7-multi.patch
deleted file mode 100644
index 0346afbe308c1..0000000000000
--- a/patches.renesas/0322-ARM-select-MIGHT_HAVE_CACHE_L2X0-for-V6-and-V7-multi.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From 9bda71e48b826434f1a6231956603cd724c2aeba Mon Sep 17 00:00:00 2001
-From: Rob Herring <robh@kernel.org>
-Date: Fri, 31 Jan 2014 15:36:10 -0600
-Subject: ARM: select MIGHT_HAVE_CACHE_L2X0 for V6 and V7 multi-platform
-
-Many V6 and V7 platforms have an L2x0 cache, so make
-CONFIG_MIGHT_HAVE_CACHE_L2X0 visible for V6 and V7 multi-platform
-builds.
-
-Signed-off-by: Rob Herring <robh@kernel.org>
-Acked-by: Stephen Warren <swarren@nvidia.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-(cherry picked from commit 9352b05b6e4ef1aae53744cbd0adc0491fae5be0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/Kconfig | 1 +
- arch/arm/mach-cns3xxx/Kconfig | 1 -
- arch/arm/mach-imx/Kconfig | 1 -
- arch/arm/mach-prima2/Kconfig | 1 -
- arch/arm/mach-shmobile/Kconfig | 1 -
- arch/arm/mach-spear/Kconfig | 1 -
- arch/arm/mach-sti/Kconfig | 1 -
- arch/arm/mach-tegra/Kconfig | 1 -
- arch/arm/mach-ux500/Kconfig | 1 -
- arch/arm/mach-vexpress/Kconfig | 1 -
- arch/arm/mach-zynq/Kconfig | 1 -
- 11 files changed, 1 insertion(+), 10 deletions(-)
-
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index 145c9cb8a422..a5a497f43719 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -919,6 +919,7 @@ config ARCH_MULTI_V7
-
- config ARCH_MULTI_V6_V7
- bool
-+ select MIGHT_HAVE_CACHE_L2X0
-
- config ARCH_MULTI_CPU_AUTO
- def_bool !(ARCH_MULTI_V4 || ARCH_MULTI_V4T || ARCH_MULTI_V6_V7)
-diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
-index e3466887f62c..c6f58a15c95e 100644
---- a/arch/arm/mach-cns3xxx/Kconfig
-+++ b/arch/arm/mach-cns3xxx/Kconfig
-@@ -2,7 +2,6 @@ config ARCH_CNS3XXX
- bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
- select ARM_GIC
- select CPU_V6K
-- select MIGHT_HAVE_CACHE_L2X0
- select MIGHT_HAVE_PCI
- select PCI_DOMAINS if PCI
- help
-diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
-index 1a6a843aad66..ff2447389f27 100644
---- a/arch/arm/mach-imx/Kconfig
-+++ b/arch/arm/mach-imx/Kconfig
-@@ -5,7 +5,6 @@ config ARCH_MXC
- select CLKSRC_MMIO
- select GENERIC_ALLOCATOR
- select GENERIC_IRQ_CHIP
-- select MIGHT_HAVE_CACHE_L2X0 if ARCH_MULTI_V6_V7
- select PINCTRL
- select SOC_BUS
- help
-diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
-index 59aa3ea8ccaf..2c726b4f9356 100644
---- a/arch/arm/mach-prima2/Kconfig
-+++ b/arch/arm/mach-prima2/Kconfig
-@@ -2,7 +2,6 @@ config ARCH_SIRF
- bool "CSR SiRF" if ARCH_MULTI_V7
- select ARCH_REQUIRE_GPIOLIB
- select GENERIC_IRQ_CHIP
-- select MIGHT_HAVE_CACHE_L2X0
- select NO_IOPORT
- select PINCTRL
- select PINCTRL_SIRF
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 76e450aceb46..1ebf839fa2b8 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -8,7 +8,6 @@ config ARCH_SHMOBILE_MULTI
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select ARM_GIC
-- select MIGHT_HAVE_CACHE_L2X0
- select MIGHT_HAVE_PCI
- select NO_IOPORT
- select PINCTRL
-diff --git a/arch/arm/mach-spear/Kconfig b/arch/arm/mach-spear/Kconfig
-index 601b8d831a56..5c57262b97e9 100644
---- a/arch/arm/mach-spear/Kconfig
-+++ b/arch/arm/mach-spear/Kconfig
-@@ -19,7 +19,6 @@ config ARCH_SPEAR13XX
- select GPIO_SPEAR_SPICS
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select MIGHT_HAVE_CACHE_L2X0
- select PINCTRL
- help
- Supports for ARM's SPEAR13XX family
-diff --git a/arch/arm/mach-sti/Kconfig b/arch/arm/mach-sti/Kconfig
-index c3fdceee4ecb..d2c13ba1190b 100644
---- a/arch/arm/mach-sti/Kconfig
-+++ b/arch/arm/mach-sti/Kconfig
-@@ -5,7 +5,6 @@ menuconfig ARCH_STI
- select PINCTRL
- select PINCTRL_ST
- select MFD_SYSCON
-- select MIGHT_HAVE_CACHE_L2X0
- select HAVE_ARM_SCU if SMP
- select ARCH_REQUIRE_GPIOLIB
- select ARM_ERRATA_754322
-diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
-index d58022939d5d..92d660f9610f 100644
---- a/arch/arm/mach-tegra/Kconfig
-+++ b/arch/arm/mach-tegra/Kconfig
-@@ -7,7 +7,6 @@ config ARCH_TEGRA
- select CLKSRC_MMIO
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select MIGHT_HAVE_CACHE_L2X0
- select MIGHT_HAVE_PCI
- select PINCTRL
- select ARCH_HAS_RESET_CONTROLLER
-diff --git a/arch/arm/mach-ux500/Kconfig b/arch/arm/mach-ux500/Kconfig
-index 731b9197e0e3..8052bd52450d 100644
---- a/arch/arm/mach-ux500/Kconfig
-+++ b/arch/arm/mach-ux500/Kconfig
-@@ -13,7 +13,6 @@ config ARCH_U8500
- select CLKSRC_NOMADIK_MTU
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select MIGHT_HAVE_CACHE_L2X0
- select PINCTRL
- select PINCTRL_ABX500
- select PINCTRL_NOMADIK
-diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
-index 6cbddb825fee..80b4be36f10a 100644
---- a/arch/arm/mach-vexpress/Kconfig
-+++ b/arch/arm/mach-vexpress/Kconfig
-@@ -10,7 +10,6 @@ config ARCH_VEXPRESS
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
- select ICST
-- select MIGHT_HAVE_CACHE_L2X0
- select NO_IOPORT
- select PLAT_VERSATILE
- select PLAT_VERSATILE_CLCD
-diff --git a/arch/arm/mach-zynq/Kconfig b/arch/arm/mach-zynq/Kconfig
-index 70e247dd1f08..105d39b72a25 100644
---- a/arch/arm/mach-zynq/Kconfig
-+++ b/arch/arm/mach-zynq/Kconfig
-@@ -5,7 +5,6 @@ config ARCH_ZYNQ
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select ICST
-- select MIGHT_HAVE_CACHE_L2X0
- select CADENCE_TTC_TIMER
- select ARM_GLOBAL_TIMER
- help
---
-2.1.2
-
diff --git a/patches.renesas/0323-ARM-shmobile-r8a7778-add-audio-clock-in-new-style.patch b/patches.renesas/0323-ARM-shmobile-r8a7778-add-audio-clock-in-new-style.patch
deleted file mode 100644
index 142b21ac09d63..0000000000000
--- a/patches.renesas/0323-ARM-shmobile-r8a7778-add-audio-clock-in-new-style.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e9a842e5acf53805d1713a065bdd4a116c5fd067 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 13 Jan 2014 18:25:27 -0800
-Subject: ARM: shmobile: r8a7778: add audio clock in new style
-
-Current audio clock doesn't have dependency to device/driver,
-but, it is not good design for DT support.
-To avoid branch merge conflict issue,
-it uses this load map, and this patch is 1) part.
- 1) add new style clock in platform
- 2) add new style clock method in driver
- 3) remove old tyle clock from platform
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ba349c08bea1bfddddb7cfc0af140d368274f869)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7778.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 9783945f8bc7..2009a9bc6356 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -221,6 +221,10 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("fffc6000.spi", &mstp_clks[MSTP007]), /* HSPI2 */
- CLKDEV_DEV_ID("rcar_sound", &mstp_clks[MSTP008]), /* SRU */
-
-+ CLKDEV_ICK_ID("clk_a", "rcar_sound", &audio_clk_a),
-+ CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b),
-+ CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c),
-+ CLKDEV_ICK_ID("clk_i", "rcar_sound", &s1_clk),
- CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP012]),
- CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP011]),
- CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP010]),
---
-2.1.2
-
diff --git a/patches.renesas/0324-ARM-shmobile-r8a7790-add-audio-clock.patch b/patches.renesas/0324-ARM-shmobile-r8a7790-add-audio-clock.patch
deleted file mode 100644
index 190f985c653a2..0000000000000
--- a/patches.renesas/0324-ARM-shmobile-r8a7790-add-audio-clock.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 84c6b713da2db8e6aba5d419a1c5d7c27e422487 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Mon, 13 Jan 2014 18:25:39 -0800
-Subject: ARM: shmobile: r8a7790: add audio clock
-
-Current audio clock doesn't have dependency to device/driver,
-but, it is not good design for DT support.
-To avoid branch merge conflict issue,
-it uses this load map, and this patch is 1) part.
- 1) add old/new style clock in platform
- 2) add new style clock method in driver
- 3) remove old tyle clock from platform
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c7c2ec3a1881b93c211d0754b39f08b5a75459d8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 23 +++++++++++++++++++++++
- arch/arm/mach-shmobile/clock-r8a7790.c | 20 ++++++++++++++++++++
- 2 files changed, 43 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 6eb9613d9c8d..a1e7c396afea 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -409,6 +409,29 @@
- clock-output-names = "extal";
- };
-
-+ /*
-+ * The external audio clocks are configured as 0 Hz fixed frequency clocks by
-+ * default. Boards that provide audio clocks should override them.
-+ */
-+ audio_clk_a: audio_clk_a {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <0>;
-+ clock-output-names = "audio_clk_a";
-+ };
-+ audio_clk_b: audio_clk_b {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <0>;
-+ clock-output-names = "audio_clk_b";
-+ };
-+ audio_clk_c: audio_clk_c {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <0>;
-+ clock-output-names = "audio_clk_c";
-+ };
-+
- /* Special CPG clocks */
- cpg_clocks: cpg_clocks@e6150000 {
- compatible = "renesas,r8a7790-cpg-clocks",
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 507073e9d455..08a28034ca1d 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -91,6 +91,15 @@ static struct clk main_clk = {
- .ops = &followparent_clk_ops,
- };
-
-+static struct clk audio_clk_a = {
-+};
-+
-+static struct clk audio_clk_b = {
-+};
-+
-+static struct clk audio_clk_c = {
-+};
-+
- /*
- * clock ratio of these clock will be updated
- * on r8a7790_clock_init()
-@@ -124,6 +133,9 @@ SH_FIXED_RATIO_CLK_SET(ddr_clk, pll3_clk, 1, 8);
- SH_FIXED_RATIO_CLK_SET(mp_clk, pll1_div2_clk, 1, 15);
-
- static struct clk *main_clks[] = {
-+ &audio_clk_a,
-+ &audio_clk_b,
-+ &audio_clk_c,
- &extal_clk,
- &extal_div2_clk,
- &main_clk,
-@@ -267,6 +279,10 @@ static struct clk mstp_clks[MSTP_NR] = {
- static struct clk_lookup lookups[] = {
-
- /* main clocks */
-+ CLKDEV_CON_ID("audio_clk_a", &audio_clk_a),
-+ CLKDEV_CON_ID("audio_clk_b", &audio_clk_b),
-+ CLKDEV_CON_ID("audio_clk_c", &audio_clk_c),
-+ CLKDEV_CON_ID("audio_clk_internal", &m2_clk),
- CLKDEV_CON_ID("extal", &extal_clk),
- CLKDEV_CON_ID("extal_div2", &extal_div2_clk),
- CLKDEV_CON_ID("main", &main_clk),
-@@ -357,6 +373,10 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("du.0", "rcar-du-r8a7790", &mstp_clks[MSTP724]),
- CLKDEV_ICK_ID("du.1", "rcar-du-r8a7790", &mstp_clks[MSTP723]),
- CLKDEV_ICK_ID("du.2", "rcar-du-r8a7790", &mstp_clks[MSTP722]),
-+ CLKDEV_ICK_ID("clk_a", "rcar_sound", &audio_clk_a),
-+ CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b),
-+ CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c),
-+ CLKDEV_ICK_ID("clk_i", "rcar_sound", &m2_clk),
- CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]),
- CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]),
- CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]),
---
-2.1.2
-
diff --git a/patches.renesas/0325-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks.patch b/patches.renesas/0325-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks.patch
deleted file mode 100644
index 15d678fcee5f0..0000000000000
--- a/patches.renesas/0325-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From e499bf373ddf18b1e8cf2d503302b2a9a4b2a3c6 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:23:55 +0100
-Subject: ARM: shmobile: r7s72100 clock: Add RSPI clocks
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d9409fb8f30437b68647613e1f0d61b332de30be)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 21 ++++++++++++++++++---
- 1 file changed, 18 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index dd8ce87596de..ffb0fff41375 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -22,12 +22,14 @@
- #include <mach/common.h>
- #include <mach/r7s72100.h>
-
--/* registers */
-+/* Frequency Control Registers */
- #define FRQCR 0xfcfe0010
- #define FRQCR2 0xfcfe0014
-+/* Standby Control Registers */
- #define STBCR3 0xfcfe0420
- #define STBCR4 0xfcfe0424
- #define STBCR9 0xfcfe0438
-+#define STBCR10 0xfcfe043c
-
- #define PLL_RATE 30
-
-@@ -145,11 +147,19 @@ struct clk div4_clks[DIV4_NR] = {
- | CLK_ENABLE_ON_INIT),
- };
-
--enum { MSTP97, MSTP96, MSTP95, MSTP94,
-+enum {
-+ MSTP107, MSTP106, MSTP105, MSTP104, MSTP103,
-+ MSTP97, MSTP96, MSTP95, MSTP94,
- MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40,
-- MSTP33, MSTP_NR };
-+ MSTP33, MSTP_NR
-+};
-
- static struct clk mstp_clks[MSTP_NR] = {
-+ [MSTP107] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 7, 0), /* RSPI0 */
-+ [MSTP106] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 6, 0), /* RSPI1 */
-+ [MSTP105] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 5, 0), /* RSPI2 */
-+ [MSTP104] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 4, 0), /* RSPI3 */
-+ [MSTP103] = SH_CLK_MSTP8(&peripheral1_clk, STBCR10, 3, 0), /* RSPI4 */
- [MSTP97] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 7, 0), /* RIIC0 */
- [MSTP96] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 6, 0), /* RIIC1 */
- [MSTP95] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 5, 0), /* RIIC2 */
-@@ -176,6 +186,11 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("cpu_clk", &div4_clks[DIV4_I]),
-
- /* MSTP clocks */
-+ CLKDEV_DEV_ID("rspi-rz.0", &mstp_clks[MSTP107]),
-+ CLKDEV_DEV_ID("rspi-rz.1", &mstp_clks[MSTP106]),
-+ CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]),
-+ CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]),
-+ CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]),
- CLKDEV_DEV_ID("fcfee000.i2c", &mstp_clks[MSTP97]),
- CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]),
- CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
---
-2.1.2
-
diff --git a/patches.renesas/0326-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks-for-DT.patch b/patches.renesas/0326-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks-for-DT.patch
deleted file mode 100644
index f74ac5e6d729a..0000000000000
--- a/patches.renesas/0326-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks-for-DT.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c35dd9109cc49c490ef31f812b6352cbef3ac46f Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:23:58 +0100
-Subject: ARM: shmobile: r7s72100 clock: Add RSPI clocks for DT
-
-Add DT-style ("%08x.spi") clocks, as Genmai doesn't use the common
-clock framework yet.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3fc3e908d25ad04de1a01b3f659ecabefcca74c5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index ffb0fff41375..71c99feeff01 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -191,6 +191,11 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]),
- CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]),
- CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]),
-+ CLKDEV_DEV_ID("e800c800.spi", &mstp_clks[MSTP107]),
-+ CLKDEV_DEV_ID("e800d000.spi", &mstp_clks[MSTP106]),
-+ CLKDEV_DEV_ID("e800d800.spi", &mstp_clks[MSTP105]),
-+ CLKDEV_DEV_ID("e800e000.spi", &mstp_clks[MSTP104]),
-+ CLKDEV_DEV_ID("e800e800.spi", &mstp_clks[MSTP103]),
- CLKDEV_DEV_ID("fcfee000.i2c", &mstp_clks[MSTP97]),
- CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]),
- CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
---
-2.1.2
-
diff --git a/patches.renesas/0327-ARM-shmobile-r8a7791-clock-add-QSPI-clocks.patch b/patches.renesas/0327-ARM-shmobile-r8a7791-clock-add-QSPI-clocks.patch
deleted file mode 100644
index 9099a039fb405..0000000000000
--- a/patches.renesas/0327-ARM-shmobile-r8a7791-clock-add-QSPI-clocks.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 22d48d8573115f81c99a8816f78c4141cbeb8fa7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 4 Feb 2014 16:24:00 +0100
-Subject: ARM: shmobile: r8a7791 clock: add QSPI clocks
-
-The QSPI clock divider value depends on the MD1, MD2, and MD3 mode
-switches.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d2eec3d5251216942e1d425300686f1a18bc615d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index e4e4dfac85e9..c8227b334e61 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -101,6 +101,7 @@ static struct clk main_clk = {
- */
- SH_FIXED_RATIO_CLK_SET(pll1_clk, main_clk, 1, 1);
- SH_FIXED_RATIO_CLK_SET(pll3_clk, main_clk, 1, 1);
-+SH_FIXED_RATIO_CLK_SET(qspi_clk, pll1_clk, 1, 1);
-
- /* fixed ratio clock */
- SH_FIXED_RATIO_CLK_SET(extal_div2_clk, extal_clk, 1, 2);
-@@ -124,6 +125,7 @@ static struct clk *main_clks[] = {
- &pll3_clk,
- &hp_clk,
- &p_clk,
-+ &qspi_clk,
- &rclk_clk,
- &mp_clk,
- &cp_clk,
-@@ -135,6 +137,7 @@ static struct clk *main_clks[] = {
- /* MSTP */
- enum {
- MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
-+ MSTP917,
- MSTP815, MSTP814,
- MSTP813,
- MSTP811, MSTP810, MSTP809,
-@@ -154,6 +157,7 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
- [MSTP927] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
- [MSTP925] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
-+ [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
- [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
- [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
- [MSTP813] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR8, 13, MSTPSR8, 0), /* Ether */
-@@ -195,6 +199,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("zs", &zs_clk),
- CLKDEV_CON_ID("hp", &hp_clk),
- CLKDEV_CON_ID("p", &p_clk),
-+ CLKDEV_CON_ID("qspi", &qspi_clk),
- CLKDEV_CON_ID("rclk", &rclk_clk),
- CLKDEV_CON_ID("mp", &mp_clk),
- CLKDEV_CON_ID("cp", &cp_clk),
-@@ -220,6 +225,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */
- CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
-+ CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
-@@ -271,6 +277,11 @@ void __init r8a7791_clock_init(void)
- break;
- }
-
-+ if ((mode & (MD(3) | MD(2) | MD(1))) == MD(2))
-+ SH_CLK_SET_RATIO(&qspi_clk_ratio, 1, 16);
-+ else
-+ SH_CLK_SET_RATIO(&qspi_clk_ratio, 1, 20);
-+
- for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
- ret = clk_register(main_clks[k]);
-
---
-2.1.2
-
diff --git a/patches.renesas/0328-ARM-shmobile-r7s72100-Add-clock-for-r7s72100-ether.patch b/patches.renesas/0328-ARM-shmobile-r7s72100-Add-clock-for-r7s72100-ether.patch
deleted file mode 100644
index b426564c726d5..0000000000000
--- a/patches.renesas/0328-ARM-shmobile-r7s72100-Add-clock-for-r7s72100-ether.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 8c3328000e0d62a128eaf51b80c5383091044bda Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Sun, 15 Dec 2013 16:24:53 +0900
-Subject: ARM: shmobile: r7s72100: Add clock for r7s72100-ether
-
-Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0e7ed0c1613aea101205b4e0413f75ef8141bf3d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index 71c99feeff01..f17a5db00221 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -28,6 +28,7 @@
- /* Standby Control Registers */
- #define STBCR3 0xfcfe0420
- #define STBCR4 0xfcfe0424
-+#define STBCR7 0xfcfe0430
- #define STBCR9 0xfcfe0438
- #define STBCR10 0xfcfe043c
-
-@@ -150,6 +151,7 @@ struct clk div4_clks[DIV4_NR] = {
- enum {
- MSTP107, MSTP106, MSTP105, MSTP104, MSTP103,
- MSTP97, MSTP96, MSTP95, MSTP94,
-+ MSTP74,
- MSTP47, MSTP46, MSTP45, MSTP44, MSTP43, MSTP42, MSTP41, MSTP40,
- MSTP33, MSTP_NR
- };
-@@ -164,6 +166,7 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP96] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 6, 0), /* RIIC1 */
- [MSTP95] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 5, 0), /* RIIC2 */
- [MSTP94] = SH_CLK_MSTP8(&peripheral0_clk, STBCR9, 4, 0), /* RIIC3 */
-+ [MSTP74] = SH_CLK_MSTP8(&peripheral1_clk, STBCR7, 4, 0), /* Ether */
- [MSTP47] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 7, 0), /* SCIF0 */
- [MSTP46] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 6, 0), /* SCIF1 */
- [MSTP45] = SH_CLK_MSTP8(&peripheral1_clk, STBCR4, 5, 0), /* SCIF2 */
-@@ -200,6 +203,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]),
- CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
- CLKDEV_DEV_ID("fcfeec00.i2c", &mstp_clks[MSTP94]),
-+ CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),
- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]),
-
- /* ICK */
---
-2.1.2
-
diff --git a/patches.renesas/0329-ARM-shmobile-Add-r8a7791-legacy-SDHI-clocks.patch b/patches.renesas/0329-ARM-shmobile-Add-r8a7791-legacy-SDHI-clocks.patch
deleted file mode 100644
index 0b32747ae60a7..0000000000000
--- a/patches.renesas/0329-ARM-shmobile-Add-r8a7791-legacy-SDHI-clocks.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 52fc15bbd07f9b47c4f12e593ce71da0450820e3 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 12 Feb 2014 13:26:01 +0900
-Subject: ARM: shmobile: Add r8a7791 legacy SDHI clocks
-
-Add legacy r8a7791 SDHI clocks. This to allow the SDHI devices
-to be used by legacy Koelsch board support.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4bfb358b1d6cdeff8c6a13677f01ed78e9696b98)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 51 ++++++++++++++++++++++++++++++++--
- 1 file changed, 49 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index c8227b334e61..3e1b6b699184 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -61,6 +61,7 @@
-
- #define MSTPSR1 IOMEM(0xe6150038)
- #define MSTPSR2 IOMEM(0xe6150040)
-+#define MSTPSR3 IOMEM(0xe6150048)
- #define MSTPSR5 IOMEM(0xe615003c)
- #define MSTPSR7 IOMEM(0xe61501c4)
- #define MSTPSR8 IOMEM(0xe61509a0)
-@@ -69,8 +70,8 @@
-
- #define MODEMR 0xE6160060
- #define SDCKCR 0xE6150074
--#define SD2CKCR 0xE6150078
--#define SD3CKCR 0xE615007C
-+#define SD1CKCR 0xE6150078
-+#define SD2CKCR 0xE615026c
- #define MMC0CKCR 0xE6150240
- #define MMC1CKCR 0xE6150244
- #define SSPCKCR 0xE6150248
-@@ -134,6 +135,39 @@ static struct clk *main_clks[] = {
- &zs_clk,
- };
-
-+/* SDHI (DIV4) clock */
-+static int divisors[] = { 2, 3, 4, 6, 8, 12, 16, 18, 24, 0, 36, 48, 10 };
-+
-+static struct clk_div_mult_table div4_div_mult_table = {
-+ .divisors = divisors,
-+ .nr_divisors = ARRAY_SIZE(divisors),
-+};
-+
-+static struct clk_div4_table div4_table = {
-+ .div_mult_table = &div4_div_mult_table,
-+};
-+
-+enum {
-+ DIV4_SDH, DIV4_SD0,
-+ DIV4_NR
-+};
-+
-+static struct clk div4_clks[DIV4_NR] = {
-+ [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT),
-+ [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT),
-+};
-+
-+/* DIV6 clocks */
-+enum {
-+ DIV6_SD1, DIV6_SD2,
-+ DIV6_NR
-+};
-+
-+static struct clk div6_clks[DIV6_NR] = {
-+ [DIV6_SD1] = SH_CLK_DIV6(&pll1_div2_clk, SD1CKCR, 0),
-+ [DIV6_SD2] = SH_CLK_DIV6(&pll1_div2_clk, SD2CKCR, 0),
-+};
-+
- /* MSTP */
- enum {
- MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
-@@ -144,6 +178,7 @@ enum {
- MSTP726, MSTP724, MSTP723, MSTP721, MSTP720,
- MSTP719, MSTP718, MSTP715, MSTP714,
- MSTP522,
-+ MSTP314, MSTP312, MSTP311,
- MSTP216, MSTP207, MSTP206,
- MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107,
- MSTP124,
-@@ -174,6 +209,9 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP715] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 15, MSTPSR7, 0), /* SCIF4 */
- [MSTP714] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR7, 14, MSTPSR7, 0), /* SCIF5 */
- [MSTP522] = SH_CLK_MSTP32_STS(&extal_clk, SMSTPCR5, 22, MSTPSR5, 0), /* Thermal */
-+ [MSTP314] = SH_CLK_MSTP32_STS(&div4_clks[DIV4_SD0], SMSTPCR3, 14, MSTPSR3, 0), /* SDHI0 */
-+ [MSTP312] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD1], SMSTPCR3, 12, MSTPSR3, 0), /* SDHI1 */
-+ [MSTP311] = SH_CLK_MSTP32_STS(&div6_clks[DIV6_SD2], SMSTPCR3, 11, MSTPSR3, 0), /* SDHI2 */
- [MSTP216] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 16, MSTPSR2, 0), /* SCIFB2 */
- [MSTP207] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 7, MSTPSR2, 0), /* SCIFB1 */
- [MSTP206] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 6, MSTPSR2, 0), /* SCIFB0 */
-@@ -224,6 +262,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1105]), /* SCIFA3 */
- CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */
- CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */
-+ CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
-+ CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]),
-+ CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
-@@ -286,6 +327,12 @@ void __init r8a7791_clock_init(void)
- ret = clk_register(main_clks[k]);
-
- if (!ret)
-+ ret = sh_clk_div4_register(div4_clks, DIV4_NR, &div4_table);
-+
-+ if (!ret)
-+ ret = sh_clk_div6_register(div6_clks, DIV6_NR);
-+
-+ if (!ret)
- ret = sh_clk_mstp_register(mstp_clks, MSTP_NR);
-
- clkdev_add_table(lookups, ARRAY_SIZE(lookups));
---
-2.1.2
-
diff --git a/patches.renesas/0330-ARM-shmobile-Remove-legacy-r8a7790-DT-clocks.patch b/patches.renesas/0330-ARM-shmobile-Remove-legacy-r8a7790-DT-clocks.patch
deleted file mode 100644
index 79f2374502ed4..0000000000000
--- a/patches.renesas/0330-ARM-shmobile-Remove-legacy-r8a7790-DT-clocks.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From ffa959f023de76584d09885823c32a2aaf18d420 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 12 Feb 2014 13:09:37 +0900
-Subject: ARM: shmobile: Remove legacy r8a7790 DT clocks
-
-The DT device case is handled by CCF these days, so get
-rid of DT devices from the legacy clocks for r8a7790.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit df55f6685a04a259cf59cd3fde02212b294461cc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 08a28034ca1d..02b940361a66 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -328,34 +328,23 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP720]),
- CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP717]),
- CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP716]),
-- CLKDEV_DEV_ID("e6508000.i2c", &mstp_clks[MSTP931]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
-- CLKDEV_DEV_ID("e6518000.i2c", &mstp_clks[MSTP930]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
-- CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP929]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.2", &mstp_clks[MSTP929]),
-- CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP928]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.3", &mstp_clks[MSTP928]),
- CLKDEV_DEV_ID("r8a7790-ether", &mstp_clks[MSTP813]),
- CLKDEV_DEV_ID("r8a7790-vin.0", &mstp_clks[MSTP811]),
- CLKDEV_DEV_ID("r8a7790-vin.1", &mstp_clks[MSTP810]),
- CLKDEV_DEV_ID("r8a7790-vin.2", &mstp_clks[MSTP809]),
- CLKDEV_DEV_ID("r8a7790-vin.3", &mstp_clks[MSTP808]),
-- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP502]),
- CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP501]),
-- CLKDEV_DEV_ID("ee200000.mmc", &mstp_clks[MSTP315]),
- CLKDEV_DEV_ID("sh_mmcif.0", &mstp_clks[MSTP315]),
-- CLKDEV_DEV_ID("ee100000.sd", &mstp_clks[MSTP314]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
-- CLKDEV_DEV_ID("ee120000.sd", &mstp_clks[MSTP313]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP313]),
-- CLKDEV_DEV_ID("ee140000.sd", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
-- CLKDEV_DEV_ID("ee160000.sd", &mstp_clks[MSTP311]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]),
-- CLKDEV_DEV_ID("ee220000.mmc", &mstp_clks[MSTP305]),
- CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
---
-2.1.2
-
diff --git a/patches.renesas/0331-ARM-shmobile-Use-64-bit-dma_addr_t-on-r8a7790-r8a779.patch b/patches.renesas/0331-ARM-shmobile-Use-64-bit-dma_addr_t-on-r8a7790-r8a779.patch
deleted file mode 100644
index 0f06c379256ac..0000000000000
--- a/patches.renesas/0331-ARM-shmobile-Use-64-bit-dma_addr_t-on-r8a7790-r8a779.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 262a29e6602a74abfc6115e48c9204659301a720 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 5 Feb 2014 14:36:28 +0900
-Subject: ARM: shmobile: Use 64-bit dma_addr_t on r8a7790/r8a7791
-
-Some on-chip devices on r8a7790 and r8a7791 can do
-bus mastering and access more than 32-bits of address
-space. Select ARCH_DMA_ADDR_T_64BIT when LPAE is set
-in case of multiplatform and legacy SoC support.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4a51856b42672cfcb7d6fbab22dcf2caba2be5ab)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 1ebf839fa2b8..08ec4ffc17ee 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -9,6 +9,7 @@ config ARCH_SHMOBILE_MULTI
- select HAVE_ARM_TWD if SMP
- select ARM_GIC
- select MIGHT_HAVE_PCI
-+ select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
- select NO_IOPORT
- select PINCTRL
- select ARCH_REQUIRE_GPIOLIB
-@@ -111,6 +112,7 @@ config ARCH_R8A7790
- select MIGHT_HAVE_PCI
- select SH_CLK_CPG
- select RENESAS_IRQC
-+ select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-
- config ARCH_R8A7791
- bool "R-Car M2 (R8A77910)"
-@@ -120,6 +122,7 @@ config ARCH_R8A7791
- select MIGHT_HAVE_PCI
- select SH_CLK_CPG
- select RENESAS_IRQC
-+ select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-
- config ARCH_EMEV2
- bool "Emma Mobile EV2"
---
-2.1.2
-
diff --git a/patches.renesas/0332-ARM-shmobile-Break-out-R-Car-SYSC-PM-code.patch b/patches.renesas/0332-ARM-shmobile-Break-out-R-Car-SYSC-PM-code.patch
deleted file mode 100644
index 1a04e6e6222af..0000000000000
--- a/patches.renesas/0332-ARM-shmobile-Break-out-R-Car-SYSC-PM-code.patch
+++ /dev/null
@@ -1,498 +0,0 @@
-From 7cf940109b07e934ae9e6e3e74a6a71b23f858d1 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 15 Jan 2014 16:43:08 +0900
-Subject: ARM: shmobile: Break out R-Car SYSC PM code
-
-Break out the R-Car SYSC power management code from
-the r8a7779 SoC code. With this new shared R-Car SYSC
-code base it is possible to hook in Generation 2 SoCs
-as well.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a6557eb795edcf7832b5278a11842c4ca302f4af)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 2 +-
- arch/arm/mach-shmobile/include/mach/pm-rcar.h | 15 +++
- arch/arm/mach-shmobile/include/mach/r8a7779.h | 13 +--
- arch/arm/mach-shmobile/pm-r8a7779.c | 131 ++----------------------
- arch/arm/mach-shmobile/pm-rcar.c | 142 ++++++++++++++++++++++++++
- arch/arm/mach-shmobile/smp-r8a7779.c | 17 +--
- 6 files changed, 177 insertions(+), 143 deletions(-)
- create mode 100644 arch/arm/mach-shmobile/include/mach/pm-rcar.h
- create mode 100644 arch/arm/mach-shmobile/pm-rcar.c
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 1402d602f5a4..6a48dee9d1bd 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -52,7 +52,7 @@ obj-$(CONFIG_CPU_IDLE) += cpuidle.o
- obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
- obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
- obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
--obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o
-+obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
-
- # Board objects
- ifdef CONFIG_ARCH_SHMOBILE_MULTI
-diff --git a/arch/arm/mach-shmobile/include/mach/pm-rcar.h b/arch/arm/mach-shmobile/include/mach/pm-rcar.h
-new file mode 100644
-index 000000000000..ef3a1ef628f1
---- /dev/null
-+++ b/arch/arm/mach-shmobile/include/mach/pm-rcar.h
-@@ -0,0 +1,15 @@
-+#ifndef PM_RCAR_H
-+#define PM_RCAR_H
-+
-+struct rcar_sysc_ch {
-+ unsigned long chan_offs;
-+ unsigned int chan_bit;
-+ unsigned int isr_bit;
-+};
-+
-+int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch);
-+int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch);
-+bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch);
-+void __iomem *rcar_sysc_init(phys_addr_t base);
-+
-+#endif /* PM_RCAR_H */
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-index b40e13631f6a..88eeceaf1088 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-@@ -3,6 +3,7 @@
-
- #include <linux/sh_clk.h>
- #include <linux/pm_domain.h>
-+#include <mach/pm-rcar.h>
-
- /* HPB-DMA slave IDs */
- enum {
-@@ -11,18 +12,12 @@ enum {
- HPBDMA_SLAVE_SDHI0_RX,
- };
-
--struct r8a7779_pm_ch {
-- unsigned long chan_offs;
-- unsigned int chan_bit;
-- unsigned int isr_bit;
--};
--
- struct r8a7779_pm_domain {
- struct generic_pm_domain genpd;
-- struct r8a7779_pm_ch ch;
-+ struct rcar_sysc_ch ch;
- };
-
--static inline struct r8a7779_pm_ch *to_r8a7779_ch(struct generic_pm_domain *d)
-+static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
- {
- return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
- }
-@@ -41,8 +36,6 @@ extern void r8a7779_clock_init(void);
- extern void r8a7779_pinmux_init(void);
- extern void r8a7779_pm_init(void);
- extern void r8a7779_register_twd(void);
--extern int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch);
--extern int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch);
-
- #ifdef CONFIG_PM
- extern void __init r8a7779_init_pm_domains(void);
-diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c
-index d50a8e9b94a4..d6fe189b2df6 100644
---- a/arch/arm/mach-shmobile/pm-r8a7779.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7779.c
-@@ -20,132 +20,22 @@
- #include <linux/console.h>
- #include <asm/io.h>
- #include <mach/common.h>
-+#include <mach/pm-rcar.h>
- #include <mach/r8a7779.h>
-
--static void __iomem *r8a7779_sysc_base;
--
- /* SYSC */
--#define SYSCSR 0x00
--#define SYSCISR 0x04
--#define SYSCISCR 0x08
- #define SYSCIER 0x0c
- #define SYSCIMR 0x10
--#define PWRSR0 0x40
--#define PWRSR1 0x80
--#define PWRSR2 0xc0
--#define PWRSR3 0x100
--#define PWRSR4 0x140
--
--#define PWRSR_OFFS 0x00
--#define PWROFFCR_OFFS 0x04
--#define PWRONCR_OFFS 0x0c
--#define PWRER_OFFS 0x14
--
--#define SYSCSR_RETRIES 100
--#define SYSCSR_DELAY_US 1
--
--#define SYSCISR_RETRIES 1000
--#define SYSCISR_DELAY_US 1
-
- #if defined(CONFIG_PM) || defined(CONFIG_SMP)
-
--static DEFINE_SPINLOCK(r8a7779_sysc_lock); /* SMP CPUs + I/O devices */
--
--static int r8a7779_sysc_pwr_on_off(struct r8a7779_pm_ch *r8a7779_ch,
-- int sr_bit, int reg_offs)
--{
-- int k;
--
-- for (k = 0; k < SYSCSR_RETRIES; k++) {
-- if (ioread32(r8a7779_sysc_base + SYSCSR) & (1 << sr_bit))
-- break;
-- udelay(SYSCSR_DELAY_US);
-- }
--
-- if (k == SYSCSR_RETRIES)
-- return -EAGAIN;
--
-- iowrite32(1 << r8a7779_ch->chan_bit,
-- r8a7779_sysc_base + r8a7779_ch->chan_offs + reg_offs);
--
-- return 0;
--}
--
--static int r8a7779_sysc_pwr_off(struct r8a7779_pm_ch *r8a7779_ch)
--{
-- return r8a7779_sysc_pwr_on_off(r8a7779_ch, 0, PWROFFCR_OFFS);
--}
--
--static int r8a7779_sysc_pwr_on(struct r8a7779_pm_ch *r8a7779_ch)
--{
-- return r8a7779_sysc_pwr_on_off(r8a7779_ch, 1, PWRONCR_OFFS);
--}
--
--static int r8a7779_sysc_update(struct r8a7779_pm_ch *r8a7779_ch,
-- int (*on_off_fn)(struct r8a7779_pm_ch *))
--{
-- unsigned int isr_mask = 1 << r8a7779_ch->isr_bit;
-- unsigned int chan_mask = 1 << r8a7779_ch->chan_bit;
-- unsigned int status;
-- unsigned long flags;
-- int ret = 0;
-- int k;
--
-- spin_lock_irqsave(&r8a7779_sysc_lock, flags);
--
-- iowrite32(isr_mask, r8a7779_sysc_base + SYSCISCR);
--
-- do {
-- ret = on_off_fn(r8a7779_ch);
-- if (ret)
-- goto out;
--
-- status = ioread32(r8a7779_sysc_base +
-- r8a7779_ch->chan_offs + PWRER_OFFS);
-- } while (status & chan_mask);
--
-- for (k = 0; k < SYSCISR_RETRIES; k++) {
-- if (ioread32(r8a7779_sysc_base + SYSCISR) & isr_mask)
-- break;
-- udelay(SYSCISR_DELAY_US);
-- }
--
-- if (k == SYSCISR_RETRIES)
-- ret = -EIO;
--
-- iowrite32(isr_mask, r8a7779_sysc_base + SYSCISCR);
--
-- out:
-- spin_unlock_irqrestore(&r8a7779_sysc_lock, flags);
--
-- pr_debug("r8a7779 power domain %d: %02x %02x %02x %02x %02x -> %d\n",
-- r8a7779_ch->isr_bit, ioread32(r8a7779_sysc_base + PWRSR0),
-- ioread32(r8a7779_sysc_base + PWRSR1),
-- ioread32(r8a7779_sysc_base + PWRSR2),
-- ioread32(r8a7779_sysc_base + PWRSR3),
-- ioread32(r8a7779_sysc_base + PWRSR4), ret);
-- return ret;
--}
--
--int r8a7779_sysc_power_down(struct r8a7779_pm_ch *r8a7779_ch)
--{
-- return r8a7779_sysc_update(r8a7779_ch, r8a7779_sysc_pwr_off);
--}
--
--int r8a7779_sysc_power_up(struct r8a7779_pm_ch *r8a7779_ch)
--{
-- return r8a7779_sysc_update(r8a7779_ch, r8a7779_sysc_pwr_on);
--}
--
- static void __init r8a7779_sysc_init(void)
- {
-- r8a7779_sysc_base = ioremap_nocache(0xffd85000, PAGE_SIZE);
-- if (!r8a7779_sysc_base)
-- panic("unable to ioremap r8a7779 SYSC hardware block\n");
-+ void __iomem *base = rcar_sysc_init(0xffd85000);
-
- /* enable all interrupt sources, but do not use interrupt handler */
-- iowrite32(0x0131000e, r8a7779_sysc_base + SYSCIER);
-- iowrite32(0, r8a7779_sysc_base + SYSCIMR);
-+ iowrite32(0x0131000e, base + SYSCIER);
-+ iowrite32(0, base + SYSCIMR);
- }
-
- #else /* CONFIG_PM || CONFIG_SMP */
-@@ -158,24 +48,17 @@ static inline void r8a7779_sysc_init(void) {}
-
- static int pd_power_down(struct generic_pm_domain *genpd)
- {
-- return r8a7779_sysc_power_down(to_r8a7779_ch(genpd));
-+ return rcar_sysc_power_down(to_r8a7779_ch(genpd));
- }
-
- static int pd_power_up(struct generic_pm_domain *genpd)
- {
-- return r8a7779_sysc_power_up(to_r8a7779_ch(genpd));
-+ return rcar_sysc_power_up(to_r8a7779_ch(genpd));
- }
-
- static bool pd_is_off(struct generic_pm_domain *genpd)
- {
-- struct r8a7779_pm_ch *r8a7779_ch = to_r8a7779_ch(genpd);
-- unsigned int st;
--
-- st = ioread32(r8a7779_sysc_base + r8a7779_ch->chan_offs + PWRSR_OFFS);
-- if (st & (1 << r8a7779_ch->chan_bit))
-- return true;
--
-- return false;
-+ return rcar_sysc_power_is_off(to_r8a7779_ch(genpd));
- }
-
- static bool pd_active_wakeup(struct device *dev)
-diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c
-new file mode 100644
-index 000000000000..17225db09558
---- /dev/null
-+++ b/arch/arm/mach-shmobile/pm-rcar.c
-@@ -0,0 +1,142 @@
-+/*
-+ * R-Car SYSC Power management support
-+ *
-+ * Copyright (C) 2014 Magnus Damm
-+ *
-+ * 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/delay.h>
-+#include <linux/err.h>
-+#include <linux/mm.h>
-+#include <linux/spinlock.h>
-+#include <asm/io.h>
-+#include <mach/pm-rcar.h>
-+
-+static void __iomem *rcar_sysc_base;
-+
-+/* SYSC */
-+#define SYSCSR 0x00
-+#define SYSCISR 0x04
-+#define SYSCISCR 0x08
-+
-+#define PWRSR_OFFS 0x00
-+#define PWROFFCR_OFFS 0x04
-+#define PWRONCR_OFFS 0x0c
-+#define PWRER_OFFS 0x14
-+
-+#define SYSCSR_RETRIES 100
-+#define SYSCSR_DELAY_US 1
-+
-+#define SYSCISR_RETRIES 1000
-+#define SYSCISR_DELAY_US 1
-+
-+#if defined(CONFIG_PM) || defined(CONFIG_SMP)
-+
-+static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
-+
-+static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch,
-+ int sr_bit, int reg_offs)
-+{
-+ int k;
-+
-+ for (k = 0; k < SYSCSR_RETRIES; k++) {
-+ if (ioread32(rcar_sysc_base + SYSCSR) & (1 << sr_bit))
-+ break;
-+ udelay(SYSCSR_DELAY_US);
-+ }
-+
-+ if (k == SYSCSR_RETRIES)
-+ return -EAGAIN;
-+
-+ iowrite32(1 << sysc_ch->chan_bit,
-+ rcar_sysc_base + sysc_ch->chan_offs + reg_offs);
-+
-+ return 0;
-+}
-+
-+static int rcar_sysc_pwr_off(struct rcar_sysc_ch *sysc_ch)
-+{
-+ return rcar_sysc_pwr_on_off(sysc_ch, 0, PWROFFCR_OFFS);
-+}
-+
-+static int rcar_sysc_pwr_on(struct rcar_sysc_ch *sysc_ch)
-+{
-+ return rcar_sysc_pwr_on_off(sysc_ch, 1, PWRONCR_OFFS);
-+}
-+
-+static int rcar_sysc_update(struct rcar_sysc_ch *sysc_ch,
-+ int (*on_off_fn)(struct rcar_sysc_ch *))
-+{
-+ unsigned int isr_mask = 1 << sysc_ch->isr_bit;
-+ unsigned int chan_mask = 1 << sysc_ch->chan_bit;
-+ unsigned int status;
-+ unsigned long flags;
-+ int ret = 0;
-+ int k;
-+
-+ spin_lock_irqsave(&rcar_sysc_lock, flags);
-+
-+ iowrite32(isr_mask, rcar_sysc_base + SYSCISCR);
-+
-+ do {
-+ ret = on_off_fn(sysc_ch);
-+ if (ret)
-+ goto out;
-+
-+ status = ioread32(rcar_sysc_base +
-+ sysc_ch->chan_offs + PWRER_OFFS);
-+ } while (status & chan_mask);
-+
-+ for (k = 0; k < SYSCISR_RETRIES; k++) {
-+ if (ioread32(rcar_sysc_base + SYSCISR) & isr_mask)
-+ break;
-+ udelay(SYSCISR_DELAY_US);
-+ }
-+
-+ if (k == SYSCISR_RETRIES)
-+ ret = -EIO;
-+
-+ iowrite32(isr_mask, rcar_sysc_base + SYSCISCR);
-+
-+ out:
-+ spin_unlock_irqrestore(&rcar_sysc_lock, flags);
-+
-+ pr_debug("sysc power domain %d: %08x -> %d\n",
-+ sysc_ch->isr_bit, ioread32(rcar_sysc_base + SYSCISR), ret);
-+ return ret;
-+}
-+
-+int rcar_sysc_power_down(struct rcar_sysc_ch *sysc_ch)
-+{
-+ return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_off);
-+}
-+
-+int rcar_sysc_power_up(struct rcar_sysc_ch *sysc_ch)
-+{
-+ return rcar_sysc_update(sysc_ch, rcar_sysc_pwr_on);
-+}
-+
-+bool rcar_sysc_power_is_off(struct rcar_sysc_ch *sysc_ch)
-+{
-+ unsigned int st;
-+
-+ st = ioread32(rcar_sysc_base + sysc_ch->chan_offs + PWRSR_OFFS);
-+ if (st & (1 << sysc_ch->chan_bit))
-+ return true;
-+
-+ return false;
-+}
-+
-+void __iomem *rcar_sysc_init(phys_addr_t base)
-+{
-+ rcar_sysc_base = ioremap_nocache(base, PAGE_SIZE);
-+ if (!rcar_sysc_base)
-+ panic("unable to ioremap R-Car SYSC hardware block\n");
-+
-+ return rcar_sysc_base;
-+}
-+
-+#endif /* CONFIG_PM || CONFIG_SMP */
-diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
-index 627c1f0d9478..e7a3201473d0 100644
---- a/arch/arm/mach-shmobile/smp-r8a7779.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
-@@ -24,6 +24,7 @@
- #include <linux/io.h>
- #include <linux/delay.h>
- #include <mach/common.h>
-+#include <mach/pm-rcar.h>
- #include <mach/r8a7779.h>
- #include <asm/cacheflush.h>
- #include <asm/smp_plat.h>
-@@ -33,25 +34,25 @@
- #define AVECR IOMEM(0xfe700040)
- #define R8A7779_SCU_BASE 0xf0000000
-
--static struct r8a7779_pm_ch r8a7779_ch_cpu1 = {
-+static struct rcar_sysc_ch r8a7779_ch_cpu1 = {
- .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
- .chan_bit = 1, /* ARM1 */
- .isr_bit = 1, /* ARM1 */
- };
-
--static struct r8a7779_pm_ch r8a7779_ch_cpu2 = {
-+static struct rcar_sysc_ch r8a7779_ch_cpu2 = {
- .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
- .chan_bit = 2, /* ARM2 */
- .isr_bit = 2, /* ARM2 */
- };
-
--static struct r8a7779_pm_ch r8a7779_ch_cpu3 = {
-+static struct rcar_sysc_ch r8a7779_ch_cpu3 = {
- .chan_offs = 0x40, /* PWRSR0 .. PWRER0 */
- .chan_bit = 3, /* ARM3 */
- .isr_bit = 3, /* ARM3 */
- };
-
--static struct r8a7779_pm_ch *r8a7779_ch_cpu[4] = {
-+static struct rcar_sysc_ch *r8a7779_ch_cpu[4] = {
- [1] = &r8a7779_ch_cpu1,
- [2] = &r8a7779_ch_cpu2,
- [3] = &r8a7779_ch_cpu3,
-@@ -67,7 +68,7 @@ void __init r8a7779_register_twd(void)
-
- static int r8a7779_platform_cpu_kill(unsigned int cpu)
- {
-- struct r8a7779_pm_ch *ch = NULL;
-+ struct rcar_sysc_ch *ch = NULL;
- int ret = -EIO;
-
- cpu = cpu_logical_map(cpu);
-@@ -76,14 +77,14 @@ static int r8a7779_platform_cpu_kill(unsigned int cpu)
- ch = r8a7779_ch_cpu[cpu];
-
- if (ch)
-- ret = r8a7779_sysc_power_down(ch);
-+ ret = rcar_sysc_power_down(ch);
-
- return ret ? ret : 1;
- }
-
- static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
- {
-- struct r8a7779_pm_ch *ch = NULL;
-+ struct rcar_sysc_ch *ch = NULL;
- unsigned int lcpu = cpu_logical_map(cpu);
- int ret;
-
-@@ -91,7 +92,7 @@ static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
- ch = r8a7779_ch_cpu[lcpu];
-
- if (ch)
-- ret = r8a7779_sysc_power_up(ch);
-+ ret = rcar_sysc_power_up(ch);
- else
- ret = -EIO;
-
---
-2.1.2
-
diff --git a/patches.renesas/0333-ARM-shmobile-r8a7790-SYSC-setup-code.patch b/patches.renesas/0333-ARM-shmobile-r8a7790-SYSC-setup-code.patch
deleted file mode 100644
index 8c48616fbec54..0000000000000
--- a/patches.renesas/0333-ARM-shmobile-r8a7790-SYSC-setup-code.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 66db3d24e32cabb0d7430622c2ac6de01d50840a Mon Sep 17 00:00:00 2001
-From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
-Date: Wed, 15 Jan 2014 21:25:49 +0900
-Subject: ARM: shmobile: r8a7790 SYSC setup code
-
-Add r8a7790 SYSC power management support.
-
-Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
-Signed-off-by: Ryo Kataoka <ryo.kataoka.wt@renesas.com>
-[damm@opensource.se: Converted to use broken out SYSC code]
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit a48f165509c18d47f1505888a21918e8a06d590f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 1 +
- arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 +
- arch/arm/mach-shmobile/pm-r8a7790.c | 45 +++++++++++++++++++++++++++
- 3 files changed, 47 insertions(+)
- create mode 100644 arch/arm/mach-shmobile/pm-r8a7790.c
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 6a48dee9d1bd..4caffc912a81 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -53,6 +53,7 @@ obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
- obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
- obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
- obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
-+obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o
-
- # Board objects
- ifdef CONFIG_ARCH_SHMOBILE_MULTI
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-index 2177325af22f..0b95babe84ba 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-@@ -32,6 +32,7 @@ void r8a7790_add_standard_devices(void);
- void r8a7790_add_dt_devices(void);
- void r8a7790_clock_init(void);
- void r8a7790_pinmux_init(void);
-+void r8a7790_pm_init(void);
- void r8a7790_init_early(void);
- extern struct smp_operations r8a7790_smp_ops;
-
-diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
-new file mode 100644
-index 000000000000..fc82839e2c2a
---- /dev/null
-+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
-@@ -0,0 +1,45 @@
-+/*
-+ * r8a7790 Power management support
-+ *
-+ * Copyright (C) 2013 Renesas Electronics Corporation
-+ * Copyright (C) 2011 Renesas Solutions Corp.
-+ * Copyright (C) 2011 Magnus Damm
-+ *
-+ * 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/kernel.h>
-+#include <asm/io.h>
-+#include <mach/pm-rcar.h>
-+#include <mach/r8a7790.h>
-+
-+/* SYSC */
-+#define SYSCIER 0x0c
-+#define SYSCIMR 0x10
-+
-+#if defined(CONFIG_SMP)
-+
-+static void __init r8a7790_sysc_init(void)
-+{
-+ void __iomem *base = rcar_sysc_init(0xe6180000);
-+
-+ /* enable all interrupt sources, but do not use interrupt handler */
-+ iowrite32(0x0131000e, base + SYSCIER);
-+ iowrite32(0, base + SYSCIMR);
-+}
-+
-+#else /* CONFIG_SMP */
-+
-+static inline void r8a7790_sysc_init(void) {}
-+
-+#endif /* CONFIG_SMP */
-+
-+void __init r8a7790_pm_init(void)
-+{
-+ static int once;
-+
-+ if (!once++)
-+ r8a7790_sysc_init();
-+}
---
-2.1.2
-
diff --git a/patches.renesas/0334-ARM-shmobile-r8a7790-CA7-SCU-enablement.patch b/patches.renesas/0334-ARM-shmobile-r8a7790-CA7-SCU-enablement.patch
deleted file mode 100644
index b15f006aa4869..0000000000000
--- a/patches.renesas/0334-ARM-shmobile-r8a7790-CA7-SCU-enablement.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 7bdfec29a54d500109eadaed76ccef43564aee2e Mon Sep 17 00:00:00 2001
-From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Date: Wed, 15 Jan 2014 21:26:04 +0900
-Subject: ARM: shmobile: r8a7790 CA7-SCU enablement
-
-Power on CA7 SCU in case of booting from a CA15 core.
-
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-[damm@opensource.se: Converted to use broken out SYSC code]
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 0445ded61aac0c1a6f43b4be1a2ca2ca47b77eb8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/smp-r8a7790.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index 015e2753de1f..beb47ae9d05a 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -19,6 +19,8 @@
- #include <linux/io.h>
- #include <asm/smp_plat.h>
- #include <mach/common.h>
-+#include <mach/pm-rcar.h>
-+#include <mach/r8a7790.h>
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
-@@ -27,6 +29,11 @@
- #define CA7RESCNT 0x0044
- #define MERAM 0xe8080000
-
-+static struct rcar_sysc_ch r8a7790_ca7_scu = {
-+ .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
-+ .isr_bit = 21, /* CA7-SCU */
-+};
-+
- static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
- {
- void __iomem *p;
-@@ -54,6 +61,10 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
- writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000,
- p + CA7RESCNT);
- iounmap(p);
-+
-+ /* turn on power to SCU */
-+ r8a7790_pm_init();
-+ rcar_sysc_power_up(&r8a7790_ca7_scu);
- }
-
- struct smp_operations r8a7790_smp_ops __initdata = {
---
-2.1.2
-
diff --git a/patches.renesas/0335-ARM-shmobile-r8a7790-CA15-SCU-enablement.patch b/patches.renesas/0335-ARM-shmobile-r8a7790-CA15-SCU-enablement.patch
deleted file mode 100644
index 52b1ad0c5f74f..0000000000000
--- a/patches.renesas/0335-ARM-shmobile-r8a7790-CA15-SCU-enablement.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 5ca09bd090c714057b5ca0dde536f296750d40b1 Mon Sep 17 00:00:00 2001
-From: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-Date: Wed, 15 Jan 2014 21:26:13 +0900
-Subject: ARM: shmobile: r8a7790 CA15-SCU enablement
-
-Power on CA15 SCU in case of booting from a CA7 core.
-
-Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-[damm@opensource.se: Converted to use broken out SYSC code]
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit c2c97ec513b503b9e0d28ffd98d54c9e9bf3ea3e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/smp-r8a7790.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index beb47ae9d05a..591052799e8f 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -29,6 +29,11 @@
- #define CA7RESCNT 0x0044
- #define MERAM 0xe8080000
-
-+static struct rcar_sysc_ch r8a7790_ca15_scu = {
-+ .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */
-+ .isr_bit = 12, /* CA15-SCU */
-+};
-+
- static struct rcar_sysc_ch r8a7790_ca7_scu = {
- .chan_offs = 0x100, /* PWRSR3 .. PWRER3 */
- .isr_bit = 21, /* CA7-SCU */
-@@ -64,6 +69,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
-
- /* turn on power to SCU */
- r8a7790_pm_init();
-+ rcar_sysc_power_up(&r8a7790_ca15_scu);
- rcar_sysc_power_up(&r8a7790_ca7_scu);
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0336-ARM-shmobile-Remove-__init-from-rcar_gen2_read_mode_.patch b/patches.renesas/0336-ARM-shmobile-Remove-__init-from-rcar_gen2_read_mode_.patch
deleted file mode 100644
index f21551f6727bf..0000000000000
--- a/patches.renesas/0336-ARM-shmobile-Remove-__init-from-rcar_gen2_read_mode_.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From aedd3e4430266d9fb49b55a9848fd858edd6e973 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 17 Feb 2014 15:35:10 +0900
-Subject: ARM: shmobile: Remove __init from rcar_gen2_read_mode_pins()
-
-Remove __init from rcar_gen2_read_mode_pins() to allow
-it to be used after boot. For instance the R-Car Gen2
-MD21 check is needed even in the case of CPU Hotplug.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e7509f6eca10cff3933f8a71f4ca9d8be8447ec3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index 69ccc6c6fd33..10604480f325 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -28,7 +28,7 @@
-
- #define MODEMR 0xe6160060
-
--u32 __init rcar_gen2_read_mode_pins(void)
-+u32 rcar_gen2_read_mode_pins(void)
- {
- void __iomem *modemr = ioremap_nocache(MODEMR, 4);
- u32 mode;
---
-2.1.2
-
diff --git a/patches.renesas/0337-ARM-shmobile-r8a7791-Remove-legacy-clock-aliases-for.patch b/patches.renesas/0337-ARM-shmobile-r8a7791-Remove-legacy-clock-aliases-for.patch
deleted file mode 100644
index 67707b0e955e7..0000000000000
--- a/patches.renesas/0337-ARM-shmobile-r8a7791-Remove-legacy-clock-aliases-for.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 125bf198453551d0f815fafd20997a8eda5b2d6a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 19 Feb 2014 18:03:31 +0100
-Subject: ARM: shmobile: r8a7791: Remove legacy clock aliases for DT devices
-
-Now that the r8a7791 DT platforms use the common clock framework,
-there's no need to manually create clock aliases for devices
-instantiated through DT, as those devices will reference their clocks
-directly in the device tree. Remove those aliases.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a8a8266229787241e1dfdb075a416e31da2fa1d7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 3e1b6b699184..605fc778e3e2 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -267,7 +267,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
-- CLKDEV_DEV_ID("e61f0000.thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.1", &mstp_clks[MSTP930]),
---
-2.1.2
-
diff --git a/patches.renesas/0338-ARM-shmobile-r8a7790-add-sound-SCU-clock-support.patch b/patches.renesas/0338-ARM-shmobile-r8a7790-add-sound-SCU-clock-support.patch
deleted file mode 100644
index 5a4f185de21be..0000000000000
--- a/patches.renesas/0338-ARM-shmobile-r8a7790-add-sound-SCU-clock-support.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From b88b79286044958e4bef2c67d77eba91a741d395 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 18 Feb 2014 19:28:11 -0800
-Subject: ARM: shmobile: r8a7790: add sound SCU clock support
-
-This is needed to use SRC (= Sampling Rate Converter).
-MSTP1017 is defined top of MSTPxxx list to avoid runtime error,
-since it is parent clock of MSTP1031 - MSTP1022
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9ced1d47719b5f32e4231338dd362c136518ed08)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 02b940361a66..3f93503f5b96 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -204,6 +204,10 @@ static struct clk div6_clks[DIV6_NR] = {
-
- /* MSTP */
- enum {
-+ MSTP1017, /* parent of SCU */
-+
-+ MSTP1031, MSTP1030,
-+ MSTP1029, MSTP1028, MSTP1027, MSTP1026, MSTP1025, MSTP1024, MSTP1023, MSTP1022,
- MSTP1015, MSTP1014, MSTP1013, MSTP1012, MSTP1011, MSTP1010,
- MSTP1009, MSTP1008, MSTP1007, MSTP1006, MSTP1005,
- MSTP931, MSTP930, MSTP929, MSTP928,
-@@ -223,6 +227,17 @@ enum {
- };
-
- static struct clk mstp_clks[MSTP_NR] = {
-+ [MSTP1031] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 31, MSTPSR10, 0), /* SCU0 */
-+ [MSTP1030] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 30, MSTPSR10, 0), /* SCU1 */
-+ [MSTP1029] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 29, MSTPSR10, 0), /* SCU2 */
-+ [MSTP1028] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 28, MSTPSR10, 0), /* SCU3 */
-+ [MSTP1027] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 27, MSTPSR10, 0), /* SCU4 */
-+ [MSTP1026] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 26, MSTPSR10, 0), /* SCU5 */
-+ [MSTP1025] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 25, MSTPSR10, 0), /* SCU6 */
-+ [MSTP1024] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 24, MSTPSR10, 0), /* SCU7 */
-+ [MSTP1023] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 23, MSTPSR10, 0), /* SCU8 */
-+ [MSTP1022] = SH_CLK_MSTP32_STS(&mstp_clks[MSTP1017], SMSTPCR10, 22, MSTPSR10, 0), /* SCU9 */
-+ [MSTP1017] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 17, MSTPSR10, 0), /* SCU */
- [MSTP1015] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 15, MSTPSR10, 0), /* SSI0 */
- [MSTP1014] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 14, MSTPSR10, 0), /* SSI1 */
- [MSTP1013] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 13, MSTPSR10, 0), /* SSI2 */
-@@ -366,6 +381,16 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b),
- CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c),
- CLKDEV_ICK_ID("clk_i", "rcar_sound", &m2_clk),
-+ CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP1031]),
-+ CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP1030]),
-+ CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP1029]),
-+ CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP1028]),
-+ CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP1027]),
-+ CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP1026]),
-+ CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP1025]),
-+ CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP1024]),
-+ CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP1023]),
-+ CLKDEV_ICK_ID("scu.9", "rcar_sound", &mstp_clks[MSTP1022]),
- CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]),
- CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]),
- CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]),
---
-2.1.2
-
diff --git a/patches.renesas/0339-ARM-shmobile-r8a7790-add-Ether-DT-support.patch b/patches.renesas/0339-ARM-shmobile-r8a7790-add-Ether-DT-support.patch
deleted file mode 100644
index 87768ee6cc853..0000000000000
--- a/patches.renesas/0339-ARM-shmobile-r8a7790-add-Ether-DT-support.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 22f2fef23ccc45528a408d46132f2a6ad5d0a4e5 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Thu, 20 Feb 2014 02:20:43 +0300
-Subject: ARM: shmobile: r8a7790: add Ether DT support
-
-Define the generic R8A7790 part of the Ether device node.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d8913c6799ed776d096a7f41d83afce815f93819)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index a1e7c396afea..618e5b537eaf 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -1,7 +1,8 @@
- /*
- * Device Tree Source for the r8a7790 SoC
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Cogent Embedded Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
-@@ -379,6 +380,17 @@
- status = "disabled";
- };
-
-+ ether: ethernet@ee700000 {
-+ compatible = "renesas,ether-r8a7790";
-+ reg = <0 0xee700000 0 0x400>;
-+ interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7790_CLK_ETHER>;
-+ phy-mode = "rmii";
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
- sata0: sata@ee300000 {
- compatible = "renesas,sata-r8a7790";
- reg = <0 0xee300000 0 0x2000>;
---
-2.1.2
-
diff --git a/patches.renesas/0340-ARM-shmobile-lager-add-Ether-DT-support.patch b/patches.renesas/0340-ARM-shmobile-lager-add-Ether-DT-support.patch
deleted file mode 100644
index 7ab5fcf3aaa88..0000000000000
--- a/patches.renesas/0340-ARM-shmobile-lager-add-Ether-DT-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 6d5ca6f50c85b552b25716b1afdf200cd6d28049 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Thu, 20 Feb 2014 02:22:31 +0300
-Subject: ARM: shmobile: lager: add Ether DT support
-
-Define the Lager board dependent part of the Ether device node.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit da4ea9514df42f69ec42a098142aaeac8c101da5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 28 +++++++++++++++++++++++++++-
- 1 file changed, 27 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 26a90106e96c..6e99eb2df076 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -1,7 +1,8 @@
- /*
- * Device Tree Source for the Lager board
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Cogent Embedded, Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
-@@ -124,6 +125,16 @@
- renesas,function = "scif0";
- };
-
-+ ether_pins: ether {
-+ renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
-+ renesas,function = "eth";
-+ };
-+
-+ phy1_pins: phy1 {
-+ renesas,groups = "intc_irq0";
-+ renesas,function = "intc";
-+ };
-+
- scif1_pins: serial1 {
- renesas,groups = "scif1_data";
- renesas,function = "scif1";
-@@ -150,6 +161,21 @@
- };
- };
-
-+&ether {
-+ pinctrl-0 = <&ether_pins &phy1_pins>;
-+ pinctrl-names = "default";
-+
-+ phy-handle = <&phy1>;
-+ renesas,ether-link-active-low;
-+ status = "ok";
-+
-+ phy1: ethernet-phy@1 {
-+ reg = <1>;
-+ interrupt-parent = <&irqc0>;
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ };
-+};
-+
- &mmcif1 {
- pinctrl-0 = <&mmc1_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0341-ARM-shmobile-r8a7791-add-Ether-DT-support.patch b/patches.renesas/0341-ARM-shmobile-r8a7791-add-Ether-DT-support.patch
deleted file mode 100644
index 860beeb82fcec..0000000000000
--- a/patches.renesas/0341-ARM-shmobile-r8a7791-add-Ether-DT-support.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 764fecfc8a510ae491aaf92b62e28113281739e4 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Thu, 20 Feb 2014 02:27:04 +0300
-Subject: ARM: shmobile: r8a7791: add Ether DT support
-
-Define the generic R8A7791 part of the Ether device node.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2e5d55ce8910afe136e0f4aa6ada6932e949c1ff)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 14 +++++++++++++-
- 1 file changed, 13 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 1ab4f3d5a8c2..45c369d7f387 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -2,7 +2,8 @@
- * Device Tree Source for the r8a7791 SoC
- *
- * Copyright (C) 2013 Renesas Electronics Corporation
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Cogent Embedded Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
-@@ -407,6 +408,17 @@
- status = "disabled";
- };
-
-+ ether: ethernet@ee700000 {
-+ compatible = "renesas,ether-r8a7791";
-+ reg = <0 0xee700000 0 0x400>;
-+ interrupts = <0 162 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp8_clks R8A7791_CLK_ETHER>;
-+ phy-mode = "rmii";
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
- sata0: sata@ee300000 {
- compatible = "renesas,sata-r8a7791";
- reg = <0 0xee300000 0 0x2000>;
---
-2.1.2
-
diff --git a/patches.renesas/0342-ARM-shmobile-koelsch-add-Ether-DT-support.patch b/patches.renesas/0342-ARM-shmobile-koelsch-add-Ether-DT-support.patch
deleted file mode 100644
index 788930a84dc5e..0000000000000
--- a/patches.renesas/0342-ARM-shmobile-koelsch-add-Ether-DT-support.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From b52de14cd56f6ff1f78cc42bef4fae4636bac043 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Thu, 20 Feb 2014 02:28:59 +0300
-Subject: ARM: shmobile: koelsch: add Ether DT support
-
-Define the Koelsch board dependent part of the Ether device node.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 08e8f0f35522bad37556a80c6df0578374f5091c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 28 +++++++++++++++++++++++++++-
- 1 file changed, 27 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index bf6ba0c7faa0..603af8caae5b 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -2,7 +2,8 @@
- * Device Tree Source for the Koelsch board
- *
- * Copyright (C) 2013 Renesas Electronics Corporation
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-2014 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Cogent Embedded, Inc.
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
-@@ -146,12 +147,37 @@
- renesas,function = "scif1";
- };
-
-+ ether_pins: ether {
-+ renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
-+ renesas,function = "eth";
-+ };
-+
-+ phy1_pins: phy1 {
-+ renesas,groups = "intc_irq0";
-+ renesas,function = "intc";
-+ };
-+
- qspi_pins: spi {
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
- };
- };
-
-+&ether {
-+ pinctrl-0 = <&ether_pins &phy1_pins>;
-+ pinctrl-names = "default";
-+
-+ phy-handle = <&phy1>;
-+ renesas,ether-link-active-low;
-+ status = "ok";
-+
-+ phy1: ethernet-phy@1 {
-+ reg = <1>;
-+ interrupt-parent = <&irqc0>;
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ };
-+};
-+
- &sata0 {
- status = "okay";
- };
---
-2.1.2
-
diff --git a/patches.renesas/0343-ARM-shmobile-r8a7791-fix-clock-index-for-i2c5.patch b/patches.renesas/0343-ARM-shmobile-r8a7791-fix-clock-index-for-i2c5.patch
deleted file mode 100644
index ce92a1a26bb98..0000000000000
--- a/patches.renesas/0343-ARM-shmobile-r8a7791-fix-clock-index-for-i2c5.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8bedc6934924ece66150bdc15db659ca7fc0a6ea Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Wed, 19 Feb 2014 22:06:55 +0100
-Subject: ARM: shmobile: r8a7791: fix clock index for i2c5
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1f662dde5c287c33da84d4aaaec8a75f2aab8ee7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 45c369d7f387..08527340c527 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -743,7 +743,7 @@
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD
-- R8A7791_CLK_I2C4 R8A7791_CLK_I2C4 R8A7791_CLK_I2C3
-+ R8A7791_CLK_I2C5 R8A7791_CLK_I2C4 R8A7791_CLK_I2C3
- R8A7791_CLK_I2C2 R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
- >;
- clock-output-names =
---
-2.1.2
-
diff --git a/patches.renesas/0344-ARM-shmobile-r8a7791-dtsi-Fix-typo-in-msiof2-clock-o.patch b/patches.renesas/0344-ARM-shmobile-r8a7791-dtsi-Fix-typo-in-msiof2-clock-o.patch
deleted file mode 100644
index 272632621d2cd..0000000000000
--- a/patches.renesas/0344-ARM-shmobile-r8a7791-dtsi-Fix-typo-in-msiof2-clock-o.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 9e030678c4ca0151cf0c42bc0a826639193a913a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 20 Feb 2014 15:49:29 +0100
-Subject: ARM: shmobile: r8a7791 dtsi: Fix typo in msiof2 clock output name
-
-Introduced in commit cded80f869aef94853e056ab9c21e305b0c26138 ("ARM:
-shmobile: r8a7791: Add MSIOF clocks in device tree").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 0c002ef8caeff728d4015082cbe998cfdd57f1e0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 08527340c527..cde7bc486f22 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -679,7 +679,7 @@
- R8A7791_CLK_MSIOF1 R8A7791_CLK_SCIFB2
- >;
- clock-output-names =
-- "scifa2", "scifa1", "scifa0", "misof2", "scifb0",
-+ "scifa2", "scifa1", "scifa0", "msiof2", "scifb0",
- "scifb1", "msiof1", "scifb2";
- };
- mstp3_clks: mstp3_clks@e615013c {
---
-2.1.2
-
diff --git a/patches.renesas/0345-ARM-shmobile-Move-SYSC-base-variable-to-inside-ifdef.patch b/patches.renesas/0345-ARM-shmobile-Move-SYSC-base-variable-to-inside-ifdef.patch
deleted file mode 100644
index b2eb2def9aeaf..0000000000000
--- a/patches.renesas/0345-ARM-shmobile-Move-SYSC-base-variable-to-inside-ifdef.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d15c15edfc4c2388e394708594359f14323d24c2 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 24 Feb 2014 14:52:12 +0900
-Subject: ARM: shmobile: Move SYSC base variable to inside ifdefs
-
-Move the rcar_sysc_base variable to inside #ifdefs to avoid
-triggering build warnings in case PM or SMP is not selected.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c4ca5d80e03559fd95c526ece5ce39fc732a2511)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/pm-rcar.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c
-index 17225db09558..1f465a12d1b1 100644
---- a/arch/arm/mach-shmobile/pm-rcar.c
-+++ b/arch/arm/mach-shmobile/pm-rcar.c
-@@ -15,8 +15,6 @@
- #include <asm/io.h>
- #include <mach/pm-rcar.h>
-
--static void __iomem *rcar_sysc_base;
--
- /* SYSC */
- #define SYSCSR 0x00
- #define SYSCISR 0x04
-@@ -35,6 +33,7 @@ static void __iomem *rcar_sysc_base;
-
- #if defined(CONFIG_PM) || defined(CONFIG_SMP)
-
-+static void __iomem *rcar_sysc_base;
- static DEFINE_SPINLOCK(rcar_sysc_lock); /* SMP CPUs + I/O devices */
-
- static int rcar_sysc_pwr_on_off(struct rcar_sysc_ch *sysc_ch,
---
-2.1.2
-
diff --git a/patches.renesas/0346-ARM-shmobile-Add-SDHI-devices-to-r8a7791-DTSI.patch b/patches.renesas/0346-ARM-shmobile-Add-SDHI-devices-to-r8a7791-DTSI.patch
deleted file mode 100644
index fa61983067ec8..0000000000000
--- a/patches.renesas/0346-ARM-shmobile-Add-SDHI-devices-to-r8a7791-DTSI.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From c8c42cbf2f0f434550ab00b54267175a7377afa4 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 12 Feb 2014 18:53:55 +0900
-Subject: ARM: shmobile: Add SDHI devices to r8a7791 DTSI
-
-Add SDHI0, SDHI1 and SDHI2 to the r8a7791 DTSI.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b7ed8a0dd4f1d41464c3ab050c3688c4a7fc15b3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 27 +++++++++++++++++++++++++++
- 1 file changed, 27 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index cde7bc486f22..46181708e59c 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -246,6 +246,33 @@
- #gpio-range-cells = <3>;
- };
-
-+ sdhi0: sd@ee100000 {
-+ compatible = "renesas,sdhi-r8a7791";
-+ reg = <0 0xee100000 0 0x200>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7791_CLK_SDHI0>;
-+ status = "disabled";
-+ };
-+
-+ sdhi1: sd@ee140000 {
-+ compatible = "renesas,sdhi-r8a7791";
-+ reg = <0 0xee140000 0 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7791_CLK_SDHI1>;
-+ status = "disabled";
-+ };
-+
-+ sdhi2: sd@ee160000 {
-+ compatible = "renesas,sdhi-r8a7791";
-+ reg = <0 0xee160000 0 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7791_CLK_SDHI2>;
-+ status = "disabled";
-+ };
-+
- scifa0: serial@e6c40000 {
- compatible = "renesas,scifa-r8a7791", "renesas,scifa";
- reg = <0 0xe6c40000 0 64>;
---
-2.1.2
-
diff --git a/patches.renesas/0347-ARM-shmobile-Add-SDHI-devices-for-Koelsch-DTS.patch b/patches.renesas/0347-ARM-shmobile-Add-SDHI-devices-for-Koelsch-DTS.patch
deleted file mode 100644
index 86c34a412e178..0000000000000
--- a/patches.renesas/0347-ARM-shmobile-Add-SDHI-devices-for-Koelsch-DTS.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From a20acb03d1dbae2be6ba225493cca43f005995f9 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 12 Feb 2014 18:54:04 +0900
-Subject: ARM: shmobile: Add SDHI devices for Koelsch DTS
-
-Add DT support for SDHI0, SDHI1 and SDHI2 on Koelsch.
-
-The board specific handling of CD and WP pins are
-using GPIOs. SDHI0 and SDHI1 are hooked up to regular
-SD connectors while SDHI2 is using micro-SD which
-is lacking WP signal.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2c60a7df72711fb8b4be1e6aa651ab166a8931bc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 119 ++++++++++++++++++++++++++++++++++
- 1 file changed, 119 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 603af8caae5b..bdd73e6657b2 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -103,6 +103,78 @@
- gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
- };
- };
-+
-+ vcc_sdhi0: regulator@0 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI0 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
-+ enable-active-high;
-+ };
-+
-+ vccq_sdhi0: regulator@1 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI0 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
-+
-+ vcc_sdhi1: regulator@2 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI1 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
-+ enable-active-high;
-+ };
-+
-+ vccq_sdhi1: regulator@3 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI1 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
-+
-+ vcc_sdhi2: regulator@4 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI2 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
-+ enable-active-high;
-+ };
-+
-+ vccq_sdhi2: regulator@5 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI2 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
- };
-
- &extal_clk {
-@@ -157,6 +229,21 @@
- renesas,function = "intc";
- };
-
-+ sdhi0_pins: sd0 {
-+ renesas,gpios = "sdhi0_data4", "sdhi0_ctrl";
-+ renesas,function = "sdhi0";
-+ };
-+
-+ sdhi1_pins: sd1 {
-+ renesas,gpios = "sdhi1_data4", "sdhi1_ctrl";
-+ renesas,function = "sdhi1";
-+ };
-+
-+ sdhi2_pins: sd2 {
-+ renesas,gpios = "sdhi2_data4", "sdhi2_ctrl";
-+ renesas,function = "sdhi2";
-+ };
-+
- qspi_pins: spi {
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
-@@ -182,6 +269,38 @@
- status = "okay";
- };
-
-+&sdhi0 {
-+ pinctrl-0 = <&sdhi0_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi0>;
-+ vqmmc-supply = <&vccq_sdhi0>;
-+ cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
-+ wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
-+ status = "okay";
-+};
-+
-+&sdhi1 {
-+ pinctrl-0 = <&sdhi1_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi1>;
-+ vqmmc-supply = <&vccq_sdhi1>;
-+ cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
-+ wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
-+ status = "okay";
-+};
-+
-+&sdhi2 {
-+ pinctrl-0 = <&sdhi2_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi2>;
-+ vqmmc-supply = <&vccq_sdhi2>;
-+ cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
-+ status = "okay";
-+};
-+
- &spi {
- pinctrl-0 = <&qspi_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0348-ARM-shmobile-APMU-Fix-warnings-due-to-improper-print.patch b/patches.renesas/0348-ARM-shmobile-APMU-Fix-warnings-due-to-improper-print.patch
deleted file mode 100644
index 45a34cab13b79..0000000000000
--- a/patches.renesas/0348-ARM-shmobile-APMU-Fix-warnings-due-to-improper-print.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From bbb1537a1989f9b47449fa0c2757198bb7af2dd1 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 19:11:15 +0100
-Subject: ARM: shmobile: APMU: Fix warnings due to improper printk formats
-
-Use the %pr printk specifier to print resource variables. This fixes
-warnings on platforms where resource_size_t has a different size than
-int.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 56ff873122c4baab43df241c7701d043b8ec8a8e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/platsmp-apmu.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index 1da5a72d9642..8cb641c00fdb 100644
---- a/arch/arm/mach-shmobile/platsmp-apmu.c
-+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
-@@ -75,8 +75,7 @@ static void apmu_init_cpu(struct resource *res, int cpu, int bit)
- apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res));
- apmu_cpus[cpu].bit = bit;
-
-- pr_debug("apmu ioremap %d %d 0x%08x 0x%08x\n", cpu, bit,
-- res->start, resource_size(res));
-+ pr_debug("apmu ioremap %d %d %pr\n", cpu, bit, res);
- }
-
- static struct {
---
-2.1.2
-
diff --git a/patches.renesas/0349-ARM-shmobile-r7s72100-fix-bus-clock-calculation.patch b/patches.renesas/0349-ARM-shmobile-r7s72100-fix-bus-clock-calculation.patch
deleted file mode 100644
index 25804d04801f1..0000000000000
--- a/patches.renesas/0349-ARM-shmobile-r7s72100-fix-bus-clock-calculation.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 6be7abb595447186a90679305f19a1cc0008cacd Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Fri, 28 Feb 2014 10:32:55 +0100
-Subject: ARM: shmobile: r7s72100: fix bus clock calculation
-
-The picture in the datasheet is a little misleading, yet the divider of
-the bus_clk is 1/3 and not 2/3.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d93023f81d2c79595e64e4f516f03af4e4c73c13)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index f17a5db00221..bee0073c9b64 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -70,7 +70,7 @@ static struct clk pll_clk = {
-
- static unsigned long bus_recalc(struct clk *clk)
- {
-- return clk->parent->rate * 2 / 3;
-+ return clk->parent->rate / 3;
- }
-
- static struct sh_clk_ops bus_clk_ops = {
---
-2.1.2
-
diff --git a/patches.renesas/0350-ARM-shmobile-Remove-CMT-TMU-and-STI-Kconfig-entries.patch b/patches.renesas/0350-ARM-shmobile-Remove-CMT-TMU-and-STI-Kconfig-entries.patch
deleted file mode 100644
index 0bf77eeb7db65..0000000000000
--- a/patches.renesas/0350-ARM-shmobile-Remove-CMT-TMU-and-STI-Kconfig-entries.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From fc208b7c7b43a0ba3a698ee5eb2bf6260ebbf498 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 20 Feb 2014 12:54:46 +0100
-Subject: ARM: shmobile: Remove CMT, TMU and STI Kconfig entries
-
-Now when drivers/clocksource/Kconfig has been
-updated with entires for CMT, TMU, MTU2, and STI
-it is safe to remove these from mach-shmobile.
-
-Also select timers per SoC via SYS_SUPPORTS_xxx.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: John Stultz <john.stultz@linaro.org>
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-(cherry picked from commit aeb8fb7910fc7344d0ee0c9306eb45f11327c600)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/mach-shmobile/Kconfig
----
- arch/arm/mach-shmobile/Kconfig | 36 ++++++++++++++++++------------------
- 1 file changed, 18 insertions(+), 18 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 08ec4ffc17ee..e265630dfff1 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -20,17 +20,21 @@ comment "Renesas ARM SoCs System Type"
-
- config ARCH_EMEV2
- bool "Emma Mobile EV2"
-+ select SYS_SUPPORTS_EM_STI
-
- config ARCH_R7S72100
- bool "RZ/A1H (R7S72100)"
-+ select SYS_SUPPORTS_SH_MTU2
-
- config ARCH_R8A7790
- bool "R-Car H2 (R8A77900)"
- select RENESAS_IRQC
-+ select SYS_SUPPORTS_SH_CMT
-
- config ARCH_R8A7791
- bool "R-Car M2 (R8A77910)"
- select RENESAS_IRQC
-+ select SYS_SUPPORTS_SH_CMT
-
- comment "Renesas ARM SoCs Board Type"
-
-@@ -61,6 +65,8 @@ config ARCH_SH7372
- select ARM_CPU_SUSPEND if PM || CPU_IDLE
- select CPU_V7
- select SH_CLK_CPG
-+ select SYS_SUPPORTS_SH_CMT
-+ select SYS_SUPPORTS_SH_TMU
-
- config ARCH_SH73A0
- bool "SH-Mobile AG5 (R8A73A00)"
-@@ -70,6 +76,8 @@ config ARCH_SH73A0
- select I2C
- select SH_CLK_CPG
- select RENESAS_INTC_IRQPIN
-+ select SYS_SUPPORTS_SH_CMT
-+ select SYS_SUPPORTS_SH_TMU
-
- config ARCH_R8A73A4
- bool "R-Mobile APE6 (R8A73A40)"
-@@ -80,6 +88,8 @@ config ARCH_R8A73A4
- select RENESAS_IRQC
- select ARCH_HAS_CPUFREQ
- select ARCH_HAS_OPP
-+ select SYS_SUPPORTS_SH_CMT
-+ select SYS_SUPPORTS_SH_TMU
-
- config ARCH_R8A7740
- bool "R-Mobile A1 (R8A77400)"
-@@ -88,6 +98,8 @@ config ARCH_R8A7740
- select CPU_V7
- select SH_CLK_CPG
- select RENESAS_INTC_IRQPIN
-+ select SYS_SUPPORTS_SH_CMT
-+ select SYS_SUPPORTS_SH_TMU
-
- config ARCH_R8A7778
- bool "R-Car M1A (R8A77781)"
-@@ -95,6 +107,7 @@ config ARCH_R8A7778
- select CPU_V7
- select SH_CLK_CPG
- select ARM_GIC
-+ select SYS_SUPPORTS_SH_TMU
-
- config ARCH_R8A7779
- bool "R-Car H1 (R8A77790)"
-@@ -103,6 +116,7 @@ config ARCH_R8A7779
- select CPU_V7
- select SH_CLK_CPG
- select RENESAS_INTC_IRQPIN
-+ select SYS_SUPPORTS_SH_TMU
-
- config ARCH_R8A7790
- bool "R-Car H2 (R8A77900)"
-@@ -113,6 +127,7 @@ config ARCH_R8A7790
- select SH_CLK_CPG
- select RENESAS_IRQC
- select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-+ select SYS_SUPPORTS_SH_CMT
-
- config ARCH_R8A7791
- bool "R-Car M2 (R8A77910)"
-@@ -123,6 +138,7 @@ config ARCH_R8A7791
- select SH_CLK_CPG
- select RENESAS_IRQC
- select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-+ select SYS_SUPPORTS_SH_CMT
-
- config ARCH_EMEV2
- bool "Emma Mobile EV2"
-@@ -132,6 +148,7 @@ config ARCH_EMEV2
- select MIGHT_HAVE_PCI
- select USE_OF
- select AUTO_ZRELADDR
-+ select SYS_SUPPORTS_EM_STI
-
- config ARCH_R7S72100
- bool "RZ/A1H (R7S72100)"
-@@ -139,6 +156,7 @@ config ARCH_R7S72100
- select ARM_GIC
- select CPU_V7
- select SH_CLK_CPG
-+ select SYS_SUPPORTS_SH_MTU2
-
- comment "Renesas ARM SoCs Board Type"
-
-@@ -319,24 +337,6 @@ config SHMOBILE_TIMER_HZ
- want to select a HZ value such as 128 that can evenly divide RCLK.
- A HZ value that does not divide evenly may cause timer drift.
-
--config SH_TIMER_CMT
-- bool "CMT timer driver"
-- default y
-- help
-- This enables build of the CMT timer driver.
--
--config SH_TIMER_TMU
-- bool "TMU timer driver"
-- default y
-- help
-- This enables build of the TMU timer driver.
--
--config EM_TIMER_STI
-- bool "STI timer driver"
-- default y
-- help
-- This enables build of the STI timer driver.
--
- endmenu
-
- endif
---
-2.1.2
-
diff --git a/patches.renesas/0351-ARM-shmobile-r8a7791-Fix-SCIFA3-5-clocks.patch b/patches.renesas/0351-ARM-shmobile-r8a7791-Fix-SCIFA3-5-clocks.patch
deleted file mode 100644
index 92128cd912e08..0000000000000
--- a/patches.renesas/0351-ARM-shmobile-r8a7791-Fix-SCIFA3-5-clocks.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From d8b3a174892d2e8bbc1dfe1da89c4b0dfbeb3422 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Wed, 12 Mar 2014 19:40:39 +0100
-Subject: ARM: shmobile: r8a7791: Fix SCIFA3-5 clocks
-
-The MSTP clocks for SCIFA3-5 are MSTP1106-1108, not MSTP1105-1107
-
-Also reinsert them at the correct position to preserve sort order.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a51a9d67ba061c1263d078c27e8a3020d61fe236)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 605fc778e3e2..701383fe3267 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -170,6 +170,7 @@ static struct clk div6_clks[DIV6_NR] = {
-
- /* MSTP */
- enum {
-+ MSTP1108, MSTP1107, MSTP1106,
- MSTP931, MSTP930, MSTP929, MSTP928, MSTP927, MSTP925,
- MSTP917,
- MSTP815, MSTP814,
-@@ -180,12 +181,15 @@ enum {
- MSTP522,
- MSTP314, MSTP312, MSTP311,
- MSTP216, MSTP207, MSTP206,
-- MSTP204, MSTP203, MSTP202, MSTP1105, MSTP1106, MSTP1107,
-+ MSTP204, MSTP203, MSTP202,
- MSTP124,
- MSTP_NR
- };
-
- static struct clk mstp_clks[MSTP_NR] = {
-+ [MSTP1108] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 8, MSTPSR11, 0), /* SCIFA5 */
-+ [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA4 */
-+ [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA3 */
- [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
- [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
- [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-@@ -218,9 +222,6 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP204] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 4, MSTPSR2, 0), /* SCIFA0 */
- [MSTP203] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 3, MSTPSR2, 0), /* SCIFA1 */
- [MSTP202] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR2, 2, MSTPSR2, 0), /* SCIFA2 */
-- [MSTP1105] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 5, MSTPSR11, 0), /* SCIFA3 */
-- [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA4 */
-- [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA5 */
- [MSTP124] = SH_CLK_MSTP32_STS(&rclk_clk, SMSTPCR1, 24, MSTPSR1, 0), /* CMT0 */
- };
-
-@@ -259,9 +260,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.9", &mstp_clks[MSTP718]), /* SCIF3 */
- CLKDEV_DEV_ID("sh-sci.10", &mstp_clks[MSTP715]), /* SCIF4 */
- CLKDEV_DEV_ID("sh-sci.11", &mstp_clks[MSTP714]), /* SCIF5 */
-- CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1105]), /* SCIFA3 */
-- CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1106]), /* SCIFA4 */
-- CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1107]), /* SCIFA5 */
-+ CLKDEV_DEV_ID("sh-sci.12", &mstp_clks[MSTP1106]), /* SCIFA3 */
-+ CLKDEV_DEV_ID("sh-sci.13", &mstp_clks[MSTP1107]), /* SCIFA4 */
-+ CLKDEV_DEV_ID("sh-sci.14", &mstp_clks[MSTP1108]), /* SCIFA5 */
- CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
---
-2.1.2
-
diff --git a/patches.renesas/0352-ASoC-fsi-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch b/patches.renesas/0352-ASoC-fsi-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
deleted file mode 100644
index ec3c1190f24c5..0000000000000
--- a/patches.renesas/0352-ASoC-fsi-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
+++ /dev/null
@@ -1,154 +0,0 @@
-From 7326ad36b9cd5c1bbe383fb59f398cee42d76d07 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 13 Mar 2014 17:56:25 -0700
-Subject: ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags
-
-SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
-Then, FSI will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
-
-This patch fixup platform settings too.
-Then, it tidyups SND_SOC_DAIFMT_INV settings.
-
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c7a507eea1db1430476289f525f9c853d5d485e8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +---
- arch/arm/mach-shmobile/board-kzm9g.c | 4 +---
- arch/arm/mach-shmobile/board-mackerel.c | 6 ++----
- arch/sh/boards/mach-ecovec24/setup.c | 4 +---
- arch/sh/boards/mach-se/7724/setup.c | 4 +---
- sound/soc/sh/fsi.c | 2 +-
- 6 files changed, 7 insertions(+), 17 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 4da3da7be3fa..2858f380beae 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -990,14 +990,12 @@ static struct asoc_simple_card_info fsi_wm8978_info = {
- .card = "FSI2A-WM8978",
- .codec = "wm8978.0-001a",
- .platform = "sh_fsi2",
-- .daifmt = SND_SOC_DAIFMT_I2S,
-+ .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "fsia-dai",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
- },
- .codec_dai = {
- .name = "wm8978-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_NB_NF,
- .sysclk = 12288000,
- },
- };
-diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
-index bc40b853ffd3..03dc3ac84502 100644
---- a/arch/arm/mach-shmobile/board-kzm9g.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g.c
-@@ -589,14 +589,12 @@ static struct asoc_simple_card_info fsi2_ak4648_info = {
- .card = "FSI2A-AK4648",
- .codec = "ak4642-codec.0-0012",
- .platform = "sh_fsi2",
-- .daifmt = SND_SOC_DAIFMT_LEFT_J,
-+ .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "fsia-dai",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS,
- },
- .codec_dai = {
- .name = "ak4642-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
- .sysclk = 11289600,
- },
- };
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 3aba0372f630..8c4332182b42 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -509,9 +509,9 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
- .card = "FSI2B-HDMI",
- .codec = "sh-mobile-hdmi",
- .platform = "sh_fsi2",
-+ .fmt = SND_SOC_DAIFMT_CBS_CFS,
- .cpu_dai = {
- .name = "fsib-dai",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM | SND_SOC_DAIFMT_IB_NF,
- },
- .codec_dai = {
- .name = "sh_mobile_hdmi-hifi",
-@@ -905,14 +905,12 @@ static struct asoc_simple_card_info fsi2_ak4643_info = {
- .card = "FSI2A-AK4643",
- .codec = "ak4642-codec.0-0013",
- .platform = "sh_fsi2",
-- .daifmt = SND_SOC_DAIFMT_LEFT_J,
-+ .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "fsia-dai",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS,
- },
- .codec_dai = {
- .name = "ak4642-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
- .sysclk = 11289600,
- },
- };
-diff --git a/arch/sh/boards/mach-ecovec24/setup.c b/arch/sh/boards/mach-ecovec24/setup.c
-index 5bc3a15465c7..85d5255d259f 100644
---- a/arch/sh/boards/mach-ecovec24/setup.c
-+++ b/arch/sh/boards/mach-ecovec24/setup.c
-@@ -861,14 +861,12 @@ static struct asoc_simple_card_info fsi_da7210_info = {
- .card = "FSIB-DA7210",
- .codec = "da7210.0-001a",
- .platform = "sh_fsi.0",
-- .daifmt = SND_SOC_DAIFMT_I2S,
-+ .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "fsib-dai",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
- },
- .codec_dai = {
- .name = "da7210-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
- },
- };
-
-diff --git a/arch/sh/boards/mach-se/7724/setup.c b/arch/sh/boards/mach-se/7724/setup.c
-index 21e4230659a5..1162bc6945a3 100644
---- a/arch/sh/boards/mach-se/7724/setup.c
-+++ b/arch/sh/boards/mach-se/7724/setup.c
-@@ -304,14 +304,12 @@ static struct asoc_simple_card_info fsi_ak4642_info = {
- .card = "FSIA-AK4642",
- .codec = "ak4642-codec.0-0012",
- .platform = "sh_fsi.0",
-- .daifmt = SND_SOC_DAIFMT_LEFT_J,
-+ .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "fsia-dai",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_IB_NF,
- },
- .codec_dai = {
- .name = "ak4642-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
- .sysclk = 11289600,
- },
- };
-diff --git a/sound/soc/sh/fsi.c b/sound/soc/sh/fsi.c
-index 1967f44e7cd4..710a079a7377 100644
---- a/sound/soc/sh/fsi.c
-+++ b/sound/soc/sh/fsi.c
-@@ -1711,9 +1711,9 @@ static int fsi_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
- /* set master/slave audio interface */
- switch (fmt & SND_SOC_DAIFMT_MASTER_MASK) {
- case SND_SOC_DAIFMT_CBM_CFM:
-- fsi->clk_master = 1;
- break;
- case SND_SOC_DAIFMT_CBS_CFS:
-+ fsi->clk_master = 1; /* codec is slave, cpu is master */
- break;
- default:
- return -EINVAL;
---
-2.1.2
-
diff --git a/patches.renesas/0353-ASoC-fsi-fixup-compile-error-for-simple-card.patch b/patches.renesas/0353-ASoC-fsi-fixup-compile-error-for-simple-card.patch
deleted file mode 100644
index 4fe943c691b8c..0000000000000
--- a/patches.renesas/0353-ASoC-fsi-fixup-compile-error-for-simple-card.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 0ade7f3d6bf1dabe5a74dfae591174656b1a95ec Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 16 Mar 2014 17:37:06 -0700
-Subject: ASoC: fsi: fixup compile error for simple-card
-
-This patches fixes
-c7a507eea1db1430476289f525f9c853d5d485e8
-(ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags)
-commit's compie error
-
-arch/arm/mach-shmobile/board-mackerel.c:512:2: \
- error: unknown field 'fmt' specified in initializer
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 313c84b2736b26c77af7c7637e7dd72afde1b6cd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-mackerel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 8c4332182b42..0ff4d8e45cf7 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -509,7 +509,7 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
- .card = "FSI2B-HDMI",
- .codec = "sh-mobile-hdmi",
- .platform = "sh_fsi2",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS,
-+ .daifmt = SND_SOC_DAIFMT_CBS_CFS,
- .cpu_dai = {
- .name = "fsib-dai",
- },
---
-2.1.2
-
diff --git a/patches.renesas/0354-ARM-bockw-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch b/patches.renesas/0354-ARM-bockw-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
deleted file mode 100644
index 194e4ea8991f7..0000000000000
--- a/patches.renesas/0354-ARM-bockw-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 3317b449658df68e23de7f75ca7dea6375f59028 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 23 Mar 2014 20:27:30 -0700
-Subject: ARM: bockw: fixup SND_SOC_DAIFMT_CBx_CFx flags
-
-SND_SOC_DAIFMT_CBx_CFx means "codec" side master/slave mode.
-Then, rcar will be master mode if it was SND_SOC_DAIFMT_CBS_CFS.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6fa387b2ed268952d50940b0e24c573063a1dcfe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 16 +++++-----------
- 1 file changed, 5 insertions(+), 11 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index aaed215e96b9..b4122f8cb8d9 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -450,14 +450,12 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
- .card = "SSI56-AK4643",
- .codec = "ak4642-codec.0-0012",
- .platform = "rcar_sound",
-- .daifmt = SND_SOC_DAIFMT_LEFT_J,
-+ .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "rsnd-dai.0",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS,
- },
- .codec_dai = {
- .name = "ak4642-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
- .sysclk = 11289600,
- },
- },
-@@ -467,10 +465,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
- .card = "SSI3-AK4554(playback)",
- .codec = "ak4554-adc-dac.0",
- .platform = "rcar_sound",
-+ .daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_RIGHT_J,
- .cpu_dai = {
- .name = "rsnd-dai.1",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM |
-- SND_SOC_DAIFMT_RIGHT_J,
- },
- .codec_dai = {
- .name = "ak4554-hifi",
-@@ -482,10 +479,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
- .card = "SSI4-AK4554(capture)",
- .codec = "ak4554-adc-dac.0",
- .platform = "rcar_sound",
-+ .daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J,
- .cpu_dai = {
- .name = "rsnd-dai.2",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM |
-- SND_SOC_DAIFMT_LEFT_J,
- },
- .codec_dai = {
- .name = "ak4554-hifi",
-@@ -497,10 +493,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
- .card = "SSI7-AK4554(playback)",
- .codec = "ak4554-adc-dac.1",
- .platform = "rcar_sound",
-+ .daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_RIGHT_J,
- .cpu_dai = {
- .name = "rsnd-dai.3",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM |
-- SND_SOC_DAIFMT_RIGHT_J,
- },
- .codec_dai = {
- .name = "ak4554-hifi",
-@@ -512,10 +507,9 @@ static struct asoc_simple_card_info rsnd_card_info[] = {
- .card = "SSI8-AK4554(capture)",
- .codec = "ak4554-adc-dac.1",
- .platform = "rcar_sound",
-+ .daifmt = SND_SOC_DAIFMT_CBS_CFS | SND_SOC_DAIFMT_LEFT_J,
- .cpu_dai = {
- .name = "rsnd-dai.4",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM |
-- SND_SOC_DAIFMT_LEFT_J,
- },
- .codec_dai = {
- .name = "ak4554-hifi",
---
-2.1.2
-
diff --git a/patches.renesas/0355-Kconfig-rename-HAS_IOPORT-to-HAS_IOPORT_MAP.patch b/patches.renesas/0355-Kconfig-rename-HAS_IOPORT-to-HAS_IOPORT_MAP.patch
deleted file mode 100644
index 4e68925db70e0..0000000000000
--- a/patches.renesas/0355-Kconfig-rename-HAS_IOPORT-to-HAS_IOPORT_MAP.patch
+++ /dev/null
@@ -1,763 +0,0 @@
-From 1fd20ab61b7b84ceedaf82650ba6a6793619081b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig@pengutronix.de>
-Date: Mon, 7 Apr 2014 15:39:19 -0700
-Subject: Kconfig: rename HAS_IOPORT to HAS_IOPORT_MAP
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-If the renamed symbol is defined lib/iomap.c implements ioport_map and
-ioport_unmap and currently (nearly) all platforms define the port
-accessor functions outb/inb and friend unconditionally. So
-HAS_IOPORT_MAP is the better name for this.
-
-Consequently NO_IOPORT is renamed to NO_IOPORT_MAP.
-
-The motivation for this change is to reintroduce a symbol HAS_IOPORT
-that signals if outb/int et al are available. I will address that at
-least one merge window later though to keep surprises to a minimum and
-catch new introductions of (HAS|NO)_IOPORT.
-
-The changes in this commit were done using:
-
- $ git grep -l -E '(NO|HAS)_IOPORT' | xargs perl -p -i -e 's/\b((?:CONFIG_)?(?:NO|HAS)_IOPORT)\b/$1_MAP/'
-
-Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-(cherry picked from commit ce816fa88cca083c47ab9000b2138a83043a78be)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arc/Kconfig | 2 +-
- arch/arm/Kconfig | 12 ++++++------
- arch/arm/mach-picoxcell/Kconfig | 2 +-
- arch/arm/mach-prima2/Kconfig | 2 +-
- arch/arm/mach-s3c24xx/Kconfig | 2 +-
- arch/arm/mach-shmobile/Kconfig | 2 +-
- arch/arm/mach-vexpress/Kconfig | 2 +-
- arch/arm/plat-samsung/Kconfig | 4 ++--
- arch/arm64/Kconfig | 2 +-
- arch/cris/Kconfig | 2 +-
- arch/hexagon/Kconfig | 2 +-
- arch/m32r/Kconfig | 2 +-
- arch/m68k/Kconfig | 2 +-
- arch/metag/Kconfig | 2 +-
- arch/mips/Kconfig | 4 ++--
- arch/openrisc/Kconfig | 2 +-
- arch/s390/Kconfig | 2 +-
- arch/sh/Kconfig | 4 ++--
- arch/sh/boards/Kconfig | 8 ++++----
- arch/sh/include/asm/io.h | 4 ++--
- arch/sh/include/asm/io_trapped.h | 2 +-
- arch/sh/include/asm/machvec.h | 2 +-
- arch/sh/kernel/Makefile | 2 +-
- arch/sh/kernel/io_trapped.c | 4 ++--
- arch/tile/Kconfig | 2 +-
- arch/unicore32/Kconfig | 2 +-
- arch/xtensa/Kconfig | 4 ++--
- arch/xtensa/configs/iss_defconfig | 2 +-
- arch/xtensa/configs/s6105_defconfig | 2 +-
- drivers/char/tpm/Kconfig | 2 +-
- drivers/i2c/busses/Kconfig | 2 +-
- drivers/net/can/sja1000/Kconfig | 2 +-
- drivers/net/ethernet/3com/Kconfig | 2 +-
- include/asm-generic/io.h | 4 ++--
- include/asm-generic/iomap.h | 2 +-
- include/linux/io.h | 2 +-
- lib/Kconfig | 4 ++--
- lib/devres.c | 4 ++--
- lib/iomap.c | 4 ++--
- sound/isa/Kconfig | 2 +-
- sound/pci/Kconfig | 2 +-
- 41 files changed, 59 insertions(+), 59 deletions(-)
-
-diff --git a/arch/arc/Kconfig b/arch/arc/Kconfig
-index 9be30c8cb0c2..0434a89e05f8 100644
---- a/arch/arc/Kconfig
-+++ b/arch/arc/Kconfig
-@@ -57,7 +57,7 @@ config ARCH_FLATMEM_ENABLE
- config MMU
- def_bool y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config GENERIC_CALIBRATE_DELAY
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index a5a497f43719..bb7270772b24 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -130,7 +130,7 @@ config HAVE_TCM
- config HAVE_PROC_CPU
- bool
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- bool
-
- config EISA
-@@ -412,7 +412,7 @@ config ARCH_EBSA110
- select ISA
- select NEED_MACH_IO_H
- select NEED_MACH_MEMORY_H
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- help
- This is an evaluation board for the StrongARM processor available
- from Digital. It has limited hardware on-board, including an
-@@ -432,7 +432,7 @@ config ARCH_EFM32
- select CPU_V7M
- select GENERIC_CLOCKEVENTS
- select NO_DMA
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select SPARSE_IRQ
- select USE_OF
- help
-@@ -683,7 +683,7 @@ config ARCH_SHMOBILE_LEGACY
- select HAVE_SMP
- select MIGHT_HAVE_CACHE_L2X0
- select MULTI_IRQ_HANDLER
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select PINCTRL
- select PM_GENERIC_DOMAINS if PM
- select SPARSE_IRQ
-@@ -704,7 +704,7 @@ config ARCH_RPC
- select ISA_DMA_API
- select NEED_MACH_IO_H
- select NEED_MACH_MEMORY_H
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select VIRT_TO_BUS
- help
- On the Acorn Risc-PC, Linux can support the internal IDE disk and
-@@ -763,7 +763,7 @@ config ARCH_S3C64XX
- select HAVE_S3C2410_I2C if I2C
- select HAVE_S3C2410_WATCHDOG if WATCHDOG
- select HAVE_TCM
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select PLAT_SAMSUNG
- select PM_GENERIC_DOMAINS
- select S3C_DEV_NAND
-diff --git a/arch/arm/mach-picoxcell/Kconfig b/arch/arm/mach-picoxcell/Kconfig
-index c88ff74d86fe..fd81b5cfcd57 100644
---- a/arch/arm/mach-picoxcell/Kconfig
-+++ b/arch/arm/mach-picoxcell/Kconfig
-@@ -5,4 +5,4 @@ config ARCH_PICOXCELL
- select CPU_V6K
- select DW_APB_TIMER_OF
- select HAVE_TCM
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
-diff --git a/arch/arm/mach-prima2/Kconfig b/arch/arm/mach-prima2/Kconfig
-index 2c726b4f9356..82482cd1fc03 100644
---- a/arch/arm/mach-prima2/Kconfig
-+++ b/arch/arm/mach-prima2/Kconfig
-@@ -2,7 +2,7 @@ config ARCH_SIRF
- bool "CSR SiRF" if ARCH_MULTI_V7
- select ARCH_REQUIRE_GPIOLIB
- select GENERIC_IRQ_CHIP
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select PINCTRL
- select PINCTRL_SIRF
- help
-diff --git a/arch/arm/mach-s3c24xx/Kconfig b/arch/arm/mach-s3c24xx/Kconfig
-index d876431d64c0..de2529d892d2 100644
---- a/arch/arm/mach-s3c24xx/Kconfig
-+++ b/arch/arm/mach-s3c24xx/Kconfig
-@@ -12,7 +12,7 @@ if ARCH_S3C24XX
- config PLAT_S3C24XX
- def_bool y
- select ARCH_REQUIRE_GPIOLIB
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select S3C_DEV_NAND
- select IRQ_DOMAIN
- help
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index e265630dfff1..c655ec642d6c 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -10,7 +10,7 @@ config ARCH_SHMOBILE_MULTI
- select ARM_GIC
- select MIGHT_HAVE_PCI
- select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select PINCTRL
- select ARCH_REQUIRE_GPIOLIB
-
-diff --git a/arch/arm/mach-vexpress/Kconfig b/arch/arm/mach-vexpress/Kconfig
-index 80b4be36f10a..657d52d0391f 100644
---- a/arch/arm/mach-vexpress/Kconfig
-+++ b/arch/arm/mach-vexpress/Kconfig
-@@ -10,7 +10,7 @@ config ARCH_VEXPRESS
- select HAVE_ARM_TWD if SMP
- select HAVE_PATA_PLATFORM
- select ICST
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select PLAT_VERSATILE
- select PLAT_VERSATILE_CLCD
- select POWER_RESET
-diff --git a/arch/arm/plat-samsung/Kconfig b/arch/arm/plat-samsung/Kconfig
-index 58645a58d0d8..ac0366858e94 100644
---- a/arch/arm/plat-samsung/Kconfig
-+++ b/arch/arm/plat-samsung/Kconfig
-@@ -9,7 +9,7 @@ config PLAT_SAMSUNG
- depends on PLAT_S3C24XX || ARCH_S3C64XX || PLAT_S5P || ARCH_EXYNOS
- default y
- select GENERIC_IRQ_CHIP
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- help
- Base platform code for all Samsung SoC based systems
-
-@@ -19,7 +19,7 @@ config PLAT_S5P
- default y
- select ARCH_REQUIRE_GPIOLIB
- select ARM_VIC
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select PLAT_SAMSUNG
- select S3C_GPIO_TRACK
- select S5P_GPIO_DRVSTR
-diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig
-index 65b788410bd9..2190e6cfd15a 100644
---- a/arch/arm64/Kconfig
-+++ b/arch/arm64/Kconfig
-@@ -62,7 +62,7 @@ config ARCH_PHYS_ADDR_T_64BIT
- config MMU
- def_bool y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config STACKTRACE_SUPPORT
-diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig
-index ed0fcdf7e990..4a60aa362990 100644
---- a/arch/cris/Kconfig
-+++ b/arch/cris/Kconfig
-@@ -29,7 +29,7 @@ config GENERIC_CALIBRATE_DELAY
- bool
- default y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config FORCE_MAX_ZONEORDER
-diff --git a/arch/hexagon/Kconfig b/arch/hexagon/Kconfig
-index 09df2608f40a..9bb54b95eb89 100644
---- a/arch/hexagon/Kconfig
-+++ b/arch/hexagon/Kconfig
-@@ -19,7 +19,7 @@ config HEXAGON
- select GENERIC_IRQ_SHOW
- select HAVE_ARCH_KGDB
- select HAVE_ARCH_TRACEHOOK
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select GENERIC_IOMAP
- select GENERIC_SMP_IDLE_THREAD
- select STACKTRACE_SUPPORT
-diff --git a/arch/m32r/Kconfig b/arch/m32r/Kconfig
-index ca4504424dae..9e44bbd8051e 100644
---- a/arch/m32r/Kconfig
-+++ b/arch/m32r/Kconfig
-@@ -28,7 +28,7 @@ config ZONE_DMA
- bool
- default y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config NO_DMA
-diff --git a/arch/m68k/Kconfig b/arch/m68k/Kconfig
-index b2e322939256..87b7c7581b1d 100644
---- a/arch/m68k/Kconfig
-+++ b/arch/m68k/Kconfig
-@@ -52,7 +52,7 @@ config TIME_LOW_RES
- bool
- default y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config NO_DMA
-diff --git a/arch/metag/Kconfig b/arch/metag/Kconfig
-index e56abd2c1b4f..4e53a6de1a4e 100644
---- a/arch/metag/Kconfig
-+++ b/arch/metag/Kconfig
-@@ -52,7 +52,7 @@ config GENERIC_HWEIGHT
- config GENERIC_CALIBRATE_DELAY
- def_bool y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- source "init/Kconfig"
-diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
-index cb1da372346c..d50da167d23a 100644
---- a/arch/mips/Kconfig
-+++ b/arch/mips/Kconfig
-@@ -173,7 +173,7 @@ config MACH_DECSTATION
- select CPU_R4000_WORKAROUNDS if 64BIT
- select CPU_R4400_WORKAROUNDS if 64BIT
- select DMA_NONCOHERENT
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select IRQ_CPU
- select SYS_HAS_CPU_R3000
- select SYS_HAS_CPU_R4X00
-@@ -942,7 +942,7 @@ config SYNC_R4K
- config MIPS_MACHINE
- def_bool n
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool n
-
- config GENERIC_ISA_DMA
-diff --git a/arch/openrisc/Kconfig b/arch/openrisc/Kconfig
-index 9488209a5253..e71d712afb79 100644
---- a/arch/openrisc/Kconfig
-+++ b/arch/openrisc/Kconfig
-@@ -41,7 +41,7 @@ config RWSEM_XCHGADD_ALGORITHM
- config GENERIC_HWEIGHT
- def_bool y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config TRACE_IRQFLAGS_SUPPORT
-diff --git a/arch/s390/Kconfig b/arch/s390/Kconfig
-index bb74b21f007a..2c16c6883903 100644
---- a/arch/s390/Kconfig
-+++ b/arch/s390/Kconfig
-@@ -52,7 +52,7 @@ config KEXEC
- config AUDIT_ARCH
- def_bool y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool y
-
- config PCI_QUIRKS
-diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
-index 64455daa63a1..b2cdb203e843 100644
---- a/arch/sh/Kconfig
-+++ b/arch/sh/Kconfig
-@@ -3,7 +3,7 @@ config SUPERH
- select ARCH_MIGHT_HAVE_PC_PARPORT
- select EXPERT
- select CLKDEV_LOOKUP
-- select HAVE_IDE if HAS_IOPORT
-+ select HAVE_IDE if HAS_IOPORT_MAP
- select HAVE_MEMBLOCK
- select HAVE_MEMBLOCK_NODE_MAP
- select ARCH_DISCARD_MEMBLOCK
-@@ -147,7 +147,7 @@ config ARCH_HAS_ILOG2_U32
- config ARCH_HAS_ILOG2_U64
- def_bool n
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool !PCI
- depends on !SH_CAYMAN && !SH_SH4202_MICRODEV && !SH_SHMIN && \
- !SH_HP6XX && !SH_SOLUTION_ENGINE
-diff --git a/arch/sh/boards/Kconfig b/arch/sh/boards/Kconfig
-index eb1cf84231a2..e331e5373b8e 100644
---- a/arch/sh/boards/Kconfig
-+++ b/arch/sh/boards/Kconfig
-@@ -158,7 +158,7 @@ config SH_SDK7786
- bool "SDK7786"
- depends on CPU_SUBTYPE_SH7786
- select SYS_SUPPORTS_PCI
-- select NO_IOPORT if !PCI
-+ select NO_IOPORT_MAP if !PCI
- select ARCH_WANT_OPTIONAL_GPIOLIB
- select HAVE_SRAM_POOL
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-@@ -204,7 +204,7 @@ config SH_URQUELL
- depends on CPU_SUBTYPE_SH7786
- select ARCH_REQUIRE_GPIOLIB
- select SYS_SUPPORTS_PCI
-- select NO_IOPORT if !PCI
-+ select NO_IOPORT_MAP if !PCI
-
- config SH_MIGOR
- bool "Migo-R"
-@@ -306,7 +306,7 @@ config SH_LBOX_RE2
- config SH_X3PROTO
- bool "SH-X3 Prototype board"
- depends on CPU_SUBTYPE_SHX3
-- select NO_IOPORT if !PCI
-+ select NO_IOPORT_MAP if !PCI
- select IRQ_DOMAIN
-
- config SH_MAGIC_PANEL_R2
-@@ -333,7 +333,7 @@ config SH_POLARIS
-
- config SH_SH2007
- bool "SH-2007 board"
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
- depends on CPU_SUBTYPE_SH7780
- help
-diff --git a/arch/sh/include/asm/io.h b/arch/sh/include/asm/io.h
-index 629db2ad7916..728c4c571f40 100644
---- a/arch/sh/include/asm/io.h
-+++ b/arch/sh/include/asm/io.h
-@@ -122,7 +122,7 @@ __BUILD_MEMORY_STRING(__raw_, l, u32)
-
- __BUILD_MEMORY_STRING(__raw_, q, u64)
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
-
- /*
- * Slowdown I/O port space accesses for antique hardware.
-@@ -218,7 +218,7 @@ __BUILD_IOPORT_STRING(w, u16)
- __BUILD_IOPORT_STRING(l, u32)
- __BUILD_IOPORT_STRING(q, u64)
-
--#else /* !CONFIG_HAS_IOPORT */
-+#else /* !CONFIG_HAS_IOPORT_MAP */
-
- #include <asm/io_noioport.h>
-
-diff --git a/arch/sh/include/asm/io_trapped.h b/arch/sh/include/asm/io_trapped.h
-index f1251d4f0ba9..4ab94ef51071 100644
---- a/arch/sh/include/asm/io_trapped.h
-+++ b/arch/sh/include/asm/io_trapped.h
-@@ -36,7 +36,7 @@ __ioremap_trapped(unsigned long offset, unsigned long size)
- #define __ioremap_trapped(offset, size) NULL
- #endif
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- extern struct list_head trapped_io;
-
- static inline void __iomem *
-diff --git a/arch/sh/include/asm/machvec.h b/arch/sh/include/asm/machvec.h
-index eb9c20d971dd..d3324e4f372e 100644
---- a/arch/sh/include/asm/machvec.h
-+++ b/arch/sh/include/asm/machvec.h
-@@ -21,7 +21,7 @@ struct sh_machine_vector {
- int (*mv_irq_demux)(int irq);
- void (*mv_init_irq)(void);
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- void __iomem *(*mv_ioport_map)(unsigned long port, unsigned int size);
- void (*mv_ioport_unmap)(void __iomem *);
- #endif
-diff --git a/arch/sh/kernel/Makefile b/arch/sh/kernel/Makefile
-index 261c8bfd75ce..2ccf36c824c6 100644
---- a/arch/sh/kernel/Makefile
-+++ b/arch/sh/kernel/Makefile
-@@ -22,7 +22,7 @@ obj-y := debugtraps.o dma-nommu.o dumpstack.o \
-
- ifndef CONFIG_GENERIC_IOMAP
- obj-y += iomap.o
--obj-$(CONFIG_HAS_IOPORT) += ioport.o
-+obj-$(CONFIG_HAS_IOPORT_MAP) += ioport.o
- endif
-
- obj-$(CONFIG_SUPERH32) += sys_sh32.o
-diff --git a/arch/sh/kernel/io_trapped.c b/arch/sh/kernel/io_trapped.c
-index c0a9761f2f8a..f8ce36286cea 100644
---- a/arch/sh/kernel/io_trapped.c
-+++ b/arch/sh/kernel/io_trapped.c
-@@ -22,7 +22,7 @@
-
- #define TRAPPED_PAGES_MAX 16
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- LIST_HEAD(trapped_io);
- EXPORT_SYMBOL_GPL(trapped_io);
- #endif
-@@ -90,7 +90,7 @@ int register_trapped_io(struct trapped_io *tiop)
- tiop->magic = IO_TRAPPED_MAGIC;
- INIT_LIST_HEAD(&tiop->list);
- spin_lock_irq(&trapped_lock);
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- if (flags & IORESOURCE_IO)
- list_add(&tiop->list, &trapped_io);
- #endif
-diff --git a/arch/tile/Kconfig b/arch/tile/Kconfig
-index b3692ce78f90..0b0290eeb629 100644
---- a/arch/tile/Kconfig
-+++ b/arch/tile/Kconfig
-@@ -405,7 +405,7 @@ config PCI_DOMAINS
- config NO_IOMEM
- def_bool !PCI
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool !PCI
-
- config TILE_PCI_IO
-diff --git a/arch/unicore32/Kconfig b/arch/unicore32/Kconfig
-index 25c0dba508cc..aafad6fa1667 100644
---- a/arch/unicore32/Kconfig
-+++ b/arch/unicore32/Kconfig
-@@ -27,7 +27,7 @@ config UNICORE32
- config GENERIC_CSUM
- def_bool y
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- bool
-
- config STACKTRACE_SUPPORT
-diff --git a/arch/xtensa/Kconfig b/arch/xtensa/Kconfig
-index c87ae7c6e5f9..02d6d29a63c1 100644
---- a/arch/xtensa/Kconfig
-+++ b/arch/xtensa/Kconfig
-@@ -41,7 +41,7 @@ config ARCH_HAS_ILOG2_U32
- config ARCH_HAS_ILOG2_U64
- def_bool n
-
--config NO_IOPORT
-+config NO_IOPORT_MAP
- def_bool n
-
- config HZ
-@@ -239,7 +239,7 @@ config XTENSA_PLATFORM_XT2000
- config XTENSA_PLATFORM_S6105
- bool "S6105"
- select SERIAL_CONSOLE
-- select NO_IOPORT
-+ select NO_IOPORT_MAP
-
- config XTENSA_PLATFORM_XTFPGA
- bool "XTFPGA"
-diff --git a/arch/xtensa/configs/iss_defconfig b/arch/xtensa/configs/iss_defconfig
-index 4f233204faf9..d57d917ff240 100644
---- a/arch/xtensa/configs/iss_defconfig
-+++ b/arch/xtensa/configs/iss_defconfig
-@@ -11,7 +11,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y
- CONFIG_GENERIC_HWEIGHT=y
- # CONFIG_ARCH_HAS_ILOG2_U32 is not set
- # CONFIG_ARCH_HAS_ILOG2_U64 is not set
--CONFIG_NO_IOPORT=y
-+CONFIG_NO_IOPORT_MAP=y
- CONFIG_HZ=100
- CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
- CONFIG_CONSTRUCTORS=y
-diff --git a/arch/xtensa/configs/s6105_defconfig b/arch/xtensa/configs/s6105_defconfig
-index d929f77a0360..583c2b0974ca 100644
---- a/arch/xtensa/configs/s6105_defconfig
-+++ b/arch/xtensa/configs/s6105_defconfig
-@@ -11,7 +11,7 @@ CONFIG_GENERIC_FIND_NEXT_BIT=y
- CONFIG_GENERIC_HWEIGHT=y
- # CONFIG_ARCH_HAS_ILOG2_U32 is not set
- # CONFIG_ARCH_HAS_ILOG2_U64 is not set
--CONFIG_NO_IOPORT=y
-+CONFIG_NO_IOPORT_MAP=y
- CONFIG_HZ=100
- CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config"
-
-diff --git a/drivers/char/tpm/Kconfig b/drivers/char/tpm/Kconfig
-index 1a65838888cd..c54cac3f8bc8 100644
---- a/drivers/char/tpm/Kconfig
-+++ b/drivers/char/tpm/Kconfig
-@@ -74,7 +74,7 @@ config TCG_NSC
-
- config TCG_ATMEL
- tristate "Atmel TPM Interface"
-- depends on PPC64 || HAS_IOPORT
-+ depends on PPC64 || HAS_IOPORT_MAP
- ---help---
- If you have a TPM security chip from Atmel say Yes and it
- will be accessible from within Linux. To compile this driver
-diff --git a/drivers/i2c/busses/Kconfig b/drivers/i2c/busses/Kconfig
-index c5eec0290b37..a612ec150da5 100644
---- a/drivers/i2c/busses/Kconfig
-+++ b/drivers/i2c/busses/Kconfig
-@@ -937,7 +937,7 @@ config I2C_ACORN
-
- config I2C_ELEKTOR
- tristate "Elektor ISA card"
-- depends on ISA && HAS_IOPORT && BROKEN_ON_SMP
-+ depends on ISA && HAS_IOPORT_MAP && BROKEN_ON_SMP
- select I2C_ALGOPCF
- help
- This supports the PCF8584 ISA bus I2C adapter. Say Y if you own
-diff --git a/drivers/net/can/sja1000/Kconfig b/drivers/net/can/sja1000/Kconfig
-index ff2ba86cd4a4..833ee8c9168e 100644
---- a/drivers/net/can/sja1000/Kconfig
-+++ b/drivers/net/can/sja1000/Kconfig
-@@ -46,7 +46,7 @@ config CAN_EMS_PCI
- config CAN_PEAK_PCMCIA
- tristate "PEAK PCAN-PC Card"
- depends on PCMCIA
-- depends on HAS_IOPORT
-+ depends on HAS_IOPORT_MAP
- ---help---
- This driver is for the PCAN-PC Card PCMCIA adapter (1 or 2 channels)
- from PEAK-System (http://www.peak-system.com). To compile this
-diff --git a/drivers/net/ethernet/3com/Kconfig b/drivers/net/ethernet/3com/Kconfig
-index 65b735d4a6ad..afaab4b2333f 100644
---- a/drivers/net/ethernet/3com/Kconfig
-+++ b/drivers/net/ethernet/3com/Kconfig
-@@ -66,7 +66,7 @@ config PCMCIA_3C589
-
- config VORTEX
- tristate "3c590/3c900 series (592/595/597) \"Vortex/Boomerang\" support"
-- depends on (PCI || EISA) && HAS_IOPORT
-+ depends on (PCI || EISA) && HAS_IOPORT_MAP
- select MII
- ---help---
- This option enables driver support for a large number of 10Mbps and
-diff --git a/include/asm-generic/io.h b/include/asm-generic/io.h
-index d5afe96adba6..975e1cc75edb 100644
---- a/include/asm-generic/io.h
-+++ b/include/asm-generic/io.h
-@@ -327,7 +327,7 @@ static inline void iounmap(void __iomem *addr)
- }
- #endif /* CONFIG_MMU */
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- #ifndef CONFIG_GENERIC_IOMAP
- static inline void __iomem *ioport_map(unsigned long port, unsigned int nr)
- {
-@@ -341,7 +341,7 @@ static inline void ioport_unmap(void __iomem *p)
- extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
- extern void ioport_unmap(void __iomem *p);
- #endif /* CONFIG_GENERIC_IOMAP */
--#endif /* CONFIG_HAS_IOPORT */
-+#endif /* CONFIG_HAS_IOPORT_MAP */
-
- #ifndef xlate_dev_kmem_ptr
- #define xlate_dev_kmem_ptr(p) p
-diff --git a/include/asm-generic/iomap.h b/include/asm-generic/iomap.h
-index 6afd7d6a9899..1b41011643a5 100644
---- a/include/asm-generic/iomap.h
-+++ b/include/asm-generic/iomap.h
-@@ -56,7 +56,7 @@ extern void iowrite8_rep(void __iomem *port, const void *buf, unsigned long coun
- extern void iowrite16_rep(void __iomem *port, const void *buf, unsigned long count);
- extern void iowrite32_rep(void __iomem *port, const void *buf, unsigned long count);
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- /* Create a virtual mapping cookie for an IO port range */
- extern void __iomem *ioport_map(unsigned long port, unsigned int nr);
- extern void ioport_unmap(void __iomem *);
-diff --git a/include/linux/io.h b/include/linux/io.h
-index f4f42faec686..3e35c183dca4 100644
---- a/include/linux/io.h
-+++ b/include/linux/io.h
-@@ -41,7 +41,7 @@ static inline int ioremap_page_range(unsigned long addr, unsigned long end,
- /*
- * Managed iomap interface
- */
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- void __iomem * devm_ioport_map(struct device *dev, unsigned long port,
- unsigned int nr);
- void devm_ioport_unmap(struct device *dev, void __iomem *addr);
-diff --git a/lib/Kconfig b/lib/Kconfig
-index 991c98bc4a3f..5d4984c505f8 100644
---- a/lib/Kconfig
-+++ b/lib/Kconfig
-@@ -342,9 +342,9 @@ config HAS_IOMEM
- select GENERIC_IO
- default y
-
--config HAS_IOPORT
-+config HAS_IOPORT_MAP
- boolean
-- depends on HAS_IOMEM && !NO_IOPORT
-+ depends on HAS_IOMEM && !NO_IOPORT_MAP
- default y
-
- config HAS_DMA
-diff --git a/lib/devres.c b/lib/devres.c
-index 823533138fa0..10231287fbcc 100644
---- a/lib/devres.c
-+++ b/lib/devres.c
-@@ -168,7 +168,7 @@ void __iomem *devm_request_and_ioremap(struct device *device,
- }
- EXPORT_SYMBOL(devm_request_and_ioremap);
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- /*
- * Generic iomap devres
- */
-@@ -227,7 +227,7 @@ void devm_ioport_unmap(struct device *dev, void __iomem *addr)
- devm_ioport_map_match, (void *)addr));
- }
- EXPORT_SYMBOL(devm_ioport_unmap);
--#endif /* CONFIG_HAS_IOPORT */
-+#endif /* CONFIG_HAS_IOPORT_MAP */
-
- #ifdef CONFIG_PCI
- /*
-diff --git a/lib/iomap.c b/lib/iomap.c
-index 2c08f36862eb..fc3dcb4b238e 100644
---- a/lib/iomap.c
-+++ b/lib/iomap.c
-@@ -224,7 +224,7 @@ EXPORT_SYMBOL(iowrite8_rep);
- EXPORT_SYMBOL(iowrite16_rep);
- EXPORT_SYMBOL(iowrite32_rep);
-
--#ifdef CONFIG_HAS_IOPORT
-+#ifdef CONFIG_HAS_IOPORT_MAP
- /* Create a virtual mapping cookie for an IO port range */
- void __iomem *ioport_map(unsigned long port, unsigned int nr)
- {
-@@ -239,7 +239,7 @@ void ioport_unmap(void __iomem *addr)
- }
- EXPORT_SYMBOL(ioport_map);
- EXPORT_SYMBOL(ioport_unmap);
--#endif /* CONFIG_HAS_IOPORT */
-+#endif /* CONFIG_HAS_IOPORT_MAP */
-
- #ifdef CONFIG_PCI
- /* Hide the details if this is a MMIO or PIO address space and just do what
-diff --git a/sound/isa/Kconfig b/sound/isa/Kconfig
-index affa13480659..0216475fc759 100644
---- a/sound/isa/Kconfig
-+++ b/sound/isa/Kconfig
-@@ -191,7 +191,7 @@ config SND_ES18XX
-
- config SND_SC6000
- tristate "Gallant SC-6000/6600/7000 and Audio Excel DSP 16"
-- depends on HAS_IOPORT
-+ depends on HAS_IOPORT_MAP
- select SND_WSS_LIB
- select SND_OPL3_LIB
- select SND_MPU401_UART
-diff --git a/sound/pci/Kconfig b/sound/pci/Kconfig
-index 8756c8e32922..81135d7a50cf 100644
---- a/sound/pci/Kconfig
-+++ b/sound/pci/Kconfig
-@@ -689,7 +689,7 @@ config SND_LOLA
-
- config SND_LX6464ES
- tristate "Digigram LX6464ES"
-- depends on HAS_IOPORT
-+ depends on HAS_IOPORT_MAP
- select SND_PCM
- help
- Say Y here to include support for Digigram LX6464ES boards.
---
-2.1.2
-
diff --git a/patches.renesas/0356-ARM-shmobile-lager-correct-renesas-gpios-to-renesas-.patch b/patches.renesas/0356-ARM-shmobile-lager-correct-renesas-gpios-to-renesas-.patch
deleted file mode 100644
index c40b0d203e7f5..0000000000000
--- a/patches.renesas/0356-ARM-shmobile-lager-correct-renesas-gpios-to-renesas-.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 358c261df6cdb0271c46500b5f3c7431df9c83a7 Mon Sep 17 00:00:00 2001
-From: Rob Taylor <rob.taylor@codethink.co.uk>
-Date: Mon, 7 Apr 2014 20:16:52 +0100
-Subject: ARM: shmobile: lager: correct renesas,gpios to renesas,groups in
- sd[02] pfc
-
-Fix probable typo of renesas,groups in the lager dt. The kernel has no
-renesas,gpios but this should match renesas,groups.
-
-Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
-[ben.dooks@codethink.co.uk: fixup description]
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit b08eed0c4d7d70eae2f4f1ff518cc33643722a07)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 6e99eb2df076..d01048ab3e77 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -141,12 +141,12 @@
- };
-
- sdhi0_pins: sd0 {
-- renesas,gpios = "sdhi0_data4", "sdhi0_ctrl";
-+ renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
- renesas,function = "sdhi0";
- };
-
- sdhi2_pins: sd2 {
-- renesas,gpios = "sdhi2_data4", "sdhi2_ctrl";
-+ renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
- renesas,function = "sdhi2";
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0357-ARM-shmobile-lager-fixup-SND_SOC_DAIFMT_CBx_CFx-flag.patch b/patches.renesas/0357-ARM-shmobile-lager-fixup-SND_SOC_DAIFMT_CBx_CFx-flag.patch
deleted file mode 100644
index 38e64ce846615..0000000000000
--- a/patches.renesas/0357-ARM-shmobile-lager-fixup-SND_SOC_DAIFMT_CBx_CFx-flag.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From a412c9fae4b333ec19eb6ca77c5fe93d37ad9d38 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:59:34 -0700
-Subject: ARM: shmobile: lager: fixup SND_SOC_DAIFMT_CBx_CFx flags
-
-e1508289404ab6ca28e0dc931612600f0441c417
-(ASoC: rcar: fixup SND_SOC_DAIFMT_CBx_CFx flags)
-corrected SND_SOC_DAIFMT_CBx_CFx definition.
-But then, Lager board was maintenanced other branch.
-This patch correct SND_SOC_DAIFMT_CBx_CFx flag for lager
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9f85ff849c21b429c1e2137f2646f9cc667d8ded)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index f0104bfe544e..18c7e0311aa6 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -588,14 +588,12 @@ static struct asoc_simple_card_info rsnd_card_info = {
- .card = "SSI01-AK4643",
- .codec = "ak4642-codec.2-0012",
- .platform = "rcar_sound",
-- .daifmt = SND_SOC_DAIFMT_LEFT_J,
-+ .daifmt = SND_SOC_DAIFMT_LEFT_J | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
- .name = "rcar_sound",
-- .fmt = SND_SOC_DAIFMT_CBS_CFS,
- },
- .codec_dai = {
- .name = "ak4642-hifi",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
- .sysclk = 11289600,
- },
- };
---
-2.1.2
-
diff --git a/patches.renesas/0358-ARM-shmobile-armadillo800eva-fixup-SND_SOC_DAIFMT_CB.patch b/patches.renesas/0358-ARM-shmobile-armadillo800eva-fixup-SND_SOC_DAIFMT_CB.patch
deleted file mode 100644
index ac46cbc1f7f61..0000000000000
--- a/patches.renesas/0358-ARM-shmobile-armadillo800eva-fixup-SND_SOC_DAIFMT_CB.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 6c8428efc7c5c9dd442765893c341807a9272b09 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:59:47 -0700
-Subject: ARM: shmobile: armadillo800eva: fixup SND_SOC_DAIFMT_CBx_CFx flags
-
-c7a507eea1db1430476289f525f9c853d5d485e8
-(ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags)
-exchanged sound flags, but armadillo800eva flags needs IB_NF.
-The recorded sound will be noise without this patch.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7b707277e734c553a8043e9b4d530eb47f4d60c8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 2858f380beae..486063db2a2f 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -992,6 +992,7 @@ static struct asoc_simple_card_info fsi_wm8978_info = {
- .platform = "sh_fsi2",
- .daifmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_CBM_CFM,
- .cpu_dai = {
-+ .fmt = SND_SOC_DAIFMT_IB_NF,
- .name = "fsia-dai",
- },
- .codec_dai = {
---
-2.1.2
-
diff --git a/patches.renesas/0359-ARM-shmobile-r8a7778-Use-clks-as-MSTP007-parent.patch b/patches.renesas/0359-ARM-shmobile-r8a7778-Use-clks-as-MSTP007-parent.patch
deleted file mode 100644
index a4622c721e86e..0000000000000
--- a/patches.renesas/0359-ARM-shmobile-r8a7778-Use-clks-as-MSTP007-parent.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 41e11529465deb0ceaf0510be0e7e63df690392e Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 14 Apr 2014 10:41:36 +0900
-Subject: ARM: shmobile: r8a7778: Use clks as MSTP007 parent
-
-According to the documentation the parent clock of
-MSTP007 should be clks not clkp.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 3dedc5f5b11c567dbe2f31adb5119d1dfb8f51c9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7778.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 2009a9bc6356..9989b1b06ffd 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -170,7 +170,7 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP010] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 10, 0), /* SSI2 */
- [MSTP009] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 9, 0), /* SSI3 */
- [MSTP008] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 8, 0), /* SRU */
-- [MSTP007] = SH_CLK_MSTP32(&p_clk, MSTPCR0, 7, 0), /* HSPI */
-+ [MSTP007] = SH_CLK_MSTP32(&s_clk, MSTPCR0, 7, 0), /* HSPI */
- };
-
- static struct clk_lookup lookups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0360-ARM-shmobile-sh73a0-drop-address-cells-from-GIC-node.patch b/patches.renesas/0360-ARM-shmobile-sh73a0-drop-address-cells-from-GIC-node.patch
deleted file mode 100644
index ae6df91912ac3..0000000000000
--- a/patches.renesas/0360-ARM-shmobile-sh73a0-drop-address-cells-from-GIC-node.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 5fca00d18c7e85f482e423bb006a131b1649f747 Mon Sep 17 00:00:00 2001
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Mon, 14 Apr 2014 16:18:18 +0200
-Subject: ARM: shmobile: sh73a0: drop address cells from GIC node
-
-This is likely a copy-and-paste error from the
-ARM GIC documentation, that has already been fixed.
-
-address-cells should have been set to 0, as with the size
-cells. As having those properties set to 0 is the
-same thing as not specifying them, drop them completely.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Acked-by: Rob Herring <robh@kernel.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit de66b584042b8f2cfe4c34ef4faa804dcd8d5843)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/sh73a0.dtsi | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
-index b7bd3b9a6753..5ecf552e1c00 100644
---- a/arch/arm/boot/dts/sh73a0.dtsi
-+++ b/arch/arm/boot/dts/sh73a0.dtsi
-@@ -34,7 +34,6 @@
- gic: interrupt-controller@f0001000 {
- compatible = "arm,cortex-a9-gic";
- #interrupt-cells = <3>;
-- #address-cells = <1>;
- interrupt-controller;
- reg = <0xf0001000 0x1000>,
- <0xf0000100 0x100>;
---
-2.1.2
-
diff --git a/patches.renesas/0361-ARM-shmobile-r8a7740-drop-address-cells-from-GIC-nod.patch b/patches.renesas/0361-ARM-shmobile-r8a7740-drop-address-cells-from-GIC-nod.patch
deleted file mode 100644
index b36006389aeec..0000000000000
--- a/patches.renesas/0361-ARM-shmobile-r8a7740-drop-address-cells-from-GIC-nod.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7b2a0e41bec2c76f15ed3d9266f669e4a1104df9 Mon Sep 17 00:00:00 2001
-From: Lucas Stach <l.stach@pengutronix.de>
-Date: Mon, 14 Apr 2014 16:18:17 +0200
-Subject: ARM: shmobile: r8a7740: drop address cells from GIC node
-
-This is likely a copy-and-paste error from the
-ARM GIC documentation, that has already been fixed.
-
-address-cells should have been set to 0, as with the size
-cells. As having those properties set to 0 is the
-same thing as not specifying them, drop them completely.
-
-Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
-Acked-by: Rob Herring <robh@kernel.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 64c04a79c377e23449c59060727fcd34cc798eb6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740.dtsi | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index 8280884bfa59..2551e9438d35 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -28,7 +28,6 @@
- gic: interrupt-controller@c2800000 {
- compatible = "arm,cortex-a9-gic";
- #interrupt-cells = <3>;
-- #address-cells = <1>;
- interrupt-controller;
- reg = <0xc2800000 0x1000>,
- <0xc2000000 0x1000>;
---
-2.1.2
-
diff --git a/patches.renesas/0362-ARM-shmobile-koelsch-correct-renesas-gpios-to-renesa.patch b/patches.renesas/0362-ARM-shmobile-koelsch-correct-renesas-gpios-to-renesa.patch
deleted file mode 100644
index de3727efcc10e..0000000000000
--- a/patches.renesas/0362-ARM-shmobile-koelsch-correct-renesas-gpios-to-renesa.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From e07fcdd38fbbc9de36d226c0b1f6048e4e780e7c Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 14 Apr 2014 19:13:21 +0900
-Subject: ARM: shmobile: koelsch: correct renesas,gpios to renesas,groups in
- sd[012] pfc
-
-Fix typo of renesas,groups in the koeslch dt. The kernel has no
-renesas,gpios but this should match renesas,groups.
-
-Noticed thanks to similar fix for Lager by Rob Taylor and Ben Dooks.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d5dda0381f826326071b027f288372f682c24d55)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index bdd73e6657b2..de1b6977c69a 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -230,17 +230,17 @@
- };
-
- sdhi0_pins: sd0 {
-- renesas,gpios = "sdhi0_data4", "sdhi0_ctrl";
-+ renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
- renesas,function = "sdhi0";
- };
-
- sdhi1_pins: sd1 {
-- renesas,gpios = "sdhi1_data4", "sdhi1_ctrl";
-+ renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
- renesas,function = "sdhi1";
- };
-
- sdhi2_pins: sd2 {
-- renesas,gpios = "sdhi2_data4", "sdhi2_ctrl";
-+ renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
- renesas,function = "sdhi2";
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch b/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch
deleted file mode 100644
index 208a0f75a61df..0000000000000
--- a/patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From dc5d74e09e8b6dbc4ce631565e4dc6d75da8d117 Mon Sep 17 00:00:00 2001
-From: Hans de Goede <hdegoede@redhat.com>
-Date: Tue, 11 Feb 2014 17:54:46 +0100
-Subject: xhci-platform: Change compatible string from xhci-platform to
- generic-xhci
-
-This brings the xhci-platform bindings in sync with what we've done for
-the ohci- and ehci-platform drivers. As discussed there using platform as a
-postfix is a bit weird as the platform bus is a Linux specific thing and
-the bindings are supposed to be OS agnostic.
-
-Note that the old xhci-platform compatible string is kept around for, well,
-compatibility reasons.
-
-Signed-off-by: Hans de Goede <hdegoede@redhat.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 0f94388b27c599015b74eedf1a32126a3f5fc0f9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/usb/usb-xhci.txt | 4 ++--
- drivers/usb/host/xhci-plat.c | 1 +
- 2 files changed, 3 insertions(+), 2 deletions(-)
-
---- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
-+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-@@ -1,14 +1,14 @@
- USB xHCI controllers
-
- Required properties:
-- - compatible: should be "xhci-platform".
-+ - compatible: should be "generic-xhci" (deprecated: "xhci-platform").
- - reg: should contain address and length of the standard XHCI
- register set for the device.
- - interrupts: one XHCI interrupt should be described here.
-
- Example:
- usb@f0931000 {
-- compatible = "xhci-platform";
-+ compatible = "generic-xhci";
- reg = <0xf0931000 0x8c8>;
- interrupts = <0x0 0x4e 0x0>;
- };
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -234,6 +234,7 @@ static const struct dev_pm_ops xhci_plat
-
- #ifdef CONFIG_OF
- static const struct of_device_id usb_xhci_of_match[] = {
-+ { .compatible = "generic-xhci" },
- { .compatible = "xhci-platform" },
- { },
- };
diff --git a/patches.renesas/0364-ASoC-rcar-subnode-tidyup-for-renesas-rsnd.txt.patch b/patches.renesas/0364-ASoC-rcar-subnode-tidyup-for-renesas-rsnd.txt.patch
deleted file mode 100644
index c11b4a2390621..0000000000000
--- a/patches.renesas/0364-ASoC-rcar-subnode-tidyup-for-renesas-rsnd.txt.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 1d2a3ffda89d2625e40416b2737d941934859057 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 23 Mar 2014 20:29:15 -0700
-Subject: ASoC: rcar: subnode tidyup for renesas,rsnd.txt
-
-rcar_sound,ssi/src/dai subnode documentation
-become more cleaner
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8bab0dd58037623b723b768ee2eb1f7dd1ad0416)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/sound/renesas,rsnd.txt | 15 ++++++++++++---
- 1 file changed, 12 insertions(+), 3 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-index 7c6d33f29796..a44e9179faf5 100644
---- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-@@ -7,14 +7,23 @@ Required properties:
- required register is
- SRU/ADG/SSI if generation1
- SRU/ADG/SSIU/SSI if generation2
--- rcar_sound,ssi : SSI subnode
--- rcar_sound,scu : SCU subnode
--- rcar_sound,dai : DAI subnode
-+- rcar_sound,ssi : Should contain SSI feature.
-+ The number of SSI subnode should be same as HW.
-+ see below for detail.
-+- rcar_sound,src : Should contain SRC feature.
-+ The number of SRC subnode should be same as HW.
-+ see below for detail.
-+- rcar_sound,dai : DAI contents.
-+ The number of DAI subnode should be same as HW.
-+ see below for detail.
-
- SSI subnode properties:
- - interrupts : Should contain SSI interrupt for PIO transfer
- - shared-pin : if shared clock pin
-
-+SRC subnode properties:
-+no properties at this point
-+
- DAI subnode properties:
- - playback : list of playback modules
- - capture : list of capture modules
---
-2.1.2
-
diff --git a/patches.renesas/0365-ARM-shmobile-r8a7790-Correct-SYS-DMAC-clock-defines.patch b/patches.renesas/0365-ARM-shmobile-r8a7790-Correct-SYS-DMAC-clock-defines.patch
deleted file mode 100644
index a470bce793411..0000000000000
--- a/patches.renesas/0365-ARM-shmobile-r8a7790-Correct-SYS-DMAC-clock-defines.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 3211371595549e1911790fac9bcc10fd94ba860f Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 6 Feb 2014 09:25:01 +0900
-Subject: ARM: shmobile: r8a7790: Correct SYS DMAC clock defines
-
-This brings the implementation into line with the documentation.
-
-This problem was introduced when SYS DMAC clock defines were added by
-ac991dce6498b5fc ("ARM: shmobile: r8a7790: Add clock index macros for DT
-sources") in v3.13-rc2. I do not believe this results in any problems as
-these defines do not appear to be used anywhere yet.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b998da0541e64da5bd857c09347c0fa954c03432)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/dt-bindings/clock/r8a7790-clock.h | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
-index 859e9be511d9..6548a5fbcf4a 100644
---- a/include/dt-bindings/clock/r8a7790-clock.h
-+++ b/include/dt-bindings/clock/r8a7790-clock.h
-@@ -46,8 +46,8 @@
- #define R8A7790_CLK_MSIOF1 8
- #define R8A7790_CLK_MSIOF3 15
- #define R8A7790_CLK_SCIFB2 16
--#define R8A7790_CLK_SYS_DMAC0 18
--#define R8A7790_CLK_SYS_DMAC1 19
-+#define R8A7790_CLK_SYS_DMAC1 18
-+#define R8A7790_CLK_SYS_DMAC0 19
-
- /* MSTP3 */
- #define R8A7790_CLK_TPU0 4
---
-2.1.2
-
diff --git a/patches.renesas/0366-media-v4l-vsp1-Remove-unexisting-rt-clocks.patch b/patches.renesas/0366-media-v4l-vsp1-Remove-unexisting-rt-clocks.patch
deleted file mode 100644
index 9fb6f6090db41..0000000000000
--- a/patches.renesas/0366-media-v4l-vsp1-Remove-unexisting-rt-clocks.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From f6a817e452d873efbdd6efab609932524ce24e3a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 2 Apr 2014 11:21:56 -0300
-Subject: [media] v4l: vsp1: Remove unexisting rt clocks
-
-The VSP1 has no rt clock. Remove them from the driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 4fc7878401f9980a5f1c24caae9b19adf61ea3f8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1.h | 1 -
- drivers/media/platform/vsp1/vsp1_drv.c | 40 +++++-----------------------------
- 2 files changed, 5 insertions(+), 36 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1.h b/drivers/media/platform/vsp1/vsp1.h
-index 0313210c6e9e..8626e9b956c2 100644
---- a/drivers/media/platform/vsp1/vsp1.h
-+++ b/drivers/media/platform/vsp1/vsp1.h
-@@ -45,7 +45,6 @@ struct vsp1_device {
-
- void __iomem *mmio;
- struct clk *clock;
-- struct clk *rt_clock;
-
- struct mutex lock;
- int ref_count;
-diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
-index 2f74f0e0ddf5..3cd2df5af90e 100644
---- a/drivers/media/platform/vsp1/vsp1_drv.c
-+++ b/drivers/media/platform/vsp1/vsp1_drv.c
-@@ -329,33 +329,6 @@ static int vsp1_device_init(struct vsp1_device *vsp1)
- return 0;
- }
-
--static int vsp1_clocks_enable(struct vsp1_device *vsp1)
--{
-- int ret;
--
-- ret = clk_prepare_enable(vsp1->clock);
-- if (ret < 0)
-- return ret;
--
-- if (IS_ERR(vsp1->rt_clock))
-- return 0;
--
-- ret = clk_prepare_enable(vsp1->rt_clock);
-- if (ret < 0) {
-- clk_disable_unprepare(vsp1->clock);
-- return ret;
-- }
--
-- return 0;
--}
--
--static void vsp1_clocks_disable(struct vsp1_device *vsp1)
--{
-- if (!IS_ERR(vsp1->rt_clock))
-- clk_disable_unprepare(vsp1->rt_clock);
-- clk_disable_unprepare(vsp1->clock);
--}
--
- /*
- * vsp1_device_get - Acquire the VSP1 device
- *
-@@ -373,7 +346,7 @@ struct vsp1_device *vsp1_device_get(struct vsp1_device *vsp1)
- if (vsp1->ref_count > 0)
- goto done;
-
-- ret = vsp1_clocks_enable(vsp1);
-+ ret = clk_prepare_enable(vsp1->clock);
- if (ret < 0) {
- __vsp1 = NULL;
- goto done;
-@@ -381,7 +354,7 @@ struct vsp1_device *vsp1_device_get(struct vsp1_device *vsp1)
-
- ret = vsp1_device_init(vsp1);
- if (ret < 0) {
-- vsp1_clocks_disable(vsp1);
-+ clk_disable_unprepare(vsp1->clock);
- __vsp1 = NULL;
- goto done;
- }
-@@ -405,7 +378,7 @@ void vsp1_device_put(struct vsp1_device *vsp1)
- mutex_lock(&vsp1->lock);
-
- if (--vsp1->ref_count == 0)
-- vsp1_clocks_disable(vsp1);
-+ clk_disable_unprepare(vsp1->clock);
-
- mutex_unlock(&vsp1->lock);
- }
-@@ -424,7 +397,7 @@ static int vsp1_pm_suspend(struct device *dev)
- if (vsp1->ref_count == 0)
- return 0;
-
-- vsp1_clocks_disable(vsp1);
-+ clk_disable_unprepare(vsp1->clock);
- return 0;
- }
-
-@@ -437,7 +410,7 @@ static int vsp1_pm_resume(struct device *dev)
- if (vsp1->ref_count)
- return 0;
-
-- return vsp1_clocks_enable(vsp1);
-+ return clk_prepare_enable(vsp1->clock);
- }
- #endif
-
-@@ -511,9 +484,6 @@ static int vsp1_probe(struct platform_device *pdev)
- return PTR_ERR(vsp1->clock);
- }
-
-- /* The RT clock is optional */
-- vsp1->rt_clock = devm_clk_get(&pdev->dev, "rt");
--
- irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
- if (!irq) {
- dev_err(&pdev->dev, "missing IRQ\n");
---
-2.1.2
-
diff --git a/patches.renesas/0367-media-v4l-vsp1-uds-Enable-scaling-of-alpha-layer.patch b/patches.renesas/0367-media-v4l-vsp1-uds-Enable-scaling-of-alpha-layer.patch
deleted file mode 100644
index c370bff455055..0000000000000
--- a/patches.renesas/0367-media-v4l-vsp1-uds-Enable-scaling-of-alpha-layer.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 5764dfb13907c155962e2909dd9b6a54e3c46c57 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 5 Mar 2014 15:49:19 -0300
-Subject: [media] v4l: vsp1: uds: Enable scaling of alpha layer
-
-Scaling of the alpha layer is disabled as both the RPF and WPF are
-configured to hardcode the alpha value to 255. This results in a 0 alpha
-value at the UDS output, making the image invisible when alpha blended
-in the BRU. Fix it by enabling scaling of the alpha layer.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 6051f5f860671577b0759a0d054781b3e599d1cd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_uds.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_uds.c b/drivers/media/platform/vsp1/vsp1_uds.c
-index 622342ac7770..1b20f28cbc39 100644
---- a/drivers/media/platform/vsp1/vsp1_uds.c
-+++ b/drivers/media/platform/vsp1/vsp1_uds.c
-@@ -131,7 +131,7 @@ static int uds_s_stream(struct v4l2_subdev *subdev, int enable)
- return 0;
-
- /* Enable multi-tap scaling. */
-- vsp1_uds_write(uds, VI6_UDS_CTRL, VI6_UDS_CTRL_BC);
-+ vsp1_uds_write(uds, VI6_UDS_CTRL, VI6_UDS_CTRL_AON | VI6_UDS_CTRL_BC);
-
- vsp1_uds_write(uds, VI6_UDS_PASS_BWIDTH,
- (uds_passband_width(uds->hscale)
-@@ -139,7 +139,6 @@ static int uds_s_stream(struct v4l2_subdev *subdev, int enable)
- (uds_passband_width(uds->vscale)
- << VI6_UDS_PASS_BWIDTH_V_SHIFT));
-
--
- /* Set the scaling ratios and the output size. */
- format = &uds->entity.formats[UDS_PAD_SOURCE];
-
---
-2.1.2
-
diff --git a/patches.renesas/0368-media-v4l-vsp1-Support-multi-input-entities.patch b/patches.renesas/0368-media-v4l-vsp1-Support-multi-input-entities.patch
deleted file mode 100644
index 02f58ab4c8c19..0000000000000
--- a/patches.renesas/0368-media-v4l-vsp1-Support-multi-input-entities.patch
+++ /dev/null
@@ -1,254 +0,0 @@
-From ffcbf3facd3daadde62c5972001f35f9e0465663 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 10 Jul 2013 18:37:27 -0300
-Subject: [media] v4l: vsp1: Support multi-input entities
-
-Rework the route configuration code to support entities with multiple
-sink pads.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit d9b45ed3d8b75e8cf38c8cd1563c29217eecba27)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_entity.c | 54 +++++++++++++++---------------
- drivers/media/platform/vsp1/vsp1_entity.h | 23 +++++++++++-
- drivers/media/platform/vsp1/vsp1_hsit.c | 7 +--
- drivers/media/platform/vsp1/vsp1_lif.c | 1
- drivers/media/platform/vsp1/vsp1_lut.c | 1
- drivers/media/platform/vsp1/vsp1_rpf.c | 1
- drivers/media/platform/vsp1/vsp1_sru.c | 1
- drivers/media/platform/vsp1/vsp1_uds.c | 1
- drivers/media/platform/vsp1/vsp1_video.c | 7 ++-
- drivers/media/platform/vsp1/vsp1_wpf.c | 1
- 10 files changed, 54 insertions(+), 43 deletions(-)
-
---- a/drivers/media/platform/vsp1/vsp1_entity.c
-+++ b/drivers/media/platform/vsp1/vsp1_entity.c
-@@ -100,8 +100,10 @@ static int vsp1_entity_link_setup(struct
- if (source->sink)
- return -EBUSY;
- source->sink = remote->entity;
-+ source->sink_pad = remote->index;
- } else {
- source->sink = NULL;
-+ source->sink_pad = 0;
- }
-
- return 0;
-@@ -116,42 +118,40 @@ const struct media_entity_operations vsp
- * Initialization
- */
-
-+static const struct vsp1_route vsp1_routes[] = {
-+ { VSP1_ENTITY_HSI, 0, VI6_DPR_HSI_ROUTE, { VI6_DPR_NODE_HSI, } },
-+ { VSP1_ENTITY_HST, 0, VI6_DPR_HST_ROUTE, { VI6_DPR_NODE_HST, } },
-+ { VSP1_ENTITY_LIF, 0, 0, { VI6_DPR_NODE_LIF, } },
-+ { VSP1_ENTITY_LUT, 0, VI6_DPR_LUT_ROUTE, { VI6_DPR_NODE_LUT, } },
-+ { VSP1_ENTITY_RPF, 0, VI6_DPR_RPF_ROUTE(0), { VI6_DPR_NODE_RPF(0), } },
-+ { VSP1_ENTITY_RPF, 1, VI6_DPR_RPF_ROUTE(1), { VI6_DPR_NODE_RPF(1), } },
-+ { VSP1_ENTITY_RPF, 2, VI6_DPR_RPF_ROUTE(2), { VI6_DPR_NODE_RPF(2), } },
-+ { VSP1_ENTITY_RPF, 3, VI6_DPR_RPF_ROUTE(3), { VI6_DPR_NODE_RPF(3), } },
-+ { VSP1_ENTITY_RPF, 4, VI6_DPR_RPF_ROUTE(4), { VI6_DPR_NODE_RPF(4), } },
-+ { VSP1_ENTITY_SRU, 0, VI6_DPR_SRU_ROUTE, { VI6_DPR_NODE_SRU, } },
-+ { VSP1_ENTITY_UDS, 0, VI6_DPR_UDS_ROUTE(0), { VI6_DPR_NODE_UDS(0), } },
-+ { VSP1_ENTITY_UDS, 1, VI6_DPR_UDS_ROUTE(1), { VI6_DPR_NODE_UDS(1), } },
-+ { VSP1_ENTITY_UDS, 2, VI6_DPR_UDS_ROUTE(2), { VI6_DPR_NODE_UDS(2), } },
-+ { VSP1_ENTITY_WPF, 0, 0, { VI6_DPR_NODE_WPF(0), } },
-+ { VSP1_ENTITY_WPF, 1, 0, { VI6_DPR_NODE_WPF(1), } },
-+ { VSP1_ENTITY_WPF, 2, 0, { VI6_DPR_NODE_WPF(2), } },
-+ { VSP1_ENTITY_WPF, 3, 0, { VI6_DPR_NODE_WPF(3), } },
-+};
-+
- int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
- unsigned int num_pads)
- {
-- static const struct {
-- unsigned int id;
-- unsigned int reg;
-- } routes[] = {
-- { VI6_DPR_NODE_HSI, VI6_DPR_HSI_ROUTE },
-- { VI6_DPR_NODE_HST, VI6_DPR_HST_ROUTE },
-- { VI6_DPR_NODE_LIF, 0 },
-- { VI6_DPR_NODE_LUT, VI6_DPR_LUT_ROUTE },
-- { VI6_DPR_NODE_RPF(0), VI6_DPR_RPF_ROUTE(0) },
-- { VI6_DPR_NODE_RPF(1), VI6_DPR_RPF_ROUTE(1) },
-- { VI6_DPR_NODE_RPF(2), VI6_DPR_RPF_ROUTE(2) },
-- { VI6_DPR_NODE_RPF(3), VI6_DPR_RPF_ROUTE(3) },
-- { VI6_DPR_NODE_RPF(4), VI6_DPR_RPF_ROUTE(4) },
-- { VI6_DPR_NODE_SRU, VI6_DPR_SRU_ROUTE },
-- { VI6_DPR_NODE_UDS(0), VI6_DPR_UDS_ROUTE(0) },
-- { VI6_DPR_NODE_UDS(1), VI6_DPR_UDS_ROUTE(1) },
-- { VI6_DPR_NODE_UDS(2), VI6_DPR_UDS_ROUTE(2) },
-- { VI6_DPR_NODE_WPF(0), 0 },
-- { VI6_DPR_NODE_WPF(1), 0 },
-- { VI6_DPR_NODE_WPF(2), 0 },
-- { VI6_DPR_NODE_WPF(3), 0 },
-- };
--
- unsigned int i;
-
-- for (i = 0; i < ARRAY_SIZE(routes); ++i) {
-- if (routes[i].id == entity->id) {
-- entity->route = routes[i].reg;
-+ for (i = 0; i < ARRAY_SIZE(vsp1_routes); ++i) {
-+ if (vsp1_routes[i].type == entity->type &&
-+ vsp1_routes[i].index == entity->index) {
-+ entity->route = &vsp1_routes[i];
- break;
- }
- }
-
-- if (i == ARRAY_SIZE(routes))
-+ if (i == ARRAY_SIZE(vsp1_routes))
- return -EINVAL;
-
- entity->vsp1 = vsp1;
---- a/drivers/media/platform/vsp1/vsp1_entity.h
-+++ b/drivers/media/platform/vsp1/vsp1_entity.h
-@@ -30,13 +30,31 @@ enum vsp1_entity_type {
- VSP1_ENTITY_WPF,
- };
-
-+/*
-+ * struct vsp1_route - Entity routing configuration
-+ * @type: Entity type this routing entry is associated with
-+ * @index: Entity index this routing entry is associated with
-+ * @reg: Output routing configuration register
-+ * @inputs: Target node value for each input
-+ *
-+ * Each $vsp1_route entry describes routing configuration for the entity
-+ * specified by the entry's @type and @index. @reg indicates the register that
-+ * holds output routing configuration for the entity, and the @inputs array
-+ * store the target node value for each input of the entity.
-+ */
-+struct vsp1_route {
-+ enum vsp1_entity_type type;
-+ unsigned int index;
-+ unsigned int reg;
-+ unsigned int inputs[4];
-+};
-+
- struct vsp1_entity {
- struct vsp1_device *vsp1;
-
- enum vsp1_entity_type type;
- unsigned int index;
-- unsigned int id;
-- unsigned int route;
-+ const struct vsp1_route *route;
-
- struct list_head list_dev;
- struct list_head list_pipe;
-@@ -45,6 +63,7 @@ struct vsp1_entity {
- unsigned int source_pad;
-
- struct media_entity *sink;
-+ unsigned int sink_pad;
-
- struct v4l2_subdev subdev;
- struct v4l2_mbus_framefmt *formats;
---- a/drivers/media/platform/vsp1/vsp1_hsit.c
-+++ b/drivers/media/platform/vsp1/vsp1_hsit.c
-@@ -193,13 +193,10 @@ struct vsp1_hsit *vsp1_hsit_create(struc
-
- hsit->inverse = inverse;
-
-- if (inverse) {
-+ if (inverse)
- hsit->entity.type = VSP1_ENTITY_HSI;
-- hsit->entity.id = VI6_DPR_NODE_HSI;
-- } else {
-+ else
- hsit->entity.type = VSP1_ENTITY_HST;
-- hsit->entity.id = VI6_DPR_NODE_HST;
-- }
-
- ret = vsp1_entity_init(vsp1, &hsit->entity, 2);
- if (ret < 0)
---- a/drivers/media/platform/vsp1/vsp1_lif.c
-+++ b/drivers/media/platform/vsp1/vsp1_lif.c
-@@ -215,7 +215,6 @@ struct vsp1_lif *vsp1_lif_create(struct
- return ERR_PTR(-ENOMEM);
-
- lif->entity.type = VSP1_ENTITY_LIF;
-- lif->entity.id = VI6_DPR_NODE_LIF;
-
- ret = vsp1_entity_init(vsp1, &lif->entity, 2);
- if (ret < 0)
---- a/drivers/media/platform/vsp1/vsp1_lut.c
-+++ b/drivers/media/platform/vsp1/vsp1_lut.c
-@@ -229,7 +229,6 @@ struct vsp1_lut *vsp1_lut_create(struct
- return ERR_PTR(-ENOMEM);
-
- lut->entity.type = VSP1_ENTITY_LUT;
-- lut->entity.id = VI6_DPR_NODE_LUT;
-
- ret = vsp1_entity_init(vsp1, &lut->entity, 2);
- if (ret < 0)
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -176,7 +176,6 @@ struct vsp1_rwpf *vsp1_rpf_create(struct
-
- rpf->entity.type = VSP1_ENTITY_RPF;
- rpf->entity.index = index;
-- rpf->entity.id = VI6_DPR_NODE_RPF(index);
-
- ret = vsp1_entity_init(vsp1, &rpf->entity, 2);
- if (ret < 0)
---- a/drivers/media/platform/vsp1/vsp1_sru.c
-+++ b/drivers/media/platform/vsp1/vsp1_sru.c
-@@ -327,7 +327,6 @@ struct vsp1_sru *vsp1_sru_create(struct
- return ERR_PTR(-ENOMEM);
-
- sru->entity.type = VSP1_ENTITY_SRU;
-- sru->entity.id = VI6_DPR_NODE_SRU;
-
- ret = vsp1_entity_init(vsp1, &sru->entity, 2);
- if (ret < 0)
---- a/drivers/media/platform/vsp1/vsp1_uds.c
-+++ b/drivers/media/platform/vsp1/vsp1_uds.c
-@@ -322,7 +322,6 @@ struct vsp1_uds *vsp1_uds_create(struct
-
- uds->entity.type = VSP1_ENTITY_UDS;
- uds->entity.index = index;
-- uds->entity.id = VI6_DPR_NODE_UDS(index);
-
- ret = vsp1_entity_init(vsp1, &uds->entity, 2);
- if (ret < 0)
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -461,7 +461,7 @@ static int vsp1_pipeline_stop(struct vsp
-
- list_for_each_entry(entity, &pipe->entities, list_pipe) {
- if (entity->route)
-- vsp1_write(entity->vsp1, entity->route,
-+ vsp1_write(entity->vsp1, entity->route->reg,
- VI6_DPR_NODE_UNUSED);
-
- v4l2_subdev_call(&entity->subdev, video, s_stream, 0);
-@@ -678,11 +678,12 @@ static void vsp1_entity_route_setup(stru
- {
- struct vsp1_entity *sink;
-
-- if (source->route == 0)
-+ if (source->route->reg == 0)
- return;
-
- sink = container_of(source->sink, struct vsp1_entity, subdev.entity);
-- vsp1_write(source->vsp1, source->route, sink->id);
-+ vsp1_write(source->vsp1, source->route->reg,
-+ sink->route->inputs[source->sink_pad]);
- }
-
- static int vsp1_video_start_streaming(struct vb2_queue *vq, unsigned int count)
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -181,7 +181,6 @@ struct vsp1_rwpf *vsp1_wpf_create(struct
-
- wpf->entity.type = VSP1_ENTITY_WPF;
- wpf->entity.index = index;
-- wpf->entity.id = VI6_DPR_NODE_WPF(index);
-
- ret = vsp1_entity_init(vsp1, &wpf->entity, 2);
- if (ret < 0)
diff --git a/patches.renesas/0369-media-v4l-vsp1-Add-BRU-support.patch b/patches.renesas/0369-media-v4l-vsp1-Add-BRU-support.patch
deleted file mode 100644
index a2109b26060df..0000000000000
--- a/patches.renesas/0369-media-v4l-vsp1-Add-BRU-support.patch
+++ /dev/null
@@ -1,817 +0,0 @@
-From e71ae3c9c4d461976d62989144f495cffca5daeb Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 10 Jul 2013 18:03:46 -0300
-Subject: [media] v4l: vsp1: Add BRU support
-
-The Blend ROP Unit performs blending and ROP operations for up to four
-sources.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 629bb6d4b38fe62d36ab52ad22c3ab726f6ce6e8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/Makefile | 2 +-
- drivers/media/platform/vsp1/vsp1.h | 2 +
- drivers/media/platform/vsp1/vsp1_bru.c | 395 ++++++++++++++++++++++++++++++
- drivers/media/platform/vsp1/vsp1_bru.h | 39 +++
- drivers/media/platform/vsp1/vsp1_drv.c | 9 +
- drivers/media/platform/vsp1/vsp1_entity.c | 3 +
- drivers/media/platform/vsp1/vsp1_entity.h | 1 +
- drivers/media/platform/vsp1/vsp1_regs.h | 98 ++++++++
- drivers/media/platform/vsp1/vsp1_rpf.c | 6 +-
- drivers/media/platform/vsp1/vsp1_rwpf.h | 4 +
- drivers/media/platform/vsp1/vsp1_video.c | 19 ++
- drivers/media/platform/vsp1/vsp1_video.h | 1 +
- drivers/media/platform/vsp1/vsp1_wpf.c | 12 +-
- 13 files changed, 586 insertions(+), 5 deletions(-)
- create mode 100644 drivers/media/platform/vsp1/vsp1_bru.c
- create mode 100644 drivers/media/platform/vsp1/vsp1_bru.h
-
-diff --git a/drivers/media/platform/vsp1/Makefile b/drivers/media/platform/vsp1/Makefile
-index 151cecd0ea25..6a93f928dfde 100644
---- a/drivers/media/platform/vsp1/Makefile
-+++ b/drivers/media/platform/vsp1/Makefile
-@@ -1,6 +1,6 @@
- vsp1-y := vsp1_drv.o vsp1_entity.o vsp1_video.o
- vsp1-y += vsp1_rpf.o vsp1_rwpf.o vsp1_wpf.o
- vsp1-y += vsp1_hsit.o vsp1_lif.o vsp1_lut.o
--vsp1-y += vsp1_sru.o vsp1_uds.o
-+vsp1-y += vsp1_bru.o vsp1_sru.o vsp1_uds.o
-
- obj-$(CONFIG_VIDEO_RENESAS_VSP1) += vsp1.o
-diff --git a/drivers/media/platform/vsp1/vsp1.h b/drivers/media/platform/vsp1/vsp1.h
-index 8626e9b956c2..6ca2cf20d545 100644
---- a/drivers/media/platform/vsp1/vsp1.h
-+++ b/drivers/media/platform/vsp1/vsp1.h
-@@ -28,6 +28,7 @@ struct clk;
- struct device;
-
- struct vsp1_platform_data;
-+struct vsp1_bru;
- struct vsp1_hsit;
- struct vsp1_lif;
- struct vsp1_lut;
-@@ -49,6 +50,7 @@ struct vsp1_device {
- struct mutex lock;
- int ref_count;
-
-+ struct vsp1_bru *bru;
- struct vsp1_hsit *hsi;
- struct vsp1_hsit *hst;
- struct vsp1_lif *lif;
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c
-new file mode 100644
-index 000000000000..f80695480060
---- /dev/null
-+++ b/drivers/media/platform/vsp1/vsp1_bru.c
-@@ -0,0 +1,395 @@
-+/*
-+ * vsp1_bru.c -- R-Car VSP1 Blend ROP Unit
-+ *
-+ * Copyright (C) 2013 Renesas Corporation
-+ *
-+ * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.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.
-+ */
-+
-+#include <linux/device.h>
-+#include <linux/gfp.h>
-+
-+#include <media/v4l2-subdev.h>
-+
-+#include "vsp1.h"
-+#include "vsp1_bru.h"
-+
-+#define BRU_MIN_SIZE 4U
-+#define BRU_MAX_SIZE 8190U
-+
-+/* -----------------------------------------------------------------------------
-+ * Device Access
-+ */
-+
-+static inline u32 vsp1_bru_read(struct vsp1_bru *bru, u32 reg)
-+{
-+ return vsp1_read(bru->entity.vsp1, reg);
-+}
-+
-+static inline void vsp1_bru_write(struct vsp1_bru *bru, u32 reg, u32 data)
-+{
-+ vsp1_write(bru->entity.vsp1, reg, data);
-+}
-+
-+/* -----------------------------------------------------------------------------
-+ * V4L2 Subdevice Core Operations
-+ */
-+
-+static bool bru_is_input_enabled(struct vsp1_bru *bru, unsigned int input)
-+{
-+ return media_entity_remote_pad(&bru->entity.pads[input]) != NULL;
-+}
-+
-+static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
-+{
-+ struct vsp1_bru *bru = to_bru(subdev);
-+ struct v4l2_mbus_framefmt *format;
-+ unsigned int i;
-+
-+ if (!enable)
-+ return 0;
-+
-+ format = &bru->entity.formats[BRU_PAD_SOURCE];
-+
-+ /* The hardware is extremely flexible but we have no userspace API to
-+ * expose all the parameters, nor is it clear whether we would have use
-+ * cases for all the supported modes. Let's just harcode the parameters
-+ * to sane default values for now.
-+ */
-+
-+ /* Disable both color data normalization and dithering. */
-+ vsp1_bru_write(bru, VI6_BRU_INCTRL, 0);
-+
-+ /* Set the background position to cover the whole output image and
-+ * set its color to opaque black.
-+ */
-+ vsp1_bru_write(bru, VI6_BRU_VIRRPF_SIZE,
-+ (format->width << VI6_BRU_VIRRPF_SIZE_HSIZE_SHIFT) |
-+ (format->height << VI6_BRU_VIRRPF_SIZE_VSIZE_SHIFT));
-+ vsp1_bru_write(bru, VI6_BRU_VIRRPF_LOC, 0);
-+ vsp1_bru_write(bru, VI6_BRU_VIRRPF_COL,
-+ 0xff << VI6_BRU_VIRRPF_COL_A_SHIFT);
-+
-+ /* Route BRU input 1 as SRC input to the ROP unit and configure the ROP
-+ * unit with a NOP operation to make BRU input 1 available as the
-+ * Blend/ROP unit B SRC input.
-+ */
-+ vsp1_bru_write(bru, VI6_BRU_ROP, VI6_BRU_ROP_DSTSEL_BRUIN(1) |
-+ VI6_BRU_ROP_CROP(VI6_ROP_NOP) |
-+ VI6_BRU_ROP_AROP(VI6_ROP_NOP));
-+
-+ for (i = 0; i < 4; ++i) {
-+ u32 ctrl = 0;
-+
-+ /* Configure all Blend/ROP units corresponding to an enabled BRU
-+ * input for alpha blending. Blend/ROP units corresponding to
-+ * disabled BRU inputs are used in ROP NOP mode to ignore the
-+ * SRC input.
-+ */
-+ if (bru_is_input_enabled(bru, i))
-+ ctrl |= VI6_BRU_CTRL_RBC;
-+ else
-+ ctrl |= VI6_BRU_CTRL_CROP(VI6_ROP_NOP)
-+ | VI6_BRU_CTRL_AROP(VI6_ROP_NOP);
-+
-+ /* Select the virtual RPF as the Blend/ROP unit A DST input to
-+ * serve as a background color.
-+ */
-+ if (i == 0)
-+ ctrl |= VI6_BRU_CTRL_DSTSEL_VRPF;
-+
-+ /* Route BRU inputs 0 to 3 as SRC inputs to Blend/ROP units A to
-+ * D in that order. The Blend/ROP unit B SRC is hardwired to the
-+ * ROP unit output, the corresponding register bits must be set
-+ * to 0.
-+ */
-+ if (i != 1)
-+ ctrl |= VI6_BRU_CTRL_SRCSEL_BRUIN(i);
-+
-+ vsp1_bru_write(bru, VI6_BRU_CTRL(i), ctrl);
-+
-+ /* Harcode the blending formula to
-+ *
-+ * DSTc = DSTc * (1 - SRCa) + SRCc * SRCa
-+ * DSTa = DSTa * (1 - SRCa) + SRCa
-+ */
-+ vsp1_bru_write(bru, VI6_BRU_BLD(i),
-+ VI6_BRU_BLD_CCMDX_255_SRC_A |
-+ VI6_BRU_BLD_CCMDY_SRC_A |
-+ VI6_BRU_BLD_ACMDX_255_SRC_A |
-+ VI6_BRU_BLD_ACMDY_COEFY |
-+ (0xff << VI6_BRU_BLD_COEFY_SHIFT));
-+ }
-+
-+ return 0;
-+}
-+
-+/* -----------------------------------------------------------------------------
-+ * V4L2 Subdevice Pad Operations
-+ */
-+
-+/*
-+ * The BRU can't perform format conversion, all sink and source formats must be
-+ * identical. We pick the format on the first sink pad (pad 0) and propagate it
-+ * to all other pads.
-+ */
-+
-+static int bru_enum_mbus_code(struct v4l2_subdev *subdev,
-+ struct v4l2_subdev_fh *fh,
-+ struct v4l2_subdev_mbus_code_enum *code)
-+{
-+ static const unsigned int codes[] = {
-+ V4L2_MBUS_FMT_ARGB8888_1X32,
-+ V4L2_MBUS_FMT_AYUV8_1X32,
-+ };
-+ struct v4l2_mbus_framefmt *format;
-+
-+ if (code->pad == BRU_PAD_SINK(0)) {
-+ if (code->index >= ARRAY_SIZE(codes))
-+ return -EINVAL;
-+
-+ code->code = codes[code->index];
-+ } else {
-+ if (code->index)
-+ return -EINVAL;
-+
-+ format = v4l2_subdev_get_try_format(fh, BRU_PAD_SINK(0));
-+ code->code = format->code;
-+ }
-+
-+ return 0;
-+}
-+
-+static int bru_enum_frame_size(struct v4l2_subdev *subdev,
-+ struct v4l2_subdev_fh *fh,
-+ struct v4l2_subdev_frame_size_enum *fse)
-+{
-+ if (fse->index)
-+ return -EINVAL;
-+
-+ if (fse->code != V4L2_MBUS_FMT_ARGB8888_1X32 &&
-+ fse->code != V4L2_MBUS_FMT_AYUV8_1X32)
-+ return -EINVAL;
-+
-+ fse->min_width = BRU_MIN_SIZE;
-+ fse->max_width = BRU_MAX_SIZE;
-+ fse->min_height = BRU_MIN_SIZE;
-+ fse->max_height = BRU_MAX_SIZE;
-+
-+ return 0;
-+}
-+
-+static struct v4l2_rect *bru_get_compose(struct vsp1_bru *bru,
-+ struct v4l2_subdev_fh *fh,
-+ unsigned int pad, u32 which)
-+{
-+ switch (which) {
-+ case V4L2_SUBDEV_FORMAT_TRY:
-+ return v4l2_subdev_get_try_crop(fh, pad);
-+ case V4L2_SUBDEV_FORMAT_ACTIVE:
-+ return &bru->compose[pad];
-+ default:
-+ return NULL;
-+ }
-+}
-+
-+static int bru_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh,
-+ struct v4l2_subdev_format *fmt)
-+{
-+ struct vsp1_bru *bru = to_bru(subdev);
-+
-+ fmt->format = *vsp1_entity_get_pad_format(&bru->entity, fh, fmt->pad,
-+ fmt->which);
-+
-+ return 0;
-+}
-+
-+static void bru_try_format(struct vsp1_bru *bru, struct v4l2_subdev_fh *fh,
-+ unsigned int pad, struct v4l2_mbus_framefmt *fmt,
-+ enum v4l2_subdev_format_whence which)
-+{
-+ struct v4l2_mbus_framefmt *format;
-+
-+ switch (pad) {
-+ case BRU_PAD_SINK(0):
-+ /* Default to YUV if the requested format is not supported. */
-+ if (fmt->code != V4L2_MBUS_FMT_ARGB8888_1X32 &&
-+ fmt->code != V4L2_MBUS_FMT_AYUV8_1X32)
-+ fmt->code = V4L2_MBUS_FMT_AYUV8_1X32;
-+ break;
-+
-+ default:
-+ /* The BRU can't perform format conversion. */
-+ format = vsp1_entity_get_pad_format(&bru->entity, fh,
-+ BRU_PAD_SINK(0), which);
-+ fmt->code = format->code;
-+ break;
-+ }
-+
-+ fmt->width = clamp(fmt->width, BRU_MIN_SIZE, BRU_MAX_SIZE);
-+ fmt->height = clamp(fmt->height, BRU_MIN_SIZE, BRU_MAX_SIZE);
-+ fmt->field = V4L2_FIELD_NONE;
-+ fmt->colorspace = V4L2_COLORSPACE_SRGB;
-+}
-+
-+static int bru_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh,
-+ struct v4l2_subdev_format *fmt)
-+{
-+ struct vsp1_bru *bru = to_bru(subdev);
-+ struct v4l2_mbus_framefmt *format;
-+
-+ bru_try_format(bru, fh, fmt->pad, &fmt->format, fmt->which);
-+
-+ format = vsp1_entity_get_pad_format(&bru->entity, fh, fmt->pad,
-+ fmt->which);
-+ *format = fmt->format;
-+
-+ /* Reset the compose rectangle */
-+ if (fmt->pad != BRU_PAD_SOURCE) {
-+ struct v4l2_rect *compose;
-+
-+ compose = bru_get_compose(bru, fh, fmt->pad, fmt->which);
-+ compose->left = 0;
-+ compose->top = 0;
-+ compose->width = format->width;
-+ compose->height = format->height;
-+ }
-+
-+ /* Propagate the format code to all pads */
-+ if (fmt->pad == BRU_PAD_SINK(0)) {
-+ unsigned int i;
-+
-+ for (i = 0; i <= BRU_PAD_SOURCE; ++i) {
-+ format = vsp1_entity_get_pad_format(&bru->entity, fh,
-+ i, fmt->which);
-+ format->code = fmt->format.code;
-+ }
-+ }
-+
-+ return 0;
-+}
-+
-+static int bru_get_selection(struct v4l2_subdev *subdev,
-+ struct v4l2_subdev_fh *fh,
-+ struct v4l2_subdev_selection *sel)
-+{
-+ struct vsp1_bru *bru = to_bru(subdev);
-+
-+ if (sel->pad == BRU_PAD_SOURCE)
-+ return -EINVAL;
-+
-+ switch (sel->target) {
-+ case V4L2_SEL_TGT_COMPOSE_BOUNDS:
-+ sel->r.left = 0;
-+ sel->r.top = 0;
-+ sel->r.width = BRU_MAX_SIZE;
-+ sel->r.height = BRU_MAX_SIZE;
-+ return 0;
-+
-+ case V4L2_SEL_TGT_COMPOSE:
-+ sel->r = *bru_get_compose(bru, fh, sel->pad, sel->which);
-+ return 0;
-+
-+ default:
-+ return -EINVAL;
-+ }
-+}
-+
-+static int bru_set_selection(struct v4l2_subdev *subdev,
-+ struct v4l2_subdev_fh *fh,
-+ struct v4l2_subdev_selection *sel)
-+{
-+ struct vsp1_bru *bru = to_bru(subdev);
-+ struct v4l2_mbus_framefmt *format;
-+ struct v4l2_rect *compose;
-+
-+ if (sel->pad == BRU_PAD_SOURCE)
-+ return -EINVAL;
-+
-+ if (sel->target != V4L2_SEL_TGT_COMPOSE)
-+ return -EINVAL;
-+
-+ /* The compose rectangle top left corner must be inside the output
-+ * frame.
-+ */
-+ format = vsp1_entity_get_pad_format(&bru->entity, fh, BRU_PAD_SOURCE,
-+ sel->which);
-+ sel->r.left = clamp_t(unsigned int, sel->r.left, 0, format->width - 1);
-+ sel->r.top = clamp_t(unsigned int, sel->r.top, 0, format->height - 1);
-+
-+ /* Scaling isn't supported, the compose rectangle size must be identical
-+ * to the sink format size.
-+ */
-+ format = vsp1_entity_get_pad_format(&bru->entity, fh, sel->pad,
-+ sel->which);
-+ sel->r.width = format->width;
-+ sel->r.height = format->height;
-+
-+ compose = bru_get_compose(bru, fh, sel->pad, sel->which);
-+ *compose = sel->r;
-+
-+ return 0;
-+}
-+
-+/* -----------------------------------------------------------------------------
-+ * V4L2 Subdevice Operations
-+ */
-+
-+static struct v4l2_subdev_video_ops bru_video_ops = {
-+ .s_stream = bru_s_stream,
-+};
-+
-+static struct v4l2_subdev_pad_ops bru_pad_ops = {
-+ .enum_mbus_code = bru_enum_mbus_code,
-+ .enum_frame_size = bru_enum_frame_size,
-+ .get_fmt = bru_get_format,
-+ .set_fmt = bru_set_format,
-+ .get_selection = bru_get_selection,
-+ .set_selection = bru_set_selection,
-+};
-+
-+static struct v4l2_subdev_ops bru_ops = {
-+ .video = &bru_video_ops,
-+ .pad = &bru_pad_ops,
-+};
-+
-+/* -----------------------------------------------------------------------------
-+ * Initialization and Cleanup
-+ */
-+
-+struct vsp1_bru *vsp1_bru_create(struct vsp1_device *vsp1)
-+{
-+ struct v4l2_subdev *subdev;
-+ struct vsp1_bru *bru;
-+ int ret;
-+
-+ bru = devm_kzalloc(vsp1->dev, sizeof(*bru), GFP_KERNEL);
-+ if (bru == NULL)
-+ return ERR_PTR(-ENOMEM);
-+
-+ bru->entity.type = VSP1_ENTITY_BRU;
-+
-+ ret = vsp1_entity_init(vsp1, &bru->entity, 5);
-+ if (ret < 0)
-+ return ERR_PTR(ret);
-+
-+ /* Initialize the V4L2 subdev. */
-+ subdev = &bru->entity.subdev;
-+ v4l2_subdev_init(subdev, &bru_ops);
-+
-+ subdev->entity.ops = &vsp1_media_ops;
-+ subdev->internal_ops = &vsp1_subdev_internal_ops;
-+ snprintf(subdev->name, sizeof(subdev->name), "%s bru",
-+ dev_name(vsp1->dev));
-+ v4l2_set_subdevdata(subdev, bru);
-+ subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE;
-+
-+ vsp1_entity_init_formats(subdev, NULL);
-+
-+ return bru;
-+}
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.h b/drivers/media/platform/vsp1/vsp1_bru.h
-new file mode 100644
-index 000000000000..37062704dbf6
---- /dev/null
-+++ b/drivers/media/platform/vsp1/vsp1_bru.h
-@@ -0,0 +1,39 @@
-+/*
-+ * vsp1_bru.h -- R-Car VSP1 Blend ROP Unit
-+ *
-+ * Copyright (C) 2013 Renesas Corporation
-+ *
-+ * Contact: Laurent Pinchart (laurent.pinchart@ideasonboard.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 __VSP1_BRU_H__
-+#define __VSP1_BRU_H__
-+
-+#include <media/media-entity.h>
-+#include <media/v4l2-subdev.h>
-+
-+#include "vsp1_entity.h"
-+
-+struct vsp1_device;
-+
-+#define BRU_PAD_SINK(n) (n)
-+#define BRU_PAD_SOURCE 4
-+
-+struct vsp1_bru {
-+ struct vsp1_entity entity;
-+
-+ struct v4l2_rect compose[4];
-+};
-+
-+static inline struct vsp1_bru *to_bru(struct v4l2_subdev *subdev)
-+{
-+ return container_of(subdev, struct vsp1_bru, entity.subdev);
-+}
-+
-+struct vsp1_bru *vsp1_bru_create(struct vsp1_device *vsp1);
-+
-+#endif /* __VSP1_BRU_H__ */
-diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
-index 3cd2df5af90e..28e1de3270e0 100644
---- a/drivers/media/platform/vsp1/vsp1_drv.c
-+++ b/drivers/media/platform/vsp1/vsp1_drv.c
-@@ -20,6 +20,7 @@
- #include <linux/videodev2.h>
-
- #include "vsp1.h"
-+#include "vsp1_bru.h"
- #include "vsp1_hsit.h"
- #include "vsp1_lif.h"
- #include "vsp1_lut.h"
-@@ -155,6 +156,14 @@ static int vsp1_create_entities(struct vsp1_device *vsp1)
- }
-
- /* Instantiate all the entities. */
-+ vsp1->bru = vsp1_bru_create(vsp1);
-+ if (IS_ERR(vsp1->bru)) {
-+ ret = PTR_ERR(vsp1->bru);
-+ goto done;
-+ }
-+
-+ list_add_tail(&vsp1->bru->entity.list_dev, &vsp1->entities);
-+
- vsp1->hsi = vsp1_hsit_create(vsp1, true);
- if (IS_ERR(vsp1->hsi)) {
- ret = PTR_ERR(vsp1->hsi);
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
-index a9022f858aa5..44167834285d 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.c
-+++ b/drivers/media/platform/vsp1/vsp1_entity.c
-@@ -119,6 +119,9 @@ const struct media_entity_operations vsp1_media_ops = {
- */
-
- static const struct vsp1_route vsp1_routes[] = {
-+ { VSP1_ENTITY_BRU, 0, VI6_DPR_BRU_ROUTE,
-+ { VI6_DPR_NODE_BRU_IN(0), VI6_DPR_NODE_BRU_IN(1),
-+ VI6_DPR_NODE_BRU_IN(2), VI6_DPR_NODE_BRU_IN(3), } },
- { VSP1_ENTITY_HSI, 0, VI6_DPR_HSI_ROUTE, { VI6_DPR_NODE_HSI, } },
- { VSP1_ENTITY_HST, 0, VI6_DPR_HST_ROUTE, { VI6_DPR_NODE_HST, } },
- { VSP1_ENTITY_LIF, 0, 0, { VI6_DPR_NODE_LIF, } },
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
-index 3c6a5c831bcf..7afbd8a7ba66 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.h
-+++ b/drivers/media/platform/vsp1/vsp1_entity.h
-@@ -20,6 +20,7 @@
- struct vsp1_device;
-
- enum vsp1_entity_type {
-+ VSP1_ENTITY_BRU,
- VSP1_ENTITY_HSI,
- VSP1_ENTITY_HST,
- VSP1_ENTITY_LIF,
-diff --git a/drivers/media/platform/vsp1/vsp1_regs.h b/drivers/media/platform/vsp1/vsp1_regs.h
-index 28650806c20f..3e74b44286f6 100644
---- a/drivers/media/platform/vsp1/vsp1_regs.h
-+++ b/drivers/media/platform/vsp1/vsp1_regs.h
-@@ -451,13 +451,111 @@
- * BRU Control Registers
- */
-
-+#define VI6_ROP_NOP 0
-+#define VI6_ROP_AND 1
-+#define VI6_ROP_AND_REV 2
-+#define VI6_ROP_COPY 3
-+#define VI6_ROP_AND_INV 4
-+#define VI6_ROP_CLEAR 5
-+#define VI6_ROP_XOR 6
-+#define VI6_ROP_OR 7
-+#define VI6_ROP_NOR 8
-+#define VI6_ROP_EQUIV 9
-+#define VI6_ROP_INVERT 10
-+#define VI6_ROP_OR_REV 11
-+#define VI6_ROP_COPY_INV 12
-+#define VI6_ROP_OR_INV 13
-+#define VI6_ROP_NAND 14
-+#define VI6_ROP_SET 15
-+
- #define VI6_BRU_INCTRL 0x2c00
-+#define VI6_BRU_INCTRL_NRM (1 << 28)
-+#define VI6_BRU_INCTRL_DnON (1 << (16 + (n)))
-+#define VI6_BRU_INCTRL_DITHn_OFF (0 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_18BPP (1 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_16BPP (2 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_15BPP (3 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_12BPP (4 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_8BPP (5 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_MASK (7 << ((n) * 4))
-+#define VI6_BRU_INCTRL_DITHn_SHIFT ((n) * 4)
-+
- #define VI6_BRU_VIRRPF_SIZE 0x2c04
-+#define VI6_BRU_VIRRPF_SIZE_HSIZE_MASK (0x1fff << 16)
-+#define VI6_BRU_VIRRPF_SIZE_HSIZE_SHIFT 16
-+#define VI6_BRU_VIRRPF_SIZE_VSIZE_MASK (0x1fff << 0)
-+#define VI6_BRU_VIRRPF_SIZE_VSIZE_SHIFT 0
-+
- #define VI6_BRU_VIRRPF_LOC 0x2c08
-+#define VI6_BRU_VIRRPF_LOC_HCOORD_MASK (0x1fff << 16)
-+#define VI6_BRU_VIRRPF_LOC_HCOORD_SHIFT 16
-+#define VI6_BRU_VIRRPF_LOC_VCOORD_MASK (0x1fff << 0)
-+#define VI6_BRU_VIRRPF_LOC_VCOORD_SHIFT 0
-+
- #define VI6_BRU_VIRRPF_COL 0x2c0c
-+#define VI6_BRU_VIRRPF_COL_A_MASK (0xff << 24)
-+#define VI6_BRU_VIRRPF_COL_A_SHIFT 24
-+#define VI6_BRU_VIRRPF_COL_RCR_MASK (0xff << 16)
-+#define VI6_BRU_VIRRPF_COL_RCR_SHIFT 16
-+#define VI6_BRU_VIRRPF_COL_GY_MASK (0xff << 8)
-+#define VI6_BRU_VIRRPF_COL_GY_SHIFT 8
-+#define VI6_BRU_VIRRPF_COL_BCB_MASK (0xff << 0)
-+#define VI6_BRU_VIRRPF_COL_BCB_SHIFT 0
-+
- #define VI6_BRU_CTRL(n) (0x2c10 + (n) * 8)
-+#define VI6_BRU_CTRL_RBC (1 << 31)
-+#define VI6_BRU_CTRL_DSTSEL_BRUIN(n) ((n) << 20)
-+#define VI6_BRU_CTRL_DSTSEL_VRPF (4 << 20)
-+#define VI6_BRU_CTRL_DSTSEL_MASK (7 << 20)
-+#define VI6_BRU_CTRL_SRCSEL_BRUIN(n) ((n) << 16)
-+#define VI6_BRU_CTRL_SRCSEL_VRPF (4 << 16)
-+#define VI6_BRU_CTRL_SRCSEL_MASK (7 << 16)
-+#define VI6_BRU_CTRL_CROP(rop) ((rop) << 4)
-+#define VI6_BRU_CTRL_CROP_MASK (0xf << 4)
-+#define VI6_BRU_CTRL_AROP(rop) ((rop) << 0)
-+#define VI6_BRU_CTRL_AROP_MASK (0xf << 0)
-+
- #define VI6_BRU_BLD(n) (0x2c14 + (n) * 8)
-+#define VI6_BRU_BLD_CBES (1 << 31)
-+#define VI6_BRU_BLD_CCMDX_DST_A (0 << 28)
-+#define VI6_BRU_BLD_CCMDX_255_DST_A (1 << 28)
-+#define VI6_BRU_BLD_CCMDX_SRC_A (2 << 28)
-+#define VI6_BRU_BLD_CCMDX_255_SRC_A (3 << 28)
-+#define VI6_BRU_BLD_CCMDX_COEFX (4 << 28)
-+#define VI6_BRU_BLD_CCMDX_MASK (7 << 28)
-+#define VI6_BRU_BLD_CCMDY_DST_A (0 << 24)
-+#define VI6_BRU_BLD_CCMDY_255_DST_A (1 << 24)
-+#define VI6_BRU_BLD_CCMDY_SRC_A (2 << 24)
-+#define VI6_BRU_BLD_CCMDY_255_SRC_A (3 << 24)
-+#define VI6_BRU_BLD_CCMDY_COEFY (4 << 24)
-+#define VI6_BRU_BLD_CCMDY_MASK (7 << 24)
-+#define VI6_BRU_BLD_CCMDY_SHIFT 24
-+#define VI6_BRU_BLD_ABES (1 << 23)
-+#define VI6_BRU_BLD_ACMDX_DST_A (0 << 20)
-+#define VI6_BRU_BLD_ACMDX_255_DST_A (1 << 20)
-+#define VI6_BRU_BLD_ACMDX_SRC_A (2 << 20)
-+#define VI6_BRU_BLD_ACMDX_255_SRC_A (3 << 20)
-+#define VI6_BRU_BLD_ACMDX_COEFX (4 << 20)
-+#define VI6_BRU_BLD_ACMDX_MASK (7 << 20)
-+#define VI6_BRU_BLD_ACMDY_DST_A (0 << 16)
-+#define VI6_BRU_BLD_ACMDY_255_DST_A (1 << 16)
-+#define VI6_BRU_BLD_ACMDY_SRC_A (2 << 16)
-+#define VI6_BRU_BLD_ACMDY_255_SRC_A (3 << 16)
-+#define VI6_BRU_BLD_ACMDY_COEFY (4 << 16)
-+#define VI6_BRU_BLD_ACMDY_MASK (7 << 16)
-+#define VI6_BRU_BLD_COEFX_MASK (0xff << 8)
-+#define VI6_BRU_BLD_COEFX_SHIFT 8
-+#define VI6_BRU_BLD_COEFY_MASK (0xff << 0)
-+#define VI6_BRU_BLD_COEFY_SHIFT 0
-+
- #define VI6_BRU_ROP 0x2c30
-+#define VI6_BRU_ROP_DSTSEL_BRUIN(n) ((n) << 20)
-+#define VI6_BRU_ROP_DSTSEL_VRPF (4 << 20)
-+#define VI6_BRU_ROP_DSTSEL_MASK (7 << 20)
-+#define VI6_BRU_ROP_CROP(rop) ((rop) << 4)
-+#define VI6_BRU_ROP_CROP_MASK (0xf << 4)
-+#define VI6_BRU_ROP_AROP(rop) ((rop) << 0)
-+#define VI6_BRU_ROP_AROP_MASK (0xf << 0)
-
- /* -----------------------------------------------------------------------------
- * HGO Control Registers
-diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
-index 42444568b9fd..c3d98642a4aa 100644
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -96,8 +96,10 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable)
- vsp1_rpf_write(rpf, VI6_RPF_INFMT, infmt);
- vsp1_rpf_write(rpf, VI6_RPF_DSWAP, fmtinfo->swap);
-
-- /* Output location. Composing isn't supported yet. */
-- vsp1_rpf_write(rpf, VI6_RPF_LOC, 0);
-+ /* Output location */
-+ vsp1_rpf_write(rpf, VI6_RPF_LOC,
-+ (rpf->location.left << VI6_RPF_LOC_HCOORD_SHIFT) |
-+ (rpf->location.top << VI6_RPF_LOC_VCOORD_SHIFT));
-
- /* Disable alpha, mask and color key. Set the alpha channel to a fixed
- * value of 255.
-diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.h b/drivers/media/platform/vsp1/vsp1_rwpf.h
-index 5c5ee81bbeae..b4fb65e58770 100644
---- a/drivers/media/platform/vsp1/vsp1_rwpf.h
-+++ b/drivers/media/platform/vsp1/vsp1_rwpf.h
-@@ -30,6 +30,10 @@ struct vsp1_rwpf {
- unsigned int max_width;
- unsigned int max_height;
-
-+ struct {
-+ unsigned int left;
-+ unsigned int top;
-+ } location;
- struct v4l2_rect crop;
-
- unsigned int offsets[2];
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index f0406ccc329b..2fc67b6161f1 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -28,6 +28,7 @@
- #include <media/videobuf2-dma-contig.h>
-
- #include "vsp1.h"
-+#include "vsp1_bru.h"
- #include "vsp1_entity.h"
- #include "vsp1_rwpf.h"
- #include "vsp1_video.h"
-@@ -280,6 +281,9 @@ static int vsp1_pipeline_validate_branch(struct vsp1_rwpf *input,
- struct media_pad *pad;
- bool uds_found = false;
-
-+ input->location.left = 0;
-+ input->location.top = 0;
-+
- pad = media_entity_remote_pad(&input->entity.pads[RWPF_PAD_SOURCE]);
-
- while (1) {
-@@ -292,6 +296,17 @@ static int vsp1_pipeline_validate_branch(struct vsp1_rwpf *input,
-
- entity = to_vsp1_entity(media_entity_to_v4l2_subdev(pad->entity));
-
-+ /* A BRU is present in the pipeline, store the compose rectangle
-+ * location in the input RPF for use when configuring the RPF.
-+ */
-+ if (entity->type == VSP1_ENTITY_BRU) {
-+ struct vsp1_bru *bru = to_bru(&entity->subdev);
-+ struct v4l2_rect *rect = &bru->compose[pad->index];
-+
-+ input->location.left = rect->left;
-+ input->location.top = rect->top;
-+ }
-+
- /* We've reached the WPF, we're done. */
- if (entity->type == VSP1_ENTITY_WPF)
- break;
-@@ -363,6 +378,8 @@ static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
- rwpf->video.pipe_index = 0;
- } else if (e->type == VSP1_ENTITY_LIF) {
- pipe->lif = e;
-+ } else if (e->type == VSP1_ENTITY_BRU) {
-+ pipe->bru = e;
- }
- }
-
-@@ -392,6 +409,7 @@ error:
- pipe->num_video = 0;
- pipe->num_inputs = 0;
- pipe->output = NULL;
-+ pipe->bru = NULL;
- pipe->lif = NULL;
- return ret;
- }
-@@ -430,6 +448,7 @@ static void vsp1_pipeline_cleanup(struct vsp1_pipeline *pipe)
- pipe->num_video = 0;
- pipe->num_inputs = 0;
- pipe->output = NULL;
-+ pipe->bru = NULL;
- pipe->lif = NULL;
- }
-
-diff --git a/drivers/media/platform/vsp1/vsp1_video.h b/drivers/media/platform/vsp1/vsp1_video.h
-index 53e4b3745940..c04d48fa2999 100644
---- a/drivers/media/platform/vsp1/vsp1_video.h
-+++ b/drivers/media/platform/vsp1/vsp1_video.h
-@@ -75,6 +75,7 @@ struct vsp1_pipeline {
- unsigned int num_inputs;
- struct vsp1_rwpf *inputs[VPS1_MAX_RPF];
- struct vsp1_rwpf *output;
-+ struct vsp1_entity *bru;
- struct vsp1_entity *lif;
-
- struct list_head entities;
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index ef9f88ead319..1294340dcb36 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -58,13 +58,21 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
- return 0;
- }
-
-- /* Sources */
-+ /* Sources. If the pipeline has a single input configure it as the
-+ * master layer. Otherwise configure all inputs as sub-layers and
-+ * select the virtual RPF as the master layer.
-+ */
- for (i = 0; i < pipe->num_inputs; ++i) {
- struct vsp1_rwpf *input = pipe->inputs[i];
-
-- srcrpf |= VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index);
-+ srcrpf |= pipe->num_inputs == 1
-+ ? VI6_WPF_SRCRPF_RPF_ACT_MST(input->entity.index)
-+ : VI6_WPF_SRCRPF_RPF_ACT_SUB(input->entity.index);
- }
-
-+ if (pipe->num_inputs > 1)
-+ srcrpf |= VI6_WPF_SRCRPF_VIRACT_MST;
-+
- vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, srcrpf);
-
- /* Destination stride. */
---
-2.1.2
-
diff --git a/patches.renesas/0370-media-v4l-vsp1-Add-DT-support.patch b/patches.renesas/0370-media-v4l-vsp1-Add-DT-support.patch
deleted file mode 100644
index 982dd0a10f210..0000000000000
--- a/patches.renesas/0370-media-v4l-vsp1-Add-DT-support.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 18a5c404492e15b72d158c41a3ac397bbc894291 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 8 Apr 2014 13:40:13 -0300
-Subject: [media] v4l: vsp1: Add DT support
-
-Implement support for the VSP1 DT bindings in the VSP1 driver. The
-driver now first retrieves platform data either from the platform data
-pointer or by reading the device tree node, and then validates it
-regardless of the platform data source.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 0b82fb95d9edf7bdfc6486c67a42dbf9b1e97765)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_drv.c | 52 ++++++++++++++++++++++++++++------
- 1 file changed, 44 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
-index 28e1de3270e0..c69ee0657f75 100644
---- a/drivers/media/platform/vsp1/vsp1_drv.c
-+++ b/drivers/media/platform/vsp1/vsp1_drv.c
-@@ -16,6 +16,7 @@
- #include <linux/device.h>
- #include <linux/interrupt.h>
- #include <linux/module.h>
-+#include <linux/of.h>
- #include <linux/platform_device.h>
- #include <linux/videodev2.h>
-
-@@ -431,34 +432,59 @@ static const struct dev_pm_ops vsp1_pm_ops = {
- * Platform Driver
- */
-
--static struct vsp1_platform_data *
--vsp1_get_platform_data(struct platform_device *pdev)
-+static int vsp1_validate_platform_data(struct platform_device *pdev,
-+ struct vsp1_platform_data *pdata)
- {
-- struct vsp1_platform_data *pdata = pdev->dev.platform_data;
--
- if (pdata == NULL) {
- dev_err(&pdev->dev, "missing platform data\n");
-- return NULL;
-+ return -EINVAL;
- }
-
- if (pdata->rpf_count <= 0 || pdata->rpf_count > VPS1_MAX_RPF) {
- dev_err(&pdev->dev, "invalid number of RPF (%u)\n",
- pdata->rpf_count);
-- return NULL;
-+ return -EINVAL;
- }
-
- if (pdata->uds_count <= 0 || pdata->uds_count > VPS1_MAX_UDS) {
- dev_err(&pdev->dev, "invalid number of UDS (%u)\n",
- pdata->uds_count);
-- return NULL;
-+ return -EINVAL;
- }
-
- if (pdata->wpf_count <= 0 || pdata->wpf_count > VPS1_MAX_WPF) {
- dev_err(&pdev->dev, "invalid number of WPF (%u)\n",
- pdata->wpf_count);
-- return NULL;
-+ return -EINVAL;
- }
-
-+ return 0;
-+}
-+
-+static struct vsp1_platform_data *
-+vsp1_get_platform_data(struct platform_device *pdev)
-+{
-+ struct device_node *np = pdev->dev.of_node;
-+ struct vsp1_platform_data *pdata;
-+
-+ if (!IS_ENABLED(CONFIG_OF) || np == NULL)
-+ return pdev->dev.platform_data;
-+
-+ pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-+ if (pdata == NULL)
-+ return NULL;
-+
-+ if (of_property_read_bool(np, "renesas,has-lif"))
-+ pdata->features |= VSP1_HAS_LIF;
-+ if (of_property_read_bool(np, "renesas,has-lut"))
-+ pdata->features |= VSP1_HAS_LUT;
-+ if (of_property_read_bool(np, "renesas,has-sru"))
-+ pdata->features |= VSP1_HAS_SRU;
-+
-+ of_property_read_u32(np, "renesas,#rpf", &pdata->rpf_count);
-+ of_property_read_u32(np, "renesas,#uds", &pdata->uds_count);
-+ of_property_read_u32(np, "renesas,#wpf", &pdata->wpf_count);
-+
- return pdata;
- }
-
-@@ -481,6 +507,10 @@ static int vsp1_probe(struct platform_device *pdev)
- if (vsp1->pdata == NULL)
- return -ENODEV;
-
-+ ret = vsp1_validate_platform_data(pdev, vsp1->pdata);
-+ if (ret < 0)
-+ return ret;
-+
- /* I/O, IRQ and clock resources */
- io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- vsp1->mmio = devm_ioremap_resource(&pdev->dev, io);
-@@ -527,6 +557,11 @@ static int vsp1_remove(struct platform_device *pdev)
- return 0;
- }
-
-+static const struct of_device_id vsp1_of_match[] = {
-+ { .compatible = "renesas,vsp1" },
-+ { },
-+};
-+
- static struct platform_driver vsp1_platform_driver = {
- .probe = vsp1_probe,
- .remove = vsp1_remove,
-@@ -534,6 +569,7 @@ static struct platform_driver vsp1_platform_driver = {
- .owner = THIS_MODULE,
- .name = "vsp1",
- .pm = &vsp1_pm_ops,
-+ .of_match_table = vsp1_of_match,
- },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0371-ASoC-ak4642-Add-ALC-controls.patch b/patches.renesas/0371-ASoC-ak4642-Add-ALC-controls.patch
deleted file mode 100644
index 53e9bef2a8217..0000000000000
--- a/patches.renesas/0371-ASoC-ak4642-Add-ALC-controls.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2c9c3999ea911454aaa6b99613172a7860239d2e Mon Sep 17 00:00:00 2001
-From: Sascha Hauer <s.hauer@pengutronix.de>
-Date: Wed, 14 May 2014 09:37:34 +0200
-Subject: ASoC: ak4642: Add ALC controls
-
-ALC and ALC Zero crossing detection has been enabled unconditionally.
-Add controls for this.
-
-Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 370f83a156e42d6c6997c65dbceb4bb7118e915a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/codecs/ak4642.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
-index 1f646c6e90c6..98f4b62a4148 100644
---- a/sound/soc/codecs/ak4642.c
-+++ b/sound/soc/codecs/ak4642.c
-@@ -148,6 +148,8 @@ static const struct snd_kcontrol_new ak4642_snd_controls[] = {
-
- SOC_DOUBLE_R_TLV("Digital Playback Volume", L_DVC, R_DVC,
- 0, 0xFF, 1, out_tlv),
-+ SOC_SINGLE("ALC Capture Switch", ALC_CTL1, 5, 1, 0),
-+ SOC_SINGLE("ALC Capture ZC Switch", ALC_CTL1, 4, 1, 1),
- };
-
- static const struct snd_kcontrol_new ak4642_headphone_control =
---
-2.1.2
-
diff --git a/patches.renesas/0372-ASoC-ak4642-Add-driver-data-and-driver-private-struc.patch b/patches.renesas/0372-ASoC-ak4642-Add-driver-data-and-driver-private-struc.patch
deleted file mode 100644
index e8172465afbe2..0000000000000
--- a/patches.renesas/0372-ASoC-ak4642-Add-driver-data-and-driver-private-struc.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From c8a860998f7888a49200cc3c6b958667fd2a373d Mon Sep 17 00:00:00 2001
-From: Sascha Hauer <s.hauer@pengutronix.de>
-Date: Wed, 14 May 2014 09:37:35 +0200
-Subject: ASoC: ak4642: Add driver data and driver private struct
-
-Currently unused, this is done to let the driver distinguish between
-the different supported codec types in later patches.
-
-Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit d815c703cedbc783ae09ac65eef5c4aa18e06128)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/codecs/ak4642.c | 51 +++++++++++++++++++++++++++++++++++++----------
- 1 file changed, 40 insertions(+), 11 deletions(-)
-
-diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
-index 98f4b62a4148..0a7f03f3d934 100644
---- a/sound/soc/codecs/ak4642.c
-+++ b/sound/soc/codecs/ak4642.c
-@@ -134,6 +134,14 @@
- /* MD_CTL4 */
- #define DACH (1 << 0)
-
-+struct ak4642_drvdata {
-+ const struct regmap_config *regmap_config;
-+};
-+
-+struct ak4642_priv {
-+ const struct ak4642_drvdata *drvdata;
-+};
-+
- /*
- * Playback Volume (table 39)
- *
-@@ -515,30 +523,51 @@ static const struct regmap_config ak4648_regmap = {
- .num_reg_defaults = ARRAY_SIZE(ak4648_reg),
- };
-
-+static const struct ak4642_drvdata ak4642_drvdata = {
-+ .regmap_config = &ak4642_regmap,
-+};
-+
-+static const struct ak4642_drvdata ak4643_drvdata = {
-+ .regmap_config = &ak4642_regmap,
-+};
-+
-+static const struct ak4642_drvdata ak4648_drvdata = {
-+ .regmap_config = &ak4648_regmap,
-+};
-+
- static struct of_device_id ak4642_of_match[];
- static int ak4642_i2c_probe(struct i2c_client *i2c,
- const struct i2c_device_id *id)
- {
- struct device_node *np = i2c->dev.of_node;
-- const struct regmap_config *regmap_config = NULL;
-+ const struct ak4642_drvdata *drvdata = NULL;
- struct regmap *regmap;
-+ struct ak4642_priv *priv;
-
- if (np) {
- const struct of_device_id *of_id;
-
- of_id = of_match_device(ak4642_of_match, &i2c->dev);
- if (of_id)
-- regmap_config = of_id->data;
-+ drvdata = of_id->data;
- } else {
-- regmap_config = (const struct regmap_config *)id->driver_data;
-+ drvdata = (const struct ak4642_drvdata *)id->driver_data;
- }
-
-- if (!regmap_config) {
-+ if (!drvdata) {
- dev_err(&i2c->dev, "Unknown device type\n");
- return -EINVAL;
- }
-
-- regmap = devm_regmap_init_i2c(i2c, regmap_config);
-+ priv = devm_kzalloc(&i2c->dev, sizeof(*priv), GFP_KERNEL);
-+ if (!priv)
-+ return -ENOMEM;
-+
-+ priv->drvdata = drvdata;
-+
-+ i2c_set_clientdata(i2c, priv);
-+
-+ regmap = devm_regmap_init_i2c(i2c, drvdata->regmap_config);
- if (IS_ERR(regmap))
- return PTR_ERR(regmap);
-
-@@ -553,17 +582,17 @@ static int ak4642_i2c_remove(struct i2c_client *client)
- }
-
- static struct of_device_id ak4642_of_match[] = {
-- { .compatible = "asahi-kasei,ak4642", .data = &ak4642_regmap},
-- { .compatible = "asahi-kasei,ak4643", .data = &ak4642_regmap},
-- { .compatible = "asahi-kasei,ak4648", .data = &ak4648_regmap},
-+ { .compatible = "asahi-kasei,ak4642", .data = &ak4642_drvdata},
-+ { .compatible = "asahi-kasei,ak4643", .data = &ak4643_drvdata},
-+ { .compatible = "asahi-kasei,ak4648", .data = &ak4648_drvdata},
- {},
- };
- MODULE_DEVICE_TABLE(of, ak4642_of_match);
-
- static const struct i2c_device_id ak4642_i2c_id[] = {
-- { "ak4642", (kernel_ulong_t)&ak4642_regmap },
-- { "ak4643", (kernel_ulong_t)&ak4642_regmap },
-- { "ak4648", (kernel_ulong_t)&ak4648_regmap },
-+ { "ak4642", (kernel_ulong_t)&ak4642_drvdata },
-+ { "ak4643", (kernel_ulong_t)&ak4643_drvdata },
-+ { "ak4648", (kernel_ulong_t)&ak4648_drvdata },
- { }
- };
- MODULE_DEVICE_TABLE(i2c, ak4642_i2c_id);
---
-2.1.2
-
diff --git a/patches.renesas/0373-ASoC-ak4642-Add-support-for-extended-sysclk-frequenc.patch b/patches.renesas/0373-ASoC-ak4642-Add-support-for-extended-sysclk-frequenc.patch
deleted file mode 100644
index f2add18b75a78..0000000000000
--- a/patches.renesas/0373-ASoC-ak4642-Add-support-for-extended-sysclk-frequenc.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From b59cf288964616a0e8013172473d3a2cdda8958f Mon Sep 17 00:00:00 2001
-From: Sascha Hauer <s.hauer@pengutronix.de>
-Date: Wed, 14 May 2014 09:37:36 +0200
-Subject: ASoC: ak4642: Add support for extended sysclk frequencies of the
- ak4648
-
-Additionally to the ak4642 pll frequencies the ak4648 also supports 13MHz,
-19.2MHz and 26MHz. This adds support for these frequencies.
-
-Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5cd15e29a45a18b9a744af61a7d90f26f730eb97)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/codecs/ak4642.c | 20 ++++++++++++++++++++
- 1 file changed, 20 insertions(+)
-
-diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
-index 0a7f03f3d934..86242f770c10 100644
---- a/sound/soc/codecs/ak4642.c
-+++ b/sound/soc/codecs/ak4642.c
-@@ -136,6 +136,7 @@
-
- struct ak4642_drvdata {
- const struct regmap_config *regmap_config;
-+ int extended_frequencies;
- };
-
- struct ak4642_priv {
-@@ -297,7 +298,9 @@ static int ak4642_dai_set_sysclk(struct snd_soc_dai *codec_dai,
- int clk_id, unsigned int freq, int dir)
- {
- struct snd_soc_codec *codec = codec_dai->codec;
-+ struct ak4642_priv *priv = snd_soc_codec_get_drvdata(codec);
- u8 pll;
-+ int extended_freq = 0;
-
- switch (freq) {
- case 11289600:
-@@ -318,9 +321,25 @@ static int ak4642_dai_set_sysclk(struct snd_soc_dai *codec_dai,
- case 27000000:
- pll = PLL3 | PLL2 | PLL0;
- break;
-+ case 19200000:
-+ pll = PLL3;
-+ extended_freq = 1;
-+ break;
-+ case 13000000:
-+ pll = PLL3 | PLL2 | PLL1;
-+ extended_freq = 1;
-+ break;
-+ case 26000000:
-+ pll = PLL3 | PLL2 | PLL1 | PLL0;
-+ extended_freq = 1;
-+ break;
- default:
- return -EINVAL;
- }
-+
-+ if (extended_freq && !priv->drvdata->extended_frequencies)
-+ return -EINVAL;
-+
- snd_soc_update_bits(codec, MD_CTL1, PLL_MASK, pll);
-
- return 0;
-@@ -533,6 +552,7 @@ static const struct ak4642_drvdata ak4643_drvdata = {
-
- static const struct ak4642_drvdata ak4648_drvdata = {
- .regmap_config = &ak4648_regmap,
-+ .extended_frequencies = 1,
- };
-
- static struct of_device_id ak4642_of_match[];
---
-2.1.2
-
diff --git a/patches.renesas/0374-gpio-rcar-Add-optional-functional-clock-to-bindings.patch b/patches.renesas/0374-gpio-rcar-Add-optional-functional-clock-to-bindings.patch
deleted file mode 100644
index 6d3bb8fb7ba57..0000000000000
--- a/patches.renesas/0374-gpio-rcar-Add-optional-functional-clock-to-bindings.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c7869cde4cf2b48fedb4dfb563e86db32737200b Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 20:33:12 +0200
-Subject: gpio: rcar: Add optional functional clock to bindings
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: linux-gpio@vger.kernel.org
-Cc: devicetree@vger.kernel.org
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 370a4516e401af82dcd89c34a99346c5869a879c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
-index f61cef74a212..941a26aa4322 100644
---- a/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
-+++ b/Documentation/devicetree/bindings/gpio/renesas,gpio-rcar.txt
-@@ -21,6 +21,12 @@ Required Properties:
- GPIO_ACTIVE_HIGH and GPIO_ACTIVE_LOW flags are supported.
- - gpio-ranges: Range of pins managed by the GPIO controller.
-
-+Optional properties:
-+
-+ - clocks: Must contain a reference to the functional clock. The property is
-+ mandatory if the hardware implements a controllable functional clock for
-+ the GPIO instance.
-+
- Please refer to gpio.txt in this directory for details of gpio-ranges property
- and the common GPIO bindings used by client devices.
-
---
-2.1.2
-
diff --git a/patches.renesas/0375-gpio-rcar-Add-minimal-runtime-PM-support.patch b/patches.renesas/0375-gpio-rcar-Add-minimal-runtime-PM-support.patch
deleted file mode 100644
index 68c0049d61eb0..0000000000000
--- a/patches.renesas/0375-gpio-rcar-Add-minimal-runtime-PM-support.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From da03df0b06dc5315d4eac0afbe1a65d3a0d908af Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 20:33:13 +0200
-Subject: gpio: rcar: Add minimal runtime PM support
-
-This is just enough to automatically enable the functional clock, if
-present. Clock management during suspend/resume is still to be added.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: linux-gpio@vger.kernel.org
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit df0c6c80232f2ad442dcf79a3a420eb8ac624e42)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpio/gpio-rcar.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
-index 03c91482432c..bfcfeeefcf78 100644
---- a/drivers/gpio/gpio-rcar.c
-+++ b/drivers/gpio/gpio-rcar.c
-@@ -26,6 +26,7 @@
- #include <linux/pinctrl/consumer.h>
- #include <linux/platform_data/gpio-rcar.h>
- #include <linux/platform_device.h>
-+#include <linux/pm_runtime.h>
- #include <linux/spinlock.h>
- #include <linux/slab.h>
-
-@@ -377,6 +378,9 @@ static int gpio_rcar_probe(struct platform_device *pdev)
-
- platform_set_drvdata(pdev, p);
-
-+ pm_runtime_enable(dev);
-+ pm_runtime_get_sync(dev);
-+
- io = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
-
-@@ -460,6 +464,8 @@ static int gpio_rcar_probe(struct platform_device *pdev)
- err1:
- irq_domain_remove(p->irq_domain);
- err0:
-+ pm_runtime_put(dev);
-+ pm_runtime_disable(dev);
- return ret;
- }
-
-@@ -473,6 +479,8 @@ static int gpio_rcar_remove(struct platform_device *pdev)
- return ret;
-
- irq_domain_remove(p->irq_domain);
-+ pm_runtime_put(&pdev->dev);
-+ pm_runtime_disable(&pdev->dev);
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0376-gpio-rcar-remove-unnecessary-OOM-messages.patch b/patches.renesas/0376-gpio-rcar-remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index 91610da18e08e..0000000000000
--- a/patches.renesas/0376-gpio-rcar-remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 0d3e65dc3dace2e12282c7b335ccaea1b104a2fb Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Tue, 29 Apr 2014 17:40:59 +0900
-Subject: gpio: rcar: remove unnecessary OOM messages
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message.
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Reviewed-by: Javier Martinez Canillas <javier@dowhile0.org>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 41893360afb9d49181ce9714286de61ee50c48b0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpio/gpio-rcar.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
-index bfcfeeefcf78..0c9f803fc1ac 100644
---- a/drivers/gpio/gpio-rcar.c
-+++ b/drivers/gpio/gpio-rcar.c
-@@ -363,7 +363,6 @@ static int gpio_rcar_probe(struct platform_device *pdev)
-
- p = devm_kzalloc(dev, sizeof(*p), GFP_KERNEL);
- if (!p) {
-- dev_err(dev, "failed to allocate driver data\n");
- ret = -ENOMEM;
- goto err0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0377-i2c-rcar-add-compatibles-for-additional-SoC.patch b/patches.renesas/0377-i2c-rcar-add-compatibles-for-additional-SoC.patch
deleted file mode 100644
index 69ab8c05bf9ae..0000000000000
--- a/patches.renesas/0377-i2c-rcar-add-compatibles-for-additional-SoC.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 5826a55e01cfb9e434a7049d83e63fe9151bbe92 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 27 May 2014 14:06:28 +0200
-Subject: i2c: rcar: add compatibles for additional SoC
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 819a39510ed8e7f473309d071ede0fb02f0d0e79)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/i2c/i2c-rcar.txt | 3 +++
- drivers/i2c/busses/i2c-rcar.c | 3 +++
- 2 files changed, 6 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
-index dd8b2dd1edeb..16b3e07aa98f 100644
---- a/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
-+++ b/Documentation/devicetree/bindings/i2c/i2c-rcar.txt
-@@ -7,6 +7,9 @@ Required properties:
- "renesas,i2c-r8a7779"
- "renesas,i2c-r8a7790"
- "renesas,i2c-r8a7791"
-+ "renesas,i2c-r8a7792"
-+ "renesas,i2c-r8a7793"
-+ "renesas,i2c-r8a7794"
- - reg: physical base address of the controller and length of memory mapped
- region.
- - interrupts: interrupt specifier.
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 06d47aafbb79..467eafa050a6 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -646,6 +646,9 @@ static const struct of_device_id rcar_i2c_dt_ids[] = {
- { .compatible = "renesas,i2c-r8a7779", .data = (void *)I2C_RCAR_GEN1 },
- { .compatible = "renesas,i2c-r8a7790", .data = (void *)I2C_RCAR_GEN2 },
- { .compatible = "renesas,i2c-r8a7791", .data = (void *)I2C_RCAR_GEN2 },
-+ { .compatible = "renesas,i2c-r8a7792", .data = (void *)I2C_RCAR_GEN2 },
-+ { .compatible = "renesas,i2c-r8a7793", .data = (void *)I2C_RCAR_GEN2 },
-+ { .compatible = "renesas,i2c-r8a7794", .data = (void *)I2C_RCAR_GEN2 },
- {},
- };
- MODULE_DEVICE_TABLE(of, rcar_i2c_dt_ids);
---
-2.1.2
-
diff --git a/patches.renesas/0378-i2c-rcar-not-everything-needs-to-be-a-function.patch b/patches.renesas/0378-i2c-rcar-not-everything-needs-to-be-a-function.patch
deleted file mode 100644
index 018e1a0b67b2b..0000000000000
--- a/patches.renesas/0378-i2c-rcar-not-everything-needs-to-be-a-function.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 3771444f2e34a54f0e0553f354cde2c577a34802 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:36 +0200
-Subject: i2c: rcar: not everything needs to be a function
-
-Very basic operations, just called once, can also go to the caller.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 1c176d534f81c350f67dd4dc6d0330a45c11c9a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 14 +++-----------
- 1 file changed, 3 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 467eafa050a6..de4e6b81fa9b 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -312,18 +312,9 @@ scgd_find:
- return 0;
- }
-
--static void rcar_i2c_clock_start(struct rcar_i2c_priv *priv)
--{
-- rcar_i2c_write(priv, ICCCR, priv->icccr);
--}
--
- /*
- * status functions
- */
--static u32 rcar_i2c_status_get(struct rcar_i2c_priv *priv)
--{
-- return rcar_i2c_read(priv, ICMSR);
--}
-
- #define rcar_i2c_status_clear(priv) rcar_i2c_status_bit_clear(priv, 0xffffffff)
- static void rcar_i2c_status_bit_clear(struct rcar_i2c_priv *priv, u32 bit)
-@@ -480,7 +471,7 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- /*-------------- spin lock -----------------*/
- spin_lock(&priv->lock);
-
-- msr = rcar_i2c_status_get(priv);
-+ msr = rcar_i2c_read(priv, ICMSR);
-
- /*
- * Arbitration lost
-@@ -554,7 +545,8 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- spin_lock_irqsave(&priv->lock, flags);
-
- rcar_i2c_init(priv);
-- rcar_i2c_clock_start(priv);
-+ /* start clock */
-+ rcar_i2c_write(priv, ICCCR, priv->icccr);
-
- spin_unlock_irqrestore(&priv->lock, flags);
- /*-------------- spin unlock -----------------*/
---
-2.1.2
-
diff --git a/patches.renesas/0379-i2c-rcar-no-need-to-store-irq-number.patch b/patches.renesas/0379-i2c-rcar-no-need-to-store-irq-number.patch
deleted file mode 100644
index 45120ba9b3c68..0000000000000
--- a/patches.renesas/0379-i2c-rcar-no-need-to-store-irq-number.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From b541465e40de38fb7b55b878d2005792eed5e03e Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:37 +0200
-Subject: i2c: rcar: no need to store irq number
-
-We use devm, so irq number is only needed during probe.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 93e953d3785fa6fc7fda4b64bd38d003f1dcb1d2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 9 ++++-----
- 1 file changed, 4 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index de4e6b81fa9b..5a3e8a12e8d5 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -116,7 +116,6 @@ struct rcar_i2c_priv {
- wait_queue_head_t wait;
-
- int pos;
-- int irq;
- u32 icccr;
- u32 flags;
- enum rcar_i2c_type devtype;
-@@ -653,7 +652,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
- struct resource *res;
- struct device *dev = &pdev->dev;
- u32 bus_speed;
-- int ret;
-+ int irq, ret;
-
- priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
- if (!priv) {
-@@ -687,7 +686,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
- if (IS_ERR(priv->io))
- return PTR_ERR(priv->io);
-
-- priv->irq = platform_get_irq(pdev, 0);
-+ irq = platform_get_irq(pdev, 0);
- init_waitqueue_head(&priv->wait);
- spin_lock_init(&priv->lock);
-
-@@ -701,10 +700,10 @@ static int rcar_i2c_probe(struct platform_device *pdev)
- i2c_set_adapdata(adap, priv);
- strlcpy(adap->name, pdev->name, sizeof(adap->name));
-
-- ret = devm_request_irq(dev, priv->irq, rcar_i2c_irq, 0,
-+ ret = devm_request_irq(dev, irq, rcar_i2c_irq, 0,
- dev_name(dev), priv);
- if (ret < 0) {
-- dev_err(dev, "cannot get irq %d\n", priv->irq);
-+ dev_err(dev, "cannot get irq %d\n", irq);
- return ret;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0380-i2c-rcar-refactor-bus-state-machine.patch b/patches.renesas/0380-i2c-rcar-refactor-bus-state-machine.patch
deleted file mode 100644
index 9de473ab0300b..0000000000000
--- a/patches.renesas/0380-i2c-rcar-refactor-bus-state-machine.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From de5144eb1222e058544ac3c589d52d5a59a7dccf Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:38 +0200
-Subject: i2c: rcar: refactor bus state machine
-
-Remove the seperate functions and use designated constants. As readable
-but less overhead.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 4f443a8a611d0cb3c40e95e0d90e9d7e4740eda6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 37 ++++++++++---------------------------
- 1 file changed, 10 insertions(+), 27 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 5a3e8a12e8d5..eadaca0ef4be 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -79,11 +79,9 @@
- #define MATE (1 << 0) /* address sent irq en */
-
-
--enum {
-- RCAR_BUS_PHASE_ADDR,
-- RCAR_BUS_PHASE_DATA,
-- RCAR_BUS_PHASE_STOP,
--};
-+#define RCAR_BUS_PHASE_START (MDBS | MIE | ESG)
-+#define RCAR_BUS_PHASE_DATA (MDBS | MIE)
-+#define RCAR_BUS_PHASE_STOP (MDBS | MIE | FSB)
-
- enum {
- RCAR_IRQ_CLOSE,
-@@ -204,21 +202,6 @@ static int rcar_i2c_bus_barrier(struct rcar_i2c_priv *priv)
- return -EBUSY;
- }
-
--static void rcar_i2c_bus_phase(struct rcar_i2c_priv *priv, int phase)
--{
-- switch (phase) {
-- case RCAR_BUS_PHASE_ADDR:
-- rcar_i2c_write(priv, ICMCR, MDBS | MIE | ESG);
-- break;
-- case RCAR_BUS_PHASE_DATA:
-- rcar_i2c_write(priv, ICMCR, MDBS | MIE);
-- break;
-- case RCAR_BUS_PHASE_STOP:
-- rcar_i2c_write(priv, ICMCR, MDBS | MIE | FSB);
-- break;
-- }
--}
--
- /*
- * clock function
- */
-@@ -328,7 +311,7 @@ static int rcar_i2c_recv(struct rcar_i2c_priv *priv)
- {
- rcar_i2c_set_addr(priv, 1);
- rcar_i2c_status_clear(priv);
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_ADDR);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
- rcar_i2c_irq_mask(priv, RCAR_IRQ_OPEN_FOR_RECV);
-
- return 0;
-@@ -347,7 +330,7 @@ static int rcar_i2c_send(struct rcar_i2c_priv *priv)
-
- rcar_i2c_set_addr(priv, 0);
- rcar_i2c_status_clear(priv);
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_ADDR);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
- rcar_i2c_irq_mask(priv, RCAR_IRQ_OPEN_FOR_SEND);
-
- return 0;
-@@ -376,7 +359,7 @@ static int rcar_i2c_irq_send(struct rcar_i2c_priv *priv, u32 msr)
- * goto data phase.
- */
- if (msr & MAT)
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_DATA);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_DATA);
-
- if (priv->pos < msg->len) {
- /*
-@@ -404,7 +387,7 @@ static int rcar_i2c_irq_send(struct rcar_i2c_priv *priv, u32 msr)
- * prepare stop condition here.
- * ID_DONE will be set on STOP irq.
- */
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_STOP);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
- else
- /*
- * If current msg is _NOT_ last msg,
-@@ -452,9 +435,9 @@ static int rcar_i2c_irq_recv(struct rcar_i2c_priv *priv, u32 msr)
- * otherwise, go to DATA phase.
- */
- if (priv->pos + 1 >= msg->len)
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_STOP);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
- else
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_DATA);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_DATA);
-
- rcar_i2c_recv_restart(priv);
-
-@@ -502,7 +485,7 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- dev_dbg(dev, "Nack\n");
-
- /* go to stop phase */
-- rcar_i2c_bus_phase(priv, RCAR_BUS_PHASE_STOP);
-+ rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
- rcar_i2c_irq_mask(priv, RCAR_IRQ_OPEN_FOR_STOP);
- rcar_i2c_flags_set(priv, ID_NACK);
- goto out;
---
-2.1.2
-
diff --git a/patches.renesas/0381-i2c-rcar-refactor-irq-state-machine.patch b/patches.renesas/0381-i2c-rcar-refactor-irq-state-machine.patch
deleted file mode 100644
index 0d2cd1d8960f2..0000000000000
--- a/patches.renesas/0381-i2c-rcar-refactor-irq-state-machine.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From 758e38d755885621b5112507904b90ba183410b4 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:39 +0200
-Subject: i2c: rcar: refactor irq state machine
-
-Remove the seperate functions and use designated constants. As readable
-but less overhead. Actually, this is even more readable since the old
-function used a mix of "=" and "|=".
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit f2382249b27d1589a1ae495a1df84d890982a3e1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 39 +++++++--------------------------------
- 1 file changed, 7 insertions(+), 32 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index eadaca0ef4be..f2cbb8a7d0ba 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -83,12 +83,9 @@
- #define RCAR_BUS_PHASE_DATA (MDBS | MIE)
- #define RCAR_BUS_PHASE_STOP (MDBS | MIE | FSB)
-
--enum {
-- RCAR_IRQ_CLOSE,
-- RCAR_IRQ_OPEN_FOR_SEND,
-- RCAR_IRQ_OPEN_FOR_RECV,
-- RCAR_IRQ_OPEN_FOR_STOP,
--};
-+#define RCAR_IRQ_SEND (MNRE | MALE | MSTE | MATE | MDEE)
-+#define RCAR_IRQ_RECV (MNRE | MALE | MSTE | MATE | MDRE)
-+#define RCAR_IRQ_STOP (MSTE)
-
- /*
- * flags
-@@ -158,28 +155,6 @@ static void rcar_i2c_init(struct rcar_i2c_priv *priv)
- rcar_i2c_write(priv, ICMAR, 0);
- }
-
--static void rcar_i2c_irq_mask(struct rcar_i2c_priv *priv, int open)
--{
-- u32 val = MNRE | MALE | MSTE | MATE; /* default */
--
-- switch (open) {
-- case RCAR_IRQ_OPEN_FOR_SEND:
-- val |= MDEE; /* default + send */
-- break;
-- case RCAR_IRQ_OPEN_FOR_RECV:
-- val |= MDRE; /* default + read */
-- break;
-- case RCAR_IRQ_OPEN_FOR_STOP:
-- val = MSTE; /* stop irq only */
-- break;
-- case RCAR_IRQ_CLOSE:
-- default:
-- val = 0; /* all close */
-- break;
-- }
-- rcar_i2c_write(priv, ICMIER, val);
--}
--
- static void rcar_i2c_set_addr(struct rcar_i2c_priv *priv, u32 recv)
- {
- rcar_i2c_write(priv, ICMAR, (priv->msg->addr << 1) | recv);
-@@ -312,7 +287,7 @@ static int rcar_i2c_recv(struct rcar_i2c_priv *priv)
- rcar_i2c_set_addr(priv, 1);
- rcar_i2c_status_clear(priv);
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
-- rcar_i2c_irq_mask(priv, RCAR_IRQ_OPEN_FOR_RECV);
-+ rcar_i2c_write(priv, ICMIER, RCAR_IRQ_RECV);
-
- return 0;
- }
-@@ -331,7 +306,7 @@ static int rcar_i2c_send(struct rcar_i2c_priv *priv)
- rcar_i2c_set_addr(priv, 0);
- rcar_i2c_status_clear(priv);
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
-- rcar_i2c_irq_mask(priv, RCAR_IRQ_OPEN_FOR_SEND);
-+ rcar_i2c_write(priv, ICMIER, RCAR_IRQ_SEND);
-
- return 0;
- }
-@@ -486,7 +461,7 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
-
- /* go to stop phase */
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
-- rcar_i2c_irq_mask(priv, RCAR_IRQ_OPEN_FOR_STOP);
-+ rcar_i2c_write(priv, ICMIER, RCAR_IRQ_STOP);
- rcar_i2c_flags_set(priv, ID_NACK);
- goto out;
- }
-@@ -501,7 +476,7 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
-
- out:
- if (rcar_i2c_flags_has(priv, ID_DONE)) {
-- rcar_i2c_irq_mask(priv, RCAR_IRQ_CLOSE);
-+ rcar_i2c_write(priv, ICMIER, 0);
- rcar_i2c_status_clear(priv);
- wake_up(&priv->wait);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0382-i2c-rcar-check-bus-free-before-first-message.patch b/patches.renesas/0382-i2c-rcar-check-bus-free-before-first-message.patch
deleted file mode 100644
index f459282418d1d..0000000000000
--- a/patches.renesas/0382-i2c-rcar-check-bus-free-before-first-message.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 32cac77a5363a46de87b4fe680bfc7f554305253 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:40 +0200
-Subject: i2c: rcar: check bus free before first message
-
-We should always check if the bus is free, independently if it is a read
-or write. It should be done before the first message, though. After
-that, we ourselves keep the bus busy. Remove a 'ret' assignment which
-only silenced a build warning.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 3f7de22eb28244fc79bc744d9f51d018da343962)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 16 +++++-----------
- 1 file changed, 5 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index f2cbb8a7d0ba..828b519146fc 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -294,15 +294,6 @@ static int rcar_i2c_recv(struct rcar_i2c_priv *priv)
-
- static int rcar_i2c_send(struct rcar_i2c_priv *priv)
- {
-- int ret;
--
-- /*
-- * It should check bus status when send case
-- */
-- ret = rcar_i2c_bus_barrier(priv);
-- if (ret < 0)
-- return ret;
--
- rcar_i2c_set_addr(priv, 0);
- rcar_i2c_status_clear(priv);
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
-@@ -508,7 +499,10 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- spin_unlock_irqrestore(&priv->lock, flags);
- /*-------------- spin unlock -----------------*/
-
-- ret = -EINVAL;
-+ ret = rcar_i2c_bus_barrier(priv);
-+ if (ret < 0)
-+ goto out;
-+
- for (i = 0; i < num; i++) {
- /* This HW can't send STOP after address phase */
- if (msgs[i].len == 0) {
-@@ -569,7 +563,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
-
- ret = i + 1; /* The number of transfer */
- }
--
-+out:
- pm_runtime_put(dev);
-
- if (ret < 0 && ret != -ENXIO)
---
-2.1.2
-
diff --git a/patches.renesas/0383-i2c-rcar-refactor-setting-up-msg.patch b/patches.renesas/0383-i2c-rcar-refactor-setting-up-msg.patch
deleted file mode 100644
index c9ac9c1ea5824..0000000000000
--- a/patches.renesas/0383-i2c-rcar-refactor-setting-up-msg.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From dbb68fcef20160b3af7a2b9df01742abdb492a64 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:41 +0200
-Subject: i2c: rcar: refactor setting up msg
-
-Setting up a read or write message is similar enough to be done in one
-function. Also, move a helper function into the new function since it is
-only used here.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 386babf8e2f7dd483f88e5c0c4c761346b750185)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 30 +++++-------------------------
- 1 file changed, 5 insertions(+), 25 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 828b519146fc..42005ccd3254 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -155,11 +155,6 @@ static void rcar_i2c_init(struct rcar_i2c_priv *priv)
- rcar_i2c_write(priv, ICMAR, 0);
- }
-
--static void rcar_i2c_set_addr(struct rcar_i2c_priv *priv, u32 recv)
--{
-- rcar_i2c_write(priv, ICMAR, (priv->msg->addr << 1) | recv);
--}
--
- /*
- * bus control functions
- */
-@@ -279,25 +274,14 @@ static void rcar_i2c_status_bit_clear(struct rcar_i2c_priv *priv, u32 bit)
- rcar_i2c_write(priv, ICMSR, ~bit);
- }
-
--/*
-- * recv/send functions
-- */
--static int rcar_i2c_recv(struct rcar_i2c_priv *priv)
-+static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv)
- {
-- rcar_i2c_set_addr(priv, 1);
-- rcar_i2c_status_clear(priv);
-- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
-- rcar_i2c_write(priv, ICMIER, RCAR_IRQ_RECV);
--
-- return 0;
--}
-+ int read = !!rcar_i2c_is_recv(priv);
-
--static int rcar_i2c_send(struct rcar_i2c_priv *priv)
--{
-- rcar_i2c_set_addr(priv, 0);
-+ rcar_i2c_write(priv, ICMAR, (priv->msg->addr << 1) | read);
- rcar_i2c_status_clear(priv);
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
-- rcar_i2c_write(priv, ICMIER, RCAR_IRQ_SEND);
-+ rcar_i2c_write(priv, ICMIER, read ? RCAR_IRQ_RECV : RCAR_IRQ_SEND);
-
- return 0;
- }
-@@ -520,11 +504,7 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- if (priv->msg == &msgs[num - 1])
- rcar_i2c_flags_set(priv, ID_LAST_MSG);
-
-- /* start send/recv */
-- if (rcar_i2c_is_recv(priv))
-- ret = rcar_i2c_recv(priv);
-- else
-- ret = rcar_i2c_send(priv);
-+ ret = rcar_i2c_prepare_msg(priv);
-
- spin_unlock_irqrestore(&priv->lock, flags);
- /*-------------- spin unlock -----------------*/
---
-2.1.2
-
diff --git a/patches.renesas/0384-i2c-rcar-refactor-status-bit-handling.patch b/patches.renesas/0384-i2c-rcar-refactor-status-bit-handling.patch
deleted file mode 100644
index cc885a9d44ee8..0000000000000
--- a/patches.renesas/0384-i2c-rcar-refactor-status-bit-handling.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 84eb2cc33e9c05bfd8c26f3411345123a64d15d8 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:42 +0200
-Subject: i2c: rcar: refactor status bit handling
-
-The old macros made it harder to see what was actually happening.
-Replace them with something more readable.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 3c95de674496e08d3b373f85af4aa59c23ddb8d6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 20 +++++++-------------
- 1 file changed, 7 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 42005ccd3254..07256a6b56fa 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -87,6 +87,9 @@
- #define RCAR_IRQ_RECV (MNRE | MALE | MSTE | MATE | MDRE)
- #define RCAR_IRQ_STOP (MSTE)
-
-+#define RCAR_IRQ_ACK_SEND (~(MAT | MDE))
-+#define RCAR_IRQ_ACK_RECV (~(MAT | MDR))
-+
- /*
- * flags
- */
-@@ -268,27 +271,18 @@ scgd_find:
- * status functions
- */
-
--#define rcar_i2c_status_clear(priv) rcar_i2c_status_bit_clear(priv, 0xffffffff)
--static void rcar_i2c_status_bit_clear(struct rcar_i2c_priv *priv, u32 bit)
--{
-- rcar_i2c_write(priv, ICMSR, ~bit);
--}
--
- static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv)
- {
- int read = !!rcar_i2c_is_recv(priv);
-
- rcar_i2c_write(priv, ICMAR, (priv->msg->addr << 1) | read);
-- rcar_i2c_status_clear(priv);
-+ rcar_i2c_write(priv, ICMSR, 0);
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_START);
- rcar_i2c_write(priv, ICMIER, read ? RCAR_IRQ_RECV : RCAR_IRQ_SEND);
-
- return 0;
- }
-
--#define rcar_i2c_send_restart(priv) rcar_i2c_status_bit_clear(priv, (MAT | MDE))
--#define rcar_i2c_recv_restart(priv) rcar_i2c_status_bit_clear(priv, (MAT | MDR))
--
- /*
- * interrupt functions
- */
-@@ -348,7 +342,7 @@ static int rcar_i2c_irq_send(struct rcar_i2c_priv *priv, u32 msr)
- return ID_DONE;
- }
-
-- rcar_i2c_send_restart(priv);
-+ rcar_i2c_write(priv, ICMSR, RCAR_IRQ_ACK_SEND);
-
- return 0;
- }
-@@ -389,7 +383,7 @@ static int rcar_i2c_irq_recv(struct rcar_i2c_priv *priv, u32 msr)
- else
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_DATA);
-
-- rcar_i2c_recv_restart(priv);
-+ rcar_i2c_write(priv, ICMSR, RCAR_IRQ_ACK_RECV);
-
- return 0;
- }
-@@ -452,7 +446,7 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- out:
- if (rcar_i2c_flags_has(priv, ID_DONE)) {
- rcar_i2c_write(priv, ICMIER, 0);
-- rcar_i2c_status_clear(priv);
-+ rcar_i2c_write(priv, ICMSR, 0);
- wake_up(&priv->wait);
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0385-i2c-rcar-remove-spinlock.patch b/patches.renesas/0385-i2c-rcar-remove-spinlock.patch
deleted file mode 100644
index a9c763bf9d6ae..0000000000000
--- a/patches.renesas/0385-i2c-rcar-remove-spinlock.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 03f6eebe8b33fdcc4af861372e4b801e612e9391 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:43 +0200
-Subject: i2c: rcar: remove spinlock
-
-The i2c core has per-adapter locks, so no need to protect again.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 150b8be3cda54412ad7b54f5392b513b25c0aaa7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 22 ----------------------
- 1 file changed, 22 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 07256a6b56fa..e16784124a41 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -36,7 +36,6 @@
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
- #include <linux/slab.h>
--#include <linux/spinlock.h>
-
- /* register offsets */
- #define ICSCR 0x00 /* slave ctrl */
-@@ -110,7 +109,6 @@ struct rcar_i2c_priv {
- struct i2c_msg *msg;
- struct clk *clk;
-
-- spinlock_t lock;
- wait_queue_head_t wait;
-
- int pos;
-@@ -394,9 +392,6 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- struct device *dev = rcar_i2c_priv_to_dev(priv);
- u32 msr;
-
-- /*-------------- spin lock -----------------*/
-- spin_lock(&priv->lock);
--
- msr = rcar_i2c_read(priv, ICMSR);
-
- /*
-@@ -450,9 +445,6 @@ out:
- wake_up(&priv->wait);
- }
-
-- spin_unlock(&priv->lock);
-- /*-------------- spin unlock -----------------*/
--
- return IRQ_HANDLED;
- }
-
-@@ -462,21 +454,14 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- {
- struct rcar_i2c_priv *priv = i2c_get_adapdata(adap);
- struct device *dev = rcar_i2c_priv_to_dev(priv);
-- unsigned long flags;
- int i, ret, timeout;
-
- pm_runtime_get_sync(dev);
-
-- /*-------------- spin lock -----------------*/
-- spin_lock_irqsave(&priv->lock, flags);
--
- rcar_i2c_init(priv);
- /* start clock */
- rcar_i2c_write(priv, ICCCR, priv->icccr);
-
-- spin_unlock_irqrestore(&priv->lock, flags);
-- /*-------------- spin unlock -----------------*/
--
- ret = rcar_i2c_bus_barrier(priv);
- if (ret < 0)
- goto out;
-@@ -488,9 +473,6 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- break;
- }
-
-- /*-------------- spin lock -----------------*/
-- spin_lock_irqsave(&priv->lock, flags);
--
- /* init each data */
- priv->msg = &msgs[i];
- priv->pos = 0;
-@@ -500,9 +482,6 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
-
- ret = rcar_i2c_prepare_msg(priv);
-
-- spin_unlock_irqrestore(&priv->lock, flags);
-- /*-------------- spin unlock -----------------*/
--
- if (ret < 0)
- break;
-
-@@ -614,7 +593,6 @@ static int rcar_i2c_probe(struct platform_device *pdev)
-
- irq = platform_get_irq(pdev, 0);
- init_waitqueue_head(&priv->wait);
-- spin_lock_init(&priv->lock);
-
- adap = &priv->adap;
- adap->nr = pdev->id;
---
-2.1.2
-
diff --git a/patches.renesas/0386-i2c-rcar-reuse-status-bits-as-enable-bits.patch b/patches.renesas/0386-i2c-rcar-reuse-status-bits-as-enable-bits.patch
deleted file mode 100644
index a2d6128a9880b..0000000000000
--- a/patches.renesas/0386-i2c-rcar-reuse-status-bits-as-enable-bits.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 350bf0e9833a06ef36a1c7e8593ca1446b4f4af8 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:44 +0200
-Subject: i2c: rcar: reuse status bits as enable bits
-
-Status register and enable register are identical regarding their
-layout. Use the bit definitions for both.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 3e3aabac443e25712a3788cf88cc188e13ca8b0e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 17 ++++-------------
- 1 file changed, 4 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index e16784124a41..4c46d1b1b61d 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -59,7 +59,7 @@
- #define FSB (1 << 1) /* force stop bit */
- #define ESG (1 << 0) /* en startbit gen */
-
--/* ICMSR */
-+/* ICMSR (also for ICMIE) */
- #define MNR (1 << 6) /* nack received */
- #define MAL (1 << 5) /* arbitration lost */
- #define MST (1 << 4) /* sent a stop */
-@@ -68,23 +68,14 @@
- #define MDR (1 << 1)
- #define MAT (1 << 0) /* slave addr xfer done */
-
--/* ICMIE */
--#define MNRE (1 << 6) /* nack irq en */
--#define MALE (1 << 5) /* arblos irq en */
--#define MSTE (1 << 4) /* stop irq en */
--#define MDEE (1 << 3)
--#define MDTE (1 << 2)
--#define MDRE (1 << 1)
--#define MATE (1 << 0) /* address sent irq en */
--
-
- #define RCAR_BUS_PHASE_START (MDBS | MIE | ESG)
- #define RCAR_BUS_PHASE_DATA (MDBS | MIE)
- #define RCAR_BUS_PHASE_STOP (MDBS | MIE | FSB)
-
--#define RCAR_IRQ_SEND (MNRE | MALE | MSTE | MATE | MDEE)
--#define RCAR_IRQ_RECV (MNRE | MALE | MSTE | MATE | MDRE)
--#define RCAR_IRQ_STOP (MSTE)
-+#define RCAR_IRQ_SEND (MNR | MAL | MST | MAT | MDE)
-+#define RCAR_IRQ_RECV (MNR | MAL | MST | MAT | MDR)
-+#define RCAR_IRQ_STOP (MST)
-
- #define RCAR_IRQ_ACK_SEND (~(MAT | MDE))
- #define RCAR_IRQ_ACK_RECV (~(MAT | MDR))
---
-2.1.2
-
diff --git a/patches.renesas/0387-i2c-rcar-janitorial-cleanup-after-refactoring.patch b/patches.renesas/0387-i2c-rcar-janitorial-cleanup-after-refactoring.patch
deleted file mode 100644
index 1ef16bd0354f1..0000000000000
--- a/patches.renesas/0387-i2c-rcar-janitorial-cleanup-after-refactoring.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 1e079a850441ccc90d7680bb26a4e0e53351a4b8 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:45 +0200
-Subject: i2c: rcar: janitorial cleanup after refactoring
-
-Remove some obvious comments, remove some superfluous debug output (the
-error code carries the same information), some white space fixing...
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 51371cdc86403d9f643efe3d4a4febd11f084c74)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 50 +++++--------------------------------------
- 1 file changed, 5 insertions(+), 45 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 4c46d1b1b61d..27b84d734a60 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -80,9 +80,6 @@
- #define RCAR_IRQ_ACK_SEND (~(MAT | MDE))
- #define RCAR_IRQ_ACK_RECV (~(MAT | MDR))
-
--/*
-- * flags
-- */
- #define ID_LAST_MSG (1 << 0)
- #define ID_IOERROR (1 << 1)
- #define ID_DONE (1 << 2)
-@@ -105,7 +102,7 @@ struct rcar_i2c_priv {
- int pos;
- u32 icccr;
- u32 flags;
-- enum rcar_i2c_type devtype;
-+ enum rcar_i2c_type devtype;
- };
-
- #define rcar_i2c_priv_to_dev(p) ((p)->adap.dev.parent)
-@@ -116,9 +113,7 @@ struct rcar_i2c_priv {
-
- #define LOOP_TIMEOUT 1024
-
--/*
-- * basic functions
-- */
-+
- static void rcar_i2c_write(struct rcar_i2c_priv *priv, int reg, u32 val)
- {
- writel(val, priv->io + reg);
-@@ -147,9 +142,6 @@ static void rcar_i2c_init(struct rcar_i2c_priv *priv)
- rcar_i2c_write(priv, ICMAR, 0);
- }
-
--/*
-- * bus control functions
-- */
- static int rcar_i2c_bus_barrier(struct rcar_i2c_priv *priv)
- {
- int i;
-@@ -164,9 +156,6 @@ static int rcar_i2c_bus_barrier(struct rcar_i2c_priv *priv)
- return -EBUSY;
- }
-
--/*
-- * clock function
-- */
- static int rcar_i2c_clock_calculate(struct rcar_i2c_priv *priv,
- u32 bus_speed,
- struct device *dev)
-@@ -256,10 +245,6 @@ scgd_find:
- return 0;
- }
-
--/*
-- * status functions
-- */
--
- static int rcar_i2c_prepare_msg(struct rcar_i2c_priv *priv)
- {
- int read = !!rcar_i2c_is_recv(priv);
-@@ -380,40 +365,24 @@ static int rcar_i2c_irq_recv(struct rcar_i2c_priv *priv, u32 msr)
- static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- {
- struct rcar_i2c_priv *priv = ptr;
-- struct device *dev = rcar_i2c_priv_to_dev(priv);
- u32 msr;
-
- msr = rcar_i2c_read(priv, ICMSR);
-
-- /*
-- * Arbitration lost
-- */
-+ /* Arbitration lost */
- if (msr & MAL) {
-- /*
-- * CAUTION
-- *
-- * When arbitration lost, device become _slave_ mode.
-- */
-- dev_dbg(dev, "Arbitration Lost\n");
- rcar_i2c_flags_set(priv, (ID_DONE | ID_ARBLOST));
- goto out;
- }
-
-- /*
-- * Stop
-- */
-+ /* Stop */
- if (msr & MST) {
-- dev_dbg(dev, "Stop\n");
- rcar_i2c_flags_set(priv, ID_DONE);
- goto out;
- }
-
-- /*
-- * Nack
-- */
-+ /* Nack */
- if (msr & MNR) {
-- dev_dbg(dev, "Nack\n");
--
- /* go to stop phase */
- rcar_i2c_write(priv, ICMCR, RCAR_BUS_PHASE_STOP);
- rcar_i2c_write(priv, ICMIER, RCAR_IRQ_STOP);
-@@ -421,9 +390,6 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- goto out;
- }
-
-- /*
-- * recv/send
-- */
- if (rcar_i2c_is_recv(priv))
- rcar_i2c_flags_set(priv, rcar_i2c_irq_recv(priv, msr));
- else
-@@ -476,9 +442,6 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- if (ret < 0)
- break;
-
-- /*
-- * wait result
-- */
- timeout = wait_event_timeout(priv->wait,
- rcar_i2c_flags_has(priv, ID_DONE),
- 5 * HZ);
-@@ -487,9 +450,6 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- break;
- }
-
-- /*
-- * error handling
-- */
- if (rcar_i2c_flags_has(priv, ID_NACK)) {
- ret = -ENXIO;
- break;
---
-2.1.2
-
diff --git a/patches.renesas/0388-i2c-rcar-update-copyright-and-license-information.patch b/patches.renesas/0388-i2c-rcar-update-copyright-and-license-information.patch
deleted file mode 100644
index 748e7af999c41..0000000000000
--- a/patches.renesas/0388-i2c-rcar-update-copyright-and-license-information.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 383ee8f637390ed777bd41d2f8909c24cd43d89a Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 28 May 2014 09:44:46 +0200
-Subject: i2c: rcar: update copyright and license information
-
-Make clear that the driver is GPL v2 only. Remove FSF address. Remove
-filename in comment. Update copyright information.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 3d99beabf17506b9d48461d1677a61a430000ad7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 14 ++++++--------
- 1 file changed, 6 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 27b84d734a60..71e88d055500 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -1,7 +1,9 @@
- /*
-- * drivers/i2c/busses/i2c-rcar.c
-+ * Driver for the Renesas RCar I2C unit
- *
-- * Copyright (C) 2012 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Wolfram Sang <wsa@sang-engineering.com>
-+ *
-+ * Copyright (C) 2012-14 Renesas Solutions Corp.
- * Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
- *
- * This file is based on the drivers/i2c/busses/i2c-sh7760.c
-@@ -12,16 +14,12 @@
- *
- * 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
-+ * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
- #include <linux/clk.h>
- #include <linux/delay.h>
-@@ -608,6 +606,6 @@ static struct platform_driver rcar_i2c_driver = {
-
- module_platform_driver(rcar_i2c_driver);
-
--MODULE_LICENSE("GPL");
-+MODULE_LICENSE("GPL v2");
- MODULE_DESCRIPTION("Renesas R-Car I2C bus driver");
- MODULE_AUTHOR("Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>");
---
-2.1.2
-
diff --git a/patches.renesas/0389-i2c-remove-unnecessary-OOM-messages.patch b/patches.renesas/0389-i2c-remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index 847d16ba28599..0000000000000
--- a/patches.renesas/0389-i2c-remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,237 +0,0 @@
-From 12d55317a2913a0a69065cca3de3b9b867338d1b Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Tue, 13 May 2014 10:51:58 +0900
-Subject: i2c: remove unnecessary OOM messages
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message. For example,
-k.alloc and v.alloc failures use dump_stack().
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Acked-by: Guenter Roeck <linux@roeck-us.net>
-Reviewed-by: Jean Delvare <jdelvare@suse.de>
-Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
-Acked-by: Felipe Balbi <balbi@ti.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Linus Walleij <linus.walleij@linaro.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 46797a2adbf0cdc3be17707dc64e872eeed86a8a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- drivers/i2c/busses/i2c-efm32.c
----
- drivers/i2c/busses/i2c-bcm2835.c | 4 +---
- drivers/i2c/busses/i2c-diolan-u2c.c | 1 -
- drivers/i2c/busses/i2c-eg20t.c | 4 +---
- drivers/i2c/busses/i2c-exynos5.c | 4 +---
- drivers/i2c/busses/i2c-imx.c | 4 +---
- drivers/i2c/busses/i2c-omap.c | 4 +---
- drivers/i2c/busses/i2c-rcar.c | 4 +---
- drivers/i2c/busses/i2c-s3c2410.c | 8 ++------
- drivers/i2c/busses/i2c-simtec.c | 4 +---
- drivers/i2c/busses/i2c-sirf.c | 1 -
- drivers/i2c/busses/i2c-stu300.c | 4 +---
- drivers/i2c/busses/i2c-tegra.c | 4 +---
- drivers/i2c/busses/i2c-wmt.c | 4 +---
- drivers/i2c/busses/scx200_acb.c | 4 +---
- 14 files changed, 13 insertions(+), 41 deletions(-)
-
---- a/drivers/i2c/busses/i2c-bcm2835.c
-+++ b/drivers/i2c/busses/i2c-bcm2835.c
-@@ -225,10 +225,8 @@ static int bcm2835_i2c_probe(struct plat
- struct i2c_adapter *adap;
-
- i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
-- if (!i2c_dev) {
-- dev_err(&pdev->dev, "Cannot allocate i2c_dev\n");
-+ if (!i2c_dev)
- return -ENOMEM;
-- }
- platform_set_drvdata(pdev, i2c_dev);
- i2c_dev->dev = &pdev->dev;
- init_completion(&i2c_dev->completion);
---- a/drivers/i2c/busses/i2c-diolan-u2c.c
-+++ b/drivers/i2c/busses/i2c-diolan-u2c.c
-@@ -455,7 +455,6 @@ static int diolan_u2c_probe(struct usb_i
- /* allocate memory for our device state and initialize it */
- dev = kzalloc(sizeof(*dev), GFP_KERNEL);
- if (dev == NULL) {
-- dev_err(&interface->dev, "no memory for device state\n");
- ret = -ENOMEM;
- goto error;
- }
---- a/drivers/i2c/busses/i2c-eg20t.c
-+++ b/drivers/i2c/busses/i2c-eg20t.c
-@@ -751,10 +751,8 @@ static int pch_i2c_probe(struct pci_dev
- pch_pci_dbg(pdev, "Entered.\n");
-
- adap_info = kzalloc((sizeof(struct adapter_info)), GFP_KERNEL);
-- if (adap_info == NULL) {
-- pch_pci_err(pdev, "Memory allocation FAILED\n");
-+ if (adap_info == NULL)
- return -ENOMEM;
-- }
-
- ret = pci_enable_device(pdev);
- if (ret) {
---- a/drivers/i2c/busses/i2c-exynos5.c
-+++ b/drivers/i2c/busses/i2c-exynos5.c
-@@ -621,10 +621,8 @@ static int exynos5_i2c_probe(struct plat
- int ret;
-
- i2c = devm_kzalloc(&pdev->dev, sizeof(struct exynos5_i2c), GFP_KERNEL);
-- if (!i2c) {
-- dev_err(&pdev->dev, "no memory for state\n");
-+ if (!i2c)
- return -ENOMEM;
-- }
-
- if (of_property_read_u32(np, "clock-frequency", &op_clock)) {
- i2c->speed_mode = HSI2C_FAST_SPD;
---- a/drivers/i2c/busses/i2c-imx.c
-+++ b/drivers/i2c/busses/i2c-imx.c
-@@ -617,10 +617,8 @@ static int i2c_imx_probe(struct platform
-
- i2c_imx = devm_kzalloc(&pdev->dev, sizeof(struct imx_i2c_struct),
- GFP_KERNEL);
-- if (!i2c_imx) {
-- dev_err(&pdev->dev, "can't allocate interface\n");
-+ if (!i2c_imx)
- return -ENOMEM;
-- }
-
- if (of_id)
- i2c_imx->hwdata = of_id->data;
---- a/drivers/i2c/busses/i2c-omap.c
-+++ b/drivers/i2c/busses/i2c-omap.c
-@@ -1114,10 +1114,8 @@ omap_i2c_probe(struct platform_device *p
- }
-
- dev = devm_kzalloc(&pdev->dev, sizeof(struct omap_i2c_dev), GFP_KERNEL);
-- if (!dev) {
-- dev_err(&pdev->dev, "Menory allocation failed\n");
-+ if (!dev)
- return -ENOMEM;
-- }
-
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dev->base = devm_ioremap_resource(&pdev->dev, mem);
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -509,10 +509,8 @@ static int rcar_i2c_probe(struct platfor
- int irq, ret;
-
- priv = devm_kzalloc(dev, sizeof(struct rcar_i2c_priv), GFP_KERNEL);
-- if (!priv) {
-- dev_err(dev, "no mem for private data\n");
-+ if (!priv)
- return -ENOMEM;
-- }
-
- priv->clk = devm_clk_get(dev, NULL);
- if (IS_ERR(priv->clk)) {
---- a/drivers/i2c/busses/i2c-s3c2410.c
-+++ b/drivers/i2c/busses/i2c-s3c2410.c
-@@ -1087,16 +1087,12 @@ static int s3c24xx_i2c_probe(struct plat
- }
-
- i2c = devm_kzalloc(&pdev->dev, sizeof(struct s3c24xx_i2c), GFP_KERNEL);
-- if (!i2c) {
-- dev_err(&pdev->dev, "no memory for state\n");
-+ if (!i2c)
- return -ENOMEM;
-- }
-
- i2c->pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL);
-- if (!i2c->pdata) {
-- dev_err(&pdev->dev, "no memory for platform data\n");
-+ if (!i2c->pdata)
- return -ENOMEM;
-- }
-
- i2c->quirks = s3c24xx_get_device_quirks(pdev);
- if (pdata)
---- a/drivers/i2c/busses/i2c-simtec.c
-+++ b/drivers/i2c/busses/i2c-simtec.c
-@@ -77,10 +77,8 @@ static int simtec_i2c_probe(struct platf
- int ret;
-
- pd = kzalloc(sizeof(struct simtec_i2c_data), GFP_KERNEL);
-- if (pd == NULL) {
-- dev_err(&dev->dev, "cannot allocate private data\n");
-+ if (pd == NULL)
- return -ENOMEM;
-- }
-
- platform_set_drvdata(dev, pd);
-
---- a/drivers/i2c/busses/i2c-sirf.c
-+++ b/drivers/i2c/busses/i2c-sirf.c
-@@ -307,7 +307,6 @@ static int i2c_sirfsoc_probe(struct plat
-
- siic = devm_kzalloc(&pdev->dev, sizeof(*siic), GFP_KERNEL);
- if (!siic) {
-- dev_err(&pdev->dev, "Can't allocate driver data\n");
- err = -ENOMEM;
- goto out;
- }
---- a/drivers/i2c/busses/i2c-stu300.c
-+++ b/drivers/i2c/busses/i2c-stu300.c
-@@ -868,10 +868,8 @@ static int stu300_probe(struct platform_
- int ret = 0;
-
- dev = devm_kzalloc(&pdev->dev, sizeof(struct stu300_dev), GFP_KERNEL);
-- if (!dev) {
-- dev_err(&pdev->dev, "could not allocate device struct\n");
-+ if (!dev)
- return -ENOMEM;
-- }
-
- bus_nr = pdev->id;
- dev->clk = devm_clk_get(&pdev->dev, NULL);
---- a/drivers/i2c/busses/i2c-tegra.c
-+++ b/drivers/i2c/busses/i2c-tegra.c
-@@ -732,10 +732,8 @@ static int tegra_i2c_probe(struct platfo
- }
-
- i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
-- if (!i2c_dev) {
-- dev_err(&pdev->dev, "Could not allocate struct tegra_i2c_dev");
-+ if (!i2c_dev)
- return -ENOMEM;
-- }
-
- i2c_dev->base = base;
- i2c_dev->div_clk = div_clk;
---- a/drivers/i2c/busses/i2c-wmt.c
-+++ b/drivers/i2c/busses/i2c-wmt.c
-@@ -379,10 +379,8 @@ static int wmt_i2c_probe(struct platform
- u32 clk_rate;
-
- i2c_dev = devm_kzalloc(&pdev->dev, sizeof(*i2c_dev), GFP_KERNEL);
-- if (!i2c_dev) {
-- dev_err(&pdev->dev, "device memory allocation failed\n");
-+ if (!i2c_dev)
- return -ENOMEM;
-- }
-
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- i2c_dev->base = devm_ioremap_resource(&pdev->dev, res);
---- a/drivers/i2c/busses/scx200_acb.c
-+++ b/drivers/i2c/busses/scx200_acb.c
-@@ -431,10 +431,8 @@ static struct scx200_acb_iface *scx200_c
- struct i2c_adapter *adapter;
-
- iface = kzalloc(sizeof(*iface), GFP_KERNEL);
-- if (!iface) {
-- pr_err("can't allocate memory\n");
-+ if (!iface)
- return NULL;
-- }
-
- adapter = &iface->adapter;
- i2c_set_adapdata(adapter, iface);
diff --git a/patches.renesas/0390-i2c-sh_mobile-replace-magic-hex-values-with-constant.patch b/patches.renesas/0390-i2c-sh_mobile-replace-magic-hex-values-with-constant.patch
deleted file mode 100644
index b49fb5e5d4046..0000000000000
--- a/patches.renesas/0390-i2c-sh_mobile-replace-magic-hex-values-with-constant.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 70db599459987bfe47bd1f3ec068cf2784480069 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:07 +0200
-Subject: i2c: sh_mobile: replace magic hex values with constants
-
-No functional change, binaries are identical.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit a78f6a4140f95cbedc0b28c4c883e8aa9ba044f1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 11 ++++++-----
- 1 file changed, 6 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index 1d79585ba4b3..d91625eea6bb 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -316,7 +316,7 @@ static unsigned char i2c_op(struct sh_mobile_i2c_data *pd,
-
- switch (op) {
- case OP_START: /* issue start and trigger DTE interrupt */
-- iic_wr(pd, ICCR, 0x94);
-+ iic_wr(pd, ICCR, ICCR_ICE | ICCR_TRS | ICCR_BBSY);
- break;
- case OP_TX_FIRST: /* disable DTE interrupt and write data */
- iic_wr(pd, ICIC, ICIC_WAITE | ICIC_ALE | ICIC_TACKE);
-@@ -327,10 +327,11 @@ static unsigned char i2c_op(struct sh_mobile_i2c_data *pd,
- break;
- case OP_TX_STOP: /* write data and issue a stop afterwards */
- iic_wr(pd, ICDR, data);
-- iic_wr(pd, ICCR, pd->send_stop ? 0x90 : 0x94);
-+ iic_wr(pd, ICCR, pd->send_stop ? ICCR_ICE | ICCR_TRS
-+ : ICCR_ICE | ICCR_TRS | ICCR_BBSY);
- break;
- case OP_TX_TO_RX: /* select read mode */
-- iic_wr(pd, ICCR, 0x81);
-+ iic_wr(pd, ICCR, ICCR_ICE | ICCR_SCP);
- break;
- case OP_RX: /* just read data */
- ret = iic_rd(pd, ICDR);
-@@ -338,13 +339,13 @@ static unsigned char i2c_op(struct sh_mobile_i2c_data *pd,
- case OP_RX_STOP: /* enable DTE interrupt, issue stop */
- iic_wr(pd, ICIC,
- ICIC_DTEE | ICIC_WAITE | ICIC_ALE | ICIC_TACKE);
-- iic_wr(pd, ICCR, 0xc0);
-+ iic_wr(pd, ICCR, ICCR_ICE | ICCR_RACK);
- break;
- case OP_RX_STOP_DATA: /* enable DTE interrupt, read data, issue stop */
- iic_wr(pd, ICIC,
- ICIC_DTEE | ICIC_WAITE | ICIC_ALE | ICIC_TACKE);
- ret = iic_rd(pd, ICDR);
-- iic_wr(pd, ICCR, 0xc0);
-+ iic_wr(pd, ICCR, ICCR_ICE | ICCR_RACK);
- break;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0391-i2c-sh_mobile-improve-error-handling.patch b/patches.renesas/0391-i2c-sh_mobile-improve-error-handling.patch
deleted file mode 100644
index c49aa9d4d8c3d..0000000000000
--- a/patches.renesas/0391-i2c-sh_mobile-improve-error-handling.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 079cd4bac08c29dd3313b61ee009775d72b9b4a7 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:08 +0200
-Subject: i2c: sh_mobile: improve error handling
-
-Use standard i2c error codes for i2c failures. Also, don't print
-something on timeout since it happens regularly with i2c. Simplify some,
-logic, too.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 5a72b25e7896e6358b62b590ce5b3a457516ae40)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 25 +++++++++----------------
- 1 file changed, 9 insertions(+), 16 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index d91625eea6bb..d2fa222df3d1 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -480,7 +480,7 @@ static int start_ch(struct sh_mobile_i2c_data *pd, struct i2c_msg *usr_msg,
- {
- if (usr_msg->len == 0 && (usr_msg->flags & I2C_M_RD)) {
- dev_err(pd->dev, "Unsupported zero length i2c read\n");
-- return -EIO;
-+ return -EOPNOTSUPP;
- }
-
- if (do_init) {
-@@ -515,17 +515,12 @@ static int poll_dte(struct sh_mobile_i2c_data *pd)
- break;
-
- if (val & ICSR_TACK)
-- return -EIO;
-+ return -ENXIO;
-
- udelay(10);
- }
-
-- if (!i) {
-- dev_warn(pd->dev, "Timeout polling for DTE!\n");
-- return -ETIMEDOUT;
-- }
--
-- return 0;
-+ return i ? 0 : -ETIMEDOUT;
- }
-
- static int poll_busy(struct sh_mobile_i2c_data *pd)
-@@ -543,20 +538,18 @@ static int poll_busy(struct sh_mobile_i2c_data *pd)
- */
- if (!(val & ICSR_BUSY)) {
- /* handle missing acknowledge and arbitration lost */
-- if ((val | pd->sr) & (ICSR_TACK | ICSR_AL))
-- return -EIO;
-+ val |= pd->sr;
-+ if (val & ICSR_TACK)
-+ return -ENXIO;
-+ if (val & ICSR_AL)
-+ return -EAGAIN;
- break;
- }
-
- udelay(10);
- }
-
-- if (!i) {
-- dev_err(pd->dev, "Polling timed out\n");
-- return -ETIMEDOUT;
-- }
--
-- return 0;
-+ return i ? 0 : -ETIMEDOUT;
- }
-
- static int sh_mobile_i2c_xfer(struct i2c_adapter *adapter,
---
-2.1.2
-
diff --git a/patches.renesas/0392-i2c-sh_mobile-honor-DT-bus-speed-settings.patch b/patches.renesas/0392-i2c-sh_mobile-honor-DT-bus-speed-settings.patch
deleted file mode 100644
index 26194aaaca029..0000000000000
--- a/patches.renesas/0392-i2c-sh_mobile-honor-DT-bus-speed-settings.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From c8e6f24b09e33ed1ced8d89a589f8805f1c25cd0 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:09 +0200
-Subject: i2c: sh_mobile: honor DT bus speed settings
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 88c289ec28dfb0f383dcdbadd2c759f910585815)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index d2fa222df3d1..2e481abd50ce 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -657,6 +657,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- struct resource *res;
- int size;
- int ret;
-+ u32 bus_speed;
-
- pd = kzalloc(sizeof(struct sh_mobile_i2c_data), GFP_KERNEL);
- if (pd == NULL) {
-@@ -697,7 +698,9 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- }
-
- /* Use platform data bus speed or STANDARD_MODE */
-- pd->bus_speed = STANDARD_MODE;
-+ ret = of_property_read_u32(dev->dev.of_node, "clock-frequency", &bus_speed);
-+ pd->bus_speed = ret ? STANDARD_MODE : bus_speed;
-+
- if (pdata && pdata->bus_speed)
- pd->bus_speed = pdata->bus_speed;
- pd->clks_per_count = 1;
---
-2.1.2
-
diff --git a/patches.renesas/0393-i2c-sh_mobile-devm-conversion-low-hanging-fruits.patch b/patches.renesas/0393-i2c-sh_mobile-devm-conversion-low-hanging-fruits.patch
deleted file mode 100644
index 90fe4e25738ba..0000000000000
--- a/patches.renesas/0393-i2c-sh_mobile-devm-conversion-low-hanging-fruits.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 2d9c1f1e6ce1667912039da7a31e4d9101c00e3d Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:11 +0200
-Subject: i2c: sh_mobile: devm conversion, low hanging fruits
-
-Convert the easy parts to devm. irqs will be converted in a seperate
-patch to keep diffs readable.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 4fd31c2eb7bf19927524bca1c5c17e6bb0f4f6eb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 41 ++++++++++----------------------------
- 1 file changed, 10 insertions(+), 31 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index 2e481abd50ce..c47d11493b97 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -655,45 +655,33 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- struct sh_mobile_i2c_data *pd;
- struct i2c_adapter *adap;
- struct resource *res;
-- int size;
- int ret;
- u32 bus_speed;
-
-- pd = kzalloc(sizeof(struct sh_mobile_i2c_data), GFP_KERNEL);
-- if (pd == NULL) {
-- dev_err(&dev->dev, "cannot allocate private data\n");
-+ pd = devm_kzalloc(&dev->dev, sizeof(struct sh_mobile_i2c_data), GFP_KERNEL);
-+ if (!pd)
- return -ENOMEM;
-- }
-
-- pd->clk = clk_get(&dev->dev, NULL);
-+ pd->clk = devm_clk_get(&dev->dev, NULL);
- if (IS_ERR(pd->clk)) {
- dev_err(&dev->dev, "cannot get clock\n");
-- ret = PTR_ERR(pd->clk);
-- goto err;
-+ return PTR_ERR(pd->clk);
- }
-
- ret = sh_mobile_i2c_hook_irqs(dev, 1);
- if (ret) {
- dev_err(&dev->dev, "cannot request IRQ\n");
-- goto err_clk;
-+ return ret;
- }
-
- pd->dev = &dev->dev;
- platform_set_drvdata(dev, pd);
-
- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
-- if (res == NULL) {
-- dev_err(&dev->dev, "cannot find IO resource\n");
-- ret = -ENOENT;
-- goto err_irq;
-- }
-
-- size = resource_size(res);
--
-- pd->reg = ioremap(res->start, size);
-- if (pd->reg == NULL) {
-- dev_err(&dev->dev, "cannot map IO\n");
-- ret = -ENXIO;
-+ pd->reg = devm_ioremap_resource(&dev->dev, res);
-+ if (IS_ERR(pd->reg)) {
-+ ret = PTR_ERR(pd->reg);
- goto err_irq;
- }
-
-@@ -710,7 +698,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- /* The IIC blocks on SH-Mobile ARM processors
- * come with two new bits in ICIC.
- */
-- if (size > 0x17)
-+ if (resource_size(res) > 0x17)
- pd->flags |= IIC_FLAG_HAS_ICIC67;
-
- sh_mobile_i2c_init(pd);
-@@ -747,7 +735,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- ret = i2c_add_numbered_adapter(adap);
- if (ret < 0) {
- dev_err(&dev->dev, "cannot add numbered adapter\n");
-- goto err_all;
-+ goto err_irq;
- }
-
- dev_info(&dev->dev,
-@@ -756,14 +744,8 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
-
- return 0;
-
-- err_all:
-- iounmap(pd->reg);
- err_irq:
- sh_mobile_i2c_hook_irqs(dev, 0);
-- err_clk:
-- clk_put(pd->clk);
-- err:
-- kfree(pd);
- return ret;
- }
-
-@@ -772,11 +754,8 @@ static int sh_mobile_i2c_remove(struct platform_device *dev)
- struct sh_mobile_i2c_data *pd = platform_get_drvdata(dev);
-
- i2c_del_adapter(&pd->adap);
-- iounmap(pd->reg);
- sh_mobile_i2c_hook_irqs(dev, 0);
-- clk_put(pd->clk);
- pm_runtime_disable(&dev->dev);
-- kfree(pd);
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0394-i2c-sh_mobile-devm-conversion-irq-setup.patch b/patches.renesas/0394-i2c-sh_mobile-devm-conversion-irq-setup.patch
deleted file mode 100644
index 26770e4938de4..0000000000000
--- a/patches.renesas/0394-i2c-sh_mobile-devm-conversion-irq-setup.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 67f3964754c2643860c3bdd8d3eeebe90b5f45cb Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:12 +0200
-Subject: i2c: sh_mobile: devm conversion, irq setup
-
-This is what devm was made for. No rollback mechanism needed, remove the
-hook parameter from the irq setup function and simplify it. While we are
-here change some variables to proper types.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 7fe8a9993337e4d1957737b4468fc574af8fb957)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 56 ++++++++++----------------------------
- 1 file changed, 15 insertions(+), 41 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index c47d11493b97..ddc9970fd724 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -611,42 +611,25 @@ static struct i2c_algorithm sh_mobile_i2c_algorithm = {
- .master_xfer = sh_mobile_i2c_xfer,
- };
-
--static int sh_mobile_i2c_hook_irqs(struct platform_device *dev, int hook)
-+static int sh_mobile_i2c_hook_irqs(struct platform_device *dev)
- {
- struct resource *res;
-- int ret = -ENXIO;
-- int n, k = 0;
-+ resource_size_t n;
-+ int k = 0, ret;
-
- while ((res = platform_get_resource(dev, IORESOURCE_IRQ, k))) {
-- for (n = res->start; hook && n <= res->end; n++) {
-- if (request_irq(n, sh_mobile_i2c_isr, 0,
-- dev_name(&dev->dev), dev)) {
-- for (n--; n >= res->start; n--)
-- free_irq(n, dev);
--
-- goto rollback;
-+ for (n = res->start; n <= res->end; n++) {
-+ ret = devm_request_irq(&dev->dev, n, sh_mobile_i2c_isr,
-+ 0, dev_name(&dev->dev), dev);
-+ if (ret) {
-+ dev_err(&dev->dev, "cannot request IRQ %pa\n", &n);
-+ return ret;
- }
- }
- k++;
- }
-
-- if (hook)
-- return k > 0 ? 0 : -ENOENT;
--
-- ret = 0;
--
-- rollback:
-- k--;
--
-- while (k >= 0) {
-- res = platform_get_resource(dev, IORESOURCE_IRQ, k);
-- for (n = res->start; n <= res->end; n++)
-- free_irq(n, dev);
--
-- k--;
-- }
--
-- return ret;
-+ return k > 0 ? 0 : -ENOENT;
- }
-
- static int sh_mobile_i2c_probe(struct platform_device *dev)
-@@ -668,11 +651,9 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- return PTR_ERR(pd->clk);
- }
-
-- ret = sh_mobile_i2c_hook_irqs(dev, 1);
-- if (ret) {
-- dev_err(&dev->dev, "cannot request IRQ\n");
-+ ret = sh_mobile_i2c_hook_irqs(dev);
-+ if (ret)
- return ret;
-- }
-
- pd->dev = &dev->dev;
- platform_set_drvdata(dev, pd);
-@@ -680,10 +661,8 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- res = platform_get_resource(dev, IORESOURCE_MEM, 0);
-
- pd->reg = devm_ioremap_resource(&dev->dev, res);
-- if (IS_ERR(pd->reg)) {
-- ret = PTR_ERR(pd->reg);
-- goto err_irq;
-- }
-+ if (IS_ERR(pd->reg))
-+ return PTR_ERR(pd->reg);
-
- /* Use platform data bus speed or STANDARD_MODE */
- ret = of_property_read_u32(dev->dev.of_node, "clock-frequency", &bus_speed);
-@@ -735,7 +714,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- ret = i2c_add_numbered_adapter(adap);
- if (ret < 0) {
- dev_err(&dev->dev, "cannot add numbered adapter\n");
-- goto err_irq;
-+ return ret;
- }
-
- dev_info(&dev->dev,
-@@ -743,10 +722,6 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- adap->nr, pd->bus_speed, pd->iccl, pd->icch);
-
- return 0;
--
-- err_irq:
-- sh_mobile_i2c_hook_irqs(dev, 0);
-- return ret;
- }
-
- static int sh_mobile_i2c_remove(struct platform_device *dev)
-@@ -754,7 +729,6 @@ static int sh_mobile_i2c_remove(struct platform_device *dev)
- struct sh_mobile_i2c_data *pd = platform_get_drvdata(dev);
-
- i2c_del_adapter(&pd->adap);
-- sh_mobile_i2c_hook_irqs(dev, 0);
- pm_runtime_disable(&dev->dev);
- return 0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0395-i2c-sh_mobile-remove-superfluous-offset-parameter.patch b/patches.renesas/0395-i2c-sh_mobile-remove-superfluous-offset-parameter.patch
deleted file mode 100644
index b0a0337358734..0000000000000
--- a/patches.renesas/0395-i2c-sh_mobile-remove-superfluous-offset-parameter.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From fa21ef27cc94ba526658aee4c06fe1487eb1f435 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:13 +0200
-Subject: i2c: sh_mobile: remove superfluous offset parameter
-
-Following the KISS principle, remove unneeded stuff.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit ed4121e129ae46615ab570318b5b8f31494ced98)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 15 ++++++---------
- 1 file changed, 6 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index ddc9970fd724..9a5b693454e1 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -194,7 +194,7 @@ static void iic_set_clr(struct sh_mobile_i2c_data *pd, int offs,
- iic_wr(pd, offs, (iic_rd(pd, offs) | set) & ~clr);
- }
-
--static u32 sh_mobile_i2c_iccl(unsigned long count_khz, u32 tLOW, u32 tf, int offset)
-+static u32 sh_mobile_i2c_iccl(unsigned long count_khz, u32 tLOW, u32 tf)
- {
- /*
- * Conditional expression:
-@@ -206,10 +206,10 @@ static u32 sh_mobile_i2c_iccl(unsigned long count_khz, u32 tLOW, u32 tf, int off
- * account the fall time of SCL signal (tf). Default tf value
- * should be 0.3 us, for safety.
- */
-- return (((count_khz * (tLOW + tf)) + 5000) / 10000) + offset;
-+ return (((count_khz * (tLOW + tf)) + 5000) / 10000);
- }
-
--static u32 sh_mobile_i2c_icch(unsigned long count_khz, u32 tHIGH, u32 tf, int offset)
-+static u32 sh_mobile_i2c_icch(unsigned long count_khz, u32 tHIGH, u32 tf)
- {
- /*
- * Conditional expression:
-@@ -225,14 +225,13 @@ static u32 sh_mobile_i2c_icch(unsigned long count_khz, u32 tHIGH, u32 tf, int of
- * to take into account the fall time of SDA signal (tf) at START
- * condition, in order to meet both tHIGH and tHD;STA specs.
- */
-- return (((count_khz * (tHIGH + tf)) + 5000) / 10000) + offset;
-+ return (((count_khz * (tHIGH + tf)) + 5000) / 10000);
- }
-
- static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- {
- unsigned long i2c_clk_khz;
- u32 tHIGH, tLOW, tf;
-- int offset;
-
- /* Get clock rate after clock is enabled */
- clk_prepare_enable(pd->clk);
-@@ -243,26 +242,24 @@ static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- tLOW = 47; /* tLOW = 4.7 us */
- tHIGH = 40; /* tHD;STA = tHIGH = 4.0 us */
- tf = 3; /* tf = 0.3 us */
-- offset = 0; /* No offset */
- } else if (pd->bus_speed == FAST_MODE) {
- tLOW = 13; /* tLOW = 1.3 us */
- tHIGH = 6; /* tHD;STA = tHIGH = 0.6 us */
- tf = 3; /* tf = 0.3 us */
-- offset = 0; /* No offset */
- } else {
- dev_err(pd->dev, "unrecognized bus speed %lu Hz\n",
- pd->bus_speed);
- goto out;
- }
-
-- pd->iccl = sh_mobile_i2c_iccl(i2c_clk_khz, tLOW, tf, offset);
-+ pd->iccl = sh_mobile_i2c_iccl(i2c_clk_khz, tLOW, tf);
- /* one more bit of ICCL in ICIC */
- if ((pd->iccl > 0xff) && (pd->flags & IIC_FLAG_HAS_ICIC67))
- pd->icic |= ICIC_ICCLB8;
- else
- pd->icic &= ~ICIC_ICCLB8;
-
-- pd->icch = sh_mobile_i2c_icch(i2c_clk_khz, tHIGH, tf, offset);
-+ pd->icch = sh_mobile_i2c_icch(i2c_clk_khz, tHIGH, tf);
- /* one more bit of ICCH in ICIC */
- if ((pd->icch > 0xff) && (pd->flags & IIC_FLAG_HAS_ICIC67))
- pd->icic |= ICIC_ICCHB8;
---
-2.1.2
-
diff --git a/patches.renesas/0396-i2c-sh_mobile-bail-out-on-errors-when-initializing.patch b/patches.renesas/0396-i2c-sh_mobile-bail-out-on-errors-when-initializing.patch
deleted file mode 100644
index 9976fbcc2be81..0000000000000
--- a/patches.renesas/0396-i2c-sh_mobile-bail-out-on-errors-when-initializing.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 954abf2a084b2ee36c36723a847afea28b557c90 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:14 +0200
-Subject: i2c: sh_mobile: bail out on errors when initializing
-
-sh_mobile_i2c_init() could detect wrong settings, but didn't bail out,
-so it would continue unconfigured. Fix this.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 6ed7053c2255c34886297b995c6a18607b36d668)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 12 +++++++-----
- 1 file changed, 7 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index 9a5b693454e1..9f02013eaeeb 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -228,7 +228,7 @@ static u32 sh_mobile_i2c_icch(unsigned long count_khz, u32 tHIGH, u32 tf)
- return (((count_khz * (tHIGH + tf)) + 5000) / 10000);
- }
-
--static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
-+static int sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- {
- unsigned long i2c_clk_khz;
- u32 tHIGH, tLOW, tf;
-@@ -236,6 +236,7 @@ static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- /* Get clock rate after clock is enabled */
- clk_prepare_enable(pd->clk);
- i2c_clk_khz = clk_get_rate(pd->clk) / 1000;
-+ clk_disable_unprepare(pd->clk);
- i2c_clk_khz /= pd->clks_per_count;
-
- if (pd->bus_speed == STANDARD_MODE) {
-@@ -249,7 +250,7 @@ static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- } else {
- dev_err(pd->dev, "unrecognized bus speed %lu Hz\n",
- pd->bus_speed);
-- goto out;
-+ return -EINVAL;
- }
-
- pd->iccl = sh_mobile_i2c_iccl(i2c_clk_khz, tLOW, tf);
-@@ -266,8 +267,7 @@ static void sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- else
- pd->icic &= ~ICIC_ICCHB8;
-
--out:
-- clk_disable_unprepare(pd->clk);
-+ return 0;
- }
-
- static void activate_ch(struct sh_mobile_i2c_data *pd)
-@@ -677,7 +677,9 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- if (resource_size(res) > 0x17)
- pd->flags |= IIC_FLAG_HAS_ICIC67;
-
-- sh_mobile_i2c_init(pd);
-+ ret = sh_mobile_i2c_init(pd);
-+ if (ret)
-+ return ret;
-
- /* Enable Runtime PM for this device.
- *
---
-2.1.2
-
diff --git a/patches.renesas/0397-i2c-sh_mobile-check-timing-parameters-for-valid-rang.patch b/patches.renesas/0397-i2c-sh_mobile-check-timing-parameters-for-valid-rang.patch
deleted file mode 100644
index 0d87d0fcadd1d..0000000000000
--- a/patches.renesas/0397-i2c-sh_mobile-check-timing-parameters-for-valid-rang.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 4230dfe425428acfa51782df22d102c04840366c Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:15 +0200
-Subject: i2c: sh_mobile: check timing parameters for valid range
-
-Due to misconfiguration, it can happen that the calculated timing
-parameters are out of range. Bail out if that happens. We can also
-simplify some logic later because of the verified value. Also, make the
-printouts of the values more precise by adding the hex-prefixes.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 7663ebefca8079ef0fd2fff1047d3d10af654c78)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 17 +++++++++++++----
- 1 file changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index 9f02013eaeeb..b1d399e3e5fc 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -232,6 +232,7 @@ static int sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- {
- unsigned long i2c_clk_khz;
- u32 tHIGH, tLOW, tf;
-+ uint16_t max_val;
-
- /* Get clock rate after clock is enabled */
- clk_prepare_enable(pd->clk);
-@@ -254,15 +255,23 @@ static int sh_mobile_i2c_init(struct sh_mobile_i2c_data *pd)
- }
-
- pd->iccl = sh_mobile_i2c_iccl(i2c_clk_khz, tLOW, tf);
-+ pd->icch = sh_mobile_i2c_icch(i2c_clk_khz, tHIGH, tf);
-+
-+ max_val = pd->flags & IIC_FLAG_HAS_ICIC67 ? 0x1ff : 0xff;
-+ if (pd->iccl > max_val || pd->icch > max_val) {
-+ dev_err(pd->dev, "timing values out of range: L/H=0x%x/0x%x\n",
-+ pd->iccl, pd->icch);
-+ return -EINVAL;
-+ }
-+
- /* one more bit of ICCL in ICIC */
-- if ((pd->iccl > 0xff) && (pd->flags & IIC_FLAG_HAS_ICIC67))
-+ if (pd->iccl & 0x100)
- pd->icic |= ICIC_ICCLB8;
- else
- pd->icic &= ~ICIC_ICCLB8;
-
-- pd->icch = sh_mobile_i2c_icch(i2c_clk_khz, tHIGH, tf);
- /* one more bit of ICCH in ICIC */
-- if ((pd->icch > 0xff) && (pd->flags & IIC_FLAG_HAS_ICIC67))
-+ if (pd->icch & 0x100)
- pd->icic |= ICIC_ICCHB8;
- else
- pd->icic &= ~ICIC_ICCHB8;
-@@ -717,7 +726,7 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- }
-
- dev_info(&dev->dev,
-- "I2C adapter %d with bus speed %lu Hz (L/H=%x/%x)\n",
-+ "I2C adapter %d with bus speed %lu Hz (L/H=0x%x/0x%x)\n",
- adap->nr, pd->bus_speed, pd->iccl, pd->icch);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0398-i2c-sh_mobile-fix-clock-calculation-for-newer-SoCs.patch b/patches.renesas/0398-i2c-sh_mobile-fix-clock-calculation-for-newer-SoCs.patch
deleted file mode 100644
index 8865ead530b57..0000000000000
--- a/patches.renesas/0398-i2c-sh_mobile-fix-clock-calculation-for-newer-SoCs.patch
+++ /dev/null
@@ -1,109 +0,0 @@
-From c9510d27e229e82bc00747637f023a3805013dfc Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 2 May 2014 21:15:16 +0200
-Subject: i2c: sh_mobile: fix clock calculation for newer SoCs
-
-Newer SoCs have so fast input clocks that the ICCL/H registers only
-count every second clock to have a meaningful 9-bit range. The driver
-was already prepared for that happening, but didn't use it so far.
-Add the proper DT configuration for SoCs that need it.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 67240dfcb8dcf756cc00fb37f5cb7e3ee2fa6190)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 48 ++++++++++++++++++++++++++++++--------
- 1 file changed, 38 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index b1d399e3e5fc..c29be2bba6ea 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -32,6 +32,7 @@
- #include <linux/clk.h>
- #include <linux/io.h>
- #include <linux/slab.h>
-+#include <linux/of_device.h>
- #include <linux/i2c/i2c-sh_mobile.h>
-
- /* Transmit operation: */
-@@ -139,6 +140,10 @@ struct sh_mobile_i2c_data {
- bool send_stop;
- };
-
-+struct sh_mobile_dt_config {
-+ int clks_per_count;
-+};
-+
- #define IIC_FLAG_HAS_ICIC67 (1 << 0)
-
- #define STANDARD_MODE 100000
-@@ -617,6 +622,22 @@ static struct i2c_algorithm sh_mobile_i2c_algorithm = {
- .master_xfer = sh_mobile_i2c_xfer,
- };
-
-+static const struct sh_mobile_dt_config default_dt_config = {
-+ .clks_per_count = 1,
-+};
-+
-+static const struct sh_mobile_dt_config rcar_gen2_dt_config = {
-+ .clks_per_count = 2,
-+};
-+
-+static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
-+ { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
-+ { .compatible = "renesas,iic-r8a7790", .data = &rcar_gen2_dt_config },
-+ { .compatible = "renesas,iic-r8a7791", .data = &rcar_gen2_dt_config },
-+ {},
-+};
-+MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);
-+
- static int sh_mobile_i2c_hook_irqs(struct platform_device *dev)
- {
- struct resource *res;
-@@ -674,11 +695,24 @@ static int sh_mobile_i2c_probe(struct platform_device *dev)
- ret = of_property_read_u32(dev->dev.of_node, "clock-frequency", &bus_speed);
- pd->bus_speed = ret ? STANDARD_MODE : bus_speed;
-
-- if (pdata && pdata->bus_speed)
-- pd->bus_speed = pdata->bus_speed;
- pd->clks_per_count = 1;
-- if (pdata && pdata->clks_per_count)
-- pd->clks_per_count = pdata->clks_per_count;
-+
-+ if (dev->dev.of_node) {
-+ const struct of_device_id *match;
-+
-+ match = of_match_device(sh_mobile_i2c_dt_ids, &dev->dev);
-+ if (match) {
-+ const struct sh_mobile_dt_config *config;
-+
-+ config = match->data;
-+ pd->clks_per_count = config->clks_per_count;
-+ }
-+ } else {
-+ if (pdata && pdata->bus_speed)
-+ pd->bus_speed = pdata->bus_speed;
-+ if (pdata && pdata->clks_per_count)
-+ pd->clks_per_count = pdata->clks_per_count;
-+ }
-
- /* The IIC blocks on SH-Mobile ARM processors
- * come with two new bits in ICIC.
-@@ -758,12 +792,6 @@ static const struct dev_pm_ops sh_mobile_i2c_dev_pm_ops = {
- .runtime_resume = sh_mobile_i2c_runtime_nop,
- };
-
--static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
-- { .compatible = "renesas,rmobile-iic", },
-- {},
--};
--MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);
--
- static struct platform_driver sh_mobile_i2c_driver = {
- .driver = {
- .name = "i2c-sh_mobile",
---
-2.1.2
-
diff --git a/patches.renesas/0399-i2c-sh_mobile-add-compatibles-for-additional-SoC.patch b/patches.renesas/0399-i2c-sh_mobile-add-compatibles-for-additional-SoC.patch
deleted file mode 100644
index fb0c1769efe6c..0000000000000
--- a/patches.renesas/0399-i2c-sh_mobile-add-compatibles-for-additional-SoC.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 5665f0c871b8d33d5d426c00ec8324216d11b1c4 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 27 May 2014 14:06:28 +0200
-Subject: i2c: sh_mobile: add compatibles for additional SoC
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 90104d06372e41b2a844950f6648322b09f9b8b9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-sh_mobile.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/i2c/busses/i2c-sh_mobile.c b/drivers/i2c/busses/i2c-sh_mobile.c
-index c29be2bba6ea..8b5e79cb4468 100644
---- a/drivers/i2c/busses/i2c-sh_mobile.c
-+++ b/drivers/i2c/busses/i2c-sh_mobile.c
-@@ -634,6 +634,9 @@ static const struct of_device_id sh_mobile_i2c_dt_ids[] = {
- { .compatible = "renesas,rmobile-iic", .data = &default_dt_config },
- { .compatible = "renesas,iic-r8a7790", .data = &rcar_gen2_dt_config },
- { .compatible = "renesas,iic-r8a7791", .data = &rcar_gen2_dt_config },
-+ { .compatible = "renesas,iic-r8a7792", .data = &rcar_gen2_dt_config },
-+ { .compatible = "renesas,iic-r8a7793", .data = &rcar_gen2_dt_config },
-+ { .compatible = "renesas,iic-r8a7794", .data = &rcar_gen2_dt_config },
- {},
- };
- MODULE_DEVICE_TABLE(of, sh_mobile_i2c_dt_ids);
---
-2.1.2
-
diff --git a/patches.renesas/0400-pinctrl-allows-not-to-define-the-get_group_pins-oper.patch b/patches.renesas/0400-pinctrl-allows-not-to-define-the-get_group_pins-oper.patch
deleted file mode 100644
index dcb7b91b62358..0000000000000
--- a/patches.renesas/0400-pinctrl-allows-not-to-define-the-get_group_pins-oper.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 1c36600d9721647a1441bd755be29eb00cc324cf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Antoine=20T=C3=A9nart?= <antoine.tenart@free-electrons.com>
-Date: Thu, 10 Apr 2014 15:07:50 +0200
-Subject: pinctrl: allows not to define the get_group_pins operation
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-When using a group only pinctrl driver, which does not have any
-information on the pins it is useless to define a get_group_pins
-always returning an empty list of pins.
-
-When not using get_group_pin[1], a driver must implement it so
-pins = NULL and num_pins = 0. This patch makes it the default
-behaviour if not defined in the pinctrl driver when used in
-pinmux enable and disable funtions and in pinctrl_groups_show.
-
-It also adds a check in pinctrl_get_group_pins and return -EINVAL if
-not defined. This function is called in the gpiolib when adding when
-pingroup range. It cannot be used if no group is defined, so this seams
-reasonable.
-
-[1] get_group_pin(struct pinctrl_dev *pctldev,
- unsigned selector,
- const unsigned **pins,
- unsigned *num_pins);
-
-Signed-off-by: Antoine Ténart <antoine.tenart@free-electrons.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit e5b3b2d9ed202697a937c282f9c4d93b1e3e0848)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/core.c | 17 ++++++++++-------
- drivers/pinctrl/pinmux.c | 23 +++++++++++++----------
- 2 files changed, 23 insertions(+), 17 deletions(-)
-
---- a/drivers/pinctrl/core.c
-+++ b/drivers/pinctrl/core.c
-@@ -468,6 +468,9 @@ int pinctrl_get_group_pins(struct pinctr
- const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
- int gs;
-
-+ if (!pctlops->get_group_pins)
-+ return -EINVAL;
-+
- gs = pinctrl_get_group_selector(pctldev, pin_group);
- if (gs < 0)
- return gs;
-@@ -1360,15 +1363,16 @@ static int pinctrl_groups_show(struct se
-
- seq_puts(s, "registered pin groups:\n");
- while (selector < ngroups) {
-- const unsigned *pins;
-- unsigned num_pins;
-+ const unsigned *pins = NULL;
-+ unsigned num_pins = 0;
- const char *gname = ops->get_group_name(pctldev, selector);
- const char *pname;
-- int ret;
-+ int ret = 0;
- int i;
-
-- ret = ops->get_group_pins(pctldev, selector,
-- &pins, &num_pins);
-+ if (ops->get_group_pins)
-+ ret = ops->get_group_pins(pctldev, selector,
-+ &pins, &num_pins);
- if (ret)
- seq_printf(s, "%s [ERROR GETTING PINS]\n",
- gname);
-@@ -1692,8 +1696,7 @@ static int pinctrl_check_ops(struct pinc
-
- if (!ops ||
- !ops->get_groups_count ||
-- !ops->get_group_name ||
-- !ops->get_group_pins)
-+ !ops->get_group_name)
- return -EINVAL;
-
- if (ops->dt_node_to_map && !ops->dt_free_map)
---- a/drivers/pinctrl/pinmux.c
-+++ b/drivers/pinctrl/pinmux.c
-@@ -391,14 +391,16 @@ int pinmux_enable_setting(struct pinctrl
- struct pinctrl_dev *pctldev = setting->pctldev;
- const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
- const struct pinmux_ops *ops = pctldev->desc->pmxops;
-- int ret;
-- const unsigned *pins;
-- unsigned num_pins;
-+ int ret = 0;
-+ const unsigned *pins = NULL;
-+ unsigned num_pins = 0;
- int i;
- struct pin_desc *desc;
-
-- ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
-- &pins, &num_pins);
-+ if (pctlops->get_group_pins)
-+ ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
-+ &pins, &num_pins);
-+
- if (ret) {
- const char *gname;
-
-@@ -470,14 +472,15 @@ void pinmux_disable_setting(struct pinct
- struct pinctrl_dev *pctldev = setting->pctldev;
- const struct pinctrl_ops *pctlops = pctldev->desc->pctlops;
- const struct pinmux_ops *ops = pctldev->desc->pmxops;
-- int ret;
-- const unsigned *pins;
-- unsigned num_pins;
-+ int ret = 0;
-+ const unsigned *pins = NULL;
-+ unsigned num_pins = 0;
- int i;
- struct pin_desc *desc;
-
-- ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
-- &pins, &num_pins);
-+ if (pctlops->get_group_pins)
-+ ret = pctlops->get_group_pins(pctldev, setting->data.mux.group,
-+ &pins, &num_pins);
- if (ret) {
- const char *gname;
-
diff --git a/patches.renesas/0401-pinctrl-pinconf-generic-Use-kmemdup-instead-of-kmall.patch b/patches.renesas/0401-pinctrl-pinconf-generic-Use-kmemdup-instead-of-kmall.patch
deleted file mode 100644
index d4f7e46cc46e7..0000000000000
--- a/patches.renesas/0401-pinctrl-pinconf-generic-Use-kmemdup-instead-of-kmall.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 93e56fdd436255a86c3e850f097172ca3c60a6a7 Mon Sep 17 00:00:00 2001
-From: Benoit Taine <benoit.taine@lip6.fr>
-Date: Mon, 26 May 2014 17:21:27 +0200
-Subject: pinctrl: pinconf-generic: Use kmemdup instead of kmalloc + memcpy
-
-This issue was reported by coccicheck using the semantic patch
-at scripts/coccinelle/api/memdup.cocci
-
-Signed-off-by: Benoit Taine <benoit.taine@lip6.fr>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit db388dfb90368638ad238c27b045b6c9bf1f6c17)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/pinconf-generic.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
-index 3d9a999fb699..2457ca961f1c 100644
---- a/drivers/pinctrl/pinconf-generic.c
-+++ b/drivers/pinctrl/pinconf-generic.c
-@@ -228,13 +228,12 @@ int pinconf_generic_parse_dt_config(struct device_node *np,
- * Now limit the number of configs to the real number of
- * found properties.
- */
-- *configs = kzalloc(ncfg * sizeof(unsigned long), GFP_KERNEL);
-+ *configs = kmemdup(cfg, ncfg * sizeof(unsigned long), GFP_KERNEL);
- if (!*configs) {
- ret = -ENOMEM;
- goto out;
- }
-
-- memcpy(*configs, cfg, ncfg * sizeof(unsigned long));
- *nconfigs = ncfg;
-
- out:
---
-2.1.2
-
diff --git a/patches.renesas/0402-pinctrl-Enable-power-source-to-be-extracted-from-DT-.patch b/patches.renesas/0402-pinctrl-Enable-power-source-to-be-extracted-from-DT-.patch
deleted file mode 100644
index 35b4ece021cbe..0000000000000
--- a/patches.renesas/0402-pinctrl-Enable-power-source-to-be-extracted-from-DT-.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 2b666aaefc2ce2a5e40003a73009bf51ffb930c8 Mon Sep 17 00:00:00 2001
-From: "Ivan T. Ivanov" <iivanov@mm-sol.com>
-Date: Tue, 27 May 2014 09:27:36 +0300
-Subject: pinctrl: Enable "power-source" to be extracted from DT files
-
-Add "power-source" property to generic options used for DT parsing files.
-This enables drivers, which use generic pin configurations, to get the
-value passed to this property.
-
-Signed-off-by: Ivan T. Ivanov <iivanov@mm-sol.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit ca6c55189a631f3380ff0a28f90d920a84e60d7b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt | 1 +
- drivers/pinctrl/pinconf-generic.c | 1 +
- 2 files changed, 2 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-index 4414163e76d2..fa40a177164c 100644
---- a/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-+++ b/Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt
-@@ -156,6 +156,7 @@ input-disable - disable input on pin (no effect on output)
- input-schmitt-enable - enable schmitt-trigger mode
- input-schmitt-disable - disable schmitt-trigger mode
- input-debounce - debounce mode with debound time X
-+power-source - select between different power supplies
- low-power-enable - enable low power mode
- low-power-disable - disable low power mode
- output-low - set the pin to output mode with low level
-diff --git a/drivers/pinctrl/pinconf-generic.c b/drivers/pinctrl/pinconf-generic.c
-index 2457ca961f1c..29ff77f90fcb 100644
---- a/drivers/pinctrl/pinconf-generic.c
-+++ b/drivers/pinctrl/pinconf-generic.c
-@@ -166,6 +166,7 @@ static struct pinconf_generic_dt_params dt_params[] = {
- { "input-schmitt-enable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 1 },
- { "input-schmitt-disable", PIN_CONFIG_INPUT_SCHMITT_ENABLE, 0 },
- { "input-debounce", PIN_CONFIG_INPUT_DEBOUNCE, 0 },
-+ { "power-source", PIN_CONFIG_POWER_SOURCE, 0 },
- { "low-power-enable", PIN_CONFIG_LOW_POWER_MODE, 1 },
- { "low-power-disable", PIN_CONFIG_LOW_POWER_MODE, 0 },
- { "output-low", PIN_CONFIG_OUTPUT, 0, },
---
-2.1.2
-
diff --git a/patches.renesas/0403-thermal-rcar-Use-pm_runtime_put-i.s.o.-pm_runtime_pu.patch b/patches.renesas/0403-thermal-rcar-Use-pm_runtime_put-i.s.o.-pm_runtime_pu.patch
deleted file mode 100644
index 45bca0c5cd021..0000000000000
--- a/patches.renesas/0403-thermal-rcar-Use-pm_runtime_put-i.s.o.-pm_runtime_pu.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 401124dbadc2e7ceab77f62f2f7fb77ce52da0cb Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 19:02:55 +0200
-Subject: thermal: rcar: Use pm_runtime_put() i.s.o. pm_runtime_put_sync()
-
-There's no need for this to be synchronous
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-(cherry picked from commit 09be511cdab813c2971c9f9af0cb40f6583cf80d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/thermal/rcar_thermal.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
-index 5a37940b02c9..a8ed0e0265ae 100644
---- a/drivers/thermal/rcar_thermal.c
-+++ b/drivers/thermal/rcar_thermal.c
-@@ -470,7 +470,7 @@ error_unregister:
- rcar_thermal_irq_disable(priv);
- }
-
-- pm_runtime_put_sync(dev);
-+ pm_runtime_put(dev);
- pm_runtime_disable(dev);
-
- return ret;
-@@ -488,7 +488,7 @@ static int rcar_thermal_remove(struct platform_device *pdev)
- rcar_thermal_irq_disable(priv);
- }
-
-- pm_runtime_put_sync(dev);
-+ pm_runtime_put(dev);
- pm_runtime_disable(dev);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0404-thermal-rcar-remove-unnecessary-OOM-messages.patch b/patches.renesas/0404-thermal-rcar-remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index 50698a1dabe99..0000000000000
--- a/patches.renesas/0404-thermal-rcar-remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From af1ca0e6267d457c67852835dfd589e5c4470970 Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Wed, 7 May 2014 15:03:25 +0900
-Subject: thermal: rcar: remove unnecessary OOM messages
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message.
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-(cherry picked from commit b0a60d88d60b92c769ec589796403937f6e5243e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/thermal/rcar_thermal.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
-diff --git a/drivers/thermal/rcar_thermal.c b/drivers/thermal/rcar_thermal.c
-index a8ed0e0265ae..8803e693fe68 100644
---- a/drivers/thermal/rcar_thermal.c
-+++ b/drivers/thermal/rcar_thermal.c
-@@ -374,10 +374,8 @@ static int rcar_thermal_probe(struct platform_device *pdev)
- int idle = IDLE_INTERVAL;
-
- common = devm_kzalloc(dev, sizeof(*common), GFP_KERNEL);
-- if (!common) {
-- dev_err(dev, "Could not allocate common\n");
-+ if (!common)
- return -ENOMEM;
-- }
-
- INIT_LIST_HEAD(&common->head);
- spin_lock_init(&common->lock);
-@@ -423,7 +421,6 @@ static int rcar_thermal_probe(struct platform_device *pdev)
-
- priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
- if (!priv) {
-- dev_err(dev, "Could not allocate priv\n");
- ret = -ENOMEM;
- goto error_unregister;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch b/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch
deleted file mode 100644
index 7bd9ea30adbc0..0000000000000
--- a/patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch
+++ /dev/null
@@ -1,1220 +0,0 @@
-From bf3a6f4fffd0a9baef158a7ad61ae9875a29937e Mon Sep 17 00:00:00 2001
-From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-Date: Wed, 7 May 2014 17:17:44 +0200
-Subject: ata: use CONFIG_PM_SLEEP instead of CONFIG_PM where applicable in
- host drivers
-
-This patch fixes host drivers to use CONFIG_PM_SLEEP instead of CONFIG_PM
-where applicable. Benefits of this change:
-
-* unused code is not being compiled in for CONFIG_PM=y, CONFIG_PM_SLEEP=n
- and CONFIG_PM_RUNTIME=y configurations
-
-* easier transition to use struct dev_pm_ops and SIMPLE_DEV_PM_OPS() in
- the future
-
-* more consistent code (there are host drivers which are using the correct
- CONFIG_PM_SLEEP checks already)
-
-The patch leaves the core libata code and ->port_[suspend,resume] support
-in sata_[inic162x,nv,sil24].c alone for now.
-
-Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-Signed-off-by: Tejun Heo <tj@kernel.org>
-(cherry picked from commit 58eb8cd565af4a104395e3c10443951c1f73dafe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/ata/acard-ahci.c | 6 +++---
- drivers/ata/ata_generic.c | 2 +-
- drivers/ata/ata_piix.c | 4 ++--
- drivers/ata/pata_acpi.c | 2 +-
- drivers/ata/pata_ali.c | 4 ++--
- drivers/ata/pata_amd.c | 4 ++--
- drivers/ata/pata_artop.c | 4 ++--
- drivers/ata/pata_atiixp.c | 2 +-
- drivers/ata/pata_atp867x.c | 4 ++--
- drivers/ata/pata_bf54x.c | 2 +-
- drivers/ata/pata_cmd640.c | 4 ++--
- drivers/ata/pata_cmd64x.c | 4 ++--
- drivers/ata/pata_cs5520.c | 6 +++---
- drivers/ata/pata_cs5530.c | 6 +++---
- drivers/ata/pata_cs5535.c | 2 +-
- drivers/ata/pata_cs5536.c | 2 +-
- drivers/ata/pata_cypress.c | 2 +-
- drivers/ata/pata_efar.c | 2 +-
- drivers/ata/pata_hpt366.c | 4 ++--
- drivers/ata/pata_hpt3x3.c | 4 ++--
- drivers/ata/pata_imx.c | 4 ++--
- drivers/ata/pata_it8213.c | 2 +-
- drivers/ata/pata_it821x.c | 4 ++--
- drivers/ata/pata_jmicron.c | 2 +-
- drivers/ata/pata_macio.c | 22 ++++++++--------------
- drivers/ata/pata_marvell.c | 2 +-
- drivers/ata/pata_mpc52xx.c | 8 ++------
- drivers/ata/pata_mpiix.c | 2 +-
- drivers/ata/pata_netcell.c | 2 +-
- drivers/ata/pata_ninja32.c | 5 ++---
- drivers/ata/pata_ns87410.c | 2 +-
- drivers/ata/pata_ns87415.c | 4 ++--
- drivers/ata/pata_oldpiix.c | 2 +-
- drivers/ata/pata_opti.c | 2 +-
- drivers/ata/pata_optidma.c | 2 +-
- drivers/ata/pata_pdc2027x.c | 6 +++---
- drivers/ata/pata_pdc202xx_old.c | 2 +-
- drivers/ata/pata_piccolo.c | 2 +-
- drivers/ata/pata_radisys.c | 2 +-
- drivers/ata/pata_rdc.c | 2 +-
- drivers/ata/pata_rz1000.c | 4 ++--
- drivers/ata/pata_samsung_cf.c | 4 ++--
- drivers/ata/pata_sc1200.c | 2 +-
- drivers/ata/pata_scc.c | 2 +-
- drivers/ata/pata_sch.c | 2 +-
- drivers/ata/pata_serverworks.c | 4 ++--
- drivers/ata/pata_sil680.c | 4 ++--
- drivers/ata/pata_sis.c | 4 ++--
- drivers/ata/pata_sl82c105.c | 4 ++--
- drivers/ata/pata_triflex.c | 4 ++--
- drivers/ata/pata_via.c | 4 ++--
- drivers/ata/sata_fsl.c | 4 ++--
- drivers/ata/sata_inic162x.c | 4 ++--
- drivers/ata/sata_mv.c | 8 ++++----
- drivers/ata/sata_nv.c | 6 +++---
- drivers/ata/sata_rcar.c | 4 ++--
- drivers/ata/sata_sil.c | 6 +++---
- drivers/ata/sata_sil24.c | 10 +++++++---
- drivers/ata/sata_sis.c | 2 +-
- drivers/ata/sata_via.c | 2 +-
- 60 files changed, 113 insertions(+), 120 deletions(-)
-
---- a/drivers/ata/acard-ahci.c
-+++ b/drivers/ata/acard-ahci.c
-@@ -78,7 +78,7 @@ static bool acard_ahci_qc_fill_rtf(struc
- static int acard_ahci_port_start(struct ata_port *ap);
- static int acard_ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg);
- static int acard_ahci_pci_device_resume(struct pci_dev *pdev);
- #endif
-@@ -119,13 +119,13 @@ static struct pci_driver acard_ahci_pci_
- .id_table = acard_ahci_pci_tbl,
- .probe = acard_ahci_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = acard_ahci_pci_device_suspend,
- .resume = acard_ahci_pci_device_resume,
- #endif
- };
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int acard_ahci_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
---- a/drivers/ata/ata_generic.c
-+++ b/drivers/ata/ata_generic.c
-@@ -242,7 +242,7 @@ static struct pci_driver ata_generic_pci
- .id_table = ata_generic,
- .probe = ata_generic_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/ata_piix.c
-+++ b/drivers/ata/ata_piix.c
-@@ -838,7 +838,7 @@ static bool piix_irq_check(struct ata_po
- return ap->ops->bmdma_status(ap) & ATA_DMA_INTR;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int piix_broken_suspend(void)
- {
- static const struct dmi_system_id sysids[] = {
-@@ -1775,7 +1775,7 @@ static struct pci_driver piix_pci_driver
- .id_table = piix_pci_tbl,
- .probe = piix_init_one,
- .remove = piix_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = piix_pci_device_suspend,
- .resume = piix_pci_device_resume,
- #endif
---- a/drivers/ata/pata_acpi.c
-+++ b/drivers/ata/pata_acpi.c
-@@ -266,7 +266,7 @@ static struct pci_driver pacpi_pci_drive
- .id_table = pacpi_pci_tbl,
- .probe = pacpi_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_ali.c
-+++ b/drivers/ata/pata_ali.c
-@@ -589,7 +589,7 @@ static int ali_init_one(struct pci_dev *
- return ata_pci_bmdma_init_one(pdev, ppi, &ali_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int ali_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -616,7 +616,7 @@ static struct pci_driver ali_pci_driver
- .id_table = ali,
- .probe = ali_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ali_reinit_one,
- #endif
---- a/drivers/ata/pata_amd.c
-+++ b/drivers/ata/pata_amd.c
-@@ -575,7 +575,7 @@ static int amd_init_one(struct pci_dev *
- return ata_pci_bmdma_init_one(pdev, ppi, &amd_sht, hpriv, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int amd_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -626,7 +626,7 @@ static struct pci_driver amd_pci_driver
- .id_table = amd,
- .probe = amd_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = amd_reinit_one,
- #endif
---- a/drivers/ata/pata_artop.c
-+++ b/drivers/ata/pata_artop.c
-@@ -423,7 +423,7 @@ static const struct pci_device_id artop_
- { } /* terminate list */
- };
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int atp8xx_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -445,7 +445,7 @@ static struct pci_driver artop_pci_drive
- .id_table = artop_pci_tbl,
- .probe = artop_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = atp8xx_reinit_one,
- #endif
---- a/drivers/ata/pata_atiixp.c
-+++ b/drivers/ata/pata_atiixp.c
-@@ -299,7 +299,7 @@ static struct pci_driver atiixp_pci_driv
- .id_table = atiixp,
- .probe = atiixp_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .resume = ata_pci_device_resume,
- .suspend = ata_pci_device_suspend,
- #endif
---- a/drivers/ata/pata_atp867x.c
-+++ b/drivers/ata/pata_atp867x.c
-@@ -531,7 +531,7 @@ err_out:
- return rc;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int atp867x_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -559,7 +559,7 @@ static struct pci_driver atp867x_driver
- .id_table = atp867x_pci_tbl,
- .probe = atp867x_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = atp867x_reinit_one,
- #endif
---- a/drivers/ata/pata_bf54x.c
-+++ b/drivers/ata/pata_bf54x.c
-@@ -1619,7 +1619,7 @@ static int bfin_atapi_remove(struct plat
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int bfin_atapi_suspend(struct platform_device *pdev, pm_message_t state)
- {
- struct ata_host *host = platform_get_drvdata(pdev);
---- a/drivers/ata/pata_cmd640.c
-+++ b/drivers/ata/pata_cmd640.c
-@@ -232,7 +232,7 @@ static int cmd640_init_one(struct pci_de
- return ata_pci_sff_init_one(pdev, ppi, &cmd640_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int cmd640_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -257,7 +257,7 @@ static struct pci_driver cmd640_pci_driv
- .id_table = cmd640,
- .probe = cmd640_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = cmd640_reinit_one,
- #endif
---- a/drivers/ata/pata_cmd64x.c
-+++ b/drivers/ata/pata_cmd64x.c
-@@ -488,7 +488,7 @@ static int cmd64x_init_one(struct pci_de
- return ata_pci_bmdma_init_one(pdev, ppi, &cmd64x_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int cmd64x_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -519,7 +519,7 @@ static struct pci_driver cmd64x_pci_driv
- .id_table = cmd64x,
- .probe = cmd64x_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = cmd64x_reinit_one,
- #endif
---- a/drivers/ata/pata_cs5520.c
-+++ b/drivers/ata/pata_cs5520.c
-@@ -230,7 +230,7 @@ static int cs5520_init_one(struct pci_de
- return ata_host_register(host, &cs5520_sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- /**
- * cs5520_reinit_one - device resume
- * @pdev: PCI device
-@@ -279,7 +279,7 @@ static int cs5520_pci_device_suspend(str
- pci_save_state(pdev);
- return 0;
- }
--#endif /* CONFIG_PM */
-+#endif /* CONFIG_PM_SLEEP */
-
- /* For now keep DMA off. We can set it for all but A rev CS5510 once the
- core ATA code can handle it */
-@@ -296,7 +296,7 @@ static struct pci_driver cs5520_pci_driv
- .id_table = pata_cs5520,
- .probe = cs5520_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = cs5520_pci_device_suspend,
- .resume = cs5520_reinit_one,
- #endif
---- a/drivers/ata/pata_cs5530.c
-+++ b/drivers/ata/pata_cs5530.c
-@@ -327,7 +327,7 @@ static int cs5530_init_one(struct pci_de
- return ata_pci_bmdma_init_one(pdev, ppi, &cs5530_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int cs5530_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -344,7 +344,7 @@ static int cs5530_reinit_one(struct pci_
- ata_host_resume(host);
- return 0;
- }
--#endif /* CONFIG_PM */
-+#endif /* CONFIG_PM_SLEEP */
-
- static const struct pci_device_id cs5530[] = {
- { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), },
-@@ -357,7 +357,7 @@ static struct pci_driver cs5530_pci_driv
- .id_table = cs5530,
- .probe = cs5530_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = cs5530_reinit_one,
- #endif
---- a/drivers/ata/pata_cs5535.c
-+++ b/drivers/ata/pata_cs5535.c
-@@ -201,7 +201,7 @@ static struct pci_driver cs5535_pci_driv
- .id_table = cs5535,
- .probe = cs5535_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_cs5536.c
-+++ b/drivers/ata/pata_cs5536.c
-@@ -298,7 +298,7 @@ static struct pci_driver cs5536_pci_driv
- .id_table = cs5536,
- .probe = cs5536_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_cypress.c
-+++ b/drivers/ata/pata_cypress.c
-@@ -152,7 +152,7 @@ static struct pci_driver cy82c693_pci_dr
- .id_table = cy82c693,
- .probe = cy82c693_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_efar.c
-+++ b/drivers/ata/pata_efar.c
-@@ -289,7 +289,7 @@ static struct pci_driver efar_pci_driver
- .id_table = efar_pci_tbl,
- .probe = efar_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_hpt366.c
-+++ b/drivers/ata/pata_hpt366.c
-@@ -387,7 +387,7 @@ static int hpt36x_init_one(struct pci_de
- return ata_pci_bmdma_init_one(dev, ppi, &hpt36x_sht, hpriv, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int hpt36x_reinit_one(struct pci_dev *dev)
- {
- struct ata_host *host = pci_get_drvdata(dev);
-@@ -412,7 +412,7 @@ static struct pci_driver hpt36x_pci_driv
- .id_table = hpt36x,
- .probe = hpt36x_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = hpt36x_reinit_one,
- #endif
---- a/drivers/ata/pata_hpt3x3.c
-+++ b/drivers/ata/pata_hpt3x3.c
-@@ -250,7 +250,7 @@ static int hpt3x3_init_one(struct pci_de
- IRQF_SHARED, &hpt3x3_sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int hpt3x3_reinit_one(struct pci_dev *dev)
- {
- struct ata_host *host = pci_get_drvdata(dev);
-@@ -278,7 +278,7 @@ static struct pci_driver hpt3x3_pci_driv
- .id_table = hpt3x3,
- .probe = hpt3x3_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = hpt3x3_reinit_one,
- #endif
---- a/drivers/ata/pata_imx.c
-+++ b/drivers/ata/pata_imx.c
-@@ -191,7 +191,7 @@ static int pata_imx_remove(struct platfo
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int pata_imx_suspend(struct device *dev)
- {
- struct ata_host *host = dev_get_drvdata(dev);
-@@ -250,7 +250,7 @@ static struct platform_driver pata_imx_d
- .name = DRV_NAME,
- .of_match_table = imx_pata_dt_ids,
- .owner = THIS_MODULE,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .pm = &pata_imx_pm_ops,
- #endif
- },
---- a/drivers/ata/pata_it8213.c
-+++ b/drivers/ata/pata_it8213.c
-@@ -284,7 +284,7 @@ static struct pci_driver it8213_pci_driv
- .id_table = it8213_pci_tbl,
- .probe = it8213_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_it821x.c
-+++ b/drivers/ata/pata_it821x.c
-@@ -936,7 +936,7 @@ static int it821x_init_one(struct pci_de
- return ata_pci_bmdma_init_one(pdev, ppi, &it821x_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int it821x_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -966,7 +966,7 @@ static struct pci_driver it821x_pci_driv
- .id_table = it821x,
- .probe = it821x_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = it821x_reinit_one,
- #endif
---- a/drivers/ata/pata_jmicron.c
-+++ b/drivers/ata/pata_jmicron.c
-@@ -158,7 +158,7 @@ static struct pci_driver jmicron_pci_dri
- .id_table = jmicron_pci_tbl,
- .probe = jmicron_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_macio.c
-+++ b/drivers/ata/pata_macio.c
-@@ -845,8 +845,7 @@ static int pata_macio_slave_config(struc
- return 0;
- }
-
--#ifdef CONFIG_PM
--
-+#ifdef CONFIG_PM_SLEEP
- static int pata_macio_do_suspend(struct pata_macio_priv *priv, pm_message_t mesg)
- {
- int rc;
-@@ -907,8 +906,7 @@ static int pata_macio_do_resume(struct p
-
- return 0;
- }
--
--#endif /* CONFIG_PM */
-+#endif /* CONFIG_PM_SLEEP */
-
- static struct scsi_host_template pata_macio_sht = {
- ATA_BASE_SHT(DRV_NAME),
-@@ -1208,8 +1206,7 @@ static int pata_macio_detach(struct maci
- return 0;
- }
-
--#ifdef CONFIG_PM
--
-+#ifdef CONFIG_PM_SLEEP
- static int pata_macio_suspend(struct macio_dev *mdev, pm_message_t mesg)
- {
- struct ata_host *host = macio_get_drvdata(mdev);
-@@ -1223,8 +1220,7 @@ static int pata_macio_resume(struct maci
-
- return pata_macio_do_resume(host->private_data);
- }
--
--#endif /* CONFIG_PM */
-+#endif /* CONFIG_PM_SLEEP */
-
- #ifdef CONFIG_PMAC_MEDIABAY
- static void pata_macio_mb_event(struct macio_dev* mdev, int mb_state)
-@@ -1316,8 +1312,7 @@ static void pata_macio_pci_detach(struct
- ata_host_detach(host);
- }
-
--#ifdef CONFIG_PM
--
-+#ifdef CONFIG_PM_SLEEP
- static int pata_macio_pci_suspend(struct pci_dev *pdev, pm_message_t mesg)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -1331,8 +1326,7 @@ static int pata_macio_pci_resume(struct
-
- return pata_macio_do_resume(host->private_data);
- }
--
--#endif /* CONFIG_PM */
-+#endif /* CONFIG_PM_SLEEP */
-
- static struct of_device_id pata_macio_match[] =
- {
-@@ -1360,7 +1354,7 @@ static struct macio_driver pata_macio_dr
- },
- .probe = pata_macio_attach,
- .remove = pata_macio_detach,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = pata_macio_suspend,
- .resume = pata_macio_resume,
- #endif
-@@ -1383,7 +1377,7 @@ static struct pci_driver pata_macio_pci_
- .id_table = pata_macio_pci_match,
- .probe = pata_macio_pci_attach,
- .remove = pata_macio_pci_detach,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = pata_macio_pci_suspend,
- .resume = pata_macio_pci_resume,
- #endif
---- a/drivers/ata/pata_marvell.c
-+++ b/drivers/ata/pata_marvell.c
-@@ -172,7 +172,7 @@ static struct pci_driver marvell_pci_dri
- .id_table = marvell_pci_tbl,
- .probe = marvell_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_mpc52xx.c
-+++ b/drivers/ata/pata_mpc52xx.c
-@@ -819,9 +819,7 @@ mpc52xx_ata_remove(struct platform_devic
- return 0;
- }
-
--
--#ifdef CONFIG_PM
--
-+#ifdef CONFIG_PM_SLEEP
- static int
- mpc52xx_ata_suspend(struct platform_device *op, pm_message_t state)
- {
-@@ -847,10 +845,8 @@ mpc52xx_ata_resume(struct platform_devic
-
- return 0;
- }
--
- #endif
-
--
- static struct of_device_id mpc52xx_ata_of_match[] = {
- { .compatible = "fsl,mpc5200-ata", },
- { .compatible = "mpc5200-ata", },
-@@ -861,7 +857,7 @@ static struct of_device_id mpc52xx_ata_o
- static struct platform_driver mpc52xx_ata_of_platform_driver = {
- .probe = mpc52xx_ata_probe,
- .remove = mpc52xx_ata_remove,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = mpc52xx_ata_suspend,
- .resume = mpc52xx_ata_resume,
- #endif
---- a/drivers/ata/pata_mpiix.c
-+++ b/drivers/ata/pata_mpiix.c
-@@ -224,7 +224,7 @@ static struct pci_driver mpiix_pci_drive
- .id_table = mpiix,
- .probe = mpiix_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_netcell.c
-+++ b/drivers/ata/pata_netcell.c
-@@ -93,7 +93,7 @@ static struct pci_driver netcell_pci_dri
- .id_table = netcell_pci_tbl,
- .probe = netcell_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_ninja32.c
-+++ b/drivers/ata/pata_ninja32.c
-@@ -153,8 +153,7 @@ static int ninja32_init_one(struct pci_d
- IRQF_SHARED, &ninja32_sht);
- }
-
--#ifdef CONFIG_PM
--
-+#ifdef CONFIG_PM_SLEEP
- static int ninja32_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -184,7 +183,7 @@ static struct pci_driver ninja32_pci_dri
- .id_table = ninja32,
- .probe = ninja32_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ninja32_reinit_one,
- #endif
---- a/drivers/ata/pata_ns87410.c
-+++ b/drivers/ata/pata_ns87410.c
-@@ -162,7 +162,7 @@ static struct pci_driver ns87410_pci_dri
- .id_table = ns87410,
- .probe = ns87410_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_ns87415.c
-+++ b/drivers/ata/pata_ns87415.c
-@@ -386,7 +386,7 @@ static const struct pci_device_id ns8741
- { } /* terminate list */
- };
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int ns87415_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -408,7 +408,7 @@ static struct pci_driver ns87415_pci_dri
- .id_table = ns87415_pci_tbl,
- .probe = ns87415_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ns87415_reinit_one,
- #endif
---- a/drivers/ata/pata_oldpiix.c
-+++ b/drivers/ata/pata_oldpiix.c
-@@ -259,7 +259,7 @@ static struct pci_driver oldpiix_pci_dri
- .id_table = oldpiix_pci_tbl,
- .probe = oldpiix_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_opti.c
-+++ b/drivers/ata/pata_opti.c
-@@ -185,7 +185,7 @@ static struct pci_driver opti_pci_driver
- .id_table = opti,
- .probe = opti_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_optidma.c
-+++ b/drivers/ata/pata_optidma.c
-@@ -441,7 +441,7 @@ static struct pci_driver optidma_pci_dri
- .id_table = optidma,
- .probe = optidma_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_pdc2027x.c
-+++ b/drivers/ata/pata_pdc2027x.c
-@@ -63,7 +63,7 @@ enum {
- };
-
- static int pdc2027x_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int pdc2027x_reinit_one(struct pci_dev *pdev);
- #endif
- static int pdc2027x_prereset(struct ata_link *link, unsigned long deadline);
-@@ -129,7 +129,7 @@ static struct pci_driver pdc2027x_pci_dr
- .id_table = pdc2027x_pci_tbl,
- .probe = pdc2027x_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = pdc2027x_reinit_one,
- #endif
-@@ -762,7 +762,7 @@ static int pdc2027x_init_one(struct pci_
- IRQF_SHARED, &pdc2027x_sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int pdc2027x_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
---- a/drivers/ata/pata_pdc202xx_old.c
-+++ b/drivers/ata/pata_pdc202xx_old.c
-@@ -378,7 +378,7 @@ static struct pci_driver pdc202xx_pci_dr
- .id_table = pdc202xx,
- .probe = pdc202xx_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_piccolo.c
-+++ b/drivers/ata/pata_piccolo.c
-@@ -111,7 +111,7 @@ static struct pci_driver ata_tosh_pci_dr
- .id_table = ata_tosh,
- .probe = ata_tosh_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_radisys.c
-+++ b/drivers/ata/pata_radisys.c
-@@ -238,7 +238,7 @@ static struct pci_driver radisys_pci_dri
- .id_table = radisys_pci_tbl,
- .probe = radisys_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_rdc.c
-+++ b/drivers/ata/pata_rdc.c
-@@ -383,7 +383,7 @@ static struct pci_driver rdc_pci_driver
- .id_table = rdc_pci_tbl,
- .probe = rdc_init_one,
- .remove = rdc_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_rz1000.c
-+++ b/drivers/ata/pata_rz1000.c
-@@ -102,7 +102,7 @@ static int rz1000_init_one (struct pci_d
- return -ENODEV;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int rz1000_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -134,7 +134,7 @@ static struct pci_driver rz1000_pci_driv
- .id_table = pata_rz1000,
- .probe = rz1000_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = rz1000_reinit_one,
- #endif
---- a/drivers/ata/pata_samsung_cf.c
-+++ b/drivers/ata/pata_samsung_cf.c
-@@ -615,7 +615,7 @@ static int __exit pata_s3c_remove(struct
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int pata_s3c_suspend(struct device *dev)
- {
- struct platform_device *pdev = to_platform_device(dev);
-@@ -666,7 +666,7 @@ static struct platform_driver pata_s3c_d
- .driver = {
- .name = DRV_NAME,
- .owner = THIS_MODULE,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .pm = &pata_s3c_pm_ops,
- #endif
- },
---- a/drivers/ata/pata_sc1200.c
-+++ b/drivers/ata/pata_sc1200.c
-@@ -255,7 +255,7 @@ static struct pci_driver sc1200_pci_driv
- .id_table = sc1200,
- .probe = sc1200_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_scc.c
-+++ b/drivers/ata/pata_scc.c
-@@ -1096,7 +1096,7 @@ static struct pci_driver scc_pci_driver
- .id_table = scc_pci_tbl,
- .probe = scc_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_sch.c
-+++ b/drivers/ata/pata_sch.c
-@@ -65,7 +65,7 @@ static struct pci_driver sch_pci_driver
- .id_table = sch_pci_tbl,
- .probe = sch_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_serverworks.c
-+++ b/drivers/ata/pata_serverworks.c
-@@ -446,7 +446,7 @@ static int serverworks_init_one(struct p
- return ata_pci_bmdma_init_one(pdev, ppi, sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int serverworks_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -478,7 +478,7 @@ static struct pci_driver serverworks_pci
- .id_table = serverworks,
- .probe = serverworks_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = serverworks_reinit_one,
- #endif
---- a/drivers/ata/pata_sil680.c
-+++ b/drivers/ata/pata_sil680.c
-@@ -404,7 +404,7 @@ use_ioports:
- return ata_pci_bmdma_init_one(pdev, ppi, &sil680_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sil680_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -430,7 +430,7 @@ static struct pci_driver sil680_pci_driv
- .id_table = sil680,
- .probe = sil680_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = sil680_reinit_one,
- #endif
---- a/drivers/ata/pata_sis.c
-+++ b/drivers/ata/pata_sis.c
-@@ -870,7 +870,7 @@ static int sis_init_one (struct pci_dev
- return ata_pci_bmdma_init_one(pdev, ppi, &sis_sht, chipset, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sis_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -900,7 +900,7 @@ static struct pci_driver sis_pci_driver
- .id_table = sis_pci_tbl,
- .probe = sis_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = sis_reinit_one,
- #endif
---- a/drivers/ata/pata_sl82c105.c
-+++ b/drivers/ata/pata_sl82c105.c
-@@ -338,7 +338,7 @@ static int sl82c105_init_one(struct pci_
- return ata_pci_bmdma_init_one(dev, ppi, &sl82c105_sht, NULL, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sl82c105_reinit_one(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -366,7 +366,7 @@ static struct pci_driver sl82c105_pci_dr
- .id_table = sl82c105,
- .probe = sl82c105_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = sl82c105_reinit_one,
- #endif
---- a/drivers/ata/pata_triflex.c
-+++ b/drivers/ata/pata_triflex.c
-@@ -208,7 +208,7 @@ static const struct pci_device_id trifle
- { },
- };
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int triflex_ata_pci_device_suspend(struct pci_dev *pdev, pm_message_t mesg)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -234,7 +234,7 @@ static struct pci_driver triflex_pci_dri
- .id_table = triflex,
- .probe = triflex_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = triflex_ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/pata_via.c
-+++ b/drivers/ata/pata_via.c
-@@ -660,7 +660,7 @@ static int via_init_one(struct pci_dev *
- return ata_pci_bmdma_init_one(pdev, ppi, &via_sht, (void *)config, 0);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- /**
- * via_reinit_one - reinit after resume
- * @pdev; PCI device
-@@ -705,7 +705,7 @@ static struct pci_driver via_pci_driver
- .id_table = via,
- .probe = via_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = via_reinit_one,
- #endif
---- a/drivers/ata/sata_fsl.c
-+++ b/drivers/ata/sata_fsl.c
-@@ -1588,7 +1588,7 @@ static int sata_fsl_remove(struct platfo
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sata_fsl_suspend(struct platform_device *op, pm_message_t state)
- {
- struct ata_host *host = platform_get_drvdata(op);
-@@ -1644,7 +1644,7 @@ static struct platform_driver fsl_sata_d
- },
- .probe = sata_fsl_probe,
- .remove = sata_fsl_remove,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = sata_fsl_suspend,
- .resume = sata_fsl_resume,
- #endif
---- a/drivers/ata/sata_inic162x.c
-+++ b/drivers/ata/sata_inic162x.c
-@@ -785,7 +785,7 @@ static int init_controller(void __iomem
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int inic_pci_device_resume(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -898,7 +898,7 @@ static const struct pci_device_id inic_p
- static struct pci_driver inic_pci_driver = {
- .name = DRV_NAME,
- .id_table = inic_pci_tbl,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = inic_pci_device_resume,
- #endif
---- a/drivers/ata/sata_mv.c
-+++ b/drivers/ata/sata_mv.c
-@@ -4222,7 +4222,7 @@ static int mv_platform_remove(struct pla
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int mv_platform_suspend(struct platform_device *pdev, pm_message_t state)
- {
- struct ata_host *host = platform_get_drvdata(pdev);
-@@ -4289,7 +4289,7 @@ static struct platform_driver mv_platfor
- #ifdef CONFIG_PCI
- static int mv_pci_init_one(struct pci_dev *pdev,
- const struct pci_device_id *ent);
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int mv_pci_device_resume(struct pci_dev *pdev);
- #endif
-
-@@ -4299,7 +4299,7 @@ static struct pci_driver mv_pci_driver =
- .id_table = mv_pci_tbl,
- .probe = mv_pci_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = mv_pci_device_resume,
- #endif
-@@ -4457,7 +4457,7 @@ static int mv_pci_init_one(struct pci_de
- IS_GEN_I(hpriv) ? &mv5_sht : &mv6_sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int mv_pci_device_resume(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
---- a/drivers/ata/sata_nv.c
-+++ b/drivers/ata/sata_nv.c
-@@ -296,7 +296,7 @@ struct nv_swncq_port_priv {
- #define NV_ADMA_CHECK_INTR(GCTL, PORT) ((GCTL) & (1 << (19 + (12 * (PORT)))))
-
- static int nv_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int nv_pci_device_resume(struct pci_dev *pdev);
- #endif
- static void nv_ck804_host_stop(struct ata_host *host);
-@@ -380,7 +380,7 @@ static struct pci_driver nv_pci_driver =
- .name = DRV_NAME,
- .id_table = nv_pci_tbl,
- .probe = nv_init_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = nv_pci_device_resume,
- #endif
-@@ -2432,7 +2432,7 @@ static int nv_init_one(struct pci_dev *p
- return ata_pci_sff_activate_host(host, ipriv->irq_handler, ipriv->sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int nv_pci_device_resume(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
---- a/drivers/ata/sata_rcar.c
-+++ b/drivers/ata/sata_rcar.c
-@@ -947,7 +947,7 @@ static int sata_rcar_remove(struct platf
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sata_rcar_suspend(struct device *dev)
- {
- struct ata_host *host = dev_get_drvdata(dev);
-@@ -1001,7 +1001,7 @@ static struct platform_driver sata_rcar_
- .name = DRV_NAME,
- .owner = THIS_MODULE,
- .of_match_table = sata_rcar_match,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .pm = &sata_rcar_pm_ops,
- #endif
- },
---- a/drivers/ata/sata_sil.c
-+++ b/drivers/ata/sata_sil.c
-@@ -113,7 +113,7 @@ enum {
- };
-
- static int sil_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sil_pci_device_resume(struct pci_dev *pdev);
- #endif
- static void sil_dev_config(struct ata_device *dev);
-@@ -167,7 +167,7 @@ static struct pci_driver sil_pci_driver
- .id_table = sil_pci_tbl,
- .probe = sil_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = sil_pci_device_resume,
- #endif
-@@ -803,7 +803,7 @@ static int sil_init_one(struct pci_dev *
- &sil_sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sil_pci_device_resume(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
---- a/drivers/ata/sata_sil24.c
-+++ b/drivers/ata/sata_sil24.c
-@@ -353,8 +353,10 @@ static void sil24_error_handler(struct a
- static void sil24_post_internal_cmd(struct ata_queued_cmd *qc);
- static int sil24_port_start(struct ata_port *ap);
- static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent);
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sil24_pci_device_resume(struct pci_dev *pdev);
-+#endif
-+#ifdef CONFIG_PM
- static int sil24_port_resume(struct ata_port *ap);
- #endif
-
-@@ -375,7 +377,7 @@ static struct pci_driver sil24_pci_drive
- .id_table = sil24_pci_tbl,
- .probe = sil24_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = sil24_pci_device_resume,
- #endif
-@@ -1350,7 +1352,7 @@ static int sil24_init_one(struct pci_dev
- &sil24_sht);
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int sil24_pci_device_resume(struct pci_dev *pdev)
- {
- struct ata_host *host = pci_get_drvdata(pdev);
-@@ -1370,7 +1372,9 @@ static int sil24_pci_device_resume(struc
-
- return 0;
- }
-+#endif
-
-+#ifdef CONFIG_PM
- static int sil24_port_resume(struct ata_port *ap)
- {
- sil24_config_pmp(ap, ap->nr_pmp_links);
---- a/drivers/ata/sata_sis.c
-+++ b/drivers/ata/sata_sis.c
-@@ -83,7 +83,7 @@ static struct pci_driver sis_pci_driver
- .id_table = sis_pci_tbl,
- .probe = sis_init_one,
- .remove = ata_pci_remove_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
---- a/drivers/ata/sata_via.c
-+++ b/drivers/ata/sata_via.c
-@@ -104,7 +104,7 @@ static struct pci_driver svia_pci_driver
- .name = DRV_NAME,
- .id_table = svia_pci_tbl,
- .probe = svia_init_one,
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- .suspend = ata_pci_device_suspend,
- .resume = ata_pci_device_resume,
- #endif
diff --git a/patches.renesas/0406-clocksource-sh_cmt-Use-request_irq-instead-of-setup_.patch b/patches.renesas/0406-clocksource-sh_cmt-Use-request_irq-instead-of-setup_.patch
deleted file mode 100644
index f48353e613eb2..0000000000000
--- a/patches.renesas/0406-clocksource-sh_cmt-Use-request_irq-instead-of-setup_.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 1c2fed7587443a8ecc5a766b59ffb3afda2d222f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 11:27:49 +0100
-Subject: clocksource: sh_cmt: Use request_irq() instead of setup_irq()
-
-The driver claims it needs to register an interrupt handler too early
-for request_irq(). This might have been true in the past, but the only
-meaningful difference between request_irq() and setup_irq() today is an
-additional kzalloc() call in request_irq(). As the driver calls
-kmalloc() itself we know that the slab allocator is available, we can
-thus switch to request_irq().
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit dc2eadece70089430f12e4ed6bb1a4421cf3d6f4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 10 +++-------
- 1 file changed, 3 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 0b1836a6c539..a3103b871260 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -728,12 +728,6 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
- goto err1;
- }
-
-- /* request irq using setup_irq() (too early for request_irq()) */
-- p->irqaction.name = dev_name(&p->pdev->dev);
-- p->irqaction.handler = sh_cmt_interrupt;
-- p->irqaction.dev_id = p;
-- p->irqaction.flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING;
--
- /* get hold of clock */
- p->clk = clk_get(&p->pdev->dev, "cmt_fck");
- if (IS_ERR(p->clk)) {
-@@ -786,7 +780,9 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
- }
- p->cs_enabled = false;
-
-- ret = setup_irq(irq, &p->irqaction);
-+ ret = request_irq(irq, sh_cmt_interrupt,
-+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-+ dev_name(&p->pdev->dev), p);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
- goto err4;
---
-2.1.2
-
diff --git a/patches.renesas/0407-clocksource-sh_cmt-Split-channel-fields-from-sh_cmt_.patch b/patches.renesas/0407-clocksource-sh_cmt-Split-channel-fields-from-sh_cmt_.patch
deleted file mode 100644
index 098bc4d38a000..0000000000000
--- a/patches.renesas/0407-clocksource-sh_cmt-Split-channel-fields-from-sh_cmt_.patch
+++ /dev/null
@@ -1,809 +0,0 @@
-From d7af17ec3e771707b65ec1ad8e139daa65400878 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 15:29:19 +0100
-Subject: clocksource: sh_cmt: Split channel fields from sh_cmt_priv
-
-Create a new sh_cmt_channel structure to hold the channel-specific
-field in preparation for multiple channels per device support.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 7269f9333292586f2378c5321b40a8d3779c4653)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 385 ++++++++++++++++++++++---------------------
- 1 file changed, 199 insertions(+), 186 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index a3103b871260..351b3ca3ccc4 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -35,15 +35,10 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
--struct sh_cmt_priv {
-- void __iomem *mapbase;
-- void __iomem *mapbase_str;
-- struct clk *clk;
-- unsigned long width; /* 16 or 32 bit version of hardware block */
-- unsigned long overflow_bit;
-- unsigned long clear_bits;
-- struct irqaction irqaction;
-- struct platform_device *pdev;
-+struct sh_cmt_priv;
-+
-+struct sh_cmt_channel {
-+ struct sh_cmt_priv *cmt;
-
- unsigned long flags;
- unsigned long match_value;
-@@ -55,6 +50,20 @@ struct sh_cmt_priv {
- struct clocksource cs;
- unsigned long total_cycles;
- bool cs_enabled;
-+};
-+
-+struct sh_cmt_priv {
-+ struct platform_device *pdev;
-+
-+ void __iomem *mapbase;
-+ void __iomem *mapbase_str;
-+ struct clk *clk;
-+
-+ struct sh_cmt_channel channel;
-+
-+ unsigned long width; /* 16 or 32 bit version of hardware block */
-+ unsigned long overflow_bit;
-+ unsigned long clear_bits;
-
- /* callbacks for CMSTR and CMCSR access */
- unsigned long (*read_control)(void __iomem *base, unsigned long offs);
-@@ -114,60 +123,60 @@ static void sh_cmt_write32(void __iomem *base, unsigned long offs,
- #define CMCNT 1 /* channel register */
- #define CMCOR 2 /* channel register */
-
--static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_priv *p)
-+static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_channel *ch)
- {
-- return p->read_control(p->mapbase_str, 0);
-+ return ch->cmt->read_control(ch->cmt->mapbase_str, 0);
- }
-
--static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_priv *p)
-+static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)
- {
-- return p->read_control(p->mapbase, CMCSR);
-+ return ch->cmt->read_control(ch->cmt->mapbase, CMCSR);
- }
-
--static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_priv *p)
-+static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)
- {
-- return p->read_count(p->mapbase, CMCNT);
-+ return ch->cmt->read_count(ch->cmt->mapbase, CMCNT);
- }
-
--static inline void sh_cmt_write_cmstr(struct sh_cmt_priv *p,
-+static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- p->write_control(p->mapbase_str, 0, value);
-+ ch->cmt->write_control(ch->cmt->mapbase_str, 0, value);
- }
-
--static inline void sh_cmt_write_cmcsr(struct sh_cmt_priv *p,
-+static inline void sh_cmt_write_cmcsr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- p->write_control(p->mapbase, CMCSR, value);
-+ ch->cmt->write_control(ch->cmt->mapbase, CMCSR, value);
- }
-
--static inline void sh_cmt_write_cmcnt(struct sh_cmt_priv *p,
-+static inline void sh_cmt_write_cmcnt(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- p->write_count(p->mapbase, CMCNT, value);
-+ ch->cmt->write_count(ch->cmt->mapbase, CMCNT, value);
- }
-
--static inline void sh_cmt_write_cmcor(struct sh_cmt_priv *p,
-+static inline void sh_cmt_write_cmcor(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- p->write_count(p->mapbase, CMCOR, value);
-+ ch->cmt->write_count(ch->cmt->mapbase, CMCOR, value);
- }
-
--static unsigned long sh_cmt_get_counter(struct sh_cmt_priv *p,
-+static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
- int *has_wrapped)
- {
- unsigned long v1, v2, v3;
- int o1, o2;
-
-- o1 = sh_cmt_read_cmcsr(p) & p->overflow_bit;
-+ o1 = sh_cmt_read_cmcsr(ch) & ch->cmt->overflow_bit;
-
- /* Make sure the timer value is stable. Stolen from acpi_pm.c */
- do {
- o2 = o1;
-- v1 = sh_cmt_read_cmcnt(p);
-- v2 = sh_cmt_read_cmcnt(p);
-- v3 = sh_cmt_read_cmcnt(p);
-- o1 = sh_cmt_read_cmcsr(p) & p->overflow_bit;
-+ v1 = sh_cmt_read_cmcnt(ch);
-+ v2 = sh_cmt_read_cmcnt(ch);
-+ v3 = sh_cmt_read_cmcnt(ch);
-+ o1 = sh_cmt_read_cmcsr(ch) & ch->cmt->overflow_bit;
- } while (unlikely((o1 != o2) || (v1 > v2 && v1 < v3)
- || (v2 > v3 && v2 < v1) || (v3 > v1 && v3 < v2)));
-
-@@ -177,52 +186,52 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_priv *p,
-
- static DEFINE_RAW_SPINLOCK(sh_cmt_lock);
-
--static void sh_cmt_start_stop_ch(struct sh_cmt_priv *p, int start)
-+static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-+ struct sh_timer_config *cfg = ch->cmt->pdev->dev.platform_data;
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
- raw_spin_lock_irqsave(&sh_cmt_lock, flags);
-- value = sh_cmt_read_cmstr(p);
-+ value = sh_cmt_read_cmstr(ch);
-
- if (start)
- value |= 1 << cfg->timer_bit;
- else
- value &= ~(1 << cfg->timer_bit);
-
-- sh_cmt_write_cmstr(p, value);
-+ sh_cmt_write_cmstr(ch, value);
- raw_spin_unlock_irqrestore(&sh_cmt_lock, flags);
- }
-
--static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate)
-+static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
- {
- int k, ret;
-
-- pm_runtime_get_sync(&p->pdev->dev);
-- dev_pm_syscore_device(&p->pdev->dev, true);
-+ pm_runtime_get_sync(&ch->cmt->pdev->dev);
-+ dev_pm_syscore_device(&ch->cmt->pdev->dev, true);
-
- /* enable clock */
-- ret = clk_enable(p->clk);
-+ ret = clk_enable(ch->cmt->clk);
- if (ret) {
-- dev_err(&p->pdev->dev, "cannot enable clock\n");
-+ dev_err(&ch->cmt->pdev->dev, "cannot enable clock\n");
- goto err0;
- }
-
- /* make sure channel is disabled */
-- sh_cmt_start_stop_ch(p, 0);
-+ sh_cmt_start_stop_ch(ch, 0);
-
- /* configure channel, periodic mode and maximum timeout */
-- if (p->width == 16) {
-- *rate = clk_get_rate(p->clk) / 512;
-- sh_cmt_write_cmcsr(p, 0x43);
-+ if (ch->cmt->width == 16) {
-+ *rate = clk_get_rate(ch->cmt->clk) / 512;
-+ sh_cmt_write_cmcsr(ch, 0x43);
- } else {
-- *rate = clk_get_rate(p->clk) / 8;
-- sh_cmt_write_cmcsr(p, 0x01a4);
-+ *rate = clk_get_rate(ch->cmt->clk) / 8;
-+ sh_cmt_write_cmcsr(ch, 0x01a4);
- }
-
-- sh_cmt_write_cmcor(p, 0xffffffff);
-- sh_cmt_write_cmcnt(p, 0);
-+ sh_cmt_write_cmcor(ch, 0xffffffff);
-+ sh_cmt_write_cmcnt(ch, 0);
-
- /*
- * According to the sh73a0 user's manual, as CMCNT can be operated
-@@ -236,41 +245,41 @@ static int sh_cmt_enable(struct sh_cmt_priv *p, unsigned long *rate)
- * take RCLKx2 at maximum.
- */
- for (k = 0; k < 100; k++) {
-- if (!sh_cmt_read_cmcnt(p))
-+ if (!sh_cmt_read_cmcnt(ch))
- break;
- udelay(1);
- }
-
-- if (sh_cmt_read_cmcnt(p)) {
-- dev_err(&p->pdev->dev, "cannot clear CMCNT\n");
-+ if (sh_cmt_read_cmcnt(ch)) {
-+ dev_err(&ch->cmt->pdev->dev, "cannot clear CMCNT\n");
- ret = -ETIMEDOUT;
- goto err1;
- }
-
- /* enable channel */
-- sh_cmt_start_stop_ch(p, 1);
-+ sh_cmt_start_stop_ch(ch, 1);
- return 0;
- err1:
- /* stop clock */
-- clk_disable(p->clk);
-+ clk_disable(ch->cmt->clk);
-
- err0:
- return ret;
- }
-
--static void sh_cmt_disable(struct sh_cmt_priv *p)
-+static void sh_cmt_disable(struct sh_cmt_channel *ch)
- {
- /* disable channel */
-- sh_cmt_start_stop_ch(p, 0);
-+ sh_cmt_start_stop_ch(ch, 0);
-
- /* disable interrupts in CMT block */
-- sh_cmt_write_cmcsr(p, 0);
-+ sh_cmt_write_cmcsr(ch, 0);
-
- /* stop clock */
-- clk_disable(p->clk);
-+ clk_disable(ch->cmt->clk);
-
-- dev_pm_syscore_device(&p->pdev->dev, false);
-- pm_runtime_put(&p->pdev->dev);
-+ dev_pm_syscore_device(&ch->cmt->pdev->dev, false);
-+ pm_runtime_put(&ch->cmt->pdev->dev);
- }
-
- /* private flags */
-@@ -280,24 +289,24 @@ static void sh_cmt_disable(struct sh_cmt_priv *p)
- #define FLAG_SKIPEVENT (1 << 3)
- #define FLAG_IRQCONTEXT (1 << 4)
-
--static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p,
-+static void sh_cmt_clock_event_program_verify(struct sh_cmt_channel *ch,
- int absolute)
- {
- unsigned long new_match;
-- unsigned long value = p->next_match_value;
-+ unsigned long value = ch->next_match_value;
- unsigned long delay = 0;
- unsigned long now = 0;
- int has_wrapped;
-
-- now = sh_cmt_get_counter(p, &has_wrapped);
-- p->flags |= FLAG_REPROGRAM; /* force reprogram */
-+ now = sh_cmt_get_counter(ch, &has_wrapped);
-+ ch->flags |= FLAG_REPROGRAM; /* force reprogram */
-
- if (has_wrapped) {
- /* we're competing with the interrupt handler.
- * -> let the interrupt handler reprogram the timer.
- * -> interrupt number two handles the event.
- */
-- p->flags |= FLAG_SKIPEVENT;
-+ ch->flags |= FLAG_SKIPEVENT;
- return;
- }
-
-@@ -309,20 +318,20 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p,
- * but don't save the new match value yet.
- */
- new_match = now + value + delay;
-- if (new_match > p->max_match_value)
-- new_match = p->max_match_value;
-+ if (new_match > ch->max_match_value)
-+ new_match = ch->max_match_value;
-
-- sh_cmt_write_cmcor(p, new_match);
-+ sh_cmt_write_cmcor(ch, new_match);
-
-- now = sh_cmt_get_counter(p, &has_wrapped);
-- if (has_wrapped && (new_match > p->match_value)) {
-+ now = sh_cmt_get_counter(ch, &has_wrapped);
-+ if (has_wrapped && (new_match > ch->match_value)) {
- /* we are changing to a greater match value,
- * so this wrap must be caused by the counter
- * matching the old value.
- * -> first interrupt reprograms the timer.
- * -> interrupt number two handles the event.
- */
-- p->flags |= FLAG_SKIPEVENT;
-+ ch->flags |= FLAG_SKIPEVENT;
- break;
- }
-
-@@ -333,7 +342,7 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p,
- * -> save programmed match value.
- * -> let isr handle the event.
- */
-- p->match_value = new_match;
-+ ch->match_value = new_match;
- break;
- }
-
-@@ -344,7 +353,7 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p,
- * -> save programmed match value.
- * -> let isr handle the event.
- */
-- p->match_value = new_match;
-+ ch->match_value = new_match;
- break;
- }
-
-@@ -360,138 +369,138 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_priv *p,
- delay = 1;
-
- if (!delay)
-- dev_warn(&p->pdev->dev, "too long delay\n");
-+ dev_warn(&ch->cmt->pdev->dev, "too long delay\n");
-
- } while (delay);
- }
-
--static void __sh_cmt_set_next(struct sh_cmt_priv *p, unsigned long delta)
-+static void __sh_cmt_set_next(struct sh_cmt_channel *ch, unsigned long delta)
- {
-- if (delta > p->max_match_value)
-- dev_warn(&p->pdev->dev, "delta out of range\n");
-+ if (delta > ch->max_match_value)
-+ dev_warn(&ch->cmt->pdev->dev, "delta out of range\n");
-
-- p->next_match_value = delta;
-- sh_cmt_clock_event_program_verify(p, 0);
-+ ch->next_match_value = delta;
-+ sh_cmt_clock_event_program_verify(ch, 0);
- }
-
--static void sh_cmt_set_next(struct sh_cmt_priv *p, unsigned long delta)
-+static void sh_cmt_set_next(struct sh_cmt_channel *ch, unsigned long delta)
- {
- unsigned long flags;
-
-- raw_spin_lock_irqsave(&p->lock, flags);
-- __sh_cmt_set_next(p, delta);
-- raw_spin_unlock_irqrestore(&p->lock, flags);
-+ raw_spin_lock_irqsave(&ch->lock, flags);
-+ __sh_cmt_set_next(ch, delta);
-+ raw_spin_unlock_irqrestore(&ch->lock, flags);
- }
-
- static irqreturn_t sh_cmt_interrupt(int irq, void *dev_id)
- {
-- struct sh_cmt_priv *p = dev_id;
-+ struct sh_cmt_channel *ch = dev_id;
-
- /* clear flags */
-- sh_cmt_write_cmcsr(p, sh_cmt_read_cmcsr(p) & p->clear_bits);
-+ sh_cmt_write_cmcsr(ch, sh_cmt_read_cmcsr(ch) & ch->cmt->clear_bits);
-
- /* update clock source counter to begin with if enabled
- * the wrap flag should be cleared by the timer specific
- * isr before we end up here.
- */
-- if (p->flags & FLAG_CLOCKSOURCE)
-- p->total_cycles += p->match_value + 1;
-+ if (ch->flags & FLAG_CLOCKSOURCE)
-+ ch->total_cycles += ch->match_value + 1;
-
-- if (!(p->flags & FLAG_REPROGRAM))
-- p->next_match_value = p->max_match_value;
-+ if (!(ch->flags & FLAG_REPROGRAM))
-+ ch->next_match_value = ch->max_match_value;
-
-- p->flags |= FLAG_IRQCONTEXT;
-+ ch->flags |= FLAG_IRQCONTEXT;
-
-- if (p->flags & FLAG_CLOCKEVENT) {
-- if (!(p->flags & FLAG_SKIPEVENT)) {
-- if (p->ced.mode == CLOCK_EVT_MODE_ONESHOT) {
-- p->next_match_value = p->max_match_value;
-- p->flags |= FLAG_REPROGRAM;
-+ if (ch->flags & FLAG_CLOCKEVENT) {
-+ if (!(ch->flags & FLAG_SKIPEVENT)) {
-+ if (ch->ced.mode == CLOCK_EVT_MODE_ONESHOT) {
-+ ch->next_match_value = ch->max_match_value;
-+ ch->flags |= FLAG_REPROGRAM;
- }
-
-- p->ced.event_handler(&p->ced);
-+ ch->ced.event_handler(&ch->ced);
- }
- }
-
-- p->flags &= ~FLAG_SKIPEVENT;
-+ ch->flags &= ~FLAG_SKIPEVENT;
-
-- if (p->flags & FLAG_REPROGRAM) {
-- p->flags &= ~FLAG_REPROGRAM;
-- sh_cmt_clock_event_program_verify(p, 1);
-+ if (ch->flags & FLAG_REPROGRAM) {
-+ ch->flags &= ~FLAG_REPROGRAM;
-+ sh_cmt_clock_event_program_verify(ch, 1);
-
-- if (p->flags & FLAG_CLOCKEVENT)
-- if ((p->ced.mode == CLOCK_EVT_MODE_SHUTDOWN)
-- || (p->match_value == p->next_match_value))
-- p->flags &= ~FLAG_REPROGRAM;
-+ if (ch->flags & FLAG_CLOCKEVENT)
-+ if ((ch->ced.mode == CLOCK_EVT_MODE_SHUTDOWN)
-+ || (ch->match_value == ch->next_match_value))
-+ ch->flags &= ~FLAG_REPROGRAM;
- }
-
-- p->flags &= ~FLAG_IRQCONTEXT;
-+ ch->flags &= ~FLAG_IRQCONTEXT;
-
- return IRQ_HANDLED;
- }
-
--static int sh_cmt_start(struct sh_cmt_priv *p, unsigned long flag)
-+static int sh_cmt_start(struct sh_cmt_channel *ch, unsigned long flag)
- {
- int ret = 0;
- unsigned long flags;
-
-- raw_spin_lock_irqsave(&p->lock, flags);
-+ raw_spin_lock_irqsave(&ch->lock, flags);
-
-- if (!(p->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE)))
-- ret = sh_cmt_enable(p, &p->rate);
-+ if (!(ch->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE)))
-+ ret = sh_cmt_enable(ch, &ch->rate);
-
- if (ret)
- goto out;
-- p->flags |= flag;
-+ ch->flags |= flag;
-
- /* setup timeout if no clockevent */
-- if ((flag == FLAG_CLOCKSOURCE) && (!(p->flags & FLAG_CLOCKEVENT)))
-- __sh_cmt_set_next(p, p->max_match_value);
-+ if ((flag == FLAG_CLOCKSOURCE) && (!(ch->flags & FLAG_CLOCKEVENT)))
-+ __sh_cmt_set_next(ch, ch->max_match_value);
- out:
-- raw_spin_unlock_irqrestore(&p->lock, flags);
-+ raw_spin_unlock_irqrestore(&ch->lock, flags);
-
- return ret;
- }
-
--static void sh_cmt_stop(struct sh_cmt_priv *p, unsigned long flag)
-+static void sh_cmt_stop(struct sh_cmt_channel *ch, unsigned long flag)
- {
- unsigned long flags;
- unsigned long f;
-
-- raw_spin_lock_irqsave(&p->lock, flags);
-+ raw_spin_lock_irqsave(&ch->lock, flags);
-
-- f = p->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE);
-- p->flags &= ~flag;
-+ f = ch->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE);
-+ ch->flags &= ~flag;
-
-- if (f && !(p->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE)))
-- sh_cmt_disable(p);
-+ if (f && !(ch->flags & (FLAG_CLOCKEVENT | FLAG_CLOCKSOURCE)))
-+ sh_cmt_disable(ch);
-
- /* adjust the timeout to maximum if only clocksource left */
-- if ((flag == FLAG_CLOCKEVENT) && (p->flags & FLAG_CLOCKSOURCE))
-- __sh_cmt_set_next(p, p->max_match_value);
-+ if ((flag == FLAG_CLOCKEVENT) && (ch->flags & FLAG_CLOCKSOURCE))
-+ __sh_cmt_set_next(ch, ch->max_match_value);
-
-- raw_spin_unlock_irqrestore(&p->lock, flags);
-+ raw_spin_unlock_irqrestore(&ch->lock, flags);
- }
-
--static struct sh_cmt_priv *cs_to_sh_cmt(struct clocksource *cs)
-+static struct sh_cmt_channel *cs_to_sh_cmt(struct clocksource *cs)
- {
-- return container_of(cs, struct sh_cmt_priv, cs);
-+ return container_of(cs, struct sh_cmt_channel, cs);
- }
-
- static cycle_t sh_cmt_clocksource_read(struct clocksource *cs)
- {
-- struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
-+ struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
- unsigned long flags, raw;
- unsigned long value;
- int has_wrapped;
-
-- raw_spin_lock_irqsave(&p->lock, flags);
-- value = p->total_cycles;
-- raw = sh_cmt_get_counter(p, &has_wrapped);
-+ raw_spin_lock_irqsave(&ch->lock, flags);
-+ value = ch->total_cycles;
-+ raw = sh_cmt_get_counter(ch, &has_wrapped);
-
- if (unlikely(has_wrapped))
-- raw += p->match_value + 1;
-- raw_spin_unlock_irqrestore(&p->lock, flags);
-+ raw += ch->match_value + 1;
-+ raw_spin_unlock_irqrestore(&ch->lock, flags);
-
- return value + raw;
- }
-@@ -499,50 +508,50 @@ static cycle_t sh_cmt_clocksource_read(struct clocksource *cs)
- static int sh_cmt_clocksource_enable(struct clocksource *cs)
- {
- int ret;
-- struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
-+ struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
-
-- WARN_ON(p->cs_enabled);
-+ WARN_ON(ch->cs_enabled);
-
-- p->total_cycles = 0;
-+ ch->total_cycles = 0;
-
-- ret = sh_cmt_start(p, FLAG_CLOCKSOURCE);
-+ ret = sh_cmt_start(ch, FLAG_CLOCKSOURCE);
- if (!ret) {
-- __clocksource_updatefreq_hz(cs, p->rate);
-- p->cs_enabled = true;
-+ __clocksource_updatefreq_hz(cs, ch->rate);
-+ ch->cs_enabled = true;
- }
- return ret;
- }
-
- static void sh_cmt_clocksource_disable(struct clocksource *cs)
- {
-- struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
-+ struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
-
-- WARN_ON(!p->cs_enabled);
-+ WARN_ON(!ch->cs_enabled);
-
-- sh_cmt_stop(p, FLAG_CLOCKSOURCE);
-- p->cs_enabled = false;
-+ sh_cmt_stop(ch, FLAG_CLOCKSOURCE);
-+ ch->cs_enabled = false;
- }
-
- static void sh_cmt_clocksource_suspend(struct clocksource *cs)
- {
-- struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
-+ struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
-
-- sh_cmt_stop(p, FLAG_CLOCKSOURCE);
-- pm_genpd_syscore_poweroff(&p->pdev->dev);
-+ sh_cmt_stop(ch, FLAG_CLOCKSOURCE);
-+ pm_genpd_syscore_poweroff(&ch->cmt->pdev->dev);
- }
-
- static void sh_cmt_clocksource_resume(struct clocksource *cs)
- {
-- struct sh_cmt_priv *p = cs_to_sh_cmt(cs);
-+ struct sh_cmt_channel *ch = cs_to_sh_cmt(cs);
-
-- pm_genpd_syscore_poweron(&p->pdev->dev);
-- sh_cmt_start(p, FLAG_CLOCKSOURCE);
-+ pm_genpd_syscore_poweron(&ch->cmt->pdev->dev);
-+ sh_cmt_start(ch, FLAG_CLOCKSOURCE);
- }
-
--static int sh_cmt_register_clocksource(struct sh_cmt_priv *p,
-+static int sh_cmt_register_clocksource(struct sh_cmt_channel *ch,
- char *name, unsigned long rating)
- {
-- struct clocksource *cs = &p->cs;
-+ struct clocksource *cs = &ch->cs;
-
- cs->name = name;
- cs->rating = rating;
-@@ -554,47 +563,47 @@ static int sh_cmt_register_clocksource(struct sh_cmt_priv *p,
- cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8);
- cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
-
-- dev_info(&p->pdev->dev, "used as clock source\n");
-+ dev_info(&ch->cmt->pdev->dev, "used as clock source\n");
-
- /* Register with dummy 1 Hz value, gets updated in ->enable() */
- clocksource_register_hz(cs, 1);
- return 0;
- }
-
--static struct sh_cmt_priv *ced_to_sh_cmt(struct clock_event_device *ced)
-+static struct sh_cmt_channel *ced_to_sh_cmt(struct clock_event_device *ced)
- {
-- return container_of(ced, struct sh_cmt_priv, ced);
-+ return container_of(ced, struct sh_cmt_channel, ced);
- }
-
--static void sh_cmt_clock_event_start(struct sh_cmt_priv *p, int periodic)
-+static void sh_cmt_clock_event_start(struct sh_cmt_channel *ch, int periodic)
- {
-- struct clock_event_device *ced = &p->ced;
-+ struct clock_event_device *ced = &ch->ced;
-
-- sh_cmt_start(p, FLAG_CLOCKEVENT);
-+ sh_cmt_start(ch, FLAG_CLOCKEVENT);
-
- /* TODO: calculate good shift from rate and counter bit width */
-
- ced->shift = 32;
-- ced->mult = div_sc(p->rate, NSEC_PER_SEC, ced->shift);
-- ced->max_delta_ns = clockevent_delta2ns(p->max_match_value, ced);
-+ ced->mult = div_sc(ch->rate, NSEC_PER_SEC, ced->shift);
-+ ced->max_delta_ns = clockevent_delta2ns(ch->max_match_value, ced);
- ced->min_delta_ns = clockevent_delta2ns(0x1f, ced);
-
- if (periodic)
-- sh_cmt_set_next(p, ((p->rate + HZ/2) / HZ) - 1);
-+ sh_cmt_set_next(ch, ((ch->rate + HZ/2) / HZ) - 1);
- else
-- sh_cmt_set_next(p, p->max_match_value);
-+ sh_cmt_set_next(ch, ch->max_match_value);
- }
-
- static void sh_cmt_clock_event_mode(enum clock_event_mode mode,
- struct clock_event_device *ced)
- {
-- struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
-+ struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
-
- /* deal with old setting first */
- switch (ced->mode) {
- case CLOCK_EVT_MODE_PERIODIC:
- case CLOCK_EVT_MODE_ONESHOT:
-- sh_cmt_stop(p, FLAG_CLOCKEVENT);
-+ sh_cmt_stop(ch, FLAG_CLOCKEVENT);
- break;
- default:
- break;
-@@ -602,16 +611,18 @@ static void sh_cmt_clock_event_mode(enum clock_event_mode mode,
-
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
-- dev_info(&p->pdev->dev, "used for periodic clock events\n");
-- sh_cmt_clock_event_start(p, 1);
-+ dev_info(&ch->cmt->pdev->dev,
-+ "used for periodic clock events\n");
-+ sh_cmt_clock_event_start(ch, 1);
- break;
- case CLOCK_EVT_MODE_ONESHOT:
-- dev_info(&p->pdev->dev, "used for oneshot clock events\n");
-- sh_cmt_clock_event_start(p, 0);
-+ dev_info(&ch->cmt->pdev->dev,
-+ "used for oneshot clock events\n");
-+ sh_cmt_clock_event_start(ch, 0);
- break;
- case CLOCK_EVT_MODE_SHUTDOWN:
- case CLOCK_EVT_MODE_UNUSED:
-- sh_cmt_stop(p, FLAG_CLOCKEVENT);
-+ sh_cmt_stop(ch, FLAG_CLOCKEVENT);
- break;
- default:
- break;
-@@ -621,37 +632,37 @@ static void sh_cmt_clock_event_mode(enum clock_event_mode mode,
- static int sh_cmt_clock_event_next(unsigned long delta,
- struct clock_event_device *ced)
- {
-- struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
-+ struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
-
- BUG_ON(ced->mode != CLOCK_EVT_MODE_ONESHOT);
-- if (likely(p->flags & FLAG_IRQCONTEXT))
-- p->next_match_value = delta - 1;
-+ if (likely(ch->flags & FLAG_IRQCONTEXT))
-+ ch->next_match_value = delta - 1;
- else
-- sh_cmt_set_next(p, delta - 1);
-+ sh_cmt_set_next(ch, delta - 1);
-
- return 0;
- }
-
- static void sh_cmt_clock_event_suspend(struct clock_event_device *ced)
- {
-- struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
-+ struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
-
-- pm_genpd_syscore_poweroff(&p->pdev->dev);
-- clk_unprepare(p->clk);
-+ pm_genpd_syscore_poweroff(&ch->cmt->pdev->dev);
-+ clk_unprepare(ch->cmt->clk);
- }
-
- static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
- {
-- struct sh_cmt_priv *p = ced_to_sh_cmt(ced);
-+ struct sh_cmt_channel *ch = ced_to_sh_cmt(ced);
-
-- clk_prepare(p->clk);
-- pm_genpd_syscore_poweron(&p->pdev->dev);
-+ clk_prepare(ch->cmt->clk);
-+ pm_genpd_syscore_poweron(&ch->cmt->pdev->dev);
- }
-
--static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
-+static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- char *name, unsigned long rating)
- {
-- struct clock_event_device *ced = &p->ced;
-+ struct clock_event_device *ced = &ch->ced;
-
- memset(ced, 0, sizeof(*ced));
-
-@@ -665,19 +676,19 @@ static void sh_cmt_register_clockevent(struct sh_cmt_priv *p,
- ced->suspend = sh_cmt_clock_event_suspend;
- ced->resume = sh_cmt_clock_event_resume;
-
-- dev_info(&p->pdev->dev, "used for clock events\n");
-+ dev_info(&ch->cmt->pdev->dev, "used for clock events\n");
- clockevents_register_device(ced);
- }
-
--static int sh_cmt_register(struct sh_cmt_priv *p, char *name,
-+static int sh_cmt_register(struct sh_cmt_channel *ch, char *name,
- unsigned long clockevent_rating,
- unsigned long clocksource_rating)
- {
- if (clockevent_rating)
-- sh_cmt_register_clockevent(p, name, clockevent_rating);
-+ sh_cmt_register_clockevent(ch, name, clockevent_rating);
-
- if (clocksource_rating)
-- sh_cmt_register_clocksource(p, name, clocksource_rating);
-+ sh_cmt_register_clocksource(ch, name, clocksource_rating);
-
- return 0;
- }
-@@ -685,6 +696,7 @@ static int sh_cmt_register(struct sh_cmt_priv *p, char *name,
- static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
-+ struct sh_cmt_channel *ch = &p->channel;
- struct resource *res, *res2;
- int irq, ret;
- ret = -ENXIO;
-@@ -763,26 +775,27 @@ static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
- p->clear_bits = ~0xc000;
- }
-
-- if (p->width == (sizeof(p->max_match_value) * 8))
-- p->max_match_value = ~0;
-+ if (p->width == (sizeof(ch->max_match_value) * 8))
-+ ch->max_match_value = ~0;
- else
-- p->max_match_value = (1 << p->width) - 1;
-+ ch->max_match_value = (1 << p->width) - 1;
-
-- p->match_value = p->max_match_value;
-- raw_spin_lock_init(&p->lock);
-+ ch->cmt = p;
-+ ch->match_value = ch->max_match_value;
-+ raw_spin_lock_init(&ch->lock);
-
-- ret = sh_cmt_register(p, (char *)dev_name(&p->pdev->dev),
-+ ret = sh_cmt_register(ch, (char *)dev_name(&p->pdev->dev),
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- if (ret) {
- dev_err(&p->pdev->dev, "registration failed\n");
- goto err4;
- }
-- p->cs_enabled = false;
-+ ch->cs_enabled = false;
-
- ret = request_irq(irq, sh_cmt_interrupt,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&p->pdev->dev), p);
-+ dev_name(&p->pdev->dev), ch);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
- goto err4;
---
-2.1.2
-
diff --git a/patches.renesas/0408-clocksource-sh_cmt-Rename-struct-sh_cmt_priv-to-sh_c.patch b/patches.renesas/0408-clocksource-sh_cmt-Rename-struct-sh_cmt_priv-to-sh_c.patch
deleted file mode 100644
index 7840d050756c6..0000000000000
--- a/patches.renesas/0408-clocksource-sh_cmt-Rename-struct-sh_cmt_priv-to-sh_c.patch
+++ /dev/null
@@ -1,253 +0,0 @@
-From 3ac275b43684d7039c9074cd9688e857d57229a5 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Rename struct sh_cmt_priv to sh_cmt_device
-
-Channel data is private as well, rename priv to device to make the
-distrinction between the core device and the channels clearer.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 2653caf4381f9adeec8c18dfec21ec3c855d801c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 116 +++++++++++++++++++++----------------------
- 1 file changed, 58 insertions(+), 58 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 351b3ca3ccc4..604199a22265 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -35,10 +35,10 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
--struct sh_cmt_priv;
-+struct sh_cmt_device;
-
- struct sh_cmt_channel {
-- struct sh_cmt_priv *cmt;
-+ struct sh_cmt_device *cmt;
-
- unsigned long flags;
- unsigned long match_value;
-@@ -52,7 +52,7 @@ struct sh_cmt_channel {
- bool cs_enabled;
- };
-
--struct sh_cmt_priv {
-+struct sh_cmt_device {
- struct platform_device *pdev;
-
- void __iomem *mapbase;
-@@ -693,132 +693,132 @@ static int sh_cmt_register(struct sh_cmt_channel *ch, char *name,
- return 0;
- }
-
--static int sh_cmt_setup(struct sh_cmt_priv *p, struct platform_device *pdev)
-+static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
-- struct sh_cmt_channel *ch = &p->channel;
-+ struct sh_cmt_channel *ch = &cmt->channel;
- struct resource *res, *res2;
- int irq, ret;
- ret = -ENXIO;
-
-- memset(p, 0, sizeof(*p));
-- p->pdev = pdev;
-+ memset(cmt, 0, sizeof(*cmt));
-+ cmt->pdev = pdev;
-
- if (!cfg) {
-- dev_err(&p->pdev->dev, "missing platform data\n");
-+ dev_err(&cmt->pdev->dev, "missing platform data\n");
- goto err0;
- }
-
-- res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
-+ res = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 0);
- if (!res) {
-- dev_err(&p->pdev->dev, "failed to get I/O memory\n");
-+ dev_err(&cmt->pdev->dev, "failed to get I/O memory\n");
- goto err0;
- }
-
- /* optional resource for the shared timer start/stop register */
-- res2 = platform_get_resource(p->pdev, IORESOURCE_MEM, 1);
-+ res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
-
-- irq = platform_get_irq(p->pdev, 0);
-+ irq = platform_get_irq(cmt->pdev, 0);
- if (irq < 0) {
-- dev_err(&p->pdev->dev, "failed to get irq\n");
-+ dev_err(&cmt->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-
- /* map memory, let mapbase point to our channel */
-- p->mapbase = ioremap_nocache(res->start, resource_size(res));
-- if (p->mapbase == NULL) {
-- dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
-+ cmt->mapbase = ioremap_nocache(res->start, resource_size(res));
-+ if (cmt->mapbase == NULL) {
-+ dev_err(&cmt->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
- /* map second resource for CMSTR */
-- p->mapbase_str = ioremap_nocache(res2 ? res2->start :
-- res->start - cfg->channel_offset,
-- res2 ? resource_size(res2) : 2);
-- if (p->mapbase_str == NULL) {
-- dev_err(&p->pdev->dev, "failed to remap I/O second memory\n");
-+ cmt->mapbase_str = ioremap_nocache(res2 ? res2->start :
-+ res->start - cfg->channel_offset,
-+ res2 ? resource_size(res2) : 2);
-+ if (cmt->mapbase_str == NULL) {
-+ dev_err(&cmt->pdev->dev, "failed to remap I/O second memory\n");
- goto err1;
- }
-
- /* get hold of clock */
-- p->clk = clk_get(&p->pdev->dev, "cmt_fck");
-- if (IS_ERR(p->clk)) {
-- dev_err(&p->pdev->dev, "cannot get clock\n");
-- ret = PTR_ERR(p->clk);
-+ cmt->clk = clk_get(&cmt->pdev->dev, "cmt_fck");
-+ if (IS_ERR(cmt->clk)) {
-+ dev_err(&cmt->pdev->dev, "cannot get clock\n");
-+ ret = PTR_ERR(cmt->clk);
- goto err2;
- }
-
-- ret = clk_prepare(p->clk);
-+ ret = clk_prepare(cmt->clk);
- if (ret < 0)
- goto err3;
-
- if (res2 && (resource_size(res2) == 4)) {
- /* assume both CMSTR and CMCSR to be 32-bit */
-- p->read_control = sh_cmt_read32;
-- p->write_control = sh_cmt_write32;
-+ cmt->read_control = sh_cmt_read32;
-+ cmt->write_control = sh_cmt_write32;
- } else {
-- p->read_control = sh_cmt_read16;
-- p->write_control = sh_cmt_write16;
-+ cmt->read_control = sh_cmt_read16;
-+ cmt->write_control = sh_cmt_write16;
- }
-
- if (resource_size(res) == 6) {
-- p->width = 16;
-- p->read_count = sh_cmt_read16;
-- p->write_count = sh_cmt_write16;
-- p->overflow_bit = 0x80;
-- p->clear_bits = ~0x80;
-+ cmt->width = 16;
-+ cmt->read_count = sh_cmt_read16;
-+ cmt->write_count = sh_cmt_write16;
-+ cmt->overflow_bit = 0x80;
-+ cmt->clear_bits = ~0x80;
- } else {
-- p->width = 32;
-- p->read_count = sh_cmt_read32;
-- p->write_count = sh_cmt_write32;
-- p->overflow_bit = 0x8000;
-- p->clear_bits = ~0xc000;
-+ cmt->width = 32;
-+ cmt->read_count = sh_cmt_read32;
-+ cmt->write_count = sh_cmt_write32;
-+ cmt->overflow_bit = 0x8000;
-+ cmt->clear_bits = ~0xc000;
- }
-
-- if (p->width == (sizeof(ch->max_match_value) * 8))
-+ if (cmt->width == (sizeof(ch->max_match_value) * 8))
- ch->max_match_value = ~0;
- else
-- ch->max_match_value = (1 << p->width) - 1;
-+ ch->max_match_value = (1 << cmt->width) - 1;
-
-- ch->cmt = p;
-+ ch->cmt = cmt;
- ch->match_value = ch->max_match_value;
- raw_spin_lock_init(&ch->lock);
-
-- ret = sh_cmt_register(ch, (char *)dev_name(&p->pdev->dev),
-+ ret = sh_cmt_register(ch, (char *)dev_name(&cmt->pdev->dev),
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- if (ret) {
-- dev_err(&p->pdev->dev, "registration failed\n");
-+ dev_err(&cmt->pdev->dev, "registration failed\n");
- goto err4;
- }
- ch->cs_enabled = false;
-
- ret = request_irq(irq, sh_cmt_interrupt,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&p->pdev->dev), ch);
-+ dev_name(&cmt->pdev->dev), ch);
- if (ret) {
-- dev_err(&p->pdev->dev, "failed to request irq %d\n", irq);
-+ dev_err(&cmt->pdev->dev, "failed to request irq %d\n", irq);
- goto err4;
- }
-
-- platform_set_drvdata(pdev, p);
-+ platform_set_drvdata(pdev, cmt);
-
- return 0;
- err4:
-- clk_unprepare(p->clk);
-+ clk_unprepare(cmt->clk);
- err3:
-- clk_put(p->clk);
-+ clk_put(cmt->clk);
- err2:
-- iounmap(p->mapbase_str);
-+ iounmap(cmt->mapbase_str);
- err1:
-- iounmap(p->mapbase);
-+ iounmap(cmt->mapbase);
- err0:
- return ret;
- }
-
- static int sh_cmt_probe(struct platform_device *pdev)
- {
-- struct sh_cmt_priv *p = platform_get_drvdata(pdev);
-+ struct sh_cmt_device *cmt = platform_get_drvdata(pdev);
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- int ret;
-
-@@ -827,20 +827,20 @@ static int sh_cmt_probe(struct platform_device *pdev)
- pm_runtime_enable(&pdev->dev);
- }
-
-- if (p) {
-+ if (cmt) {
- dev_info(&pdev->dev, "kept as earlytimer\n");
- goto out;
- }
-
-- p = kmalloc(sizeof(*p), GFP_KERNEL);
-- if (p == NULL) {
-+ cmt = kmalloc(sizeof(*cmt), GFP_KERNEL);
-+ if (cmt == NULL) {
- dev_err(&pdev->dev, "failed to allocate driver data\n");
- return -ENOMEM;
- }
-
-- ret = sh_cmt_setup(p, pdev);
-+ ret = sh_cmt_setup(cmt, pdev);
- if (ret) {
-- kfree(p);
-+ kfree(cmt);
- pm_runtime_idle(&pdev->dev);
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0409-clocksource-sh_cmt-Split-channel-setup-to-separate-f.patch b/patches.renesas/0409-clocksource-sh_cmt-Split-channel-setup-to-separate-f.patch
deleted file mode 100644
index 8a6c22579111f..0000000000000
--- a/patches.renesas/0409-clocksource-sh_cmt-Split-channel-setup-to-separate-f.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 90de0103434fa69f609d8ca2d52deee6120ed153 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Split channel setup to separate function
-
-Move the channel setup code from sh_cmt_setup to a new
-sh_cmt_setup_channel function and call it from sh_cmt_setup.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit b882e7b13bc12b3d6b00e4ea2fe374413ddcdd2d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 79 ++++++++++++++++++++++++++------------------
- 1 file changed, 47 insertions(+), 32 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 604199a22265..26f73cf609ba 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -693,12 +693,55 @@ static int sh_cmt_register(struct sh_cmt_channel *ch, char *name,
- return 0;
- }
-
-+static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
-+ struct sh_cmt_device *cmt)
-+{
-+ struct sh_timer_config *cfg = cmt->pdev->dev.platform_data;
-+ int irq;
-+ int ret;
-+
-+ memset(ch, 0, sizeof(*ch));
-+ ch->cmt = cmt;
-+
-+ irq = platform_get_irq(cmt->pdev, 0);
-+ if (irq < 0) {
-+ dev_err(&cmt->pdev->dev, "failed to get irq\n");
-+ return irq;
-+ }
-+
-+ if (cmt->width == (sizeof(ch->max_match_value) * 8))
-+ ch->max_match_value = ~0;
-+ else
-+ ch->max_match_value = (1 << cmt->width) - 1;
-+
-+ ch->match_value = ch->max_match_value;
-+ raw_spin_lock_init(&ch->lock);
-+
-+ ret = sh_cmt_register(ch, (char *)dev_name(&cmt->pdev->dev),
-+ cfg->clockevent_rating,
-+ cfg->clocksource_rating);
-+ if (ret) {
-+ dev_err(&cmt->pdev->dev, "registration failed\n");
-+ return ret;
-+ }
-+ ch->cs_enabled = false;
-+
-+ ret = request_irq(irq, sh_cmt_interrupt,
-+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-+ dev_name(&cmt->pdev->dev), ch);
-+ if (ret) {
-+ dev_err(&cmt->pdev->dev, "failed to request irq %d\n", irq);
-+ return ret;
-+ }
-+
-+ return 0;
-+}
-+
- static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
-- struct sh_cmt_channel *ch = &cmt->channel;
- struct resource *res, *res2;
-- int irq, ret;
-+ int ret;
- ret = -ENXIO;
-
- memset(cmt, 0, sizeof(*cmt));
-@@ -718,12 +761,6 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- /* optional resource for the shared timer start/stop register */
- res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
-
-- irq = platform_get_irq(cmt->pdev, 0);
-- if (irq < 0) {
-- dev_err(&cmt->pdev->dev, "failed to get irq\n");
-- goto err0;
-- }
--
- /* map memory, let mapbase point to our channel */
- cmt->mapbase = ioremap_nocache(res->start, resource_size(res));
- if (cmt->mapbase == NULL) {
-@@ -775,31 +812,9 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- cmt->clear_bits = ~0xc000;
- }
-
-- if (cmt->width == (sizeof(ch->max_match_value) * 8))
-- ch->max_match_value = ~0;
-- else
-- ch->max_match_value = (1 << cmt->width) - 1;
--
-- ch->cmt = cmt;
-- ch->match_value = ch->max_match_value;
-- raw_spin_lock_init(&ch->lock);
--
-- ret = sh_cmt_register(ch, (char *)dev_name(&cmt->pdev->dev),
-- cfg->clockevent_rating,
-- cfg->clocksource_rating);
-- if (ret) {
-- dev_err(&cmt->pdev->dev, "registration failed\n");
-- goto err4;
-- }
-- ch->cs_enabled = false;
--
-- ret = request_irq(irq, sh_cmt_interrupt,
-- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&cmt->pdev->dev), ch);
-- if (ret) {
-- dev_err(&cmt->pdev->dev, "failed to request irq %d\n", irq);
-+ ret = sh_cmt_setup_channel(&cmt->channel, cmt);
-+ if (ret < 0)
- goto err4;
-- }
-
- platform_set_drvdata(pdev, cmt);
-
---
-2.1.2
-
diff --git a/patches.renesas/0410-clocksource-sh_cmt-Constify-name-argument-to-sh_cmt_.patch b/patches.renesas/0410-clocksource-sh_cmt-Constify-name-argument-to-sh_cmt_.patch
deleted file mode 100644
index 049ede3984e3c..0000000000000
--- a/patches.renesas/0410-clocksource-sh_cmt-Constify-name-argument-to-sh_cmt_.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 56aed887954b60fc4b6da489c78d94259728f759 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 16:04:16 +0100
-Subject: clocksource: sh_cmt: Constify name argument to sh_cmt_register()
-
-The name argument is assigned to const structure fields only, constify
-it.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 1d053e1d8eb28f42b7ec57d1c11ce70b8fba45ff)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 26f73cf609ba..febd6bf7a37d 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -549,7 +549,7 @@ static void sh_cmt_clocksource_resume(struct clocksource *cs)
- }
-
- static int sh_cmt_register_clocksource(struct sh_cmt_channel *ch,
-- char *name, unsigned long rating)
-+ const char *name, unsigned long rating)
- {
- struct clocksource *cs = &ch->cs;
-
-@@ -660,7 +660,7 @@ static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
- }
-
- static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
-- char *name, unsigned long rating)
-+ const char *name, unsigned long rating)
- {
- struct clock_event_device *ced = &ch->ced;
-
-@@ -680,7 +680,7 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- clockevents_register_device(ced);
- }
-
--static int sh_cmt_register(struct sh_cmt_channel *ch, char *name,
-+static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
- unsigned long clockevent_rating,
- unsigned long clocksource_rating)
- {
-@@ -717,7 +717,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
- ch->match_value = ch->max_match_value;
- raw_spin_lock_init(&ch->lock);
-
-- ret = sh_cmt_register(ch, (char *)dev_name(&cmt->pdev->dev),
-+ ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- if (ret) {
---
-2.1.2
-
diff --git a/patches.renesas/0411-clocksource-sh_cmt-Rename-mapbase-mapbase_str-to-map.patch b/patches.renesas/0411-clocksource-sh_cmt-Rename-mapbase-mapbase_str-to-map.patch
deleted file mode 100644
index 6d674e773b72b..0000000000000
--- a/patches.renesas/0411-clocksource-sh_cmt-Rename-mapbase-mapbase_str-to-map.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From e3c6e3750ab0b59681fdb1254728d664eaa97649 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Rename mapbase/mapbase_str to mapbase_ch/mapbase
-
-The mapbase variable points to the mapped base address of the channel,
-rename it to mapbase_sh. mapbase_str points to the mapped base address
-of the CMT device, rename it to mapbase.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 36f1ac982d94cd3cce8ae24abd0676b79dec6126)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 34 +++++++++++++++++-----------------
- 1 file changed, 17 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index febd6bf7a37d..eb93b889e189 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -55,8 +55,8 @@ struct sh_cmt_channel {
- struct sh_cmt_device {
- struct platform_device *pdev;
-
-+ void __iomem *mapbase_ch;
- void __iomem *mapbase;
-- void __iomem *mapbase_str;
- struct clk *clk;
-
- struct sh_cmt_channel channel;
-@@ -125,41 +125,41 @@ static void sh_cmt_write32(void __iomem *base, unsigned long offs,
-
- static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_control(ch->cmt->mapbase_str, 0);
-+ return ch->cmt->read_control(ch->cmt->mapbase, 0);
- }
-
- static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_control(ch->cmt->mapbase, CMCSR);
-+ return ch->cmt->read_control(ch->cmt->mapbase_ch, CMCSR);
- }
-
- static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_count(ch->cmt->mapbase, CMCNT);
-+ return ch->cmt->read_count(ch->cmt->mapbase_ch, CMCNT);
- }
-
- static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_control(ch->cmt->mapbase_str, 0, value);
-+ ch->cmt->write_control(ch->cmt->mapbase, 0, value);
- }
-
- static inline void sh_cmt_write_cmcsr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_control(ch->cmt->mapbase, CMCSR, value);
-+ ch->cmt->write_control(ch->cmt->mapbase_ch, CMCSR, value);
- }
-
- static inline void sh_cmt_write_cmcnt(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_count(ch->cmt->mapbase, CMCNT, value);
-+ ch->cmt->write_count(ch->cmt->mapbase_ch, CMCNT, value);
- }
-
- static inline void sh_cmt_write_cmcor(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_count(ch->cmt->mapbase, CMCOR, value);
-+ ch->cmt->write_count(ch->cmt->mapbase_ch, CMCOR, value);
- }
-
- static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
-@@ -761,18 +761,18 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- /* optional resource for the shared timer start/stop register */
- res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
-
-- /* map memory, let mapbase point to our channel */
-- cmt->mapbase = ioremap_nocache(res->start, resource_size(res));
-- if (cmt->mapbase == NULL) {
-+ /* map memory, let mapbase_ch point to our channel */
-+ cmt->mapbase_ch = ioremap_nocache(res->start, resource_size(res));
-+ if (cmt->mapbase_ch == NULL) {
- dev_err(&cmt->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
- /* map second resource for CMSTR */
-- cmt->mapbase_str = ioremap_nocache(res2 ? res2->start :
-- res->start - cfg->channel_offset,
-- res2 ? resource_size(res2) : 2);
-- if (cmt->mapbase_str == NULL) {
-+ cmt->mapbase = ioremap_nocache(res2 ? res2->start :
-+ res->start - cfg->channel_offset,
-+ res2 ? resource_size(res2) : 2);
-+ if (cmt->mapbase == NULL) {
- dev_err(&cmt->pdev->dev, "failed to remap I/O second memory\n");
- goto err1;
- }
-@@ -824,9 +824,9 @@ err4:
- err3:
- clk_put(cmt->clk);
- err2:
-- iounmap(cmt->mapbase_str);
--err1:
- iounmap(cmt->mapbase);
-+err1:
-+ iounmap(cmt->mapbase_ch);
- err0:
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0412-clocksource-sh_cmt-Add-memory-base-to-sh_cmt_channel.patch b/patches.renesas/0412-clocksource-sh_cmt-Add-memory-base-to-sh_cmt_channel.patch
deleted file mode 100644
index 23be5dccb6ea8..0000000000000
--- a/patches.renesas/0412-clocksource-sh_cmt-Add-memory-base-to-sh_cmt_channel.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 6d3237bd5d16ab1f33dc531f422cf9a4d5069dcb Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Add memory base to sh_cmt_channel structure
-
-The channel memory base is channel-specific, add it to the channel
-structure in preparation for support of multiple channels per device.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit c924d2d2a964715b55b6601be338b3bd05a1ced5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 13 ++++++++-----
- 1 file changed, 8 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index eb93b889e189..4fcb05dc9ea4 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -40,6 +40,8 @@ struct sh_cmt_device;
- struct sh_cmt_channel {
- struct sh_cmt_device *cmt;
-
-+ void __iomem *base;
-+
- unsigned long flags;
- unsigned long match_value;
- unsigned long next_match_value;
-@@ -130,12 +132,12 @@ static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_channel *ch)
-
- static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_control(ch->cmt->mapbase_ch, CMCSR);
-+ return ch->cmt->read_control(ch->base, CMCSR);
- }
-
- static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_count(ch->cmt->mapbase_ch, CMCNT);
-+ return ch->cmt->read_count(ch->base, CMCNT);
- }
-
- static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
-@@ -147,19 +149,19 @@ static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
- static inline void sh_cmt_write_cmcsr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_control(ch->cmt->mapbase_ch, CMCSR, value);
-+ ch->cmt->write_control(ch->base, CMCSR, value);
- }
-
- static inline void sh_cmt_write_cmcnt(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_count(ch->cmt->mapbase_ch, CMCNT, value);
-+ ch->cmt->write_count(ch->base, CMCNT, value);
- }
-
- static inline void sh_cmt_write_cmcor(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_count(ch->cmt->mapbase_ch, CMCOR, value);
-+ ch->cmt->write_count(ch->base, CMCOR, value);
- }
-
- static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
-@@ -702,6 +704,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
-
- memset(ch, 0, sizeof(*ch));
- ch->cmt = cmt;
-+ ch->base = cmt->mapbase_ch;
-
- irq = platform_get_irq(cmt->pdev, 0);
- if (irq < 0) {
---
-2.1.2
-
diff --git a/patches.renesas/0413-clocksource-sh_cmt-Add-index-to-struct-sh_cmt_channe.patch b/patches.renesas/0413-clocksource-sh_cmt-Add-index-to-struct-sh_cmt_channe.patch
deleted file mode 100644
index 647a7e9bb2fbe..0000000000000
--- a/patches.renesas/0413-clocksource-sh_cmt-Add-index-to-struct-sh_cmt_channe.patch
+++ /dev/null
@@ -1,156 +0,0 @@
-From 64080195e87ebf45fdf817d9ba839bdd57edcba0 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Add index to struct sh_cmt_channel
-
-Use the index when printing messages to identify the channel.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 740a95184dd61eb0481f75ced05ea5e01b7ce6ac)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 37 ++++++++++++++++++++++++-------------
- 1 file changed, 24 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 4fcb05dc9ea4..6b65621a9733 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -39,6 +39,7 @@ struct sh_cmt_device;
-
- struct sh_cmt_channel {
- struct sh_cmt_device *cmt;
-+ unsigned int index;
-
- void __iomem *base;
-
-@@ -216,7 +217,8 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
- /* enable clock */
- ret = clk_enable(ch->cmt->clk);
- if (ret) {
-- dev_err(&ch->cmt->pdev->dev, "cannot enable clock\n");
-+ dev_err(&ch->cmt->pdev->dev, "ch%u: cannot enable clock\n",
-+ ch->index);
- goto err0;
- }
-
-@@ -253,7 +255,8 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
- }
-
- if (sh_cmt_read_cmcnt(ch)) {
-- dev_err(&ch->cmt->pdev->dev, "cannot clear CMCNT\n");
-+ dev_err(&ch->cmt->pdev->dev, "ch%u: cannot clear CMCNT\n",
-+ ch->index);
- ret = -ETIMEDOUT;
- goto err1;
- }
-@@ -371,7 +374,8 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_channel *ch,
- delay = 1;
-
- if (!delay)
-- dev_warn(&ch->cmt->pdev->dev, "too long delay\n");
-+ dev_warn(&ch->cmt->pdev->dev, "ch%u: too long delay\n",
-+ ch->index);
-
- } while (delay);
- }
-@@ -379,7 +383,8 @@ static void sh_cmt_clock_event_program_verify(struct sh_cmt_channel *ch,
- static void __sh_cmt_set_next(struct sh_cmt_channel *ch, unsigned long delta)
- {
- if (delta > ch->max_match_value)
-- dev_warn(&ch->cmt->pdev->dev, "delta out of range\n");
-+ dev_warn(&ch->cmt->pdev->dev, "ch%u: delta out of range\n",
-+ ch->index);
-
- ch->next_match_value = delta;
- sh_cmt_clock_event_program_verify(ch, 0);
-@@ -565,7 +570,8 @@ static int sh_cmt_register_clocksource(struct sh_cmt_channel *ch,
- cs->mask = CLOCKSOURCE_MASK(sizeof(unsigned long) * 8);
- cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
-
-- dev_info(&ch->cmt->pdev->dev, "used as clock source\n");
-+ dev_info(&ch->cmt->pdev->dev, "ch%u: used as clock source\n",
-+ ch->index);
-
- /* Register with dummy 1 Hz value, gets updated in ->enable() */
- clocksource_register_hz(cs, 1);
-@@ -614,12 +620,12 @@ static void sh_cmt_clock_event_mode(enum clock_event_mode mode,
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
- dev_info(&ch->cmt->pdev->dev,
-- "used for periodic clock events\n");
-+ "ch%u: used for periodic clock events\n", ch->index);
- sh_cmt_clock_event_start(ch, 1);
- break;
- case CLOCK_EVT_MODE_ONESHOT:
- dev_info(&ch->cmt->pdev->dev,
-- "used for oneshot clock events\n");
-+ "ch%u: used for oneshot clock events\n", ch->index);
- sh_cmt_clock_event_start(ch, 0);
- break;
- case CLOCK_EVT_MODE_SHUTDOWN:
-@@ -678,7 +684,8 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- ced->suspend = sh_cmt_clock_event_suspend;
- ced->resume = sh_cmt_clock_event_resume;
-
-- dev_info(&ch->cmt->pdev->dev, "used for clock events\n");
-+ dev_info(&ch->cmt->pdev->dev, "ch%u: used for clock events\n",
-+ ch->index);
- clockevents_register_device(ced);
- }
-
-@@ -695,7 +702,7 @@ static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
- return 0;
- }
-
--static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
-+static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- struct sh_cmt_device *cmt)
- {
- struct sh_timer_config *cfg = cmt->pdev->dev.platform_data;
-@@ -705,10 +712,12 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
- memset(ch, 0, sizeof(*ch));
- ch->cmt = cmt;
- ch->base = cmt->mapbase_ch;
-+ ch->index = index;
-
- irq = platform_get_irq(cmt->pdev, 0);
- if (irq < 0) {
-- dev_err(&cmt->pdev->dev, "failed to get irq\n");
-+ dev_err(&cmt->pdev->dev, "ch%u: failed to get irq\n",
-+ ch->index);
- return irq;
- }
-
-@@ -724,7 +733,8 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- if (ret) {
-- dev_err(&cmt->pdev->dev, "registration failed\n");
-+ dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",
-+ ch->index);
- return ret;
- }
- ch->cs_enabled = false;
-@@ -733,7 +743,8 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
- dev_name(&cmt->pdev->dev), ch);
- if (ret) {
-- dev_err(&cmt->pdev->dev, "failed to request irq %d\n", irq);
-+ dev_err(&cmt->pdev->dev, "ch%u: failed to request irq %d\n",
-+ ch->index, irq);
- return ret;
- }
-
-@@ -815,7 +826,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- cmt->clear_bits = ~0xc000;
- }
-
-- ret = sh_cmt_setup_channel(&cmt->channel, cmt);
-+ ret = sh_cmt_setup_channel(&cmt->channel, cfg->timer_bit, cmt);
- if (ret < 0)
- goto err4;
-
---
-2.1.2
-
diff --git a/patches.renesas/0414-clocksource-sh_cmt-Replace-kmalloc-memset-with-kzall.patch b/patches.renesas/0414-clocksource-sh_cmt-Replace-kmalloc-memset-with-kzall.patch
deleted file mode 100644
index 43f08d3c3a653..0000000000000
--- a/patches.renesas/0414-clocksource-sh_cmt-Replace-kmalloc-memset-with-kzall.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From b0e07321a3a1366c46289823cf9da9662489aa5f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Replace kmalloc + memset with kzalloc
-
-One kzalloc a day keeps the bugs away.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit b262bc74dcfd77355720342cbcf89cc8ec12e86b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 6b65621a9733..0779bf194aea 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -672,8 +672,6 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- {
- struct clock_event_device *ced = &ch->ced;
-
-- memset(ced, 0, sizeof(*ced));
--
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->features |= CLOCK_EVT_FEAT_ONESHOT;
-@@ -709,7 +707,6 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- int irq;
- int ret;
-
-- memset(ch, 0, sizeof(*ch));
- ch->cmt = cmt;
- ch->base = cmt->mapbase_ch;
- ch->index = index;
-@@ -758,7 +755,6 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- int ret;
- ret = -ENXIO;
-
-- memset(cmt, 0, sizeof(*cmt));
- cmt->pdev = pdev;
-
- if (!cfg) {
-@@ -861,7 +857,7 @@ static int sh_cmt_probe(struct platform_device *pdev)
- goto out;
- }
-
-- cmt = kmalloc(sizeof(*cmt), GFP_KERNEL);
-+ cmt = kzalloc(sizeof(*cmt), GFP_KERNEL);
- if (cmt == NULL) {
- dev_err(&pdev->dev, "failed to allocate driver data\n");
- return -ENOMEM;
---
-2.1.2
-
diff --git a/patches.renesas/0415-clocksource-sh_cmt-Allocate-channels-dynamically.patch b/patches.renesas/0415-clocksource-sh_cmt-Allocate-channels-dynamically.patch
deleted file mode 100644
index 8db06ef3c4265..0000000000000
--- a/patches.renesas/0415-clocksource-sh_cmt-Allocate-channels-dynamically.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From ad4e79c19c8860ccd0fb311fa3c12282de9385e6 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_cmt: Allocate channels dynamically
-
-This prepares the driver for multi-channel support.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit f5ec9b194a93c05e2ccdb3e90d9061cfedc806d9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 0779bf194aea..f94db327ac7c 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -62,7 +62,8 @@ struct sh_cmt_device {
- void __iomem *mapbase;
- struct clk *clk;
-
-- struct sh_cmt_channel channel;
-+ struct sh_cmt_channel *channels;
-+ unsigned int num_channels;
-
- unsigned long width; /* 16 or 32 bit version of hardware block */
- unsigned long overflow_bit;
-@@ -822,7 +823,15 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- cmt->clear_bits = ~0xc000;
- }
-
-- ret = sh_cmt_setup_channel(&cmt->channel, cfg->timer_bit, cmt);
-+ cmt->channels = kzalloc(sizeof(*cmt->channels), GFP_KERNEL);
-+ if (cmt->channels == NULL) {
-+ ret = -ENOMEM;
-+ goto err4;
-+ }
-+
-+ cmt->num_channels = 1;
-+
-+ ret = sh_cmt_setup_channel(&cmt->channels[0], cfg->timer_bit, cmt);
- if (ret < 0)
- goto err4;
-
-@@ -830,6 +839,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
-
- return 0;
- err4:
-+ kfree(cmt->channels);
- clk_unprepare(cmt->clk);
- err3:
- clk_put(cmt->clk);
---
-2.1.2
-
diff --git a/patches.renesas/0416-clocksource-sh_cmt-Split-static-information-from-sh_.patch b/patches.renesas/0416-clocksource-sh_cmt-Split-static-information-from-sh_.patch
deleted file mode 100644
index 7736fbe84583b..0000000000000
--- a/patches.renesas/0416-clocksource-sh_cmt-Split-static-information-from-sh_.patch
+++ /dev/null
@@ -1,322 +0,0 @@
-From c9b75f84c0b921f302ce6e3c27411be2351ea6bc Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 11 Feb 2014 23:46:48 +0100
-Subject: clocksource: sh_cmt: Split static information from sh_cmt_device
-
-Create a new sh_cmt_info structure to hold static information about the
-device model and reference that structure from the sh_cmt_device
-structure.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 2cda3ac49d5744432e9ebffb8ba47bef6eca053d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 192 +++++++++++++++++++++++++++----------------
- 1 file changed, 122 insertions(+), 70 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index f94db327ac7c..879b8c2ae556 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -37,6 +37,52 @@
-
- struct sh_cmt_device;
-
-+/*
-+ * The CMT comes in 5 different identified flavours, depending not only on the
-+ * SoC but also on the particular instance. The following table lists the main
-+ * characteristics of those flavours.
-+ *
-+ * 16B 32B 32B-F 48B 48B-2
-+ * -----------------------------------------------------------------------------
-+ * Channels 2 1/4 1 6 2/8
-+ * Control Width 16 16 16 16 32
-+ * Counter Width 16 32 32 32/48 32/48
-+ * Shared Start/Stop Y Y Y Y N
-+ *
-+ * The 48-bit gen2 version has a per-channel start/stop register located in the
-+ * channel registers block. All other versions have a shared start/stop register
-+ * located in the global space.
-+ *
-+ * Note that CMT0 on r8a73a4, r8a7790 and r8a7791, while implementing 32-bit
-+ * channels only, is a 48-bit gen2 CMT with the 48-bit channels unavailable.
-+ */
-+
-+enum sh_cmt_model {
-+ SH_CMT_16BIT,
-+ SH_CMT_32BIT,
-+ SH_CMT_32BIT_FAST,
-+ SH_CMT_48BIT,
-+ SH_CMT_48BIT_GEN2,
-+};
-+
-+struct sh_cmt_info {
-+ enum sh_cmt_model model;
-+
-+ unsigned long width; /* 16 or 32 bit version of hardware block */
-+ unsigned long overflow_bit;
-+ unsigned long clear_bits;
-+
-+ /* callbacks for CMSTR and CMCSR access */
-+ unsigned long (*read_control)(void __iomem *base, unsigned long offs);
-+ void (*write_control)(void __iomem *base, unsigned long offs,
-+ unsigned long value);
-+
-+ /* callbacks for CMCNT and CMCOR access */
-+ unsigned long (*read_count)(void __iomem *base, unsigned long offs);
-+ void (*write_count)(void __iomem *base, unsigned long offs,
-+ unsigned long value);
-+};
-+
- struct sh_cmt_channel {
- struct sh_cmt_device *cmt;
- unsigned int index;
-@@ -58,49 +104,16 @@ struct sh_cmt_channel {
- struct sh_cmt_device {
- struct platform_device *pdev;
-
-+ const struct sh_cmt_info *info;
-+
- void __iomem *mapbase_ch;
- void __iomem *mapbase;
- struct clk *clk;
-
- struct sh_cmt_channel *channels;
- unsigned int num_channels;
--
-- unsigned long width; /* 16 or 32 bit version of hardware block */
-- unsigned long overflow_bit;
-- unsigned long clear_bits;
--
-- /* callbacks for CMSTR and CMCSR access */
-- unsigned long (*read_control)(void __iomem *base, unsigned long offs);
-- void (*write_control)(void __iomem *base, unsigned long offs,
-- unsigned long value);
--
-- /* callbacks for CMCNT and CMCOR access */
-- unsigned long (*read_count)(void __iomem *base, unsigned long offs);
-- void (*write_count)(void __iomem *base, unsigned long offs,
-- unsigned long value);
- };
-
--/* Examples of supported CMT timer register layouts and I/O access widths:
-- *
-- * "16-bit counter and 16-bit control" as found on sh7263:
-- * CMSTR 0xfffec000 16-bit
-- * CMCSR 0xfffec002 16-bit
-- * CMCNT 0xfffec004 16-bit
-- * CMCOR 0xfffec006 16-bit
-- *
-- * "32-bit counter and 16-bit control" as found on sh7372, sh73a0, r8a7740:
-- * CMSTR 0xffca0000 16-bit
-- * CMCSR 0xffca0060 16-bit
-- * CMCNT 0xffca0064 32-bit
-- * CMCOR 0xffca0068 32-bit
-- *
-- * "32-bit counter and 32-bit control" as found on r8a73a4 and r8a7790:
-- * CMSTR 0xffca0500 32-bit
-- * CMCSR 0xffca0510 32-bit
-- * CMCNT 0xffca0514 32-bit
-- * CMCOR 0xffca0518 32-bit
-- */
--
- static unsigned long sh_cmt_read16(void __iomem *base, unsigned long offs)
- {
- return ioread16(base + (offs << 1));
-@@ -123,47 +136,100 @@ static void sh_cmt_write32(void __iomem *base, unsigned long offs,
- iowrite32(value, base + (offs << 2));
- }
-
-+static const struct sh_cmt_info sh_cmt_info[] = {
-+ [SH_CMT_16BIT] = {
-+ .model = SH_CMT_16BIT,
-+ .width = 16,
-+ .overflow_bit = 0x80,
-+ .clear_bits = ~0x80,
-+ .read_control = sh_cmt_read16,
-+ .write_control = sh_cmt_write16,
-+ .read_count = sh_cmt_read16,
-+ .write_count = sh_cmt_write16,
-+ },
-+ [SH_CMT_32BIT] = {
-+ .model = SH_CMT_32BIT,
-+ .width = 32,
-+ .overflow_bit = 0x8000,
-+ .clear_bits = ~0xc000,
-+ .read_control = sh_cmt_read16,
-+ .write_control = sh_cmt_write16,
-+ .read_count = sh_cmt_read32,
-+ .write_count = sh_cmt_write32,
-+ },
-+ [SH_CMT_32BIT_FAST] = {
-+ .model = SH_CMT_32BIT_FAST,
-+ .width = 32,
-+ .overflow_bit = 0x8000,
-+ .clear_bits = ~0xc000,
-+ .read_control = sh_cmt_read16,
-+ .write_control = sh_cmt_write16,
-+ .read_count = sh_cmt_read32,
-+ .write_count = sh_cmt_write32,
-+ },
-+ [SH_CMT_48BIT] = {
-+ .model = SH_CMT_48BIT,
-+ .width = 32,
-+ .overflow_bit = 0x8000,
-+ .clear_bits = ~0xc000,
-+ .read_control = sh_cmt_read32,
-+ .write_control = sh_cmt_write32,
-+ .read_count = sh_cmt_read32,
-+ .write_count = sh_cmt_write32,
-+ },
-+ [SH_CMT_48BIT_GEN2] = {
-+ .model = SH_CMT_48BIT_GEN2,
-+ .width = 32,
-+ .overflow_bit = 0x8000,
-+ .clear_bits = ~0xc000,
-+ .read_control = sh_cmt_read32,
-+ .write_control = sh_cmt_write32,
-+ .read_count = sh_cmt_read32,
-+ .write_count = sh_cmt_write32,
-+ },
-+};
-+
- #define CMCSR 0 /* channel register */
- #define CMCNT 1 /* channel register */
- #define CMCOR 2 /* channel register */
-
- static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_control(ch->cmt->mapbase, 0);
-+ return ch->cmt->info->read_control(ch->cmt->mapbase, 0);
- }
-
- static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_control(ch->base, CMCSR);
-+ return ch->cmt->info->read_control(ch->base, CMCSR);
- }
-
- static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->read_count(ch->base, CMCNT);
-+ return ch->cmt->info->read_count(ch->base, CMCNT);
- }
-
- static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_control(ch->cmt->mapbase, 0, value);
-+ ch->cmt->info->write_control(ch->cmt->mapbase, 0, value);
- }
-
- static inline void sh_cmt_write_cmcsr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_control(ch->base, CMCSR, value);
-+ ch->cmt->info->write_control(ch->base, CMCSR, value);
- }
-
- static inline void sh_cmt_write_cmcnt(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_count(ch->base, CMCNT, value);
-+ ch->cmt->info->write_count(ch->base, CMCNT, value);
- }
-
- static inline void sh_cmt_write_cmcor(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->write_count(ch->base, CMCOR, value);
-+ ch->cmt->info->write_count(ch->base, CMCOR, value);
- }
-
- static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
-@@ -172,7 +238,7 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
- unsigned long v1, v2, v3;
- int o1, o2;
-
-- o1 = sh_cmt_read_cmcsr(ch) & ch->cmt->overflow_bit;
-+ o1 = sh_cmt_read_cmcsr(ch) & ch->cmt->info->overflow_bit;
-
- /* Make sure the timer value is stable. Stolen from acpi_pm.c */
- do {
-@@ -180,7 +246,7 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
- v1 = sh_cmt_read_cmcnt(ch);
- v2 = sh_cmt_read_cmcnt(ch);
- v3 = sh_cmt_read_cmcnt(ch);
-- o1 = sh_cmt_read_cmcsr(ch) & ch->cmt->overflow_bit;
-+ o1 = sh_cmt_read_cmcsr(ch) & ch->cmt->info->overflow_bit;
- } while (unlikely((o1 != o2) || (v1 > v2 && v1 < v3)
- || (v2 > v3 && v2 < v1) || (v3 > v1 && v3 < v2)));
-
-@@ -227,7 +293,7 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
- sh_cmt_start_stop_ch(ch, 0);
-
- /* configure channel, periodic mode and maximum timeout */
-- if (ch->cmt->width == 16) {
-+ if (ch->cmt->info->width == 16) {
- *rate = clk_get_rate(ch->cmt->clk) / 512;
- sh_cmt_write_cmcsr(ch, 0x43);
- } else {
-@@ -405,7 +471,8 @@ static irqreturn_t sh_cmt_interrupt(int irq, void *dev_id)
- struct sh_cmt_channel *ch = dev_id;
-
- /* clear flags */
-- sh_cmt_write_cmcsr(ch, sh_cmt_read_cmcsr(ch) & ch->cmt->clear_bits);
-+ sh_cmt_write_cmcsr(ch, sh_cmt_read_cmcsr(ch) &
-+ ch->cmt->info->clear_bits);
-
- /* update clock source counter to begin with if enabled
- * the wrap flag should be cleared by the timer specific
-@@ -719,10 +786,10 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- return irq;
- }
-
-- if (cmt->width == (sizeof(ch->max_match_value) * 8))
-+ if (cmt->info->width == (sizeof(ch->max_match_value) * 8))
- ch->max_match_value = ~0;
- else
-- ch->max_match_value = (1 << cmt->width) - 1;
-+ ch->max_match_value = (1 << cmt->info->width) - 1;
-
- ch->match_value = ch->max_match_value;
- raw_spin_lock_init(&ch->lock);
-@@ -800,28 +867,13 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- if (ret < 0)
- goto err3;
-
-- if (res2 && (resource_size(res2) == 4)) {
-- /* assume both CMSTR and CMCSR to be 32-bit */
-- cmt->read_control = sh_cmt_read32;
-- cmt->write_control = sh_cmt_write32;
-- } else {
-- cmt->read_control = sh_cmt_read16;
-- cmt->write_control = sh_cmt_write16;
-- }
--
-- if (resource_size(res) == 6) {
-- cmt->width = 16;
-- cmt->read_count = sh_cmt_read16;
-- cmt->write_count = sh_cmt_write16;
-- cmt->overflow_bit = 0x80;
-- cmt->clear_bits = ~0x80;
-- } else {
-- cmt->width = 32;
-- cmt->read_count = sh_cmt_read32;
-- cmt->write_count = sh_cmt_write32;
-- cmt->overflow_bit = 0x8000;
-- cmt->clear_bits = ~0xc000;
-- }
-+ /* identify the model based on the resources */
-+ if (resource_size(res) == 6)
-+ cmt->info = &sh_cmt_info[SH_CMT_16BIT];
-+ else if (res2 && (resource_size(res2) == 4))
-+ cmt->info = &sh_cmt_info[SH_CMT_48BIT_GEN2];
-+ else
-+ cmt->info = &sh_cmt_info[SH_CMT_32BIT];
-
- cmt->channels = kzalloc(sizeof(*cmt->channels), GFP_KERNEL);
- if (cmt->channels == NULL) {
---
-2.1.2
-
diff --git a/patches.renesas/0417-clocksource-sh_cmt-Replace-hardcoded-register-values.patch b/patches.renesas/0417-clocksource-sh_cmt-Replace-hardcoded-register-values.patch
deleted file mode 100644
index 396012d18c1e1..0000000000000
--- a/patches.renesas/0417-clocksource-sh_cmt-Replace-hardcoded-register-values.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From 1ed831ad8ca8384ecda71a73c97761e1b48c9a09 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 29 Jan 2014 00:33:08 +0100
-Subject: clocksource: sh_cmt: Replace hardcoded register values with macros
-
-Define symbolic macros for all used registers bits.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit d14be99b7e3fe52bc9921caa30953d49f499f121)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 56 ++++++++++++++++++++++++++++++++++----------
- 1 file changed, 44 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 879b8c2ae556..ce00baaf8bd2 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -114,6 +114,34 @@ struct sh_cmt_device {
- unsigned int num_channels;
- };
-
-+#define SH_CMT16_CMCSR_CMF (1 << 7)
-+#define SH_CMT16_CMCSR_CMIE (1 << 6)
-+#define SH_CMT16_CMCSR_CKS8 (0 << 0)
-+#define SH_CMT16_CMCSR_CKS32 (1 << 0)
-+#define SH_CMT16_CMCSR_CKS128 (2 << 0)
-+#define SH_CMT16_CMCSR_CKS512 (3 << 0)
-+#define SH_CMT16_CMCSR_CKS_MASK (3 << 0)
-+
-+#define SH_CMT32_CMCSR_CMF (1 << 15)
-+#define SH_CMT32_CMCSR_OVF (1 << 14)
-+#define SH_CMT32_CMCSR_WRFLG (1 << 13)
-+#define SH_CMT32_CMCSR_STTF (1 << 12)
-+#define SH_CMT32_CMCSR_STPF (1 << 11)
-+#define SH_CMT32_CMCSR_SSIE (1 << 10)
-+#define SH_CMT32_CMCSR_CMS (1 << 9)
-+#define SH_CMT32_CMCSR_CMM (1 << 8)
-+#define SH_CMT32_CMCSR_CMTOUT_IE (1 << 7)
-+#define SH_CMT32_CMCSR_CMR_NONE (0 << 4)
-+#define SH_CMT32_CMCSR_CMR_DMA (1 << 4)
-+#define SH_CMT32_CMCSR_CMR_IRQ (2 << 4)
-+#define SH_CMT32_CMCSR_CMR_MASK (3 << 4)
-+#define SH_CMT32_CMCSR_DBGIVD (1 << 3)
-+#define SH_CMT32_CMCSR_CKS_RCLK8 (4 << 0)
-+#define SH_CMT32_CMCSR_CKS_RCLK32 (5 << 0)
-+#define SH_CMT32_CMCSR_CKS_RCLK128 (6 << 0)
-+#define SH_CMT32_CMCSR_CKS_RCLK1 (7 << 0)
-+#define SH_CMT32_CMCSR_CKS_MASK (7 << 0)
-+
- static unsigned long sh_cmt_read16(void __iomem *base, unsigned long offs)
- {
- return ioread16(base + (offs << 1));
-@@ -140,8 +168,8 @@ static const struct sh_cmt_info sh_cmt_info[] = {
- [SH_CMT_16BIT] = {
- .model = SH_CMT_16BIT,
- .width = 16,
-- .overflow_bit = 0x80,
-- .clear_bits = ~0x80,
-+ .overflow_bit = SH_CMT16_CMCSR_CMF,
-+ .clear_bits = ~SH_CMT16_CMCSR_CMF,
- .read_control = sh_cmt_read16,
- .write_control = sh_cmt_write16,
- .read_count = sh_cmt_read16,
-@@ -150,8 +178,8 @@ static const struct sh_cmt_info sh_cmt_info[] = {
- [SH_CMT_32BIT] = {
- .model = SH_CMT_32BIT,
- .width = 32,
-- .overflow_bit = 0x8000,
-- .clear_bits = ~0xc000,
-+ .overflow_bit = SH_CMT32_CMCSR_CMF,
-+ .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF),
- .read_control = sh_cmt_read16,
- .write_control = sh_cmt_write16,
- .read_count = sh_cmt_read32,
-@@ -160,8 +188,8 @@ static const struct sh_cmt_info sh_cmt_info[] = {
- [SH_CMT_32BIT_FAST] = {
- .model = SH_CMT_32BIT_FAST,
- .width = 32,
-- .overflow_bit = 0x8000,
-- .clear_bits = ~0xc000,
-+ .overflow_bit = SH_CMT32_CMCSR_CMF,
-+ .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF),
- .read_control = sh_cmt_read16,
- .write_control = sh_cmt_write16,
- .read_count = sh_cmt_read32,
-@@ -170,8 +198,8 @@ static const struct sh_cmt_info sh_cmt_info[] = {
- [SH_CMT_48BIT] = {
- .model = SH_CMT_48BIT,
- .width = 32,
-- .overflow_bit = 0x8000,
-- .clear_bits = ~0xc000,
-+ .overflow_bit = SH_CMT32_CMCSR_CMF,
-+ .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF),
- .read_control = sh_cmt_read32,
- .write_control = sh_cmt_write32,
- .read_count = sh_cmt_read32,
-@@ -180,8 +208,8 @@ static const struct sh_cmt_info sh_cmt_info[] = {
- [SH_CMT_48BIT_GEN2] = {
- .model = SH_CMT_48BIT_GEN2,
- .width = 32,
-- .overflow_bit = 0x8000,
-- .clear_bits = ~0xc000,
-+ .overflow_bit = SH_CMT32_CMCSR_CMF,
-+ .clear_bits = ~(SH_CMT32_CMCSR_CMF | SH_CMT32_CMCSR_OVF),
- .read_control = sh_cmt_read32,
- .write_control = sh_cmt_write32,
- .read_count = sh_cmt_read32,
-@@ -295,10 +323,14 @@ static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
- /* configure channel, periodic mode and maximum timeout */
- if (ch->cmt->info->width == 16) {
- *rate = clk_get_rate(ch->cmt->clk) / 512;
-- sh_cmt_write_cmcsr(ch, 0x43);
-+ sh_cmt_write_cmcsr(ch, SH_CMT16_CMCSR_CMIE |
-+ SH_CMT16_CMCSR_CKS512);
- } else {
- *rate = clk_get_rate(ch->cmt->clk) / 8;
-- sh_cmt_write_cmcsr(ch, 0x01a4);
-+ sh_cmt_write_cmcsr(ch, SH_CMT32_CMCSR_CMM |
-+ SH_CMT32_CMCSR_CMTOUT_IE |
-+ SH_CMT32_CMCSR_CMR_IRQ |
-+ SH_CMT32_CMCSR_CKS_RCLK8);
- }
-
- sh_cmt_write_cmcor(ch, 0xffffffff);
---
-2.1.2
-
diff --git a/patches.renesas/0418-clocksource-sh_cmt-Set-cpumask-to-cpu_possible_mask.patch b/patches.renesas/0418-clocksource-sh_cmt-Set-cpumask-to-cpu_possible_mask.patch
deleted file mode 100644
index aa1ee33c3d50c..0000000000000
--- a/patches.renesas/0418-clocksource-sh_cmt-Set-cpumask-to-cpu_possible_mask.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From e8cb9e16b76cfe3cb8062b0451d39c940f2f2150 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 19 Feb 2014 16:19:44 +0100
-Subject: clocksource: sh_cmt: Set cpumask to cpu_possible_mask
-
-The CMT is a global timer not restricted to a single CPU. It has a lower
-rating than the TMU or ARM architected timer, but is still useful on
-systems where the other timers are stopped during CPU sleep.
-
-When multiple timers are available the timers core selects which timer
-to use based on timer ratings.
-
-On SMP systems where timer broadcasting is required, one dummy timer is
-instantiated per CPU with a rating of 100. On those systems the CMT
-timer has a rating of 80, which makes the dummy timer selected by
-default on all CPUs. The CMT is then available, and will be used as a
-broadcast timer.
-
-On UP systems no dummy timer is instantiated. The CMT timer has a rating
-of 125 on those systems and is used directly as a clock event device for
-CPU0 without broadcasting.
-
-The CMT rating shouldn't depend on whether we boot a UP or SMP system.
-We can't raise the CMT rating to 125 on SMP systems. This would select
-CMT as the clock event device for CPU0 as its rating is higher than the
-dummy timer rating, and would leave the system without a broadcast
-timer. We could instead lower the rating to 80 on all systems, but that
-wouldn't reflect reality as ratings between 1 and 99 are documented as
-"unfit for real use".
-
-We should raise the rating above 99 and still have the CMT selected as a
-broadcast timer. This can be done by changing the cpumask from
-cpumask_of(0) to cpu_possible_mask. In that case the timer selection
-logic will prefer the previously probed and already selected dummy timer
-for all CPUs based on the fact that already selected per-cpu timers are
-preferred over new global timers, regardless of their respective
-ratings. This also better reflects reality, as the CMT is not tied to
-the boot CPU.
-
-Ideally the timer selection logic should realize that the CMT needs to
-be used as a broadcast timer on SMP systems as no other broadcast timer
-is available, regardless of the cpumask and rating.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit f1ebe1e47e1979393a8492bfe751176908a830ae)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index ce00baaf8bd2..926abe288126 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -776,7 +776,7 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->features |= CLOCK_EVT_FEAT_ONESHOT;
- ced->rating = rating;
-- ced->cpumask = cpumask_of(0);
-+ ced->cpumask = cpu_possible_mask;
- ced->set_next_event = sh_cmt_clock_event_next;
- ced->set_mode = sh_cmt_clock_event_mode;
- ced->suspend = sh_cmt_clock_event_suspend;
---
-2.1.2
-
diff --git a/patches.renesas/0419-clocksource-sh_cmt-Hardcode-CMT-clock-event-rating-t.patch b/patches.renesas/0419-clocksource-sh_cmt-Hardcode-CMT-clock-event-rating-t.patch
deleted file mode 100644
index ea11daa56f134..0000000000000
--- a/patches.renesas/0419-clocksource-sh_cmt-Hardcode-CMT-clock-event-rating-t.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From caf8f646c77ecda6fa7ded0824c83508123f936d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 19 Feb 2014 17:00:31 +0100
-Subject: clocksource: sh_cmt: Hardcode CMT clock event rating to 125
-
-All boards use or should use a clock event rating of 125 for the CMT,
-hardcode it in the driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit b7fcbb0f830e6cccc9d358c24f8463e5d8018649)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 13 ++++++-------
- 1 file changed, 6 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 926abe288126..75b1f83a60a8 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -768,14 +768,14 @@ static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
- }
-
- static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
-- const char *name, unsigned long rating)
-+ const char *name)
- {
- struct clock_event_device *ced = &ch->ced;
-
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->features |= CLOCK_EVT_FEAT_ONESHOT;
-- ced->rating = rating;
-+ ced->rating = 125;
- ced->cpumask = cpu_possible_mask;
- ced->set_next_event = sh_cmt_clock_event_next;
- ced->set_mode = sh_cmt_clock_event_mode;
-@@ -788,11 +788,10 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- }
-
- static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
-- unsigned long clockevent_rating,
-- unsigned long clocksource_rating)
-+ bool clockevent, unsigned long clocksource_rating)
- {
-- if (clockevent_rating)
-- sh_cmt_register_clockevent(ch, name, clockevent_rating);
-+ if (clockevent)
-+ sh_cmt_register_clockevent(ch, name);
-
- if (clocksource_rating)
- sh_cmt_register_clocksource(ch, name, clocksource_rating);
-@@ -827,7 +826,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- raw_spin_lock_init(&ch->lock);
-
- ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
-- cfg->clockevent_rating,
-+ cfg->clockevent_rating != 0,
- cfg->clocksource_rating);
- if (ret) {
- dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",
---
-2.1.2
-
diff --git a/patches.renesas/0420-clocksource-sh_cmt-Hardcode-CMT-clock-source-rating-.patch b/patches.renesas/0420-clocksource-sh_cmt-Hardcode-CMT-clock-source-rating-.patch
deleted file mode 100644
index d410bfd82c3ea..0000000000000
--- a/patches.renesas/0420-clocksource-sh_cmt-Hardcode-CMT-clock-source-rating-.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From ab858fd6d6a7b7b8ff37bbc5fc90806ddb9020bd Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 19 Feb 2014 17:00:31 +0100
-Subject: clocksource: sh_cmt: Hardcode CMT clock source rating to 125
-
-All boards use or should use a clock source rating of 125 for the CMT,
-hardcode it in the driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit fb28a659813084365eced5c2876c6383da52e634)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 75b1f83a60a8..c753efcfe9f5 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -656,12 +656,12 @@ static void sh_cmt_clocksource_resume(struct clocksource *cs)
- }
-
- static int sh_cmt_register_clocksource(struct sh_cmt_channel *ch,
-- const char *name, unsigned long rating)
-+ const char *name)
- {
- struct clocksource *cs = &ch->cs;
-
- cs->name = name;
-- cs->rating = rating;
-+ cs->rating = 125;
- cs->read = sh_cmt_clocksource_read;
- cs->enable = sh_cmt_clocksource_enable;
- cs->disable = sh_cmt_clocksource_disable;
-@@ -788,13 +788,13 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- }
-
- static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
-- bool clockevent, unsigned long clocksource_rating)
-+ bool clockevent, bool clocksource)
- {
- if (clockevent)
- sh_cmt_register_clockevent(ch, name);
-
-- if (clocksource_rating)
-- sh_cmt_register_clocksource(ch, name, clocksource_rating);
-+ if (clocksource)
-+ sh_cmt_register_clocksource(ch, name);
-
- return 0;
- }
-@@ -827,7 +827,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
-
- ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
- cfg->clockevent_rating != 0,
-- cfg->clocksource_rating);
-+ cfg->clocksource_rating != 0);
- if (ret) {
- dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",
- ch->index);
---
-2.1.2
-
diff --git a/patches.renesas/0421-clocksource-sh_cmt-Add-support-for-multiple-channels.patch b/patches.renesas/0421-clocksource-sh_cmt-Add-support-for-multiple-channels.patch
deleted file mode 100644
index a1614864d1193..0000000000000
--- a/patches.renesas/0421-clocksource-sh_cmt-Add-support-for-multiple-channels.patch
+++ /dev/null
@@ -1,530 +0,0 @@
-From 05c8f3c8fa0061a598a92891f909d267dde7d63b Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 28 Jan 2014 12:36:48 +0100
-Subject: clocksource: sh_cmt: Add support for multiple channels per device
-
-CMT hardware devices can support multiple channels, with global
-registers and per-channel registers. The sh_cmt driver currently models
-the hardware with one Linux device per channel. This model makes it
-difficult to handle global registers in a clean way.
-
-Add support for a new model that uses one Linux device per timer with
-multiple channels per device. This requires changes to platform data,
-add new channel configuration fields.
-
-Support for the legacy model is kept and will be removed after all
-platforms switch to the new model.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 81b3b2711072b6047d5f332cd8751a1c5c9a3fb2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 304 +++++++++++++++++++++++++++++++++----------
- include/linux/sh_timer.h | 1 +
- 2 files changed, 237 insertions(+), 68 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index c753efcfe9f5..1efe7d64efca 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -53,7 +53,16 @@ struct sh_cmt_device;
- * channel registers block. All other versions have a shared start/stop register
- * located in the global space.
- *
-- * Note that CMT0 on r8a73a4, r8a7790 and r8a7791, while implementing 32-bit
-+ * Channels are indexed from 0 to N-1 in the documentation. The channel index
-+ * infers the start/stop bit position in the control register and the channel
-+ * registers block address. Some CMT instances have a subset of channels
-+ * available, in which case the index in the documentation doesn't match the
-+ * "real" index as implemented in hardware. This is for instance the case with
-+ * CMT0 on r8a7740, which is a 32-bit variant with a single channel numbered 0
-+ * in the documentation but using start/stop bit 5 and having its registers
-+ * block at 0x60.
-+ *
-+ * Similarly CMT0 on r8a73a4, r8a7790 and r8a7791, while implementing 32-bit
- * channels only, is a 48-bit gen2 CMT with the 48-bit channels unavailable.
- */
-
-@@ -85,10 +94,14 @@ struct sh_cmt_info {
-
- struct sh_cmt_channel {
- struct sh_cmt_device *cmt;
-- unsigned int index;
-
-- void __iomem *base;
-+ unsigned int index; /* Index in the documentation */
-+ unsigned int hwidx; /* Real hardware index */
-+
-+ void __iomem *iostart;
-+ void __iomem *ioctrl;
-
-+ unsigned int timer_bit;
- unsigned long flags;
- unsigned long match_value;
- unsigned long next_match_value;
-@@ -105,6 +118,7 @@ struct sh_cmt_device {
- struct platform_device *pdev;
-
- const struct sh_cmt_info *info;
-+ bool legacy;
-
- void __iomem *mapbase_ch;
- void __iomem *mapbase;
-@@ -112,6 +126,9 @@ struct sh_cmt_device {
-
- struct sh_cmt_channel *channels;
- unsigned int num_channels;
-+
-+ bool has_clockevent;
-+ bool has_clocksource;
- };
-
- #define SH_CMT16_CMCSR_CMF (1 << 7)
-@@ -223,41 +240,47 @@ static const struct sh_cmt_info sh_cmt_info[] = {
-
- static inline unsigned long sh_cmt_read_cmstr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->info->read_control(ch->cmt->mapbase, 0);
-+ if (ch->iostart)
-+ return ch->cmt->info->read_control(ch->iostart, 0);
-+ else
-+ return ch->cmt->info->read_control(ch->cmt->mapbase, 0);
- }
-
--static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)
-+static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
-+ unsigned long value)
- {
-- return ch->cmt->info->read_control(ch->base, CMCSR);
-+ if (ch->iostart)
-+ ch->cmt->info->write_control(ch->iostart, 0, value);
-+ else
-+ ch->cmt->info->write_control(ch->cmt->mapbase, 0, value);
- }
-
--static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)
-+static inline unsigned long sh_cmt_read_cmcsr(struct sh_cmt_channel *ch)
- {
-- return ch->cmt->info->read_count(ch->base, CMCNT);
-+ return ch->cmt->info->read_control(ch->ioctrl, CMCSR);
- }
-
--static inline void sh_cmt_write_cmstr(struct sh_cmt_channel *ch,
-+static inline void sh_cmt_write_cmcsr(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->info->write_control(ch->cmt->mapbase, 0, value);
-+ ch->cmt->info->write_control(ch->ioctrl, CMCSR, value);
- }
-
--static inline void sh_cmt_write_cmcsr(struct sh_cmt_channel *ch,
-- unsigned long value)
-+static inline unsigned long sh_cmt_read_cmcnt(struct sh_cmt_channel *ch)
- {
-- ch->cmt->info->write_control(ch->base, CMCSR, value);
-+ return ch->cmt->info->read_count(ch->ioctrl, CMCNT);
- }
-
- static inline void sh_cmt_write_cmcnt(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->info->write_count(ch->base, CMCNT, value);
-+ ch->cmt->info->write_count(ch->ioctrl, CMCNT, value);
- }
-
- static inline void sh_cmt_write_cmcor(struct sh_cmt_channel *ch,
- unsigned long value)
- {
-- ch->cmt->info->write_count(ch->base, CMCOR, value);
-+ ch->cmt->info->write_count(ch->ioctrl, CMCOR, value);
- }
-
- static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
-@@ -286,7 +309,6 @@ static DEFINE_RAW_SPINLOCK(sh_cmt_lock);
-
- static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
- {
-- struct sh_timer_config *cfg = ch->cmt->pdev->dev.platform_data;
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
-@@ -294,9 +316,9 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
- value = sh_cmt_read_cmstr(ch);
-
- if (start)
-- value |= 1 << cfg->timer_bit;
-+ value |= 1 << ch->timer_bit;
- else
-- value &= ~(1 << cfg->timer_bit);
-+ value &= ~(1 << ch->timer_bit);
-
- sh_cmt_write_cmstr(ch, value);
- raw_spin_unlock_irqrestore(&sh_cmt_lock, flags);
-@@ -790,27 +812,72 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
- bool clockevent, bool clocksource)
- {
-- if (clockevent)
-+ if (clockevent) {
-+ ch->cmt->has_clockevent = true;
- sh_cmt_register_clockevent(ch, name);
-+ }
-
-- if (clocksource)
-+ if (clocksource) {
-+ ch->cmt->has_clocksource = true;
- sh_cmt_register_clocksource(ch, name);
-+ }
-
- return 0;
- }
-
- static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
-- struct sh_cmt_device *cmt)
-+ unsigned int hwidx, bool clockevent,
-+ bool clocksource, struct sh_cmt_device *cmt)
- {
-- struct sh_timer_config *cfg = cmt->pdev->dev.platform_data;
- int irq;
- int ret;
-
-+ /* Skip unused channels. */
-+ if (!clockevent && !clocksource)
-+ return 0;
-+
- ch->cmt = cmt;
-- ch->base = cmt->mapbase_ch;
- ch->index = index;
-+ ch->hwidx = hwidx;
-+
-+ /*
-+ * Compute the address of the channel control register block. For the
-+ * timers with a per-channel start/stop register, compute its address
-+ * as well.
-+ *
-+ * For legacy configuration the address has been mapped explicitly.
-+ */
-+ if (cmt->legacy) {
-+ ch->ioctrl = cmt->mapbase_ch;
-+ } else {
-+ switch (cmt->info->model) {
-+ case SH_CMT_16BIT:
-+ ch->ioctrl = cmt->mapbase + 2 + ch->hwidx * 6;
-+ break;
-+ case SH_CMT_32BIT:
-+ case SH_CMT_48BIT:
-+ ch->ioctrl = cmt->mapbase + 0x10 + ch->hwidx * 0x10;
-+ break;
-+ case SH_CMT_32BIT_FAST:
-+ /*
-+ * The 32-bit "fast" timer has a single channel at hwidx
-+ * 5 but is located at offset 0x40 instead of 0x60 for
-+ * some reason.
-+ */
-+ ch->ioctrl = cmt->mapbase + 0x40;
-+ break;
-+ case SH_CMT_48BIT_GEN2:
-+ ch->iostart = cmt->mapbase + ch->hwidx * 0x100;
-+ ch->ioctrl = ch->iostart + 0x10;
-+ break;
-+ }
-+ }
-+
-+ if (cmt->legacy)
-+ irq = platform_get_irq(cmt->pdev, 0);
-+ else
-+ irq = platform_get_irq(cmt->pdev, ch->index);
-
-- irq = platform_get_irq(cmt->pdev, 0);
- if (irq < 0) {
- dev_err(&cmt->pdev->dev, "ch%u: failed to get irq\n",
- ch->index);
-@@ -825,9 +892,15 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- ch->match_value = ch->max_match_value;
- raw_spin_lock_init(&ch->lock);
-
-+ if (cmt->legacy) {
-+ ch->timer_bit = ch->hwidx;
-+ } else {
-+ ch->timer_bit = cmt->info->model == SH_CMT_48BIT_GEN2
-+ ? 0 : ch->hwidx;
-+ }
-+
- ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
-- cfg->clockevent_rating != 0,
-- cfg->clocksource_rating != 0);
-+ clockevent, clocksource);
- if (ret) {
- dev_err(&cmt->pdev->dev, "ch%u: registration failed\n",
- ch->index);
-@@ -847,97 +920,180 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- return 0;
- }
-
--static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
-+static int sh_cmt_map_memory(struct sh_cmt_device *cmt)
- {
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
-- struct resource *res, *res2;
-- int ret;
-- ret = -ENXIO;
-+ struct resource *mem;
-
-- cmt->pdev = pdev;
-+ mem = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 0);
-+ if (!mem) {
-+ dev_err(&cmt->pdev->dev, "failed to get I/O memory\n");
-+ return -ENXIO;
-+ }
-
-- if (!cfg) {
-- dev_err(&cmt->pdev->dev, "missing platform data\n");
-- goto err0;
-+ cmt->mapbase = ioremap_nocache(mem->start, resource_size(mem));
-+ if (cmt->mapbase == NULL) {
-+ dev_err(&cmt->pdev->dev, "failed to remap I/O memory\n");
-+ return -ENXIO;
- }
-
-+ return 0;
-+}
-+
-+static int sh_cmt_map_memory_legacy(struct sh_cmt_device *cmt)
-+{
-+ struct sh_timer_config *cfg = cmt->pdev->dev.platform_data;
-+ struct resource *res, *res2;
-+
-+ /* map memory, let mapbase_ch point to our channel */
- res = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&cmt->pdev->dev, "failed to get I/O memory\n");
-- goto err0;
-+ return -ENXIO;
- }
-
-- /* optional resource for the shared timer start/stop register */
-- res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
--
-- /* map memory, let mapbase_ch point to our channel */
- cmt->mapbase_ch = ioremap_nocache(res->start, resource_size(res));
- if (cmt->mapbase_ch == NULL) {
- dev_err(&cmt->pdev->dev, "failed to remap I/O memory\n");
-- goto err0;
-+ return -ENXIO;
- }
-
-+ /* optional resource for the shared timer start/stop register */
-+ res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
-+
- /* map second resource for CMSTR */
- cmt->mapbase = ioremap_nocache(res2 ? res2->start :
- res->start - cfg->channel_offset,
- res2 ? resource_size(res2) : 2);
- if (cmt->mapbase == NULL) {
- dev_err(&cmt->pdev->dev, "failed to remap I/O second memory\n");
-- goto err1;
-+ iounmap(cmt->mapbase_ch);
-+ return -ENXIO;
- }
-
-- /* get hold of clock */
-+ /* identify the model based on the resources */
-+ if (resource_size(res) == 6)
-+ cmt->info = &sh_cmt_info[SH_CMT_16BIT];
-+ else if (res2 && (resource_size(res2) == 4))
-+ cmt->info = &sh_cmt_info[SH_CMT_48BIT_GEN2];
-+ else
-+ cmt->info = &sh_cmt_info[SH_CMT_32BIT];
-+
-+ return 0;
-+}
-+
-+static void sh_cmt_unmap_memory(struct sh_cmt_device *cmt)
-+{
-+ iounmap(cmt->mapbase);
-+ if (cmt->mapbase_ch)
-+ iounmap(cmt->mapbase_ch);
-+}
-+
-+static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
-+{
-+ struct sh_timer_config *cfg = pdev->dev.platform_data;
-+ const struct platform_device_id *id = pdev->id_entry;
-+ unsigned int hw_channels;
-+ int ret;
-+
-+ memset(cmt, 0, sizeof(*cmt));
-+ cmt->pdev = pdev;
-+
-+ if (!cfg) {
-+ dev_err(&cmt->pdev->dev, "missing platform data\n");
-+ return -ENXIO;
-+ }
-+
-+ cmt->info = (const struct sh_cmt_info *)id->driver_data;
-+ cmt->legacy = cmt->info ? false : true;
-+
-+ /* Get hold of clock. */
- cmt->clk = clk_get(&cmt->pdev->dev, "cmt_fck");
- if (IS_ERR(cmt->clk)) {
- dev_err(&cmt->pdev->dev, "cannot get clock\n");
-- ret = PTR_ERR(cmt->clk);
-- goto err2;
-+ return PTR_ERR(cmt->clk);
- }
-
- ret = clk_prepare(cmt->clk);
- if (ret < 0)
-- goto err3;
-+ goto err_clk_put;
-
-- /* identify the model based on the resources */
-- if (resource_size(res) == 6)
-- cmt->info = &sh_cmt_info[SH_CMT_16BIT];
-- else if (res2 && (resource_size(res2) == 4))
-- cmt->info = &sh_cmt_info[SH_CMT_48BIT_GEN2];
-+ /*
-+ * Map the memory resource(s). We need to support both the legacy
-+ * platform device configuration (with one device per channel) and the
-+ * new version (with multiple channels per device).
-+ */
-+ if (cmt->legacy)
-+ ret = sh_cmt_map_memory_legacy(cmt);
- else
-- cmt->info = &sh_cmt_info[SH_CMT_32BIT];
-+ ret = sh_cmt_map_memory(cmt);
-
-- cmt->channels = kzalloc(sizeof(*cmt->channels), GFP_KERNEL);
-+ if (ret < 0)
-+ goto err_clk_unprepare;
-+
-+ /* Allocate and setup the channels. */
-+ if (cmt->legacy) {
-+ cmt->num_channels = 1;
-+ hw_channels = 0;
-+ } else {
-+ cmt->num_channels = hweight8(cfg->channels_mask);
-+ hw_channels = cfg->channels_mask;
-+ }
-+
-+ cmt->channels = kzalloc(cmt->num_channels * sizeof(*cmt->channels),
-+ GFP_KERNEL);
- if (cmt->channels == NULL) {
- ret = -ENOMEM;
-- goto err4;
-+ goto err_unmap;
- }
-
-- cmt->num_channels = 1;
-+ if (cmt->legacy) {
-+ ret = sh_cmt_setup_channel(&cmt->channels[0],
-+ cfg->timer_bit, cfg->timer_bit,
-+ cfg->clockevent_rating != 0,
-+ cfg->clocksource_rating != 0, cmt);
-+ if (ret < 0)
-+ goto err_unmap;
-+ } else {
-+ unsigned int mask = hw_channels;
-+ unsigned int i;
-
-- ret = sh_cmt_setup_channel(&cmt->channels[0], cfg->timer_bit, cmt);
-- if (ret < 0)
-- goto err4;
-+ /*
-+ * Use the first channel as a clock event device and the second
-+ * channel as a clock source. If only one channel is available
-+ * use it for both.
-+ */
-+ for (i = 0; i < cmt->num_channels; ++i) {
-+ unsigned int hwidx = ffs(mask) - 1;
-+ bool clocksource = i == 1 || cmt->num_channels == 1;
-+ bool clockevent = i == 0;
-+
-+ ret = sh_cmt_setup_channel(&cmt->channels[i], i, hwidx,
-+ clockevent, clocksource,
-+ cmt);
-+ if (ret < 0)
-+ goto err_unmap;
-+
-+ mask &= ~(1 << hwidx);
-+ }
-+ }
-
- platform_set_drvdata(pdev, cmt);
-
- return 0;
--err4:
-+
-+err_unmap:
- kfree(cmt->channels);
-+ sh_cmt_unmap_memory(cmt);
-+err_clk_unprepare:
- clk_unprepare(cmt->clk);
--err3:
-+err_clk_put:
- clk_put(cmt->clk);
--err2:
-- iounmap(cmt->mapbase);
--err1:
-- iounmap(cmt->mapbase_ch);
--err0:
- return ret;
- }
-
- static int sh_cmt_probe(struct platform_device *pdev)
- {
- struct sh_cmt_device *cmt = platform_get_drvdata(pdev);
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
- int ret;
-
- if (!is_early_platform_device(pdev)) {
-@@ -966,7 +1122,7 @@ static int sh_cmt_probe(struct platform_device *pdev)
- return 0;
-
- out:
-- if (cfg->clockevent_rating || cfg->clocksource_rating)
-+ if (cmt->has_clockevent || cmt->has_clocksource)
- pm_runtime_irq_safe(&pdev->dev);
- else
- pm_runtime_idle(&pdev->dev);
-@@ -979,12 +1135,24 @@ static int sh_cmt_remove(struct platform_device *pdev)
- return -EBUSY; /* cannot unregister clockevent and clocksource */
- }
-
-+static const struct platform_device_id sh_cmt_id_table[] = {
-+ { "sh_cmt", 0 },
-+ { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
-+ { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
-+ { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
-+ { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
-+ { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
-+
- static struct platform_driver sh_cmt_device_driver = {
- .probe = sh_cmt_probe,
- .remove = sh_cmt_remove,
- .driver = {
- .name = "sh_cmt",
-- }
-+ },
-+ .id_table = sh_cmt_id_table,
- };
-
- static int __init sh_cmt_init(void)
-diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h
-index 4d9dcd138315..8e1e036d6d45 100644
---- a/include/linux/sh_timer.h
-+++ b/include/linux/sh_timer.h
-@@ -7,6 +7,7 @@ struct sh_timer_config {
- int timer_bit;
- unsigned long clockevent_rating;
- unsigned long clocksource_rating;
-+ unsigned int channels_mask;
- };
-
- #endif /* __SH_TIMER_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0422-clocksource-sh_cmt-Rename-clock-to-fck-in-the-non-le.patch b/patches.renesas/0422-clocksource-sh_cmt-Rename-clock-to-fck-in-the-non-le.patch
deleted file mode 100644
index ebb863e48cfff..0000000000000
--- a/patches.renesas/0422-clocksource-sh_cmt-Rename-clock-to-fck-in-the-non-le.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 273e4a0e8d62791ce64b82b8175e0a74da83d335 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 14 Feb 2014 00:35:18 +0100
-Subject: clocksource: sh_cmt: Rename clock to "fck" in the non-legacy case
-
-The sh_cmt driver gets the CMT functional clock using a connection ID of
-"cmt_fck". While all SH SoCs create clock lookup entries with a NULL
-device ID and a "cmt_fck" connection ID, the ARM SoCs use the device ID
-only with a NULL connection ID. This works on legacy platforms but will
-break on ARM with DT boot.
-
-Fix the situation by using a connection ID of "fck" in the non-legacy
-platform data case. Clock lookup entries will be renamed to use the
-device ID as well as the connection ID as platforms get moved to new
-platform data. The legacy code will eventually be dropped, leaving us
-with device ID based clock lookup, compatible with DT boot.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 24b4e07df54b7bf7739fb3dd193f639a8f274ad6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 1efe7d64efca..a5ea9aedbd50 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -1007,7 +1007,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- cmt->legacy = cmt->info ? false : true;
-
- /* Get hold of clock. */
-- cmt->clk = clk_get(&cmt->pdev->dev, "cmt_fck");
-+ cmt->clk = clk_get(&cmt->pdev->dev, cmt->legacy ? "cmt_fck" : "fck");
- if (IS_ERR(cmt->clk)) {
- dev_err(&cmt->pdev->dev, "cannot get clock\n");
- return PTR_ERR(cmt->clk);
---
-2.1.2
-
diff --git a/patches.renesas/0423-clocksource-sh_cmt-Remove-FSF-mail-address-from-GPL-.patch b/patches.renesas/0423-clocksource-sh_cmt-Remove-FSF-mail-address-from-GPL-.patch
deleted file mode 100644
index cfcb777d5970d..0000000000000
--- a/patches.renesas/0423-clocksource-sh_cmt-Remove-FSF-mail-address-from-GPL-.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 2607cf65be6e28ba628273330df31483db8927ba Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 14 Feb 2014 01:25:50 +0100
-Subject: clocksource: sh_cmt: Remove FSF mail address from GPL notice
-
-Do not include the paragraph about writing to the Free Software
-Foundation's mailing address from the sample GPL notice. The FSF has
-changed addresses in the past, and may do so again. Linux already
-includes a copy of the GPL.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 1cd89c568c057a13ca11acf0eb3a78121513e2b6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index a5ea9aedbd50..399e9525e226 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -11,10 +11,6 @@
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- #include <linux/init.h>
---
-2.1.2
-
diff --git a/patches.renesas/0424-clocksource-sh_cmt-Sort-headers-alphabetically.patch b/patches.renesas/0424-clocksource-sh_cmt-Sort-headers-alphabetically.patch
deleted file mode 100644
index 22ac09ddc61cd..0000000000000
--- a/patches.renesas/0424-clocksource-sh_cmt-Sort-headers-alphabetically.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From d36481ac4802e43aa792ccf9243ef2b1ec692cca Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 12 Feb 2014 16:56:44 +0100
-Subject: clocksource: sh_cmt: Sort headers alphabetically
-
-This helps locating duplicates and inserting new headers.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit e7a9bcc2372b0e62443569c63a369cfd528db4f4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 399e9525e226..9f215e74751c 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -13,23 +13,23 @@
- * GNU General Public License for more details.
- */
-
-+#include <linux/clk.h>
-+#include <linux/clockchips.h>
-+#include <linux/clocksource.h>
-+#include <linux/delay.h>
-+#include <linux/err.h>
- #include <linux/init.h>
--#include <linux/platform_device.h>
--#include <linux/spinlock.h>
- #include <linux/interrupt.h>
--#include <linux/ioport.h>
- #include <linux/io.h>
--#include <linux/clk.h>
-+#include <linux/ioport.h>
- #include <linux/irq.h>
--#include <linux/err.h>
--#include <linux/delay.h>
--#include <linux/clocksource.h>
--#include <linux/clockchips.h>
--#include <linux/sh_timer.h>
--#include <linux/slab.h>
- #include <linux/module.h>
-+#include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-+#include <linux/sh_timer.h>
-+#include <linux/slab.h>
-+#include <linux/spinlock.h>
-
- struct sh_cmt_device;
-
---
-2.1.2
-
diff --git a/patches.renesas/0425-clocksource-sh_cmt-Request-IRQ-for-clock-event-devic.patch b/patches.renesas/0425-clocksource-sh_cmt-Request-IRQ-for-clock-event-devic.patch
deleted file mode 100644
index 5a71d47cbf68c..0000000000000
--- a/patches.renesas/0425-clocksource-sh_cmt-Request-IRQ-for-clock-event-devic.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 346cff671beb2aa2188d2db2ceeda08e42140d12 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 21 Feb 2014 01:24:47 +0100
-Subject: clocksource: sh_cmt: Request IRQ for clock event device only
-
-Clock sources don't need an IRQ, request the IRQ only for channels used
-as clock event devices.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit bfa76bb12f23ecf0c6d07c302f4571a6fe9bc3e3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 51 +++++++++++++++++++++++---------------------
- 1 file changed, 27 insertions(+), 24 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 9f215e74751c..bc8d025ce861 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -785,10 +785,28 @@ static void sh_cmt_clock_event_resume(struct clock_event_device *ced)
- pm_genpd_syscore_poweron(&ch->cmt->pdev->dev);
- }
-
--static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
-- const char *name)
-+static int sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
-+ const char *name)
- {
- struct clock_event_device *ced = &ch->ced;
-+ int irq;
-+ int ret;
-+
-+ irq = platform_get_irq(ch->cmt->pdev, ch->cmt->legacy ? 0 : ch->index);
-+ if (irq < 0) {
-+ dev_err(&ch->cmt->pdev->dev, "ch%u: failed to get irq\n",
-+ ch->index);
-+ return irq;
-+ }
-+
-+ ret = request_irq(irq, sh_cmt_interrupt,
-+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-+ dev_name(&ch->cmt->pdev->dev), ch);
-+ if (ret) {
-+ dev_err(&ch->cmt->pdev->dev, "ch%u: failed to request irq %d\n",
-+ ch->index, irq);
-+ return ret;
-+ }
-
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
-@@ -803,14 +821,20 @@ static void sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- dev_info(&ch->cmt->pdev->dev, "ch%u: used for clock events\n",
- ch->index);
- clockevents_register_device(ced);
-+
-+ return 0;
- }
-
- static int sh_cmt_register(struct sh_cmt_channel *ch, const char *name,
- bool clockevent, bool clocksource)
- {
-+ int ret;
-+
- if (clockevent) {
- ch->cmt->has_clockevent = true;
-- sh_cmt_register_clockevent(ch, name);
-+ ret = sh_cmt_register_clockevent(ch, name);
-+ if (ret < 0)
-+ return ret;
- }
-
- if (clocksource) {
-@@ -825,7 +849,6 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- unsigned int hwidx, bool clockevent,
- bool clocksource, struct sh_cmt_device *cmt)
- {
-- int irq;
- int ret;
-
- /* Skip unused channels. */
-@@ -869,17 +892,6 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- }
- }
-
-- if (cmt->legacy)
-- irq = platform_get_irq(cmt->pdev, 0);
-- else
-- irq = platform_get_irq(cmt->pdev, ch->index);
--
-- if (irq < 0) {
-- dev_err(&cmt->pdev->dev, "ch%u: failed to get irq\n",
-- ch->index);
-- return irq;
-- }
--
- if (cmt->info->width == (sizeof(ch->max_match_value) * 8))
- ch->max_match_value = ~0;
- else
-@@ -904,15 +916,6 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- }
- ch->cs_enabled = false;
-
-- ret = request_irq(irq, sh_cmt_interrupt,
-- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&cmt->pdev->dev), ch);
-- if (ret) {
-- dev_err(&cmt->pdev->dev, "ch%u: failed to request irq %d\n",
-- ch->index, irq);
-- return ret;
-- }
--
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0426-clocksource-sh_cmt-Remove-unnecessary-OOM-messages.patch b/patches.renesas/0426-clocksource-sh_cmt-Remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index 7f728b2cb7a97..0000000000000
--- a/patches.renesas/0426-clocksource-sh_cmt-Remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 016705dac5f3d7da6e08a7421a573defb5afd44f Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Thu, 22 May 2014 14:05:06 +0200
-Subject: clocksource: sh_cmt: Remove unnecessary OOM messages
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message.
-
-[dlezcano] : refreshed against latest modifications: kmalloc -> kzalloc
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-(cherry picked from commit 0178f41d3d35b63ed25a066d90e7dda380018c06)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index bc8d025ce861..dfa780396b91 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -1106,10 +1106,8 @@ static int sh_cmt_probe(struct platform_device *pdev)
- }
-
- cmt = kzalloc(sizeof(*cmt), GFP_KERNEL);
-- if (cmt == NULL) {
-- dev_err(&pdev->dev, "failed to allocate driver data\n");
-+ if (cmt == NULL)
- return -ENOMEM;
-- }
-
- ret = sh_cmt_setup(cmt, pdev);
- if (ret) {
---
-2.1.2
-
diff --git a/patches.renesas/0427-clocksource-sh_mtu2-Use-request_irq-instead-of-setup.patch b/patches.renesas/0427-clocksource-sh_mtu2-Use-request_irq-instead-of-setup.patch
deleted file mode 100644
index db9146da2de8d..0000000000000
--- a/patches.renesas/0427-clocksource-sh_mtu2-Use-request_irq-instead-of-setup.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From bf4134c119de4fee4664c4a6de97a49a36592593 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 11:27:49 +0100
-Subject: clocksource: sh_mtu2: Use request_irq() instead of setup_irq()
-
-The driver claims it needs to register an interrupt handler too early
-for request_irq(). This might have been true in the past, but the only
-meaningful difference between request_irq() and setup_irq() today is an
-additional kzalloc() call in request_irq(). As the driver calls
-kmalloc() itself we know that the slab allocator is available, we can
-thus switch to request_irq().
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 276bee05d8b72e98d530b55161e0a2131da99f58)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 22 ++++++++--------------
- 1 file changed, 8 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index e30d76e0a6fa..77992e081205 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -37,7 +37,7 @@
- struct sh_mtu2_priv {
- void __iomem *mapbase;
- struct clk *clk;
-- struct irqaction irqaction;
-+ int irq;
- struct platform_device *pdev;
- unsigned long rate;
- unsigned long periodic;
-@@ -244,10 +244,11 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_priv *p,
- dev_info(&p->pdev->dev, "used for clock events\n");
- clockevents_register_device(ced);
-
-- ret = setup_irq(p->irqaction.irq, &p->irqaction);
-+ ret = request_irq(p->irq, sh_mtu2_interrupt,
-+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-+ dev_name(&p->pdev->dev), p);
- if (ret) {
-- dev_err(&p->pdev->dev, "failed to request irq %d\n",
-- p->irqaction.irq);
-+ dev_err(&p->pdev->dev, "failed to request irq %d\n", p->irq);
- return;
- }
- }
-@@ -265,7 +266,7 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
-- int irq, ret;
-+ int ret;
- ret = -ENXIO;
-
- memset(p, 0, sizeof(*p));
-@@ -284,8 +285,8 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
- goto err0;
- }
-
-- irq = platform_get_irq(p->pdev, 0);
-- if (irq < 0) {
-+ p->irq = platform_get_irq(p->pdev, 0);
-+ if (p->irq < 0) {
- dev_err(&p->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-@@ -297,13 +298,6 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
- goto err0;
- }
-
-- /* setup data for setup_irq() (too early for request_irq()) */
-- p->irqaction.name = dev_name(&p->pdev->dev);
-- p->irqaction.handler = sh_mtu2_interrupt;
-- p->irqaction.dev_id = p;
-- p->irqaction.irq = irq;
-- p->irqaction.flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING;
--
- /* get hold of clock */
- p->clk = clk_get(&p->pdev->dev, "mtu2_fck");
- if (IS_ERR(p->clk)) {
---
-2.1.2
-
diff --git a/patches.renesas/0428-clocksource-sh_mtu2-Turn-sh_mtu2_priv-fields-into-lo.patch b/patches.renesas/0428-clocksource-sh_mtu2-Turn-sh_mtu2_priv-fields-into-lo.patch
deleted file mode 100644
index afc34fcba199a..0000000000000
--- a/patches.renesas/0428-clocksource-sh_mtu2-Turn-sh_mtu2_priv-fields-into-lo.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From b558d803e549005ba747fc5da374bfdee6090e98 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 12:59:54 +0100
-Subject: clocksource: sh_mtu2: Turn sh_mtu2_priv fields into local variables
-
-The rate and periodic fields are used in a single function only, as
-local variables. Remove them from the structure.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit f92d62f53973466cccb25900c2597ff6df950d74)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 77992e081205..66684552fcc9 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -39,8 +39,6 @@ struct sh_mtu2_priv {
- struct clk *clk;
- int irq;
- struct platform_device *pdev;
-- unsigned long rate;
-- unsigned long periodic;
- struct clock_event_device ced;
- };
-
-@@ -122,6 +120,8 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
-
- static int sh_mtu2_enable(struct sh_mtu2_priv *p)
- {
-+ unsigned long periodic;
-+ unsigned long rate;
- int ret;
-
- pm_runtime_get_sync(&p->pdev->dev);
-@@ -137,13 +137,13 @@ static int sh_mtu2_enable(struct sh_mtu2_priv *p)
- /* make sure channel is disabled */
- sh_mtu2_start_stop_ch(p, 0);
-
-- p->rate = clk_get_rate(p->clk) / 64;
-- p->periodic = (p->rate + HZ/2) / HZ;
-+ rate = clk_get_rate(p->clk) / 64;
-+ periodic = (rate + HZ/2) / HZ;
-
- /* "Periodic Counter Operation" */
- sh_mtu2_write(p, TCR, 0x23); /* TGRA clear, divide clock by 64 */
- sh_mtu2_write(p, TIOR, 0);
-- sh_mtu2_write(p, TGR, p->periodic);
-+ sh_mtu2_write(p, TGR, periodic);
- sh_mtu2_write(p, TCNT, 0);
- sh_mtu2_write(p, TMDR, 0);
- sh_mtu2_write(p, TIER, 0x01);
---
-2.1.2
-
diff --git a/patches.renesas/0429-clocksource-sh_mtu2-Split-channel-fields-from-sh_mtu.patch b/patches.renesas/0429-clocksource-sh_mtu2-Split-channel-fields-from-sh_mtu.patch
deleted file mode 100644
index 05c98deb99cab..0000000000000
--- a/patches.renesas/0429-clocksource-sh_mtu2-Split-channel-fields-from-sh_mtu.patch
+++ /dev/null
@@ -1,302 +0,0 @@
-From cd6f1cee239cb604cf8a2d8b3b2d711983924696 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 12:58:30 +0100
-Subject: clocksource: sh_mtu2: Split channel fields from sh_mtu2_priv
-
-Create a new sh_mtu2_channel structure to hold the channel-specific
-fields in preparation for multiple channels per device support.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 42752cc619c0ee619b56f86932ce42b00adb5052)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 125 +++++++++++++++++++++++-------------------
- 1 file changed, 69 insertions(+), 56 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 66684552fcc9..e509f417ef64 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -34,12 +34,21 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
-+struct sh_mtu2_priv;
-+
-+struct sh_mtu2_channel {
-+ struct sh_mtu2_priv *mtu;
-+ int irq;
-+ struct clock_event_device ced;
-+};
-+
- struct sh_mtu2_priv {
-+ struct platform_device *pdev;
-+
- void __iomem *mapbase;
- struct clk *clk;
-- int irq;
-- struct platform_device *pdev;
-- struct clock_event_device ced;
-+
-+ struct sh_mtu2_channel channel;
- };
-
- static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);
-@@ -63,10 +72,10 @@ static unsigned long mtu2_reg_offs[] = {
- [TGR] = 8,
- };
-
--static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr)
-+static inline unsigned long sh_mtu2_read(struct sh_mtu2_channel *ch, int reg_nr)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-- void __iomem *base = p->mapbase;
-+ struct sh_timer_config *cfg = ch->mtu->pdev->dev.platform_data;
-+ void __iomem *base = ch->mtu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR)
-@@ -80,11 +89,11 @@ static inline unsigned long sh_mtu2_read(struct sh_mtu2_priv *p, int reg_nr)
- return ioread8(base + offs);
- }
-
--static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr,
-+static inline void sh_mtu2_write(struct sh_mtu2_channel *ch, int reg_nr,
- unsigned long value)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-- void __iomem *base = p->mapbase;
-+ struct sh_timer_config *cfg = ch->mtu->pdev->dev.platform_data;
-+ void __iomem *base = ch->mtu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR) {
-@@ -100,100 +109,100 @@ static inline void sh_mtu2_write(struct sh_mtu2_priv *p, int reg_nr,
- iowrite8(value, base + offs);
- }
-
--static void sh_mtu2_start_stop_ch(struct sh_mtu2_priv *p, int start)
-+static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-+ struct sh_timer_config *cfg = ch->mtu->pdev->dev.platform_data;
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
- raw_spin_lock_irqsave(&sh_mtu2_lock, flags);
-- value = sh_mtu2_read(p, TSTR);
-+ value = sh_mtu2_read(ch, TSTR);
-
- if (start)
- value |= 1 << cfg->timer_bit;
- else
- value &= ~(1 << cfg->timer_bit);
-
-- sh_mtu2_write(p, TSTR, value);
-+ sh_mtu2_write(ch, TSTR, value);
- raw_spin_unlock_irqrestore(&sh_mtu2_lock, flags);
- }
-
--static int sh_mtu2_enable(struct sh_mtu2_priv *p)
-+static int sh_mtu2_enable(struct sh_mtu2_channel *ch)
- {
- unsigned long periodic;
- unsigned long rate;
- int ret;
-
-- pm_runtime_get_sync(&p->pdev->dev);
-- dev_pm_syscore_device(&p->pdev->dev, true);
-+ pm_runtime_get_sync(&ch->mtu->pdev->dev);
-+ dev_pm_syscore_device(&ch->mtu->pdev->dev, true);
-
- /* enable clock */
-- ret = clk_enable(p->clk);
-+ ret = clk_enable(ch->mtu->clk);
- if (ret) {
-- dev_err(&p->pdev->dev, "cannot enable clock\n");
-+ dev_err(&ch->mtu->pdev->dev, "cannot enable clock\n");
- return ret;
- }
-
- /* make sure channel is disabled */
-- sh_mtu2_start_stop_ch(p, 0);
-+ sh_mtu2_start_stop_ch(ch, 0);
-
-- rate = clk_get_rate(p->clk) / 64;
-+ rate = clk_get_rate(ch->mtu->clk) / 64;
- periodic = (rate + HZ/2) / HZ;
-
- /* "Periodic Counter Operation" */
-- sh_mtu2_write(p, TCR, 0x23); /* TGRA clear, divide clock by 64 */
-- sh_mtu2_write(p, TIOR, 0);
-- sh_mtu2_write(p, TGR, periodic);
-- sh_mtu2_write(p, TCNT, 0);
-- sh_mtu2_write(p, TMDR, 0);
-- sh_mtu2_write(p, TIER, 0x01);
-+ sh_mtu2_write(ch, TCR, 0x23); /* TGRA clear, divide clock by 64 */
-+ sh_mtu2_write(ch, TIOR, 0);
-+ sh_mtu2_write(ch, TGR, periodic);
-+ sh_mtu2_write(ch, TCNT, 0);
-+ sh_mtu2_write(ch, TMDR, 0);
-+ sh_mtu2_write(ch, TIER, 0x01);
-
- /* enable channel */
-- sh_mtu2_start_stop_ch(p, 1);
-+ sh_mtu2_start_stop_ch(ch, 1);
-
- return 0;
- }
-
--static void sh_mtu2_disable(struct sh_mtu2_priv *p)
-+static void sh_mtu2_disable(struct sh_mtu2_channel *ch)
- {
- /* disable channel */
-- sh_mtu2_start_stop_ch(p, 0);
-+ sh_mtu2_start_stop_ch(ch, 0);
-
- /* stop clock */
-- clk_disable(p->clk);
-+ clk_disable(ch->mtu->clk);
-
-- dev_pm_syscore_device(&p->pdev->dev, false);
-- pm_runtime_put(&p->pdev->dev);
-+ dev_pm_syscore_device(&ch->mtu->pdev->dev, false);
-+ pm_runtime_put(&ch->mtu->pdev->dev);
- }
-
- static irqreturn_t sh_mtu2_interrupt(int irq, void *dev_id)
- {
-- struct sh_mtu2_priv *p = dev_id;
-+ struct sh_mtu2_channel *ch = dev_id;
-
- /* acknowledge interrupt */
-- sh_mtu2_read(p, TSR);
-- sh_mtu2_write(p, TSR, 0xfe);
-+ sh_mtu2_read(ch, TSR);
-+ sh_mtu2_write(ch, TSR, 0xfe);
-
- /* notify clockevent layer */
-- p->ced.event_handler(&p->ced);
-+ ch->ced.event_handler(&ch->ced);
- return IRQ_HANDLED;
- }
-
--static struct sh_mtu2_priv *ced_to_sh_mtu2(struct clock_event_device *ced)
-+static struct sh_mtu2_channel *ced_to_sh_mtu2(struct clock_event_device *ced)
- {
-- return container_of(ced, struct sh_mtu2_priv, ced);
-+ return container_of(ced, struct sh_mtu2_channel, ced);
- }
-
- static void sh_mtu2_clock_event_mode(enum clock_event_mode mode,
- struct clock_event_device *ced)
- {
-- struct sh_mtu2_priv *p = ced_to_sh_mtu2(ced);
-+ struct sh_mtu2_channel *ch = ced_to_sh_mtu2(ced);
- int disabled = 0;
-
- /* deal with old setting first */
- switch (ced->mode) {
- case CLOCK_EVT_MODE_PERIODIC:
-- sh_mtu2_disable(p);
-+ sh_mtu2_disable(ch);
- disabled = 1;
- break;
- default:
-@@ -202,12 +211,13 @@ static void sh_mtu2_clock_event_mode(enum clock_event_mode mode,
-
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
-- dev_info(&p->pdev->dev, "used for periodic clock events\n");
-- sh_mtu2_enable(p);
-+ dev_info(&ch->mtu->pdev->dev,
-+ "used for periodic clock events\n");
-+ sh_mtu2_enable(ch);
- break;
- case CLOCK_EVT_MODE_UNUSED:
- if (!disabled)
-- sh_mtu2_disable(p);
-+ sh_mtu2_disable(ch);
- break;
- case CLOCK_EVT_MODE_SHUTDOWN:
- default:
-@@ -217,18 +227,18 @@ static void sh_mtu2_clock_event_mode(enum clock_event_mode mode,
-
- static void sh_mtu2_clock_event_suspend(struct clock_event_device *ced)
- {
-- pm_genpd_syscore_poweroff(&ced_to_sh_mtu2(ced)->pdev->dev);
-+ pm_genpd_syscore_poweroff(&ced_to_sh_mtu2(ced)->mtu->pdev->dev);
- }
-
- static void sh_mtu2_clock_event_resume(struct clock_event_device *ced)
- {
-- pm_genpd_syscore_poweron(&ced_to_sh_mtu2(ced)->pdev->dev);
-+ pm_genpd_syscore_poweron(&ced_to_sh_mtu2(ced)->mtu->pdev->dev);
- }
-
--static void sh_mtu2_register_clockevent(struct sh_mtu2_priv *p,
-+static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- char *name, unsigned long rating)
- {
-- struct clock_event_device *ced = &p->ced;
-+ struct clock_event_device *ced = &ch->ced;
- int ret;
-
- memset(ced, 0, sizeof(*ced));
-@@ -241,23 +251,24 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_priv *p,
- ced->suspend = sh_mtu2_clock_event_suspend;
- ced->resume = sh_mtu2_clock_event_resume;
-
-- dev_info(&p->pdev->dev, "used for clock events\n");
-+ dev_info(&ch->mtu->pdev->dev, "used for clock events\n");
- clockevents_register_device(ced);
-
-- ret = request_irq(p->irq, sh_mtu2_interrupt,
-+ ret = request_irq(ch->irq, sh_mtu2_interrupt,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&p->pdev->dev), p);
-+ dev_name(&ch->mtu->pdev->dev), ch);
- if (ret) {
-- dev_err(&p->pdev->dev, "failed to request irq %d\n", p->irq);
-+ dev_err(&ch->mtu->pdev->dev, "failed to request irq %d\n",
-+ ch->irq);
- return;
- }
- }
-
--static int sh_mtu2_register(struct sh_mtu2_priv *p, char *name,
-+static int sh_mtu2_register(struct sh_mtu2_channel *ch, char *name,
- unsigned long clockevent_rating)
- {
- if (clockevent_rating)
-- sh_mtu2_register_clockevent(p, name, clockevent_rating);
-+ sh_mtu2_register_clockevent(ch, name, clockevent_rating);
-
- return 0;
- }
-@@ -285,8 +296,8 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
- goto err0;
- }
-
-- p->irq = platform_get_irq(p->pdev, 0);
-- if (p->irq < 0) {
-+ p->channel.irq = platform_get_irq(p->pdev, 0);
-+ if (p->channel.irq < 0) {
- dev_err(&p->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-@@ -310,7 +321,9 @@ static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
- if (ret < 0)
- goto err2;
-
-- ret = sh_mtu2_register(p, (char *)dev_name(&p->pdev->dev),
-+ p->channel.mtu = p;
-+
-+ ret = sh_mtu2_register(&p->channel, (char *)dev_name(&p->pdev->dev),
- cfg->clockevent_rating);
- if (ret < 0)
- goto err3;
---
-2.1.2
-
diff --git a/patches.renesas/0430-clocksource-sh_mtu2-Rename-struct-sh_mtu2_priv-to-sh.patch b/patches.renesas/0430-clocksource-sh_mtu2-Rename-struct-sh_mtu2_priv-to-sh.patch
deleted file mode 100644
index 772c0699a5994..0000000000000
--- a/patches.renesas/0430-clocksource-sh_mtu2-Rename-struct-sh_mtu2_priv-to-sh.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From fb9f615ca5901fd5b9d6719b2914455703540adb Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 13:04:48 +0100
-Subject: clocksource: sh_mtu2: Rename struct sh_mtu2_priv to sh_mtu2_device
-
-Channel data is private as well, rename priv to device to make the
-distrinction between the core device and the channels clearer.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 7dad72de1b475d02935e5c79c218637b6c63108b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 65 ++++++++++++++++++++++---------------------
- 1 file changed, 33 insertions(+), 32 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index e509f417ef64..256621c156e6 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -34,15 +34,15 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
--struct sh_mtu2_priv;
-+struct sh_mtu2_device;
-
- struct sh_mtu2_channel {
-- struct sh_mtu2_priv *mtu;
-+ struct sh_mtu2_device *mtu;
- int irq;
- struct clock_event_device ced;
- };
-
--struct sh_mtu2_priv {
-+struct sh_mtu2_device {
- struct platform_device *pdev;
-
- void __iomem *mapbase;
-@@ -273,75 +273,76 @@ static int sh_mtu2_register(struct sh_mtu2_channel *ch, char *name,
- return 0;
- }
-
--static int sh_mtu2_setup(struct sh_mtu2_priv *p, struct platform_device *pdev)
-+static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
-+ struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
- int ret;
- ret = -ENXIO;
-
-- memset(p, 0, sizeof(*p));
-- p->pdev = pdev;
-+ memset(mtu, 0, sizeof(*mtu));
-+ mtu->pdev = pdev;
-
- if (!cfg) {
-- dev_err(&p->pdev->dev, "missing platform data\n");
-+ dev_err(&mtu->pdev->dev, "missing platform data\n");
- goto err0;
- }
-
-- platform_set_drvdata(pdev, p);
-+ platform_set_drvdata(pdev, mtu);
-
-- res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
-+ res = platform_get_resource(mtu->pdev, IORESOURCE_MEM, 0);
- if (!res) {
-- dev_err(&p->pdev->dev, "failed to get I/O memory\n");
-+ dev_err(&mtu->pdev->dev, "failed to get I/O memory\n");
- goto err0;
- }
-
-- p->channel.irq = platform_get_irq(p->pdev, 0);
-- if (p->channel.irq < 0) {
-- dev_err(&p->pdev->dev, "failed to get irq\n");
-+ mtu->channel.irq = platform_get_irq(mtu->pdev, 0);
-+ if (mtu->channel.irq < 0) {
-+ dev_err(&mtu->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-
- /* map memory, let mapbase point to our channel */
-- p->mapbase = ioremap_nocache(res->start, resource_size(res));
-- if (p->mapbase == NULL) {
-- dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
-+ mtu->mapbase = ioremap_nocache(res->start, resource_size(res));
-+ if (mtu->mapbase == NULL) {
-+ dev_err(&mtu->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
- /* get hold of clock */
-- p->clk = clk_get(&p->pdev->dev, "mtu2_fck");
-- if (IS_ERR(p->clk)) {
-- dev_err(&p->pdev->dev, "cannot get clock\n");
-- ret = PTR_ERR(p->clk);
-+ mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck");
-+ if (IS_ERR(mtu->clk)) {
-+ dev_err(&mtu->pdev->dev, "cannot get clock\n");
-+ ret = PTR_ERR(mtu->clk);
- goto err1;
- }
-
-- ret = clk_prepare(p->clk);
-+ ret = clk_prepare(mtu->clk);
- if (ret < 0)
- goto err2;
-
-- p->channel.mtu = p;
-+ mtu->channel.mtu = mtu;
-
-- ret = sh_mtu2_register(&p->channel, (char *)dev_name(&p->pdev->dev),
-+ ret = sh_mtu2_register(&mtu->channel, (char *)dev_name(&mtu->pdev->dev),
- cfg->clockevent_rating);
- if (ret < 0)
- goto err3;
-
- return 0;
- err3:
-- clk_unprepare(p->clk);
-+ clk_unprepare(mtu->clk);
- err2:
-- clk_put(p->clk);
-+ clk_put(mtu->clk);
- err1:
-- iounmap(p->mapbase);
-+ iounmap(mtu->mapbase);
- err0:
- return ret;
- }
-
- static int sh_mtu2_probe(struct platform_device *pdev)
- {
-- struct sh_mtu2_priv *p = platform_get_drvdata(pdev);
-+ struct sh_mtu2_device *mtu = platform_get_drvdata(pdev);
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- int ret;
-
-@@ -350,20 +351,20 @@ static int sh_mtu2_probe(struct platform_device *pdev)
- pm_runtime_enable(&pdev->dev);
- }
-
-- if (p) {
-+ if (mtu) {
- dev_info(&pdev->dev, "kept as earlytimer\n");
- goto out;
- }
-
-- p = kmalloc(sizeof(*p), GFP_KERNEL);
-- if (p == NULL) {
-+ mtu = kmalloc(sizeof(*mtu), GFP_KERNEL);
-+ if (mtu == NULL) {
- dev_err(&pdev->dev, "failed to allocate driver data\n");
- return -ENOMEM;
- }
-
-- ret = sh_mtu2_setup(p, pdev);
-+ ret = sh_mtu2_setup(mtu, pdev);
- if (ret) {
-- kfree(p);
-+ kfree(mtu);
- pm_runtime_idle(&pdev->dev);
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0431-clocksource-sh_mtu2-Split-channel-setup-to-separate-.patch b/patches.renesas/0431-clocksource-sh_mtu2-Split-channel-setup-to-separate-.patch
deleted file mode 100644
index b67f1935ea6a6..0000000000000
--- a/patches.renesas/0431-clocksource-sh_mtu2-Split-channel-setup-to-separate-.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From c5f858279101772b2d0dd142f7fbc4831d3a5661 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 13:11:23 +0100
-Subject: clocksource: sh_mtu2: Split channel setup to separate function
-
-Move the channel setup code from sh_mtu2_setup to a new
-sh_mtu2_setup_channel function and call it from sh_mtu2_setup.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 2e1a53265d550002fdd1658778854d56ae4cadc1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 29 +++++++++++++++++++----------
- 1 file changed, 19 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 256621c156e6..8fd705909f98 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -273,6 +273,24 @@ static int sh_mtu2_register(struct sh_mtu2_channel *ch, char *name,
- return 0;
- }
-
-+static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch,
-+ struct sh_mtu2_device *mtu)
-+{
-+ struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-+
-+ memset(ch, 0, sizeof(*ch));
-+ ch->mtu = mtu;
-+
-+ ch->irq = platform_get_irq(mtu->pdev, 0);
-+ if (ch->irq < 0) {
-+ dev_err(&mtu->pdev->dev, "failed to get irq\n");
-+ return ch->irq;
-+ }
-+
-+ return sh_mtu2_register(ch, (char *)dev_name(&mtu->pdev->dev),
-+ cfg->clockevent_rating);
-+}
-+
- static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- struct platform_device *pdev)
- {
-@@ -297,12 +315,6 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- goto err0;
- }
-
-- mtu->channel.irq = platform_get_irq(mtu->pdev, 0);
-- if (mtu->channel.irq < 0) {
-- dev_err(&mtu->pdev->dev, "failed to get irq\n");
-- goto err0;
-- }
--
- /* map memory, let mapbase point to our channel */
- mtu->mapbase = ioremap_nocache(res->start, resource_size(res));
- if (mtu->mapbase == NULL) {
-@@ -322,10 +334,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- if (ret < 0)
- goto err2;
-
-- mtu->channel.mtu = mtu;
--
-- ret = sh_mtu2_register(&mtu->channel, (char *)dev_name(&mtu->pdev->dev),
-- cfg->clockevent_rating);
-+ ret = sh_mtu2_setup_channel(&mtu->channel, mtu);
- if (ret < 0)
- goto err3;
-
---
-2.1.2
-
diff --git a/patches.renesas/0432-clocksource-sh_mtu2-Constify-name-argument-to-sh_mtu.patch b/patches.renesas/0432-clocksource-sh_mtu2-Constify-name-argument-to-sh_mtu.patch
deleted file mode 100644
index d8e564c7a28ea..0000000000000
--- a/patches.renesas/0432-clocksource-sh_mtu2-Constify-name-argument-to-sh_mtu.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 7a1fbec514697a4df482023451c2793026db4d10 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 13:57:14 +0100
-Subject: clocksource: sh_mtu2: Constify name argument to sh_mtu2_register()
-
-The name argument is assigned to const structure fields only, constify
-it.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit aa83804af705731d2802b80fb4b94a79045d31a3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 8fd705909f98..2fe3ab4c3231 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -236,7 +236,7 @@ static void sh_mtu2_clock_event_resume(struct clock_event_device *ced)
- }
-
- static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
-- char *name, unsigned long rating)
-+ const char *name, unsigned long rating)
- {
- struct clock_event_device *ced = &ch->ced;
- int ret;
-@@ -264,7 +264,7 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- }
- }
-
--static int sh_mtu2_register(struct sh_mtu2_channel *ch, char *name,
-+static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name,
- unsigned long clockevent_rating)
- {
- if (clockevent_rating)
-@@ -287,7 +287,7 @@ static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch,
- return ch->irq;
- }
-
-- return sh_mtu2_register(ch, (char *)dev_name(&mtu->pdev->dev),
-+ return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev),
- cfg->clockevent_rating);
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0433-clocksource-sh_mtu2-Add-memory-base-to-sh_mtu2_chann.patch b/patches.renesas/0433-clocksource-sh_mtu2-Add-memory-base-to-sh_mtu2_chann.patch
deleted file mode 100644
index 6172160d06f27..0000000000000
--- a/patches.renesas/0433-clocksource-sh_mtu2-Add-memory-base-to-sh_mtu2_chann.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From b65c9acd5dccf91ea9a68d553174b911328808ff Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 14:04:24 +0100
-Subject: clocksource: sh_mtu2: Add memory base to sh_mtu2_channel structure
-
-The channel memory base is channel-specific, add it to the channel
-structure in preparation for support of multiple channels per device.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit da90a1c67751a412499a9f5698c3bf0bf80f65a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 32 ++++++++++++++++++--------------
- 1 file changed, 18 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 2fe3ab4c3231..97714ce5e851 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -38,7 +38,10 @@ struct sh_mtu2_device;
-
- struct sh_mtu2_channel {
- struct sh_mtu2_device *mtu;
-+
-+ void __iomem *base;
- int irq;
-+
- struct clock_event_device ced;
- };
-
-@@ -74,39 +77,35 @@ static unsigned long mtu2_reg_offs[] = {
-
- static inline unsigned long sh_mtu2_read(struct sh_mtu2_channel *ch, int reg_nr)
- {
-- struct sh_timer_config *cfg = ch->mtu->pdev->dev.platform_data;
-- void __iomem *base = ch->mtu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR)
-- return ioread8(base + cfg->channel_offset);
-+ return ioread8(ch->mtu->mapbase);
-
- offs = mtu2_reg_offs[reg_nr];
-
- if ((reg_nr == TCNT) || (reg_nr == TGR))
-- return ioread16(base + offs);
-+ return ioread16(ch->base + offs);
- else
-- return ioread8(base + offs);
-+ return ioread8(ch->base + offs);
- }
-
- static inline void sh_mtu2_write(struct sh_mtu2_channel *ch, int reg_nr,
- unsigned long value)
- {
-- struct sh_timer_config *cfg = ch->mtu->pdev->dev.platform_data;
-- void __iomem *base = ch->mtu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR) {
-- iowrite8(value, base + cfg->channel_offset);
-+ iowrite8(value, ch->mtu->mapbase);
- return;
- }
-
- offs = mtu2_reg_offs[reg_nr];
-
- if ((reg_nr == TCNT) || (reg_nr == TGR))
-- iowrite16(value, base + offs);
-+ iowrite16(value, ch->base + offs);
- else
-- iowrite8(value, base + offs);
-+ iowrite8(value, ch->base + offs);
- }
-
- static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
-@@ -315,13 +314,18 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- goto err0;
- }
-
-- /* map memory, let mapbase point to our channel */
-- mtu->mapbase = ioremap_nocache(res->start, resource_size(res));
-- if (mtu->mapbase == NULL) {
-+ /*
-+ * Map memory, let channel.base point to our channel and mapbase to the
-+ * start/stop shared register.
-+ */
-+ mtu->channel.base = ioremap_nocache(res->start, resource_size(res));
-+ if (mtu->channel.base == NULL) {
- dev_err(&mtu->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
-+ mtu->mapbase = mtu->channel.base + cfg->channel_offset;
-+
- /* get hold of clock */
- mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck");
- if (IS_ERR(mtu->clk)) {
-@@ -344,7 +348,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- err2:
- clk_put(mtu->clk);
- err1:
-- iounmap(mtu->mapbase);
-+ iounmap(mtu->channel.base);
- err0:
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0434-clocksource-sh_mtu2-Add-index-to-struct-sh_mtu2_chan.patch b/patches.renesas/0434-clocksource-sh_mtu2-Add-index-to-struct-sh_mtu2_chan.patch
deleted file mode 100644
index e0eb0af22bf6b..0000000000000
--- a/patches.renesas/0434-clocksource-sh_mtu2-Add-index-to-struct-sh_mtu2_chan.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From f61baa5c30521c16d025208bb0c606ae0b250538 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 14:17:26 +0100
-Subject: clocksource: sh_mtu2: Add index to struct sh_mtu2_channel
-
-Use the index as the timer start/stop bit and when printing messages to
-identify the channel.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit d2b93177065fd8e1e18f4f42880326e0881ff457)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 22 +++++++++++++---------
- 1 file changed, 13 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 97714ce5e851..61827c66f7d3 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -38,6 +38,7 @@ struct sh_mtu2_device;
-
- struct sh_mtu2_channel {
- struct sh_mtu2_device *mtu;
-+ unsigned int index;
-
- void __iomem *base;
- int irq;
-@@ -110,7 +111,6 @@ static inline void sh_mtu2_write(struct sh_mtu2_channel *ch, int reg_nr,
-
- static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
- {
-- struct sh_timer_config *cfg = ch->mtu->pdev->dev.platform_data;
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
-@@ -118,9 +118,9 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
- value = sh_mtu2_read(ch, TSTR);
-
- if (start)
-- value |= 1 << cfg->timer_bit;
-+ value |= 1 << ch->index;
- else
-- value &= ~(1 << cfg->timer_bit);
-+ value &= ~(1 << ch->index);
-
- sh_mtu2_write(ch, TSTR, value);
- raw_spin_unlock_irqrestore(&sh_mtu2_lock, flags);
-@@ -138,7 +138,8 @@ static int sh_mtu2_enable(struct sh_mtu2_channel *ch)
- /* enable clock */
- ret = clk_enable(ch->mtu->clk);
- if (ret) {
-- dev_err(&ch->mtu->pdev->dev, "cannot enable clock\n");
-+ dev_err(&ch->mtu->pdev->dev, "ch%u: cannot enable clock\n",
-+ ch->index);
- return ret;
- }
-
-@@ -211,7 +212,7 @@ static void sh_mtu2_clock_event_mode(enum clock_event_mode mode,
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
- dev_info(&ch->mtu->pdev->dev,
-- "used for periodic clock events\n");
-+ "ch%u: used for periodic clock events\n", ch->index);
- sh_mtu2_enable(ch);
- break;
- case CLOCK_EVT_MODE_UNUSED:
-@@ -250,15 +251,16 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- ced->suspend = sh_mtu2_clock_event_suspend;
- ced->resume = sh_mtu2_clock_event_resume;
-
-- dev_info(&ch->mtu->pdev->dev, "used for clock events\n");
-+ dev_info(&ch->mtu->pdev->dev, "ch%u: used for clock events\n",
-+ ch->index);
- clockevents_register_device(ced);
-
- ret = request_irq(ch->irq, sh_mtu2_interrupt,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
- dev_name(&ch->mtu->pdev->dev), ch);
- if (ret) {
-- dev_err(&ch->mtu->pdev->dev, "failed to request irq %d\n",
-- ch->irq);
-+ dev_err(&ch->mtu->pdev->dev, "ch%u: failed to request irq %d\n",
-+ ch->index, ch->irq);
- return;
- }
- }
-@@ -279,10 +281,12 @@ static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch,
-
- memset(ch, 0, sizeof(*ch));
- ch->mtu = mtu;
-+ ch->index = cfg->timer_bit;
-
- ch->irq = platform_get_irq(mtu->pdev, 0);
- if (ch->irq < 0) {
-- dev_err(&mtu->pdev->dev, "failed to get irq\n");
-+ dev_err(&mtu->pdev->dev, "ch%u: failed to get irq\n",
-+ ch->index);
- return ch->irq;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0435-clocksource-sh_mtu2-Replace-kmalloc-memset-with-kzal.patch b/patches.renesas/0435-clocksource-sh_mtu2-Replace-kmalloc-memset-with-kzal.patch
deleted file mode 100644
index 62d1e8713e35f..0000000000000
--- a/patches.renesas/0435-clocksource-sh_mtu2-Replace-kmalloc-memset-with-kzal.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From bbaba8a8d2033e610d83f227e708d48732e1e93d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 14:10:55 +0100
-Subject: clocksource: sh_mtu2: Replace kmalloc + memset with kzalloc
-
-One kzalloc a day keeps the bugs away.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 810c651369b343618d949826e0acd0df1b8b06eb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 61827c66f7d3..94a53428a556 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -241,8 +241,6 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- struct clock_event_device *ced = &ch->ced;
- int ret;
-
-- memset(ced, 0, sizeof(*ced));
--
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->rating = rating;
-@@ -279,7 +277,6 @@ static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch,
- {
- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-
-- memset(ch, 0, sizeof(*ch));
- ch->mtu = mtu;
- ch->index = cfg->timer_bit;
-
-@@ -302,7 +299,6 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- int ret;
- ret = -ENXIO;
-
-- memset(mtu, 0, sizeof(*mtu));
- mtu->pdev = pdev;
-
- if (!cfg) {
-@@ -373,7 +369,7 @@ static int sh_mtu2_probe(struct platform_device *pdev)
- goto out;
- }
-
-- mtu = kmalloc(sizeof(*mtu), GFP_KERNEL);
-+ mtu = kzalloc(sizeof(*mtu), GFP_KERNEL);
- if (mtu == NULL) {
- dev_err(&pdev->dev, "failed to allocate driver data\n");
- return -ENOMEM;
---
-2.1.2
-
diff --git a/patches.renesas/0436-clocksource-sh_mtu2-Allocate-channels-dynamically.patch b/patches.renesas/0436-clocksource-sh_mtu2-Allocate-channels-dynamically.patch
deleted file mode 100644
index e54a955606971..0000000000000
--- a/patches.renesas/0436-clocksource-sh_mtu2-Allocate-channels-dynamically.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 31a7d4871fb9b8785d3a95e390b19f38c3155826 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 14:23:00 +0100
-Subject: clocksource: sh_mtu2: Allocate channels dynamically
-
-This prepares the driver for multi-channel support.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit c54ccb431ce6ce813bb850e8659991fc4c5bc6bc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 27 ++++++++++++++++++++-------
- 1 file changed, 20 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 94a53428a556..45e1e85fcbeb 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -52,7 +52,8 @@ struct sh_mtu2_device {
- void __iomem *mapbase;
- struct clk *clk;
-
-- struct sh_mtu2_channel channel;
-+ struct sh_mtu2_channel *channels;
-+ unsigned int num_channels;
- };
-
- static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);
-@@ -296,6 +297,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
-+ void __iomem *base;
- int ret;
- ret = -ENXIO;
-
-@@ -315,16 +317,16 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- }
-
- /*
-- * Map memory, let channel.base point to our channel and mapbase to the
-+ * Map memory, let base point to our channel and mapbase to the
- * start/stop shared register.
- */
-- mtu->channel.base = ioremap_nocache(res->start, resource_size(res));
-- if (mtu->channel.base == NULL) {
-+ base = ioremap_nocache(res->start, resource_size(res));
-+ if (base == NULL) {
- dev_err(&mtu->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
-- mtu->mapbase = mtu->channel.base + cfg->channel_offset;
-+ mtu->mapbase = base + cfg->channel_offset;
-
- /* get hold of clock */
- mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck");
-@@ -338,17 +340,28 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- if (ret < 0)
- goto err2;
-
-- ret = sh_mtu2_setup_channel(&mtu->channel, mtu);
-+ mtu->channels = kzalloc(sizeof(*mtu->channels), GFP_KERNEL);
-+ if (mtu->channels == NULL) {
-+ ret = -ENOMEM;
-+ goto err3;
-+ }
-+
-+ mtu->num_channels = 1;
-+
-+ mtu->channels[0].base = base;
-+
-+ ret = sh_mtu2_setup_channel(&mtu->channels[0], mtu);
- if (ret < 0)
- goto err3;
-
- return 0;
- err3:
-+ kfree(mtu->channels);
- clk_unprepare(mtu->clk);
- err2:
- clk_put(mtu->clk);
- err1:
-- iounmap(mtu->channel.base);
-+ iounmap(base);
- err0:
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0437-clocksource-sh_mtu2-Replace-hardcoded-register-value.patch b/patches.renesas/0437-clocksource-sh_mtu2-Replace-hardcoded-register-value.patch
deleted file mode 100644
index 1fe7a6703e908..0000000000000
--- a/patches.renesas/0437-clocksource-sh_mtu2-Replace-hardcoded-register-value.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From eef94c0cfa69f75bfc3bc7517a69cd3e8346e31d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 15:16:25 +0100
-Subject: clocksource: sh_mtu2: Replace hardcoded register values with macros
-
-Define symbolic macros for all used registers bits.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit f992c2410bd31b7c80ba8cc8b989d91b9cac3c30)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 98 ++++++++++++++++++++++++++++++++++++++++---
- 1 file changed, 92 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 45e1e85fcbeb..2cf004880746 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -67,6 +67,88 @@ static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);
- #define TCNT 5 /* channel register */
- #define TGR 6 /* channel register */
-
-+#define TCR_CCLR_NONE (0 << 5)
-+#define TCR_CCLR_TGRA (1 << 5)
-+#define TCR_CCLR_TGRB (2 << 5)
-+#define TCR_CCLR_SYNC (3 << 5)
-+#define TCR_CCLR_TGRC (5 << 5)
-+#define TCR_CCLR_TGRD (6 << 5)
-+#define TCR_CCLR_MASK (7 << 5)
-+#define TCR_CKEG_RISING (0 << 3)
-+#define TCR_CKEG_FALLING (1 << 3)
-+#define TCR_CKEG_BOTH (2 << 3)
-+#define TCR_CKEG_MASK (3 << 3)
-+/* Values 4 to 7 are channel-dependent */
-+#define TCR_TPSC_P1 (0 << 0)
-+#define TCR_TPSC_P4 (1 << 0)
-+#define TCR_TPSC_P16 (2 << 0)
-+#define TCR_TPSC_P64 (3 << 0)
-+#define TCR_TPSC_CH0_TCLKA (4 << 0)
-+#define TCR_TPSC_CH0_TCLKB (5 << 0)
-+#define TCR_TPSC_CH0_TCLKC (6 << 0)
-+#define TCR_TPSC_CH0_TCLKD (7 << 0)
-+#define TCR_TPSC_CH1_TCLKA (4 << 0)
-+#define TCR_TPSC_CH1_TCLKB (5 << 0)
-+#define TCR_TPSC_CH1_P256 (6 << 0)
-+#define TCR_TPSC_CH1_TCNT2 (7 << 0)
-+#define TCR_TPSC_CH2_TCLKA (4 << 0)
-+#define TCR_TPSC_CH2_TCLKB (5 << 0)
-+#define TCR_TPSC_CH2_TCLKC (6 << 0)
-+#define TCR_TPSC_CH2_P1024 (7 << 0)
-+#define TCR_TPSC_CH34_P256 (4 << 0)
-+#define TCR_TPSC_CH34_P1024 (5 << 0)
-+#define TCR_TPSC_CH34_TCLKA (6 << 0)
-+#define TCR_TPSC_CH34_TCLKB (7 << 0)
-+#define TCR_TPSC_MASK (7 << 0)
-+
-+#define TMDR_BFE (1 << 6)
-+#define TMDR_BFB (1 << 5)
-+#define TMDR_BFA (1 << 4)
-+#define TMDR_MD_NORMAL (0 << 0)
-+#define TMDR_MD_PWM_1 (2 << 0)
-+#define TMDR_MD_PWM_2 (3 << 0)
-+#define TMDR_MD_PHASE_1 (4 << 0)
-+#define TMDR_MD_PHASE_2 (5 << 0)
-+#define TMDR_MD_PHASE_3 (6 << 0)
-+#define TMDR_MD_PHASE_4 (7 << 0)
-+#define TMDR_MD_PWM_SYNC (8 << 0)
-+#define TMDR_MD_PWM_COMP_CREST (13 << 0)
-+#define TMDR_MD_PWM_COMP_TROUGH (14 << 0)
-+#define TMDR_MD_PWM_COMP_BOTH (15 << 0)
-+#define TMDR_MD_MASK (15 << 0)
-+
-+#define TIOC_IOCH(n) ((n) << 4)
-+#define TIOC_IOCL(n) ((n) << 0)
-+#define TIOR_OC_RETAIN (0 << 0)
-+#define TIOR_OC_0_CLEAR (1 << 0)
-+#define TIOR_OC_0_SET (2 << 0)
-+#define TIOR_OC_0_TOGGLE (3 << 0)
-+#define TIOR_OC_1_CLEAR (5 << 0)
-+#define TIOR_OC_1_SET (6 << 0)
-+#define TIOR_OC_1_TOGGLE (7 << 0)
-+#define TIOR_IC_RISING (8 << 0)
-+#define TIOR_IC_FALLING (9 << 0)
-+#define TIOR_IC_BOTH (10 << 0)
-+#define TIOR_IC_TCNT (12 << 0)
-+#define TIOR_MASK (15 << 0)
-+
-+#define TIER_TTGE (1 << 7)
-+#define TIER_TTGE2 (1 << 6)
-+#define TIER_TCIEU (1 << 5)
-+#define TIER_TCIEV (1 << 4)
-+#define TIER_TGIED (1 << 3)
-+#define TIER_TGIEC (1 << 2)
-+#define TIER_TGIEB (1 << 1)
-+#define TIER_TGIEA (1 << 0)
-+
-+#define TSR_TCFD (1 << 7)
-+#define TSR_TCFU (1 << 5)
-+#define TSR_TCFV (1 << 4)
-+#define TSR_TGFD (1 << 3)
-+#define TSR_TGFC (1 << 2)
-+#define TSR_TGFB (1 << 1)
-+#define TSR_TGFA (1 << 0)
-+
- static unsigned long mtu2_reg_offs[] = {
- [TCR] = 0,
- [TMDR] = 1,
-@@ -150,13 +232,17 @@ static int sh_mtu2_enable(struct sh_mtu2_channel *ch)
- rate = clk_get_rate(ch->mtu->clk) / 64;
- periodic = (rate + HZ/2) / HZ;
-
-- /* "Periodic Counter Operation" */
-- sh_mtu2_write(ch, TCR, 0x23); /* TGRA clear, divide clock by 64 */
-- sh_mtu2_write(ch, TIOR, 0);
-+ /*
-+ * "Periodic Counter Operation"
-+ * Clear on TGRA compare match, divide clock by 64.
-+ */
-+ sh_mtu2_write(ch, TCR, TCR_CCLR_TGRA | TCR_TPSC_P64);
-+ sh_mtu2_write(ch, TIOR, TIOC_IOCH(TIOR_OC_0_CLEAR) |
-+ TIOC_IOCL(TIOR_OC_0_CLEAR));
- sh_mtu2_write(ch, TGR, periodic);
- sh_mtu2_write(ch, TCNT, 0);
-- sh_mtu2_write(ch, TMDR, 0);
-- sh_mtu2_write(ch, TIER, 0x01);
-+ sh_mtu2_write(ch, TMDR, TMDR_MD_NORMAL);
-+ sh_mtu2_write(ch, TIER, TIER_TGIEA);
-
- /* enable channel */
- sh_mtu2_start_stop_ch(ch, 1);
-@@ -182,7 +268,7 @@ static irqreturn_t sh_mtu2_interrupt(int irq, void *dev_id)
-
- /* acknowledge interrupt */
- sh_mtu2_read(ch, TSR);
-- sh_mtu2_write(ch, TSR, 0xfe);
-+ sh_mtu2_write(ch, TSR, ~TSR_TGFA);
-
- /* notify clockevent layer */
- ch->ced.event_handler(&ch->ced);
---
-2.1.2
-
diff --git a/patches.renesas/0438-clocksource-sh_mtu2-Set-cpumask-to-cpu_possible_mask.patch b/patches.renesas/0438-clocksource-sh_mtu2-Set-cpumask-to-cpu_possible_mask.patch
deleted file mode 100644
index c1cc338289b05..0000000000000
--- a/patches.renesas/0438-clocksource-sh_mtu2-Set-cpumask-to-cpu_possible_mask.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From a398a3a470afb2ad9a76feeda04041cc501eb855 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 15:22:19 +0100
-Subject: clocksource: sh_mtu2: Set cpumask to cpu_possible_mask
-
-The MTU2 is not tied to CPU0, make it usable on any CPU.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 3cc950479891040366629247357512f1cc928da3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 2cf004880746..702ce6044793 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -331,7 +331,7 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->rating = rating;
-- ced->cpumask = cpumask_of(0);
-+ ced->cpumask = cpu_possible_mask;
- ced->set_mode = sh_mtu2_clock_event_mode;
- ced->suspend = sh_mtu2_clock_event_suspend;
- ced->resume = sh_mtu2_clock_event_resume;
---
-2.1.2
-
diff --git a/patches.renesas/0439-clocksource-sh_mtu2-Hardcode-MTU2-clock-event-rating.patch b/patches.renesas/0439-clocksource-sh_mtu2-Hardcode-MTU2-clock-event-rating.patch
deleted file mode 100644
index 54ded1f160e67..0000000000000
--- a/patches.renesas/0439-clocksource-sh_mtu2-Hardcode-MTU2-clock-event-rating.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 01c5cf2f181c5d3a2702cef1fdb778bcc95fd953 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 15:19:41 +0100
-Subject: clocksource: sh_mtu2: Hardcode MTU2 clock event rating to 200
-
-All boards use clock event ratings of 200 for the MTU2, hardcode it in
-the driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 207e21a9732a27f58843ccae1c9644f3a1636b66)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 702ce6044793..14cc7b6f703b 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -323,14 +323,14 @@ static void sh_mtu2_clock_event_resume(struct clock_event_device *ced)
- }
-
- static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
-- const char *name, unsigned long rating)
-+ const char *name)
- {
- struct clock_event_device *ced = &ch->ced;
- int ret;
-
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
-- ced->rating = rating;
-+ ced->rating = 200;
- ced->cpumask = cpu_possible_mask;
- ced->set_mode = sh_mtu2_clock_event_mode;
- ced->suspend = sh_mtu2_clock_event_suspend;
-@@ -351,10 +351,10 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- }
-
- static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name,
-- unsigned long clockevent_rating)
-+ bool clockevent)
- {
-- if (clockevent_rating)
-- sh_mtu2_register_clockevent(ch, name, clockevent_rating);
-+ if (clockevent)
-+ sh_mtu2_register_clockevent(ch, name);
-
- return 0;
- }
-@@ -375,7 +375,7 @@ static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch,
- }
-
- return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev),
-- cfg->clockevent_rating);
-+ cfg->clockevent_rating != 0);
- }
-
- static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
---
-2.1.2
-
diff --git a/patches.renesas/0440-clocksource-sh_mtu2-Add-support-for-multiple-channel.patch b/patches.renesas/0440-clocksource-sh_mtu2-Add-support-for-multiple-channel.patch
deleted file mode 100644
index 57970aac0845e..0000000000000
--- a/patches.renesas/0440-clocksource-sh_mtu2-Add-support-for-multiple-channel.patch
+++ /dev/null
@@ -1,318 +0,0 @@
-From e94bb1253790b369f39011c92011fca798d6f726 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 18:05:45 +0100
-Subject: clocksource: sh_mtu2: Add support for multiple channels per device
-
-MTU2 hardware devices can support multiple channels, with global
-registers and per-channel registers. The sh_mtu2 driver currently models
-the hardware with one Linux device per channel. This model makes it
-difficult to handle global registers in a clean way.
-
-Add support for a new model that uses one Linux device per timer with
-multiple channels per device. This requires changes to platform data,
-add new channel configuration fields.
-
-Support for the legacy model is kept and will be removed after all
-platforms switch to the new model.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit faf3f4f8c805f5f8a786ba544c94bf3e01838388)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 184 +++++++++++++++++++++++++++++-------------
- 1 file changed, 130 insertions(+), 54 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 14cc7b6f703b..7cc6d9429f81 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -54,6 +54,9 @@ struct sh_mtu2_device {
-
- struct sh_mtu2_channel *channels;
- unsigned int num_channels;
-+
-+ bool legacy;
-+ bool has_clockevent;
- };
-
- static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);
-@@ -163,8 +166,12 @@ static inline unsigned long sh_mtu2_read(struct sh_mtu2_channel *ch, int reg_nr)
- {
- unsigned long offs;
-
-- if (reg_nr == TSTR)
-- return ioread8(ch->mtu->mapbase);
-+ if (reg_nr == TSTR) {
-+ if (ch->mtu->legacy)
-+ return ioread8(ch->mtu->mapbase);
-+ else
-+ return ioread8(ch->mtu->mapbase + 0x280);
-+ }
-
- offs = mtu2_reg_offs[reg_nr];
-
-@@ -180,8 +187,10 @@ static inline void sh_mtu2_write(struct sh_mtu2_channel *ch, int reg_nr,
- unsigned long offs;
-
- if (reg_nr == TSTR) {
-- iowrite8(value, ch->mtu->mapbase);
-- return;
-+ if (ch->mtu->legacy)
-+ return iowrite8(value, ch->mtu->mapbase);
-+ else
-+ return iowrite8(value, ch->mtu->mapbase + 0x280);
- }
-
- offs = mtu2_reg_offs[reg_nr];
-@@ -353,109 +362,168 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name,
- bool clockevent)
- {
-- if (clockevent)
-+ if (clockevent) {
-+ ch->mtu->has_clockevent = true;
- sh_mtu2_register_clockevent(ch, name);
-+ }
-
- return 0;
- }
-
--static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch,
-+static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch, unsigned int index,
- struct sh_mtu2_device *mtu)
- {
-- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-+ static const unsigned int channel_offsets[] = {
-+ 0x300, 0x380, 0x000,
-+ };
-+ bool clockevent;
-
- ch->mtu = mtu;
-- ch->index = cfg->timer_bit;
-
-- ch->irq = platform_get_irq(mtu->pdev, 0);
-+ if (mtu->legacy) {
-+ struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-+
-+ clockevent = cfg->clockevent_rating != 0;
-+
-+ ch->irq = platform_get_irq(mtu->pdev, 0);
-+ ch->base = mtu->mapbase - cfg->channel_offset;
-+ ch->index = cfg->timer_bit;
-+ } else {
-+ char name[6];
-+
-+ clockevent = true;
-+
-+ sprintf(name, "tgi%ua", index);
-+ ch->irq = platform_get_irq_byname(mtu->pdev, name);
-+ ch->base = mtu->mapbase + channel_offsets[index];
-+ ch->index = index;
-+ }
-+
- if (ch->irq < 0) {
-+ /* Skip channels with no declared interrupt. */
-+ if (!mtu->legacy)
-+ return 0;
-+
- dev_err(&mtu->pdev->dev, "ch%u: failed to get irq\n",
- ch->index);
- return ch->irq;
- }
-
-- return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev),
-- cfg->clockevent_rating != 0);
-+ return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev), clockevent);
- }
-
--static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
-- struct platform_device *pdev)
-+static int sh_mtu2_map_memory(struct sh_mtu2_device *mtu)
- {
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
-- void __iomem *base;
-- int ret;
-- ret = -ENXIO;
--
-- mtu->pdev = pdev;
--
-- if (!cfg) {
-- dev_err(&mtu->pdev->dev, "missing platform data\n");
-- goto err0;
-- }
--
-- platform_set_drvdata(pdev, mtu);
-
- res = platform_get_resource(mtu->pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&mtu->pdev->dev, "failed to get I/O memory\n");
-- goto err0;
-+ return -ENXIO;
- }
-
-+ mtu->mapbase = ioremap_nocache(res->start, resource_size(res));
-+ if (mtu->mapbase == NULL)
-+ return -ENXIO;
-+
- /*
-- * Map memory, let base point to our channel and mapbase to the
-- * start/stop shared register.
-+ * In legacy platform device configuration (with one device per channel)
-+ * the resource points to the channel base address.
- */
-- base = ioremap_nocache(res->start, resource_size(res));
-- if (base == NULL) {
-- dev_err(&mtu->pdev->dev, "failed to remap I/O memory\n");
-- goto err0;
-+ if (mtu->legacy) {
-+ struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-+ mtu->mapbase += cfg->channel_offset;
-+ }
-+
-+ return 0;
-+}
-+
-+static void sh_mtu2_unmap_memory(struct sh_mtu2_device *mtu)
-+{
-+ if (mtu->legacy) {
-+ struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-+ mtu->mapbase -= cfg->channel_offset;
- }
-
-- mtu->mapbase = base + cfg->channel_offset;
-+ iounmap(mtu->mapbase);
-+}
-+
-+static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
-+ struct platform_device *pdev)
-+{
-+ struct sh_timer_config *cfg = pdev->dev.platform_data;
-+ const struct platform_device_id *id = pdev->id_entry;
-+ unsigned int i;
-+ int ret;
-+
-+ mtu->pdev = pdev;
-+ mtu->legacy = id->driver_data;
-+
-+ if (mtu->legacy && !cfg) {
-+ dev_err(&mtu->pdev->dev, "missing platform data\n");
-+ return -ENXIO;
-+ }
-
-- /* get hold of clock */
-+ /* Get hold of clock. */
- mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck");
- if (IS_ERR(mtu->clk)) {
- dev_err(&mtu->pdev->dev, "cannot get clock\n");
-- ret = PTR_ERR(mtu->clk);
-- goto err1;
-+ return PTR_ERR(mtu->clk);
- }
-
- ret = clk_prepare(mtu->clk);
- if (ret < 0)
-- goto err2;
-+ goto err_clk_put;
-
-- mtu->channels = kzalloc(sizeof(*mtu->channels), GFP_KERNEL);
-+ /* Map the memory resource. */
-+ ret = sh_mtu2_map_memory(mtu);
-+ if (ret < 0) {
-+ dev_err(&mtu->pdev->dev, "failed to remap I/O memory\n");
-+ goto err_clk_unprepare;
-+ }
-+
-+ /* Allocate and setup the channels. */
-+ if (mtu->legacy)
-+ mtu->num_channels = 1;
-+ else
-+ mtu->num_channels = 3;
-+
-+ mtu->channels = kzalloc(sizeof(*mtu->channels) * mtu->num_channels,
-+ GFP_KERNEL);
- if (mtu->channels == NULL) {
- ret = -ENOMEM;
-- goto err3;
-+ goto err_unmap;
- }
-
-- mtu->num_channels = 1;
--
-- mtu->channels[0].base = base;
-+ if (mtu->legacy) {
-+ ret = sh_mtu2_setup_channel(&mtu->channels[0], 0, mtu);
-+ if (ret < 0)
-+ goto err_unmap;
-+ } else {
-+ for (i = 0; i < mtu->num_channels; ++i) {
-+ ret = sh_mtu2_setup_channel(&mtu->channels[i], i, mtu);
-+ if (ret < 0)
-+ goto err_unmap;
-+ }
-+ }
-
-- ret = sh_mtu2_setup_channel(&mtu->channels[0], mtu);
-- if (ret < 0)
-- goto err3;
-+ platform_set_drvdata(pdev, mtu);
-
- return 0;
-- err3:
-+
-+err_unmap:
- kfree(mtu->channels);
-+ sh_mtu2_unmap_memory(mtu);
-+err_clk_unprepare:
- clk_unprepare(mtu->clk);
-- err2:
-+err_clk_put:
- clk_put(mtu->clk);
-- err1:
-- iounmap(base);
-- err0:
- return ret;
- }
-
- static int sh_mtu2_probe(struct platform_device *pdev)
- {
- struct sh_mtu2_device *mtu = platform_get_drvdata(pdev);
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
- int ret;
-
- if (!is_early_platform_device(pdev)) {
-@@ -484,7 +552,7 @@ static int sh_mtu2_probe(struct platform_device *pdev)
- return 0;
-
- out:
-- if (cfg->clockevent_rating)
-+ if (mtu->has_clockevent)
- pm_runtime_irq_safe(&pdev->dev);
- else
- pm_runtime_idle(&pdev->dev);
-@@ -497,12 +565,20 @@ static int sh_mtu2_remove(struct platform_device *pdev)
- return -EBUSY; /* cannot unregister clockevent */
- }
-
-+static const struct platform_device_id sh_mtu2_id_table[] = {
-+ { "sh_mtu2", 1 },
-+ { "sh-mtu2", 0 },
-+ { },
-+};
-+MODULE_DEVICE_TABLE(platform, sh_mtu2_id_table);
-+
- static struct platform_driver sh_mtu2_device_driver = {
- .probe = sh_mtu2_probe,
- .remove = sh_mtu2_remove,
- .driver = {
- .name = "sh_mtu2",
-- }
-+ },
-+ .id_table = sh_mtu2_id_table,
- };
-
- static int __init sh_mtu2_init(void)
---
-2.1.2
-
diff --git a/patches.renesas/0441-clocksource-sh_mtu2-Rename-clock-to-fck-in-the-non-l.patch b/patches.renesas/0441-clocksource-sh_mtu2-Rename-clock-to-fck-in-the-non-l.patch
deleted file mode 100644
index 447b6778be664..0000000000000
--- a/patches.renesas/0441-clocksource-sh_mtu2-Rename-clock-to-fck-in-the-non-l.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 0ff1145693a5ad05ab440085288305069a17d038 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 18:09:15 +0100
-Subject: clocksource: sh_mtu2: Rename clock to "fck" in the non-legacy case
-
-The sh_mtu2 driver gets the MTU2 functional clock using a connection ID
-of "mtu2_fck". While all SH SoCs create clock lookup entries with a NULL
-device ID and a "mtu2_fck" connection ID, the ARM SoCs use the device ID
-only with a NULL connection ID. This works on legacy platforms but will
-break on ARM with DT boot.
-
-Fix the situation by using a connection ID of "fck" in the non-legacy
-platform data case. Clock lookup entries will be renamed to use the
-device ID as well as the connection ID as platforms get moved to new
-platform data. The legacy code will eventually be dropped, leaving us
-with device ID based clock lookup, compatible with DT boot.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 6dc9693bb3997cb324a2ffb39deaa72081a9bd0d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 7cc6d9429f81..3a3785702422 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -465,7 +465,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- }
-
- /* Get hold of clock. */
-- mtu->clk = clk_get(&mtu->pdev->dev, "mtu2_fck");
-+ mtu->clk = clk_get(&mtu->pdev->dev, mtu->legacy ? "mtu2_fck" : "fck");
- if (IS_ERR(mtu->clk)) {
- dev_err(&mtu->pdev->dev, "cannot get clock\n");
- return PTR_ERR(mtu->clk);
---
-2.1.2
-
diff --git a/patches.renesas/0442-clocksource-sh_mtu2-Remove-FSF-mail-address-from-GPL.patch b/patches.renesas/0442-clocksource-sh_mtu2-Remove-FSF-mail-address-from-GPL.patch
deleted file mode 100644
index 0dcf2bed96aec..0000000000000
--- a/patches.renesas/0442-clocksource-sh_mtu2-Remove-FSF-mail-address-from-GPL.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From ec141a70af4cb7b1f4e242110f0e49057d5d7fe0 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 14:12:32 +0100
-Subject: clocksource: sh_mtu2: Remove FSF mail address from GPL notice
-
-Do not include the paragraph about writing to the Free Software
-Foundation's mailing address from the sample GPL notice. The FSF has
-changed addresses in the past, and may do so again. Linux already
-includes a copy of the GPL.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 24c8f71707087eb177b45f4a24faedaa0d8f0287)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 3a3785702422..510bd324c1a9 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -11,10 +11,6 @@
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- #include <linux/init.h>
---
-2.1.2
-
diff --git a/patches.renesas/0443-clocksource-sh_mtu2-Sort-headers-alphabetically.patch b/patches.renesas/0443-clocksource-sh_mtu2-Sort-headers-alphabetically.patch
deleted file mode 100644
index 3397c947c0fa8..0000000000000
--- a/patches.renesas/0443-clocksource-sh_mtu2-Sort-headers-alphabetically.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 68d8dee8004d6a2b0483ffa88aff759f48bcfbae Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 14:11:47 +0100
-Subject: clocksource: sh_mtu2: Sort headers alphabetically
-
-This helps locating duplicates and inserting new headers.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 346f5e76b3822a2530a03f33b00ee89dfc463326)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 510bd324c1a9..f2c1c36139e1 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -13,22 +13,22 @@
- * GNU General Public License for more details.
- */
-
-+#include <linux/clk.h>
-+#include <linux/clockchips.h>
-+#include <linux/delay.h>
-+#include <linux/err.h>
- #include <linux/init.h>
--#include <linux/platform_device.h>
--#include <linux/spinlock.h>
- #include <linux/interrupt.h>
--#include <linux/ioport.h>
--#include <linux/delay.h>
- #include <linux/io.h>
--#include <linux/clk.h>
-+#include <linux/ioport.h>
- #include <linux/irq.h>
--#include <linux/err.h>
--#include <linux/clockchips.h>
--#include <linux/sh_timer.h>
--#include <linux/slab.h>
- #include <linux/module.h>
-+#include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-+#include <linux/sh_timer.h>
-+#include <linux/slab.h>
-+#include <linux/spinlock.h>
-
- struct sh_mtu2_device;
-
---
-2.1.2
-
diff --git a/patches.renesas/0444-clocksource-sh_mtu2-Remove-unnecessary-OOM-messages.patch b/patches.renesas/0444-clocksource-sh_mtu2-Remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index 7e65496238987..0000000000000
--- a/patches.renesas/0444-clocksource-sh_mtu2-Remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 372684b38ca7a643d10579968fbd1ed767e24a2d Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Thu, 22 May 2014 14:05:07 +0200
-Subject: clocksource: sh_mtu2: Remove unnecessary OOM messages
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message.
-
-[dlezcano] : refreshed against latest modifications: kmalloc -> kzalloc
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-(cherry picked from commit c77a565b2966567b97d589e90a6b9ce725bb15b1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index f2c1c36139e1..188d4e092efc 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -533,10 +533,8 @@ static int sh_mtu2_probe(struct platform_device *pdev)
- }
-
- mtu = kzalloc(sizeof(*mtu), GFP_KERNEL);
-- if (mtu == NULL) {
-- dev_err(&pdev->dev, "failed to allocate driver data\n");
-+ if (mtu == NULL)
- return -ENOMEM;
-- }
-
- ret = sh_mtu2_setup(mtu, pdev);
- if (ret) {
---
-2.1.2
-
diff --git a/patches.renesas/0445-pinctrl-sh-pfc-r8a7791-Split-the-DU-sync-and-cde-dis.patch b/patches.renesas/0445-pinctrl-sh-pfc-r8a7791-Split-the-DU-sync-and-cde-dis.patch
deleted file mode 100644
index 08b228e9923bd..0000000000000
--- a/patches.renesas/0445-pinctrl-sh-pfc-r8a7791-Split-the-DU-sync-and-cde-dis.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 1e3e35c0af27cd424c24f329e822e5327be8f15d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 1 Apr 2014 12:59:09 +0200
-Subject: pinctrl: sh-pfc: r8a7791: Split the DU sync and cde/disp groups
-
-The DU parallel interface ODDF signal is optional, move it out of the
-HSYNC/VSYNC group into a group of its down. The CDE and DISP signals are
-independent, split them to two different groups.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit d10046e25c73e6150677b1b5360f20bb631181a7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 37 ++++++++++++++++++++++++++----------
- 1 file changed, 27 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 7868bf3a0f91..a823b5ba4fd8 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -1733,19 +1733,32 @@ static const unsigned int du_clk_out_1_mux[] = {
- DU1_DOTCLKOUT1_MARK
- };
- static const unsigned int du_sync_pins[] = {
-- /* EXVSYNC/VSYNC, EXHSYNC/HSYNC, EXDISP/EXODDF/EXCDE */
-- RCAR_GP_PIN(3, 29), RCAR_GP_PIN(3, 28), RCAR_GP_PIN(3, 27),
-+ /* EXVSYNC/VSYNC, EXHSYNC/HSYNC */
-+ RCAR_GP_PIN(3, 28), RCAR_GP_PIN(3, 27),
- };
- static const unsigned int du_sync_mux[] = {
-- DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK,
- DU1_EXVSYNC_DU1_VSYNC_MARK, DU1_EXHSYNC_DU1_HSYNC_MARK
- };
--static const unsigned int du_cde_disp_pins[] = {
-- /* CDE DISP */
-- RCAR_GP_PIN(3, 31), RCAR_GP_PIN(3, 30),
-+static const unsigned int du_oddf_pins[] = {
-+ /* EXDISP/EXODDF/EXCDE */
-+ RCAR_GP_PIN(3, 29),
-+};
-+static const unsigned int du_oddf_mux[] = {
-+ DU1_EXODDF_DU1_ODDF_DISP_CDE_MARK,
-+};
-+static const unsigned int du_cde_pins[] = {
-+ /* CDE */
-+ RCAR_GP_PIN(3, 31),
-+};
-+static const unsigned int du_cde_mux[] = {
-+ DU1_CDE_MARK,
-+};
-+static const unsigned int du_disp_pins[] = {
-+ /* DISP */
-+ RCAR_GP_PIN(3, 30),
- };
--static const unsigned int du_cde_disp_mux[] = {
-- DU1_CDE_MARK, DU1_DISP_MARK
-+static const unsigned int du_disp_mux[] = {
-+ DU1_DISP_MARK,
- };
- static const unsigned int du0_clk_in_pins[] = {
- /* CLKIN */
-@@ -3555,7 +3568,9 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(du_clk_out_0),
- SH_PFC_PIN_GROUP(du_clk_out_1),
- SH_PFC_PIN_GROUP(du_sync),
-- SH_PFC_PIN_GROUP(du_cde_disp),
-+ SH_PFC_PIN_GROUP(du_oddf),
-+ SH_PFC_PIN_GROUP(du_cde),
-+ SH_PFC_PIN_GROUP(du_disp),
- SH_PFC_PIN_GROUP(du0_clk_in),
- SH_PFC_PIN_GROUP(du1_clk_in),
- SH_PFC_PIN_GROUP(du1_clk_in_b),
-@@ -3804,7 +3819,9 @@ static const char * const du_groups[] = {
- "du_clk_out_0",
- "du_clk_out_1",
- "du_sync",
-- "du_cde_disp",
-+ "du_oddf",
-+ "du_cde",
-+ "du_disp",
- };
-
- static const char * const du0_groups[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0446-sh-pfc-r8a7791-Add-SSI-pin-support.patch b/patches.renesas/0446-sh-pfc-r8a7791-Add-SSI-pin-support.patch
deleted file mode 100644
index 9104a8a970e57..0000000000000
--- a/patches.renesas/0446-sh-pfc-r8a7791-Add-SSI-pin-support.patch
+++ /dev/null
@@ -1,364 +0,0 @@
-From 9a2904879742b9e68416981ed5b4bb88977124a1 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:23:35 -0700
-Subject: sh-pfc: r8a7791: Add SSI pin support
-
-Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit b664cd1f020211d8e4480c2937b82fe513a9c757)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 314 +++++++++++++++++++++++++++++++++++
- 1 file changed, 314 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index a823b5ba4fd8..c1c6dfec3f8e 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -3259,6 +3259,260 @@ static const unsigned int sdhi2_wp_pins[] = {
- static const unsigned int sdhi2_wp_mux[] = {
- SD2_WP_MARK,
- };
-+
-+/* - SSI -------------------------------------------------------------------- */
-+static const unsigned int ssi0_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 2),
-+};
-+
-+static const unsigned int ssi0_data_mux[] = {
-+ SSI_SDATA0_MARK,
-+};
-+
-+static const unsigned int ssi0_data_b_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(3, 4),
-+};
-+
-+static const unsigned int ssi0_data_b_mux[] = {
-+ SSI_SDATA0_B_MARK,
-+};
-+
-+static const unsigned int ssi0129_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
-+};
-+
-+static const unsigned int ssi0129_ctrl_mux[] = {
-+ SSI_SCK0129_MARK, SSI_WS0129_MARK,
-+};
-+
-+static const unsigned int ssi0129_ctrl_b_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(3, 2), RCAR_GP_PIN(3, 3),
-+};
-+
-+static const unsigned int ssi0129_ctrl_b_mux[] = {
-+ SSI_SCK0129_B_MARK, SSI_WS0129_B_MARK,
-+};
-+
-+static const unsigned int ssi1_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 5),
-+};
-+
-+static const unsigned int ssi1_data_mux[] = {
-+ SSI_SDATA1_MARK,
-+};
-+
-+static const unsigned int ssi1_data_b_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(3, 7),
-+};
-+
-+static const unsigned int ssi1_data_b_mux[] = {
-+ SSI_SDATA1_B_MARK,
-+};
-+
-+static const unsigned int ssi1_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 3), RCAR_GP_PIN(2, 4),
-+};
-+
-+static const unsigned int ssi1_ctrl_mux[] = {
-+ SSI_SCK1_MARK, SSI_WS1_MARK,
-+};
-+
-+static const unsigned int ssi1_ctrl_b_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(3, 5), RCAR_GP_PIN(3, 6),
-+};
-+
-+static const unsigned int ssi1_ctrl_b_mux[] = {
-+ SSI_SCK1_B_MARK, SSI_WS1_B_MARK,
-+};
-+
-+static const unsigned int ssi2_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 8),
-+};
-+
-+static const unsigned int ssi2_data_mux[] = {
-+ SSI_SDATA2_MARK,
-+};
-+
-+static const unsigned int ssi2_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 6), RCAR_GP_PIN(2, 7),
-+};
-+
-+static const unsigned int ssi2_ctrl_mux[] = {
-+ SSI_SCK2_MARK, SSI_WS2_MARK,
-+};
-+
-+static const unsigned int ssi3_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 11),
-+};
-+
-+static const unsigned int ssi3_data_mux[] = {
-+ SSI_SDATA3_MARK,
-+};
-+
-+static const unsigned int ssi34_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 9), RCAR_GP_PIN(2, 10),
-+};
-+
-+static const unsigned int ssi34_ctrl_mux[] = {
-+ SSI_SCK34_MARK, SSI_WS34_MARK,
-+};
-+
-+static const unsigned int ssi4_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 14),
-+};
-+
-+static const unsigned int ssi4_data_mux[] = {
-+ SSI_SDATA4_MARK,
-+};
-+
-+static const unsigned int ssi4_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 12), RCAR_GP_PIN(2, 13),
-+};
-+
-+static const unsigned int ssi4_ctrl_mux[] = {
-+ SSI_SCK4_MARK, SSI_WS4_MARK,
-+};
-+
-+static const unsigned int ssi5_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 17),
-+};
-+
-+static const unsigned int ssi5_data_mux[] = {
-+ SSI_SDATA5_MARK,
-+};
-+
-+static const unsigned int ssi5_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 15), RCAR_GP_PIN(2, 16),
-+};
-+
-+static const unsigned int ssi5_ctrl_mux[] = {
-+ SSI_SCK5_MARK, SSI_WS5_MARK,
-+};
-+
-+static const unsigned int ssi6_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 20),
-+};
-+
-+static const unsigned int ssi6_data_mux[] = {
-+ SSI_SDATA6_MARK,
-+};
-+
-+static const unsigned int ssi6_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
-+};
-+
-+static const unsigned int ssi6_ctrl_mux[] = {
-+ SSI_SCK6_MARK, SSI_WS6_MARK,
-+};
-+
-+static const unsigned int ssi7_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 23),
-+};
-+
-+static const unsigned int ssi7_data_mux[] = {
-+ SSI_SDATA7_MARK,
-+};
-+
-+static const unsigned int ssi7_data_b_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(3, 12),
-+};
-+
-+static const unsigned int ssi7_data_b_mux[] = {
-+ SSI_SDATA7_B_MARK,
-+};
-+
-+static const unsigned int ssi78_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 21), RCAR_GP_PIN(2, 22),
-+};
-+
-+static const unsigned int ssi78_ctrl_mux[] = {
-+ SSI_SCK78_MARK, SSI_WS78_MARK,
-+};
-+
-+static const unsigned int ssi78_ctrl_b_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(3, 10), RCAR_GP_PIN(3, 11),
-+};
-+
-+static const unsigned int ssi78_ctrl_b_mux[] = {
-+ SSI_SCK78_B_MARK, SSI_WS78_B_MARK,
-+};
-+
-+static const unsigned int ssi8_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 24),
-+};
-+
-+static const unsigned int ssi8_data_mux[] = {
-+ SSI_SDATA8_MARK,
-+};
-+
-+static const unsigned int ssi8_data_b_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(3, 13),
-+};
-+
-+static const unsigned int ssi8_data_b_mux[] = {
-+ SSI_SDATA8_B_MARK,
-+};
-+
-+static const unsigned int ssi9_data_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(2, 27),
-+};
-+
-+static const unsigned int ssi9_data_mux[] = {
-+ SSI_SDATA9_MARK,
-+};
-+
-+static const unsigned int ssi9_data_b_pins[] = {
-+ /* SDATA */
-+ RCAR_GP_PIN(3, 18),
-+};
-+
-+static const unsigned int ssi9_data_b_mux[] = {
-+ SSI_SDATA9_B_MARK,
-+};
-+
-+static const unsigned int ssi9_ctrl_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(2, 25), RCAR_GP_PIN(2, 26),
-+};
-+
-+static const unsigned int ssi9_ctrl_mux[] = {
-+ SSI_SCK9_MARK, SSI_WS9_MARK,
-+};
-+
-+static const unsigned int ssi9_ctrl_b_pins[] = {
-+ /* SCK, WS */
-+ RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
-+};
-+
-+static const unsigned int ssi9_ctrl_b_mux[] = {
-+ SSI_SCK9_B_MARK, SSI_WS9_B_MARK,
-+};
-+
- /* - USB0 ------------------------------------------------------------------- */
- static const unsigned int usb0_pins[] = {
- RCAR_GP_PIN(7, 23), /* PWEN */
-@@ -3777,6 +4031,34 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(sdhi2_ctrl),
- SH_PFC_PIN_GROUP(sdhi2_cd),
- SH_PFC_PIN_GROUP(sdhi2_wp),
-+ SH_PFC_PIN_GROUP(ssi0_data),
-+ SH_PFC_PIN_GROUP(ssi0_data_b),
-+ SH_PFC_PIN_GROUP(ssi0129_ctrl),
-+ SH_PFC_PIN_GROUP(ssi0129_ctrl_b),
-+ SH_PFC_PIN_GROUP(ssi1_data),
-+ SH_PFC_PIN_GROUP(ssi1_data_b),
-+ SH_PFC_PIN_GROUP(ssi1_ctrl),
-+ SH_PFC_PIN_GROUP(ssi1_ctrl_b),
-+ SH_PFC_PIN_GROUP(ssi2_data),
-+ SH_PFC_PIN_GROUP(ssi2_ctrl),
-+ SH_PFC_PIN_GROUP(ssi3_data),
-+ SH_PFC_PIN_GROUP(ssi34_ctrl),
-+ SH_PFC_PIN_GROUP(ssi4_data),
-+ SH_PFC_PIN_GROUP(ssi4_ctrl),
-+ SH_PFC_PIN_GROUP(ssi5_data),
-+ SH_PFC_PIN_GROUP(ssi5_ctrl),
-+ SH_PFC_PIN_GROUP(ssi6_data),
-+ SH_PFC_PIN_GROUP(ssi6_ctrl),
-+ SH_PFC_PIN_GROUP(ssi7_data),
-+ SH_PFC_PIN_GROUP(ssi7_data_b),
-+ SH_PFC_PIN_GROUP(ssi78_ctrl),
-+ SH_PFC_PIN_GROUP(ssi78_ctrl_b),
-+ SH_PFC_PIN_GROUP(ssi8_data),
-+ SH_PFC_PIN_GROUP(ssi8_data_b),
-+ SH_PFC_PIN_GROUP(ssi9_data),
-+ SH_PFC_PIN_GROUP(ssi9_data_b),
-+ SH_PFC_PIN_GROUP(ssi9_ctrl),
-+ SH_PFC_PIN_GROUP(ssi9_ctrl_b),
- SH_PFC_PIN_GROUP(usb0),
- SH_PFC_PIN_GROUP(usb1),
- VIN_DATA_PIN_GROUP(vin0_data, 24),
-@@ -4120,6 +4402,37 @@ static const char * const sdhi2_groups[] = {
- "sdhi2_wp",
- };
-
-+static const char * const ssi_groups[] = {
-+ "ssi0_data",
-+ "ssi0_data_b",
-+ "ssi0129_ctrl",
-+ "ssi0129_ctrl_b",
-+ "ssi1_data",
-+ "ssi1_data_b",
-+ "ssi1_ctrl",
-+ "ssi1_ctrl_b",
-+ "ssi2_data",
-+ "ssi2_ctrl",
-+ "ssi3_data",
-+ "ssi34_ctrl",
-+ "ssi4_data",
-+ "ssi4_ctrl",
-+ "ssi5_data",
-+ "ssi5_ctrl",
-+ "ssi6_data",
-+ "ssi6_ctrl",
-+ "ssi7_data",
-+ "ssi7_data_b",
-+ "ssi78_ctrl",
-+ "ssi78_ctrl_b",
-+ "ssi8_data",
-+ "ssi8_data_b",
-+ "ssi9_data",
-+ "ssi9_data_b",
-+ "ssi9_ctrl",
-+ "ssi9_ctrl_b",
-+};
-+
- static const char * const usb0_groups[] = {
- "usb0",
- };
-@@ -4204,6 +4517,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(sdhi0),
- SH_PFC_FUNCTION(sdhi1),
- SH_PFC_FUNCTION(sdhi2),
-+ SH_PFC_FUNCTION(ssi),
- SH_PFC_FUNCTION(usb0),
- SH_PFC_FUNCTION(usb1),
- SH_PFC_FUNCTION(vin0),
---
-2.1.2
-
diff --git a/patches.renesas/0447-sh-pfc-r8a7791-Add-Audio-pin-support.patch b/patches.renesas/0447-sh-pfc-r8a7791-Add-Audio-pin-support.patch
deleted file mode 100644
index b90cb769369a5..0000000000000
--- a/patches.renesas/0447-sh-pfc-r8a7791-Add-Audio-pin-support.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 809f30fc07b5882aa87964f899dad9255a902422 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:24:04 -0700
-Subject: sh-pfc: r8a7791: Add Audio pin support
-
-Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit c57a05b0eb0ee0205b34f2694b035afc75fa71e4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 61 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 61 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index c1c6dfec3f8e..2e688dc4a3c8 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -1680,6 +1680,53 @@ static const struct sh_pfc_pin pinmux_pins[] = {
- PINMUX_GPIO_GP_ALL(),
- };
-
-+/* - Audio Clock ------------------------------------------------------------ */
-+static const unsigned int audio_clk_a_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(2, 28),
-+};
-+
-+static const unsigned int audio_clk_a_mux[] = {
-+ AUDIO_CLKA_MARK,
-+};
-+
-+static const unsigned int audio_clk_b_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(2, 29),
-+};
-+
-+static const unsigned int audio_clk_b_mux[] = {
-+ AUDIO_CLKB_MARK,
-+};
-+
-+static const unsigned int audio_clk_b_b_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(7, 20),
-+};
-+
-+static const unsigned int audio_clk_b_b_mux[] = {
-+ AUDIO_CLKB_B_MARK,
-+};
-+
-+static const unsigned int audio_clk_c_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(2, 30),
-+};
-+
-+static const unsigned int audio_clk_c_mux[] = {
-+ AUDIO_CLKC_MARK,
-+};
-+
-+static const unsigned int audio_clkout_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(2, 31),
-+};
-+
-+static const unsigned int audio_clkout_mux[] = {
-+ AUDIO_CLKOUT_MARK,
-+};
-+
-+
- /* - DU --------------------------------------------------------------------- */
- static const unsigned int du_rgb666_pins[] = {
- /* R[7:2], G[7:2], B[7:2] */
-@@ -3817,6 +3864,11 @@ static const unsigned int vin2_clk_mux[] = {
- };
-
- static const struct sh_pfc_pin_group pinmux_groups[] = {
-+ SH_PFC_PIN_GROUP(audio_clk_a),
-+ SH_PFC_PIN_GROUP(audio_clk_b),
-+ SH_PFC_PIN_GROUP(audio_clk_b_b),
-+ SH_PFC_PIN_GROUP(audio_clk_c),
-+ SH_PFC_PIN_GROUP(audio_clkout),
- SH_PFC_PIN_GROUP(du_rgb666),
- SH_PFC_PIN_GROUP(du_rgb888),
- SH_PFC_PIN_GROUP(du_clk_out_0),
-@@ -4095,6 +4147,14 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(vin2_clk),
- };
-
-+static const char * const audio_clk_groups[] = {
-+ "audio_clk_a",
-+ "audio_clk_b",
-+ "audio_clk_b_b",
-+ "audio_clk_c",
-+ "audio_clkout",
-+};
-+
- static const char * const du_groups[] = {
- "du_rgb666",
- "du_rgb888",
-@@ -4482,6 +4542,7 @@ static const char * const vin2_groups[] = {
- };
-
- static const struct sh_pfc_function pinmux_functions[] = {
-+ SH_PFC_FUNCTION(audio_clk),
- SH_PFC_FUNCTION(du),
- SH_PFC_FUNCTION(du0),
- SH_PFC_FUNCTION(du1),
---
-2.1.2
-
diff --git a/patches.renesas/0448-pinctrl-pfc-r8a7790-add-i2c0-muxing.patch b/patches.renesas/0448-pinctrl-pfc-r8a7790-add-i2c0-muxing.patch
deleted file mode 100644
index a47eebf0b0951..0000000000000
--- a/patches.renesas/0448-pinctrl-pfc-r8a7790-add-i2c0-muxing.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 4644433a2dc9cf2bc23180d467b7f9b3163db292 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 25 Mar 2014 19:56:25 +0100
-Subject: pinctrl: pfc: r8a7790: add i2c0 muxing
-
-Add the muxing for the last missing i2c rcar core. Fix the sorting for
-SH_PFC_PIN_NAMED while we are here.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 35a493de0daf4955b6d15d488b3f8754d4637a04)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 22 +++++++++++++++++++++-
- 1 file changed, 21 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-index f5cd3f961808..88b91cd47a87 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-@@ -782,6 +782,7 @@ enum {
- USB1_PWEN_MARK, AUDIO_CLKOUT_D_MARK, USB1_OVC_MARK,
- TCLK1_B_MARK,
-
-+ I2C0_SCL_MARK, I2C0_SDA_MARK,
- I2C3_SCL_MARK, I2C3_SDA_MARK,
- PINMUX_MARK_END,
- };
-@@ -1722,6 +1723,9 @@ static const u16 pinmux_data[] = {
- PINMUX_IPSR_DATA(IP16_7, USB1_OVC),
- PINMUX_IPSR_MODSEL_DATA(IP16_7, TCLK1_B, SEL_TMU1_1),
-
-+ PINMUX_DATA(I2C0_SCL_MARK, FN_SEL_IIC0_1),
-+ PINMUX_DATA(I2C0_SDA_MARK, FN_SEL_IIC0_1),
-+
- PINMUX_DATA(I2C3_SCL_MARK, FN_SEL_IICDVFS_1),
- PINMUX_DATA(I2C3_SDA_MARK, FN_SEL_IICDVFS_1),
- };
-@@ -1735,8 +1739,10 @@ static const struct sh_pfc_pin pinmux_pins[] = {
- PINMUX_GPIO_GP_ALL(),
-
- /* Pins not associated with a GPIO port */
-- SH_PFC_PIN_NAMED(ROW_GROUP_A('J'), 15, AJ15),
-+ SH_PFC_PIN_NAMED(ROW_GROUP_A('F'), 15, AF15),
-+ SH_PFC_PIN_NAMED(ROW_GROUP_A('G'), 15, AG15),
- SH_PFC_PIN_NAMED(ROW_GROUP_A('H'), 15, AH15),
-+ SH_PFC_PIN_NAMED(ROW_GROUP_A('J'), 15, AJ15),
- };
-
- /* - AUDIO CLOCK ------------------------------------------------------------ */
-@@ -2054,6 +2060,14 @@ static const unsigned int hscif1_ctrl_b_pins[] = {
- static const unsigned int hscif1_ctrl_b_mux[] = {
- HRTS1_N_B_MARK, HCTS1_N_B_MARK,
- };
-+/* - I2C0 ------------------------------------------------------------------- */
-+static const unsigned int i2c0_pins[] = {
-+ /* SCL, SDA */
-+ PIN_A_NUMBER('G', 15), PIN_A_NUMBER('F', 15),
-+};
-+static const unsigned int i2c0_mux[] = {
-+ I2C0_SCL_MARK, I2C0_SDA_MARK,
-+};
- /* - I2C1 ------------------------------------------------------------------- */
- static const unsigned int i2c1_pins[] = {
- /* SCL, SDA */
-@@ -3757,6 +3771,7 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(hscif1_data_b),
- SH_PFC_PIN_GROUP(hscif1_clk_b),
- SH_PFC_PIN_GROUP(hscif1_ctrl_b),
-+ SH_PFC_PIN_GROUP(i2c0),
- SH_PFC_PIN_GROUP(i2c1),
- SH_PFC_PIN_GROUP(i2c1_b),
- SH_PFC_PIN_GROUP(i2c1_c),
-@@ -4044,6 +4059,10 @@ static const char * const hscif1_groups[] = {
- "hscif1_ctrl_b",
- };
-
-+static const char * const i2c0_groups[] = {
-+ "i2c0",
-+};
-+
- static const char * const i2c1_groups[] = {
- "i2c1",
- "i2c1_b",
-@@ -4373,6 +4392,7 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(eth),
- SH_PFC_FUNCTION(hscif0),
- SH_PFC_FUNCTION(hscif1),
-+ SH_PFC_FUNCTION(i2c0),
- SH_PFC_FUNCTION(i2c1),
- SH_PFC_FUNCTION(i2c2),
- SH_PFC_FUNCTION(i2c3),
---
-2.1.2
-
diff --git a/patches.renesas/0449-pinctrl-pfc-r8a7790-add-mux-data-for-IIC-B-cores.patch b/patches.renesas/0449-pinctrl-pfc-r8a7790-add-mux-data-for-IIC-B-cores.patch
deleted file mode 100644
index c98f78ee90564..0000000000000
--- a/patches.renesas/0449-pinctrl-pfc-r8a7790-add-mux-data-for-IIC-B-cores.patch
+++ /dev/null
@@ -1,184 +0,0 @@
-From f058260ddce247b77c28b5b5f16c5db8bf75a9e5 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 25 Mar 2014 19:56:26 +0100
-Subject: pinctrl: pfc: r8a7790: add mux data for IIC(B) cores
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit a16b81dcbfc5889c37dac5f8e836136e4740fc18)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7790.c | 118 ++++++++++++++++++++++++++++++++++-
- 1 file changed, 116 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-index 88b91cd47a87..9a179c94b4dc 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7790.c
-@@ -782,8 +782,8 @@ enum {
- USB1_PWEN_MARK, AUDIO_CLKOUT_D_MARK, USB1_OVC_MARK,
- TCLK1_B_MARK,
-
-- I2C0_SCL_MARK, I2C0_SDA_MARK,
-- I2C3_SCL_MARK, I2C3_SDA_MARK,
-+ IIC0_SCL_MARK, IIC0_SDA_MARK, I2C0_SCL_MARK, I2C0_SDA_MARK,
-+ IIC3_SCL_MARK, IIC3_SDA_MARK, I2C3_SCL_MARK, I2C3_SDA_MARK,
- PINMUX_MARK_END,
- };
-
-@@ -1723,9 +1723,13 @@ static const u16 pinmux_data[] = {
- PINMUX_IPSR_DATA(IP16_7, USB1_OVC),
- PINMUX_IPSR_MODSEL_DATA(IP16_7, TCLK1_B, SEL_TMU1_1),
-
-+ PINMUX_DATA(IIC0_SCL_MARK, FN_SEL_IIC0_0),
-+ PINMUX_DATA(IIC0_SDA_MARK, FN_SEL_IIC0_0),
- PINMUX_DATA(I2C0_SCL_MARK, FN_SEL_IIC0_1),
- PINMUX_DATA(I2C0_SDA_MARK, FN_SEL_IIC0_1),
-
-+ PINMUX_DATA(IIC3_SCL_MARK, FN_SEL_IICDVFS_0),
-+ PINMUX_DATA(IIC3_SDA_MARK, FN_SEL_IICDVFS_0),
- PINMUX_DATA(I2C3_SCL_MARK, FN_SEL_IICDVFS_1),
- PINMUX_DATA(I2C3_SDA_MARK, FN_SEL_IICDVFS_1),
- };
-@@ -2134,6 +2138,80 @@ static const unsigned int i2c3_pins[] = {
- static const unsigned int i2c3_mux[] = {
- I2C3_SCL_MARK, I2C3_SDA_MARK,
- };
-+/* - IIC0 (I2C4) ------------------------------------------------------------ */
-+static const unsigned int iic0_pins[] = {
-+ /* SCL, SDA */
-+ PIN_A_NUMBER('G', 15), PIN_A_NUMBER('F', 15),
-+};
-+static const unsigned int iic0_mux[] = {
-+ IIC0_SCL_MARK, IIC0_SDA_MARK,
-+};
-+/* - IIC1 (I2C5) ------------------------------------------------------------ */
-+static const unsigned int iic1_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(1, 16), RCAR_GP_PIN(1, 17),
-+};
-+static const unsigned int iic1_mux[] = {
-+ IIC1_SCL_MARK, IIC1_SDA_MARK,
-+};
-+static const unsigned int iic1_b_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(3, 6), RCAR_GP_PIN(3, 7),
-+};
-+static const unsigned int iic1_b_mux[] = {
-+ IIC1_SCL_B_MARK, IIC1_SDA_B_MARK,
-+};
-+static const unsigned int iic1_c_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(4, 30), RCAR_GP_PIN(4, 27),
-+};
-+static const unsigned int iic1_c_mux[] = {
-+ IIC1_SCL_C_MARK, IIC1_SDA_C_MARK,
-+};
-+/* - IIC2 (I2C6) ------------------------------------------------------------ */
-+static const unsigned int iic2_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(5, 5), RCAR_GP_PIN(5, 6),
-+};
-+static const unsigned int iic2_mux[] = {
-+ IIC2_SCL_MARK, IIC2_SDA_MARK,
-+};
-+static const unsigned int iic2_b_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(4, 0), RCAR_GP_PIN(4, 1),
-+};
-+static const unsigned int iic2_b_mux[] = {
-+ IIC2_SCL_B_MARK, IIC2_SDA_B_MARK,
-+};
-+static const unsigned int iic2_c_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(0, 6), RCAR_GP_PIN(0, 7),
-+};
-+static const unsigned int iic2_c_mux[] = {
-+ IIC2_SCL_C_MARK, IIC2_SDA_C_MARK,
-+};
-+static const unsigned int iic2_d_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 15),
-+};
-+static const unsigned int iic2_d_mux[] = {
-+ IIC2_SCL_D_MARK, IIC2_SDA_D_MARK,
-+};
-+static const unsigned int iic2_e_pins[] = {
-+ /* SCL, SDA */
-+ RCAR_GP_PIN(2, 18), RCAR_GP_PIN(2, 19),
-+};
-+static const unsigned int iic2_e_mux[] = {
-+ IIC2_SCL_E_MARK, IIC2_SDA_E_MARK,
-+};
-+/* - IIC3 (I2C7) ------------------------------------------------------------ */
-+static const unsigned int iic3_pins[] = {
-+/* SCL, SDA */
-+ PIN_A_NUMBER('J', 15), PIN_A_NUMBER('H', 15),
-+};
-+static const unsigned int iic3_mux[] = {
-+ IIC3_SCL_MARK, IIC3_SDA_MARK,
-+};
- /* - INTC ------------------------------------------------------------------- */
- static const unsigned int intc_irq0_pins[] = {
- /* IRQ */
-@@ -3781,6 +3859,16 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(i2c2_d),
- SH_PFC_PIN_GROUP(i2c2_e),
- SH_PFC_PIN_GROUP(i2c3),
-+ SH_PFC_PIN_GROUP(iic0),
-+ SH_PFC_PIN_GROUP(iic1),
-+ SH_PFC_PIN_GROUP(iic1_b),
-+ SH_PFC_PIN_GROUP(iic1_c),
-+ SH_PFC_PIN_GROUP(iic2),
-+ SH_PFC_PIN_GROUP(iic2_b),
-+ SH_PFC_PIN_GROUP(iic2_c),
-+ SH_PFC_PIN_GROUP(iic2_d),
-+ SH_PFC_PIN_GROUP(iic2_e),
-+ SH_PFC_PIN_GROUP(iic3),
- SH_PFC_PIN_GROUP(intc_irq0),
- SH_PFC_PIN_GROUP(intc_irq1),
- SH_PFC_PIN_GROUP(intc_irq2),
-@@ -4081,6 +4169,28 @@ static const char * const i2c3_groups[] = {
- "i2c3",
- };
-
-+static const char * const iic0_groups[] = {
-+ "iic0",
-+};
-+
-+static const char * const iic1_groups[] = {
-+ "iic1",
-+ "iic1_b",
-+ "iic1_c",
-+};
-+
-+static const char * const iic2_groups[] = {
-+ "iic2",
-+ "iic2_b",
-+ "iic2_c",
-+ "iic2_d",
-+ "iic2_e",
-+};
-+
-+static const char * const iic3_groups[] = {
-+ "iic3",
-+};
-+
- static const char * const intc_groups[] = {
- "intc_irq0",
- "intc_irq1",
-@@ -4396,6 +4506,10 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(i2c1),
- SH_PFC_FUNCTION(i2c2),
- SH_PFC_FUNCTION(i2c3),
-+ SH_PFC_FUNCTION(iic0),
-+ SH_PFC_FUNCTION(iic1),
-+ SH_PFC_FUNCTION(iic2),
-+ SH_PFC_FUNCTION(iic3),
- SH_PFC_FUNCTION(intc),
- SH_PFC_FUNCTION(mmc0),
- SH_PFC_FUNCTION(mmc1),
---
-2.1.2
-
diff --git a/patches.renesas/0450-pinctrl-sh-pfc-Don-t-set-the-pinmux_irq-irq-field-fo.patch b/patches.renesas/0450-pinctrl-sh-pfc-Don-t-set-the-pinmux_irq-irq-field-fo.patch
deleted file mode 100644
index 3b052dc73ce2d..0000000000000
--- a/patches.renesas/0450-pinctrl-sh-pfc-Don-t-set-the-pinmux_irq-irq-field-fo.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 6a01819234d02e985297cfc6d5536a93d7b0300f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 13 May 2014 13:37:46 +0200
-Subject: pinctrl: sh-pfc: Don't set the pinmux_irq irq field for multiplatform
-
-In the multiplatform kernel case the IRQs associated with the PFC GPIOs
-are specified through DT. The pinmux_irq irq field is thus ignored by
-the code, and doesn't need to be set.
-
-This will allow removing the mach/irq.h include from pfc-*.c files that
-was required for the irq_pin() macro used to initialize the irq field.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 0e26e8dfb9dddb0559fb7cd7b53a8b497a8d4121)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/sh_pfc.h | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/sh_pfc.h b/drivers/pinctrl/sh-pfc/sh_pfc.h
-index ab8fd258d9ed..d482c40b012a 100644
---- a/drivers/pinctrl/sh-pfc/sh_pfc.h
-+++ b/drivers/pinctrl/sh-pfc/sh_pfc.h
-@@ -98,8 +98,13 @@ struct pinmux_irq {
- const short *gpios;
- };
-
-+#ifdef CONFIG_ARCH_MULTIPLATFORM
-+#define PINMUX_IRQ(irq_nr, ids...) \
-+ { .gpios = (const short []) { ids, -1 } }
-+#else
- #define PINMUX_IRQ(irq_nr, ids...) \
- { .irq = irq_nr, .gpios = (const short []) { ids, -1 } }
-+#endif
-
- struct pinmux_range {
- u16 begin;
---
-2.1.2
-
diff --git a/patches.renesas/0451-pinctrl-sh-pfc-r8a7740-Allow-Multiplatform-Build.patch b/patches.renesas/0451-pinctrl-sh-pfc-r8a7740-Allow-Multiplatform-Build.patch
deleted file mode 100644
index b5bb09fd679d3..0000000000000
--- a/patches.renesas/0451-pinctrl-sh-pfc-r8a7740-Allow-Multiplatform-Build.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From c486b07f0c39542291c5d5815312500ab15dd7b5 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 13 May 2014 13:37:47 +0200
-Subject: pinctrl: sh-pfc: r8a7740: Allow Multiplatform Build
-
-Add #ifdefs to allow r8a7740 Multiplatform build. Needed
-to enable r8a7740 Multiplatform support.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit b6c996a295620b67e4033f2eb07e5a5cf9e7a48f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7740.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
-index 6c83ce43a940..e4c1ef477053 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7740.c
-@@ -22,7 +22,9 @@
- #include <linux/kernel.h>
- #include <linux/pinctrl/pinconf-generic.h>
-
-+#ifndef CONFIG_ARCH_MULTIPLATFORM
- #include <mach/irqs.h>
-+#endif
-
- #include "core.h"
- #include "sh_pfc.h"
---
-2.1.2
-
diff --git a/patches.renesas/0452-pinctrl-sh-pfc-sh73a0-Allow-Multiplatform-Build.patch b/patches.renesas/0452-pinctrl-sh-pfc-sh73a0-Allow-Multiplatform-Build.patch
deleted file mode 100644
index 6a5415ffd0fac..0000000000000
--- a/patches.renesas/0452-pinctrl-sh-pfc-sh73a0-Allow-Multiplatform-Build.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 02dc6a2a08769384391a5522a98008632e7c1cf4 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 13 May 2014 13:37:48 +0200
-Subject: pinctrl: sh-pfc: sh73a0: Allow Multiplatform Build
-
-Add #ifdefs to allow sh73a0 Multiplatform build. Needed
-to enable sh73a0 Multiplatform support.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 672d32377494b84d6af483ce46eda07baba4e3ea)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
-index 6f6ba100994d..ee370de4609a 100644
---- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
-@@ -26,7 +26,9 @@
- #include <linux/regulator/machine.h>
- #include <linux/slab.h>
-
-+#ifndef CONFIG_ARCH_MULTIPLATFORM
- #include <mach/irqs.h>
-+#endif
-
- #include "core.h"
- #include "sh_pfc.h"
---
-2.1.2
-
diff --git a/patches.renesas/0453-pinctrl-sh-pfc-r8a73a4-Allow-Multiplatform-Build.patch b/patches.renesas/0453-pinctrl-sh-pfc-r8a73a4-Allow-Multiplatform-Build.patch
deleted file mode 100644
index 9296d6db607b4..0000000000000
--- a/patches.renesas/0453-pinctrl-sh-pfc-r8a73a4-Allow-Multiplatform-Build.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From dbd79dca93c1b26a6c860d0d494e6aac8e914b31 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 13 May 2014 13:37:49 +0200
-Subject: pinctrl: sh-pfc: r8a73a4: Allow Multiplatform Build
-
-Add #ifdefs to allow r8a73a4 Multiplatform build. Needed
-to enable r8a73a4 Multiplatform support.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit f39d8a72feb073c4ef6296f1d12cedf2ed572bfb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a73a4.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
-index d39ca87353e4..ce9fb7aa8ba3 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a73a4.c
-@@ -20,7 +20,10 @@
- #include <linux/io.h>
- #include <linux/kernel.h>
- #include <linux/pinctrl/pinconf-generic.h>
-+
-+#ifndef CONFIG_ARCH_MULTIPLATFORM
- #include <mach/irqs.h>
-+#endif
-
- #include "core.h"
- #include "sh_pfc.h"
---
-2.1.2
-
diff --git a/patches.renesas/0454-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch b/patches.renesas/0454-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch
deleted file mode 100644
index 77df47ec10899..0000000000000
--- a/patches.renesas/0454-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 79ee30c3c8fa546e755482f15daf95639e4b8fb3 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 24 Apr 2014 15:54:44 +0900
-Subject: serial: sh-sci: Add device tree support for r8a7779
-
-According to the platform data for the legacy-C initialisation of sh-sci
-for the r8a7779 SoC and my own testing the SCIx_SH4_SCIF_REGTYPE bit of
-scscr needs to be set.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit fcbee4d49f30eb0eaa83a62e6a3cab5a892ed93f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
- drivers/tty/serial/sh-sci.c | 10 +++++++++-
- 2 files changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-index 53e6c175db6c..bba86de1a094 100644
---- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-@@ -12,6 +12,7 @@ Required properties:
- - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
- - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
- - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
-+ - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
- - "renesas,scif" for generic SCIF compatible UART.
- - "renesas,scifa" for generic SCIFA compatible UART.
- - "renesas,scifb" for generic SCIFB compatible UART.
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 88236da0ddf7..3b5d2f679946 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -2419,6 +2419,7 @@ static int sci_remove(struct platform_device *dev)
- struct sci_port_info {
- unsigned int type;
- unsigned int regtype;
-+ unsigned int scscr_extra;
- };
-
- static const struct of_device_id of_sci_match[] = {
-@@ -2429,6 +2430,13 @@ static const struct of_device_id of_sci_match[] = {
- .regtype = SCIx_SH4_SCIF_REGTYPE,
- },
- }, {
-+ .compatible = "renesas,scif-r8a7779",
-+ .data = (void *)&(const struct sci_port_info) {
-+ .type = PORT_SCIF,
-+ .regtype = SCIx_SH4_SCIF_REGTYPE,
-+ .scscr_extra = SCSCR_CKE1,
-+ },
-+ }, {
- .compatible = "renesas,scifa",
- .data = &(const struct sci_port_info) {
- .type = PORT_SCIFA,
-@@ -2488,7 +2496,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
- p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
- p->type = info->type;
- p->regtype = info->regtype;
-- p->scscr = SCSCR_RE | SCSCR_TE;
-+ p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
-
- return p;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0455-Revert-serial-sh-sci-Add-device-tree-support-for-r8a.patch b/patches.renesas/0455-Revert-serial-sh-sci-Add-device-tree-support-for-r8a.patch
deleted file mode 100644
index feb5115889256..0000000000000
--- a/patches.renesas/0455-Revert-serial-sh-sci-Add-device-tree-support-for-r8a.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From b1a12fad3a5f04582ae616c913a849fe44d8e1a8 Mon Sep 17 00:00:00 2001
-From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-Date: Thu, 24 Apr 2014 19:26:16 -0700
-Subject: Revert "serial: sh-sci: Add device tree support for r8a7779"
-
-This reverts commit fcbee4d49f30eb0eaa83a62e6a3cab5a892ed93f.
-
-It wasn't quite ready to go in yet, sorry about that.
-
-Cc: Simon Horman <horms@verge.net.au>
-Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 2aafb3864b9fa5ce83250537d940f973ef37b8dc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/serial/renesas,sci-serial.txt | 1 -
- drivers/tty/serial/sh-sci.c | 10 +---------
- 2 files changed, 1 insertion(+), 10 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-index bba86de1a094..53e6c175db6c 100644
---- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-@@ -12,7 +12,6 @@ Required properties:
- - "renesas,scifa-r8a7791" for R8A7791 (R-Car M2) SCIFA compatible UART.
- - "renesas,scifb-r8a7791" for R8A7791 (R-Car M2) SCIFB compatible UART.
- - "renesas,hscif-r8a7791" for R8A7791 (R-Car M2) HSCIF compatible UART.
-- - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
- - "renesas,scif" for generic SCIF compatible UART.
- - "renesas,scifa" for generic SCIFA compatible UART.
- - "renesas,scifb" for generic SCIFB compatible UART.
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 3b5d2f679946..88236da0ddf7 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -2419,7 +2419,6 @@ static int sci_remove(struct platform_device *dev)
- struct sci_port_info {
- unsigned int type;
- unsigned int regtype;
-- unsigned int scscr_extra;
- };
-
- static const struct of_device_id of_sci_match[] = {
-@@ -2430,13 +2429,6 @@ static const struct of_device_id of_sci_match[] = {
- .regtype = SCIx_SH4_SCIF_REGTYPE,
- },
- }, {
-- .compatible = "renesas,scif-r8a7779",
-- .data = (void *)&(const struct sci_port_info) {
-- .type = PORT_SCIF,
-- .regtype = SCIx_SH4_SCIF_REGTYPE,
-- .scscr_extra = SCSCR_CKE1,
-- },
-- }, {
- .compatible = "renesas,scifa",
- .data = &(const struct sci_port_info) {
- .type = PORT_SCIFA,
-@@ -2496,7 +2488,7 @@ sci_parse_dt(struct platform_device *pdev, unsigned int *dev_id)
- p->flags = UPF_IOREMAP | UPF_BOOT_AUTOCONF;
- p->type = info->type;
- p->regtype = info->regtype;
-- p->scscr = SCSCR_RE | SCSCR_TE | info->scscr_extra;
-+ p->scscr = SCSCR_RE | SCSCR_TE;
-
- return p;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0456-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch b/patches.renesas/0456-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch
deleted file mode 100644
index df65d4c9ba326..0000000000000
--- a/patches.renesas/0456-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 88237401dd494fe0feba0a68840b1efb8504b911 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:00:58 +0900
-Subject: serial: sh-sci: Add device tree support for r8a7779
-
-Simply document a new compat string.
-There appears to be no need for a driver updates.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 81bd1eb7af751666ace2f1dadb0b0101401807cd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-index 53e6c175db6c..64fd7dec1bbc 100644
---- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-@@ -4,6 +4,7 @@ Required properties:
-
- - compatible: Must contain one of the following:
-
-+ - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
- - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
- - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
- - "renesas,scifb-r8a7790" for R8A7790 (R-Car H2) SCIFB compatible UART.
---
-2.1.2
-
diff --git a/patches.renesas/0457-mmc-clarify-DDR-timing-mode-between-SD-UHS-and-eMMC.patch b/patches.renesas/0457-mmc-clarify-DDR-timing-mode-between-SD-UHS-and-eMMC.patch
deleted file mode 100644
index a784918a68fc9..0000000000000
--- a/patches.renesas/0457-mmc-clarify-DDR-timing-mode-between-SD-UHS-and-eMMC.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 53dd260142ecffccf9ccefa3d255847f8f089769 Mon Sep 17 00:00:00 2001
-From: Seungwon Jeon <tgih.jun@samsung.com>
-Date: Fri, 14 Mar 2014 21:11:56 +0900
-Subject: mmc: clarify DDR timing mode between SD-UHS and eMMC
-
-This change distinguishes DDR timing mode of current
-mixed usage to clarify device type.
-
-Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
-Acked-by: Jaehoon Chung <jh80.chung@samsung.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 79f7ae7c45a6ccf04e2908337461dee615f6afb0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/core/debugfs.c | 3 +++
- drivers/mmc/core/mmc.c | 2 +-
- include/linux/mmc/host.h | 3 ++-
- 3 files changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/mmc/core/debugfs.c b/drivers/mmc/core/debugfs.c
-index 54829c0ed000..509229b48b55 100644
---- a/drivers/mmc/core/debugfs.c
-+++ b/drivers/mmc/core/debugfs.c
-@@ -135,6 +135,9 @@ static int mmc_ios_show(struct seq_file *s, void *data)
- case MMC_TIMING_UHS_DDR50:
- str = "sd uhs DDR50";
- break;
-+ case MMC_TIMING_MMC_DDR52:
-+ str = "mmc DDR52";
-+ break;
- case MMC_TIMING_MMC_HS200:
- str = "mmc high-speed SDR200";
- break;
-diff --git a/drivers/mmc/core/mmc.c b/drivers/mmc/core/mmc.c
-index 98e9eb0f6643..6d91ff76f246 100644
---- a/drivers/mmc/core/mmc.c
-+++ b/drivers/mmc/core/mmc.c
-@@ -1261,7 +1261,7 @@ static int mmc_init_card(struct mmc_host *host, u32 ocr,
- goto err;
- }
- mmc_card_set_ddr_mode(card);
-- mmc_set_timing(card->host, MMC_TIMING_UHS_DDR50);
-+ mmc_set_timing(card->host, MMC_TIMING_MMC_DDR52);
- mmc_set_bus_width(card->host, bus_width);
- }
- }
-diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h
-index 99f5709ac343..87b1f4f2fe79 100644
---- a/include/linux/mmc/host.h
-+++ b/include/linux/mmc/host.h
-@@ -58,7 +58,8 @@ struct mmc_ios {
- #define MMC_TIMING_UHS_SDR50 5
- #define MMC_TIMING_UHS_SDR104 6
- #define MMC_TIMING_UHS_DDR50 7
--#define MMC_TIMING_MMC_HS200 8
-+#define MMC_TIMING_MMC_DDR52 8
-+#define MMC_TIMING_MMC_HS200 9
-
- #define MMC_SDR_MODE 0
- #define MMC_1_2V_DDR_MODE 1
---
-2.1.2
-
diff --git a/patches.renesas/0458-mmc-sh_mmcif-clarify-DDR-timing-mode-between-SD-UHS-.patch b/patches.renesas/0458-mmc-sh_mmcif-clarify-DDR-timing-mode-between-SD-UHS-.patch
deleted file mode 100644
index 9b001ebefeebf..0000000000000
--- a/patches.renesas/0458-mmc-sh_mmcif-clarify-DDR-timing-mode-between-SD-UHS-.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 17d84a3a4c31e154d5593a63ad6cb1ee5dfe2fd9 Mon Sep 17 00:00:00 2001
-From: Seungwon Jeon <tgih.jun@samsung.com>
-Date: Fri, 14 Mar 2014 21:12:33 +0900
-Subject: mmc: sh_mmcif: clarify DDR timing mode between SD-UHS and eMMC
-
-Replaced UHS_DDR50 with MMC_DDR52.
-
-CC: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Signed-off-by: Seungwon Jeon <tgih.jun@samsung.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Signed-off-by: Chris Ball <chris@printf.net>
-(cherry picked from commit 4039ff4741c6e8d27b5ca42dc92d87dc2d625b80)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index 54730f4aac87..656fbba4c422 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -803,12 +803,13 @@ static u32 sh_mmcif_set_cmd(struct sh_mmcif_host *host,
- break;
- }
- switch (host->timing) {
-- case MMC_TIMING_UHS_DDR50:
-+ case MMC_TIMING_MMC_DDR52:
- /*
- * MMC core will only set this timing, if the host
-- * advertises the MMC_CAP_UHS_DDR50 capability. MMCIF
-- * implementations with this capability, e.g. sh73a0,
-- * will have to set it in their platform data.
-+ * advertises the MMC_CAP_1_8V_DDR/MMC_CAP_1_2V_DDR
-+ * capability. MMCIF implementations with this
-+ * capability, e.g. sh73a0, will have to set it
-+ * in their platform data.
- */
- tmp |= CMD_SET_DARS;
- break;
---
-2.1.2
-
diff --git a/patches.renesas/0459-cpufreq-Introduce-macros-for-cpufreq_frequency_table.patch b/patches.renesas/0459-cpufreq-Introduce-macros-for-cpufreq_frequency_table.patch
deleted file mode 100644
index b1519f8b65e9f..0000000000000
--- a/patches.renesas/0459-cpufreq-Introduce-macros-for-cpufreq_frequency_table.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 146b625d1e94f4a2a7c3956a524d6eecb87c43ef Mon Sep 17 00:00:00 2001
-From: Stratos Karafotis <stratosk@semaphore.gr>
-Date: Fri, 25 Apr 2014 23:15:23 +0300
-Subject: cpufreq: Introduce macros for cpufreq_frequency_table iteration
-
-Many cpufreq drivers need to iterate over the cpufreq_frequency_table
-for various tasks.
-
-This patch introduces two macros which can be used for iteration over
-cpufreq_frequency_table keeping a common coding style across drivers:
-
-- cpufreq_for_each_entry: iterate over each entry of the table
-- cpufreq_for_each_valid_entry: iterate over each entry that contains
-a valid frequency.
-
-It should have no functional changes.
-
-Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
-Acked-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
-Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-(cherry picked from commit 27e289dce29764e488c1e13e9aa6950cad1f4aab)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/cpu-freq/cpu-drivers.txt | 19 +++++++++++++++++++
- drivers/cpufreq/cpufreq.c | 11 +++++++++++
- include/linux/cpufreq.h | 21 +++++++++++++++++++++
- 3 files changed, 51 insertions(+)
-
-diff --git a/Documentation/cpu-freq/cpu-drivers.txt b/Documentation/cpu-freq/cpu-drivers.txt
-index 8b1a4451422e..d3cb4d3d9bb2 100644
---- a/Documentation/cpu-freq/cpu-drivers.txt
-+++ b/Documentation/cpu-freq/cpu-drivers.txt
-@@ -222,3 +222,22 @@ is the corresponding frequency table helper for the ->target
- stage. Just pass the values to this function, and the unsigned int
- index returns the number of the frequency table entry which contains
- the frequency the CPU shall be set to.
-+
-+The following macros can be used as iterators over cpufreq_frequency_table:
-+
-+cpufreq_for_each_entry(pos, table) - iterates over all entries of frequency
-+table.
-+
-+cpufreq-for_each_valid_entry(pos, table) - iterates over all entries,
-+excluding CPUFREQ_ENTRY_INVALID frequencies.
-+Use arguments "pos" - a cpufreq_frequency_table * as a loop cursor and
-+"table" - the cpufreq_frequency_table * you want to iterate over.
-+
-+For example:
-+
-+ struct cpufreq_frequency_table *pos, *driver_freq_table;
-+
-+ cpufreq_for_each_entry(pos, driver_freq_table) {
-+ /* Do something with pos */
-+ pos->frequency = ...
-+ }
-diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
-index dc1447dc173e..e9ab2efcc37f 100644
---- a/drivers/cpufreq/cpufreq.c
-+++ b/drivers/cpufreq/cpufreq.c
-@@ -230,6 +230,17 @@ void cpufreq_cpu_put(struct cpufreq_policy *policy)
- }
- EXPORT_SYMBOL_GPL(cpufreq_cpu_put);
-
-+bool cpufreq_next_valid(struct cpufreq_frequency_table **pos)
-+{
-+ while ((*pos)->frequency != CPUFREQ_TABLE_END)
-+ if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID)
-+ return true;
-+ else
-+ (*pos)++;
-+ return false;
-+}
-+EXPORT_SYMBOL_GPL(cpufreq_next_valid);
-+
- /*********************************************************************
- * EXTERNALLY AFFECTING FREQUENCY CHANGES *
- *********************************************************************/
-diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
-index 945313ca4bbf..e8d7b6b7e3b7 100644
---- a/include/linux/cpufreq.h
-+++ b/include/linux/cpufreq.h
-@@ -446,6 +446,27 @@ struct cpufreq_frequency_table {
- * order */
- };
-
-+bool cpufreq_next_valid(struct cpufreq_frequency_table **pos);
-+
-+/*
-+ * cpufreq_for_each_entry - iterate over a cpufreq_frequency_table
-+ * @pos: the cpufreq_frequency_table * to use as a loop cursor.
-+ * @table: the cpufreq_frequency_table * to iterate over.
-+ */
-+
-+#define cpufreq_for_each_entry(pos, table) \
-+ for (pos = table; pos->frequency != CPUFREQ_TABLE_END; pos++)
-+
-+/*
-+ * cpufreq_for_each_valid_entry - iterate over a cpufreq_frequency_table
-+ * excluding CPUFREQ_ENTRY_INVALID frequencies.
-+ * @pos: the cpufreq_frequency_table * to use as a loop cursor.
-+ * @table: the cpufreq_frequency_table * to iterate over.
-+ */
-+
-+#define cpufreq_for_each_valid_entry(pos, table) \
-+ for (pos = table; cpufreq_next_valid(&pos); pos++)
-+
- int cpufreq_frequency_table_cpuinfo(struct cpufreq_policy *policy,
- struct cpufreq_frequency_table *table);
-
---
-2.1.2
-
diff --git a/patches.renesas/0460-cpufreq-Fix-build-error-on-some-platforms-that-use-c.patch b/patches.renesas/0460-cpufreq-Fix-build-error-on-some-platforms-that-use-c.patch
deleted file mode 100644
index 7f50fe3e37567..0000000000000
--- a/patches.renesas/0460-cpufreq-Fix-build-error-on-some-platforms-that-use-c.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 160eb115968fb6d59993e8c5d196cca87268eae0 Mon Sep 17 00:00:00 2001
-From: Stratos Karafotis <stratosk@semaphore.gr>
-Date: Wed, 7 May 2014 19:33:33 +0300
-Subject: cpufreq: Fix build error on some platforms that use
- cpufreq_for_each_*
-
-On platforms that use cpufreq_for_each_* macros, build fails if
-CONFIG_CPU_FREQ=n, e.g. ARM/shmobile/koelsch/non-multiplatform:
-
-drivers/built-in.o: In function `clk_round_parent':
-clkdev.c:(.text+0xcf168): undefined reference to `cpufreq_next_valid'
-drivers/built-in.o: In function `clk_rate_table_find':
-clkdev.c:(.text+0xcf820): undefined reference to `cpufreq_next_valid'
-make[3]: *** [vmlinux] Error 1
-
-Fix this making cpufreq_next_valid function inline and move it to
-cpufreq.h.
-
-Fixes: 27e289dce297 (cpufreq: Introduce macros for cpufreq_frequency_table iteration)
-Reported-and-tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
-Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-(cherry picked from commit 5eeaf1f1897372590105f155c6a7110b3fa36aef)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- include/linux/cpufreq.h
----
- drivers/cpufreq/cpufreq.c | 11 -----------
- include/linux/cpufreq.h | 10 +++++++++-
- 2 files changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/cpufreq/cpufreq.c b/drivers/cpufreq/cpufreq.c
-index e9ab2efcc37f..dc1447dc173e 100644
---- a/drivers/cpufreq/cpufreq.c
-+++ b/drivers/cpufreq/cpufreq.c
-@@ -230,17 +230,6 @@ void cpufreq_cpu_put(struct cpufreq_policy *policy)
- }
- EXPORT_SYMBOL_GPL(cpufreq_cpu_put);
-
--bool cpufreq_next_valid(struct cpufreq_frequency_table **pos)
--{
-- while ((*pos)->frequency != CPUFREQ_TABLE_END)
-- if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID)
-- return true;
-- else
-- (*pos)++;
-- return false;
--}
--EXPORT_SYMBOL_GPL(cpufreq_next_valid);
--
- /*********************************************************************
- * EXTERNALLY AFFECTING FREQUENCY CHANGES *
- *********************************************************************/
-diff --git a/include/linux/cpufreq.h b/include/linux/cpufreq.h
-index e8d7b6b7e3b7..c7b85eeaf4f1 100644
---- a/include/linux/cpufreq.h
-+++ b/include/linux/cpufreq.h
-@@ -446,7 +446,15 @@ struct cpufreq_frequency_table {
- * order */
- };
-
--bool cpufreq_next_valid(struct cpufreq_frequency_table **pos);
-+static inline bool cpufreq_next_valid(struct cpufreq_frequency_table **pos)
-+{
-+ while ((*pos)->frequency != CPUFREQ_TABLE_END)
-+ if ((*pos)->frequency != CPUFREQ_ENTRY_INVALID)
-+ return true;
-+ else
-+ (*pos)++;
-+ return false;
-+}
-
- /*
- * cpufreq_for_each_entry - iterate over a cpufreq_frequency_table
---
-2.1.2
-
diff --git a/patches.renesas/0461-sh-clk-Use-cpufreq_for_each_valid_entry-macro-for-it.patch b/patches.renesas/0461-sh-clk-Use-cpufreq_for_each_valid_entry-macro-for-it.patch
deleted file mode 100644
index 3c6b97df44664..0000000000000
--- a/patches.renesas/0461-sh-clk-Use-cpufreq_for_each_valid_entry-macro-for-it.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From ac926e83708bf51d4226e7b0eb932daa8acd0825 Mon Sep 17 00:00:00 2001
-From: Stratos Karafotis <stratosk@semaphore.gr>
-Date: Fri, 25 Apr 2014 23:16:58 +0300
-Subject: sh: clk: Use cpufreq_for_each_valid_entry macro for iteration
-
-The cpufreq core now supports the cpufreq_for_each_valid_entry macro
-helper for iteration over the cpufreq_frequency_table, so use it.
-
-It should have no functional changes.
-
-Signed-off-by: Stratos Karafotis <stratosk@semaphore.gr>
-Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-(cherry picked from commit 4229e1c61a4a7ac21d5d0790f6add1c9b98d33e7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/clk/core.c | 20 +++++---------------
- 1 file changed, 5 insertions(+), 15 deletions(-)
-
-diff --git a/drivers/sh/clk/core.c b/drivers/sh/clk/core.c
-index 74727851820d..be56b22ca941 100644
---- a/drivers/sh/clk/core.c
-+++ b/drivers/sh/clk/core.c
-@@ -196,17 +196,11 @@ int clk_rate_table_find(struct clk *clk,
- struct cpufreq_frequency_table *freq_table,
- unsigned long rate)
- {
-- int i;
--
-- for (i = 0; freq_table[i].frequency != CPUFREQ_TABLE_END; i++) {
-- unsigned long freq = freq_table[i].frequency;
-+ struct cpufreq_frequency_table *pos;
-
-- if (freq == CPUFREQ_ENTRY_INVALID)
-- continue;
--
-- if (freq == rate)
-- return i;
-- }
-+ cpufreq_for_each_valid_entry(pos, freq_table)
-+ if (pos->frequency == rate)
-+ return pos - freq_table;
-
- return -ENOENT;
- }
-@@ -575,11 +569,7 @@ long clk_round_parent(struct clk *clk, unsigned long target,
- return abs(target - *best_freq);
- }
-
-- for (freq = parent->freq_table; freq->frequency != CPUFREQ_TABLE_END;
-- freq++) {
-- if (freq->frequency == CPUFREQ_ENTRY_INVALID)
-- continue;
--
-+ cpufreq_for_each_valid_entry(freq, parent->freq_table) {
- if (unlikely(freq->frequency / target <= div_min - 1)) {
- unsigned long freq_max;
-
---
-2.1.2
-
diff --git a/patches.renesas/0462-sh-intc-Remove-pointless-irq_reserve_irqs-invocation.patch b/patches.renesas/0462-sh-intc-Remove-pointless-irq_reserve_irqs-invocation.patch
deleted file mode 100644
index d576a29ae31c1..0000000000000
--- a/patches.renesas/0462-sh-intc-Remove-pointless-irq_reserve_irqs-invocation.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 25348953d780730e4014b575b6ab0b6aa3ac9b74 Mon Sep 17 00:00:00 2001
-From: Thomas Gleixner <tglx@linutronix.de>
-Date: Wed, 7 May 2014 15:44:18 +0000
-Subject: sh: intc: Remove pointless irq_reserve_irqs() invocation
-
-The preceding call to irq_create_identity_mapping() marks the
-interrupt as allocated already. Remove the leftover.
-
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-Reviewed-by: Grant Likely <grant.likely@linaro.org>
-Cc: Tony Luck <tony.luck@intel.com>
-Cc: Peter Zijlstra <peterz@infradead.org>
-Acked-by: Simon Horman <horms@verge.net.au>
-Cc: linux-sh@vger.kernel.org
-Link: http://lkml.kernel.org/r/20140507154339.189047829@linutronix.de
-Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
-(cherry picked from commit 3670802223e164f1089287d1c223d34d3c5dc3da)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/intc/core.c | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/drivers/sh/intc/core.c b/drivers/sh/intc/core.c
-index 8f32a1323a79..81f22980b2de 100644
---- a/drivers/sh/intc/core.c
-+++ b/drivers/sh/intc/core.c
-@@ -80,12 +80,6 @@ static void __init intc_register_irq(struct intc_desc *desc,
- unsigned int data[2], primary;
- unsigned long flags;
-
-- /*
-- * Register the IRQ position with the global IRQ map, then insert
-- * it in to the radix tree.
-- */
-- irq_reserve_irq(irq);
--
- raw_spin_lock_irqsave(&intc_big_lock, flags);
- radix_tree_insert(&d->tree, enum_id, intc_irq_xlate_get(irq));
- raw_spin_unlock_irqrestore(&intc_big_lock, flags);
---
-2.1.2
-
diff --git a/patches.renesas/0463-drivers-sh-pm_runtime-does-not-need-idle-callback.patch b/patches.renesas/0463-drivers-sh-pm_runtime-does-not-need-idle-callback.patch
deleted file mode 100644
index 239bca7e1fe30..0000000000000
--- a/patches.renesas/0463-drivers-sh-pm_runtime-does-not-need-idle-callback.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 04a60ffdac109b0b32da9a2ab484672a6d6a35b4 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Thu, 22 May 2014 20:00:04 +0200
-Subject: drivers: sh: pm_runtime does not need idle callback
-
-In the runtime_pm idle callback the code assumes that a NULL .runtime_idle
-entry is the same as a .runtime_idle entry that returns 0 as a result. This
-means the entry in drivers/sh/pm_runtime can be removed in favour of just
-leaving the entry NULL.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [r8a7779 legacy]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fe95c932a31e7f12bcb6a4e07434462da2ac6e1d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/pm_runtime.c | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
-index 10c65eb51f85..00b82ec94442 100644
---- a/drivers/sh/pm_runtime.c
-+++ b/drivers/sh/pm_runtime.c
-@@ -21,18 +21,10 @@
- #include <linux/slab.h>
-
- #ifdef CONFIG_PM_RUNTIME
--
--static int default_platform_runtime_idle(struct device *dev)
--{
-- /* suspend synchronously to disable clocks immediately */
-- return 0;
--}
--
- static struct dev_pm_domain default_pm_domain = {
- .ops = {
- .runtime_suspend = pm_clk_suspend,
- .runtime_resume = pm_clk_resume,
-- .runtime_idle = default_platform_runtime_idle,
- USE_PLATFORM_PM_SLEEP_OPS
- },
- };
---
-2.1.2
-
diff --git a/patches.renesas/0464-drivers-sh-Restrict-INTC_USERIMASK-to-SH4A.patch b/patches.renesas/0464-drivers-sh-Restrict-INTC_USERIMASK-to-SH4A.patch
deleted file mode 100644
index c677720076203..0000000000000
--- a/patches.renesas/0464-drivers-sh-Restrict-INTC_USERIMASK-to-SH4A.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 46eaa9c37ba9d183bd5dc4f46f3592d5c4750d25 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 22 May 2014 20:00:06 +0200
-Subject: drivers: sh: Restrict INTC_USERIMASK to SH4A
-
-register_intc_userimask() is called from sh4a code only.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [r8a7779 legacy]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 39c5abbc54179998bf04368a11c561e19220d7d4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/intc/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
-index f7d90617c9d9..60228fae943f 100644
---- a/drivers/sh/intc/Kconfig
-+++ b/drivers/sh/intc/Kconfig
-@@ -6,7 +6,7 @@ comment "Interrupt controller options"
-
- config INTC_USERIMASK
- bool "Userspace interrupt masking support"
-- depends on ARCH_SHMOBILE || (SUPERH && CPU_SH4A) || COMPILE_TEST
-+ depends on (SUPERH && CPU_SH4A) || COMPILE_TEST
- help
- This enables support for hardware-assisted userspace hardirq
- masking.
---
-2.1.2
-
diff --git a/patches.renesas/0465-drivers-sh-pm_runtime-implementation-needs-to-suspen.patch b/patches.renesas/0465-drivers-sh-pm_runtime-implementation-needs-to-suspen.patch
deleted file mode 100644
index 3e32b85b66c51..0000000000000
--- a/patches.renesas/0465-drivers-sh-pm_runtime-implementation-needs-to-suspen.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 20cc8319830f052a7ad06c02a10293111dd9169f Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Thu, 22 May 2014 20:00:05 +0200
-Subject: drivers: sh: pm_runtime implementation needs to suspend and resume
- devices
-
-If we override the platform bus calls for pm_runtime then we end up
-with the calls to the devices' suspend and resume methods ignored
-in favour of the bus ones.
-
-Change to calling the pm_runtime calls to suspend and resume the
-devices specifically in the drivers/sh/pm_runtime.c implementation
-to allow any device that may want to run power management to do so.
-
-Note, all the current sh driver implementations do not use their
-own power management code so this is not a major implementation
-issues.
-
-This also brings the implementation into line with the versions
-used by the Davinci and Keystone PM domain code, so once fully
-tested these implementations could be merged together.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8255fe169232364e5a01bd062e8037b8c1a9adec)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/pm_runtime.c | 37 +++++++++++++++++++++++++++++++++++--
- 1 file changed, 35 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
-index 00b82ec94442..25eafbe4da33 100644
---- a/drivers/sh/pm_runtime.c
-+++ b/drivers/sh/pm_runtime.c
-@@ -21,10 +21,43 @@
- #include <linux/slab.h>
-
- #ifdef CONFIG_PM_RUNTIME
-+static int sh_pm_runtime_suspend(struct device *dev)
-+{
-+ int ret;
-+
-+ ret = pm_generic_runtime_suspend(dev);
-+ if (ret) {
-+ dev_err(dev, "failed to suspend device\n");
-+ return ret;
-+ }
-+
-+ ret = pm_clk_suspend(dev);
-+ if (ret) {
-+ dev_err(dev, "failed to suspend clock\n");
-+ pm_generic_runtime_resume(dev);
-+ return ret;
-+ }
-+
-+ return 0;
-+}
-+
-+static int sh_pm_runtime_resume(struct device *dev)
-+{
-+ int ret;
-+
-+ ret = pm_clk_resume(dev);
-+ if (ret) {
-+ dev_err(dev, "failed to resume clock\n");
-+ return ret;
-+ }
-+
-+ return pm_generic_runtime_resume(dev);
-+}
-+
- static struct dev_pm_domain default_pm_domain = {
- .ops = {
-- .runtime_suspend = pm_clk_suspend,
-- .runtime_resume = pm_clk_resume,
-+ .runtime_suspend = sh_pm_runtime_suspend,
-+ .runtime_resume = sh_pm_runtime_resume,
- USE_PLATFORM_PM_SLEEP_OPS
- },
- };
---
-2.1.2
-
diff --git a/patches.renesas/0466-drivers-sh-Enable-PM-runtime-for-new-R-Car-Gen2-SoCs.patch b/patches.renesas/0466-drivers-sh-Enable-PM-runtime-for-new-R-Car-Gen2-SoCs.patch
deleted file mode 100644
index 7a25725ce950e..0000000000000
--- a/patches.renesas/0466-drivers-sh-Enable-PM-runtime-for-new-R-Car-Gen2-SoCs.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From c511e7c342cc592ee11cd5440ce13b1cd88fdd77 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Tue, 27 May 2014 15:45:09 +0200
-Subject: drivers: sh: Enable PM runtime for new R-Car Gen2 SoCs
-
-The PM runtime code should also be enabled for:
- - r8a7792 (R-Car V2H)
- - r8a7793 (R-Car M2-N)
- - r8a7794 (R-Car E2)
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2f35fb3c8a6018a0a5fe4a7fb0948b853c157256)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/sh/pm_runtime.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/sh/pm_runtime.c b/drivers/sh/pm_runtime.c
-index 25eafbe4da33..72f63817a1a0 100644
---- a/drivers/sh/pm_runtime.c
-+++ b/drivers/sh/pm_runtime.c
-@@ -88,6 +88,9 @@ static int __init sh_pm_runtime_init(void)
- !of_machine_is_compatible("renesas,r8a7779") &&
- !of_machine_is_compatible("renesas,r8a7790") &&
- !of_machine_is_compatible("renesas,r8a7791") &&
-+ !of_machine_is_compatible("renesas,r8a7792") &&
-+ !of_machine_is_compatible("renesas,r8a7793") &&
-+ !of_machine_is_compatible("renesas,r8a7794") &&
- !of_machine_is_compatible("renesas,sh7372") &&
- !of_machine_is_compatible("renesas,sh73a0"))
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0467-spi-rspi-Round-up-division-to-avoid-slave-overclocki.patch b/patches.renesas/0467-spi-rspi-Round-up-division-to-avoid-slave-overclocki.patch
deleted file mode 100644
index 51d7a01bbfad1..0000000000000
--- a/patches.renesas/0467-spi-rspi-Round-up-division-to-avoid-slave-overclocki.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From a152d004374199ce599408cd03af1e9b53d3c2fa Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 22 May 2014 20:07:35 +0200
-Subject: spi: rspi: Round up division to avoid slave overclocking
-
-The calculation of the bit rate divider used a standard C division, which
-rounds down the quotient. This may lead to a higher bitrate than requested.
-Round up to avoid this.
-
-E.g. on Koelsch, the SPI flash (configured for 30 MHz) was driven at 48.75
-MHz. After this patch it's driven at a safe 24.375 MHz.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 3beb61dbfcf188399cbc36ce1eeb8b2ba724de38)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 1fb0ad213324..5639f9529e0b 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -266,7 +266,8 @@ static int rspi_set_config_register(struct rspi_data *rspi, int access_size)
- rspi_write8(rspi, rspi->sppcr, RSPI_SPPCR);
-
- /* Sets transfer bit rate */
-- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz) - 1;
-+ spbr = DIV_ROUND_UP(clk_get_rate(rspi->clk),
-+ 2 * rspi->max_speed_hz) - 1;
- rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR);
-
- /* Disable dummy transmission, set 16-bit word access, 1 frame */
-@@ -302,7 +303,8 @@ static int rspi_rz_set_config_register(struct rspi_data *rspi, int access_size)
- rspi_write8(rspi, rspi->sppcr, RSPI_SPPCR);
-
- /* Sets transfer bit rate */
-- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz) - 1;
-+ spbr = DIV_ROUND_UP(clk_get_rate(rspi->clk),
-+ 2 * rspi->max_speed_hz) - 1;
- rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR);
-
- /* Disable dummy transmission, set byte access */
-@@ -335,7 +337,7 @@ static int qspi_set_config_register(struct rspi_data *rspi, int access_size)
- rspi_write8(rspi, rspi->sppcr, RSPI_SPPCR);
-
- /* Sets transfer bit rate */
-- spbr = clk_get_rate(rspi->clk) / (2 * rspi->max_speed_hz);
-+ spbr = DIV_ROUND_UP(clk_get_rate(rspi->clk), 2 * rspi->max_speed_hz);
- rspi_write8(rspi, clamp(spbr, 0, 255), RSPI_SPBR);
-
- /* Disable dummy transmission, set byte access */
---
-2.1.2
-
diff --git a/patches.renesas/0468-spi-rspi-Extract-rspi_wait_for_-tx_empty-rx_full.patch b/patches.renesas/0468-spi-rspi-Extract-rspi_wait_for_-tx_empty-rx_full.patch
deleted file mode 100644
index a5cfb0e538900..0000000000000
--- a/patches.renesas/0468-spi-rspi-Extract-rspi_wait_for_-tx_empty-rx_full.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From eb2c97e62a5b4c9cec3769c42894204c73185e03 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:03 +0200
-Subject: spi: rspi: Extract rspi_wait_for_{tx_empty,rx_full}()
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5f684c34fc82be84ece158aa5c5c7c5072daa9a0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 29 +++++++++++++++++++++--------
- 1 file changed, 21 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 5639f9529e0b..d04a4acce231 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -405,11 +405,22 @@ static int rspi_wait_for_interrupt(struct rspi_data *rspi, u8 wait_mask,
- return 0;
- }
-
-+static inline int rspi_wait_for_tx_empty(struct rspi_data *rspi)
-+{
-+ return rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+}
-+
-+static inline int rspi_wait_for_rx_full(struct rspi_data *rspi)
-+{
-+ return rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE);
-+}
-+
- static int rspi_data_out(struct rspi_data *rspi, u8 data)
- {
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE) < 0) {
-+ int error = rspi_wait_for_tx_empty(rspi);
-+ if (error < 0) {
- dev_err(&rspi->master->dev, "transmit timeout\n");
-- return -ETIMEDOUT;
-+ return error;
- }
- rspi_write_data(rspi, data);
- return 0;
-@@ -417,11 +428,13 @@ static int rspi_data_out(struct rspi_data *rspi, u8 data)
-
- static int rspi_data_in(struct rspi_data *rspi)
- {
-+ int error;
- u8 data;
-
-- if (rspi_wait_for_interrupt(rspi, SPSR_SPRF, SPCR_SPRIE) < 0) {
-+ error = rspi_wait_for_rx_full(rspi);
-+ if (error < 0) {
- dev_err(&rspi->master->dev, "receive timeout\n");
-- return -ETIMEDOUT;
-+ return error;
- }
- data = rspi_read_data(rspi);
- return data;
-@@ -737,7 +750,7 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- }
-
- /* Wait for the last transmission */
-- rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+ rspi_wait_for_tx_empty(rspi);
-
- return 0;
- }
-@@ -783,7 +796,7 @@ static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
- }
-
- /* Wait for the last transmission */
-- rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+ rspi_wait_for_tx_empty(rspi);
-
- return 0;
- }
-@@ -818,7 +831,7 @@ static int qspi_transfer_out_in(struct rspi_data *rspi,
- }
-
- /* Wait for the last transmission */
-- rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+ rspi_wait_for_tx_empty(rspi);
-
- return 0;
- }
-@@ -836,7 +849,7 @@ static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
- }
-
- /* Wait for the last transmission */
-- rspi_wait_for_interrupt(rspi, SPSR_SPTEF, SPCR_SPTIE);
-+ rspi_wait_for_tx_empty(rspi);
-
- return 0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0469-spi-rspi-Do-not-call-rspi_receive_init-for-TX-only.patch b/patches.renesas/0469-spi-rspi-Do-not-call-rspi_receive_init-for-TX-only.patch
deleted file mode 100644
index 6964a74bbfcca..0000000000000
--- a/patches.renesas/0469-spi-rspi-Do-not-call-rspi_receive_init-for-TX-only.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From f61b61466d8a5c9aceaeb18179e7f3ab254560f5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:04 +0200
-Subject: spi: rspi: Do not call rspi_receive_init() for TX-only
-
-Since commit 8449fd76deb9ac67a15a6fb8ead7bb4595d019d2 ("spi: rspi: Merge
-rspi_send_pio() and rspi_receive_pio()"), rspi_receive_init() is called
-for transmit-only transfers too, while this is not needed.
-Only call rspi_receive_init() when receiving, to preserve behavior on
-RSPI on SH.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 32c64261c6f50a4e71ec7546f7e2f48eba91c985)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index d04a4acce231..57beda209599 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -726,13 +726,13 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- u8 *rx_buf = xfer->rx_buf;
- u8 spcr, data;
-
-- rspi_receive_init(rspi);
--
- spcr = rspi_read8(rspi, RSPI_SPCR);
-- if (rx_buf)
-+ if (rx_buf) {
-+ rspi_receive_init(rspi);
- spcr &= ~SPCR_TXMD;
-- else
-+ } else {
- spcr |= SPCR_TXMD;
-+ }
- rspi_write8(rspi, spcr, RSPI_SPCR);
-
- while (remain > 0) {
---
-2.1.2
-
diff --git a/patches.renesas/0470-spi-rspi-Remove-unused-16-bit-DMA-support.patch b/patches.renesas/0470-spi-rspi-Remove-unused-16-bit-DMA-support.patch
deleted file mode 100644
index 2dad633012a35..0000000000000
--- a/patches.renesas/0470-spi-rspi-Remove-unused-16-bit-DMA-support.patch
+++ /dev/null
@@ -1,176 +0,0 @@
-From d744ff0a58d89d9861218ec2e39f1cfba194bf18 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:05 +0200
-Subject: spi: rspi: Remove unused 16-bit DMA support
-
-The 16-bit DMA support doesn't fit well within the SPI core DMA framework,
-as it needs to manage its own double-sized temporary buffers, for handling
-the interleaved data.
-Remove it, as there is no in-tree board code that sets
-rspi_plat_data.dma_width_16bit.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9c5de2c1754c2bb3c69c4d7bf0d0edc0a61d8232)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 84 ++++--------------------------------------------
- include/linux/spi/rspi.h | 2 --
- 2 files changed, 6 insertions(+), 80 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 57beda209599..3bd06fd9af47 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -201,7 +201,6 @@ struct rspi_data {
- struct dma_chan *chan_tx;
- struct dma_chan *chan_rx;
-
-- unsigned dma_width_16bit:1;
- unsigned dma_callbacked:1;
- unsigned byte_access:1;
- };
-@@ -475,60 +474,17 @@ static void rspi_dma_unmap_sg(struct scatterlist *sg, struct dma_chan *chan,
- dma_unmap_sg(chan->device->dev, sg, 1, dir);
- }
-
--static void rspi_memory_to_8bit(void *buf, const void *data, unsigned len)
--{
-- u16 *dst = buf;
-- const u8 *src = data;
--
-- while (len) {
-- *dst++ = (u16)(*src++);
-- len--;
-- }
--}
--
--static void rspi_memory_from_8bit(void *buf, const void *data, unsigned len)
--{
-- u8 *dst = buf;
-- const u16 *src = data;
--
-- while (len) {
-- *dst++ = (u8)*src++;
-- len--;
-- }
--}
--
- static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
- struct scatterlist sg;
-- const void *buf = NULL;
-+ const void *buf = t->tx_buf;
- struct dma_async_tx_descriptor *desc;
-- unsigned int len;
-+ unsigned int len = t->len;
- int ret = 0;
-
-- if (rspi->dma_width_16bit) {
-- void *tmp;
-- /*
-- * If DMAC bus width is 16-bit, the driver allocates a dummy
-- * buffer. And, the driver converts original data into the
-- * DMAC data as the following format:
-- * original data: 1st byte, 2nd byte ...
-- * DMAC data: 1st byte, dummy, 2nd byte, dummy ...
-- */
-- len = t->len * 2;
-- tmp = kmalloc(len, GFP_KERNEL);
-- if (!tmp)
-- return -ENOMEM;
-- rspi_memory_to_8bit(tmp, t->tx_buf, t->len);
-- buf = tmp;
-- } else {
-- len = t->len;
-- buf = t->tx_buf;
-- }
-+ if (!rspi_dma_map_sg(&sg, buf, len, rspi->chan_tx, DMA_TO_DEVICE))
-+ return -EFAULT;
-
-- if (!rspi_dma_map_sg(&sg, buf, len, rspi->chan_tx, DMA_TO_DEVICE)) {
-- ret = -EFAULT;
-- goto end_nomap;
-- }
- desc = dmaengine_prep_slave_sg(rspi->chan_tx, &sg, 1, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc) {
-@@ -563,10 +519,6 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
-
- end:
- rspi_dma_unmap_sg(&sg, rspi->chan_tx, DMA_TO_DEVICE);
--end_nomap:
-- if (rspi->dma_width_16bit)
-- kfree(buf);
--
- return ret;
- }
-
-@@ -603,28 +555,11 @@ static void qspi_receive_init(const struct rspi_data *rspi)
- static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
- struct scatterlist sg, sg_dummy;
-- void *dummy = NULL, *rx_buf = NULL;
-+ void *dummy = NULL, *rx_buf = t->rx_buf;
- struct dma_async_tx_descriptor *desc, *desc_dummy;
-- unsigned int len;
-+ unsigned int len = t->len;
- int ret = 0;
-
-- if (rspi->dma_width_16bit) {
-- /*
-- * If DMAC bus width is 16-bit, the driver allocates a dummy
-- * buffer. And, finally the driver converts the DMAC data into
-- * actual data as the following format:
-- * DMAC data: 1st byte, dummy, 2nd byte, dummy ...
-- * actual data: 1st byte, 2nd byte ...
-- */
-- len = t->len * 2;
-- rx_buf = kmalloc(len, GFP_KERNEL);
-- if (!rx_buf)
-- return -ENOMEM;
-- } else {
-- len = t->len;
-- rx_buf = t->rx_buf;
-- }
--
- /* prepare dummy transfer to generate SPI clocks */
- dummy = kzalloc(len, GFP_KERNEL);
- if (!dummy) {
-@@ -697,11 +632,6 @@ end:
- end_dummy_mapped:
- rspi_dma_unmap_sg(&sg_dummy, rspi->chan_tx, DMA_TO_DEVICE);
- end_nomap:
-- if (rspi->dma_width_16bit) {
-- if (!ret)
-- rspi_memory_from_8bit(t->rx_buf, rx_buf, t->len);
-- kfree(rx_buf);
-- }
- kfree(dummy);
-
- return ret;
-@@ -1073,8 +1003,6 @@ static int rspi_request_dma(struct rspi_data *rspi,
- if (!res || !rspi_pd)
- return 0; /* The driver assumes no error. */
-
-- rspi->dma_width_16bit = rspi_pd->dma_width_16bit;
--
- /* If the module receives data by DMAC, it also needs TX DMAC */
- if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) {
- dma_cap_zero(mask);
-diff --git a/include/linux/spi/rspi.h b/include/linux/spi/rspi.h
-index a25bd6f65e7f..e546b2ceb623 100644
---- a/include/linux/spi/rspi.h
-+++ b/include/linux/spi/rspi.h
-@@ -25,8 +25,6 @@ struct rspi_plat_data {
- unsigned int dma_tx_id;
- unsigned int dma_rx_id;
-
-- unsigned dma_width_16bit:1; /* DMAC read/write width = 16-bit */
--
- u16 num_chipselect;
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0471-spi-rspi-Use-core-SPI_MASTER_MUST_-RT-X-handling.patch b/patches.renesas/0471-spi-rspi-Use-core-SPI_MASTER_MUST_-RT-X-handling.patch
deleted file mode 100644
index b2f4365c69f37..0000000000000
--- a/patches.renesas/0471-spi-rspi-Use-core-SPI_MASTER_MUST_-RT-X-handling.patch
+++ /dev/null
@@ -1,307 +0,0 @@
-From 80967c858d36b6cf3ca676125b8869050c32a3ec Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:06 +0200
-Subject: spi: rspi: Use core SPI_MASTER_MUST_[RT]X handling
-
-RSPI needs dummy transfers to generate the SPI clock on receive.
-RSPI-RZ and QSPI always do both transmit and receive.
-
-Use the SPI core SPI_MASTER_MUST_RX/SPI_MASTER_MUST_TX infrastructure
-instead of checking for the presence of buffers and providing dummy data
-ourselves (for PIO), or providing a dummy buffer (for DMA).
-
-rspi_receive_dma() now provides full duplex DMA transfers on RSPI, and is
-renamed to rspi_send_receive_dma().
-
-As the SPI core will always provide a TX buffer, the logic to choose
-between DMA send and DMA send/receive in rspi_transfer_one() now has to
-check for the presence of an RX buffer. Likewise for the DMA availability
-tests in rspi_is_dma().
-
-The buffer tests in qspi_transfer_one() are now always true, so they're
-removed.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b42e03596db3d45980c976c8124fdc323f031dc4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 132 ++++++++++++++++++++++---------------------------
- 1 file changed, 58 insertions(+), 74 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 3bd06fd9af47..ece8f6037943 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -183,8 +183,6 @@
- #define SPBFCR_TXTRG_MASK 0x30 /* Transmit Buffer Data Triggering Number */
- #define SPBFCR_RXTRG_MASK 0x07 /* Receive Buffer Data Triggering Number */
-
--#define DUMMY_DATA 0x00
--
- struct rspi_data {
- void __iomem *addr;
- u32 max_speed_hz;
-@@ -252,6 +250,7 @@ struct spi_ops {
- int (*transfer_one)(struct spi_master *master, struct spi_device *spi,
- struct spi_transfer *xfer);
- u16 mode_bits;
-+ u16 flags;
- };
-
- /*
-@@ -552,42 +551,38 @@ static void qspi_receive_init(const struct rspi_data *rspi)
- rspi_write8(rspi, 0, QSPI_SPBFCR);
- }
-
--static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
-+static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- struct scatterlist sg, sg_dummy;
-- void *dummy = NULL, *rx_buf = t->rx_buf;
-- struct dma_async_tx_descriptor *desc, *desc_dummy;
-+ struct scatterlist sg_rx, sg_tx;
-+ const void *tx_buf = t->tx_buf;
-+ void *rx_buf = t->rx_buf;
-+ struct dma_async_tx_descriptor *desc_tx, *desc_rx;
- unsigned int len = t->len;
- int ret = 0;
-
-- /* prepare dummy transfer to generate SPI clocks */
-- dummy = kzalloc(len, GFP_KERNEL);
-- if (!dummy) {
-- ret = -ENOMEM;
-- goto end_nomap;
-- }
-- if (!rspi_dma_map_sg(&sg_dummy, dummy, len, rspi->chan_tx,
-- DMA_TO_DEVICE)) {
-- ret = -EFAULT;
-- goto end_nomap;
-- }
-- desc_dummy = dmaengine_prep_slave_sg(rspi->chan_tx, &sg_dummy, 1,
-+ /* prepare transmit transfer */
-+ if (!rspi_dma_map_sg(&sg_tx, tx_buf, len, rspi->chan_tx,
-+ DMA_TO_DEVICE))
-+ return -EFAULT;
-+
-+ desc_tx = dmaengine_prep_slave_sg(rspi->chan_tx, &sg_tx, 1,
- DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_dummy) {
-+ if (!desc_tx) {
- ret = -EIO;
-- goto end_dummy_mapped;
-+ goto end_tx_mapped;
- }
-
- /* prepare receive transfer */
-- if (!rspi_dma_map_sg(&sg, rx_buf, len, rspi->chan_rx,
-+ if (!rspi_dma_map_sg(&sg_rx, rx_buf, len, rspi->chan_rx,
- DMA_FROM_DEVICE)) {
- ret = -EFAULT;
-- goto end_dummy_mapped;
-+ goto end_tx_mapped;
-
- }
-- desc = dmaengine_prep_slave_sg(rspi->chan_rx, &sg, 1, DMA_FROM_DEVICE,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc) {
-+ desc_rx = dmaengine_prep_slave_sg(rspi->chan_rx, &sg_rx, 1,
-+ DMA_FROM_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_rx) {
- ret = -EIO;
- goto end;
- }
-@@ -606,13 +601,13 @@ static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- rspi_enable_irq(rspi, SPCR_SPTIE | SPCR_SPRIE);
- rspi->dma_callbacked = 0;
-
-- desc->callback = rspi_dma_complete;
-- desc->callback_param = rspi;
-- dmaengine_submit(desc);
-+ desc_rx->callback = rspi_dma_complete;
-+ desc_rx->callback_param = rspi;
-+ dmaengine_submit(desc_rx);
- dma_async_issue_pending(rspi->chan_rx);
-
-- desc_dummy->callback = NULL; /* No callback */
-- dmaengine_submit(desc_dummy);
-+ desc_tx->callback = NULL; /* No callback */
-+ dmaengine_submit(desc_tx);
- dma_async_issue_pending(rspi->chan_tx);
-
- ret = wait_event_interruptible_timeout(rspi->wait,
-@@ -628,21 +623,19 @@ static int rspi_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- enable_irq(rspi->rx_irq);
-
- end:
-- rspi_dma_unmap_sg(&sg, rspi->chan_rx, DMA_FROM_DEVICE);
--end_dummy_mapped:
-- rspi_dma_unmap_sg(&sg_dummy, rspi->chan_tx, DMA_TO_DEVICE);
--end_nomap:
-- kfree(dummy);
--
-+ rspi_dma_unmap_sg(&sg_rx, rspi->chan_rx, DMA_FROM_DEVICE);
-+end_tx_mapped:
-+ rspi_dma_unmap_sg(&sg_tx, rspi->chan_tx, DMA_TO_DEVICE);
- return ret;
- }
-
- static int rspi_is_dma(const struct rspi_data *rspi, struct spi_transfer *t)
- {
-- if (t->tx_buf && rspi->chan_tx)
-- return 1;
- /* If the module receives data by DMAC, it also needs TX DMAC */
-- if (t->rx_buf && rspi->chan_tx && rspi->chan_rx)
-+ if (t->rx_buf)
-+ return rspi->chan_tx && rspi->chan_rx;
-+
-+ if (rspi->chan_tx)
- return 1;
-
- return 0;
-@@ -654,7 +647,7 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- int remain = xfer->len, ret;
- const u8 *tx_buf = xfer->tx_buf;
- u8 *rx_buf = xfer->rx_buf;
-- u8 spcr, data;
-+ u8 spcr;
-
- spcr = rspi_read8(rspi, RSPI_SPCR);
- if (rx_buf) {
-@@ -666,8 +659,7 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- rspi_write8(rspi, spcr, RSPI_SPCR);
-
- while (remain > 0) {
-- data = tx_buf ? *tx_buf++ : DUMMY_DATA;
-- ret = rspi_data_out(rspi, data);
-+ ret = rspi_data_out(rspi, *tx_buf++);
- if (ret < 0)
- return ret;
- if (rx_buf) {
-@@ -689,20 +681,14 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- struct spi_transfer *xfer)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-- int ret;
-
- if (!rspi_is_dma(rspi, xfer))
- return rspi_transfer_out_in(rspi, xfer);
-
-- if (xfer->tx_buf) {
-- ret = rspi_send_dma(rspi, xfer);
-- if (ret < 0)
-- return ret;
-- }
- if (xfer->rx_buf)
-- return rspi_receive_dma(rspi, xfer);
--
-- return 0;
-+ return rspi_send_receive_dma(rspi, xfer);
-+ else
-+ return rspi_send_dma(rspi, xfer);
- }
-
- static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
-@@ -711,17 +697,14 @@ static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
- int remain = xfer->len, ret;
- const u8 *tx_buf = xfer->tx_buf;
- u8 *rx_buf = xfer->rx_buf;
-- u8 data;
-
- rspi_rz_receive_init(rspi);
-
- while (remain > 0) {
-- data = tx_buf ? *tx_buf++ : DUMMY_DATA;
-- ret = rspi_data_out_in(rspi, data);
-+ ret = rspi_data_out_in(rspi, *tx_buf++);
- if (ret < 0)
- return ret;
-- if (rx_buf)
-- *rx_buf++ = ret;
-+ *rx_buf++ = ret;
- remain--;
- }
-
-@@ -746,17 +729,14 @@ static int qspi_transfer_out_in(struct rspi_data *rspi,
- int remain = xfer->len, ret;
- const u8 *tx_buf = xfer->tx_buf;
- u8 *rx_buf = xfer->rx_buf;
-- u8 data;
-
- qspi_receive_init(rspi);
-
- while (remain > 0) {
-- data = tx_buf ? *tx_buf++ : DUMMY_DATA;
-- ret = rspi_data_out_in(rspi, data);
-+ ret = rspi_data_out_in(rspi, *tx_buf++);
- if (ret < 0)
- return ret;
-- if (rx_buf)
-- *rx_buf++ = ret;
-+ *rx_buf++ = ret;
- remain--;
- }
-
-@@ -807,10 +787,10 @@ static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-
- if (spi->mode & SPI_LOOP) {
- return qspi_transfer_out_in(rspi, xfer);
-- } else if (xfer->tx_buf && xfer->tx_nbits > SPI_NBITS_SINGLE) {
-+ } else if (xfer->tx_nbits > SPI_NBITS_SINGLE) {
- /* Quad or Dual SPI Write */
- return qspi_transfer_out(rspi, xfer);
-- } else if (xfer->rx_buf && xfer->rx_nbits > SPI_NBITS_SINGLE) {
-+ } else if (xfer->rx_nbits > SPI_NBITS_SINGLE) {
- /* Quad or Dual SPI Read */
- return qspi_transfer_in(rspi, xfer);
- } else {
-@@ -1061,23 +1041,26 @@ static int rspi_remove(struct platform_device *pdev)
- }
-
- static const struct spi_ops rspi_ops = {
-- .set_config_register = rspi_set_config_register,
-- .transfer_one = rspi_transfer_one,
-- .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
-+ .set_config_register = rspi_set_config_register,
-+ .transfer_one = rspi_transfer_one,
-+ .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
-+ .flags = SPI_MASTER_MUST_TX,
- };
-
- static const struct spi_ops rspi_rz_ops = {
-- .set_config_register = rspi_rz_set_config_register,
-- .transfer_one = rspi_rz_transfer_one,
-- .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
-+ .set_config_register = rspi_rz_set_config_register,
-+ .transfer_one = rspi_rz_transfer_one,
-+ .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
-+ .flags = SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX,
- };
-
- static const struct spi_ops qspi_ops = {
-- .set_config_register = qspi_set_config_register,
-- .transfer_one = qspi_transfer_one,
-- .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP |
-- SPI_TX_DUAL | SPI_TX_QUAD |
-- SPI_RX_DUAL | SPI_RX_QUAD,
-+ .set_config_register = qspi_set_config_register,
-+ .transfer_one = qspi_transfer_one,
-+ .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP |
-+ SPI_TX_DUAL | SPI_TX_QUAD |
-+ SPI_RX_DUAL | SPI_RX_QUAD,
-+ .flags = SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX,
- };
-
- #ifdef CONFIG_OF
-@@ -1197,6 +1180,7 @@ static int rspi_probe(struct platform_device *pdev)
- master->prepare_message = rspi_prepare_message;
- master->unprepare_message = rspi_unprepare_message;
- master->mode_bits = ops->mode_bits;
-+ master->flags = ops->flags;
- master->dev.of_node = pdev->dev.of_node;
-
- ret = platform_get_irq_byname(pdev, "rx");
---
-2.1.2
-
diff --git a/patches.renesas/0472-spi-rspi-Extract-rspi_pio_transfer.patch b/patches.renesas/0472-spi-rspi-Extract-rspi_pio_transfer.patch
deleted file mode 100644
index d1df09f4ddef8..0000000000000
--- a/patches.renesas/0472-spi-rspi-Extract-rspi_pio_transfer.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-From 1a623ed03a7b94e3e0abda21240e7a94c1dc884a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:07 +0200
-Subject: spi: rspi: Extract rspi_pio_transfer()
-
-The various PIO loops are very similar. Consolidate into a single
-function rspi_pio_transfer().
-
-Both buffer pointers can be NULL, as RSPI supports TX-only mode, and
-Dual/Quad SPI Transfers are unidirectional.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 6837b8e91d2a080293c30d5fe42d9692390091fa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 95 ++++++++++++++++++--------------------------------
- 1 file changed, 33 insertions(+), 62 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index ece8f6037943..fdbd46d0c570 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -438,15 +438,24 @@ static int rspi_data_in(struct rspi_data *rspi)
- return data;
- }
-
--static int rspi_data_out_in(struct rspi_data *rspi, u8 data)
-+static int rspi_pio_transfer(struct rspi_data *rspi, const u8 *tx, u8 *rx,
-+ unsigned int n)
- {
-- int ret;
--
-- ret = rspi_data_out(rspi, data);
-- if (ret < 0)
-- return ret;
-+ while (n-- > 0) {
-+ if (tx) {
-+ int ret = rspi_data_out(rspi, *tx++);
-+ if (ret < 0)
-+ return ret;
-+ }
-+ if (rx) {
-+ int ret = rspi_data_in(rspi);
-+ if (ret < 0)
-+ return ret;
-+ *rx++ = ret;
-+ }
-+ }
-
-- return rspi_data_in(rspi);
-+ return 0;
- }
-
- static void rspi_dma_complete(void *arg)
-@@ -644,13 +653,11 @@ static int rspi_is_dma(const struct rspi_data *rspi, struct spi_transfer *t)
- static int rspi_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
-- int remain = xfer->len, ret;
-- const u8 *tx_buf = xfer->tx_buf;
-- u8 *rx_buf = xfer->rx_buf;
- u8 spcr;
-+ int ret;
-
- spcr = rspi_read8(rspi, RSPI_SPCR);
-- if (rx_buf) {
-+ if (xfer->rx_buf) {
- rspi_receive_init(rspi);
- spcr &= ~SPCR_TXMD;
- } else {
-@@ -658,18 +665,9 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- }
- rspi_write8(rspi, spcr, RSPI_SPCR);
-
-- while (remain > 0) {
-- ret = rspi_data_out(rspi, *tx_buf++);
-- if (ret < 0)
-- return ret;
-- if (rx_buf) {
-- ret = rspi_data_in(rspi);
-- if (ret < 0)
-- return ret;
-- *rx_buf++ = ret;
-- }
-- remain--;
-- }
-+ ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-+ if (ret < 0)
-+ return ret;
-
- /* Wait for the last transmission */
- rspi_wait_for_tx_empty(rspi);
-@@ -694,19 +692,13 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
-- int remain = xfer->len, ret;
-- const u8 *tx_buf = xfer->tx_buf;
-- u8 *rx_buf = xfer->rx_buf;
-+ int ret;
-
- rspi_rz_receive_init(rspi);
-
-- while (remain > 0) {
-- ret = rspi_data_out_in(rspi, *tx_buf++);
-- if (ret < 0)
-- return ret;
-- *rx_buf++ = ret;
-- remain--;
-- }
-+ ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-+ if (ret < 0)
-+ return ret;
-
- /* Wait for the last transmission */
- rspi_wait_for_tx_empty(rspi);
-@@ -726,19 +718,13 @@ static int rspi_rz_transfer_one(struct spi_master *master,
- static int qspi_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
-- int remain = xfer->len, ret;
-- const u8 *tx_buf = xfer->tx_buf;
-- u8 *rx_buf = xfer->rx_buf;
-+ int ret;
-
- qspi_receive_init(rspi);
-
-- while (remain > 0) {
-- ret = rspi_data_out_in(rspi, *tx_buf++);
-- if (ret < 0)
-- return ret;
-- *rx_buf++ = ret;
-- remain--;
-- }
-+ ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-+ if (ret < 0)
-+ return ret;
-
- /* Wait for the last transmission */
- rspi_wait_for_tx_empty(rspi);
-@@ -748,15 +734,11 @@ static int qspi_transfer_out_in(struct rspi_data *rspi,
-
- static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
- {
-- const u8 *buf = xfer->tx_buf;
-- unsigned int i;
- int ret;
-
-- for (i = 0; i < xfer->len; i++) {
-- ret = rspi_data_out(rspi, *buf++);
-- if (ret < 0)
-- return ret;
-- }
-+ ret = rspi_pio_transfer(rspi, xfer->tx_buf, NULL, xfer->len);
-+ if (ret < 0)
-+ return ret;
-
- /* Wait for the last transmission */
- rspi_wait_for_tx_empty(rspi);
-@@ -766,18 +748,7 @@ static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
-
- static int qspi_transfer_in(struct rspi_data *rspi, struct spi_transfer *xfer)
- {
-- u8 *buf = xfer->rx_buf;
-- unsigned int i;
-- int ret;
--
-- for (i = 0; i < xfer->len; i++) {
-- ret = rspi_data_in(rspi);
-- if (ret < 0)
-- return ret;
-- *buf++ = ret;
-- }
--
-- return 0;
-+ return rspi_pio_transfer(rspi, NULL, xfer->rx_buf, xfer->len);
- }
-
- static int qspi_transfer_one(struct spi_master *master, struct spi_device *spi,
---
-2.1.2
-
diff --git a/patches.renesas/0473-spi-rspi-Don-t-consider-DMA-configuration-failures-f.patch b/patches.renesas/0473-spi-rspi-Don-t-consider-DMA-configuration-failures-f.patch
deleted file mode 100644
index 90aec12c10d04..0000000000000
--- a/patches.renesas/0473-spi-rspi-Don-t-consider-DMA-configuration-failures-f.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 612e3785e34dcfe88cce1c8695077533a807e49e Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:08 +0200
-Subject: spi: rspi: Don't consider DMA configuration failures fatal
-
-Fall back to PIO if DMA configuration failed.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 27e105a6006b8ce1b55709c5e24f63959981475d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index fdbd46d0c570..94a99ec7d989 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -1190,10 +1190,8 @@ static int rspi_probe(struct platform_device *pdev)
- }
-
- ret = rspi_request_dma(rspi, pdev);
-- if (ret < 0) {
-- dev_err(&pdev->dev, "rspi_request_dma failed.\n");
-- goto error3;
-- }
-+ if (ret < 0)
-+ dev_warn(&pdev->dev, "DMA not available, using PIO\n");
-
- ret = devm_spi_register_master(&pdev->dev, master);
- if (ret < 0) {
---
-2.1.2
-
diff --git a/patches.renesas/0474-spi-rspi-Extract-rspi_request_dma_chan.patch b/patches.renesas/0474-spi-rspi-Extract-rspi_request_dma_chan.patch
deleted file mode 100644
index 93f12ba0d5d1f..0000000000000
--- a/patches.renesas/0474-spi-rspi-Extract-rspi_request_dma_chan.patch
+++ /dev/null
@@ -1,131 +0,0 @@
-From ef4f1f20ede7ef65162c11f9ed63a07a18bf4041 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:09 +0200
-Subject: spi: rspi: Extract rspi_request_dma_chan()
-
-Setup of the receive and transmit DMA channels is very similar, so let's
-consolidate.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 65bf220571f131a7c3a564a88793bd0f16fd7c96)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 89 +++++++++++++++++++++++++++++++-------------------
- 1 file changed, 55 insertions(+), 34 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 94a99ec7d989..0a7a2d618f0f 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -942,52 +942,73 @@ static irqreturn_t rspi_irq_tx(int irq, void *_sr)
- return 0;
- }
-
--static int rspi_request_dma(struct rspi_data *rspi,
-- struct platform_device *pdev)
-+static struct dma_chan *rspi_request_dma_chan(struct device *dev,
-+ enum dma_transfer_direction dir,
-+ unsigned int id,
-+ dma_addr_t port_addr)
- {
-- const struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev);
-- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- dma_cap_mask_t mask;
-+ struct dma_chan *chan;
- struct dma_slave_config cfg;
- int ret;
-
-+ dma_cap_zero(mask);
-+ dma_cap_set(DMA_SLAVE, mask);
-+
-+ chan = dma_request_channel(mask, shdma_chan_filter,
-+ (void *)(unsigned long)id);
-+ if (!chan) {
-+ dev_warn(dev, "dma_request_channel failed\n");
-+ return NULL;
-+ }
-+
-+ memset(&cfg, 0, sizeof(cfg));
-+ cfg.slave_id = id;
-+ cfg.direction = dir;
-+ if (dir == DMA_MEM_TO_DEV)
-+ cfg.dst_addr = port_addr;
-+ else
-+ cfg.src_addr = port_addr;
-+
-+ ret = dmaengine_slave_config(chan, &cfg);
-+ if (ret) {
-+ dev_warn(dev, "dmaengine_slave_config failed %d\n", ret);
-+ dma_release_channel(chan);
-+ return NULL;
-+ }
-+
-+ return chan;
-+}
-+
-+static int rspi_request_dma(struct rspi_data *rspi,
-+ struct platform_device *pdev)
-+{
-+ const struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev);
-+ struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
- if (!res || !rspi_pd)
- return 0; /* The driver assumes no error. */
-
- /* If the module receives data by DMAC, it also needs TX DMAC */
- if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) {
-- dma_cap_zero(mask);
-- dma_cap_set(DMA_SLAVE, mask);
-- rspi->chan_rx = dma_request_channel(mask, shdma_chan_filter,
-- (void *)rspi_pd->dma_rx_id);
-- if (rspi->chan_rx) {
-- cfg.slave_id = rspi_pd->dma_rx_id;
-- cfg.direction = DMA_DEV_TO_MEM;
-- cfg.dst_addr = 0;
-- cfg.src_addr = res->start + RSPI_SPDR;
-- ret = dmaengine_slave_config(rspi->chan_rx, &cfg);
-- if (!ret)
-- dev_info(&pdev->dev, "Use DMA when rx.\n");
-- else
-- return ret;
-- }
-+ rspi->chan_rx = rspi_request_dma_chan(&pdev->dev,
-+ DMA_DEV_TO_MEM,
-+ rspi_pd->dma_rx_id,
-+ res->start + RSPI_SPDR);
-+ if (!rspi->chan_rx)
-+ return -ENODEV;
-+
-+ dev_info(&pdev->dev, "Use DMA when rx.\n");
- }
- if (rspi_pd->dma_tx_id) {
-- dma_cap_zero(mask);
-- dma_cap_set(DMA_SLAVE, mask);
-- rspi->chan_tx = dma_request_channel(mask, shdma_chan_filter,
-- (void *)rspi_pd->dma_tx_id);
-- if (rspi->chan_tx) {
-- cfg.slave_id = rspi_pd->dma_tx_id;
-- cfg.direction = DMA_MEM_TO_DEV;
-- cfg.dst_addr = res->start + RSPI_SPDR;
-- cfg.src_addr = 0;
-- ret = dmaengine_slave_config(rspi->chan_tx, &cfg);
-- if (!ret)
-- dev_info(&pdev->dev, "Use DMA when tx\n");
-- else
-- return ret;
-- }
-+ rspi->chan_tx = rspi_request_dma_chan(&pdev->dev,
-+ DMA_MEM_TO_DEV,
-+ rspi_pd->dma_tx_id,
-+ res->start + RSPI_SPDR);
-+ if (!rspi->chan_tx)
-+ return -ENODEV;
-+
-+ dev_info(&pdev->dev, "Use DMA when tx\n");
- }
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0475-spi-rspi-Remove-unneeded-resource-test-in-DMA-setup.patch b/patches.renesas/0475-spi-rspi-Remove-unneeded-resource-test-in-DMA-setup.patch
deleted file mode 100644
index cb2de0a3f3acc..0000000000000
--- a/patches.renesas/0475-spi-rspi-Remove-unneeded-resource-test-in-DMA-setup.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From e19a345165d2e645dc340f7fff8c1e11e0128189 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:10 +0200
-Subject: spi: rspi: Remove unneeded resource test in DMA setup
-
-The resource is know to exist, as rspi_probe() already mapped it.
-Remove the test, and just pass the resource.
-Pass the device pointer instead of the platform device pointer, as the
-latter is no longer needed.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit fcdc49ae53dc8cfc1a7758607bca68935f568ca2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 21 +++++++++------------
- 1 file changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 0a7a2d618f0f..1ec51cb00203 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -980,35 +980,32 @@ static struct dma_chan *rspi_request_dma_chan(struct device *dev,
- return chan;
- }
-
--static int rspi_request_dma(struct rspi_data *rspi,
-- struct platform_device *pdev)
-+static int rspi_request_dma(struct device *dev, struct rspi_data *rspi,
-+ const struct resource *res)
- {
-- const struct rspi_plat_data *rspi_pd = dev_get_platdata(&pdev->dev);
-- struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+ const struct rspi_plat_data *rspi_pd = dev_get_platdata(dev);
-
-- if (!res || !rspi_pd)
-+ if (!rspi_pd)
- return 0; /* The driver assumes no error. */
-
- /* If the module receives data by DMAC, it also needs TX DMAC */
- if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) {
-- rspi->chan_rx = rspi_request_dma_chan(&pdev->dev,
-- DMA_DEV_TO_MEM,
-+ rspi->chan_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM,
- rspi_pd->dma_rx_id,
- res->start + RSPI_SPDR);
- if (!rspi->chan_rx)
- return -ENODEV;
-
-- dev_info(&pdev->dev, "Use DMA when rx.\n");
-+ dev_info(dev, "Use DMA when rx.\n");
- }
- if (rspi_pd->dma_tx_id) {
-- rspi->chan_tx = rspi_request_dma_chan(&pdev->dev,
-- DMA_MEM_TO_DEV,
-+ rspi->chan_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV,
- rspi_pd->dma_tx_id,
- res->start + RSPI_SPDR);
- if (!rspi->chan_tx)
- return -ENODEV;
-
-- dev_info(&pdev->dev, "Use DMA when tx\n");
-+ dev_info(dev, "Use DMA when tx\n");
- }
-
- return 0;
-@@ -1210,7 +1207,7 @@ static int rspi_probe(struct platform_device *pdev)
- goto error2;
- }
-
-- ret = rspi_request_dma(rspi, pdev);
-+ ret = rspi_request_dma(&pdev->dev, rspi, res);
- if (ret < 0)
- dev_warn(&pdev->dev, "DMA not available, using PIO\n");
-
---
-2.1.2
-
diff --git a/patches.renesas/0476-spi-rspi-SPI-DMA-core-needs-both-RX-and-TX-DMA-to-fu.patch b/patches.renesas/0476-spi-rspi-SPI-DMA-core-needs-both-RX-and-TX-DMA-to-fu.patch
deleted file mode 100644
index 87c7c2e4a0e67..0000000000000
--- a/patches.renesas/0476-spi-rspi-SPI-DMA-core-needs-both-RX-and-TX-DMA-to-fu.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 0ebe5710335d98e589ac3611ae05e6e52c2643f7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:11 +0200
-Subject: spi: rspi: SPI DMA core needs both RX and TX DMA to function
-
-The SPI DMA core framework needs both RX and TX DMA to function. As a
-preparation for converting the driver to use this framework, fall back to
-PIO if no DMA channel or only one DMA channel is available.
-
-This affects only RSPI, which could do DMA transfers for TX-only before.
-RSPI-RZ and QSPI (at least for Single SPI Transfers) will need both RX and
-TX DMA anyway.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5f338d0ce0b4c9e6c554b92cfb288789a41bfbc1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 36 ++++++++++++++----------------------
- 1 file changed, 14 insertions(+), 22 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 1ec51cb00203..7b993f75a3cf 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -640,10 +640,6 @@ end_tx_mapped:
-
- static int rspi_is_dma(const struct rspi_data *rspi, struct spi_transfer *t)
- {
-- /* If the module receives data by DMAC, it also needs TX DMAC */
-- if (t->rx_buf)
-- return rspi->chan_tx && rspi->chan_rx;
--
- if (rspi->chan_tx)
- return 1;
-
-@@ -985,29 +981,25 @@ static int rspi_request_dma(struct device *dev, struct rspi_data *rspi,
- {
- const struct rspi_plat_data *rspi_pd = dev_get_platdata(dev);
-
-- if (!rspi_pd)
-+ if (!rspi_pd || !rspi_pd->dma_rx_id || !rspi_pd->dma_tx_id)
- return 0; /* The driver assumes no error. */
-
-- /* If the module receives data by DMAC, it also needs TX DMAC */
-- if (rspi_pd->dma_rx_id && rspi_pd->dma_tx_id) {
-- rspi->chan_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM,
-- rspi_pd->dma_rx_id,
-- res->start + RSPI_SPDR);
-- if (!rspi->chan_rx)
-- return -ENODEV;
-+ rspi->chan_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM,
-+ rspi_pd->dma_rx_id,
-+ res->start + RSPI_SPDR);
-+ if (!rspi->chan_rx)
-+ return -ENODEV;
-
-- dev_info(dev, "Use DMA when rx.\n");
-- }
-- if (rspi_pd->dma_tx_id) {
-- rspi->chan_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV,
-- rspi_pd->dma_tx_id,
-- res->start + RSPI_SPDR);
-- if (!rspi->chan_tx)
-- return -ENODEV;
--
-- dev_info(dev, "Use DMA when tx\n");
-+ rspi->chan_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV,
-+ rspi_pd->dma_tx_id,
-+ res->start + RSPI_SPDR);
-+ if (!rspi->chan_tx) {
-+ dma_release_channel(rspi->chan_rx);
-+ rspi->chan_rx = NULL;
-+ return -ENODEV;
- }
-
-+ dev_info(dev, "DMA available");
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0477-spi-rspi-Use-SPI-core-DMA-mapping-framework.patch b/patches.renesas/0477-spi-rspi-Use-SPI-core-DMA-mapping-framework.patch
deleted file mode 100644
index a58caec41d53f..0000000000000
--- a/patches.renesas/0477-spi-rspi-Use-SPI-core-DMA-mapping-framework.patch
+++ /dev/null
@@ -1,299 +0,0 @@
-From c2353009eb7a1f2640ea9bef2e88e104c0687c7a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:12 +0200
-Subject: spi: rspi: Use SPI core DMA mapping framework
-
-Use the SPI core DMA mapping framework instead of our own.
-If available, DMA is used for transfers larger than the FIFO size
-(8 or 32 bytes).
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2f777ec91aa0623e058c43dd4aaf0b3325d3c3e8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 140 ++++++++++++++++++-------------------------------
- 1 file changed, 50 insertions(+), 90 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 7b993f75a3cf..753ac7bdfd55 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -195,10 +195,6 @@ struct rspi_data {
- int rx_irq, tx_irq;
- const struct spi_ops *ops;
-
-- /* for dmaengine */
-- struct dma_chan *chan_tx;
-- struct dma_chan *chan_rx;
--
- unsigned dma_callbacked:1;
- unsigned byte_access:1;
- };
-@@ -251,6 +247,7 @@ struct spi_ops {
- struct spi_transfer *xfer);
- u16 mode_bits;
- u16 flags;
-+ u16 fifo_size;
- };
-
- /*
-@@ -466,39 +463,16 @@ static void rspi_dma_complete(void *arg)
- wake_up_interruptible(&rspi->wait);
- }
-
--static int rspi_dma_map_sg(struct scatterlist *sg, const void *buf,
-- unsigned len, struct dma_chan *chan,
-- enum dma_transfer_direction dir)
--{
-- sg_init_table(sg, 1);
-- sg_set_buf(sg, buf, len);
-- sg_dma_len(sg) = len;
-- return dma_map_sg(chan->device->dev, sg, 1, dir);
--}
--
--static void rspi_dma_unmap_sg(struct scatterlist *sg, struct dma_chan *chan,
-- enum dma_transfer_direction dir)
--{
-- dma_unmap_sg(chan->device->dev, sg, 1, dir);
--}
--
- static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- struct scatterlist sg;
-- const void *buf = t->tx_buf;
- struct dma_async_tx_descriptor *desc;
-- unsigned int len = t->len;
-- int ret = 0;
--
-- if (!rspi_dma_map_sg(&sg, buf, len, rspi->chan_tx, DMA_TO_DEVICE))
-- return -EFAULT;
-+ int ret;
-
-- desc = dmaengine_prep_slave_sg(rspi->chan_tx, &sg, 1, DMA_TO_DEVICE,
-+ desc = dmaengine_prep_slave_sg(rspi->master->dma_tx, t->tx_sg.sgl,
-+ t->tx_sg.nents, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc) {
-- ret = -EIO;
-- goto end;
-- }
-+ if (!desc)
-+ return -EIO;
-
- /*
- * DMAC needs SPTIE, but if SPTIE is set, this IRQ routine will be
-@@ -513,7 +487,7 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- desc->callback = rspi_dma_complete;
- desc->callback_param = rspi;
- dmaengine_submit(desc);
-- dma_async_issue_pending(rspi->chan_tx);
-+ dma_async_issue_pending(rspi->master->dma_tx);
-
- ret = wait_event_interruptible_timeout(rspi->wait,
- rspi->dma_callbacked, HZ);
-@@ -524,9 +498,6 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- rspi_disable_irq(rspi, SPCR_SPTIE);
-
- enable_irq(rspi->tx_irq);
--
--end:
-- rspi_dma_unmap_sg(&sg, rspi->chan_tx, DMA_TO_DEVICE);
- return ret;
- }
-
-@@ -562,39 +533,22 @@ static void qspi_receive_init(const struct rspi_data *rspi)
-
- static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- {
-- struct scatterlist sg_rx, sg_tx;
-- const void *tx_buf = t->tx_buf;
-- void *rx_buf = t->rx_buf;
- struct dma_async_tx_descriptor *desc_tx, *desc_rx;
-- unsigned int len = t->len;
-- int ret = 0;
-+ int ret;
-
- /* prepare transmit transfer */
-- if (!rspi_dma_map_sg(&sg_tx, tx_buf, len, rspi->chan_tx,
-- DMA_TO_DEVICE))
-- return -EFAULT;
--
-- desc_tx = dmaengine_prep_slave_sg(rspi->chan_tx, &sg_tx, 1,
-- DMA_TO_DEVICE, DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_tx) {
-- ret = -EIO;
-- goto end_tx_mapped;
-- }
-+ desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx, t->tx_sg.sgl,
-+ t->tx_sg.nents, DMA_TO_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_tx)
-+ return -EIO;
-
- /* prepare receive transfer */
-- if (!rspi_dma_map_sg(&sg_rx, rx_buf, len, rspi->chan_rx,
-- DMA_FROM_DEVICE)) {
-- ret = -EFAULT;
-- goto end_tx_mapped;
--
-- }
-- desc_rx = dmaengine_prep_slave_sg(rspi->chan_rx, &sg_rx, 1,
-- DMA_FROM_DEVICE,
-+ desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx, t->rx_sg.sgl,
-+ t->rx_sg.nents, DMA_FROM_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_rx) {
-- ret = -EIO;
-- goto end;
-- }
-+ if (!desc_rx)
-+ return -EIO;
-
- rspi_receive_init(rspi);
-
-@@ -613,11 +567,11 @@ static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- desc_rx->callback = rspi_dma_complete;
- desc_rx->callback_param = rspi;
- dmaengine_submit(desc_rx);
-- dma_async_issue_pending(rspi->chan_rx);
-+ dma_async_issue_pending(rspi->master->dma_rx);
-
- desc_tx->callback = NULL; /* No callback */
- dmaengine_submit(desc_tx);
-- dma_async_issue_pending(rspi->chan_tx);
-+ dma_async_issue_pending(rspi->master->dma_tx);
-
- ret = wait_event_interruptible_timeout(rspi->wait,
- rspi->dma_callbacked, HZ);
-@@ -631,19 +585,21 @@ static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- if (rspi->rx_irq != rspi->tx_irq)
- enable_irq(rspi->rx_irq);
-
--end:
-- rspi_dma_unmap_sg(&sg_rx, rspi->chan_rx, DMA_FROM_DEVICE);
--end_tx_mapped:
-- rspi_dma_unmap_sg(&sg_tx, rspi->chan_tx, DMA_TO_DEVICE);
- return ret;
- }
-
--static int rspi_is_dma(const struct rspi_data *rspi, struct spi_transfer *t)
-+static bool __rspi_can_dma(const struct rspi_data *rspi,
-+ const struct spi_transfer *xfer)
- {
-- if (rspi->chan_tx)
-- return 1;
-+ return xfer->len > rspi->ops->fifo_size;
-+}
-
-- return 0;
-+static bool rspi_can_dma(struct spi_master *master, struct spi_device *spi,
-+ struct spi_transfer *xfer)
-+{
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
-+
-+ return __rspi_can_dma(rspi, xfer);
- }
-
- static int rspi_transfer_out_in(struct rspi_data *rspi,
-@@ -676,7 +632,7 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-
-- if (!rspi_is_dma(rspi, xfer))
-+ if (!master->can_dma || !__rspi_can_dma(rspi, xfer))
- return rspi_transfer_out_in(rspi, xfer);
-
- if (xfer->rx_buf)
-@@ -976,7 +932,7 @@ static struct dma_chan *rspi_request_dma_chan(struct device *dev,
- return chan;
- }
-
--static int rspi_request_dma(struct device *dev, struct rspi_data *rspi,
-+static int rspi_request_dma(struct device *dev, struct spi_master *master,
- const struct resource *res)
- {
- const struct rspi_plat_data *rspi_pd = dev_get_platdata(dev);
-@@ -984,31 +940,32 @@ static int rspi_request_dma(struct device *dev, struct rspi_data *rspi,
- if (!rspi_pd || !rspi_pd->dma_rx_id || !rspi_pd->dma_tx_id)
- return 0; /* The driver assumes no error. */
-
-- rspi->chan_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM,
-- rspi_pd->dma_rx_id,
-- res->start + RSPI_SPDR);
-- if (!rspi->chan_rx)
-+ master->dma_rx = rspi_request_dma_chan(dev, DMA_DEV_TO_MEM,
-+ rspi_pd->dma_rx_id,
-+ res->start + RSPI_SPDR);
-+ if (!master->dma_rx)
- return -ENODEV;
-
-- rspi->chan_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV,
-- rspi_pd->dma_tx_id,
-- res->start + RSPI_SPDR);
-- if (!rspi->chan_tx) {
-- dma_release_channel(rspi->chan_rx);
-- rspi->chan_rx = NULL;
-+ master->dma_tx = rspi_request_dma_chan(dev, DMA_MEM_TO_DEV,
-+ rspi_pd->dma_tx_id,
-+ res->start + RSPI_SPDR);
-+ if (!master->dma_tx) {
-+ dma_release_channel(master->dma_rx);
-+ master->dma_rx = NULL;
- return -ENODEV;
- }
-
-+ master->can_dma = rspi_can_dma;
- dev_info(dev, "DMA available");
- return 0;
- }
-
- static void rspi_release_dma(struct rspi_data *rspi)
- {
-- if (rspi->chan_tx)
-- dma_release_channel(rspi->chan_tx);
-- if (rspi->chan_rx)
-- dma_release_channel(rspi->chan_rx);
-+ if (rspi->master->dma_tx)
-+ dma_release_channel(rspi->master->dma_tx);
-+ if (rspi->master->dma_rx)
-+ dma_release_channel(rspi->master->dma_rx);
- }
-
- static int rspi_remove(struct platform_device *pdev)
-@@ -1026,6 +983,7 @@ static const struct spi_ops rspi_ops = {
- .transfer_one = rspi_transfer_one,
- .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
- .flags = SPI_MASTER_MUST_TX,
-+ .fifo_size = 8,
- };
-
- static const struct spi_ops rspi_rz_ops = {
-@@ -1033,6 +991,7 @@ static const struct spi_ops rspi_rz_ops = {
- .transfer_one = rspi_rz_transfer_one,
- .mode_bits = SPI_CPHA | SPI_CPOL | SPI_LOOP,
- .flags = SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX,
-+ .fifo_size = 8, /* 8 for TX, 32 for RX */
- };
-
- static const struct spi_ops qspi_ops = {
-@@ -1042,6 +1001,7 @@ static const struct spi_ops qspi_ops = {
- SPI_TX_DUAL | SPI_TX_QUAD |
- SPI_RX_DUAL | SPI_RX_QUAD,
- .flags = SPI_MASTER_MUST_RX | SPI_MASTER_MUST_TX,
-+ .fifo_size = 32,
- };
-
- #ifdef CONFIG_OF
-@@ -1199,7 +1159,7 @@ static int rspi_probe(struct platform_device *pdev)
- goto error2;
- }
-
-- ret = rspi_request_dma(&pdev->dev, rspi, res);
-+ ret = rspi_request_dma(&pdev->dev, master, res);
- if (ret < 0)
- dev_warn(&pdev->dev, "DMA not available, using PIO\n");
-
---
-2.1.2
-
diff --git a/patches.renesas/0478-spi-rspi-Move-RSPI-specific-setup-out-of-DMA-routine.patch b/patches.renesas/0478-spi-rspi-Move-RSPI-specific-setup-out-of-DMA-routine.patch
deleted file mode 100644
index b90c660577296..0000000000000
--- a/patches.renesas/0478-spi-rspi-Move-RSPI-specific-setup-out-of-DMA-routine.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From b766f05dda90bf0eb96929d618f6dff567c23b4d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:13 +0200
-Subject: spi: rspi: Move RSPI-specific setup out of DMA routines
-
-Refactor RSPI (on SH) DMA handling to make it reusable for other RSPI
-implementations:
- - Call the DMA routines after configuring the TX Mode bit and after
- calling rspi_receive_init(), so these RSPI-specific operations can be
- removed from the DMA routines,
- - Absorb rspi_transfer_out_in() into rspi_transfer_one().
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8393fa787bf63c05cb6f9cf0a58ba1ea213c3f01)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 30 ++++++++++--------------------
- 1 file changed, 10 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 753ac7bdfd55..3dea8adfdcf3 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -480,7 +480,6 @@ static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
- */
- disable_irq(rspi->tx_irq);
-
-- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) | SPCR_TXMD, RSPI_SPCR);
- rspi_enable_irq(rspi, SPCR_SPTIE);
- rspi->dma_callbacked = 0;
-
-@@ -550,8 +549,6 @@ static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- if (!desc_rx)
- return -EIO;
-
-- rspi_receive_init(rspi);
--
- /*
- * DMAC needs SPTIE, but if SPTIE is set, this IRQ routine will be
- * called. So, this driver disables the IRQ while DMA transfer.
-@@ -560,7 +557,6 @@ static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
- if (rspi->rx_irq != rspi->tx_irq)
- disable_irq(rspi->rx_irq);
-
-- rspi_write8(rspi, rspi_read8(rspi, RSPI_SPCR) & ~SPCR_TXMD, RSPI_SPCR);
- rspi_enable_irq(rspi, SPCR_SPTIE | SPCR_SPRIE);
- rspi->dma_callbacked = 0;
-
-@@ -602,9 +598,10 @@ static bool rspi_can_dma(struct spi_master *master, struct spi_device *spi,
- return __rspi_can_dma(rspi, xfer);
- }
-
--static int rspi_transfer_out_in(struct rspi_data *rspi,
-- struct spi_transfer *xfer)
-+static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-+ struct spi_transfer *xfer)
- {
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
- u8 spcr;
- int ret;
-
-@@ -617,6 +614,13 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- }
- rspi_write8(rspi, spcr, RSPI_SPCR);
-
-+ if (master->can_dma && __rspi_can_dma(rspi, xfer)) {
-+ if (xfer->rx_buf)
-+ return rspi_send_receive_dma(rspi, xfer);
-+ else
-+ return rspi_send_dma(rspi, xfer);
-+ }
-+
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
- if (ret < 0)
- return ret;
-@@ -627,20 +631,6 @@ static int rspi_transfer_out_in(struct rspi_data *rspi,
- return 0;
- }
-
--static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-- struct spi_transfer *xfer)
--{
-- struct rspi_data *rspi = spi_master_get_devdata(master);
--
-- if (!master->can_dma || !__rspi_can_dma(rspi, xfer))
-- return rspi_transfer_out_in(rspi, xfer);
--
-- if (xfer->rx_buf)
-- return rspi_send_receive_dma(rspi, xfer);
-- else
-- return rspi_send_dma(rspi, xfer);
--}
--
- static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
---
-2.1.2
-
diff --git a/patches.renesas/0479-spi-rspi-Pass-sg_tables-instead-of-spi_tranfer-to-rs.patch b/patches.renesas/0479-spi-rspi-Pass-sg_tables-instead-of-spi_tranfer-to-rs.patch
deleted file mode 100644
index f2abdd26761ea..0000000000000
--- a/patches.renesas/0479-spi-rspi-Pass-sg_tables-instead-of-spi_tranfer-to-rs.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From d98f94e92c37faf323e3f547d46768eec34ebca1 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:14 +0200
-Subject: spi: rspi: Pass sg_tables instead of spi_tranfer to rspi_*_dma()
-
-The DMA routines only need access to the scatter-gather tables inside the
-spi_transfer structures, hence just pass those.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e4b52dc4625ee739195189d40c6ddc7d55ddf312)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 22 ++++++++++++----------
- 1 file changed, 12 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 3dea8adfdcf3..bfa5e7e5df5a 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -463,13 +463,13 @@ static void rspi_dma_complete(void *arg)
- wake_up_interruptible(&rspi->wait);
- }
-
--static int rspi_send_dma(struct rspi_data *rspi, struct spi_transfer *t)
-+static int rspi_send_dma(struct rspi_data *rspi, struct sg_table *tx)
- {
- struct dma_async_tx_descriptor *desc;
- int ret;
-
-- desc = dmaengine_prep_slave_sg(rspi->master->dma_tx, t->tx_sg.sgl,
-- t->tx_sg.nents, DMA_TO_DEVICE,
-+ desc = dmaengine_prep_slave_sg(rspi->master->dma_tx, tx->sgl,
-+ tx->nents, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc)
- return -EIO;
-@@ -530,21 +530,22 @@ static void qspi_receive_init(const struct rspi_data *rspi)
- rspi_write8(rspi, 0, QSPI_SPBFCR);
- }
-
--static int rspi_send_receive_dma(struct rspi_data *rspi, struct spi_transfer *t)
-+static int rspi_send_receive_dma(struct rspi_data *rspi, struct sg_table *tx,
-+ struct sg_table *rx)
- {
- struct dma_async_tx_descriptor *desc_tx, *desc_rx;
- int ret;
-
- /* prepare transmit transfer */
-- desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx, t->tx_sg.sgl,
-- t->tx_sg.nents, DMA_TO_DEVICE,
-+ desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx, tx->sgl,
-+ tx->nents, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc_tx)
- return -EIO;
-
- /* prepare receive transfer */
-- desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx, t->rx_sg.sgl,
-- t->rx_sg.nents, DMA_FROM_DEVICE,
-+ desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx, rx->sgl,
-+ rx->nents, DMA_FROM_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc_rx)
- return -EIO;
-@@ -616,9 +617,10 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
-
- if (master->can_dma && __rspi_can_dma(rspi, xfer)) {
- if (xfer->rx_buf)
-- return rspi_send_receive_dma(rspi, xfer);
-+ return rspi_send_receive_dma(rspi, &xfer->tx_sg,
-+ &xfer->rx_sg);
- else
-- return rspi_send_dma(rspi, xfer);
-+ return rspi_send_dma(rspi, &xfer->tx_sg);
- }
-
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
---
-2.1.2
-
diff --git a/patches.renesas/0480-spi-rspi-Merge-rspi_-_dma-into-rspi_dma_transfer.patch b/patches.renesas/0480-spi-rspi-Merge-rspi_-_dma-into-rspi_dma_transfer.patch
deleted file mode 100644
index c3aa9f3466ef8..0000000000000
--- a/patches.renesas/0480-spi-rspi-Merge-rspi_-_dma-into-rspi_dma_transfer.patch
+++ /dev/null
@@ -1,206 +0,0 @@
-From f03fe9bf498b3a767392d34ad1da78d302c8d748 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:15 +0200
-Subject: spi: rspi: Merge rspi_*_dma() into rspi_dma_transfer()
-
-rspi_send_dma() and rspi_send_receive_dma() are very similar. Consolidate
-into a single function rspi_dma_transfer(), and add missing checks for
-dmaengine_submit() failures.
-
-Both sg_table pointer parameters can be NULL, as RSPI supports TX-only
-mode, and unidirectional DMA transfers will also be needed later for
-Dual/Quad DMA support.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c52fb6d63425248bd4152451a2cc74b7df8fa989)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 139 ++++++++++++++++++++++---------------------------
- 1 file changed, 61 insertions(+), 78 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index bfa5e7e5df5a..c77cfe654b0e 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -463,30 +463,67 @@ static void rspi_dma_complete(void *arg)
- wake_up_interruptible(&rspi->wait);
- }
-
--static int rspi_send_dma(struct rspi_data *rspi, struct sg_table *tx)
-+static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
-+ struct sg_table *rx)
- {
-- struct dma_async_tx_descriptor *desc;
-+ struct dma_async_tx_descriptor *desc_tx = NULL, *desc_rx = NULL;
-+ u8 irq_mask = 0;
-+ unsigned int other_irq = 0;
-+ dma_cookie_t cookie;
- int ret;
-
-- desc = dmaengine_prep_slave_sg(rspi->master->dma_tx, tx->sgl,
-- tx->nents, DMA_TO_DEVICE,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc)
-- return -EIO;
-+ if (tx) {
-+ desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx,
-+ tx->sgl, tx->nents, DMA_TO_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_tx)
-+ return -EIO;
-+
-+ irq_mask |= SPCR_SPTIE;
-+ }
-+ if (rx) {
-+ desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx,
-+ rx->sgl, rx->nents, DMA_FROM_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_rx)
-+ return -EIO;
-+
-+ irq_mask |= SPCR_SPRIE;
-+ }
-
- /*
-- * DMAC needs SPTIE, but if SPTIE is set, this IRQ routine will be
-+ * DMAC needs SPxIE, but if SPxIE is set, the IRQ routine will be
- * called. So, this driver disables the IRQ while DMA transfer.
- */
-- disable_irq(rspi->tx_irq);
-+ if (tx)
-+ disable_irq(other_irq = rspi->tx_irq);
-+ if (rx && rspi->rx_irq != other_irq)
-+ disable_irq(rspi->rx_irq);
-
-- rspi_enable_irq(rspi, SPCR_SPTIE);
-+ rspi_enable_irq(rspi, irq_mask);
- rspi->dma_callbacked = 0;
-
-- desc->callback = rspi_dma_complete;
-- desc->callback_param = rspi;
-- dmaengine_submit(desc);
-- dma_async_issue_pending(rspi->master->dma_tx);
-+ if (rx) {
-+ desc_rx->callback = rspi_dma_complete;
-+ desc_rx->callback_param = rspi;
-+ cookie = dmaengine_submit(desc_rx);
-+ if (dma_submit_error(cookie))
-+ return cookie;
-+ dma_async_issue_pending(rspi->master->dma_rx);
-+ }
-+ if (tx) {
-+ if (rx) {
-+ /* No callback */
-+ desc_tx->callback = NULL;
-+ } else {
-+ desc_tx->callback = rspi_dma_complete;
-+ desc_tx->callback_param = rspi;
-+ }
-+ cookie = dmaengine_submit(desc_tx);
-+ if (dma_submit_error(cookie))
-+ return cookie;
-+ dma_async_issue_pending(rspi->master->dma_tx);
-+ }
-
- ret = wait_event_interruptible_timeout(rspi->wait,
- rspi->dma_callbacked, HZ);
-@@ -494,9 +531,14 @@ static int rspi_send_dma(struct rspi_data *rspi, struct sg_table *tx)
- ret = 0;
- else if (!ret)
- ret = -ETIMEDOUT;
-- rspi_disable_irq(rspi, SPCR_SPTIE);
-
-- enable_irq(rspi->tx_irq);
-+ rspi_disable_irq(rspi, irq_mask);
-+
-+ if (tx)
-+ enable_irq(rspi->tx_irq);
-+ if (rx && rspi->rx_irq != other_irq)
-+ enable_irq(rspi->rx_irq);
-+
- return ret;
- }
-
-@@ -530,61 +572,6 @@ static void qspi_receive_init(const struct rspi_data *rspi)
- rspi_write8(rspi, 0, QSPI_SPBFCR);
- }
-
--static int rspi_send_receive_dma(struct rspi_data *rspi, struct sg_table *tx,
-- struct sg_table *rx)
--{
-- struct dma_async_tx_descriptor *desc_tx, *desc_rx;
-- int ret;
--
-- /* prepare transmit transfer */
-- desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx, tx->sgl,
-- tx->nents, DMA_TO_DEVICE,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_tx)
-- return -EIO;
--
-- /* prepare receive transfer */
-- desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx, rx->sgl,
-- rx->nents, DMA_FROM_DEVICE,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_rx)
-- return -EIO;
--
-- /*
-- * DMAC needs SPTIE, but if SPTIE is set, this IRQ routine will be
-- * called. So, this driver disables the IRQ while DMA transfer.
-- */
-- disable_irq(rspi->tx_irq);
-- if (rspi->rx_irq != rspi->tx_irq)
-- disable_irq(rspi->rx_irq);
--
-- rspi_enable_irq(rspi, SPCR_SPTIE | SPCR_SPRIE);
-- rspi->dma_callbacked = 0;
--
-- desc_rx->callback = rspi_dma_complete;
-- desc_rx->callback_param = rspi;
-- dmaengine_submit(desc_rx);
-- dma_async_issue_pending(rspi->master->dma_rx);
--
-- desc_tx->callback = NULL; /* No callback */
-- dmaengine_submit(desc_tx);
-- dma_async_issue_pending(rspi->master->dma_tx);
--
-- ret = wait_event_interruptible_timeout(rspi->wait,
-- rspi->dma_callbacked, HZ);
-- if (ret > 0 && rspi->dma_callbacked)
-- ret = 0;
-- else if (!ret)
-- ret = -ETIMEDOUT;
-- rspi_disable_irq(rspi, SPCR_SPTIE | SPCR_SPRIE);
--
-- enable_irq(rspi->tx_irq);
-- if (rspi->rx_irq != rspi->tx_irq)
-- enable_irq(rspi->rx_irq);
--
-- return ret;
--}
--
- static bool __rspi_can_dma(const struct rspi_data *rspi,
- const struct spi_transfer *xfer)
- {
-@@ -615,13 +602,9 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- }
- rspi_write8(rspi, spcr, RSPI_SPCR);
-
-- if (master->can_dma && __rspi_can_dma(rspi, xfer)) {
-- if (xfer->rx_buf)
-- return rspi_send_receive_dma(rspi, &xfer->tx_sg,
-- &xfer->rx_sg);
-- else
-- return rspi_send_dma(rspi, &xfer->tx_sg);
-- }
-+ if (master->can_dma && __rspi_can_dma(rspi, xfer))
-+ return rspi_dma_transfer(rspi, &xfer->tx_sg,
-+ xfer->rx_buf ? &xfer->rx_sg : NULL);
-
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
- if (ret < 0)
---
-2.1.2
-
diff --git a/patches.renesas/0481-spi-rspi-Absorb-rspi_rz_transfer_out_in-into-rspi_rz.patch b/patches.renesas/0481-spi-rspi-Absorb-rspi_rz_transfer_out_in-into-rspi_rz.patch
deleted file mode 100644
index 2f6c095c01b4c..0000000000000
--- a/patches.renesas/0481-spi-rspi-Absorb-rspi_rz_transfer_out_in-into-rspi_rz.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 3cd12523509abb5ec4ffe59e0cb204e9b6e54f7c Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:16 +0200
-Subject: spi: rspi: Absorb rspi_rz_transfer_out_in() into
- rspi_rz_transfer_one()
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 03e627c55752fa434d5b3eba5ee3e489c51672b6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 15 ++++-----------
- 1 file changed, 4 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index c77cfe654b0e..b7f8be81423b 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -616,9 +616,11 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- return 0;
- }
-
--static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
-- struct spi_transfer *xfer)
-+static int rspi_rz_transfer_one(struct spi_master *master,
-+ struct spi_device *spi,
-+ struct spi_transfer *xfer)
- {
-+ struct rspi_data *rspi = spi_master_get_devdata(master);
- int ret;
-
- rspi_rz_receive_init(rspi);
-@@ -633,15 +635,6 @@ static int rspi_rz_transfer_out_in(struct rspi_data *rspi,
- return 0;
- }
-
--static int rspi_rz_transfer_one(struct spi_master *master,
-- struct spi_device *spi,
-- struct spi_transfer *xfer)
--{
-- struct rspi_data *rspi = spi_master_get_devdata(master);
--
-- return rspi_rz_transfer_out_in(rspi, xfer);
--}
--
- static int qspi_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
---
-2.1.2
-
diff --git a/patches.renesas/0482-spi-rspi-Add-DMA-support-for-QSPI-on-R-Car-Gen2.patch b/patches.renesas/0482-spi-rspi-Add-DMA-support-for-QSPI-on-R-Car-Gen2.patch
deleted file mode 100644
index df0f2085eb8c4..0000000000000
--- a/patches.renesas/0482-spi-rspi-Add-DMA-support-for-QSPI-on-R-Car-Gen2.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 019e3a201fcc178b58e63806c37353e7055df877 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:17 +0200
-Subject: spi: rspi: Add DMA support for QSPI on R-Car Gen2
-
-Enable DMA support for QSPI on R-Car Gen2, for Single, Dual, and Quad SPI
-Transfers.
-
-Performance figures for reading from a QSPI FLASH driven at 24.375 MHz
-on r8a7791/koelsch:
- - Single: 1.1 Mbps PIO, 23 Mbps DMA
- - Dual : 12.7 Mbps PIO, 48 Mbps DMA
- - Quad : 13 Mbps PIO, 70 Mbps DMA
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 4f12b5e529e4ff274eb478ec1c2ef41358ed9577)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index b7f8be81423b..bec81470dd9c 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -642,6 +642,9 @@ static int qspi_transfer_out_in(struct rspi_data *rspi,
-
- qspi_receive_init(rspi);
-
-+ if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer))
-+ return rspi_dma_transfer(rspi, &xfer->tx_sg, &xfer->rx_sg);
-+
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
- if (ret < 0)
- return ret;
-@@ -656,6 +659,9 @@ static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
- {
- int ret;
-
-+ if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer))
-+ return rspi_dma_transfer(rspi, &xfer->tx_sg, NULL);
-+
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, NULL, xfer->len);
- if (ret < 0)
- return ret;
-@@ -668,6 +674,9 @@ static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
-
- static int qspi_transfer_in(struct rspi_data *rspi, struct spi_transfer *xfer)
- {
-+ if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer))
-+ return rspi_dma_transfer(rspi, NULL, &xfer->rx_sg);
-+
- return rspi_pio_transfer(rspi, NULL, xfer->rx_buf, xfer->len);
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0483-spi-rspi-Add-DMA-support-for-RSPI-on-RZ-A1H.patch b/patches.renesas/0483-spi-rspi-Add-DMA-support-for-RSPI-on-RZ-A1H.patch
deleted file mode 100644
index ca47f3255b3df..0000000000000
--- a/patches.renesas/0483-spi-rspi-Add-DMA-support-for-RSPI-on-RZ-A1H.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e56d4fdbae55f9daa5dedb7af34fb2310cb7192b Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:18 +0200
-Subject: spi: rspi: Add DMA support for RSPI on RZ/A1H
-
-Enable DMA support for RSPI on r7s72100 (RZ/A1H).
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e7fb921d9f62df05240ad1a74b5a0f623e503c9c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index bec81470dd9c..4bc4138e002b 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -625,6 +625,9 @@ static int rspi_rz_transfer_one(struct spi_master *master,
-
- rspi_rz_receive_init(rspi);
-
-+ if (master->can_dma && __rspi_can_dma(rspi, xfer))
-+ return rspi_dma_transfer(rspi, &xfer->tx_sg, &xfer->rx_sg);
-+
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
- if (ret < 0)
- return ret;
---
-2.1.2
-
diff --git a/patches.renesas/0484-spi-rspi-Extract-rspi_common_transfer.patch b/patches.renesas/0484-spi-rspi-Extract-rspi_common_transfer.patch
deleted file mode 100644
index c3e57a4e6918e..0000000000000
--- a/patches.renesas/0484-spi-rspi-Extract-rspi_common_transfer.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 2c539bf067e77137af2ecd1ccdb5801e57ffdae5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:38:19 +0200
-Subject: spi: rspi: Extract rspi_common_transfer()
-
-Extract the common parts of rspi_transfer_one(), rspi_rz_transfer_one(),
-and qspi_transfer_out_in() into the new function rspi_common_transfer().
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8b983e90ea1a3dd82070f96c062ad521a06b7cc0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 61 ++++++++++++++++++++------------------------------
- 1 file changed, 24 insertions(+), 37 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 4bc4138e002b..10112745bb17 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -586,12 +586,32 @@ static bool rspi_can_dma(struct spi_master *master, struct spi_device *spi,
- return __rspi_can_dma(rspi, xfer);
- }
-
-+static int rspi_common_transfer(struct rspi_data *rspi,
-+ struct spi_transfer *xfer)
-+{
-+ int ret;
-+
-+ if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer)) {
-+ /* rx_buf can be NULL on RSPI on SH in TX-only Mode */
-+ return rspi_dma_transfer(rspi, &xfer->tx_sg,
-+ xfer->rx_buf ? &xfer->rx_sg : NULL);
-+ }
-+
-+ ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-+ if (ret < 0)
-+ return ret;
-+
-+ /* Wait for the last transmission */
-+ rspi_wait_for_tx_empty(rspi);
-+
-+ return 0;
-+}
-+
- static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- struct spi_transfer *xfer)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
- u8 spcr;
-- int ret;
-
- spcr = rspi_read8(rspi, RSPI_SPCR);
- if (xfer->rx_buf) {
-@@ -602,18 +622,7 @@ static int rspi_transfer_one(struct spi_master *master, struct spi_device *spi,
- }
- rspi_write8(rspi, spcr, RSPI_SPCR);
-
-- if (master->can_dma && __rspi_can_dma(rspi, xfer))
-- return rspi_dma_transfer(rspi, &xfer->tx_sg,
-- xfer->rx_buf ? &xfer->rx_sg : NULL);
--
-- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-- if (ret < 0)
-- return ret;
--
-- /* Wait for the last transmission */
-- rspi_wait_for_tx_empty(rspi);
--
-- return 0;
-+ return rspi_common_transfer(rspi, xfer);
- }
-
- static int rspi_rz_transfer_one(struct spi_master *master,
-@@ -625,37 +634,15 @@ static int rspi_rz_transfer_one(struct spi_master *master,
-
- rspi_rz_receive_init(rspi);
-
-- if (master->can_dma && __rspi_can_dma(rspi, xfer))
-- return rspi_dma_transfer(rspi, &xfer->tx_sg, &xfer->rx_sg);
--
-- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-- if (ret < 0)
-- return ret;
--
-- /* Wait for the last transmission */
-- rspi_wait_for_tx_empty(rspi);
--
-- return 0;
-+ return rspi_common_transfer(rspi, xfer);
- }
-
- static int qspi_transfer_out_in(struct rspi_data *rspi,
- struct spi_transfer *xfer)
- {
-- int ret;
--
- qspi_receive_init(rspi);
-
-- if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer))
-- return rspi_dma_transfer(rspi, &xfer->tx_sg, &xfer->rx_sg);
--
-- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-- if (ret < 0)
-- return ret;
--
-- /* Wait for the last transmission */
-- rspi_wait_for_tx_empty(rspi);
--
-- return 0;
-+ return rspi_common_transfer(rspi, xfer);
- }
-
- static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
---
-2.1.2
-
diff --git a/patches.renesas/0485-ASoC-ak4642-Fix-typo-zoro-zero.patch b/patches.renesas/0485-ASoC-ak4642-Fix-typo-zoro-zero.patch
deleted file mode 100644
index 11ad046c1b990..0000000000000
--- a/patches.renesas/0485-ASoC-ak4642-Fix-typo-zoro-zero.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From fa588c118c6d93e70244437cc6799bca403fd0d2 Mon Sep 17 00:00:00 2001
-From: Sascha Hauer <s.hauer@pengutronix.de>
-Date: Wed, 14 May 2014 09:37:33 +0200
-Subject: ASoC: ak4642: Fix typo zoro -> zero
-
-Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit da731845d5b47c517876cb70884789aafa00771b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/codecs/ak4642.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
-index 86242f770c10..647be66078ec 100644
---- a/sound/soc/codecs/ak4642.c
-+++ b/sound/soc/codecs/ak4642.c
-@@ -98,7 +98,7 @@
- #define MGAIN0 (1 << 0) /* MIC amp gain*/
-
- /* TIMER */
--#define ZTM(param) ((param & 0x3) << 4) /* ALC Zoro Crossing TimeOut */
-+#define ZTM(param) ((param & 0x3) << 4) /* ALC Zero Crossing TimeOut */
- #define WTM(param) (((param & 0x4) << 4) | ((param & 0x3) << 2))
-
- /* ALC_CTL1 */
---
-2.1.2
-
diff --git a/patches.renesas/0486-pwm-add-period-and-polarity-to-struct-pwm_lookup.patch b/patches.renesas/0486-pwm-add-period-and-polarity-to-struct-pwm_lookup.patch
deleted file mode 100644
index 6e487739afbed..0000000000000
--- a/patches.renesas/0486-pwm-add-period-and-polarity-to-struct-pwm_lookup.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 790fc89523e52a39e0d2d296d88cad59b1ca8580 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:32 +0200
-Subject: pwm: add period and polarity to struct pwm_lookup
-
-Add period and polarity members to struct pwm_lookup so that platforms
-using the lookup table can be treated the same way as those using the
-device tree.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 3796ce1d4d4b330a75005c5eda105603ce9d4071)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pwm/core.c | 8 +++++++-
- include/linux/pwm.h | 2 ++
- 2 files changed, 9 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c
-index a80471399c20..4b66bf09ee55 100644
---- a/drivers/pwm/core.c
-+++ b/drivers/pwm/core.c
-@@ -661,10 +661,16 @@ struct pwm_device *pwm_get(struct device *dev, const char *con_id)
- }
- }
-
-+ mutex_unlock(&pwm_lookup_lock);
-+
- if (chip)
- pwm = pwm_request_from_chip(chip, index, con_id ?: dev_id);
-+ if (IS_ERR(pwm))
-+ return pwm;
-+
-+ pwm_set_period(pwm, p->period);
-+ pwm_set_polarity(pwm, p->polarity);
-
-- mutex_unlock(&pwm_lookup_lock);
-
- return pwm;
- }
-diff --git a/include/linux/pwm.h b/include/linux/pwm.h
-index f0feafd184a0..29ca4572629d 100644
---- a/include/linux/pwm.h
-+++ b/include/linux/pwm.h
-@@ -274,6 +274,8 @@ struct pwm_lookup {
- unsigned int index;
- const char *dev_id;
- const char *con_id;
-+ unsigned int period;
-+ enum pwm_polarity polarity;
- };
-
- #define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \
---
-2.1.2
-
diff --git a/patches.renesas/0487-usb-renesas-gadget-fixup-complete-STATUS-stage-after.patch b/patches.renesas/0487-usb-renesas-gadget-fixup-complete-STATUS-stage-after.patch
deleted file mode 100644
index 87aa7f6357c89..0000000000000
--- a/patches.renesas/0487-usb-renesas-gadget-fixup-complete-STATUS-stage-after.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5f34f219811b5b22e7116425b9a35b875111113c Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 1 Jun 2014 20:31:46 -0700
-Subject: usb: renesas: gadget: fixup: complete STATUS stage after receiving
-
-Current usbhs gadget driver didn't complete STATUS stage after receiving.
-It wasn't problem for us before, because some USB class doesn't use
-DATA OUT stage in control transfer.
-But, it is required on some device.
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit 3fe15505296cb563362e2cf6d3aed73e123e0df0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/fifo.c | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
-index d49f9c326035..4fd36530bfa3 100644
---- a/drivers/usb/renesas_usbhs/fifo.c
-+++ b/drivers/usb/renesas_usbhs/fifo.c
-@@ -681,6 +681,14 @@ usbhs_fifo_read_end:
- usbhs_pipe_number(pipe),
- pkt->length, pkt->actual, *is_done, pkt->zero);
-
-+ /*
-+ * Transmission end
-+ */
-+ if (*is_done) {
-+ if (usbhs_pipe_is_dcp(pipe))
-+ usbhs_dcp_control_transfer_done(pipe);
-+ }
-+
- usbhs_fifo_read_busy:
- usbhsf_fifo_unselect(pipe, fifo);
-
---
-2.1.2
-
diff --git a/patches.renesas/0488-sh_eth-replace-devm_kzalloc-with-devm_kmalloc_array.patch b/patches.renesas/0488-sh_eth-replace-devm_kzalloc-with-devm_kmalloc_array.patch
deleted file mode 100644
index 329979850857e..0000000000000
--- a/patches.renesas/0488-sh_eth-replace-devm_kzalloc-with-devm_kmalloc_array.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 049519721ae82d5c0ac4e4ea7a77190ade532cff Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 13 May 2014 02:30:14 +0400
-Subject: sh_eth: replace devm_kzalloc() with devm_kmalloc_array()
-
-When I was converting the driver to the managed device API, only devm_kzalloc()
-was available for memory allocation, so I had to use it, despite zeroing out the
-PHY IRQ array right before initializing all its entries to PHY_POLL was quite
-stupid. Now that devm_kmalloc_array() has become available, we can avoid the
-needless zeroing out...
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 86b5d251d5ac4dda51a022b34cb29b4ce65a8cd5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 08ed9a30c3a7..2a29caa30479 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2641,8 +2641,8 @@ static int sh_mdio_init(struct sh_eth_private *mdp,
- pdev->name, pdev->id);
-
- /* PHY IRQ */
-- mdp->mii_bus->irq = devm_kzalloc(dev, sizeof(int) * PHY_MAX_ADDR,
-- GFP_KERNEL);
-+ mdp->mii_bus->irq = devm_kmalloc_array(dev, PHY_MAX_ADDR, sizeof(int),
-+ GFP_KERNEL);
- if (!mdp->mii_bus->irq) {
- ret = -ENOMEM;
- goto out_free_bus;
---
-2.1.2
-
diff --git a/patches.renesas/0489-net-sh_eth-Fix-receive-packet-exceeded-condition-in-.patch b/patches.renesas/0489-net-sh_eth-Fix-receive-packet-exceeded-condition-in-.patch
deleted file mode 100644
index 274e3eb12488e..0000000000000
--- a/patches.renesas/0489-net-sh_eth-Fix-receive-packet-exceeded-condition-in-.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6957356d5eb8ab68bb660bfd3384b9ad06bd31cf Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Tue, 10 Jun 2014 09:40:14 +0900
-Subject: net: sh_eth: Fix receive packet "exceeded" condition in sh_eth_rx()
-
-This patch fixes the packet "exceeded" condition in sh_eth_rx() when
-RACT in an RX descriptor is not set and the "quota" is 0.
-Otherwise, kernel panic happens because the "&n->poll_list" is deleted
-twice in sh_eth_poll() which calls napi_complete() and net_rx_action().
-
-Signed-off-by: Kouei Abe <kouei.abe.cp@renesas.com>
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 4f809cea611f1f00a0b7a42751cb12d997a4c11c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 8 +++-----
- 1 file changed, 3 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 2a29caa30479..1b34ac0a2420 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1399,7 +1399,6 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
- int entry = mdp->cur_rx % mdp->num_rx_ring;
- int boguscnt = (mdp->dirty_rx + mdp->num_rx_ring) - mdp->cur_rx;
- struct sk_buff *skb;
-- int exceeded = 0;
- u16 pkt_len = 0;
- u32 desc_status;
-
-@@ -1411,10 +1410,9 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
- if (--boguscnt < 0)
- break;
-
-- if (*quota <= 0) {
-- exceeded = 1;
-+ if (*quota <= 0)
- break;
-- }
-+
- (*quota)--;
-
- if (!(desc_status & RDFEND))
-@@ -1508,7 +1506,7 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
- sh_eth_write(ndev, EDRRR_R, EDRRR);
- }
-
-- return exceeded;
-+ return *quota <= 0;
- }
-
- static void sh_eth_rcv_snd_disable(struct net_device *ndev)
---
-2.1.2
-
diff --git a/patches.renesas/0490-net-sh_eth-Fix-timing-of-RACT-setting-in-sh_eth_rx.patch b/patches.renesas/0490-net-sh_eth-Fix-timing-of-RACT-setting-in-sh_eth_rx.patch
deleted file mode 100644
index 5dda11951fd0c..0000000000000
--- a/patches.renesas/0490-net-sh_eth-Fix-timing-of-RACT-setting-in-sh_eth_rx.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 95182e43d089e4bacb90726bd2c629d7a79df05e Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Tue, 10 Jun 2014 09:40:24 +0900
-Subject: net: sh_eth: Fix timing of RACT setting in sh_eth_rx()
-
-This patch fixes an issue that we cannot use nfs rootfs correctly
-on r8a7790 when the command below runs on a host PC.
-
- $ sudo ping -f -l 8 $BOARD_IP_ADDR
-
-Since the driver sets the RACT to 1 in the first while loop of
-sh_eth_rx(), the controller accepts a next frame into the next RX
-descriptor during the while loop. But, in the first while loop
-doesn't allocate a next skb. So, this patch removes the RACT setting
-in the first while loop of sh_eth_rx().
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 1b72a0fc9c308d9f3255c177945cf383c3c82b0e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 1b34ac0a2420..10af820e1d45 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1460,7 +1460,6 @@ static int sh_eth_rx(struct net_device *ndev, u32 intr_status, int *quota)
- ndev->stats.rx_packets++;
- ndev->stats.rx_bytes += pkt_len;
- }
-- rxdesc->status |= cpu_to_edmac(mdp, RD_RACT);
- entry = (++mdp->cur_rx) % mdp->num_rx_ring;
- rxdesc = &mdp->rx_ring[entry];
- }
---
-2.1.2
-
diff --git a/patches.renesas/0491-PCI-rcar-Add-Renesas-R-Car-PCIe-driver.patch b/patches.renesas/0491-PCI-rcar-Add-Renesas-R-Car-PCIe-driver.patch
deleted file mode 100644
index db28026906d2e..0000000000000
--- a/patches.renesas/0491-PCI-rcar-Add-Renesas-R-Car-PCIe-driver.patch
+++ /dev/null
@@ -1,821 +0,0 @@
-From c951633533e5729e39d98064c78f1c61e21f31eb Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Mon, 12 May 2014 11:57:48 +0100
-Subject: PCI: rcar: Add Renesas R-Car PCIe driver
-
-This PCIe Host driver currently does not support MSI, so cards fall back to
-INTx interrupts.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c25da4778803b41e11fd82dd5576c35c09b5f0e0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/Kconfig | 6 +
- drivers/pci/host/Makefile | 1 +
- drivers/pci/host/pcie-rcar.c | 768 +++++++++++++++++++++++++++++++++++++++++++
- 3 files changed, 775 insertions(+)
- create mode 100644 drivers/pci/host/pcie-rcar.c
-
-diff --git a/drivers/pci/host/Kconfig b/drivers/pci/host/Kconfig
-index 47d46c6d8468..dc627e5b7795 100644
---- a/drivers/pci/host/Kconfig
-+++ b/drivers/pci/host/Kconfig
-@@ -33,4 +33,10 @@ config PCI_RCAR_GEN2
- There are 3 internal PCI controllers available with a single
- built-in EHCI/OHCI host controller present on each one.
-
-+config PCI_RCAR_GEN2_PCIE
-+ bool "Renesas R-Car PCIe controller"
-+ depends on ARCH_SHMOBILE || (ARM && COMPILE_TEST)
-+ help
-+ Say Y here if you want PCIe controller support on R-Car Gen2 SoCs.
-+
- endmenu
-diff --git a/drivers/pci/host/Makefile b/drivers/pci/host/Makefile
-index 13fb3333aa05..19946f9a4521 100644
---- a/drivers/pci/host/Makefile
-+++ b/drivers/pci/host/Makefile
-@@ -4,3 +4,4 @@ obj-$(CONFIG_PCI_IMX6) += pci-imx6.o
- obj-$(CONFIG_PCI_MVEBU) += pci-mvebu.o
- obj-$(CONFIG_PCI_TEGRA) += pci-tegra.o
- obj-$(CONFIG_PCI_RCAR_GEN2) += pci-rcar-gen2.o
-+obj-$(CONFIG_PCI_RCAR_GEN2_PCIE) += pcie-rcar.o
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-new file mode 100644
-index 000000000000..3c524b9e60e5
---- /dev/null
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -0,0 +1,768 @@
-+/*
-+ * PCIe driver for Renesas R-Car SoCs
-+ * Copyright (C) 2014 Renesas Electronics Europe Ltd
-+ *
-+ * Based on:
-+ * arch/sh/drivers/pci/pcie-sh7786.c
-+ * arch/sh/drivers/pci/ops-sh7786.c
-+ * Copyright (C) 2009 - 2011 Paul Mundt
-+ *
-+ * This file is licensed under the terms of the GNU General Public
-+ * License version 2. This program is licensed "as is" without any
-+ * warranty of any kind, whether express or implied.
-+ */
-+
-+#include <linux/clk.h>
-+#include <linux/delay.h>
-+#include <linux/interrupt.h>
-+#include <linux/kernel.h>
-+#include <linux/module.h>
-+#include <linux/of_address.h>
-+#include <linux/of_irq.h>
-+#include <linux/of_pci.h>
-+#include <linux/of_platform.h>
-+#include <linux/pci.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+
-+#define DRV_NAME "rcar-pcie"
-+
-+#define PCIECAR 0x000010
-+#define PCIECCTLR 0x000018
-+#define CONFIG_SEND_ENABLE (1 << 31)
-+#define TYPE0 (0 << 8)
-+#define TYPE1 (1 << 8)
-+#define PCIECDR 0x000020
-+#define PCIEMSR 0x000028
-+#define PCIEINTXR 0x000400
-+
-+/* Transfer control */
-+#define PCIETCTLR 0x02000
-+#define CFINIT 1
-+#define PCIETSTR 0x02004
-+#define DATA_LINK_ACTIVE 1
-+#define PCIEERRFR 0x02020
-+#define UNSUPPORTED_REQUEST (1 << 4)
-+
-+/* root port address */
-+#define PCIEPRAR(x) (0x02080 + ((x) * 0x4))
-+
-+/* local address reg & mask */
-+#define PCIELAR(x) (0x02200 + ((x) * 0x20))
-+#define PCIELAMR(x) (0x02208 + ((x) * 0x20))
-+#define LAM_PREFETCH (1 << 3)
-+#define LAM_64BIT (1 << 2)
-+#define LAR_ENABLE (1 << 1)
-+
-+/* PCIe address reg & mask */
-+#define PCIEPARL(x) (0x03400 + ((x) * 0x20))
-+#define PCIEPARH(x) (0x03404 + ((x) * 0x20))
-+#define PCIEPAMR(x) (0x03408 + ((x) * 0x20))
-+#define PCIEPTCTLR(x) (0x0340c + ((x) * 0x20))
-+#define PAR_ENABLE (1 << 31)
-+#define IO_SPACE (1 << 8)
-+
-+/* Configuration */
-+#define PCICONF(x) (0x010000 + ((x) * 0x4))
-+#define PMCAP(x) (0x010040 + ((x) * 0x4))
-+#define EXPCAP(x) (0x010070 + ((x) * 0x4))
-+#define VCCAP(x) (0x010100 + ((x) * 0x4))
-+
-+/* link layer */
-+#define IDSETR1 0x011004
-+#define TLCTLR 0x011048
-+#define MACSR 0x011054
-+#define MACCTLR 0x011058
-+#define SCRAMBLE_DISABLE (1 << 27)
-+
-+/* R-Car H1 PHY */
-+#define H1_PCIEPHYADRR 0x04000c
-+#define WRITE_CMD (1 << 16)
-+#define PHY_ACK (1 << 24)
-+#define RATE_POS 12
-+#define LANE_POS 8
-+#define ADR_POS 0
-+#define H1_PCIEPHYDOUTR 0x040014
-+#define H1_PCIEPHYSR 0x040018
-+
-+#define RCONF(x) (PCICONF(0)+(x))
-+#define RPMCAP(x) (PMCAP(0)+(x))
-+#define REXPCAP(x) (EXPCAP(0)+(x))
-+#define RVCCAP(x) (VCCAP(0)+(x))
-+
-+#define PCIE_CONF_BUS(b) (((b) & 0xff) << 24)
-+#define PCIE_CONF_DEV(d) (((d) & 0x1f) << 19)
-+#define PCIE_CONF_FUNC(f) (((f) & 0x7) << 16)
-+
-+#define PCI_MAX_RESOURCES 4
-+#define MAX_NR_INBOUND_MAPS 6
-+
-+/* Structure representing the PCIe interface */
-+struct rcar_pcie {
-+ struct device *dev;
-+ void __iomem *base;
-+ struct resource res[PCI_MAX_RESOURCES];
-+ struct resource busn;
-+ int root_bus_nr;
-+ struct clk *clk;
-+ struct clk *bus_clk;
-+};
-+
-+static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
-+{
-+ return sys->private_data;
-+}
-+
-+static void pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
-+ unsigned long reg)
-+{
-+ writel(val, pcie->base + reg);
-+}
-+
-+static unsigned long pci_read_reg(struct rcar_pcie *pcie, unsigned long reg)
-+{
-+ return readl(pcie->base + reg);
-+}
-+
-+enum {
-+ PCI_ACCESS_READ,
-+ PCI_ACCESS_WRITE,
-+};
-+
-+static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
-+{
-+ int shift = 8 * (where & 3);
-+ u32 val = pci_read_reg(pcie, where & ~3);
-+
-+ val &= ~(mask << shift);
-+ val |= data << shift;
-+ pci_write_reg(pcie, val, where & ~3);
-+}
-+
-+static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
-+{
-+ int shift = 8 * (where & 3);
-+ u32 val = pci_read_reg(pcie, where & ~3);
-+
-+ return val >> shift;
-+}
-+
-+/* Serialization is provided by 'pci_lock' in drivers/pci/access.c */
-+static int rcar_pcie_config_access(struct rcar_pcie *pcie,
-+ unsigned char access_type, struct pci_bus *bus,
-+ unsigned int devfn, int where, u32 *data)
-+{
-+ int dev, func, reg, index;
-+
-+ dev = PCI_SLOT(devfn);
-+ func = PCI_FUNC(devfn);
-+ reg = where & ~3;
-+ index = reg / 4;
-+
-+ /*
-+ * While each channel has its own memory-mapped extended config
-+ * space, it's generally only accessible when in endpoint mode.
-+ * When in root complex mode, the controller is unable to target
-+ * itself with either type 0 or type 1 accesses, and indeed, any
-+ * controller initiated target transfer to its own config space
-+ * result in a completer abort.
-+ *
-+ * Each channel effectively only supports a single device, but as
-+ * the same channel <-> device access works for any PCI_SLOT()
-+ * value, we cheat a bit here and bind the controller's config
-+ * space to devfn 0 in order to enable self-enumeration. In this
-+ * case the regular ECAR/ECDR path is sidelined and the mangled
-+ * config access itself is initiated as an internal bus transaction.
-+ */
-+ if (pci_is_root_bus(bus)) {
-+ if (dev != 0)
-+ return PCIBIOS_DEVICE_NOT_FOUND;
-+
-+ if (access_type == PCI_ACCESS_READ) {
-+ *data = pci_read_reg(pcie, PCICONF(index));
-+ } else {
-+ /* Keep an eye out for changes to the root bus number */
-+ if (pci_is_root_bus(bus) && (reg == PCI_PRIMARY_BUS))
-+ pcie->root_bus_nr = *data & 0xff;
-+
-+ pci_write_reg(pcie, *data, PCICONF(index));
-+ }
-+
-+ return PCIBIOS_SUCCESSFUL;
-+ }
-+
-+ if (pcie->root_bus_nr < 0)
-+ return PCIBIOS_DEVICE_NOT_FOUND;
-+
-+ /* Clear errors */
-+ pci_write_reg(pcie, pci_read_reg(pcie, PCIEERRFR), PCIEERRFR);
-+
-+ /* Set the PIO address */
-+ pci_write_reg(pcie, PCIE_CONF_BUS(bus->number) | PCIE_CONF_DEV(dev) |
-+ PCIE_CONF_FUNC(func) | reg, PCIECAR);
-+
-+ /* Enable the configuration access */
-+ if (bus->parent->number == pcie->root_bus_nr)
-+ pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR);
-+ else
-+ pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR);
-+
-+ /* Check for errors */
-+ if (pci_read_reg(pcie, PCIEERRFR) & UNSUPPORTED_REQUEST)
-+ return PCIBIOS_DEVICE_NOT_FOUND;
-+
-+ /* Check for master and target aborts */
-+ if (rcar_read_conf(pcie, RCONF(PCI_STATUS)) &
-+ (PCI_STATUS_REC_MASTER_ABORT | PCI_STATUS_REC_TARGET_ABORT))
-+ return PCIBIOS_DEVICE_NOT_FOUND;
-+
-+ if (access_type == PCI_ACCESS_READ)
-+ *data = pci_read_reg(pcie, PCIECDR);
-+ else
-+ pci_write_reg(pcie, *data, PCIECDR);
-+
-+ /* Disable the configuration access */
-+ pci_write_reg(pcie, 0, PCIECCTLR);
-+
-+ return PCIBIOS_SUCCESSFUL;
-+}
-+
-+static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
-+ int where, int size, u32 *val)
-+{
-+ struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
-+ int ret;
-+
-+ if ((size == 2) && (where & 1))
-+ return PCIBIOS_BAD_REGISTER_NUMBER;
-+ else if ((size == 4) && (where & 3))
-+ return PCIBIOS_BAD_REGISTER_NUMBER;
-+
-+ ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
-+ bus, devfn, where, val);
-+ if (ret != PCIBIOS_SUCCESSFUL) {
-+ *val = 0xffffffff;
-+ return ret;
-+ }
-+
-+ if (size == 1)
-+ *val = (*val >> (8 * (where & 3))) & 0xff;
-+ else if (size == 2)
-+ *val = (*val >> (8 * (where & 2))) & 0xffff;
-+
-+ dev_dbg(&bus->dev, "pcie-config-read: bus=%3d devfn=0x%04x "
-+ "where=0x%04x size=%d val=0x%08lx\n", bus->number,
-+ devfn, where, size, (unsigned long)*val);
-+
-+ return ret;
-+}
-+
-+/* Serialization is provided by 'pci_lock' in drivers/pci/access.c */
-+static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
-+ int where, int size, u32 val)
-+{
-+ struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
-+ int shift, ret;
-+ u32 data;
-+
-+ if ((size == 2) && (where & 1))
-+ return PCIBIOS_BAD_REGISTER_NUMBER;
-+ else if ((size == 4) && (where & 3))
-+ return PCIBIOS_BAD_REGISTER_NUMBER;
-+
-+ ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
-+ bus, devfn, where, &data);
-+ if (ret != PCIBIOS_SUCCESSFUL)
-+ return ret;
-+
-+ dev_dbg(&bus->dev, "pcie-config-write: bus=%3d devfn=0x%04x "
-+ "where=0x%04x size=%d val=0x%08lx\n", bus->number,
-+ devfn, where, size, (unsigned long)val);
-+
-+ if (size == 1) {
-+ shift = 8 * (where & 3);
-+ data &= ~(0xff << shift);
-+ data |= ((val & 0xff) << shift);
-+ } else if (size == 2) {
-+ shift = 8 * (where & 2);
-+ data &= ~(0xffff << shift);
-+ data |= ((val & 0xffff) << shift);
-+ } else
-+ data = val;
-+
-+ ret = rcar_pcie_config_access(pcie, PCI_ACCESS_WRITE,
-+ bus, devfn, where, &data);
-+
-+ return ret;
-+}
-+
-+static struct pci_ops rcar_pcie_ops = {
-+ .read = rcar_pcie_read_conf,
-+ .write = rcar_pcie_write_conf,
-+};
-+
-+static void rcar_pcie_setup_window(int win, struct resource *res,
-+ struct rcar_pcie *pcie)
-+{
-+ /* Setup PCIe address space mappings for each resource */
-+ resource_size_t size;
-+ u32 mask;
-+
-+ pci_write_reg(pcie, 0x00000000, PCIEPTCTLR(win));
-+
-+ /*
-+ * The PAMR mask is calculated in units of 128Bytes, which
-+ * keeps things pretty simple.
-+ */
-+ size = resource_size(res);
-+ mask = (roundup_pow_of_two(size) / SZ_128) - 1;
-+ pci_write_reg(pcie, mask << 7, PCIEPAMR(win));
-+
-+ pci_write_reg(pcie, upper_32_bits(res->start), PCIEPARH(win));
-+ pci_write_reg(pcie, lower_32_bits(res->start), PCIEPARL(win));
-+
-+ /* First resource is for IO */
-+ mask = PAR_ENABLE;
-+ if (res->flags & IORESOURCE_IO)
-+ mask |= IO_SPACE;
-+
-+ pci_write_reg(pcie, mask, PCIEPTCTLR(win));
-+}
-+
-+static int rcar_pcie_setup(int nr, struct pci_sys_data *sys)
-+{
-+ struct rcar_pcie *pcie = sys_to_pcie(sys);
-+ struct resource *res;
-+ int i;
-+
-+ pcie->root_bus_nr = -1;
-+
-+ /* Setup PCI resources */
-+ for (i = 0; i < PCI_MAX_RESOURCES; i++) {
-+
-+ res = &pcie->res[i];
-+ if (!res->flags)
-+ continue;
-+
-+ rcar_pcie_setup_window(i, res, pcie);
-+
-+ if (res->flags & IORESOURCE_IO)
-+ pci_ioremap_io(nr * SZ_64K, res->start);
-+ else
-+ pci_add_resource(&sys->resources, res);
-+ }
-+ pci_add_resource(&sys->resources, &pcie->busn);
-+
-+ return 1;
-+}
-+
-+struct hw_pci rcar_pci = {
-+ .setup = rcar_pcie_setup,
-+ .map_irq = of_irq_parse_and_map_pci,
-+ .ops = &rcar_pcie_ops,
-+};
-+
-+static void rcar_pcie_enable(struct rcar_pcie *pcie)
-+{
-+ struct platform_device *pdev = to_platform_device(pcie->dev);
-+
-+ rcar_pci.nr_controllers = 1;
-+ rcar_pci.private_data = (void **)&pcie;
-+
-+ pci_common_init_dev(&pdev->dev, &rcar_pci);
-+#ifdef CONFIG_PCI_DOMAINS
-+ rcar_pci.domain++;
-+#endif
-+}
-+
-+static int phy_wait_for_ack(struct rcar_pcie *pcie)
-+{
-+ unsigned int timeout = 100;
-+
-+ while (timeout--) {
-+ if (pci_read_reg(pcie, H1_PCIEPHYADRR) & PHY_ACK)
-+ return 0;
-+
-+ udelay(100);
-+ }
-+
-+ dev_err(pcie->dev, "Access to PCIe phy timed out\n");
-+
-+ return -ETIMEDOUT;
-+}
-+
-+static void phy_write_reg(struct rcar_pcie *pcie,
-+ unsigned int rate, unsigned int addr,
-+ unsigned int lane, unsigned int data)
-+{
-+ unsigned long phyaddr;
-+
-+ phyaddr = WRITE_CMD |
-+ ((rate & 1) << RATE_POS) |
-+ ((lane & 0xf) << LANE_POS) |
-+ ((addr & 0xff) << ADR_POS);
-+
-+ /* Set write data */
-+ pci_write_reg(pcie, data, H1_PCIEPHYDOUTR);
-+ pci_write_reg(pcie, phyaddr, H1_PCIEPHYADRR);
-+
-+ /* Ignore errors as they will be dealt with if the data link is down */
-+ phy_wait_for_ack(pcie);
-+
-+ /* Clear command */
-+ pci_write_reg(pcie, 0, H1_PCIEPHYDOUTR);
-+ pci_write_reg(pcie, 0, H1_PCIEPHYADRR);
-+
-+ /* Ignore errors as they will be dealt with if the data link is down */
-+ phy_wait_for_ack(pcie);
-+}
-+
-+static int rcar_pcie_wait_for_dl(struct rcar_pcie *pcie)
-+{
-+ unsigned int timeout = 10;
-+
-+ while (timeout--) {
-+ if ((pci_read_reg(pcie, PCIETSTR) & DATA_LINK_ACTIVE))
-+ return 0;
-+
-+ msleep(5);
-+ }
-+
-+ return -ETIMEDOUT;
-+}
-+
-+static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
-+{
-+ int err;
-+
-+ /* Begin initialization */
-+ pci_write_reg(pcie, 0, PCIETCTLR);
-+
-+ /* Set mode */
-+ pci_write_reg(pcie, 1, PCIEMSR);
-+
-+ /*
-+ * Initial header for port config space is type 1, set the device
-+ * class to match. Hardware takes care of propagating the IDSETR
-+ * settings, so there is no need to bother with a quirk.
-+ */
-+ pci_write_reg(pcie, PCI_CLASS_BRIDGE_PCI << 16, IDSETR1);
-+
-+ /*
-+ * Setup Secondary Bus Number & Subordinate Bus Number, even though
-+ * they aren't used, to avoid bridge being detected as broken.
-+ */
-+ rcar_rmw32(pcie, RCONF(PCI_SECONDARY_BUS), 0xff, 1);
-+ rcar_rmw32(pcie, RCONF(PCI_SUBORDINATE_BUS), 0xff, 1);
-+
-+ /* Initialize default capabilities. */
-+ rcar_rmw32(pcie, REXPCAP(0), 0, PCI_CAP_ID_EXP);
-+ rcar_rmw32(pcie, REXPCAP(PCI_EXP_FLAGS),
-+ PCI_EXP_FLAGS_TYPE, PCI_EXP_TYPE_ROOT_PORT << 4);
-+ rcar_rmw32(pcie, RCONF(PCI_HEADER_TYPE), 0x7f,
-+ PCI_HEADER_TYPE_BRIDGE);
-+
-+ /* Enable data link layer active state reporting */
-+ rcar_rmw32(pcie, REXPCAP(PCI_EXP_LNKCAP), 0, PCI_EXP_LNKCAP_DLLLARC);
-+
-+ /* Write out the physical slot number = 0 */
-+ rcar_rmw32(pcie, REXPCAP(PCI_EXP_SLTCAP), PCI_EXP_SLTCAP_PSN, 0);
-+
-+ /* Set the completion timer timeout to the maximum 50ms. */
-+ rcar_rmw32(pcie, TLCTLR+1, 0x3f, 50);
-+
-+ /* Terminate list of capabilities (Next Capability Offset=0) */
-+ rcar_rmw32(pcie, RVCCAP(0), 0xfff0, 0);
-+
-+ /* Enable MAC data scrambling. */
-+ rcar_rmw32(pcie, MACCTLR, SCRAMBLE_DISABLE, 0);
-+
-+ /* Finish initialization - establish a PCI Express link */
-+ pci_write_reg(pcie, CFINIT, PCIETCTLR);
-+
-+ /* This will timeout if we don't have a link. */
-+ err = rcar_pcie_wait_for_dl(pcie);
-+ if (err)
-+ return err;
-+
-+ /* Enable INTx interrupts */
-+ rcar_rmw32(pcie, PCIEINTXR, 0, 0xF << 8);
-+
-+ /* Enable slave Bus Mastering */
-+ rcar_rmw32(pcie, RCONF(PCI_STATUS), PCI_STATUS_DEVSEL_MASK,
-+ PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
-+ PCI_STATUS_CAP_LIST | PCI_STATUS_DEVSEL_FAST);
-+
-+ wmb();
-+
-+ return 0;
-+}
-+
-+static int rcar_pcie_hw_init_h1(struct rcar_pcie *pcie)
-+{
-+ unsigned int timeout = 10;
-+
-+ /* Initialize the phy */
-+ phy_write_reg(pcie, 0, 0x42, 0x1, 0x0EC34191);
-+ phy_write_reg(pcie, 1, 0x42, 0x1, 0x0EC34180);
-+ phy_write_reg(pcie, 0, 0x43, 0x1, 0x00210188);
-+ phy_write_reg(pcie, 1, 0x43, 0x1, 0x00210188);
-+ phy_write_reg(pcie, 0, 0x44, 0x1, 0x015C0014);
-+ phy_write_reg(pcie, 1, 0x44, 0x1, 0x015C0014);
-+ phy_write_reg(pcie, 1, 0x4C, 0x1, 0x786174A0);
-+ phy_write_reg(pcie, 1, 0x4D, 0x1, 0x048000BB);
-+ phy_write_reg(pcie, 0, 0x51, 0x1, 0x079EC062);
-+ phy_write_reg(pcie, 0, 0x52, 0x1, 0x20000000);
-+ phy_write_reg(pcie, 1, 0x52, 0x1, 0x20000000);
-+ phy_write_reg(pcie, 1, 0x56, 0x1, 0x00003806);
-+
-+ phy_write_reg(pcie, 0, 0x60, 0x1, 0x004B03A5);
-+ phy_write_reg(pcie, 0, 0x64, 0x1, 0x3F0F1F0F);
-+ phy_write_reg(pcie, 0, 0x66, 0x1, 0x00008000);
-+
-+ while (timeout--) {
-+ if (pci_read_reg(pcie, H1_PCIEPHYSR))
-+ return rcar_pcie_hw_init(pcie);
-+
-+ msleep(5);
-+ }
-+
-+ return -ETIMEDOUT;
-+}
-+
-+static int rcar_pcie_get_resources(struct platform_device *pdev,
-+ struct rcar_pcie *pcie)
-+{
-+ struct resource res;
-+ int err;
-+
-+ err = of_address_to_resource(pdev->dev.of_node, 0, &res);
-+ if (err)
-+ return err;
-+
-+ pcie->clk = devm_clk_get(&pdev->dev, "pcie");
-+ if (IS_ERR(pcie->clk)) {
-+ dev_err(pcie->dev, "cannot get platform clock\n");
-+ return PTR_ERR(pcie->clk);
-+ }
-+ err = clk_prepare_enable(pcie->clk);
-+ if (err)
-+ goto fail_clk;
-+
-+ pcie->bus_clk = devm_clk_get(&pdev->dev, "pcie_bus");
-+ if (IS_ERR(pcie->bus_clk)) {
-+ dev_err(pcie->dev, "cannot get pcie bus clock\n");
-+ err = PTR_ERR(pcie->bus_clk);
-+ goto fail_clk;
-+ }
-+ err = clk_prepare_enable(pcie->bus_clk);
-+ if (err)
-+ goto err_map_reg;
-+
-+ pcie->base = devm_ioremap_resource(&pdev->dev, &res);
-+ if (IS_ERR(pcie->base)) {
-+ err = PTR_ERR(pcie->base);
-+ goto err_map_reg;
-+ }
-+
-+ return 0;
-+
-+err_map_reg:
-+ clk_disable_unprepare(pcie->bus_clk);
-+fail_clk:
-+ clk_disable_unprepare(pcie->clk);
-+
-+ return err;
-+}
-+
-+static int rcar_pcie_inbound_ranges(struct rcar_pcie *pcie,
-+ struct of_pci_range *range,
-+ int *index)
-+{
-+ u64 restype = range->flags;
-+ u64 cpu_addr = range->cpu_addr;
-+ u64 cpu_end = range->cpu_addr + range->size;
-+ u64 pci_addr = range->pci_addr;
-+ u32 flags = LAM_64BIT | LAR_ENABLE;
-+ u64 mask;
-+ u64 size;
-+ int idx = *index;
-+
-+ if (restype & IORESOURCE_PREFETCH)
-+ flags |= LAM_PREFETCH;
-+
-+ /*
-+ * If the size of the range is larger than the alignment of the start
-+ * address, we have to use multiple entries to perform the mapping.
-+ */
-+ if (cpu_addr > 0) {
-+ unsigned long nr_zeros = __ffs64(cpu_addr);
-+ u64 alignment = 1ULL << nr_zeros;
-+ size = min(range->size, alignment);
-+ } else {
-+ size = range->size;
-+ }
-+ /* Hardware supports max 4GiB inbound region */
-+ size = min(size, 1ULL << 32);
-+
-+ mask = roundup_pow_of_two(size) - 1;
-+ mask &= ~0xf;
-+
-+ while (cpu_addr < cpu_end) {
-+ /*
-+ * Set up 64-bit inbound regions as the range parser doesn't
-+ * distinguish between 32 and 64-bit types.
-+ */
-+ pci_write_reg(pcie, lower_32_bits(pci_addr), PCIEPRAR(idx));
-+ pci_write_reg(pcie, lower_32_bits(cpu_addr), PCIELAR(idx));
-+ pci_write_reg(pcie, lower_32_bits(mask) | flags, PCIELAMR(idx));
-+
-+ pci_write_reg(pcie, upper_32_bits(pci_addr), PCIEPRAR(idx+1));
-+ pci_write_reg(pcie, upper_32_bits(cpu_addr), PCIELAR(idx+1));
-+ pci_write_reg(pcie, 0, PCIELAMR(idx+1));
-+
-+ pci_addr += size;
-+ cpu_addr += size;
-+ idx += 2;
-+
-+ if (idx > MAX_NR_INBOUND_MAPS) {
-+ dev_err(pcie->dev, "Failed to map inbound regions!\n");
-+ return -EINVAL;
-+ }
-+ }
-+ *index = idx;
-+
-+ return 0;
-+}
-+
-+static int pci_dma_range_parser_init(struct of_pci_range_parser *parser,
-+ struct device_node *node)
-+{
-+ const int na = 3, ns = 2;
-+ int rlen;
-+
-+ parser->node = node;
-+ parser->pna = of_n_addr_cells(node);
-+ parser->np = parser->pna + na + ns;
-+
-+ parser->range = of_get_property(node, "dma-ranges", &rlen);
-+ if (!parser->range)
-+ return -ENOENT;
-+
-+ parser->end = parser->range + rlen / sizeof(__be32);
-+ return 0;
-+}
-+
-+static int rcar_pcie_parse_map_dma_ranges(struct rcar_pcie *pcie,
-+ struct device_node *np)
-+{
-+ struct of_pci_range range;
-+ struct of_pci_range_parser parser;
-+ int index = 0;
-+ int err;
-+
-+ if (pci_dma_range_parser_init(&parser, np))
-+ return -EINVAL;
-+
-+ /* Get the dma-ranges from DT */
-+ for_each_of_pci_range(&parser, &range) {
-+ u64 end = range.cpu_addr + range.size - 1;
-+ dev_dbg(pcie->dev, "0x%08x 0x%016llx..0x%016llx -> 0x%016llx\n",
-+ range.flags, range.cpu_addr, end, range.pci_addr);
-+
-+ err = rcar_pcie_inbound_ranges(pcie, &range, &index);
-+ if (err)
-+ return err;
-+ }
-+
-+ return 0;
-+}
-+
-+static const struct of_device_id rcar_pcie_of_match[] = {
-+ { .compatible = "renesas,pcie-r8a7779", .data = rcar_pcie_hw_init_h1 },
-+ { .compatible = "renesas,pcie-r8a7790", .data = rcar_pcie_hw_init },
-+ { .compatible = "renesas,pcie-r8a7791", .data = rcar_pcie_hw_init },
-+ {},
-+};
-+MODULE_DEVICE_TABLE(of, rcar_pcie_of_match);
-+
-+static int rcar_pcie_probe(struct platform_device *pdev)
-+{
-+ struct rcar_pcie *pcie;
-+ unsigned int data;
-+ struct of_pci_range range;
-+ struct of_pci_range_parser parser;
-+ const struct of_device_id *of_id;
-+ int err, win = 0;
-+ int (*hw_init_fn)(struct rcar_pcie *);
-+
-+ pcie = devm_kzalloc(&pdev->dev, sizeof(*pcie), GFP_KERNEL);
-+ if (!pcie)
-+ return -ENOMEM;
-+
-+ pcie->dev = &pdev->dev;
-+ platform_set_drvdata(pdev, pcie);
-+
-+ /* Get the bus range */
-+ if (of_pci_parse_bus_range(pdev->dev.of_node, &pcie->busn)) {
-+ dev_err(&pdev->dev, "failed to parse bus-range property\n");
-+ return -EINVAL;
-+ }
-+
-+ if (of_pci_range_parser_init(&parser, pdev->dev.of_node)) {
-+ dev_err(&pdev->dev, "missing ranges property\n");
-+ return -EINVAL;
-+ }
-+
-+ err = rcar_pcie_get_resources(pdev, pcie);
-+ if (err < 0) {
-+ dev_err(&pdev->dev, "failed to request resources: %d\n", err);
-+ return err;
-+ }
-+
-+ for_each_of_pci_range(&parser, &range) {
-+ of_pci_range_to_resource(&range, pdev->dev.of_node,
-+ &pcie->res[win++]);
-+
-+ if (win > PCI_MAX_RESOURCES)
-+ break;
-+ }
-+
-+ err = rcar_pcie_parse_map_dma_ranges(pcie, pdev->dev.of_node);
-+ if (err)
-+ return err;
-+
-+ of_id = of_match_device(rcar_pcie_of_match, pcie->dev);
-+ if (!of_id || !of_id->data)
-+ return -EINVAL;
-+ hw_init_fn = of_id->data;
-+
-+ /* Failure to get a link might just be that no cards are inserted */
-+ err = hw_init_fn(pcie);
-+ if (err) {
-+ dev_info(&pdev->dev, "PCIe link down\n");
-+ return 0;
-+ }
-+
-+ data = pci_read_reg(pcie, MACSR);
-+ dev_info(&pdev->dev, "PCIe x%d: link up\n", (data >> 20) & 0x3f);
-+
-+ rcar_pcie_enable(pcie);
-+
-+ return 0;
-+}
-+
-+static struct platform_driver rcar_pcie_driver = {
-+ .driver = {
-+ .name = DRV_NAME,
-+ .owner = THIS_MODULE,
-+ .of_match_table = rcar_pcie_of_match,
-+ .suppress_bind_attrs = true,
-+ },
-+ .probe = rcar_pcie_probe,
-+};
-+module_platform_driver(rcar_pcie_driver);
-+
-+MODULE_AUTHOR("Phil Edworthy <phil.edworthy@renesas.com>");
-+MODULE_DESCRIPTION("Renesas R-Car PCIe driver");
-+MODULE_LICENSE("GPLv2");
---
-2.1.2
-
diff --git a/patches.renesas/0492-PCI-rcar-Add-MSI-support-for-PCIe.patch b/patches.renesas/0492-PCI-rcar-Add-MSI-support-for-PCIe.patch
deleted file mode 100644
index 02e2063a79ce2..0000000000000
--- a/patches.renesas/0492-PCI-rcar-Add-MSI-support-for-PCIe.patch
+++ /dev/null
@@ -1,353 +0,0 @@
-From 9da52b385656f7aadbb7a819282652a0e1713393 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Mon, 12 May 2014 11:57:49 +0100
-Subject: PCI: rcar: Add MSI support for PCIe
-
-Add MSI support to the R-Car PCIe driver.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 290c1fb35860540223bef1be021944d02232889d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/pcie-rcar.c | 242 ++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 241 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-index 3c524b9e60e5..8e06124aa80f 100644
---- a/drivers/pci/host/pcie-rcar.c
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -15,8 +15,11 @@
- #include <linux/clk.h>
- #include <linux/delay.h>
- #include <linux/interrupt.h>
-+#include <linux/irq.h>
-+#include <linux/irqdomain.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-+#include <linux/msi.h>
- #include <linux/of_address.h>
- #include <linux/of_irq.h>
- #include <linux/of_pci.h>
-@@ -35,6 +38,7 @@
- #define PCIECDR 0x000020
- #define PCIEMSR 0x000028
- #define PCIEINTXR 0x000400
-+#define PCIEMSITXR 0x000840
-
- /* Transfer control */
- #define PCIETCTLR 0x02000
-@@ -43,6 +47,11 @@
- #define DATA_LINK_ACTIVE 1
- #define PCIEERRFR 0x02020
- #define UNSUPPORTED_REQUEST (1 << 4)
-+#define PCIEMSIFR 0x02044
-+#define PCIEMSIALR 0x02048
-+#define MSIFE 1
-+#define PCIEMSIAUR 0x0204c
-+#define PCIEMSIIER 0x02050
-
- /* root port address */
- #define PCIEPRAR(x) (0x02080 + ((x) * 0x4))
-@@ -85,6 +94,8 @@
- #define H1_PCIEPHYDOUTR 0x040014
- #define H1_PCIEPHYSR 0x040018
-
-+#define INT_PCI_MSI_NR 32
-+
- #define RCONF(x) (PCICONF(0)+(x))
- #define RPMCAP(x) (PMCAP(0)+(x))
- #define REXPCAP(x) (EXPCAP(0)+(x))
-@@ -97,6 +108,21 @@
- #define PCI_MAX_RESOURCES 4
- #define MAX_NR_INBOUND_MAPS 6
-
-+struct rcar_msi {
-+ DECLARE_BITMAP(used, INT_PCI_MSI_NR);
-+ struct irq_domain *domain;
-+ struct msi_chip chip;
-+ unsigned long pages;
-+ struct mutex lock;
-+ int irq1;
-+ int irq2;
-+};
-+
-+static inline struct rcar_msi *to_rcar_msi(struct msi_chip *chip)
-+{
-+ return container_of(chip, struct rcar_msi, chip);
-+}
-+
- /* Structure representing the PCIe interface */
- struct rcar_pcie {
- struct device *dev;
-@@ -106,6 +132,7 @@ struct rcar_pcie {
- int root_bus_nr;
- struct clk *clk;
- struct clk *bus_clk;
-+ struct rcar_msi msi;
- };
-
- static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
-@@ -356,10 +383,20 @@ static int rcar_pcie_setup(int nr, struct pci_sys_data *sys)
- return 1;
- }
-
-+static void rcar_pcie_add_bus(struct pci_bus *bus)
-+{
-+ if (IS_ENABLED(CONFIG_PCI_MSI)) {
-+ struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
-+
-+ bus->msi = &pcie->msi.chip;
-+ }
-+}
-+
- struct hw_pci rcar_pci = {
- .setup = rcar_pcie_setup,
- .map_irq = of_irq_parse_and_map_pci,
- .ops = &rcar_pcie_ops,
-+ .add_bus = rcar_pcie_add_bus,
- };
-
- static void rcar_pcie_enable(struct rcar_pcie *pcie)
-@@ -477,6 +514,10 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
- /* Enable MAC data scrambling. */
- rcar_rmw32(pcie, MACCTLR, SCRAMBLE_DISABLE, 0);
-
-+ /* Enable MSI */
-+ if (IS_ENABLED(CONFIG_PCI_MSI))
-+ pci_write_reg(pcie, 0x101f0000, PCIEMSITXR);
-+
- /* Finish initialization - establish a PCI Express link */
- pci_write_reg(pcie, CFINIT, PCIETCTLR);
-
-@@ -530,11 +571,184 @@ static int rcar_pcie_hw_init_h1(struct rcar_pcie *pcie)
- return -ETIMEDOUT;
- }
-
-+static int rcar_msi_alloc(struct rcar_msi *chip)
-+{
-+ int msi;
-+
-+ mutex_lock(&chip->lock);
-+
-+ msi = find_first_zero_bit(chip->used, INT_PCI_MSI_NR);
-+ if (msi < INT_PCI_MSI_NR)
-+ set_bit(msi, chip->used);
-+ else
-+ msi = -ENOSPC;
-+
-+ mutex_unlock(&chip->lock);
-+
-+ return msi;
-+}
-+
-+static void rcar_msi_free(struct rcar_msi *chip, unsigned long irq)
-+{
-+ mutex_lock(&chip->lock);
-+ clear_bit(irq, chip->used);
-+ mutex_unlock(&chip->lock);
-+}
-+
-+static irqreturn_t rcar_pcie_msi_irq(int irq, void *data)
-+{
-+ struct rcar_pcie *pcie = data;
-+ struct rcar_msi *msi = &pcie->msi;
-+ unsigned long reg;
-+
-+ reg = pci_read_reg(pcie, PCIEMSIFR);
-+
-+ /* MSI & INTx share an interrupt - we only handle MSI here */
-+ if (!reg)
-+ return IRQ_NONE;
-+
-+ while (reg) {
-+ unsigned int index = find_first_bit(&reg, 32);
-+ unsigned int irq;
-+
-+ /* clear the interrupt */
-+ pci_write_reg(pcie, 1 << index, PCIEMSIFR);
-+
-+ irq = irq_find_mapping(msi->domain, index);
-+ if (irq) {
-+ if (test_bit(index, msi->used))
-+ generic_handle_irq(irq);
-+ else
-+ dev_info(pcie->dev, "unhandled MSI\n");
-+ } else {
-+ /* Unknown MSI, just clear it */
-+ dev_dbg(pcie->dev, "unexpected MSI\n");
-+ }
-+
-+ /* see if there's any more pending in this vector */
-+ reg = pci_read_reg(pcie, PCIEMSIFR);
-+ }
-+
-+ return IRQ_HANDLED;
-+}
-+
-+static int rcar_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
-+ struct msi_desc *desc)
-+{
-+ struct rcar_msi *msi = to_rcar_msi(chip);
-+ struct rcar_pcie *pcie = container_of(chip, struct rcar_pcie, msi.chip);
-+ struct msi_msg msg;
-+ unsigned int irq;
-+ int hwirq;
-+
-+ hwirq = rcar_msi_alloc(msi);
-+ if (hwirq < 0)
-+ return hwirq;
-+
-+ irq = irq_create_mapping(msi->domain, hwirq);
-+ if (!irq) {
-+ rcar_msi_free(msi, hwirq);
-+ return -EINVAL;
-+ }
-+
-+ irq_set_msi_desc(irq, desc);
-+
-+ msg.address_lo = pci_read_reg(pcie, PCIEMSIALR) & ~MSIFE;
-+ msg.address_hi = pci_read_reg(pcie, PCIEMSIAUR);
-+ msg.data = hwirq;
-+
-+ write_msi_msg(irq, &msg);
-+
-+ return 0;
-+}
-+
-+static void rcar_msi_teardown_irq(struct msi_chip *chip, unsigned int irq)
-+{
-+ struct rcar_msi *msi = to_rcar_msi(chip);
-+ struct irq_data *d = irq_get_irq_data(irq);
-+
-+ rcar_msi_free(msi, d->hwirq);
-+}
-+
-+static struct irq_chip rcar_msi_irq_chip = {
-+ .name = "R-Car PCIe MSI",
-+ .irq_enable = unmask_msi_irq,
-+ .irq_disable = mask_msi_irq,
-+ .irq_mask = mask_msi_irq,
-+ .irq_unmask = unmask_msi_irq,
-+};
-+
-+static int rcar_msi_map(struct irq_domain *domain, unsigned int irq,
-+ irq_hw_number_t hwirq)
-+{
-+ irq_set_chip_and_handler(irq, &rcar_msi_irq_chip, handle_simple_irq);
-+ irq_set_chip_data(irq, domain->host_data);
-+ set_irq_flags(irq, IRQF_VALID);
-+
-+ return 0;
-+}
-+
-+static const struct irq_domain_ops msi_domain_ops = {
-+ .map = rcar_msi_map,
-+};
-+
-+static int rcar_pcie_enable_msi(struct rcar_pcie *pcie)
-+{
-+ struct platform_device *pdev = to_platform_device(pcie->dev);
-+ struct rcar_msi *msi = &pcie->msi;
-+ unsigned long base;
-+ int err;
-+
-+ mutex_init(&msi->lock);
-+
-+ msi->chip.dev = pcie->dev;
-+ msi->chip.setup_irq = rcar_msi_setup_irq;
-+ msi->chip.teardown_irq = rcar_msi_teardown_irq;
-+
-+ msi->domain = irq_domain_add_linear(pcie->dev->of_node, INT_PCI_MSI_NR,
-+ &msi_domain_ops, &msi->chip);
-+ if (!msi->domain) {
-+ dev_err(&pdev->dev, "failed to create IRQ domain\n");
-+ return -ENOMEM;
-+ }
-+
-+ /* Two irqs are for MSI, but they are also used for non-MSI irqs */
-+ err = devm_request_irq(&pdev->dev, msi->irq1, rcar_pcie_msi_irq,
-+ IRQF_SHARED, rcar_msi_irq_chip.name, pcie);
-+ if (err < 0) {
-+ dev_err(&pdev->dev, "failed to request IRQ: %d\n", err);
-+ goto err;
-+ }
-+
-+ err = devm_request_irq(&pdev->dev, msi->irq2, rcar_pcie_msi_irq,
-+ IRQF_SHARED, rcar_msi_irq_chip.name, pcie);
-+ if (err < 0) {
-+ dev_err(&pdev->dev, "failed to request IRQ: %d\n", err);
-+ goto err;
-+ }
-+
-+ /* setup MSI data target */
-+ msi->pages = __get_free_pages(GFP_KERNEL, 0);
-+ base = virt_to_phys((void *)msi->pages);
-+
-+ pci_write_reg(pcie, base | MSIFE, PCIEMSIALR);
-+ pci_write_reg(pcie, 0, PCIEMSIAUR);
-+
-+ /* enable all MSI interrupts */
-+ pci_write_reg(pcie, 0xffffffff, PCIEMSIIER);
-+
-+ return 0;
-+
-+err:
-+ irq_domain_remove(msi->domain);
-+ return err;
-+}
-+
- static int rcar_pcie_get_resources(struct platform_device *pdev,
- struct rcar_pcie *pcie)
- {
- struct resource res;
-- int err;
-+ int err, i;
-
- err = of_address_to_resource(pdev->dev.of_node, 0, &res);
- if (err)
-@@ -559,6 +773,22 @@ static int rcar_pcie_get_resources(struct platform_device *pdev,
- if (err)
- goto err_map_reg;
-
-+ i = irq_of_parse_and_map(pdev->dev.of_node, 0);
-+ if (i < 0) {
-+ dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n");
-+ err = -ENOENT;
-+ goto err_map_reg;
-+ }
-+ pcie->msi.irq1 = i;
-+
-+ i = irq_of_parse_and_map(pdev->dev.of_node, 1);
-+ if (i < 0) {
-+ dev_err(pcie->dev, "cannot get platform resources for msi interrupt\n");
-+ err = -ENOENT;
-+ goto err_map_reg;
-+ }
-+ pcie->msi.irq2 = i;
-+
- pcie->base = devm_ioremap_resource(&pdev->dev, &res);
- if (IS_ERR(pcie->base)) {
- err = PTR_ERR(pcie->base);
-@@ -732,6 +962,16 @@ static int rcar_pcie_probe(struct platform_device *pdev)
- if (err)
- return err;
-
-+ if (IS_ENABLED(CONFIG_PCI_MSI)) {
-+ err = rcar_pcie_enable_msi(pcie);
-+ if (err < 0) {
-+ dev_err(&pdev->dev,
-+ "failed to enable MSI support: %d\n",
-+ err);
-+ return err;
-+ }
-+ }
-+
- of_id = of_match_device(rcar_pcie_of_match, pcie->dev);
- if (!of_id || !of_id->data)
- return -EINVAL;
---
-2.1.2
-
diff --git a/patches.renesas/0493-PCI-rcar-Add-R-Car-PCIe-device-tree-bindings.patch b/patches.renesas/0493-PCI-rcar-Add-R-Car-PCIe-device-tree-bindings.patch
deleted file mode 100644
index af1181f79a28b..0000000000000
--- a/patches.renesas/0493-PCI-rcar-Add-R-Car-PCIe-device-tree-bindings.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 6386ee451814920cff65bcb994c41a27e33d9de8 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Mon, 12 May 2014 11:57:50 +0100
-Subject: PCI: rcar: Add R-Car PCIe device tree bindings
-
-This patch adds the bindings for the R-Car PCIe driver. The driver resides
-under drivers/pci/host/pcie-rcar.c
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Reviewed-by: Lucas Stach <l.stach@pengutronix.de>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7869fc6e295cbb1f80e30555bebbc795abb5b9a7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/pci/rcar-pci.txt | 47 ++++++++++++++++++++++
- 1 file changed, 47 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/pci/rcar-pci.txt
-
-diff --git a/Documentation/devicetree/bindings/pci/rcar-pci.txt b/Documentation/devicetree/bindings/pci/rcar-pci.txt
-new file mode 100644
-index 000000000000..29d3b989d3b0
---- /dev/null
-+++ b/Documentation/devicetree/bindings/pci/rcar-pci.txt
-@@ -0,0 +1,47 @@
-+* Renesas RCar PCIe interface
-+
-+Required properties:
-+- compatible: should contain one of the following
-+ "renesas,pcie-r8a7779", "renesas,pcie-r8a7790", "renesas,pcie-r8a7791"
-+- reg: base address and length of the pcie controller registers.
-+- #address-cells: set to <3>
-+- #size-cells: set to <2>
-+- bus-range: PCI bus numbers covered
-+- device_type: set to "pci"
-+- ranges: ranges for the PCI memory and I/O regions.
-+- dma-ranges: ranges for the inbound memory regions.
-+- interrupts: two interrupt sources for MSI interrupts, followed by interrupt
-+ source for hardware related interrupts (e.g. link speed change).
-+- #interrupt-cells: set to <1>
-+- interrupt-map-mask and interrupt-map: standard PCI properties
-+ to define the mapping of the PCIe interface to interrupt
-+ numbers.
-+- clocks: from common clock binding: clock specifiers for the PCIe controller
-+ and PCIe bus clocks.
-+- clock-names: from common clock binding: should be "pcie" and "pcie_bus".
-+
-+Example:
-+
-+SoC specific DT Entry:
-+
-+ pcie: pcie@fe000000 {
-+ compatible = "renesas,pcie-r8a7791";
-+ reg = <0 0xfe000000 0 0x80000>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ bus-range = <0x00 0xff>;
-+ device_type = "pci";
-+ ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-+ 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-+ 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-+ 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
-+ dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x40000000
-+ 0x42000000 2 0x00000000 2 0x00000000 0 0x40000000>;
-+ interrupts = <0 116 4>, <0 117 4>, <0 118 4>;
-+ #interrupt-cells = <1>;
-+ interrupt-map-mask = <0 0 0 0>;
-+ interrupt-map = <0 0 0 0 &gic 0 116 4>;
-+ clocks = <&mstp3_clks R8A7791_CLK_PCIE>, <&pcie_bus_clk>;
-+ clock-names = "pcie", "pcie_bus";
-+ status = "disabled";
-+ };
---
-2.1.2
-
diff --git a/patches.renesas/0494-DMA-shdma-add-cyclic-transfer-support.patch b/patches.renesas/0494-DMA-shdma-add-cyclic-transfer-support.patch
deleted file mode 100644
index 9d14397ca8ca8..0000000000000
--- a/patches.renesas/0494-DMA-shdma-add-cyclic-transfer-support.patch
+++ /dev/null
@@ -1,166 +0,0 @@
-From 54b41c63f46053715a58b21edea255112722b05c Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 2 Apr 2014 20:17:00 -0700
-Subject: DMA: shdma: add cyclic transfer support
-
-This patch add cyclic transfer support and enables dmaengine_prep_dma_cyclic()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-[reflown changelog for readablity]
-Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-
-(cherry picked from commit dfbb85cab5f0819d0424a3637b03e7892704fa42)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/dma/sh/shdma-base.c | 72 ++++++++++++++++++++++++++++++++++++++++-----
- include/linux/shdma-base.h | 1 +
- 2 files changed, 66 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/dma/sh/shdma-base.c b/drivers/dma/sh/shdma-base.c
-index 52396771acbe..a26ded263b0d 100644
---- a/drivers/dma/sh/shdma-base.c
-+++ b/drivers/dma/sh/shdma-base.c
-@@ -304,6 +304,7 @@ static dma_async_tx_callback __ld_cleanup(struct shdma_chan *schan, bool all)
- dma_async_tx_callback callback = NULL;
- void *param = NULL;
- unsigned long flags;
-+ LIST_HEAD(cyclic_list);
-
- spin_lock_irqsave(&schan->chan_lock, flags);
- list_for_each_entry_safe(desc, _desc, &schan->ld_queue, node) {
-@@ -369,10 +370,16 @@ static dma_async_tx_callback __ld_cleanup(struct shdma_chan *schan, bool all)
- if (((desc->mark == DESC_COMPLETED ||
- desc->mark == DESC_WAITING) &&
- async_tx_test_ack(&desc->async_tx)) || all) {
-- /* Remove from ld_queue list */
-- desc->mark = DESC_IDLE;
-
-- list_move(&desc->node, &schan->ld_free);
-+ if (all || !desc->cyclic) {
-+ /* Remove from ld_queue list */
-+ desc->mark = DESC_IDLE;
-+ list_move(&desc->node, &schan->ld_free);
-+ } else {
-+ /* reuse as cyclic */
-+ desc->mark = DESC_SUBMITTED;
-+ list_move_tail(&desc->node, &cyclic_list);
-+ }
-
- if (list_empty(&schan->ld_queue)) {
- dev_dbg(schan->dev, "Bring down channel %d\n", schan->id);
-@@ -389,6 +396,8 @@ static dma_async_tx_callback __ld_cleanup(struct shdma_chan *schan, bool all)
- */
- schan->dma_chan.completed_cookie = schan->dma_chan.cookie;
-
-+ list_splice_tail(&cyclic_list, &schan->ld_queue);
-+
- spin_unlock_irqrestore(&schan->chan_lock, flags);
-
- if (callback)
-@@ -521,7 +530,7 @@ static struct shdma_desc *shdma_add_desc(struct shdma_chan *schan,
- */
- static struct dma_async_tx_descriptor *shdma_prep_sg(struct shdma_chan *schan,
- struct scatterlist *sgl, unsigned int sg_len, dma_addr_t *addr,
-- enum dma_transfer_direction direction, unsigned long flags)
-+ enum dma_transfer_direction direction, unsigned long flags, bool cyclic)
- {
- struct scatterlist *sg;
- struct shdma_desc *first = NULL, *new = NULL /* compiler... */;
-@@ -569,7 +578,11 @@ static struct dma_async_tx_descriptor *shdma_prep_sg(struct shdma_chan *schan,
- if (!new)
- goto err_get_desc;
-
-- new->chunks = chunks--;
-+ new->cyclic = cyclic;
-+ if (cyclic)
-+ new->chunks = 1;
-+ else
-+ new->chunks = chunks--;
- list_add_tail(&new->node, &tx_list);
- } while (len);
- }
-@@ -612,7 +625,8 @@ static struct dma_async_tx_descriptor *shdma_prep_memcpy(
- sg_dma_address(&sg) = dma_src;
- sg_dma_len(&sg) = len;
-
-- return shdma_prep_sg(schan, &sg, 1, &dma_dest, DMA_MEM_TO_MEM, flags);
-+ return shdma_prep_sg(schan, &sg, 1, &dma_dest, DMA_MEM_TO_MEM,
-+ flags, false);
- }
-
- static struct dma_async_tx_descriptor *shdma_prep_slave_sg(
-@@ -640,7 +654,50 @@ static struct dma_async_tx_descriptor *shdma_prep_slave_sg(
- slave_addr = ops->slave_addr(schan);
-
- return shdma_prep_sg(schan, sgl, sg_len, &slave_addr,
-- direction, flags);
-+ direction, flags, false);
-+}
-+
-+struct dma_async_tx_descriptor *shdma_prep_dma_cyclic(
-+ struct dma_chan *chan, dma_addr_t buf_addr, size_t buf_len,
-+ size_t period_len, enum dma_transfer_direction direction,
-+ unsigned long flags, void *context)
-+{
-+ struct shdma_chan *schan = to_shdma_chan(chan);
-+ struct shdma_dev *sdev = to_shdma_dev(schan->dma_chan.device);
-+ const struct shdma_ops *ops = sdev->ops;
-+ unsigned int sg_len = buf_len / period_len;
-+ int slave_id = schan->slave_id;
-+ dma_addr_t slave_addr;
-+ struct scatterlist sgl[sg_len];
-+ int i;
-+
-+ if (!chan)
-+ return NULL;
-+
-+ BUG_ON(!schan->desc_num);
-+
-+ /* Someone calling slave DMA on a generic channel? */
-+ if (slave_id < 0 || (buf_len < period_len)) {
-+ dev_warn(schan->dev,
-+ "%s: bad parameter: buf_len=%d, period_len=%d, id=%d\n",
-+ __func__, buf_len, period_len, slave_id);
-+ return NULL;
-+ }
-+
-+ slave_addr = ops->slave_addr(schan);
-+
-+ sg_init_table(sgl, sg_len);
-+ for (i = 0; i < sg_len; i++) {
-+ dma_addr_t src = buf_addr + (period_len * i);
-+
-+ sg_set_page(&sgl[i], pfn_to_page(PFN_DOWN(src)), period_len,
-+ offset_in_page(src));
-+ sg_dma_address(&sgl[i]) = src;
-+ sg_dma_len(&sgl[i]) = period_len;
-+ }
-+
-+ return shdma_prep_sg(schan, sgl, sg_len, &slave_addr,
-+ direction, flags, true);
- }
-
- static int shdma_control(struct dma_chan *chan, enum dma_ctrl_cmd cmd,
-@@ -915,6 +972,7 @@ int shdma_init(struct device *dev, struct shdma_dev *sdev,
-
- /* Compulsory for DMA_SLAVE fields */
- dma_dev->device_prep_slave_sg = shdma_prep_slave_sg;
-+ dma_dev->device_prep_dma_cyclic = shdma_prep_dma_cyclic;
- dma_dev->device_control = shdma_control;
-
- dma_dev->dev = dev;
-diff --git a/include/linux/shdma-base.h b/include/linux/shdma-base.h
-index f92c0a43c54c..abdf1f229dc3 100644
---- a/include/linux/shdma-base.h
-+++ b/include/linux/shdma-base.h
-@@ -54,6 +54,7 @@ struct shdma_desc {
- dma_cookie_t cookie;
- int chunks;
- int mark;
-+ bool cyclic; /* used as cyclic transfer */
- };
-
- struct shdma_chan {
---
-2.1.2
-
diff --git a/patches.renesas/0495-ARM-shmobile-armadillo-initialize-all-struct-pwm_loo.patch b/patches.renesas/0495-ARM-shmobile-armadillo-initialize-all-struct-pwm_loo.patch
deleted file mode 100644
index 9969ce565e34f..0000000000000
--- a/patches.renesas/0495-ARM-shmobile-armadillo-initialize-all-struct-pwm_loo.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 9e5e722f16fae2058628f2652cdea2947250c0ce Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:33 +0200
-Subject: ARM: shmobile: armadillo: initialize all struct pwm_lookup members
-
-Initializing all the struct pwm_lookup members allows to get rid of the
-struct tpu_pwm_platform_data as the polarity initialization will be
-taken care of by the PWM core.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit b16001d745fbc900cc96c8ca2cd2cd08e738c421)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 486063db2a2f..8410ce7a2ffb 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -31,7 +31,7 @@
- #include <linux/gpio_keys.h>
- #include <linux/regulator/driver.h>
- #include <linux/pinctrl/machine.h>
--#include <linux/platform_data/pwm-renesas-tpu.h>
-+#include <linux/pwm.h>
- #include <linux/pwm_backlight.h>
- #include <linux/regulator/fixed.h>
- #include <linux/regulator/gpio-regulator.h>
-@@ -399,24 +399,22 @@ static struct resource pwm_resources[] = {
- },
- };
-
--static struct tpu_pwm_platform_data pwm_device_data = {
-- .channels[2] = {
-- .polarity = PWM_POLARITY_INVERSED,
-- }
--};
--
- static struct platform_device pwm_device = {
- .name = "renesas-tpu-pwm",
- .id = -1,
-- .dev = {
-- .platform_data = &pwm_device_data,
-- },
- .num_resources = ARRAY_SIZE(pwm_resources),
- .resource = pwm_resources,
- };
-
- static struct pwm_lookup pwm_lookup[] = {
-- PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL),
-+ {
-+ .provider = "renesas-tpu-pwm",
-+ .index = 2,
-+ .dev_id = "pwm-backlight.0",
-+ .con_id = NULL,
-+ .period = 33333,
-+ .polarity = PWM_POLARITY_INVERSED,
-+ },
- };
-
- /* LCDC and backlight */
---
-2.1.2
-
diff --git a/patches.renesas/0496-ARM-OMAP3-Beagle-initialize-all-the-struct-pwm_looku.patch b/patches.renesas/0496-ARM-OMAP3-Beagle-initialize-all-the-struct-pwm_looku.patch
deleted file mode 100644
index 7707225315138..0000000000000
--- a/patches.renesas/0496-ARM-OMAP3-Beagle-initialize-all-the-struct-pwm_looku.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d78e49817cbfc3318c67c76a46d6f9ef74602519 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:35 +0200
-Subject: ARM: OMAP3: Beagle: initialize all the struct pwm_lookup members
-
-The PWM core can retrieve the period from the PWM lookup table, so the
-struct led_pwm.pwm_period_ns member can be removed.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit e02a84a5ad2f46d4a262884df5ad9ab9e833a7b5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-omap2/board-omap3beagle.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index d6ed819ff15c..f27e1ec90b5e 100644
---- a/arch/arm/mach-omap2/board-omap3beagle.c
-+++ b/arch/arm/mach-omap2/board-omap3beagle.c
-@@ -61,7 +61,14 @@
-
- static struct pwm_lookup pwm_lookup[] = {
- /* LEDB -> PMU_STAT */
-- PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat"),
-+ {
-+ .provider = "twl-pwmled",
-+ .index = 1,
-+ .dev_id = "leds_pwm",
-+ .con_id = "beagleboard::pmu_stat",
-+ .period = 7812500,
-+ .polarity = PWM_POLARITY_NORMAL,
-+ },
- };
-
- static struct led_pwm pwm_leds[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0497-ARM-pxa-hx4700-initialize-all-the-struct-pwm_lookup-.patch b/patches.renesas/0497-ARM-pxa-hx4700-initialize-all-the-struct-pwm_lookup-.patch
deleted file mode 100644
index beafa537dd4b7..0000000000000
--- a/patches.renesas/0497-ARM-pxa-hx4700-initialize-all-the-struct-pwm_lookup-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 4c7f2c11f8fa24bf503485b9a75ac7ebf8474f51 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:36 +0200
-Subject: ARM: pxa: hx4700: initialize all the struct pwm_lookup members
-
-Instead of relying on the .pwm_period_ns member of the pwm-backlight
-driver's platform data, the PWM period can be retrieved from the PWM
-lookup table.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Acked-by: Philipp Zabel <philipp.zabel@gmail.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit fcb355063ffb12a834b3ca1383c9beec9285d568)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-pxa/hx4700.c | 9 ++++++++-
- 1 file changed, 8 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
-index a7c30eb0c8db..0788a1f171fe 100644
---- a/arch/arm/mach-pxa/hx4700.c
-+++ b/arch/arm/mach-pxa/hx4700.c
-@@ -574,7 +574,14 @@ static struct platform_device backlight = {
- };
-
- static struct pwm_lookup hx4700_pwm_lookup[] = {
-- PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL),
-+ {
-+ .provider = "pxa27x-pwm.1",
-+ .index = 0,
-+ .dev_id = "pwm-backlight",
-+ .con_id = NULL,
-+ .period = 30923,
-+ .polarity = PWM_POLARITY_NORMAL,
-+ },
- };
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0498-pwm-modify-PWM_LOOKUP-to-initialize-all-struct-pwm_l.patch b/patches.renesas/0498-pwm-modify-PWM_LOOKUP-to-initialize-all-struct-pwm_l.patch
deleted file mode 100644
index a2e32918b47fe..0000000000000
--- a/patches.renesas/0498-pwm-modify-PWM_LOOKUP-to-initialize-all-struct-pwm_l.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c18354a6bdce95ee96db628d7423875d9f4f7f52 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:37 +0200
-Subject: pwm: modify PWM_LOOKUP to initialize all struct pwm_lookup members
-
-Now that PWM_LOOKUP is not used anymore, modify it to initialize all the
-members of struct pwm_lookup.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 4284402924cc55e182008ca7e9d4fb1e891ff5ae)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/pwm.txt | 3 ++-
- include/linux/pwm.h | 4 +++-
- 2 files changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/Documentation/pwm.txt b/Documentation/pwm.txt
-index 93cb97974986..f38f99cda64f 100644
---- a/Documentation/pwm.txt
-+++ b/Documentation/pwm.txt
-@@ -19,7 +19,8 @@ should instead register a static mapping that can be used to match PWM
- consumers to providers, as given in the following example:
-
- static struct pwm_lookup board_pwm_lookup[] = {
-- PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL),
-+ PWM_LOOKUP("tegra-pwm", 0, "pwm-backlight", NULL,
-+ 50000, PWM_POLARITY_NORMAL),
- };
-
- static void __init board_init(void)
-diff --git a/include/linux/pwm.h b/include/linux/pwm.h
-index 29ca4572629d..e16ee37fb255 100644
---- a/include/linux/pwm.h
-+++ b/include/linux/pwm.h
-@@ -278,12 +278,14 @@ struct pwm_lookup {
- enum pwm_polarity polarity;
- };
-
--#define PWM_LOOKUP(_provider, _index, _dev_id, _con_id) \
-+#define PWM_LOOKUP(_provider, _index, _dev_id, _con_id, _period, _polarity) \
- { \
- .provider = _provider, \
- .index = _index, \
- .dev_id = _dev_id, \
- .con_id = _con_id, \
-+ .period = _period, \
-+ .polarity = _polarity \
- }
-
- #if IS_ENABLED(CONFIG_PWM)
---
-2.1.2
-
diff --git a/patches.renesas/0499-ARM-OMAP3-Beagle-use-PWM_LOOKUP-to-initialize-struct.patch b/patches.renesas/0499-ARM-OMAP3-Beagle-use-PWM_LOOKUP-to-initialize-struct.patch
deleted file mode 100644
index 00c6811d258f3..0000000000000
--- a/patches.renesas/0499-ARM-OMAP3-Beagle-use-PWM_LOOKUP-to-initialize-struct.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 53b94f6fa22edf4015c3e218007f45b1dd862967 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:38 +0200
-Subject: ARM: OMAP3: Beagle: use PWM_LOOKUP to initialize struct pwm_lookup
-
-Use the new variant of the PWM_LOOKUP macro to initialize the PWM lookup
-table.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Acked-by: Tony Lindgren <tony@atomide.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit dee401e1fd5eddc8e3d6ae0e8b5c4bd64aa2a369)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-omap2/board-omap3beagle.c | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
-index f27e1ec90b5e..54c135a5b4f7 100644
---- a/arch/arm/mach-omap2/board-omap3beagle.c
-+++ b/arch/arm/mach-omap2/board-omap3beagle.c
-@@ -61,14 +61,8 @@
-
- static struct pwm_lookup pwm_lookup[] = {
- /* LEDB -> PMU_STAT */
-- {
-- .provider = "twl-pwmled",
-- .index = 1,
-- .dev_id = "leds_pwm",
-- .con_id = "beagleboard::pmu_stat",
-- .period = 7812500,
-- .polarity = PWM_POLARITY_NORMAL,
-- },
-+ PWM_LOOKUP("twl-pwmled", 1, "leds_pwm", "beagleboard::pmu_stat",
-+ 7812500, PWM_POLARITY_NORMAL),
- };
-
- static struct led_pwm pwm_leds[] = {
---
-2.1.2
-
diff --git a/patches.renesas/0500-ARM-shmobile-armadillo-use-PWM_LOOKUP-to-initialize-.patch b/patches.renesas/0500-ARM-shmobile-armadillo-use-PWM_LOOKUP-to-initialize-.patch
deleted file mode 100644
index 0e8a852bc7898..0000000000000
--- a/patches.renesas/0500-ARM-shmobile-armadillo-use-PWM_LOOKUP-to-initialize-.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 4d94e9fe954382b1cf3bf9c7c2254694549ab097 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:39 +0200
-Subject: ARM: shmobile: armadillo: use PWM_LOOKUP to initialize struct
- pwm_lookup
-
-Use the new variant of the PWM_LOOKUP macro to initialize the PWM lookup
-table.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 48d6f146dced79d1df0cb91b30f1cdb749ecdf9f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 8410ce7a2ffb..dfdc9730e029 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -407,14 +407,8 @@ static struct platform_device pwm_device = {
- };
-
- static struct pwm_lookup pwm_lookup[] = {
-- {
-- .provider = "renesas-tpu-pwm",
-- .index = 2,
-- .dev_id = "pwm-backlight.0",
-- .con_id = NULL,
-- .period = 33333,
-- .polarity = PWM_POLARITY_INVERSED,
-- },
-+ PWM_LOOKUP("renesas-tpu-pwm", 2, "pwm-backlight.0", NULL,
-+ 33333, PWM_POLARITY_INVERSED),
- };
-
- /* LCDC and backlight */
---
-2.1.2
-
diff --git a/patches.renesas/0501-ARM-pxa-hx4700-use-PWM_LOOKUP-to-initialize-struct-p.patch b/patches.renesas/0501-ARM-pxa-hx4700-use-PWM_LOOKUP-to-initialize-struct-p.patch
deleted file mode 100644
index abefc84b2f202..0000000000000
--- a/patches.renesas/0501-ARM-pxa-hx4700-use-PWM_LOOKUP-to-initialize-struct-p.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From bb983333824dee3ff8d8d86c7033aba5e2d0f126 Mon Sep 17 00:00:00 2001
-From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Date: Mon, 19 May 2014 22:42:40 +0200
-Subject: ARM: pxa: hx4700: use PWM_LOOKUP to initialize struct pwm_lookup
-
-Use the new variant of the PWM_LOOKUP macro to initialize the PWM lookup
-table.
-
-Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
-Acked-by: Philipp Zabel <philipp.zabel@gmail.com>
-Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
-(cherry picked from commit 9becf5001130bcd24f57584e48467050e85eee03)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-pxa/hx4700.c | 10 ++--------
- 1 file changed, 2 insertions(+), 8 deletions(-)
-
-diff --git a/arch/arm/mach-pxa/hx4700.c b/arch/arm/mach-pxa/hx4700.c
-index 0788a1f171fe..c66ad4edc5e3 100644
---- a/arch/arm/mach-pxa/hx4700.c
-+++ b/arch/arm/mach-pxa/hx4700.c
-@@ -574,14 +574,8 @@ static struct platform_device backlight = {
- };
-
- static struct pwm_lookup hx4700_pwm_lookup[] = {
-- {
-- .provider = "pxa27x-pwm.1",
-- .index = 0,
-- .dev_id = "pwm-backlight",
-- .con_id = NULL,
-- .period = 30923,
-- .polarity = PWM_POLARITY_NORMAL,
-- },
-+ PWM_LOOKUP("pxa27x-pwm.1", 0, "pwm-backlight", NULL,
-+ 30923, PWM_POLARITY_NORMAL),
- };
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0502-ASoC-core-Update-snd_soc_of_parse_daifmt-interface.patch b/patches.renesas/0502-ASoC-core-Update-snd_soc_of_parse_daifmt-interface.patch
deleted file mode 100644
index 758c8ef521aa5..0000000000000
--- a/patches.renesas/0502-ASoC-core-Update-snd_soc_of_parse_daifmt-interface.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 016b67e717ef312dd430a3b7c742b850a292a063 Mon Sep 17 00:00:00 2001
-From: Jyri Sarha <jsarha@ti.com>
-Date: Mon, 24 Mar 2014 12:15:24 +0200
-Subject: ASoC: core: Update snd_soc_of_parse_daifmt() interface
-
-Adds struct device_node **bitclkmaster and struct device_node **framemaster
-function parameters. With the new syntax bitclock-master and frame-master
-properties can explicitly indicate the dai-link bit-clock and frame masters
-with a phandle. This patch also makes the minimal changes to simple-card
-for it to work with the updated snd_soc_of_parse_daifmt(). Simple-card appears
-to be the only user of snd_soc_of_parse_daifmt() for now.
-
-Signed-off-by: Jyri Sarha <jsarha@ti.com>
-Acked-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 389cb8348cf5ac4a702c71bf13673c4c8bf01e34)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/soc.h | 4 +++-
- sound/soc/generic/simple-card.c | 5 +++--
- sound/soc/soc-core.c | 8 +++++++-
- 3 files changed, 13 insertions(+), 4 deletions(-)
-
-diff --git a/include/sound/soc.h b/include/sound/soc.h
-index 2a878d03c147..27bb5abf62b0 100644
---- a/include/sound/soc.h
-+++ b/include/sound/soc.h
-@@ -1181,7 +1181,9 @@ int snd_soc_of_parse_tdm_slot(struct device_node *np,
- int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
- const char *propname);
- unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
-- const char *prefix);
-+ const char *prefix,
-+ struct device_node **bitclkmaster,
-+ struct device_node **framemaster);
- int snd_soc_of_get_dai_name(struct device_node *of_node,
- const char **dai_name);
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 21f1ccbdf582..835fd0258243 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -121,7 +121,7 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- * bitclock-master, frame-master
- * and specific "format" if it has
- */
-- dai->fmt = snd_soc_of_parse_daifmt(np, NULL);
-+ dai->fmt = snd_soc_of_parse_daifmt(np, NULL, NULL, NULL);
- dai->fmt |= daifmt;
-
- /*
-@@ -201,7 +201,8 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
-
- /* get CPU/CODEC common format via simple-audio-card,format */
-- daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,") &
-+ daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,", NULL,
-+ NULL) &
- (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
-
- /* off-codec widgets */
-diff --git a/sound/soc/soc-core.c b/sound/soc/soc-core.c
-index 5b7d3ba87c7a..c75d008393d9 100644
---- a/sound/soc/soc-core.c
-+++ b/sound/soc/soc-core.c
-@@ -4620,7 +4620,9 @@ int snd_soc_of_parse_audio_routing(struct snd_soc_card *card,
- EXPORT_SYMBOL_GPL(snd_soc_of_parse_audio_routing);
-
- unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
-- const char *prefix)
-+ const char *prefix,
-+ struct device_node **bitclkmaster,
-+ struct device_node **framemaster)
- {
- int ret, i;
- char prop[128];
-@@ -4703,9 +4705,13 @@ unsigned int snd_soc_of_parse_daifmt(struct device_node *np,
- */
- snprintf(prop, sizeof(prop), "%sbitclock-master", prefix);
- bit = !!of_get_property(np, prop, NULL);
-+ if (bit && bitclkmaster)
-+ *bitclkmaster = of_parse_phandle(np, prop, 0);
-
- snprintf(prop, sizeof(prop), "%sframe-master", prefix);
- frame = !!of_get_property(np, prop, NULL);
-+ if (frame && framemaster)
-+ *framemaster = of_parse_phandle(np, prop, 0);
-
- switch ((bit << 4) + frame) {
- case 0x11:
---
-2.1.2
-
diff --git a/patches.renesas/0503-ASoC-simple-card-Move-dai-link-level-properties-away.patch b/patches.renesas/0503-ASoC-simple-card-Move-dai-link-level-properties-away.patch
deleted file mode 100644
index c9139ec0aee5f..0000000000000
--- a/patches.renesas/0503-ASoC-simple-card-Move-dai-link-level-properties-away.patch
+++ /dev/null
@@ -1,490 +0,0 @@
-From d8dffe29e138b64456e677f2f87e5707d041fc7f Mon Sep 17 00:00:00 2001
-From: Jyri Sarha <jsarha@ti.com>
-Date: Mon, 24 Mar 2014 12:15:25 +0200
-Subject: ASoC: simple-card: Move dai-link level properties away from dai
- subnodes
-
-The properties like format, bitclock-master, frame-master,
-bitclock-inversion, and frame-inversion should be common to the dais
-connected with a dai-link. For bitclock-master and frame-master
-properties to be unambiguous they need to indicate the mastering dai
-node with a phandle.
-
-Signed-off-by: Jyri Sarha <jsarha@ti.com>
-Acked-by: Jean-Francois Moine <moinejf@free.fr>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b3ca11ff59bc5842b01f13421a17e6d9a8936784)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/simple-card.txt | 88 ++++----
- sound/soc/generic/simple-card.c | 239 ++++++++++++---------
- 2 files changed, 190 insertions(+), 137 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
-index 131aa2ad7f1a..9b9df146fd1a 100644
---- a/Documentation/devicetree/bindings/sound/simple-card.txt
-+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
-@@ -1,6 +1,6 @@
- Simple-Card:
-
--Simple-Card specifies audio DAI connection of SoC <-> codec.
-+Simple-Card specifies audio DAI connections of SoC <-> codec.
-
- Required properties:
-
-@@ -10,26 +10,51 @@ Optional properties:
-
- - simple-audio-card,name : User specified audio sound card name, one string
- property.
--- simple-audio-card,format : CPU/CODEC common audio format.
-- "i2s", "right_j", "left_j" , "dsp_a"
-- "dsp_b", "ac97", "pdm", "msb", "lsb"
- - simple-audio-card,widgets : Please refer to widgets.txt.
- - simple-audio-card,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.
--- dai-tdm-slot-num : Please refer to tdm-slot.txt.
--- dai-tdm-slot-width : Please refer to tdm-slot.txt.
-+Optional subnodes:
-+
-+- simple-audio-card,dai-link : Container for dai-link level
-+ properties and the CPU and CODEC
-+ sub-nodes. This container may be
-+ omitted when the card has only one
-+ DAI link. See the examples and the
-+ section bellow.
-+
-+Dai-link subnode properties and subnodes:
-+
-+If dai-link subnode is omitted and the subnode properties are directly
-+under "sound"-node the subnode property and subnode names have to be
-+prefixed with "simple-audio-card,"-prefix.
-
--Required subnodes:
-+Required dai-link subnodes:
-
--- simple-audio-card,dai-link : container for the CPU and CODEC sub-nodes
-- This container may be omitted when the
-- card has only one DAI link.
-- See the examples.
-+- cpu : CPU sub-node
-+- codec : CODEC sub-node
-
--- simple-audio-card,cpu : CPU sub-node
--- simple-audio-card,codec : CODEC sub-node
-+Optional dai-link subnode properties:
-+
-+- format : CPU/CODEC common audio format.
-+ "i2s", "right_j", "left_j" , "dsp_a"
-+ "dsp_b", "ac97", "pdm", "msb", "lsb"
-+- frame-master : Indicates dai-link frame master.
-+ phandle to a cpu or codec subnode.
-+- bitclock-master : Indicates dai-link bit clock master.
-+ phandle to a cpu or codec subnode.
-+- bitclock-inversion : bool property. Add this if the
-+ dai-link uses bit clock inversion.
-+- frame-inversion : bool property. Add this if the
-+ dai-link uses frame clock inversion.
-+
-+For backward compatibility the frame-master and bitclock-master
-+properties can be used as booleans in codec subnode to indicate if the
-+codec is the dai-link frame or bit clock master. In this case there
-+should be no dai-link node, the same properties should not be present
-+at sound-node level, and the bitclock-inversion and frame-inversion
-+properties should also be placed in the codec node if needed.
-
- Required CPU/CODEC subnodes properties:
-
-@@ -37,29 +62,21 @@ Required CPU/CODEC subnodes properties:
-
- Optional CPU/CODEC subnodes properties:
-
--- format : CPU/CODEC specific audio format if needed.
-- see simple-audio-card,format
--- frame-master : bool property. add this if subnode is frame master
--- bitclock-master : bool property. add this if subnode is bitclock master
--- bitclock-inversion : bool property. add this if subnode has clock inversion
--- frame-inversion : bool property. add this if subnode has frame inversion
-+- dai-tdm-slot-num : Please refer to tdm-slot.txt.
-+- dai-tdm-slot-width : Please refer to tdm-slot.txt.
- - clocks / system-clock-frequency : specify subnode's clock if needed.
- it can be specified via "clocks" if system has
- clock node (= common clock), or "system-clock-frequency"
- (if system doens't support common clock)
-
--Note:
-- * For 'format', 'frame-master', 'bitclock-master', 'bitclock-inversion' and
-- 'frame-inversion', the simple card will use the settings of CODEC for both
-- CPU and CODEC sides as we need to keep the settings identical for both ends
-- of the link.
--
- Example 1 - single DAI link:
-
- sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "VF610-Tower-Sound-Card";
- simple-audio-card,format = "left_j";
-+ simple-audio-card,bitclock-master = <&dailink0_master>;
-+ simple-audio-card,frame-master = <&dailink0_master>;
- simple-audio-card,widgets =
- "Microphone", "Microphone Jack",
- "Headphone", "Headphone Jack",
-@@ -69,17 +86,12 @@ sound {
- "Headphone Jack", "HP_OUT",
- "External Speaker", "LINE_OUT";
-
-- dai-tdm-slot-num = <2>;
-- dai-tdm-slot-width = <8>;
--
- simple-audio-card,cpu {
- sound-dai = <&sh_fsi2 0>;
- };
-
-- simple-audio-card,codec {
-+ dailink0_master: simple-audio-card,codec {
- sound-dai = <&ak4648>;
-- bitclock-master;
-- frame-master;
- clocks = <&osc>;
- };
- };
-@@ -105,31 +117,31 @@ Example 2 - many DAI links:
- sound {
- compatible = "simple-audio-card";
- simple-audio-card,name = "Cubox Audio";
-- simple-audio-card,format = "i2s";
-
- simple-audio-card,dai-link@0 { /* I2S - HDMI */
-- simple-audio-card,cpu {
-+ format = "i2s";
-+ cpu {
- sound-dai = <&audio1 0>;
- };
-- simple-audio-card,codec {
-+ codec {
- sound-dai = <&tda998x 0>;
- };
- };
-
- simple-audio-card,dai-link@1 { /* S/PDIF - HDMI */
-- simple-audio-card,cpu {
-+ cpu {
- sound-dai = <&audio1 1>;
- };
-- simple-audio-card,codec {
-+ codec {
- sound-dai = <&tda998x 1>;
- };
- };
-
- simple-audio-card,dai-link@2 { /* S/PDIF - S/PDIF */
-- simple-audio-card,cpu {
-+ cpu {
- sound-dai = <&audio1 1>;
- };
-- simple-audio-card,codec {
-+ codec {
- sound-dai = <&spdif_codec>;
- };
- };
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 835fd0258243..3f2e5807d7eb 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -88,7 +88,6 @@ static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
-
- static int
- asoc_simple_card_sub_parse_of(struct device_node *np,
-- unsigned int daifmt,
- struct asoc_simple_dai *dai,
- const struct device_node **p_node,
- const char **name)
-@@ -117,14 +116,6 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- return ret;
-
- /*
-- * bitclock-inversion, frame-inversion
-- * bitclock-master, frame-master
-- * and specific "format" if it has
-- */
-- dai->fmt = snd_soc_of_parse_daifmt(np, NULL, NULL, NULL);
-- dai->fmt |= daifmt;
--
-- /*
- * dai->sysclk come from
- * "clocks = <&xxx>" (if system has common clock)
- * or "system-clock-frequency = <xxx>"
-@@ -151,37 +142,135 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- return 0;
- }
-
--static int simple_card_cpu_codec_of(struct device_node *node,
-- int daifmt,
-- struct snd_soc_dai_link *dai_link,
-- struct simple_dai_props *dai_props)
-+static int simple_card_dai_link_of(struct device_node *node,
-+ struct device *dev,
-+ struct snd_soc_dai_link *dai_link,
-+ struct simple_dai_props *dai_props)
- {
-- struct device_node *np;
-+ struct device_node *np = NULL;
-+ struct device_node *bitclkmaster = NULL;
-+ struct device_node *framemaster = NULL;
-+ unsigned int daifmt;
-+ char *name;
-+ char prop[128];
-+ char *prefix = "";
- int ret;
-
-- /* CPU sub-node */
-- ret = -EINVAL;
-- np = of_get_child_by_name(node, "simple-audio-card,cpu");
-- if (np) {
-- ret = asoc_simple_card_sub_parse_of(np, daifmt,
-- &dai_props->cpu_dai,
-- &dai_link->cpu_of_node,
-- &dai_link->cpu_dai_name);
-- of_node_put(np);
-+ if (!strcmp("sound", node->name))
-+ prefix = "simple-audio-card,";
-+
-+ daifmt = snd_soc_of_parse_daifmt(node, prefix,
-+ &bitclkmaster, &framemaster);
-+ daifmt &= ~SND_SOC_DAIFMT_MASTER_MASK;
-+
-+ snprintf(prop, sizeof(prop), "%scpu", prefix);
-+ np = of_get_child_by_name(node, prop);
-+ if (!np) {
-+ ret = -EINVAL;
-+ dev_err(dev, "%s: Can't find simple-audio-card,cpu DT node\n",
-+ __func__);
-+ goto dai_link_of_err;
- }
-+
-+ ret = asoc_simple_card_sub_parse_of(np, &dai_props->cpu_dai,
-+ &dai_link->cpu_of_node,
-+ &dai_link->cpu_dai_name);
- if (ret < 0)
-- return ret;
-+ goto dai_link_of_err;
-+
-+ dai_props->cpu_dai.fmt = daifmt;
-+ switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
-+ case 0x11:
-+ dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS;
-+ break;
-+ case 0x10:
-+ dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFM;
-+ break;
-+ case 0x01:
-+ dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFS;
-+ break;
-+ default:
-+ dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM;
-+ break;
-+ }
-
-- /* CODEC sub-node */
-- ret = -EINVAL;
-- np = of_get_child_by_name(node, "simple-audio-card,codec");
-- if (np) {
-- ret = asoc_simple_card_sub_parse_of(np, daifmt,
-- &dai_props->codec_dai,
-- &dai_link->codec_of_node,
-- &dai_link->codec_dai_name);
-- of_node_put(np);
-+ of_node_put(np);
-+ snprintf(prop, sizeof(prop), "%scodec", prefix);
-+ np = of_get_child_by_name(node, prop);
-+ if (!np) {
-+ ret = -EINVAL;
-+ dev_err(dev, "%s: Can't find simple-audio-card,codec DT node\n",
-+ __func__);
-+ goto dai_link_of_err;
-+ }
-+
-+ ret = asoc_simple_card_sub_parse_of(np, &dai_props->codec_dai,
-+ &dai_link->codec_of_node,
-+ &dai_link->codec_dai_name);
-+ if (ret < 0)
-+ goto dai_link_of_err;
-+
-+ if (strlen(prefix) && !bitclkmaster && !framemaster) {
-+ /* No dai-link level and master setting was not found from
-+ sound node level, revert back to legacy DT parsing and
-+ take the settings from codec node. */
-+ dev_dbg(dev, "%s: Revert to legacy daifmt parsing\n",
-+ __func__);
-+ dai_props->cpu_dai.fmt = dai_props->codec_dai.fmt =
-+ snd_soc_of_parse_daifmt(np, NULL, NULL, NULL) |
-+ (daifmt & ~SND_SOC_DAIFMT_CLOCK_MASK);
-+ } else {
-+ dai_props->codec_dai.fmt = daifmt;
-+ switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
-+ case 0x11:
-+ dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM;
-+ break;
-+ case 0x10:
-+ dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBM_CFS;
-+ break;
-+ case 0x01:
-+ dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBS_CFM;
-+ break;
-+ default:
-+ dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS;
-+ break;
-+ }
-+ }
-+
-+ if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) {
-+ ret = -EINVAL;
-+ goto dai_link_of_err;
- }
-+
-+ /* simple-card assumes platform == cpu */
-+ dai_link->platform_of_node = dai_link->cpu_of_node;
-+
-+ /* Link name is created from CPU/CODEC dai name */
-+ name = devm_kzalloc(dev,
-+ strlen(dai_link->cpu_dai_name) +
-+ strlen(dai_link->codec_dai_name) + 2,
-+ GFP_KERNEL);
-+ sprintf(name, "%s-%s", dai_link->cpu_dai_name,
-+ dai_link->codec_dai_name);
-+ dai_link->name = dai_link->stream_name = name;
-+
-+ dev_dbg(dev, "\tname : %s\n", dai_link->stream_name);
-+ dev_dbg(dev, "\tcpu : %s / %04x / %d\n",
-+ dai_link->cpu_dai_name,
-+ dai_props->cpu_dai.fmt,
-+ dai_props->cpu_dai.sysclk);
-+ dev_dbg(dev, "\tcodec : %s / %04x / %d\n",
-+ dai_link->codec_dai_name,
-+ dai_props->codec_dai.fmt,
-+ dai_props->codec_dai.sysclk);
-+
-+dai_link_of_err:
-+ if (np)
-+ of_node_put(np);
-+ if (bitclkmaster)
-+ of_node_put(bitclkmaster);
-+ if (framemaster)
-+ of_node_put(framemaster);
- return ret;
- }
-
-@@ -192,19 +281,11 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- {
- struct snd_soc_dai_link *dai_link = priv->snd_card.dai_link;
- struct simple_dai_props *dai_props = priv->dai_props;
-- struct device_node *np;
-- char *name;
-- unsigned int daifmt;
- int ret;
-
- /* parsing the card name from DT */
- snd_soc_of_parse_card_name(&priv->snd_card, "simple-audio-card,name");
-
-- /* get CPU/CODEC common format via simple-audio-card,format */
-- daifmt = snd_soc_of_parse_daifmt(node, "simple-audio-card,", NULL,
-- NULL) &
-- (SND_SOC_DAIFMT_FORMAT_MASK | SND_SOC_DAIFMT_INV_MASK);
--
- /* off-codec widgets */
- if (of_property_read_bool(node, "simple-audio-card,widgets")) {
- ret = snd_soc_of_parse_audio_simple_widgets(&priv->snd_card,
-@@ -221,71 +302,31 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- return ret;
- }
-
-- /* loop on the DAI links */
-- np = NULL;
-- for (;;) {
-- if (multi) {
-- np = of_get_next_child(node, np);
-- if (!np)
-- break;
-+ dev_dbg(dev, "New simple-card: %s\n", priv->snd_card.name ?
-+ priv->snd_card.name : "");
-+
-+ if (multi) {
-+ struct device_node *np = NULL;
-+ int i;
-+ for (i = 0; (np = of_get_next_child(node, np)); i++) {
-+ dev_dbg(dev, "\tlink %d:\n", i);
-+ ret = simple_card_dai_link_of(np, dev, dai_link + i,
-+ dai_props + i);
-+ if (ret < 0) {
-+ of_node_put(np);
-+ return ret;
-+ }
- }
--
-- ret = simple_card_cpu_codec_of(multi ? np : node,
-- daifmt, dai_link, dai_props);
-+ } else {
-+ ret = simple_card_dai_link_of(node, dev, dai_link, dai_props);
- if (ret < 0)
-- goto err;
--
-- /*
-- * overwrite cpu_dai->fmt as its DAIFMT_MASTER bit is based on CODEC
-- * while the other bits should be identical unless buggy SW/HW design.
-- */
-- dai_props->cpu_dai.fmt = dai_props->codec_dai.fmt;
--
-- if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) {
-- ret = -EINVAL;
-- goto err;
-- }
--
-- /* simple-card assumes platform == cpu */
-- dai_link->platform_of_node = dai_link->cpu_of_node;
--
-- name = devm_kzalloc(dev,
-- strlen(dai_link->cpu_dai_name) +
-- strlen(dai_link->codec_dai_name) + 2,
-- GFP_KERNEL);
-- sprintf(name, "%s-%s", dai_link->cpu_dai_name,
-- dai_link->codec_dai_name);
-- dai_link->name = dai_link->stream_name = name;
--
-- if (!multi)
-- break;
--
-- dai_link++;
-- dai_props++;
-+ return ret;
- }
-
-- /* card name is created from CPU/CODEC dai name */
-- dai_link = priv->snd_card.dai_link;
- if (!priv->snd_card.name)
-- priv->snd_card.name = dai_link->name;
--
-- dev_dbg(dev, "card-name : %s\n", priv->snd_card.name);
-- dev_dbg(dev, "platform : %04x\n", daifmt);
-- dai_props = priv->dai_props;
-- dev_dbg(dev, "cpu : %s / %04x / %d\n",
-- dai_link->cpu_dai_name,
-- dai_props->cpu_dai.fmt,
-- dai_props->cpu_dai.sysclk);
-- dev_dbg(dev, "codec : %s / %04x / %d\n",
-- dai_link->codec_dai_name,
-- dai_props->codec_dai.fmt,
-- dai_props->codec_dai.sysclk);
-+ priv->snd_card.name = priv->snd_card.dai_link->name;
-
- return 0;
--
--err:
-- of_node_put(np);
-- return ret;
- }
-
- /* update the reference count of the devices nodes at end of probe */
---
-2.1.2
-
diff --git a/patches.renesas/0504-ASoC-simple-card-Drop-node-name-checking.patch b/patches.renesas/0504-ASoC-simple-card-Drop-node-name-checking.patch
deleted file mode 100644
index d2d13e2b3ffa8..0000000000000
--- a/patches.renesas/0504-ASoC-simple-card-Drop-node-name-checking.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 5cef99e5e5b1b91bdfbd201c0c5e2fe0ed755053 Mon Sep 17 00:00:00 2001
-From: Nicolin Chen <Guangyu.Chen@freescale.com>
-Date: Thu, 24 Apr 2014 19:13:58 +0800
-Subject: ASoC: simple-card: Drop node->name checking
-
-The current simple-card driver limits the DT node name to "sound".
-Any of other names is forbidden while actually we should allow DT
-to pass other node names.
-
-And if this function is being called, the node must already have
-the compatible "simple-audio-card" in DTB. So there should be no
-need to check the name here.
-
-Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 50e6c718a1eb2ae6d05f22615d8268b026175a4a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 3f2e5807d7eb..383a4a18d51f 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -156,8 +156,7 @@ static int simple_card_dai_link_of(struct device_node *node,
- char *prefix = "";
- int ret;
-
-- if (!strcmp("sound", node->name))
-- prefix = "simple-audio-card,";
-+ prefix = "simple-audio-card,";
-
- daifmt = snd_soc_of_parse_daifmt(node, prefix,
- &bitclkmaster, &framemaster);
---
-2.1.2
-
diff --git a/patches.renesas/0505-ASoC-simple-card-Simplify-error-msg-in-simple_card_d.patch b/patches.renesas/0505-ASoC-simple-card-Simplify-error-msg-in-simple_card_d.patch
deleted file mode 100644
index d49557e38ea7b..0000000000000
--- a/patches.renesas/0505-ASoC-simple-card-Simplify-error-msg-in-simple_card_d.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 76c29f42ffd4b249f4c445609caa07be4f4c76f2 Mon Sep 17 00:00:00 2001
-From: Nicolin Chen <Guangyu.Chen@freescale.com>
-Date: Thu, 24 Apr 2014 19:13:59 +0800
-Subject: ASoC: simple-card: Simplify error msg in simple_card_dai_link_of()
-
-It would look better to use prop instead.
-
-Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 966b8063607fbf43c8fdeef579fd8de8a35ca45d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 383a4a18d51f..c091557666d5 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -166,8 +166,7 @@ static int simple_card_dai_link_of(struct device_node *node,
- np = of_get_child_by_name(node, prop);
- if (!np) {
- ret = -EINVAL;
-- dev_err(dev, "%s: Can't find simple-audio-card,cpu DT node\n",
-- __func__);
-+ dev_err(dev, "%s: Can't find %s DT node\n", __func__, prop);
- goto dai_link_of_err;
- }
-
-@@ -198,8 +197,7 @@ static int simple_card_dai_link_of(struct device_node *node,
- np = of_get_child_by_name(node, prop);
- if (!np) {
- ret = -EINVAL;
-- dev_err(dev, "%s: Can't find simple-audio-card,codec DT node\n",
-- __func__);
-+ dev_err(dev, "%s: Can't find %s DT node\n", __func__, prop);
- goto dai_link_of_err;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0506-ASoC-simple-card-Improve-coding-style.patch b/patches.renesas/0506-ASoC-simple-card-Improve-coding-style.patch
deleted file mode 100644
index 30a75f63c30da..0000000000000
--- a/patches.renesas/0506-ASoC-simple-card-Improve-coding-style.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From e9dfbc63375191f9add9b96b1cd5a7dd2db3ef13 Mon Sep 17 00:00:00 2001
-From: Nicolin Chen <Guangyu.Chen@freescale.com>
-Date: Thu, 24 Apr 2014 19:14:00 +0800
-Subject: ASoC: simple-card: Improve coding style
-
-Improve indentation and space.
-
-Signed-off-by: Nicolin Chen <Guangyu.Chen@freescale.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 781cbebed750af26341e551b785048a1ea347c5e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 23 +++++++++++------------
- 1 file changed, 11 insertions(+), 12 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index c091557666d5..98f97e543c29 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -66,8 +66,7 @@ err:
-
- static int asoc_simple_card_dai_init(struct snd_soc_pcm_runtime *rtd)
- {
-- struct simple_card_data *priv =
-- snd_soc_card_get_drvdata(rtd->card);
-+ struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
- struct snd_soc_dai *codec = rtd->codec_dai;
- struct snd_soc_dai *cpu = rtd->cpu_dai;
- struct simple_dai_props *dai_props;
-@@ -177,7 +176,7 @@ static int simple_card_dai_link_of(struct device_node *node,
- goto dai_link_of_err;
-
- dai_props->cpu_dai.fmt = daifmt;
-- switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
-+ switch (((np == bitclkmaster) << 4) | (np == framemaster)) {
- case 0x11:
- dai_props->cpu_dai.fmt |= SND_SOC_DAIFMT_CBS_CFS;
- break;
-@@ -218,7 +217,7 @@ static int simple_card_dai_link_of(struct device_node *node,
- (daifmt & ~SND_SOC_DAIFMT_CLOCK_MASK);
- } else {
- dai_props->codec_dai.fmt = daifmt;
-- switch (((np == bitclkmaster)<<4)|(np == framemaster)) {
-+ switch (((np == bitclkmaster) << 4) | (np == framemaster)) {
- case 0x11:
- dai_props->codec_dai.fmt |= SND_SOC_DAIFMT_CBM_CFM;
- break;
-@@ -235,8 +234,8 @@ static int simple_card_dai_link_of(struct device_node *node,
- }
-
- if (!dai_link->cpu_dai_name || !dai_link->codec_dai_name) {
-- ret = -EINVAL;
-- goto dai_link_of_err;
-+ ret = -EINVAL;
-+ goto dai_link_of_err;
- }
-
- /* simple-card assumes platform == cpu */
-@@ -417,10 +416,10 @@ static int asoc_simple_card_probe(struct platform_device *pdev)
- return -EINVAL;
- }
-
-- if (!cinfo->name ||
-- !cinfo->codec_dai.name ||
-- !cinfo->codec ||
-- !cinfo->platform ||
-+ if (!cinfo->name ||
-+ !cinfo->codec_dai.name ||
-+ !cinfo->codec ||
-+ !cinfo->platform ||
- !cinfo->cpu_dai.name) {
- dev_err(dev, "insufficient asoc_simple_card_info settings\n");
- return -EINVAL;
-@@ -464,11 +463,11 @@ MODULE_DEVICE_TABLE(of, asoc_simple_of_match);
-
- static struct platform_driver asoc_simple_card = {
- .driver = {
-- .name = "asoc-simple-card",
-+ .name = "asoc-simple-card",
- .owner = THIS_MODULE,
- .of_match_table = asoc_simple_of_match,
- },
-- .probe = asoc_simple_card_probe,
-+ .probe = asoc_simple_card_probe,
- };
-
- module_platform_driver(asoc_simple_card);
---
-2.1.2
-
diff --git a/patches.renesas/0507-ASoC-simple-card-is_top_level_node-parameter-to-simp.patch b/patches.renesas/0507-ASoC-simple-card-is_top_level_node-parameter-to-simp.patch
deleted file mode 100644
index 757b47fd0d0d9..0000000000000
--- a/patches.renesas/0507-ASoC-simple-card-is_top_level_node-parameter-to-simp.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From bd5bad45d1376564ebe943609356cbfe45c80c49 Mon Sep 17 00:00:00 2001
-From: Jyri Sarha <jsarha@ti.com>
-Date: Thu, 24 Apr 2014 19:42:00 +0300
-Subject: ASoC: simple-card: is_top_level_node parameter to
- simple_card_dai_link_of()
-
-Restore correct parsing of dai-link subnodes with more explicit
-implementation for applying the "simple-audio-card,"-prefix to
-dai-link property and subnode names.
-
-Signed-off-by: Jyri Sarha <jsarha@ti.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 648722155dc081b019ab0ef548bbebde760a2b83)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/generic/simple-card.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 98f97e543c29..06fe0e22b267 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -144,7 +144,8 @@ asoc_simple_card_sub_parse_of(struct device_node *np,
- static int simple_card_dai_link_of(struct device_node *node,
- struct device *dev,
- struct snd_soc_dai_link *dai_link,
-- struct simple_dai_props *dai_props)
-+ struct simple_dai_props *dai_props,
-+ bool is_top_level_node)
- {
- struct device_node *np = NULL;
- struct device_node *bitclkmaster = NULL;
-@@ -155,7 +156,8 @@ static int simple_card_dai_link_of(struct device_node *node,
- char *prefix = "";
- int ret;
-
-- prefix = "simple-audio-card,";
-+ if (is_top_level_node)
-+ prefix = "simple-audio-card,";
-
- daifmt = snd_soc_of_parse_daifmt(node, prefix,
- &bitclkmaster, &framemaster);
-@@ -307,14 +309,15 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- for (i = 0; (np = of_get_next_child(node, np)); i++) {
- dev_dbg(dev, "\tlink %d:\n", i);
- ret = simple_card_dai_link_of(np, dev, dai_link + i,
-- dai_props + i);
-+ dai_props + i, false);
- if (ret < 0) {
- of_node_put(np);
- return ret;
- }
- }
- } else {
-- ret = simple_card_dai_link_of(node, dev, dai_link, dai_props);
-+ ret = simple_card_dai_link_of(node, dev, dai_link, dai_props,
-+ true);
- if (ret < 0)
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0508-ASoC-simple-card-Support-setting-mclk-via-a-fixed-fa.patch b/patches.renesas/0508-ASoC-simple-card-Support-setting-mclk-via-a-fixed-fa.patch
deleted file mode 100644
index ff7b380c67628..0000000000000
--- a/patches.renesas/0508-ASoC-simple-card-Support-setting-mclk-via-a-fixed-fa.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 71c261c4d909a5449d51090675a137bea9851997 Mon Sep 17 00:00:00 2001
-From: Andrew Lunn <andrew@lunn.ch>
-Date: Thu, 22 May 2014 17:31:49 +0200
-Subject: ASoC: simple-card: Support setting mclk via a fixed factor
-
-Some platforms require that the codecs mclk is a fixed multiplication
-factor of the audio stream rate. Add a optional property to the
-binding to hold this factor and implement a hw_params() function to
-make use of it.
-
-Signed-off-by: Andrew Lunn <andrew@lunn.ch>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2942a0e285c46587a1025f12597df63ec04d08c6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/simple-card.txt | 3 +++
- sound/soc/generic/simple-card.c | 28 ++++++++++++++++++++++
- 2 files changed, 31 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/sound/simple-card.txt b/Documentation/devicetree/bindings/sound/simple-card.txt
-index 9b9df146fd1a..c2e9841dfce4 100644
---- a/Documentation/devicetree/bindings/sound/simple-card.txt
-+++ b/Documentation/devicetree/bindings/sound/simple-card.txt
-@@ -15,6 +15,9 @@ Optional properties:
- Each entry is a pair of strings, the first being the
- connection's sink, the second being the connection's
- source.
-+- simple-audio-card,mclk-fs : Multiplication factor between stream rate and codec
-+ mclk.
-+
- Optional subnodes:
-
- - simple-audio-card,dai-link : Container for dai-link level
-diff --git a/sound/soc/generic/simple-card.c b/sound/soc/generic/simple-card.c
-index 06fe0e22b267..03a7fdcdf114 100644
---- a/sound/soc/generic/simple-card.c
-+++ b/sound/soc/generic/simple-card.c
-@@ -24,9 +24,32 @@ struct simple_card_data {
- struct asoc_simple_dai cpu_dai;
- struct asoc_simple_dai codec_dai;
- } *dai_props;
-+ unsigned int mclk_fs;
- struct snd_soc_dai_link dai_link[]; /* dynamically allocated */
- };
-
-+static int asoc_simple_card_hw_params(struct snd_pcm_substream *substream,
-+ struct snd_pcm_hw_params *params)
-+{
-+ struct snd_soc_pcm_runtime *rtd = substream->private_data;
-+ struct snd_soc_dai *codec_dai = rtd->codec_dai;
-+ struct simple_card_data *priv = snd_soc_card_get_drvdata(rtd->card);
-+ unsigned int mclk;
-+ int ret = 0;
-+
-+ if (priv->mclk_fs) {
-+ mclk = params_rate(params) * priv->mclk_fs;
-+ ret = snd_soc_dai_set_sysclk(codec_dai, 0, mclk,
-+ SND_SOC_CLOCK_IN);
-+ }
-+
-+ return ret;
-+}
-+
-+static struct snd_soc_ops asoc_simple_card_ops = {
-+ .hw_params = asoc_simple_card_hw_params,
-+};
-+
- static int __asoc_simple_card_dai_init(struct snd_soc_dai *dai,
- struct asoc_simple_dai *set)
- {
-@@ -251,6 +274,7 @@ static int simple_card_dai_link_of(struct device_node *node,
- sprintf(name, "%s-%s", dai_link->cpu_dai_name,
- dai_link->codec_dai_name);
- dai_link->name = dai_link->stream_name = name;
-+ dai_link->ops = &asoc_simple_card_ops;
-
- dev_dbg(dev, "\tname : %s\n", dai_link->stream_name);
- dev_dbg(dev, "\tcpu : %s / %04x / %d\n",
-@@ -300,6 +324,10 @@ static int asoc_simple_card_parse_of(struct device_node *node,
- return ret;
- }
-
-+ /* Factor to mclk, used in hw_params() */
-+ of_property_read_u32(node, "simple-audio-card,mclk-fs",
-+ &priv->mclk_fs);
-+
- dev_dbg(dev, "New simple-card: %s\n", priv->snd_card.name ?
- priv->snd_card.name : "");
-
---
-2.1.2
-
diff --git a/patches.renesas/0509-serial-sh-sci-Add-device-tree-support-for-r8a7-778-7.patch b/patches.renesas/0509-serial-sh-sci-Add-device-tree-support-for-r8a7-778-7.patch
deleted file mode 100644
index 3570e57a42866..0000000000000
--- a/patches.renesas/0509-serial-sh-sci-Add-device-tree-support-for-r8a7-778-7.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From d7b0142eae6e7e6e8b197e8c13192a093e5c4258 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 11 Jul 2014 11:11:08 +0200
-Subject: serial: sh-sci: Add device tree support for r8a7{778,740,3a4} and
- sh73a0
-
-Simply document new compat strings.
-There appears to be no need for a driver updates.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 34c4eda809e1efb16c554c07bb5df4c8ace9424e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/serial/renesas,sci-serial.txt | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-index 64fd7dec1bbc..b3556609a06f 100644
---- a/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-+++ b/Documentation/devicetree/bindings/serial/renesas,sci-serial.txt
-@@ -4,6 +4,13 @@ Required properties:
-
- - compatible: Must contain one of the following:
-
-+ - "renesas,scifa-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFA compatible UART.
-+ - "renesas,scifb-sh73a0" for SH73A0 (SH-Mobile AG5) SCIFB compatible UART.
-+ - "renesas,scifa-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFA compatible UART.
-+ - "renesas,scifb-r8a73a4" for R8A73A4 (R-Mobile APE6) SCIFB compatible UART.
-+ - "renesas,scifa-r8a7740" for R8A7740 (R-Mobile A1) SCIFA compatible UART.
-+ - "renesas,scifb-r8a7740" for R8A7740 (R-Mobile A1) SCIFB compatible UART.
-+ - "renesas,scif-r8a7778" for R8A7778 (R-Car M1) SCIF compatible UART.
- - "renesas,scif-r8a7779" for R8A7779 (R-Car H1) SCIF compatible UART.
- - "renesas,scif-r8a7790" for R8A7790 (R-Car H2) SCIF compatible UART.
- - "renesas,scifa-r8a7790" for R8A7790 (R-Car H2) SCIFA compatible UART.
---
-2.1.2
-
diff --git a/patches.renesas/0510-clocksource-sh_tmu-Use-request_irq-instead-of-setup_.patch b/patches.renesas/0510-clocksource-sh_tmu-Use-request_irq-instead-of-setup_.patch
deleted file mode 100644
index d9fc42633ec8b..0000000000000
--- a/patches.renesas/0510-clocksource-sh_tmu-Use-request_irq-instead-of-setup_.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 3ced2ffe9af02a62cf7f6c0482177de18fd6beed Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 11:27:49 +0100
-Subject: clocksource: sh_tmu: Use request_irq() instead of setup_irq()
-
-The driver claims it needs to register an interrupt handler too early
-for request_irq(). This might have been true in the past, but the only
-meaningful difference between request_irq() and setup_irq() today is an
-additional kzalloc() call in request_irq(). As the driver calls
-kmalloc() itself we know that the slab allocator is available, we can
-thus switch to request_irq().
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 1c56cf6b048e1e1bbe08faf38b5592b373905ac5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 22 ++++++++--------------
- 1 file changed, 8 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index ecd7b60bfdfa..8613cc90bb74 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -38,7 +38,7 @@
- struct sh_tmu_priv {
- void __iomem *mapbase;
- struct clk *clk;
-- struct irqaction irqaction;
-+ int irq;
- struct platform_device *pdev;
- unsigned long rate;
- unsigned long periodic;
-@@ -401,10 +401,11 @@ static void sh_tmu_register_clockevent(struct sh_tmu_priv *p,
-
- clockevents_config_and_register(ced, 1, 0x300, 0xffffffff);
-
-- ret = setup_irq(p->irqaction.irq, &p->irqaction);
-+ ret = request_irq(p->irq, sh_tmu_interrupt,
-+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-+ dev_name(&p->pdev->dev), p);
- if (ret) {
-- dev_err(&p->pdev->dev, "failed to request irq %d\n",
-- p->irqaction.irq);
-+ dev_err(&p->pdev->dev, "failed to request irq %d\n", p->irq);
- return;
- }
- }
-@@ -425,7 +426,7 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
-- int irq, ret;
-+ int ret;
- ret = -ENXIO;
-
- memset(p, 0, sizeof(*p));
-@@ -444,8 +445,8 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
- goto err0;
- }
-
-- irq = platform_get_irq(p->pdev, 0);
-- if (irq < 0) {
-+ p->irq = platform_get_irq(p->pdev, 0);
-+ if (p->irq < 0) {
- dev_err(&p->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-@@ -457,13 +458,6 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
- goto err0;
- }
-
-- /* setup data for setup_irq() (too early for request_irq()) */
-- p->irqaction.name = dev_name(&p->pdev->dev);
-- p->irqaction.handler = sh_tmu_interrupt;
-- p->irqaction.dev_id = p;
-- p->irqaction.irq = irq;
-- p->irqaction.flags = IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING;
--
- /* get hold of clock */
- p->clk = clk_get(&p->pdev->dev, "tmu_fck");
- if (IS_ERR(p->clk)) {
---
-2.1.2
-
diff --git a/patches.renesas/0511-clocksource-sh_tmu-Split-channel-fields-from-sh_tmu_.patch b/patches.renesas/0511-clocksource-sh_tmu-Split-channel-fields-from-sh_tmu_.patch
deleted file mode 100644
index d90b18a5c2b89..0000000000000
--- a/patches.renesas/0511-clocksource-sh_tmu-Split-channel-fields-from-sh_tmu_.patch
+++ /dev/null
@@ -1,527 +0,0 @@
-From 6adc6f8dacaeb4c83f9960cae6f84ffea42a3950 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 15:29:19 +0100
-Subject: clocksource: sh_tmu: Split channel fields from sh_tmu_priv
-
-Create a new sh_tmu_channel structure to hold the channel-specific
-field in preparation for multiple channels per device support.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit de2d12c7e856f0fa59ea83275410a364d2b182c0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 235 +++++++++++++++++++++++--------------------
- 1 file changed, 125 insertions(+), 110 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 8613cc90bb74..26457e1fccbb 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -35,11 +35,13 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
--struct sh_tmu_priv {
-- void __iomem *mapbase;
-- struct clk *clk;
-+struct sh_tmu_priv;
-+
-+struct sh_tmu_channel {
-+ struct sh_tmu_priv *tmu;
-+
- int irq;
-- struct platform_device *pdev;
-+
- unsigned long rate;
- unsigned long periodic;
- struct clock_event_device ced;
-@@ -48,6 +50,15 @@ struct sh_tmu_priv {
- unsigned int enable_count;
- };
-
-+struct sh_tmu_priv {
-+ struct platform_device *pdev;
-+
-+ void __iomem *mapbase;
-+ struct clk *clk;
-+
-+ struct sh_tmu_channel channel;
-+};
-+
- static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
-
- #define TSTR -1 /* shared register */
-@@ -55,10 +66,10 @@ static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
- #define TCNT 1 /* channel register */
- #define TCR 2 /* channel register */
-
--static inline unsigned long sh_tmu_read(struct sh_tmu_priv *p, int reg_nr)
-+static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-- void __iomem *base = p->mapbase;
-+ struct sh_timer_config *cfg = ch->tmu->pdev->dev.platform_data;
-+ void __iomem *base = ch->tmu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR)
-@@ -72,11 +83,11 @@ static inline unsigned long sh_tmu_read(struct sh_tmu_priv *p, int reg_nr)
- return ioread32(base + offs);
- }
-
--static inline void sh_tmu_write(struct sh_tmu_priv *p, int reg_nr,
-+static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
- unsigned long value)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-- void __iomem *base = p->mapbase;
-+ struct sh_timer_config *cfg = ch->tmu->pdev->dev.platform_data;
-+ void __iomem *base = ch->tmu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR) {
-@@ -92,152 +103,152 @@ static inline void sh_tmu_write(struct sh_tmu_priv *p, int reg_nr,
- iowrite32(value, base + offs);
- }
-
--static void sh_tmu_start_stop_ch(struct sh_tmu_priv *p, int start)
-+static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
- {
-- struct sh_timer_config *cfg = p->pdev->dev.platform_data;
-+ struct sh_timer_config *cfg = ch->tmu->pdev->dev.platform_data;
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
- raw_spin_lock_irqsave(&sh_tmu_lock, flags);
-- value = sh_tmu_read(p, TSTR);
-+ value = sh_tmu_read(ch, TSTR);
-
- if (start)
- value |= 1 << cfg->timer_bit;
- else
- value &= ~(1 << cfg->timer_bit);
-
-- sh_tmu_write(p, TSTR, value);
-+ sh_tmu_write(ch, TSTR, value);
- raw_spin_unlock_irqrestore(&sh_tmu_lock, flags);
- }
-
--static int __sh_tmu_enable(struct sh_tmu_priv *p)
-+static int __sh_tmu_enable(struct sh_tmu_channel *ch)
- {
- int ret;
-
- /* enable clock */
-- ret = clk_enable(p->clk);
-+ ret = clk_enable(ch->tmu->clk);
- if (ret) {
-- dev_err(&p->pdev->dev, "cannot enable clock\n");
-+ dev_err(&ch->tmu->pdev->dev, "cannot enable clock\n");
- return ret;
- }
-
- /* make sure channel is disabled */
-- sh_tmu_start_stop_ch(p, 0);
-+ sh_tmu_start_stop_ch(ch, 0);
-
- /* maximum timeout */
-- sh_tmu_write(p, TCOR, 0xffffffff);
-- sh_tmu_write(p, TCNT, 0xffffffff);
-+ sh_tmu_write(ch, TCOR, 0xffffffff);
-+ sh_tmu_write(ch, TCNT, 0xffffffff);
-
- /* configure channel to parent clock / 4, irq off */
-- p->rate = clk_get_rate(p->clk) / 4;
-- sh_tmu_write(p, TCR, 0x0000);
-+ ch->rate = clk_get_rate(ch->tmu->clk) / 4;
-+ sh_tmu_write(ch, TCR, 0x0000);
-
- /* enable channel */
-- sh_tmu_start_stop_ch(p, 1);
-+ sh_tmu_start_stop_ch(ch, 1);
-
- return 0;
- }
-
--static int sh_tmu_enable(struct sh_tmu_priv *p)
-+static int sh_tmu_enable(struct sh_tmu_channel *ch)
- {
-- if (p->enable_count++ > 0)
-+ if (ch->enable_count++ > 0)
- return 0;
-
-- pm_runtime_get_sync(&p->pdev->dev);
-- dev_pm_syscore_device(&p->pdev->dev, true);
-+ pm_runtime_get_sync(&ch->tmu->pdev->dev);
-+ dev_pm_syscore_device(&ch->tmu->pdev->dev, true);
-
-- return __sh_tmu_enable(p);
-+ return __sh_tmu_enable(ch);
- }
-
--static void __sh_tmu_disable(struct sh_tmu_priv *p)
-+static void __sh_tmu_disable(struct sh_tmu_channel *ch)
- {
- /* disable channel */
-- sh_tmu_start_stop_ch(p, 0);
-+ sh_tmu_start_stop_ch(ch, 0);
-
- /* disable interrupts in TMU block */
-- sh_tmu_write(p, TCR, 0x0000);
-+ sh_tmu_write(ch, TCR, 0x0000);
-
- /* stop clock */
-- clk_disable(p->clk);
-+ clk_disable(ch->tmu->clk);
- }
-
--static void sh_tmu_disable(struct sh_tmu_priv *p)
-+static void sh_tmu_disable(struct sh_tmu_channel *ch)
- {
-- if (WARN_ON(p->enable_count == 0))
-+ if (WARN_ON(ch->enable_count == 0))
- return;
-
-- if (--p->enable_count > 0)
-+ if (--ch->enable_count > 0)
- return;
-
-- __sh_tmu_disable(p);
-+ __sh_tmu_disable(ch);
-
-- dev_pm_syscore_device(&p->pdev->dev, false);
-- pm_runtime_put(&p->pdev->dev);
-+ dev_pm_syscore_device(&ch->tmu->pdev->dev, false);
-+ pm_runtime_put(&ch->tmu->pdev->dev);
- }
-
--static void sh_tmu_set_next(struct sh_tmu_priv *p, unsigned long delta,
-+static void sh_tmu_set_next(struct sh_tmu_channel *ch, unsigned long delta,
- int periodic)
- {
- /* stop timer */
-- sh_tmu_start_stop_ch(p, 0);
-+ sh_tmu_start_stop_ch(ch, 0);
-
- /* acknowledge interrupt */
-- sh_tmu_read(p, TCR);
-+ sh_tmu_read(ch, TCR);
-
- /* enable interrupt */
-- sh_tmu_write(p, TCR, 0x0020);
-+ sh_tmu_write(ch, TCR, 0x0020);
-
- /* reload delta value in case of periodic timer */
- if (periodic)
-- sh_tmu_write(p, TCOR, delta);
-+ sh_tmu_write(ch, TCOR, delta);
- else
-- sh_tmu_write(p, TCOR, 0xffffffff);
-+ sh_tmu_write(ch, TCOR, 0xffffffff);
-
-- sh_tmu_write(p, TCNT, delta);
-+ sh_tmu_write(ch, TCNT, delta);
-
- /* start timer */
-- sh_tmu_start_stop_ch(p, 1);
-+ sh_tmu_start_stop_ch(ch, 1);
- }
-
- static irqreturn_t sh_tmu_interrupt(int irq, void *dev_id)
- {
-- struct sh_tmu_priv *p = dev_id;
-+ struct sh_tmu_channel *ch = dev_id;
-
- /* disable or acknowledge interrupt */
-- if (p->ced.mode == CLOCK_EVT_MODE_ONESHOT)
-- sh_tmu_write(p, TCR, 0x0000);
-+ if (ch->ced.mode == CLOCK_EVT_MODE_ONESHOT)
-+ sh_tmu_write(ch, TCR, 0x0000);
- else
-- sh_tmu_write(p, TCR, 0x0020);
-+ sh_tmu_write(ch, TCR, 0x0020);
-
- /* notify clockevent layer */
-- p->ced.event_handler(&p->ced);
-+ ch->ced.event_handler(&ch->ced);
- return IRQ_HANDLED;
- }
-
--static struct sh_tmu_priv *cs_to_sh_tmu(struct clocksource *cs)
-+static struct sh_tmu_channel *cs_to_sh_tmu(struct clocksource *cs)
- {
-- return container_of(cs, struct sh_tmu_priv, cs);
-+ return container_of(cs, struct sh_tmu_channel, cs);
- }
-
- static cycle_t sh_tmu_clocksource_read(struct clocksource *cs)
- {
-- struct sh_tmu_priv *p = cs_to_sh_tmu(cs);
-+ struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
-
-- return sh_tmu_read(p, TCNT) ^ 0xffffffff;
-+ return sh_tmu_read(ch, TCNT) ^ 0xffffffff;
- }
-
- static int sh_tmu_clocksource_enable(struct clocksource *cs)
- {
-- struct sh_tmu_priv *p = cs_to_sh_tmu(cs);
-+ struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
- int ret;
-
-- if (WARN_ON(p->cs_enabled))
-+ if (WARN_ON(ch->cs_enabled))
- return 0;
-
-- ret = sh_tmu_enable(p);
-+ ret = sh_tmu_enable(ch);
- if (!ret) {
-- __clocksource_updatefreq_hz(cs, p->rate);
-- p->cs_enabled = true;
-+ __clocksource_updatefreq_hz(cs, ch->rate);
-+ ch->cs_enabled = true;
- }
-
- return ret;
-@@ -245,45 +256,45 @@ static int sh_tmu_clocksource_enable(struct clocksource *cs)
-
- static void sh_tmu_clocksource_disable(struct clocksource *cs)
- {
-- struct sh_tmu_priv *p = cs_to_sh_tmu(cs);
-+ struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
-
-- if (WARN_ON(!p->cs_enabled))
-+ if (WARN_ON(!ch->cs_enabled))
- return;
-
-- sh_tmu_disable(p);
-- p->cs_enabled = false;
-+ sh_tmu_disable(ch);
-+ ch->cs_enabled = false;
- }
-
- static void sh_tmu_clocksource_suspend(struct clocksource *cs)
- {
-- struct sh_tmu_priv *p = cs_to_sh_tmu(cs);
-+ struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
-
-- if (!p->cs_enabled)
-+ if (!ch->cs_enabled)
- return;
-
-- if (--p->enable_count == 0) {
-- __sh_tmu_disable(p);
-- pm_genpd_syscore_poweroff(&p->pdev->dev);
-+ if (--ch->enable_count == 0) {
-+ __sh_tmu_disable(ch);
-+ pm_genpd_syscore_poweroff(&ch->tmu->pdev->dev);
- }
- }
-
- static void sh_tmu_clocksource_resume(struct clocksource *cs)
- {
-- struct sh_tmu_priv *p = cs_to_sh_tmu(cs);
-+ struct sh_tmu_channel *ch = cs_to_sh_tmu(cs);
-
-- if (!p->cs_enabled)
-+ if (!ch->cs_enabled)
- return;
-
-- if (p->enable_count++ == 0) {
-- pm_genpd_syscore_poweron(&p->pdev->dev);
-- __sh_tmu_enable(p);
-+ if (ch->enable_count++ == 0) {
-+ pm_genpd_syscore_poweron(&ch->tmu->pdev->dev);
-+ __sh_tmu_enable(ch);
- }
- }
-
--static int sh_tmu_register_clocksource(struct sh_tmu_priv *p,
-+static int sh_tmu_register_clocksource(struct sh_tmu_channel *ch,
- char *name, unsigned long rating)
- {
-- struct clocksource *cs = &p->cs;
-+ struct clocksource *cs = &ch->cs;
-
- cs->name = name;
- cs->rating = rating;
-@@ -295,43 +306,43 @@ static int sh_tmu_register_clocksource(struct sh_tmu_priv *p,
- cs->mask = CLOCKSOURCE_MASK(32);
- cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
-
-- dev_info(&p->pdev->dev, "used as clock source\n");
-+ dev_info(&ch->tmu->pdev->dev, "used as clock source\n");
-
- /* Register with dummy 1 Hz value, gets updated in ->enable() */
- clocksource_register_hz(cs, 1);
- return 0;
- }
-
--static struct sh_tmu_priv *ced_to_sh_tmu(struct clock_event_device *ced)
-+static struct sh_tmu_channel *ced_to_sh_tmu(struct clock_event_device *ced)
- {
-- return container_of(ced, struct sh_tmu_priv, ced);
-+ return container_of(ced, struct sh_tmu_channel, ced);
- }
-
--static void sh_tmu_clock_event_start(struct sh_tmu_priv *p, int periodic)
-+static void sh_tmu_clock_event_start(struct sh_tmu_channel *ch, int periodic)
- {
-- struct clock_event_device *ced = &p->ced;
-+ struct clock_event_device *ced = &ch->ced;
-
-- sh_tmu_enable(p);
-+ sh_tmu_enable(ch);
-
-- clockevents_config(ced, p->rate);
-+ clockevents_config(ced, ch->rate);
-
- if (periodic) {
-- p->periodic = (p->rate + HZ/2) / HZ;
-- sh_tmu_set_next(p, p->periodic, 1);
-+ ch->periodic = (ch->rate + HZ/2) / HZ;
-+ sh_tmu_set_next(ch, ch->periodic, 1);
- }
- }
-
- static void sh_tmu_clock_event_mode(enum clock_event_mode mode,
- struct clock_event_device *ced)
- {
-- struct sh_tmu_priv *p = ced_to_sh_tmu(ced);
-+ struct sh_tmu_channel *ch = ced_to_sh_tmu(ced);
- int disabled = 0;
-
- /* deal with old setting first */
- switch (ced->mode) {
- case CLOCK_EVT_MODE_PERIODIC:
- case CLOCK_EVT_MODE_ONESHOT:
-- sh_tmu_disable(p);
-+ sh_tmu_disable(ch);
- disabled = 1;
- break;
- default:
-@@ -340,16 +351,18 @@ static void sh_tmu_clock_event_mode(enum clock_event_mode mode,
-
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
-- dev_info(&p->pdev->dev, "used for periodic clock events\n");
-- sh_tmu_clock_event_start(p, 1);
-+ dev_info(&ch->tmu->pdev->dev,
-+ "used for periodic clock events\n");
-+ sh_tmu_clock_event_start(ch, 1);
- break;
- case CLOCK_EVT_MODE_ONESHOT:
-- dev_info(&p->pdev->dev, "used for oneshot clock events\n");
-- sh_tmu_clock_event_start(p, 0);
-+ dev_info(&ch->tmu->pdev->dev,
-+ "used for oneshot clock events\n");
-+ sh_tmu_clock_event_start(ch, 0);
- break;
- case CLOCK_EVT_MODE_UNUSED:
- if (!disabled)
-- sh_tmu_disable(p);
-+ sh_tmu_disable(ch);
- break;
- case CLOCK_EVT_MODE_SHUTDOWN:
- default:
-@@ -360,29 +373,29 @@ static void sh_tmu_clock_event_mode(enum clock_event_mode mode,
- static int sh_tmu_clock_event_next(unsigned long delta,
- struct clock_event_device *ced)
- {
-- struct sh_tmu_priv *p = ced_to_sh_tmu(ced);
-+ struct sh_tmu_channel *ch = ced_to_sh_tmu(ced);
-
- BUG_ON(ced->mode != CLOCK_EVT_MODE_ONESHOT);
-
- /* program new delta value */
-- sh_tmu_set_next(p, delta, 0);
-+ sh_tmu_set_next(ch, delta, 0);
- return 0;
- }
-
- static void sh_tmu_clock_event_suspend(struct clock_event_device *ced)
- {
-- pm_genpd_syscore_poweroff(&ced_to_sh_tmu(ced)->pdev->dev);
-+ pm_genpd_syscore_poweroff(&ced_to_sh_tmu(ced)->tmu->pdev->dev);
- }
-
- static void sh_tmu_clock_event_resume(struct clock_event_device *ced)
- {
-- pm_genpd_syscore_poweron(&ced_to_sh_tmu(ced)->pdev->dev);
-+ pm_genpd_syscore_poweron(&ced_to_sh_tmu(ced)->tmu->pdev->dev);
- }
-
--static void sh_tmu_register_clockevent(struct sh_tmu_priv *p,
-+static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- char *name, unsigned long rating)
- {
-- struct clock_event_device *ced = &p->ced;
-+ struct clock_event_device *ced = &ch->ced;
- int ret;
-
- memset(ced, 0, sizeof(*ced));
-@@ -397,27 +410,28 @@ static void sh_tmu_register_clockevent(struct sh_tmu_priv *p,
- ced->suspend = sh_tmu_clock_event_suspend;
- ced->resume = sh_tmu_clock_event_resume;
-
-- dev_info(&p->pdev->dev, "used for clock events\n");
-+ dev_info(&ch->tmu->pdev->dev, "used for clock events\n");
-
- clockevents_config_and_register(ced, 1, 0x300, 0xffffffff);
-
-- ret = request_irq(p->irq, sh_tmu_interrupt,
-+ ret = request_irq(ch->irq, sh_tmu_interrupt,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&p->pdev->dev), p);
-+ dev_name(&ch->tmu->pdev->dev), ch);
- if (ret) {
-- dev_err(&p->pdev->dev, "failed to request irq %d\n", p->irq);
-+ dev_err(&ch->tmu->pdev->dev, "failed to request irq %d\n",
-+ ch->irq);
- return;
- }
- }
-
--static int sh_tmu_register(struct sh_tmu_priv *p, char *name,
-+static int sh_tmu_register(struct sh_tmu_channel *ch, char *name,
- unsigned long clockevent_rating,
- unsigned long clocksource_rating)
- {
- if (clockevent_rating)
-- sh_tmu_register_clockevent(p, name, clockevent_rating);
-+ sh_tmu_register_clockevent(ch, name, clockevent_rating);
- else if (clocksource_rating)
-- sh_tmu_register_clocksource(p, name, clocksource_rating);
-+ sh_tmu_register_clocksource(ch, name, clocksource_rating);
-
- return 0;
- }
-@@ -445,8 +459,8 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
- goto err0;
- }
-
-- p->irq = platform_get_irq(p->pdev, 0);
-- if (p->irq < 0) {
-+ p->channel.irq = platform_get_irq(p->pdev, 0);
-+ if (p->channel.irq < 0) {
- dev_err(&p->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-@@ -470,10 +484,11 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
- if (ret < 0)
- goto err2;
-
-- p->cs_enabled = false;
-- p->enable_count = 0;
-+ p->channel.cs_enabled = false;
-+ p->channel.enable_count = 0;
-+ p->channel.tmu = p;
-
-- ret = sh_tmu_register(p, (char *)dev_name(&p->pdev->dev),
-+ ret = sh_tmu_register(&p->channel, (char *)dev_name(&p->pdev->dev),
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- if (ret < 0)
---
-2.1.2
-
diff --git a/patches.renesas/0512-clocksource-sh_tmu-Rename-struct-sh_tmu_priv-to-sh_t.patch b/patches.renesas/0512-clocksource-sh_tmu-Rename-struct-sh_tmu_priv-to-sh_t.patch
deleted file mode 100644
index 60917c5d5a912..0000000000000
--- a/patches.renesas/0512-clocksource-sh_tmu-Rename-struct-sh_tmu_priv-to-sh_t.patch
+++ /dev/null
@@ -1,175 +0,0 @@
-From 81d82668b10ef70575203f3ff454060601b9ca2e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_tmu: Rename struct sh_tmu_priv to sh_tmu_device
-
-Channel data is private as well, rename priv to device to make the
-distrinction between the core device and the channels clearer.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 0a72aa39cc105fbf6971feb8928a63530a4a446b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 68 ++++++++++++++++++++++----------------------
- 1 file changed, 34 insertions(+), 34 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 26457e1fccbb..70137906b8c0 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -35,10 +35,10 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
--struct sh_tmu_priv;
-+struct sh_tmu_device;
-
- struct sh_tmu_channel {
-- struct sh_tmu_priv *tmu;
-+ struct sh_tmu_device *tmu;
-
- int irq;
-
-@@ -50,7 +50,7 @@ struct sh_tmu_channel {
- unsigned int enable_count;
- };
-
--struct sh_tmu_priv {
-+struct sh_tmu_device {
- struct platform_device *pdev;
-
- void __iomem *mapbase;
-@@ -436,59 +436,59 @@ static int sh_tmu_register(struct sh_tmu_channel *ch, char *name,
- return 0;
- }
-
--static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
-+static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
- int ret;
- ret = -ENXIO;
-
-- memset(p, 0, sizeof(*p));
-- p->pdev = pdev;
-+ memset(tmu, 0, sizeof(*tmu));
-+ tmu->pdev = pdev;
-
- if (!cfg) {
-- dev_err(&p->pdev->dev, "missing platform data\n");
-+ dev_err(&tmu->pdev->dev, "missing platform data\n");
- goto err0;
- }
-
-- platform_set_drvdata(pdev, p);
-+ platform_set_drvdata(pdev, tmu);
-
-- res = platform_get_resource(p->pdev, IORESOURCE_MEM, 0);
-+ res = platform_get_resource(tmu->pdev, IORESOURCE_MEM, 0);
- if (!res) {
-- dev_err(&p->pdev->dev, "failed to get I/O memory\n");
-+ dev_err(&tmu->pdev->dev, "failed to get I/O memory\n");
- goto err0;
- }
-
-- p->channel.irq = platform_get_irq(p->pdev, 0);
-- if (p->channel.irq < 0) {
-- dev_err(&p->pdev->dev, "failed to get irq\n");
-+ tmu->channel.irq = platform_get_irq(tmu->pdev, 0);
-+ if (tmu->channel.irq < 0) {
-+ dev_err(&tmu->pdev->dev, "failed to get irq\n");
- goto err0;
- }
-
- /* map memory, let mapbase point to our channel */
-- p->mapbase = ioremap_nocache(res->start, resource_size(res));
-- if (p->mapbase == NULL) {
-- dev_err(&p->pdev->dev, "failed to remap I/O memory\n");
-+ tmu->mapbase = ioremap_nocache(res->start, resource_size(res));
-+ if (tmu->mapbase == NULL) {
-+ dev_err(&tmu->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
- /* get hold of clock */
-- p->clk = clk_get(&p->pdev->dev, "tmu_fck");
-- if (IS_ERR(p->clk)) {
-- dev_err(&p->pdev->dev, "cannot get clock\n");
-- ret = PTR_ERR(p->clk);
-+ tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck");
-+ if (IS_ERR(tmu->clk)) {
-+ dev_err(&tmu->pdev->dev, "cannot get clock\n");
-+ ret = PTR_ERR(tmu->clk);
- goto err1;
- }
-
-- ret = clk_prepare(p->clk);
-+ ret = clk_prepare(tmu->clk);
- if (ret < 0)
- goto err2;
-
-- p->channel.cs_enabled = false;
-- p->channel.enable_count = 0;
-- p->channel.tmu = p;
-+ tmu->channel.cs_enabled = false;
-+ tmu->channel.enable_count = 0;
-+ tmu->channel.tmu = tmu;
-
-- ret = sh_tmu_register(&p->channel, (char *)dev_name(&p->pdev->dev),
-+ ret = sh_tmu_register(&tmu->channel, (char *)dev_name(&tmu->pdev->dev),
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- if (ret < 0)
-@@ -497,18 +497,18 @@ static int sh_tmu_setup(struct sh_tmu_priv *p, struct platform_device *pdev)
- return 0;
-
- err3:
-- clk_unprepare(p->clk);
-+ clk_unprepare(tmu->clk);
- err2:
-- clk_put(p->clk);
-+ clk_put(tmu->clk);
- err1:
-- iounmap(p->mapbase);
-+ iounmap(tmu->mapbase);
- err0:
- return ret;
- }
-
- static int sh_tmu_probe(struct platform_device *pdev)
- {
-- struct sh_tmu_priv *p = platform_get_drvdata(pdev);
-+ struct sh_tmu_device *tmu = platform_get_drvdata(pdev);
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- int ret;
-
-@@ -517,20 +517,20 @@ static int sh_tmu_probe(struct platform_device *pdev)
- pm_runtime_enable(&pdev->dev);
- }
-
-- if (p) {
-+ if (tmu) {
- dev_info(&pdev->dev, "kept as earlytimer\n");
- goto out;
- }
-
-- p = kmalloc(sizeof(*p), GFP_KERNEL);
-- if (p == NULL) {
-+ tmu = kmalloc(sizeof(*tmu), GFP_KERNEL);
-+ if (tmu == NULL) {
- dev_err(&pdev->dev, "failed to allocate driver data\n");
- return -ENOMEM;
- }
-
-- ret = sh_tmu_setup(p, pdev);
-+ ret = sh_tmu_setup(tmu, pdev);
- if (ret) {
-- kfree(p);
-+ kfree(tmu);
- pm_runtime_idle(&pdev->dev);
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0513-clocksource-sh_tmu-Split-channel-setup-to-separate-f.patch b/patches.renesas/0513-clocksource-sh_tmu-Split-channel-setup-to-separate-f.patch
deleted file mode 100644
index 67d2a3e8399bf..0000000000000
--- a/patches.renesas/0513-clocksource-sh_tmu-Split-channel-setup-to-separate-f.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 806731c1d3f6e43b1f372c698b14876ae4a34b72 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_tmu: Split channel setup to separate function
-
-Move the channel setup code from sh_tmu_setup to a new
-sh_tmu_setup_channel function and call it from sh_tmu_setup.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit a94ddaa6fcd46e168736027535b2d81b6a18883f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 36 +++++++++++++++++++++++-------------
- 1 file changed, 23 insertions(+), 13 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 70137906b8c0..4779c97bb2ee 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -436,6 +436,28 @@ static int sh_tmu_register(struct sh_tmu_channel *ch, char *name,
- return 0;
- }
-
-+static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
-+ struct sh_tmu_device *tmu)
-+{
-+ struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-+
-+ memset(ch, 0, sizeof(*ch));
-+ ch->tmu = tmu;
-+
-+ ch->irq = platform_get_irq(tmu->pdev, 0);
-+ if (ch->irq < 0) {
-+ dev_err(&tmu->pdev->dev, "failed to get irq\n");
-+ return ch->irq;
-+ }
-+
-+ ch->cs_enabled = false;
-+ ch->enable_count = 0;
-+
-+ return sh_tmu_register(ch, (char *)dev_name(&tmu->pdev->dev),
-+ cfg->clockevent_rating,
-+ cfg->clocksource_rating);
-+}
-+
- static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
-@@ -459,12 +481,6 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- goto err0;
- }
-
-- tmu->channel.irq = platform_get_irq(tmu->pdev, 0);
-- if (tmu->channel.irq < 0) {
-- dev_err(&tmu->pdev->dev, "failed to get irq\n");
-- goto err0;
-- }
--
- /* map memory, let mapbase point to our channel */
- tmu->mapbase = ioremap_nocache(res->start, resource_size(res));
- if (tmu->mapbase == NULL) {
-@@ -484,13 +500,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- if (ret < 0)
- goto err2;
-
-- tmu->channel.cs_enabled = false;
-- tmu->channel.enable_count = 0;
-- tmu->channel.tmu = tmu;
--
-- ret = sh_tmu_register(&tmu->channel, (char *)dev_name(&tmu->pdev->dev),
-- cfg->clockevent_rating,
-- cfg->clocksource_rating);
-+ ret = sh_tmu_channel_setup(&tmu->channel, tmu);
- if (ret < 0)
- goto err3;
-
---
-2.1.2
-
diff --git a/patches.renesas/0514-clocksource-sh_tmu-Constify-name-argument-to-sh_tmu_.patch b/patches.renesas/0514-clocksource-sh_tmu-Constify-name-argument-to-sh_tmu_.patch
deleted file mode 100644
index 2345b2af51009..0000000000000
--- a/patches.renesas/0514-clocksource-sh_tmu-Constify-name-argument-to-sh_tmu_.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 04f00643bc7ef59810858408a1c642a179271aaa Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 16:04:16 +0100
-Subject: clocksource: sh_tmu: Constify name argument to sh_tmu_register()
-
-The name argument is assigned to const structure fields only, constify
-it.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 84876d0505b15a2907696566a80a365993feab44)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 4779c97bb2ee..2c64e3f93f16 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -292,7 +292,7 @@ static void sh_tmu_clocksource_resume(struct clocksource *cs)
- }
-
- static int sh_tmu_register_clocksource(struct sh_tmu_channel *ch,
-- char *name, unsigned long rating)
-+ const char *name, unsigned long rating)
- {
- struct clocksource *cs = &ch->cs;
-
-@@ -393,7 +393,7 @@ static void sh_tmu_clock_event_resume(struct clock_event_device *ced)
- }
-
- static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
-- char *name, unsigned long rating)
-+ const char *name, unsigned long rating)
- {
- struct clock_event_device *ced = &ch->ced;
- int ret;
-@@ -424,7 +424,7 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- }
- }
-
--static int sh_tmu_register(struct sh_tmu_channel *ch, char *name,
-+static int sh_tmu_register(struct sh_tmu_channel *ch, const char *name,
- unsigned long clockevent_rating,
- unsigned long clocksource_rating)
- {
-@@ -453,7 +453,7 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
- ch->cs_enabled = false;
- ch->enable_count = 0;
-
-- return sh_tmu_register(ch, (char *)dev_name(&tmu->pdev->dev),
-+ return sh_tmu_register(ch, dev_name(&tmu->pdev->dev),
- cfg->clockevent_rating,
- cfg->clocksource_rating);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0515-clocksource-sh_tmu-Add-memory-base-to-sh_tmu_channel.patch b/patches.renesas/0515-clocksource-sh_tmu-Add-memory-base-to-sh_tmu_channel.patch
deleted file mode 100644
index 7827fb6314fd4..0000000000000
--- a/patches.renesas/0515-clocksource-sh_tmu-Add-memory-base-to-sh_tmu_channel.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-From e79892fd4a29e61e6db50a4fa6621f0755024712 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_tmu: Add memory base to sh_tmu_channel structure
-
-The channel memory base is channel-specific, add it to the channel
-structure in preparation for support of multiple channels per device.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit de693461bf9624ec12808f8c5524510364cc2a43)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 30 ++++++++++++++++--------------
- 1 file changed, 16 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 2c64e3f93f16..a464ed868a68 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -40,6 +40,7 @@ struct sh_tmu_device;
- struct sh_tmu_channel {
- struct sh_tmu_device *tmu;
-
-+ void __iomem *base;
- int irq;
-
- unsigned long rate;
-@@ -68,39 +69,35 @@ static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
-
- static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
- {
-- struct sh_timer_config *cfg = ch->tmu->pdev->dev.platform_data;
-- void __iomem *base = ch->tmu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR)
-- return ioread8(base - cfg->channel_offset);
-+ return ioread8(ch->tmu->mapbase);
-
- offs = reg_nr << 2;
-
- if (reg_nr == TCR)
-- return ioread16(base + offs);
-+ return ioread16(ch->base + offs);
- else
-- return ioread32(base + offs);
-+ return ioread32(ch->base + offs);
- }
-
- static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
- unsigned long value)
- {
-- struct sh_timer_config *cfg = ch->tmu->pdev->dev.platform_data;
-- void __iomem *base = ch->tmu->mapbase;
- unsigned long offs;
-
- if (reg_nr == TSTR) {
-- iowrite8(value, base - cfg->channel_offset);
-+ iowrite8(value, ch->tmu->mapbase);
- return;
- }
-
- offs = reg_nr << 2;
-
- if (reg_nr == TCR)
-- iowrite16(value, base + offs);
-+ iowrite16(value, ch->base + offs);
- else
-- iowrite32(value, base + offs);
-+ iowrite32(value, ch->base + offs);
- }
-
- static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
-@@ -481,13 +478,18 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- goto err0;
- }
-
-- /* map memory, let mapbase point to our channel */
-- tmu->mapbase = ioremap_nocache(res->start, resource_size(res));
-- if (tmu->mapbase == NULL) {
-+ /*
-+ * Map memory, let channel.base point to our channel and mapbase to the
-+ * start/stop shared register.
-+ */
-+ tmu->channel.base = ioremap_nocache(res->start, resource_size(res));
-+ if (tmu->channel.base == NULL) {
- dev_err(&tmu->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
-+ tmu->mapbase = tmu->channel.base - cfg->channel_offset;
-+
- /* get hold of clock */
- tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck");
- if (IS_ERR(tmu->clk)) {
-@@ -511,7 +513,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- err2:
- clk_put(tmu->clk);
- err1:
-- iounmap(tmu->mapbase);
-+ iounmap(tmu->channel.base);
- err0:
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0516-clocksource-sh_tmu-Add-index-to-struct-sh_tmu_channe.patch b/patches.renesas/0516-clocksource-sh_tmu-Add-index-to-struct-sh_tmu_channe.patch
deleted file mode 100644
index 0bc5291003d9f..0000000000000
--- a/patches.renesas/0516-clocksource-sh_tmu-Add-index-to-struct-sh_tmu_channe.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 9594c1f33bead5240bf498ad53cfc7a16fa75181 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_tmu: Add index to struct sh_tmu_channel
-
-Use the index as the timer start/stop bit and when printing messages to
-identify the channel.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit fe68eb802ef8bf034735f37cb561ab814fb3b0d6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 35 ++++++++++++++++++++++++-----------
- 1 file changed, 24 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index a464ed868a68..e30430439bb1 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -39,6 +39,7 @@ struct sh_tmu_device;
-
- struct sh_tmu_channel {
- struct sh_tmu_device *tmu;
-+ unsigned int index;
-
- void __iomem *base;
- int irq;
-@@ -102,7 +103,6 @@ static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
-
- static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
- {
-- struct sh_timer_config *cfg = ch->tmu->pdev->dev.platform_data;
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
-@@ -110,9 +110,9 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
- value = sh_tmu_read(ch, TSTR);
-
- if (start)
-- value |= 1 << cfg->timer_bit;
-+ value |= 1 << ch->index;
- else
-- value &= ~(1 << cfg->timer_bit);
-+ value &= ~(1 << ch->index);
-
- sh_tmu_write(ch, TSTR, value);
- raw_spin_unlock_irqrestore(&sh_tmu_lock, flags);
-@@ -125,7 +125,8 @@ static int __sh_tmu_enable(struct sh_tmu_channel *ch)
- /* enable clock */
- ret = clk_enable(ch->tmu->clk);
- if (ret) {
-- dev_err(&ch->tmu->pdev->dev, "cannot enable clock\n");
-+ dev_err(&ch->tmu->pdev->dev, "ch%u: cannot enable clock\n",
-+ ch->index);
- return ret;
- }
-
-@@ -303,7 +304,8 @@ static int sh_tmu_register_clocksource(struct sh_tmu_channel *ch,
- cs->mask = CLOCKSOURCE_MASK(32);
- cs->flags = CLOCK_SOURCE_IS_CONTINUOUS;
-
-- dev_info(&ch->tmu->pdev->dev, "used as clock source\n");
-+ dev_info(&ch->tmu->pdev->dev, "ch%u: used as clock source\n",
-+ ch->index);
-
- /* Register with dummy 1 Hz value, gets updated in ->enable() */
- clocksource_register_hz(cs, 1);
-@@ -349,12 +351,12 @@ static void sh_tmu_clock_event_mode(enum clock_event_mode mode,
- switch (mode) {
- case CLOCK_EVT_MODE_PERIODIC:
- dev_info(&ch->tmu->pdev->dev,
-- "used for periodic clock events\n");
-+ "ch%u: used for periodic clock events\n", ch->index);
- sh_tmu_clock_event_start(ch, 1);
- break;
- case CLOCK_EVT_MODE_ONESHOT:
- dev_info(&ch->tmu->pdev->dev,
-- "used for oneshot clock events\n");
-+ "ch%u: used for oneshot clock events\n", ch->index);
- sh_tmu_clock_event_start(ch, 0);
- break;
- case CLOCK_EVT_MODE_UNUSED:
-@@ -407,7 +409,8 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- ced->suspend = sh_tmu_clock_event_suspend;
- ced->resume = sh_tmu_clock_event_resume;
-
-- dev_info(&ch->tmu->pdev->dev, "used for clock events\n");
-+ dev_info(&ch->tmu->pdev->dev, "ch%u: used for clock events\n",
-+ ch->index);
-
- clockevents_config_and_register(ced, 1, 0x300, 0xffffffff);
-
-@@ -415,8 +418,8 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
- dev_name(&ch->tmu->pdev->dev), ch);
- if (ret) {
-- dev_err(&ch->tmu->pdev->dev, "failed to request irq %d\n",
-- ch->irq);
-+ dev_err(&ch->tmu->pdev->dev, "ch%u: failed to request irq %d\n",
-+ ch->index, ch->irq);
- return;
- }
- }
-@@ -441,9 +444,19 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
- memset(ch, 0, sizeof(*ch));
- ch->tmu = tmu;
-
-+ /*
-+ * The SH3 variant (SH770x, SH7705, SH7710 and SH7720) maps channel
-+ * registers blocks at base + 2 + 12 * index, while all other variants
-+ * map them at base + 4 + 12 * index. We can compute the index by just
-+ * dividing by 12, the 2 bytes or 4 bytes offset being hidden by the
-+ * integer division.
-+ */
-+ ch->index = cfg->channel_offset / 12;
-+
- ch->irq = platform_get_irq(tmu->pdev, 0);
- if (ch->irq < 0) {
-- dev_err(&tmu->pdev->dev, "failed to get irq\n");
-+ dev_err(&tmu->pdev->dev, "ch%u: failed to get irq\n",
-+ ch->index);
- return ch->irq;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0517-clocksource-sh_tmu-Replace-kmalloc-memset-with-kzall.patch b/patches.renesas/0517-clocksource-sh_tmu-Replace-kmalloc-memset-with-kzall.patch
deleted file mode 100644
index 88980715c8847..0000000000000
--- a/patches.renesas/0517-clocksource-sh_tmu-Replace-kmalloc-memset-with-kzall.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 3898ef34de4f2a6a180b67994bbc4e0ed806e4ec Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_tmu: Replace kmalloc + memset with kzalloc
-
-One kzalloc a day keeps the bugs away.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 3b77a83eeabb885c5fff02756eba50f446a2d83c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index e30430439bb1..26a9f7dadfbc 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -397,8 +397,6 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- struct clock_event_device *ced = &ch->ced;
- int ret;
-
-- memset(ced, 0, sizeof(*ced));
--
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->features |= CLOCK_EVT_FEAT_ONESHOT;
-@@ -441,7 +439,6 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
- {
- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-
-- memset(ch, 0, sizeof(*ch));
- ch->tmu = tmu;
-
- /*
-@@ -475,7 +472,6 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- int ret;
- ret = -ENXIO;
-
-- memset(tmu, 0, sizeof(*tmu));
- tmu->pdev = pdev;
-
- if (!cfg) {
-@@ -547,7 +543,7 @@ static int sh_tmu_probe(struct platform_device *pdev)
- goto out;
- }
-
-- tmu = kmalloc(sizeof(*tmu), GFP_KERNEL);
-+ tmu = kzalloc(sizeof(*tmu), GFP_KERNEL);
- if (tmu == NULL) {
- dev_err(&pdev->dev, "failed to allocate driver data\n");
- return -ENOMEM;
---
-2.1.2
-
diff --git a/patches.renesas/0518-clocksource-sh_tmu-Allocate-channels-dynamically.patch b/patches.renesas/0518-clocksource-sh_tmu-Allocate-channels-dynamically.patch
deleted file mode 100644
index de63ca99b606f..0000000000000
--- a/patches.renesas/0518-clocksource-sh_tmu-Allocate-channels-dynamically.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 2b3586eafc8fcf4a2122791d37cb73a2b160142a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 27 Jan 2014 22:04:17 +0100
-Subject: clocksource: sh_tmu: Allocate channels dynamically
-
-This prepares the driver for multi-channel support.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit a5de49f436e2bc498c1d13f6f8a9afaf19cb5f95)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 27 ++++++++++++++++++++-------
- 1 file changed, 20 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 26a9f7dadfbc..55b7a37f0c9b 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -58,7 +58,8 @@ struct sh_tmu_device {
- void __iomem *mapbase;
- struct clk *clk;
-
-- struct sh_tmu_channel channel;
-+ struct sh_tmu_channel *channels;
-+ unsigned int num_channels;
- };
-
- static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
-@@ -469,6 +470,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
-+ void __iomem *base;
- int ret;
- ret = -ENXIO;
-
-@@ -488,16 +490,16 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- }
-
- /*
-- * Map memory, let channel.base point to our channel and mapbase to the
-+ * Map memory, let base point to our channel and mapbase to the
- * start/stop shared register.
- */
-- tmu->channel.base = ioremap_nocache(res->start, resource_size(res));
-- if (tmu->channel.base == NULL) {
-+ base = ioremap_nocache(res->start, resource_size(res));
-+ if (base == NULL) {
- dev_err(&tmu->pdev->dev, "failed to remap I/O memory\n");
- goto err0;
- }
-
-- tmu->mapbase = tmu->channel.base - cfg->channel_offset;
-+ tmu->mapbase = base - cfg->channel_offset;
-
- /* get hold of clock */
- tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck");
-@@ -511,18 +513,29 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- if (ret < 0)
- goto err2;
-
-- ret = sh_tmu_channel_setup(&tmu->channel, tmu);
-+ tmu->channels = kzalloc(sizeof(*tmu->channels), GFP_KERNEL);
-+ if (tmu->channels == NULL) {
-+ ret = -ENOMEM;
-+ goto err3;
-+ }
-+
-+ tmu->num_channels = 1;
-+
-+ tmu->channels[0].base = base;
-+
-+ ret = sh_tmu_channel_setup(&tmu->channels[0], tmu);
- if (ret < 0)
- goto err3;
-
- return 0;
-
- err3:
-+ kfree(tmu->channels);
- clk_unprepare(tmu->clk);
- err2:
- clk_put(tmu->clk);
- err1:
-- iounmap(tmu->channel.base);
-+ iounmap(base);
- err0:
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0519-clocksource-sh_tmu-Replace-hardcoded-register-values.patch b/patches.renesas/0519-clocksource-sh_tmu-Replace-hardcoded-register-values.patch
deleted file mode 100644
index 6408ec2c3d495..0000000000000
--- a/patches.renesas/0519-clocksource-sh_tmu-Replace-hardcoded-register-values.patch
+++ /dev/null
@@ -1,76 +0,0 @@
-From d2a781b24462193dffeb91ad7865348dede758f4 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 29 Jan 2014 00:33:08 +0100
-Subject: clocksource: sh_tmu: Replace hardcoded register values with macros
-
-Define symbolic macros for all used registers bits.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 5cfe2d151f8f55052f5463e725d3d3a4aa51335d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 19 ++++++++++++++-----
- 1 file changed, 14 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 55b7a37f0c9b..63ed92d56c8f 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -69,6 +69,15 @@ static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
- #define TCNT 1 /* channel register */
- #define TCR 2 /* channel register */
-
-+#define TCR_UNF (1 << 8)
-+#define TCR_UNIE (1 << 5)
-+#define TCR_TPSC_CLK4 (0 << 0)
-+#define TCR_TPSC_CLK16 (1 << 0)
-+#define TCR_TPSC_CLK64 (2 << 0)
-+#define TCR_TPSC_CLK256 (3 << 0)
-+#define TCR_TPSC_CLK1024 (4 << 0)
-+#define TCR_TPSC_MASK (7 << 0)
-+
- static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
- {
- unsigned long offs;
-@@ -140,7 +149,7 @@ static int __sh_tmu_enable(struct sh_tmu_channel *ch)
-
- /* configure channel to parent clock / 4, irq off */
- ch->rate = clk_get_rate(ch->tmu->clk) / 4;
-- sh_tmu_write(ch, TCR, 0x0000);
-+ sh_tmu_write(ch, TCR, TCR_TPSC_CLK4);
-
- /* enable channel */
- sh_tmu_start_stop_ch(ch, 1);
-@@ -165,7 +174,7 @@ static void __sh_tmu_disable(struct sh_tmu_channel *ch)
- sh_tmu_start_stop_ch(ch, 0);
-
- /* disable interrupts in TMU block */
-- sh_tmu_write(ch, TCR, 0x0000);
-+ sh_tmu_write(ch, TCR, TCR_TPSC_CLK4);
-
- /* stop clock */
- clk_disable(ch->tmu->clk);
-@@ -195,7 +204,7 @@ static void sh_tmu_set_next(struct sh_tmu_channel *ch, unsigned long delta,
- sh_tmu_read(ch, TCR);
-
- /* enable interrupt */
-- sh_tmu_write(ch, TCR, 0x0020);
-+ sh_tmu_write(ch, TCR, TCR_UNIE | TCR_TPSC_CLK4);
-
- /* reload delta value in case of periodic timer */
- if (periodic)
-@@ -215,9 +224,9 @@ static irqreturn_t sh_tmu_interrupt(int irq, void *dev_id)
-
- /* disable or acknowledge interrupt */
- if (ch->ced.mode == CLOCK_EVT_MODE_ONESHOT)
-- sh_tmu_write(ch, TCR, 0x0000);
-+ sh_tmu_write(ch, TCR, TCR_TPSC_CLK4);
- else
-- sh_tmu_write(ch, TCR, 0x0020);
-+ sh_tmu_write(ch, TCR, TCR_UNIE | TCR_TPSC_CLK4);
-
- /* notify clockevent layer */
- ch->ced.event_handler(&ch->ced);
---
-2.1.2
-
diff --git a/patches.renesas/0520-clocksource-sh_tmu-Hardcode-TMU-clock-event-and-sour.patch b/patches.renesas/0520-clocksource-sh_tmu-Hardcode-TMU-clock-event-and-sour.patch
deleted file mode 100644
index 7b84c6e44a6e5..0000000000000
--- a/patches.renesas/0520-clocksource-sh_tmu-Hardcode-TMU-clock-event-and-sour.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 036d819ea9b8fa37356813a4eaecc67078d08550 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 19 Feb 2014 17:00:31 +0100
-Subject: clocksource: sh_tmu: Hardcode TMU clock event and source ratings to
- 200
-
-All boards use clock event and clock source ratings of 200 for the TMU,
-hardcode it in the driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit f1010ed1a13ea38f495ebfa2fdb1f38b7f87301f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 23 +++++++++++------------
- 1 file changed, 11 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 63ed92d56c8f..fec9bedb8f45 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -300,12 +300,12 @@ static void sh_tmu_clocksource_resume(struct clocksource *cs)
- }
-
- static int sh_tmu_register_clocksource(struct sh_tmu_channel *ch,
-- const char *name, unsigned long rating)
-+ const char *name)
- {
- struct clocksource *cs = &ch->cs;
-
- cs->name = name;
-- cs->rating = rating;
-+ cs->rating = 200;
- cs->read = sh_tmu_clocksource_read;
- cs->enable = sh_tmu_clocksource_enable;
- cs->disable = sh_tmu_clocksource_disable;
-@@ -402,7 +402,7 @@ static void sh_tmu_clock_event_resume(struct clock_event_device *ced)
- }
-
- static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
-- const char *name, unsigned long rating)
-+ const char *name)
- {
- struct clock_event_device *ced = &ch->ced;
- int ret;
-@@ -410,7 +410,7 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
- ced->features |= CLOCK_EVT_FEAT_ONESHOT;
-- ced->rating = rating;
-+ ced->rating = 200;
- ced->cpumask = cpumask_of(0);
- ced->set_next_event = sh_tmu_clock_event_next;
- ced->set_mode = sh_tmu_clock_event_mode;
-@@ -433,13 +433,12 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- }
-
- static int sh_tmu_register(struct sh_tmu_channel *ch, const char *name,
-- unsigned long clockevent_rating,
-- unsigned long clocksource_rating)
-+ bool clockevent, bool clocksource)
- {
-- if (clockevent_rating)
-- sh_tmu_register_clockevent(ch, name, clockevent_rating);
-- else if (clocksource_rating)
-- sh_tmu_register_clocksource(ch, name, clocksource_rating);
-+ if (clockevent)
-+ sh_tmu_register_clockevent(ch, name);
-+ else if (clocksource)
-+ sh_tmu_register_clocksource(ch, name);
-
- return 0;
- }
-@@ -471,8 +470,8 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
- ch->enable_count = 0;
-
- return sh_tmu_register(ch, dev_name(&tmu->pdev->dev),
-- cfg->clockevent_rating,
-- cfg->clocksource_rating);
-+ cfg->clockevent_rating != 0,
-+ cfg->clocksource_rating != 0);
- }
-
- static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
---
-2.1.2
-
diff --git a/patches.renesas/0521-clocksource-sh_tmu-Add-support-for-multiple-channels.patch b/patches.renesas/0521-clocksource-sh_tmu-Add-support-for-multiple-channels.patch
deleted file mode 100644
index bce91bb212c9b..0000000000000
--- a/patches.renesas/0521-clocksource-sh_tmu-Add-support-for-multiple-channels.patch
+++ /dev/null
@@ -1,359 +0,0 @@
-From f25934f9893e230df59b255e42b2302b93d527c5 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 28 Jan 2014 12:36:48 +0100
-Subject: clocksource: sh_tmu: Add support for multiple channels per device
-
-TMU hardware devices can support multiple channels, with global
-registers and per-channel registers. The sh_tmu driver currently models
-the hardware with one Linux device per channel. This model makes it
-difficult to handle global registers in a clean way.
-
-Add support for a new model that uses one Linux device per timer with
-multiple channels per device. This requires changes to platform data,
-add new channel configuration fields.
-
-Support for the legacy model is kept and will be removed after all
-platforms switch to the new model.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 8c7f21e6739ad836f30561d641393a8417abdad3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 213 ++++++++++++++++++++++++++++++-------------
- 1 file changed, 152 insertions(+), 61 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index fec9bedb8f45..0306d31e9f1d 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -35,6 +35,12 @@
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-
-+enum sh_tmu_model {
-+ SH_TMU_LEGACY,
-+ SH_TMU,
-+ SH_TMU_SH3,
-+};
-+
- struct sh_tmu_device;
-
- struct sh_tmu_channel {
-@@ -58,8 +64,13 @@ struct sh_tmu_device {
- void __iomem *mapbase;
- struct clk *clk;
-
-+ enum sh_tmu_model model;
-+
- struct sh_tmu_channel *channels;
- unsigned int num_channels;
-+
-+ bool has_clockevent;
-+ bool has_clocksource;
- };
-
- static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
-@@ -82,8 +93,16 @@ static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
- {
- unsigned long offs;
-
-- if (reg_nr == TSTR)
-- return ioread8(ch->tmu->mapbase);
-+ if (reg_nr == TSTR) {
-+ switch (ch->tmu->model) {
-+ case SH_TMU_LEGACY:
-+ return ioread8(ch->tmu->mapbase);
-+ case SH_TMU_SH3:
-+ return ioread8(ch->tmu->mapbase + 2);
-+ case SH_TMU:
-+ return ioread8(ch->tmu->mapbase + 4);
-+ }
-+ }
-
- offs = reg_nr << 2;
-
-@@ -99,8 +118,14 @@ static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
- unsigned long offs;
-
- if (reg_nr == TSTR) {
-- iowrite8(value, ch->tmu->mapbase);
-- return;
-+ switch (ch->tmu->model) {
-+ case SH_TMU_LEGACY:
-+ return iowrite8(value, ch->tmu->mapbase);
-+ case SH_TMU_SH3:
-+ return iowrite8(value, ch->tmu->mapbase + 2);
-+ case SH_TMU:
-+ return iowrite8(value, ch->tmu->mapbase + 4);
-+ }
- }
-
- offs = reg_nr << 2;
-@@ -435,31 +460,49 @@ static void sh_tmu_register_clockevent(struct sh_tmu_channel *ch,
- static int sh_tmu_register(struct sh_tmu_channel *ch, const char *name,
- bool clockevent, bool clocksource)
- {
-- if (clockevent)
-+ if (clockevent) {
-+ ch->tmu->has_clockevent = true;
- sh_tmu_register_clockevent(ch, name);
-- else if (clocksource)
-+ } else if (clocksource) {
-+ ch->tmu->has_clocksource = true;
- sh_tmu_register_clocksource(ch, name);
-+ }
-
- return 0;
- }
-
--static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
-+static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
-+ bool clockevent, bool clocksource,
- struct sh_tmu_device *tmu)
- {
-- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-+ /* Skip unused channels. */
-+ if (!clockevent && !clocksource)
-+ return 0;
-
- ch->tmu = tmu;
-
-- /*
-- * The SH3 variant (SH770x, SH7705, SH7710 and SH7720) maps channel
-- * registers blocks at base + 2 + 12 * index, while all other variants
-- * map them at base + 4 + 12 * index. We can compute the index by just
-- * dividing by 12, the 2 bytes or 4 bytes offset being hidden by the
-- * integer division.
-- */
-- ch->index = cfg->channel_offset / 12;
-+ if (tmu->model == SH_TMU_LEGACY) {
-+ struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-+
-+ /*
-+ * The SH3 variant (SH770x, SH7705, SH7710 and SH7720) maps
-+ * channel registers blocks at base + 2 + 12 * index, while all
-+ * other variants map them at base + 4 + 12 * index. We can
-+ * compute the index by just dividing by 12, the 2 bytes or 4
-+ * bytes offset being hidden by the integer division.
-+ */
-+ ch->index = cfg->channel_offset / 12;
-+ ch->base = tmu->mapbase + cfg->channel_offset;
-+ } else {
-+ ch->index = index;
-+
-+ if (tmu->model == SH_TMU_SH3)
-+ ch->base = tmu->mapbase + 4 + ch->index * 12;
-+ else
-+ ch->base = tmu->mapbase + 8 + ch->index * 12;
-+ }
-
-- ch->irq = platform_get_irq(tmu->pdev, 0);
-+ ch->irq = platform_get_irq(tmu->pdev, ch->index);
- if (ch->irq < 0) {
- dev_err(&tmu->pdev->dev, "ch%u: failed to get irq\n",
- ch->index);
-@@ -470,88 +513,127 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch,
- ch->enable_count = 0;
-
- return sh_tmu_register(ch, dev_name(&tmu->pdev->dev),
-- cfg->clockevent_rating != 0,
-- cfg->clocksource_rating != 0);
-+ clockevent, clocksource);
- }
-
--static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
-+static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
- {
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
- struct resource *res;
-- void __iomem *base;
-- int ret;
-- ret = -ENXIO;
--
-- tmu->pdev = pdev;
--
-- if (!cfg) {
-- dev_err(&tmu->pdev->dev, "missing platform data\n");
-- goto err0;
-- }
--
-- platform_set_drvdata(pdev, tmu);
-
- res = platform_get_resource(tmu->pdev, IORESOURCE_MEM, 0);
- if (!res) {
- dev_err(&tmu->pdev->dev, "failed to get I/O memory\n");
-- goto err0;
-+ return -ENXIO;
- }
-
-+ tmu->mapbase = ioremap_nocache(res->start, resource_size(res));
-+ if (tmu->mapbase == NULL)
-+ return -ENXIO;
-+
- /*
-- * Map memory, let base point to our channel and mapbase to the
-- * start/stop shared register.
-+ * In legacy platform device configuration (with one device per channel)
-+ * the resource points to the channel base address.
- */
-- base = ioremap_nocache(res->start, resource_size(res));
-- if (base == NULL) {
-- dev_err(&tmu->pdev->dev, "failed to remap I/O memory\n");
-- goto err0;
-+ if (tmu->model == SH_TMU_LEGACY) {
-+ struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-+ tmu->mapbase -= cfg->channel_offset;
- }
-
-- tmu->mapbase = base - cfg->channel_offset;
-+ return 0;
-+}
-
-- /* get hold of clock */
-+static void sh_tmu_unmap_memory(struct sh_tmu_device *tmu)
-+{
-+ if (tmu->model == SH_TMU_LEGACY) {
-+ struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-+ tmu->mapbase += cfg->channel_offset;
-+ }
-+
-+ iounmap(tmu->mapbase);
-+}
-+
-+static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
-+{
-+ struct sh_timer_config *cfg = pdev->dev.platform_data;
-+ const struct platform_device_id *id = pdev->id_entry;
-+ unsigned int i;
-+ int ret;
-+
-+ if (!cfg) {
-+ dev_err(&tmu->pdev->dev, "missing platform data\n");
-+ return -ENXIO;
-+ }
-+
-+ tmu->pdev = pdev;
-+ tmu->model = id->driver_data;
-+
-+ /* Get hold of clock. */
- tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck");
- if (IS_ERR(tmu->clk)) {
- dev_err(&tmu->pdev->dev, "cannot get clock\n");
-- ret = PTR_ERR(tmu->clk);
-- goto err1;
-+ return PTR_ERR(tmu->clk);
- }
-
- ret = clk_prepare(tmu->clk);
- if (ret < 0)
-- goto err2;
-+ goto err_clk_put;
-+
-+ /* Map the memory resource. */
-+ ret = sh_tmu_map_memory(tmu);
-+ if (ret < 0) {
-+ dev_err(&tmu->pdev->dev, "failed to remap I/O memory\n");
-+ goto err_clk_unprepare;
-+ }
-
-- tmu->channels = kzalloc(sizeof(*tmu->channels), GFP_KERNEL);
-+ /* Allocate and setup the channels. */
-+ if (tmu->model == SH_TMU_LEGACY)
-+ tmu->num_channels = 1;
-+ else
-+ tmu->num_channels = hweight8(cfg->channels_mask);
-+
-+ tmu->channels = kzalloc(sizeof(*tmu->channels) * tmu->num_channels,
-+ GFP_KERNEL);
- if (tmu->channels == NULL) {
- ret = -ENOMEM;
-- goto err3;
-+ goto err_unmap;
- }
-
-- tmu->num_channels = 1;
--
-- tmu->channels[0].base = base;
-+ if (tmu->model == SH_TMU_LEGACY) {
-+ ret = sh_tmu_channel_setup(&tmu->channels[0], 0,
-+ cfg->clockevent_rating != 0,
-+ cfg->clocksource_rating != 0, tmu);
-+ if (ret < 0)
-+ goto err_unmap;
-+ } else {
-+ /*
-+ * Use the first channel as a clock event device and the second
-+ * channel as a clock source.
-+ */
-+ for (i = 0; i < tmu->num_channels; ++i) {
-+ ret = sh_tmu_channel_setup(&tmu->channels[i], i,
-+ i == 0, i == 1, tmu);
-+ if (ret < 0)
-+ goto err_unmap;
-+ }
-+ }
-
-- ret = sh_tmu_channel_setup(&tmu->channels[0], tmu);
-- if (ret < 0)
-- goto err3;
-+ platform_set_drvdata(pdev, tmu);
-
- return 0;
-
-- err3:
-+err_unmap:
- kfree(tmu->channels);
-+ sh_tmu_unmap_memory(tmu);
-+err_clk_unprepare:
- clk_unprepare(tmu->clk);
-- err2:
-+err_clk_put:
- clk_put(tmu->clk);
-- err1:
-- iounmap(base);
-- err0:
- return ret;
- }
-
- static int sh_tmu_probe(struct platform_device *pdev)
- {
- struct sh_tmu_device *tmu = platform_get_drvdata(pdev);
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
- int ret;
-
- if (!is_early_platform_device(pdev)) {
-@@ -580,7 +662,7 @@ static int sh_tmu_probe(struct platform_device *pdev)
- return 0;
-
- out:
-- if (cfg->clockevent_rating || cfg->clocksource_rating)
-+ if (tmu->has_clockevent || tmu->has_clocksource)
- pm_runtime_irq_safe(&pdev->dev);
- else
- pm_runtime_idle(&pdev->dev);
-@@ -593,12 +675,21 @@ static int sh_tmu_remove(struct platform_device *pdev)
- return -EBUSY; /* cannot unregister clockevent and clocksource */
- }
-
-+static const struct platform_device_id sh_tmu_id_table[] = {
-+ { "sh_tmu", SH_TMU_LEGACY },
-+ { "sh-tmu", SH_TMU },
-+ { "sh-tmu-sh3", SH_TMU_SH3 },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(platform, sh_tmu_id_table);
-+
- static struct platform_driver sh_tmu_device_driver = {
- .probe = sh_tmu_probe,
- .remove = sh_tmu_remove,
- .driver = {
- .name = "sh_tmu",
-- }
-+ },
-+ .id_table = sh_tmu_id_table,
- };
-
- static int __init sh_tmu_init(void)
---
-2.1.2
-
diff --git a/patches.renesas/0522-clocksource-sh_tmu-Rename-clock-to-fck-in-the-non-le.patch b/patches.renesas/0522-clocksource-sh_tmu-Rename-clock-to-fck-in-the-non-le.patch
deleted file mode 100644
index e0f5e6e5379bc..0000000000000
--- a/patches.renesas/0522-clocksource-sh_tmu-Rename-clock-to-fck-in-the-non-le.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5b01481271f3ced5d49d0118750a36572124b9c9 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 14 Feb 2014 00:35:18 +0100
-Subject: clocksource: sh_tmu: Rename clock to "fck" in the non-legacy case
-
-The sh_tmu driver gets the TMU functional clock using a connection ID of
-"tmu_fck". While all SH SoCs create clock lookup entries with a NULL
-device ID and a "tmu_fck" connection ID, the ARM SoCs use the device ID
-only with a NULL connection ID. This works on legacy platforms but will
-break on ARM with DT boot.
-
-Fix the situation by using a connection ID of "fck" in the non-legacy
-platform data case. Clock lookup entries will be renamed to use the
-device ID as well as the connection ID as platforms get moved to new
-platform data. The legacy code will eventually be dropped, leaving us
-with device ID based clock lookup, compatible with DT boot.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit a27d922749f3be0a88f7e0aeb507c373703c08ee)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 0306d31e9f1d..cf07797dbcf3 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -568,7 +568,8 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- tmu->model = id->driver_data;
-
- /* Get hold of clock. */
-- tmu->clk = clk_get(&tmu->pdev->dev, "tmu_fck");
-+ tmu->clk = clk_get(&tmu->pdev->dev,
-+ tmu->model == SH_TMU_LEGACY ? "tmu_fck" : "fck");
- if (IS_ERR(tmu->clk)) {
- dev_err(&tmu->pdev->dev, "cannot get clock\n");
- return PTR_ERR(tmu->clk);
---
-2.1.2
-
diff --git a/patches.renesas/0523-clocksource-sh_tmu-Remove-FSF-mail-address-from-GPL-.patch b/patches.renesas/0523-clocksource-sh_tmu-Remove-FSF-mail-address-from-GPL-.patch
deleted file mode 100644
index 53977fb239c3b..0000000000000
--- a/patches.renesas/0523-clocksource-sh_tmu-Remove-FSF-mail-address-from-GPL-.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 06645a24a027234eb838922854f11d24ef8ddd98 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 14 Feb 2014 01:25:50 +0100
-Subject: clocksource: sh_tmu: Remove FSF mail address from GPL notice
-
-Do not include the paragraph about writing to the Free Software
-Foundation's mailing address from the sample GPL notice. The FSF has
-changed addresses in the past, and may do so again. Linux already
-includes a copy of the GPL.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 6b96c15b034813ec0b46e5bebbf8cffae0ac72d0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index cf07797dbcf3..981f8d302a2a 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -11,10 +11,6 @@
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
-- *
-- * You should have received a copy of the GNU General Public License
-- * along with this program; if not, write to the Free Software
-- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
- #include <linux/init.h>
---
-2.1.2
-
diff --git a/patches.renesas/0524-clocksource-sh_tmu-Sort-headers-alphabetically.patch b/patches.renesas/0524-clocksource-sh_tmu-Sort-headers-alphabetically.patch
deleted file mode 100644
index 3b9fb9b0d277c..0000000000000
--- a/patches.renesas/0524-clocksource-sh_tmu-Sort-headers-alphabetically.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 023dd9a346ba3d6d929718494268821f20f1cd3e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 12 Feb 2014 16:56:44 +0100
-Subject: clocksource: sh_tmu: Sort headers alphabetically
-
-This helps locating duplicates and inserting new headers.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 13931f8065fabff117828999e007f62a5cabea34)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 981f8d302a2a..4ba2c0fea580 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -13,23 +13,23 @@
- * GNU General Public License for more details.
- */
-
-+#include <linux/clk.h>
-+#include <linux/clockchips.h>
-+#include <linux/clocksource.h>
-+#include <linux/delay.h>
-+#include <linux/err.h>
- #include <linux/init.h>
--#include <linux/platform_device.h>
--#include <linux/spinlock.h>
- #include <linux/interrupt.h>
--#include <linux/ioport.h>
--#include <linux/delay.h>
- #include <linux/io.h>
--#include <linux/clk.h>
-+#include <linux/ioport.h>
- #include <linux/irq.h>
--#include <linux/err.h>
--#include <linux/clocksource.h>
--#include <linux/clockchips.h>
--#include <linux/sh_timer.h>
--#include <linux/slab.h>
- #include <linux/module.h>
-+#include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-+#include <linux/sh_timer.h>
-+#include <linux/slab.h>
-+#include <linux/spinlock.h>
-
- enum sh_tmu_model {
- SH_TMU_LEGACY,
---
-2.1.2
-
diff --git a/patches.renesas/0525-clocksource-sh_tmu-Fix-channel-IRQ-retrieval-in-lega.patch b/patches.renesas/0525-clocksource-sh_tmu-Fix-channel-IRQ-retrieval-in-lega.patch
deleted file mode 100644
index 691b4e4749dca..0000000000000
--- a/patches.renesas/0525-clocksource-sh_tmu-Fix-channel-IRQ-retrieval-in-lega.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f877ffb3d7b3da83cd721382f60cf0f2602e5437 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 16 May 2014 14:44:23 +0200
-Subject: clocksource: sh_tmu: Fix channel IRQ retrieval in legacy case
-
-In the legacy platform data case each TMU platform device handles a
-single channel with a single IRQ for the platform device. Retrieve the
-IRQ using the logical channel number instead of the hardware channel
-number.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-(cherry picked from commit c54697ae180e652a96db8bc71f0c7c7baee2bf16)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 4ba2c0fea580..ec340955e852 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -498,7 +498,7 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
- ch->base = tmu->mapbase + 8 + ch->index * 12;
- }
-
-- ch->irq = platform_get_irq(tmu->pdev, ch->index);
-+ ch->irq = platform_get_irq(tmu->pdev, index);
- if (ch->irq < 0) {
- dev_err(&tmu->pdev->dev, "ch%u: failed to get irq\n",
- ch->index);
---
-2.1.2
-
diff --git a/patches.renesas/0526-clocksource-sh_tmu-Remove-unnecessary-OOM-messages.patch b/patches.renesas/0526-clocksource-sh_tmu-Remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index 0918ce8f4424e..0000000000000
--- a/patches.renesas/0526-clocksource-sh_tmu-Remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From f754914142ff26a41d5c0d21f350409312edebf2 Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Thu, 22 May 2014 14:05:07 +0200
-Subject: clocksource: sh_tmu: Remove unnecessary OOM messages
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message.
-
-[dlezcano] : refreshed against latest modifications: kmalloc -> kzalloc
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
-(cherry picked from commit 814876b0b00ae98a8568d1b989bc98ca5389b98a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index ec340955e852..6bd17a8f3dd4 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -644,10 +644,8 @@ static int sh_tmu_probe(struct platform_device *pdev)
- }
-
- tmu = kzalloc(sizeof(*tmu), GFP_KERNEL);
-- if (tmu == NULL) {
-- dev_err(&pdev->dev, "failed to allocate driver data\n");
-+ if (tmu == NULL)
- return -ENOMEM;
-- }
-
- ret = sh_tmu_setup(tmu, pdev);
- if (ret) {
---
-2.1.2
-
diff --git a/patches.renesas/0527-spi-sh-msiof-remove-unnecessary-OOM-messages.patch b/patches.renesas/0527-spi-sh-msiof-remove-unnecessary-OOM-messages.patch
deleted file mode 100644
index d6dc925787039..0000000000000
--- a/patches.renesas/0527-spi-sh-msiof-remove-unnecessary-OOM-messages.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 7f89b0c6381a6ba5d095b186c3acc81ba33ca8aa Mon Sep 17 00:00:00 2001
-From: Jingoo Han <jg1.han@samsung.com>
-Date: Tue, 29 Apr 2014 17:21:25 +0900
-Subject: spi: sh-msiof: remove unnecessary OOM messages
-
-The site-specific OOM messages are unnecessary, because they
-duplicate the MM subsystem generic OOM message.
-
-Signed-off-by: Jingoo Han <jg1.han@samsung.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 1e8231b79ccbb3e6e7b3f6af9f998dca16b00efe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 4 +---
- 1 file changed, 1 insertion(+), 3 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index e850d03e7190..45b09142afe2 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -642,10 +642,8 @@ static struct sh_msiof_spi_info *sh_msiof_spi_parse_dt(struct device *dev)
- u32 num_cs = 1;
-
- info = devm_kzalloc(dev, sizeof(struct sh_msiof_spi_info), GFP_KERNEL);
-- if (!info) {
-- dev_err(dev, "failed to allocate setup data\n");
-+ if (!info)
- return NULL;
-- }
-
- /* Parse the MSIOF properties */
- of_property_read_u32(np, "num-cs", &num_cs);
---
-2.1.2
-
diff --git a/patches.renesas/0528-media-v4l-vsp1-Add-DT-bindings-documentation.patch b/patches.renesas/0528-media-v4l-vsp1-Add-DT-bindings-documentation.patch
deleted file mode 100644
index ae17b3e83eea1..0000000000000
--- a/patches.renesas/0528-media-v4l-vsp1-Add-DT-bindings-documentation.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From cf440657d4d134517dc3373b5e0c22d326644c2f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 8 Apr 2014 13:39:59 -0300
-Subject: [media] v4l: vsp1: Add DT bindings documentation
-
-All parameters supplied through platform data can now be passed through
-the device tree.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 34d1cbdafd5b27bc06f47f557e0581b7b85d6f07)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/media/renesas,vsp1.txt | 43 ++++++++++++++++++++++
- 1 file changed, 43 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/media/renesas,vsp1.txt
-
-diff --git a/Documentation/devicetree/bindings/media/renesas,vsp1.txt b/Documentation/devicetree/bindings/media/renesas,vsp1.txt
-new file mode 100644
-index 000000000000..87fe08abf36d
---- /dev/null
-+++ b/Documentation/devicetree/bindings/media/renesas,vsp1.txt
-@@ -0,0 +1,43 @@
-+* Renesas VSP1 Video Processing Engine
-+
-+The VSP1 is a video processing engine that supports up-/down-scaling, alpha
-+blending, color space conversion and various other image processing features.
-+It can be found in the Renesas R-Car second generation SoCs.
-+
-+Required properties:
-+
-+ - compatible: Must contain "renesas,vsp1"
-+
-+ - reg: Base address and length of the registers block for the VSP1.
-+ - interrupts: VSP1 interrupt specifier.
-+ - clocks: A phandle + clock-specifier pair for the VSP1 functional clock.
-+
-+ - renesas,#rpf: Number of Read Pixel Formatter (RPF) modules in the VSP1.
-+ - renesas,#uds: Number of Up Down Scaler (UDS) modules in the VSP1.
-+ - renesas,#wpf: Number of Write Pixel Formatter (WPF) modules in the VSP1.
-+
-+
-+Optional properties:
-+
-+ - renesas,has-lif: Boolean, indicates that the LCD Interface (LIF) module is
-+ available.
-+ - renesas,has-lut: Boolean, indicates that the Look Up Table (LUT) module is
-+ available.
-+ - renesas,has-sru: Boolean, indicates that the Super Resolution Unit (SRU)
-+ module is available.
-+
-+
-+Example: R8A7790 (R-Car H2) VSP1-S node
-+
-+ vsp1@fe928000 {
-+ compatible = "renesas,vsp1";
-+ reg = <0 0xfe928000 0 0x8000>;
-+ interrupts = <0 267 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp1_clks R8A7790_CLK_VSP1_S>;
-+
-+ renesas,has-lut;
-+ renesas,has-sru;
-+ renesas,#rpf = <5>;
-+ renesas,#uds = <3>;
-+ renesas,#wpf = <4>;
-+ };
---
-2.1.2
-
diff --git a/patches.renesas/0529-usb-host-xhci-plat-sort-the-headers-in-alphabetic-or.patch b/patches.renesas/0529-usb-host-xhci-plat-sort-the-headers-in-alphabetic-or.patch
deleted file mode 100644
index 58c4fce0ed2a2..0000000000000
--- a/patches.renesas/0529-usb-host-xhci-plat-sort-the-headers-in-alphabetic-or.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From c75ff9cedac6f1954f2148c5a6c1f51e5ae5862c Mon Sep 17 00:00:00 2001
-From: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Date: Thu, 15 May 2014 12:17:31 +0200
-Subject: usb: host: xhci-plat: sort the headers in alphabetic order
-
-Sorting the headers in alphabetic order will help to reduce the conflict
-when adding new headers later.
-
-Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Acked-by: Felipe Balbi <balbi@ti.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 48157bb97f074d21372bd3ae87e5988ed23c8972)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/xhci-plat.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index 8affef910782..706fe185fe4d 100644
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -11,11 +11,11 @@
- * version 2 as published by the Free Software Foundation.
- */
-
--#include <linux/platform_device.h>
-+#include <linux/dma-mapping.h>
- #include <linux/module.h>
--#include <linux/slab.h>
- #include <linux/of.h>
--#include <linux/dma-mapping.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-
- #include "xhci.h"
-
---
-2.1.2
-
diff --git a/patches.renesas/0530-usb-host-xhci-plat-add-clock-support.patch b/patches.renesas/0530-usb-host-xhci-plat-add-clock-support.patch
deleted file mode 100644
index b90cac8691751..0000000000000
--- a/patches.renesas/0530-usb-host-xhci-plat-add-clock-support.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 87e26737255c516b108e281e921e784b2731fd5f Mon Sep 17 00:00:00 2001
-From: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Date: Thu, 15 May 2014 12:17:32 +0200
-Subject: usb: host: xhci-plat: add clock support
-
-Some platforms (such as the Armada 38x ones) can gate the clock of
-their USB controller. This patch adds the support for one clock in
-xhci-plat, by enabling it during probe and disabling it on remove.
-
-To achieve this, it adds a 'struct clk *' member in xhci_hcd. While
-only used for now in xhci-plat, it might be used by other drivers in
-the future. Moreover, the xhci_hcd structure already holds other
-members such as msix_count and msix_entries, which are MSI-X specific,
-and therefore only used by xhci-pci.
-
-Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Acked-by: Felipe Balbi <balbi@ti.com>
-Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 4718c177405112386a977fd9f1cba5fd6aa82315)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/xhci-plat.c | 24 +++++++++++++++++++++++-
- drivers/usb/host/xhci.h | 2 ++
- 2 files changed, 25 insertions(+), 1 deletion(-)
-
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -11,6 +11,7 @@
- * version 2 as published by the Free Software Foundation.
- */
-
-+#include <linux/clk.h>
- #include <linux/dma-mapping.h>
- #include <linux/module.h>
- #include <linux/of.h>
-@@ -91,6 +92,7 @@ static int xhci_plat_probe(struct platfo
- struct xhci_hcd *xhci;
- struct resource *res;
- struct usb_hcd *hcd;
-+ struct clk *clk;
- int ret;
- int irq;
-
-@@ -137,14 +139,27 @@ static int xhci_plat_probe(struct platfo
- goto release_mem_region;
- }
-
-+ /*
-+ * Not all platforms have a clk so it is not an error if the
-+ * clock does not exists.
-+ */
-+ clk = devm_clk_get(&pdev->dev, NULL);
-+ if (!IS_ERR(clk)) {
-+ ret = clk_prepare_enable(clk);
-+ if (ret)
-+ goto unmap_registers;
-+ }
-+
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
- if (ret)
-- goto unmap_registers;
-+ goto disable_clk;
-+
- device_wakeup_enable(hcd->self.controller);
-
- /* USB 2.0 roothub is stored in the platform_device now. */
- hcd = platform_get_drvdata(pdev);
- xhci = hcd_to_xhci(hcd);
-+ xhci->clk = clk;
- xhci->shared_hcd = usb_create_shared_hcd(driver, &pdev->dev,
- dev_name(&pdev->dev), hcd);
- if (!xhci->shared_hcd) {
-@@ -170,6 +185,10 @@ put_usb3_hcd:
- dealloc_usb2_hcd:
- usb_remove_hcd(hcd);
-
-+disable_clk:
-+ if (!IS_ERR(clk))
-+ clk_disable_unprepare(clk);
-+
- unmap_registers:
- iounmap(hcd->regs);
-
-@@ -186,11 +205,14 @@ static int xhci_plat_remove(struct platf
- {
- struct usb_hcd *hcd = platform_get_drvdata(dev);
- struct xhci_hcd *xhci = hcd_to_xhci(hcd);
-+ struct clk *clk = xhci->clk;
-
- usb_remove_hcd(xhci->shared_hcd);
- usb_put_hcd(xhci->shared_hcd);
-
- usb_remove_hcd(hcd);
-+ if (!IS_ERR(clk))
-+ clk_disable_unprepare(clk);
- iounmap(hcd->regs);
- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
---- a/drivers/usb/host/xhci.h
-+++ b/drivers/usb/host/xhci.h
-@@ -1478,6 +1478,8 @@ struct xhci_hcd {
- /* msi-x vectors */
- int msix_count;
- struct msix_entry *msix_entries;
-+ /* optional clock */
-+ struct clk *clk;
- /* data structures */
- struct xhci_device_context_array *dcbaa;
- struct xhci_ring *cmd_ring;
diff --git a/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch b/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch
deleted file mode 100644
index 41324f0129fbd..0000000000000
--- a/patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch
+++ /dev/null
@@ -1,193 +0,0 @@
-From 6fe57263d7d2abe567e271cd313a7c1e03104294 Mon Sep 17 00:00:00 2001
-From: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Date: Thu, 15 May 2014 12:17:33 +0200
-Subject: usb: host: xhci-plat: add support for the Armada 375/38x XHCI
- controllers
-
-The Armada 375 and 38x SoCs come with an XHCI controller that requires
-some specific initialization related to the MBus windows
-configuration. This patch adds the support for this special
-configuration as an XHCI quirk executed during probe.
-
-Two new compatible strings are added to identify the Armada 375 and
-Armada 38x XHCI controllers, and therefore enable the relevant quirk.
-
-Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 973747928514bb636e3fe6a13b7ec6d6d73100f0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/Kconfig | 8 ++++
- drivers/usb/host/Makefile | 3 +
- drivers/usb/host/xhci-mvebu.c | 72 ++++++++++++++++++++++++++++++++++++++++++
- drivers/usb/host/xhci-mvebu.h | 21 ++++++++++++
- drivers/usb/host/xhci-plat.c | 12 +++++++
- 5 files changed, 116 insertions(+)
- create mode 100644 drivers/usb/host/xhci-mvebu.c
- create mode 100644 drivers/usb/host/xhci-mvebu.h
-
---- a/drivers/usb/host/Kconfig
-+++ b/drivers/usb/host/Kconfig
-@@ -29,6 +29,14 @@ if USB_XHCI_HCD
- config USB_XHCI_PLATFORM
- tristate
-
-+config USB_XHCI_MVEBU
-+ tristate "xHCI support for Marvell Armada 375/38x"
-+ select USB_XHCI_PLATFORM
-+ depends on ARCH_MVEBU || COMPILE_TEST
-+ ---help---
-+ Say 'Y' to enable the support for the xHCI host controller
-+ found in Marvell Armada 375/38x ARM SOCs.
-+
- endif # USB_XHCI_HCD
-
- config USB_EHCI_HCD
---- a/drivers/usb/host/Makefile
-+++ b/drivers/usb/host/Makefile
-@@ -19,6 +19,9 @@ xhci-hcd-$(CONFIG_PCI) += xhci-pci.o
-
- ifneq ($(CONFIG_USB_XHCI_PLATFORM), )
- xhci-hcd-y += xhci-plat.o
-+ifneq ($(CONFIG_USB_XHCI_MVEBU), )
-+ xhci-hcd-y += xhci-mvebu.o
-+endif
- endif
-
- obj-$(CONFIG_USB_WHCI_HCD) += whci/
---- /dev/null
-+++ b/drivers/usb/host/xhci-mvebu.c
-@@ -0,0 +1,72 @@
-+/*
-+ * Copyright (C) 2014 Marvell
-+ * Author: Gregory CLEMENT <gregory.clement@free-electrons.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/io.h>
-+#include <linux/mbus.h>
-+#include <linux/of.h>
-+#include <linux/platform_device.h>
-+
-+#include "xhci-mvebu.h"
-+
-+#define USB3_MAX_WINDOWS 4
-+#define USB3_WIN_CTRL(w) (0x0 + ((w) * 8))
-+#define USB3_WIN_BASE(w) (0x4 + ((w) * 8))
-+
-+static void xhci_mvebu_mbus_config(void __iomem *base,
-+ const struct mbus_dram_target_info *dram)
-+{
-+ int win;
-+
-+ /* Clear all existing windows */
-+ for (win = 0; win < USB3_MAX_WINDOWS; win++) {
-+ writel(0, base + USB3_WIN_CTRL(win));
-+ writel(0, base + USB3_WIN_BASE(win));
-+ }
-+
-+ /* Program each DRAM CS in a seperate window */
-+ for (win = 0; win < dram->num_cs; win++) {
-+ const struct mbus_dram_window *cs = dram->cs + win;
-+
-+ writel(((cs->size - 1) & 0xffff0000) | (cs->mbus_attr << 8) |
-+ (dram->mbus_dram_target_id << 4) | 1,
-+ base + USB3_WIN_CTRL(win));
-+
-+ writel((cs->base & 0xffff0000), base + USB3_WIN_BASE(win));
-+ }
-+}
-+
-+int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev)
-+{
-+ struct resource *res;
-+ void __iomem *base;
-+ const struct mbus_dram_target_info *dram;
-+
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-+ if (!res)
-+ return -ENODEV;
-+
-+ /*
-+ * We don't use devm_ioremap() because this mapping should
-+ * only exists for the duration of this probe function.
-+ */
-+ base = ioremap(res->start, resource_size(res));
-+ if (!base)
-+ return -ENODEV;
-+
-+ dram = mv_mbus_dram_info();
-+ xhci_mvebu_mbus_config(base, dram);
-+
-+ /*
-+ * This memory area was only needed to configure the MBus
-+ * windows, and is therefore no longer useful.
-+ */
-+ iounmap(base);
-+
-+ return 0;
-+}
---- /dev/null
-+++ b/drivers/usb/host/xhci-mvebu.h
-@@ -0,0 +1,21 @@
-+/*
-+ * Copyright (C) 2014 Marvell
-+ *
-+ * Gregory Clement <gregory.clement@free-electrons.com>
-+ *
-+ * This file is licensed under the terms of the GNU General Public
-+ * License version 2. This program is licensed "as is" without any
-+ * warranty of any kind, whether express or implied.
-+ */
-+
-+#ifndef __LINUX_XHCI_MVEBU_H
-+#define __LINUX_XHCI_MVEBU_H
-+#if IS_ENABLED(CONFIG_USB_XHCI_MVEBU)
-+int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev);
-+#else
-+static inline int xhci_mvebu_mbus_init_quirk(struct platform_device *pdev)
-+{
-+ return 0;
-+}
-+#endif
-+#endif /* __LINUX_XHCI_MVEBU_H */
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -19,6 +19,7 @@
- #include <linux/slab.h>
-
- #include "xhci.h"
-+#include "xhci-mvebu.h"
-
- static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
- {
-@@ -109,6 +110,15 @@ static int xhci_plat_probe(struct platfo
- if (!res)
- return -ENODEV;
-
-+ if (of_device_is_compatible(pdev->dev.of_node,
-+ "marvell,armada-375-xhci") ||
-+ of_device_is_compatible(pdev->dev.of_node,
-+ "marvell,armada-380-xhci")) {
-+ ret = xhci_mvebu_mbus_init_quirk(pdev);
-+ if (ret)
-+ return ret;
-+ }
-+
- /* Initialize dma_mask and coherent_dma_mask to 32-bits */
- ret = dma_set_coherent_mask(&pdev->dev, DMA_BIT_MASK(32));
- if (ret)
-@@ -258,6 +268,8 @@ static const struct dev_pm_ops xhci_plat
- static const struct of_device_id usb_xhci_of_match[] = {
- { .compatible = "generic-xhci" },
- { .compatible = "xhci-platform" },
-+ { .compatible = "marvell,armada-375-xhci"},
-+ { .compatible = "marvell,armada-380-xhci"},
- { },
- };
- MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
diff --git a/patches.renesas/0532-usb-xhci-avoid-warning-for-PM_SLEEP.patch b/patches.renesas/0532-usb-xhci-avoid-warning-for-PM_SLEEP.patch
deleted file mode 100644
index 9940c792b5fc1..0000000000000
--- a/patches.renesas/0532-usb-xhci-avoid-warning-for-PM_SLEEP.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 60a7e2d700ce367c2f3bb20bf29a7718a7f67a59 Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Thu, 8 May 2014 15:52:19 +0200
-Subject: usb: xhci: avoid warning for !PM_SLEEP
-
-If we build a kernel with PM_SUSPEND set and no PM_SLEEP,
-we get a build warning in the xhci-plat driver about unused
-functions.
-
-To fix this, use "#ifdef CONFIG_PM_SLEEP", like we do in most
-other drivers nowadays.
-
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Cc: Mathias Nyman <mathias.nyman@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 274f6afa298791df97fd37b7bc9d8327f5cf6ee9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/xhci-plat.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index 4010fc5bebaf..20ee3ae21823 100644
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -231,7 +231,7 @@ static int xhci_plat_remove(struct platform_device *dev)
- return 0;
- }
-
--#ifdef CONFIG_PM
-+#ifdef CONFIG_PM_SLEEP
- static int xhci_plat_suspend(struct device *dev)
- {
- struct usb_hcd *hcd = dev_get_drvdata(dev);
---
-2.1.2
-
diff --git a/patches.renesas/0533-usb-host-xhci-plat-add-xhci_plat_start.patch b/patches.renesas/0533-usb-host-xhci-plat-add-xhci_plat_start.patch
deleted file mode 100644
index 631a99d589612..0000000000000
--- a/patches.renesas/0533-usb-host-xhci-plat-add-xhci_plat_start.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 63a5e286029417ef52ea51e6d453ef67312e0023 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Wed, 28 May 2014 20:22:58 +0900
-Subject: usb: host: xhci-plat: add xhci_plat_start()
-
-Some platforms (such as the Renesas R-Car) need to initialize some specific
-registers after xhci driver calls usb_add_hcd() and before the driver calls
-xhci_run(). So, this patch adds the xhci_plat_start() function.
-
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 94adcdce0d340e06eb9187cad70555d2e8a201f3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/xhci-plat.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index 20ee3ae21823..ea9e4a210c58 100644
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -37,6 +37,11 @@ static int xhci_plat_setup(struct usb_hcd *hcd)
- return xhci_gen_setup(hcd, xhci_plat_quirks);
- }
-
-+static int xhci_plat_start(struct usb_hcd *hcd)
-+{
-+ return xhci_run(hcd);
-+}
-+
- static const struct hc_driver xhci_plat_xhci_driver = {
- .description = "xhci-hcd",
- .product_desc = "xHCI Host Controller",
-@@ -52,7 +57,7 @@ static const struct hc_driver xhci_plat_xhci_driver = {
- * basic lifecycle operations
- */
- .reset = xhci_plat_setup,
-- .start = xhci_run,
-+ .start = xhci_plat_start,
- .stop = xhci_stop,
- .shutdown = xhci_shutdown,
-
---
-2.1.2
-
diff --git a/patches.renesas/0534-drm-rcar-du-Add-run-time-dependencies.patch b/patches.renesas/0534-drm-rcar-du-Add-run-time-dependencies.patch
deleted file mode 100644
index 2174236de8126..0000000000000
--- a/patches.renesas/0534-drm-rcar-du-Add-run-time-dependencies.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 5cfa3a32fc2fa8fc21e8ed96373e5f75ebddb75a Mon Sep 17 00:00:00 2001
-From: Jean Delvare <jdelvare@suse.de>
-Date: Mon, 26 May 2014 13:01:35 +0200
-Subject: drm/rcar-du: Add run-time dependencies
-
-The Renesas R-Car Display Unit driver is only useful on shmobile
-unless build testing. The LVDS output is useful on an even more
-reduced hardware set.
-
-Signed-off-by: Jean Delvare <jdelvare@suse.de>
-Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Dave Airlie <airlied@redhat.com>
-(cherry picked from commit 923d941990e90ed8ed768b5b6cf5b9d5202b8ff1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpu/drm/rcar-du/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/gpu/drm/rcar-du/Kconfig b/drivers/gpu/drm/rcar-du/Kconfig
-index d8e835ac2c5e..2e3d7b5b0ad7 100644
---- a/drivers/gpu/drm/rcar-du/Kconfig
-+++ b/drivers/gpu/drm/rcar-du/Kconfig
-@@ -1,6 +1,7 @@
- config DRM_RCAR_DU
- tristate "DRM Support for R-Car Display Unit"
- depends on DRM && ARM
-+ depends on ARCH_SHMOBILE || COMPILE_TEST
- select DRM_KMS_HELPER
- select DRM_KMS_CMA_HELPER
- select DRM_GEM_CMA_HELPER
-@@ -12,6 +13,7 @@ config DRM_RCAR_DU
- config DRM_RCAR_LVDS
- bool "R-Car DU LVDS Encoder Support"
- depends on DRM_RCAR_DU
-+ depends on ARCH_R8A7790 || ARCH_R8A7791 || COMPILE_TEST
- help
- Enable support the R-Car Display Unit embedded LVDS encoders
- (currently only on R8A7790).
---
-2.1.2
-
diff --git a/patches.renesas/0535-gpio-rcar-Add-support-for-DT-IRQ-flags.patch b/patches.renesas/0535-gpio-rcar-Add-support-for-DT-IRQ-flags.patch
deleted file mode 100644
index 127726efb9806..0000000000000
--- a/patches.renesas/0535-gpio-rcar-Add-support-for-DT-IRQ-flags.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From e00eb44415d8245b445633c6e631fff77ed777d3 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 8 Jul 2014 12:46:46 +0200
-Subject: gpio: rcar: Add support for DT IRQ flags
-
-The gpio-rcar driver has no IRQ domain OF xlate function and thus
-ignores IRQ flags specified in DT. Fix this by using the two-cell xlate
-function.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit c058ee5a02c87710f3dc3831431abd1b9a58bd76)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpio/gpio-rcar.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
-index 0c9f803fc1ac..b6ae89ea8811 100644
---- a/drivers/gpio/gpio-rcar.c
-+++ b/drivers/gpio/gpio-rcar.c
-@@ -284,6 +284,7 @@ static int gpio_rcar_irq_domain_map(struct irq_domain *h, unsigned int irq,
-
- static struct irq_domain_ops gpio_rcar_irq_domain_ops = {
- .map = gpio_rcar_irq_domain_map,
-+ .xlate = irq_domain_xlate_twocell,
- };
-
- struct gpio_rcar_info {
---
-2.1.2
-
diff --git a/patches.renesas/0536-dmaengine-shdma-Enable-driver-compilation-with-COMPI.patch b/patches.renesas/0536-dmaengine-shdma-Enable-driver-compilation-with-COMPI.patch
deleted file mode 100644
index 93ae46152da05..0000000000000
--- a/patches.renesas/0536-dmaengine-shdma-Enable-driver-compilation-with-COMPI.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 134dde9d66ecdc8f446fe17b2b16df4875da611d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 13 May 2014 01:02:16 +0200
-Subject: dmaengine: shdma: Enable driver compilation with COMPILE_TEST
-
-This helps increasing build testing coverage.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Simon Horman <horms@verge.net.au>
-Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-(cherry picked from commit ebc6d2d9c8cd48c351da84dd467c0edddc149ded)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/dma/sh/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/dma/sh/Kconfig b/drivers/dma/sh/Kconfig
-index b4c813831006..0f719816c91b 100644
---- a/drivers/dma/sh/Kconfig
-+++ b/drivers/dma/sh/Kconfig
-@@ -4,7 +4,7 @@
-
- config SH_DMAE_BASE
- bool "Renesas SuperH DMA Engine support"
-- depends on (SUPERH && SH_DMA) || (ARM && ARCH_SHMOBILE)
-+ depends on (SUPERH && SH_DMA) || ARCH_SHMOBILE || COMPILE_TEST
- depends on !SH_DMA_API
- default y
- select DMA_ENGINE
---
-2.1.2
-
diff --git a/patches.renesas/0537-ARM-shmobile-r8a7790-Rename-VSP1_-SY-RT-clocks-to-VS.patch b/patches.renesas/0537-ARM-shmobile-r8a7790-Rename-VSP1_-SY-RT-clocks-to-VS.patch
deleted file mode 100644
index f2c0784e7bf4f..0000000000000
--- a/patches.renesas/0537-ARM-shmobile-r8a7790-Rename-VSP1_-SY-RT-clocks-to-VS.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 320aec7d7926cfbba1b254754890e7494b9acfe0 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 2 Apr 2014 16:31:46 +0200
-Subject: ARM: shmobile: r8a7790: Rename VSP1_(SY|RT) clocks to VSP1_(S|R)
-
-The r8a7790 has four VSP1 instances, two of them being named VSPS (which
-stands for "VSP Standard") and VSPR (which stands for "VSP for
-Resizing"). The clock section in the SoC datasheet misunderstood the
-abbreviations as meaning VSP System and VSP Realtime, and named the
-corresponding clocks VSP1(SY) and VSP1(RT). This mistake has been
-carried over to the kernel code.
-
-Fix this by renaming the VSP1_SY and VSP1_RT clocks to VSP1_S and VSP1_R.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 79ea9934b8df700fa306c8ced2d3bbf94ff276a8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 2 +-
- include/dt-bindings/clock/r8a7790-clock.h | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 618e5b537eaf..10b326bdf831 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -673,7 +673,7 @@
- renesas,clock-indices = <
- R8A7790_CLK_TMU1 R8A7790_CLK_TMU3 R8A7790_CLK_TMU2
- R8A7790_CLK_CMT0 R8A7790_CLK_TMU0 R8A7790_CLK_VSP1_DU1
-- R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_RT R8A7790_CLK_VSP1_SY
-+ R8A7790_CLK_VSP1_DU0 R8A7790_CLK_VSP1_R R8A7790_CLK_VSP1_S
- >;
- clock-output-names =
- "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
-diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
-index 6548a5fbcf4a..9a7c4c5a35d1 100644
---- a/include/dt-bindings/clock/r8a7790-clock.h
-+++ b/include/dt-bindings/clock/r8a7790-clock.h
-@@ -33,8 +33,8 @@
- #define R8A7790_CLK_TMU0 25
- #define R8A7790_CLK_VSP1_DU1 27
- #define R8A7790_CLK_VSP1_DU0 28
--#define R8A7790_CLK_VSP1_RT 30
--#define R8A7790_CLK_VSP1_SY 31
-+#define R8A7790_CLK_VSP1_R 30
-+#define R8A7790_CLK_VSP1_S 31
-
- /* MSTP2 */
- #define R8A7790_CLK_SCIFA2 2
---
-2.1.2
-
diff --git a/patches.renesas/0538-ARM-shmobile-r8a7791-Rename-VSP1_SY-clocks-to-VSP1_S.patch b/patches.renesas/0538-ARM-shmobile-r8a7791-Rename-VSP1_SY-clocks-to-VSP1_S.patch
deleted file mode 100644
index 13af4c00589e8..0000000000000
--- a/patches.renesas/0538-ARM-shmobile-r8a7791-Rename-VSP1_SY-clocks-to-VSP1_S.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 13a505c9d4cdf2ca84f7cfe90cfcd6ce80447807 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 2 Apr 2014 16:31:47 +0200
-Subject: ARM: shmobile: r8a7791: Rename VSP1_SY clocks to VSP1_S
-
-The r8a7791 has three VSP1 instances, one of them being named VSPS (which
-stands for "VSP Standard"). The clock section in the SoC datasheet
-misunderstood the abbreviation as meaning VSP System, and named the
-corresponding clock VSP1(SY). This mistake has been carried over to the
-kernel code.
-
-Fix this by renaming the VSP1_SY clock to VSP1_S.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 58ea1d53ba93620ac50fef9d9720b2323971f243)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 2 +-
- include/dt-bindings/clock/r8a7791-clock.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 46181708e59c..aa1cba94196c 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -688,7 +688,7 @@
- renesas,clock-indices = <
- R8A7791_CLK_TMU1 R8A7791_CLK_TMU3 R8A7791_CLK_TMU2
- R8A7791_CLK_CMT0 R8A7791_CLK_TMU0 R8A7791_CLK_VSP1_DU1
-- R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_SY
-+ R8A7791_CLK_VSP1_DU0 R8A7791_CLK_VSP1_S
- >;
- clock-output-names =
- "tmu1", "tmu3", "tmu2", "cmt0", "tmu0", "vsp1-du1",
-diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
-index 30f82f286e29..f069bc6627cb 100644
---- a/include/dt-bindings/clock/r8a7791-clock.h
-+++ b/include/dt-bindings/clock/r8a7791-clock.h
-@@ -32,7 +32,7 @@
- #define R8A7791_CLK_TMU0 25
- #define R8A7791_CLK_VSP1_DU1 27
- #define R8A7791_CLK_VSP1_DU0 28
--#define R8A7791_CLK_VSP1_SY 31
-+#define R8A7791_CLK_VSP1_S 31
-
- /* MSTP2 */
- #define R8A7791_CLK_SCIFA2 2
---
-2.1.2
-
diff --git a/patches.renesas/0539-ARM-shmobile-r8a7791-add-IIC0-1-clock-macros.patch b/patches.renesas/0539-ARM-shmobile-r8a7791-add-IIC0-1-clock-macros.patch
deleted file mode 100644
index b072247f0b353..0000000000000
--- a/patches.renesas/0539-ARM-shmobile-r8a7791-add-IIC0-1-clock-macros.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6aaa31b0f60651bc3cfcb698c371d8d455932371 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 10 Mar 2014 12:26:56 +0100
-Subject: ARM: shmobile: r8a7791: add IIC0/1 clock macros
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c6e8f325e769aabd059f8ff7d29e406345f83929)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/dt-bindings/clock/r8a7791-clock.h | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
-index f069bc6627cb..729dc5f07690 100644
---- a/include/dt-bindings/clock/r8a7791-clock.h
-+++ b/include/dt-bindings/clock/r8a7791-clock.h
-@@ -51,6 +51,8 @@
- #define R8A7791_CLK_SDHI1 12
- #define R8A7791_CLK_SDHI0 14
- #define R8A7791_CLK_MMCIF0 15
-+#define R8A7791_CLK_IIC0 18
-+#define R8A7791_CLK_IIC1 23
- #define R8A7791_CLK_SSUSB 28
- #define R8A7791_CLK_CMT1 29
- #define R8A7791_CLK_USBDMAC0 30
---
-2.1.2
-
diff --git a/patches.renesas/0540-ARM-shmobile-r8a7791-Add-EHCI-MSTP-clock.patch b/patches.renesas/0540-ARM-shmobile-r8a7791-Add-EHCI-MSTP-clock.patch
deleted file mode 100644
index f0a60605b1888..0000000000000
--- a/patches.renesas/0540-ARM-shmobile-r8a7791-Add-EHCI-MSTP-clock.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From c64860667520ab78e720a529b8e81478fff64262 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 7 Apr 2014 15:04:21 +0900
-Subject: ARM: shmobile: r8a7791: Add EHCI MSTP clock
-
-Add support for EHCI clock gating via the MSTP703 bit on r8a7791.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6225b99aa620d6e260228a30cc5d24cde60cb1e7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 6 +++---
- include/dt-bindings/clock/r8a7791-clock.h | 1 +
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index aa1cba94196c..52346051f6f9 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -733,19 +733,19 @@
- mstp7_clks: mstp7_clks@e615014c {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe615014c 0 4>, <0 0xe61501c4 0 4>;
-- clocks = <&mp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
-+ clocks = <&mp_clk>, <&mp_clk>, <&zs_clk>, <&p_clk>, <&p_clk>, <&zs_clk>,
- <&zs_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
- <&zx_clk>, <&zx_clk>, <&zx_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-- R8A7791_CLK_HSUSB R8A7791_CLK_HSCIF2 R8A7791_CLK_SCIF5
-+ R8A7791_CLK_EHCI R8A7791_CLK_HSUSB R8A7791_CLK_HSCIF2 R8A7791_CLK_SCIF5
- R8A7791_CLK_SCIF4 R8A7791_CLK_HSCIF1 R8A7791_CLK_HSCIF0
- R8A7791_CLK_SCIF3 R8A7791_CLK_SCIF2 R8A7791_CLK_SCIF1
- R8A7791_CLK_SCIF0 R8A7791_CLK_DU1 R8A7791_CLK_DU0
- R8A7791_CLK_LVDS0
- >;
- clock-output-names =
-- "hsusb", "hscif2", "scif5", "scif4", "hscif1", "hscif0",
-+ "ehci", "hsusb", "hscif2", "scif5", "scif4", "hscif1", "hscif0",
- "scif3", "scif2", "scif1", "scif0", "du1", "du0", "lvds0";
- };
- mstp8_clks: mstp8_clks@e6150990 {
-diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
-index 729dc5f07690..29b0f3355ffb 100644
---- a/include/dt-bindings/clock/r8a7791-clock.h
-+++ b/include/dt-bindings/clock/r8a7791-clock.h
-@@ -63,6 +63,7 @@
- #define R8A7791_CLK_PWM 23
-
- /* MSTP7 */
-+#define R8A7791_CLK_EHCI 3
- #define R8A7791_CLK_HSUSB 4
- #define R8A7791_CLK_HSCIF2 13
- #define R8A7791_CLK_SCIF5 14
---
-2.1.2
-
diff --git a/patches.renesas/0541-ARM-shmobile-r8a7790-add-IIC0-2-clock-macros.patch b/patches.renesas/0541-ARM-shmobile-r8a7790-add-IIC0-2-clock-macros.patch
deleted file mode 100644
index 6d51d2755ddb2..0000000000000
--- a/patches.renesas/0541-ARM-shmobile-r8a7790-add-IIC0-2-clock-macros.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From b14b2377113da68183b06b9d7948c4f48f57e921 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 11 Mar 2014 22:24:36 +0100
-Subject: ARM: shmobile: r8a7790: add IIC0-2 clock macros
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 01d968e905968602c4958c416cfed7ad84b7489f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/dt-bindings/clock/r8a7790-clock.h | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
-index 9a7c4c5a35d1..1118f7a4bca6 100644
---- a/include/dt-bindings/clock/r8a7790-clock.h
-+++ b/include/dt-bindings/clock/r8a7790-clock.h
-@@ -50,6 +50,7 @@
- #define R8A7790_CLK_SYS_DMAC0 19
-
- /* MSTP3 */
-+#define R8A7790_CLK_IIC2 0
- #define R8A7790_CLK_TPU0 4
- #define R8A7790_CLK_MMCIF1 5
- #define R8A7790_CLK_SDHI3 11
-@@ -57,6 +58,8 @@
- #define R8A7790_CLK_SDHI1 13
- #define R8A7790_CLK_SDHI0 14
- #define R8A7790_CLK_MMCIF0 15
-+#define R8A7790_CLK_IIC0 18
-+#define R8A7790_CLK_IIC1 23
- #define R8A7790_CLK_SSUSB 28
- #define R8A7790_CLK_CMT1 29
- #define R8A7790_CLK_USBDMAC0 30
---
-2.1.2
-
diff --git a/patches.renesas/0542-ARM-shmobile-r8a7791-Correct-SYS-DMAC-clock-defines.patch b/patches.renesas/0542-ARM-shmobile-r8a7791-Correct-SYS-DMAC-clock-defines.patch
deleted file mode 100644
index 12394dfb1a376..0000000000000
--- a/patches.renesas/0542-ARM-shmobile-r8a7791-Correct-SYS-DMAC-clock-defines.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From cef47a96f1c0f6cc6f031401c8af2e7ab8957e1c Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 12 May 2014 20:49:33 +0200
-Subject: ARM: shmobile: r8a7791: Correct SYS-DMAC clock defines
-
-R-Car M2 has two MSTP bits for SYS-DMAC, not one.
-Also bring the naming in sync with the documentation.
-
-This issue was introduced in v3.14, in commit
-4d8864c9e94ec727f1c675b9f6921525c360334b ("ARM: shmobile: r8a7791: Add
-clock index macros for DT sources").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a505daa501dc3f02b08d0b48b049bce719299b74)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/dt-bindings/clock/r8a7791-clock.h | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
-index 29b0f3355ffb..b050d18437ce 100644
---- a/include/dt-bindings/clock/r8a7791-clock.h
-+++ b/include/dt-bindings/clock/r8a7791-clock.h
-@@ -43,7 +43,8 @@
- #define R8A7791_CLK_SCIFB1 7
- #define R8A7791_CLK_MSIOF1 8
- #define R8A7791_CLK_SCIFB2 16
--#define R8A7791_CLK_DMAC 18
-+#define R8A7791_CLK_SYS_DMAC1 18
-+#define R8A7791_CLK_SYS_DMAC0 19
-
- /* MSTP3 */
- #define R8A7791_CLK_TPU0 4
---
-2.1.2
-
diff --git a/patches.renesas/0543-clk-shmobile-r8a7779-Add-clocks-support.patch b/patches.renesas/0543-clk-shmobile-r8a7779-Add-clocks-support.patch
deleted file mode 100644
index 9cd6720909726..0000000000000
--- a/patches.renesas/0543-clk-shmobile-r8a7779-Add-clocks-support.patch
+++ /dev/null
@@ -1,281 +0,0 @@
-From dd3719f6cdd6405fd9b9d508deeb62bb6e997636 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 18 Apr 2014 08:05:50 +0900
-Subject: clk: shmobile: r8a7779: Add clocks support
-
-The R8A7779 SoC has several clocks that are too custom to be supported in a
-generic driver. Those clocks are all fixed rate clocks with multiplier and
-divisor set according to boot mode configuration.
-
-Based on work for R-Car Gen2 SoCs by Laurent Pinchart.
-
-Cc: devicetree@vger.kernel.org
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 7b42a997bfb93c6ae0709f34ec8e2860757804b5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../bindings/clock/renesas,r8a7779-cpg-clocks.txt | 27 ++++
- drivers/clk/shmobile/Makefile | 1 +
- drivers/clk/shmobile/clk-r8a7779.c | 180 +++++++++++++++++++++
- include/linux/clk/shmobile.h | 3 +
- 4 files changed, 211 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt
- create mode 100644 drivers/clk/shmobile/clk-r8a7779.c
-
-diff --git a/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt
-new file mode 100644
-index 000000000000..ed3c8cb12f4e
---- /dev/null
-+++ b/Documentation/devicetree/bindings/clock/renesas,r8a7779-cpg-clocks.txt
-@@ -0,0 +1,27 @@
-+* Renesas R8A7779 Clock Pulse Generator (CPG)
-+
-+The CPG generates core clocks for the R8A7779. It includes one PLL and
-+several fixed ratio dividers
-+
-+Required Properties:
-+
-+ - compatible: Must be "renesas,r8a7779-cpg-clocks"
-+ - reg: Base address and length of the memory resource used by the CPG
-+
-+ - clocks: Reference to the parent clock
-+ - #clock-cells: Must be 1
-+ - clock-output-names: The names of the clocks. Supported clocks are "plla",
-+ "z", "zs", "s", "s1", "p", "b", "out".
-+
-+
-+Example
-+-------
-+
-+ cpg_clocks: cpg_clocks@ffc80000 {
-+ compatible = "renesas,r8a7779-cpg-clocks";
-+ reg = <0 0xffc80000 0 0x30>;
-+ clocks = <&extal_clk>;
-+ #clock-cells = <1>;
-+ clock-output-names = "plla", "z", "zs", "s", "s1", "p",
-+ "b", "out";
-+ };
-diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
-index 5404cb931ebf..bdf342daefa5 100644
---- a/drivers/clk/shmobile/Makefile
-+++ b/drivers/clk/shmobile/Makefile
-@@ -1,5 +1,6 @@
- obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o
- obj-$(CONFIG_ARCH_R7S72100) += clk-rz.o
-+obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o
- obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o
- obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o
- obj-$(CONFIG_ARCH_SHMOBILE_MULTI) += clk-div6.o
-diff --git a/drivers/clk/shmobile/clk-r8a7779.c b/drivers/clk/shmobile/clk-r8a7779.c
-new file mode 100644
-index 000000000000..652ecacb6daf
---- /dev/null
-+++ b/drivers/clk/shmobile/clk-r8a7779.c
-@@ -0,0 +1,180 @@
-+/*
-+ * r8a7779 Core CPG Clocks
-+ *
-+ * Copyright (C) 2013, 2014 Horms Solutions Ltd.
-+ *
-+ * Contact: Simon Horman <horms@verge.net.au>
-+ *
-+ * 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 of the License.
-+ */
-+
-+#include <linux/clk-provider.h>
-+#include <linux/clkdev.h>
-+#include <linux/clk/shmobile.h>
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/of.h>
-+#include <linux/of_address.h>
-+#include <linux/spinlock.h>
-+
-+#include <dt-bindings/clock/r8a7779-clock.h>
-+
-+#define CPG_NUM_CLOCKS (R8A7779_CLK_OUT + 1)
-+
-+struct r8a7779_cpg {
-+ struct clk_onecell_data data;
-+ spinlock_t lock;
-+ void __iomem *reg;
-+};
-+
-+/* -----------------------------------------------------------------------------
-+ * CPG Clock Data
-+ */
-+
-+/*
-+ * MD1 = 1 MD1 = 0
-+ * (PLLA = 1500) (PLLA = 1600)
-+ * (MHz) (MHz)
-+ *------------------------------------------------+--------------------
-+ * clkz 1000 (2/3) 800 (1/2)
-+ * clkzs 250 (1/6) 200 (1/8)
-+ * clki 750 (1/2) 800 (1/2)
-+ * clks 250 (1/6) 200 (1/8)
-+ * clks1 125 (1/12) 100 (1/16)
-+ * clks3 187.5 (1/8) 200 (1/8)
-+ * clks4 93.7 (1/16) 100 (1/16)
-+ * clkp 62.5 (1/24) 50 (1/32)
-+ * clkg 62.5 (1/24) 66.6 (1/24)
-+ * clkb, CLKOUT
-+ * (MD2 = 0) 62.5 (1/24) 66.6 (1/24)
-+ * (MD2 = 1) 41.6 (1/36) 50 (1/32)
-+ */
-+
-+#define CPG_CLK_CONFIG_INDEX(md) (((md) & (BIT(2)|BIT(1))) >> 1)
-+
-+struct cpg_clk_config {
-+ unsigned int z_mult;
-+ unsigned int z_div;
-+ unsigned int zs_and_s_div;
-+ unsigned int s1_div;
-+ unsigned int p_div;
-+ unsigned int b_and_out_div;
-+};
-+
-+static const struct cpg_clk_config cpg_clk_configs[4] __initconst = {
-+ { 1, 2, 8, 16, 32, 24 },
-+ { 2, 3, 6, 12, 24, 24 },
-+ { 1, 2, 8, 16, 32, 32 },
-+ { 2, 3, 6, 12, 24, 36 },
-+};
-+
-+/*
-+ * MD PLLA Ratio
-+ * 12 11
-+ *------------------------
-+ * 0 0 x42
-+ * 0 1 x48
-+ * 1 0 x56
-+ * 1 1 x64
-+ */
-+
-+#define CPG_PLLA_MULT_INDEX(md) (((md) & (BIT(12)|BIT(11))) >> 11)
-+
-+static const unsigned int cpg_plla_mult[4] __initconst = { 42, 48, 56, 64 };
-+
-+/* -----------------------------------------------------------------------------
-+ * Initialization
-+ */
-+
-+static u32 cpg_mode __initdata;
-+
-+static struct clk * __init
-+r8a7779_cpg_register_clock(struct device_node *np, struct r8a7779_cpg *cpg,
-+ const struct cpg_clk_config *config,
-+ unsigned int plla_mult, const char *name)
-+{
-+ const char *parent_name = "plla";
-+ unsigned int mult = 1;
-+ unsigned int div = 1;
-+
-+ if (!strcmp(name, "plla")) {
-+ parent_name = of_clk_get_parent_name(np, 0);
-+ mult = plla_mult;
-+ } else if (!strcmp(name, "z")) {
-+ div = config->z_div;
-+ mult = config->z_mult;
-+ } else if (!strcmp(name, "zs") || !strcmp(name, "s")) {
-+ div = config->zs_and_s_div;
-+ } else if (!strcmp(name, "s1")) {
-+ div = config->s1_div;
-+ } else if (!strcmp(name, "p")) {
-+ div = config->p_div;
-+ } else if (!strcmp(name, "b") || !strcmp(name, "out")) {
-+ div = config->b_and_out_div;
-+ } else {
-+ return ERR_PTR(-EINVAL);
-+ }
-+
-+ return clk_register_fixed_factor(NULL, name, parent_name, 0, mult, div);
-+}
-+
-+static void __init r8a7779_cpg_clocks_init(struct device_node *np)
-+{
-+ const struct cpg_clk_config *config;
-+ struct r8a7779_cpg *cpg;
-+ struct clk **clks;
-+ unsigned int i, plla_mult;
-+ int num_clks;
-+
-+ num_clks = of_property_count_strings(np, "clock-output-names");
-+ if (num_clks < 0) {
-+ pr_err("%s: failed to count clocks\n", __func__);
-+ return;
-+ }
-+
-+ cpg = kzalloc(sizeof(*cpg), GFP_KERNEL);
-+ clks = kzalloc(CPG_NUM_CLOCKS * sizeof(*clks), GFP_KERNEL);
-+ if (cpg == NULL || clks == NULL) {
-+ /* We're leaking memory on purpose, there's no point in cleaning
-+ * up as the system won't boot anyway.
-+ */
-+ return;
-+ }
-+
-+ spin_lock_init(&cpg->lock);
-+
-+ cpg->data.clks = clks;
-+ cpg->data.clk_num = num_clks;
-+
-+ config = &cpg_clk_configs[CPG_CLK_CONFIG_INDEX(cpg_mode)];
-+ plla_mult = cpg_plla_mult[CPG_PLLA_MULT_INDEX(cpg_mode)];
-+
-+ for (i = 0; i < num_clks; ++i) {
-+ const char *name;
-+ struct clk *clk;
-+
-+ of_property_read_string_index(np, "clock-output-names", i,
-+ &name);
-+
-+ clk = r8a7779_cpg_register_clock(np, cpg, config,
-+ plla_mult, name);
-+ if (IS_ERR(clk))
-+ pr_err("%s: failed to register %s %s clock (%ld)\n",
-+ __func__, np->name, name, PTR_ERR(clk));
-+ else
-+ cpg->data.clks[i] = clk;
-+ }
-+
-+ of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
-+}
-+CLK_OF_DECLARE(r8a7779_cpg_clks, "renesas,r8a7779-cpg-clocks",
-+ r8a7779_cpg_clocks_init);
-+
-+void __init r8a7779_clocks_init(u32 mode)
-+{
-+ cpg_mode = mode;
-+
-+ of_clk_init(NULL);
-+}
-diff --git a/include/linux/clk/shmobile.h b/include/linux/clk/shmobile.h
-index f9bf080a1123..9f8a14041dd5 100644
---- a/include/linux/clk/shmobile.h
-+++ b/include/linux/clk/shmobile.h
-@@ -1,7 +1,9 @@
- /*
- * Copyright 2013 Ideas On Board SPRL
-+ * Copyright 2013, 2014 Horms Solutions Ltd.
- *
- * Contact: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-+ * Contact: Simon Horman <horms@verge.net.au>
- *
- * 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
-@@ -14,6 +16,7 @@
-
- #include <linux/types.h>
-
-+void r8a7779_clocks_init(u32 mode);
- void rcar_gen2_clocks_init(u32 mode);
-
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0544-clk-shmobile-r8a7779-Add-MSTP-clock-support.patch b/patches.renesas/0544-clk-shmobile-r8a7779-Add-MSTP-clock-support.patch
deleted file mode 100644
index a38f6fbd9c387..0000000000000
--- a/patches.renesas/0544-clk-shmobile-r8a7779-Add-MSTP-clock-support.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From da3bebbe0cde7483fff2835efd717696f6df24ac Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 18 Apr 2014 08:05:51 +0900
-Subject: clk: shmobile: r8a7779: Add MSTP clock support
-
-Add MSTP clock support for the r8a7779 SoC
-
-The only change required appears to be to note a new
-compatibility string in the bindings.
-
-Cc: devicetree@vger.kernel.org
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 5483bf698f42a6f0467463b064084eb888298232)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-index 02a25d99ca61..30df825d72ef 100644
---- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-@@ -10,6 +10,7 @@ index in the group, from 0 to 31.
- Required Properties:
-
- - compatible: Must be one of the following
-+ - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
- - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks
- - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks
- - "renesas,cpg-mstp-clock" for generic MSTP gate clocks
---
-2.1.2
-
diff --git a/patches.renesas/0545-ARM-shmobile-r7s72100-document-MSTP-clock-support.patch b/patches.renesas/0545-ARM-shmobile-r7s72100-document-MSTP-clock-support.patch
deleted file mode 100644
index ff340d520b4e5..0000000000000
--- a/patches.renesas/0545-ARM-shmobile-r7s72100-document-MSTP-clock-support.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3d2e6c20afb88b755364bf5f76cc5797d8ae9f22 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:05 +0200
-Subject: ARM: shmobile: r7s72100: document MSTP clock support
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Mike Turquette <mturquette@linaro.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b557deadc5cca47aff93781b21fef468233c2ea8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
----
- Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-index 30df825d72ef..8a92b5fb3540 100644
---- a/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-+++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mstp-clocks.txt
-@@ -10,6 +10,7 @@ index in the group, from 0 to 31.
- Required Properties:
-
- - compatible: Must be one of the following
-+ - "renesas,r7s72100-mstp-clocks" for R7S72100 (RZ) MSTP gate clocks
- - "renesas,r8a7779-mstp-clocks" for R8A7779 (R-Car H1) MSTP gate clocks
- - "renesas,r8a7790-mstp-clocks" for R8A7790 (R-Car H2) MSTP gate clocks
- - "renesas,r8a7791-mstp-clocks" for R8A7791 (R-Car M2) MSTP gate clocks
---
-2.1.2
-
diff --git a/patches.renesas/0546-clk-shmobile-mstp-Fix-the-is_enabled-operation.patch b/patches.renesas/0546-clk-shmobile-mstp-Fix-the-is_enabled-operation.patch
deleted file mode 100644
index 9ec138148c71e..0000000000000
--- a/patches.renesas/0546-clk-shmobile-mstp-Fix-the-is_enabled-operation.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From cdea2a78adecef5205453c59408bb43d714c974e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 22 May 2014 20:02:14 +0200
-Subject: clk: shmobile: mstp: Fix the is_enabled() operation
-
-The MSTP[SC]R registers have clock stop bits, not clock enable bits. The
-bit value should thus be inverted in the is_enabled() operation.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit bb178da701382a230e26d90cf94e8a24b280e0d9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clk/shmobile/clk-mstp.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/clk/shmobile/clk-mstp.c b/drivers/clk/shmobile/clk-mstp.c
-index 1f6324e29a80..2d2fe773ac81 100644
---- a/drivers/clk/shmobile/clk-mstp.c
-+++ b/drivers/clk/shmobile/clk-mstp.c
-@@ -112,7 +112,7 @@ static int cpg_mstp_clock_is_enabled(struct clk_hw *hw)
- else
- value = clk_readl(group->smstpcr);
-
-- return !!(value & BIT(clock->bit_index));
-+ return !(value & BIT(clock->bit_index));
- }
-
- static const struct clk_ops cpg_mstp_clock_ops = {
---
-2.1.2
-
diff --git a/patches.renesas/0547-clk-shmobile-Add-R8A7740-specific-clock-support.patch b/patches.renesas/0547-clk-shmobile-Add-R8A7740-specific-clock-support.patch
deleted file mode 100644
index 7aa84e8f75674..0000000000000
--- a/patches.renesas/0547-clk-shmobile-Add-R8A7740-specific-clock-support.patch
+++ /dev/null
@@ -1,288 +0,0 @@
-From 52376b3dbf6d3143a21dfa7eddb0f3905959b9d7 Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <ulrich.hecht@gmail.com>
-Date: Fri, 23 May 2014 15:27:15 +0200
-Subject: clk: shmobile: Add R8A7740-specific clock support
-
-Driver for the R8A7740's clocks that are too specific to be supported by a
-generic driver.
-
-Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit 1923ca92a618b6107d3a44b5c9f9360b104dcddb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../bindings/clock/renesas,r8a7740-cpg-clocks.txt | 41 +++++
- drivers/clk/shmobile/Makefile | 1 +
- drivers/clk/shmobile/clk-r8a7740.c | 199 +++++++++++++++++++++
- 3 files changed, 241 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt
- create mode 100644 drivers/clk/shmobile/clk-r8a7740.c
-
-diff --git a/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt b/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt
-new file mode 100644
-index 000000000000..2c03302f86ed
---- /dev/null
-+++ b/Documentation/devicetree/bindings/clock/renesas,r8a7740-cpg-clocks.txt
-@@ -0,0 +1,41 @@
-+These bindings should be considered EXPERIMENTAL for now.
-+
-+* Renesas R8A7740 Clock Pulse Generator (CPG)
-+
-+The CPG generates core clocks for the R8A7740 SoC. It includes three PLLs
-+and several fixed ratio and variable ratio dividers.
-+
-+Required Properties:
-+
-+ - compatible: Must be "renesas,r8a7740-cpg-clocks"
-+
-+ - reg: Base address and length of the memory resource used by the CPG
-+
-+ - clocks: Reference to the three parent clocks
-+ - #clock-cells: Must be 1
-+ - clock-output-names: The names of the clocks. Supported clocks are
-+ "system", "pllc0", "pllc1", "pllc2", "r", "usb24s", "i", "zg", "b",
-+ "m1", "hp", "hpp", "usbp", "s", "zb", "m3", and "cp".
-+
-+ - renesas,mode: board-specific settings of the MD_CK* bits
-+
-+
-+Example
-+-------
-+
-+cpg_clocks: cpg_clocks@e6150000 {
-+ compatible = "renesas,r8a7740-cpg-clocks";
-+ reg = <0xe6150000 0x10000>;
-+ clocks = <&extal1_clk>, <&extal2_clk>, <&extalr_clk>;
-+ #clock-cells = <1>;
-+ clock-output-names = "system", "pllc0", "pllc1",
-+ "pllc2", "r",
-+ "usb24s",
-+ "i", "zg", "b", "m1", "hp",
-+ "hpp", "usbp", "s", "zb", "m3",
-+ "cp";
-+};
-+
-+&cpg_clocks {
-+ renesas,mode = <0x05>;
-+};
-diff --git a/drivers/clk/shmobile/Makefile b/drivers/clk/shmobile/Makefile
-index bdf342daefa5..e0029237827a 100644
---- a/drivers/clk/shmobile/Makefile
-+++ b/drivers/clk/shmobile/Makefile
-@@ -1,5 +1,6 @@
- obj-$(CONFIG_ARCH_EMEV2) += clk-emev2.o
- obj-$(CONFIG_ARCH_R7S72100) += clk-rz.o
-+obj-$(CONFIG_ARCH_R8A7740) += clk-r8a7740.o
- obj-$(CONFIG_ARCH_R8A7779) += clk-r8a7779.o
- obj-$(CONFIG_ARCH_R8A7790) += clk-rcar-gen2.o
- obj-$(CONFIG_ARCH_R8A7791) += clk-rcar-gen2.o
-diff --git a/drivers/clk/shmobile/clk-r8a7740.c b/drivers/clk/shmobile/clk-r8a7740.c
-new file mode 100644
-index 000000000000..1e2eaae21e01
---- /dev/null
-+++ b/drivers/clk/shmobile/clk-r8a7740.c
-@@ -0,0 +1,199 @@
-+/*
-+ * r8a7740 Core CPG Clocks
-+ *
-+ * Copyright (C) 2014 Ulrich Hecht
-+ *
-+ * 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 of the License.
-+ */
-+
-+#include <linux/clk-provider.h>
-+#include <linux/clkdev.h>
-+#include <linux/clk/shmobile.h>
-+#include <linux/init.h>
-+#include <linux/kernel.h>
-+#include <linux/of.h>
-+#include <linux/of_address.h>
-+#include <linux/spinlock.h>
-+
-+struct r8a7740_cpg {
-+ struct clk_onecell_data data;
-+ spinlock_t lock;
-+ void __iomem *reg;
-+};
-+
-+#define CPG_FRQCRA 0x00
-+#define CPG_FRQCRB 0x04
-+#define CPG_PLLC2CR 0x2c
-+#define CPG_USBCKCR 0x8c
-+#define CPG_FRQCRC 0xe0
-+
-+#define CLK_ENABLE_ON_INIT BIT(0)
-+
-+struct div4_clk {
-+ const char *name;
-+ unsigned int reg;
-+ unsigned int shift;
-+ int flags;
-+};
-+
-+static struct div4_clk div4_clks[] = {
-+ { "i", CPG_FRQCRA, 20, CLK_ENABLE_ON_INIT },
-+ { "zg", CPG_FRQCRA, 16, CLK_ENABLE_ON_INIT },
-+ { "b", CPG_FRQCRA, 8, CLK_ENABLE_ON_INIT },
-+ { "m1", CPG_FRQCRA, 4, CLK_ENABLE_ON_INIT },
-+ { "hp", CPG_FRQCRB, 4, 0 },
-+ { "hpp", CPG_FRQCRC, 20, 0 },
-+ { "usbp", CPG_FRQCRC, 16, 0 },
-+ { "s", CPG_FRQCRC, 12, 0 },
-+ { "zb", CPG_FRQCRC, 8, 0 },
-+ { "m3", CPG_FRQCRC, 4, 0 },
-+ { "cp", CPG_FRQCRC, 0, 0 },
-+ { NULL, 0, 0, 0 },
-+};
-+
-+static const struct clk_div_table div4_div_table[] = {
-+ { 0, 2 }, { 1, 3 }, { 2, 4 }, { 3, 6 }, { 4, 8 }, { 5, 12 },
-+ { 6, 16 }, { 7, 18 }, { 8, 24 }, { 9, 32 }, { 10, 36 }, { 11, 48 },
-+ { 13, 72 }, { 14, 96 }, { 0, 0 }
-+};
-+
-+static u32 cpg_mode __initdata;
-+
-+static struct clk * __init
-+r8a7740_cpg_register_clock(struct device_node *np, struct r8a7740_cpg *cpg,
-+ const char *name)
-+{
-+ const struct clk_div_table *table = NULL;
-+ const char *parent_name;
-+ unsigned int shift, reg;
-+ unsigned int mult = 1;
-+ unsigned int div = 1;
-+
-+ if (!strcmp(name, "r")) {
-+ switch (cpg_mode & (BIT(2) | BIT(1))) {
-+ case BIT(1) | BIT(2):
-+ /* extal1 */
-+ parent_name = of_clk_get_parent_name(np, 0);
-+ div = 2048;
-+ break;
-+ case BIT(2):
-+ /* extal1 */
-+ parent_name = of_clk_get_parent_name(np, 0);
-+ div = 1024;
-+ break;
-+ default:
-+ /* extalr */
-+ parent_name = of_clk_get_parent_name(np, 2);
-+ break;
-+ }
-+ } else if (!strcmp(name, "system")) {
-+ parent_name = of_clk_get_parent_name(np, 0);
-+ if (cpg_mode & BIT(1))
-+ div = 2;
-+ } else if (!strcmp(name, "pllc0")) {
-+ /* PLLC0/1 are configurable multiplier clocks. Register them as
-+ * fixed factor clocks for now as there's no generic multiplier
-+ * clock implementation and we currently have no need to change
-+ * the multiplier value.
-+ */
-+ u32 value = clk_readl(cpg->reg + CPG_FRQCRC);
-+ parent_name = "system";
-+ mult = ((value >> 24) & 0x7f) + 1;
-+ } else if (!strcmp(name, "pllc1")) {
-+ u32 value = clk_readl(cpg->reg + CPG_FRQCRA);
-+ parent_name = "system";
-+ mult = ((value >> 24) & 0x7f) + 1;
-+ div = 2;
-+ } else if (!strcmp(name, "pllc2")) {
-+ u32 value = clk_readl(cpg->reg + CPG_PLLC2CR);
-+ parent_name = "system";
-+ mult = ((value >> 24) & 0x3f) + 1;
-+ } else if (!strcmp(name, "usb24s")) {
-+ u32 value = clk_readl(cpg->reg + CPG_USBCKCR);
-+ if (value & BIT(7))
-+ /* extal2 */
-+ parent_name = of_clk_get_parent_name(np, 1);
-+ else
-+ parent_name = "system";
-+ if (!(value & BIT(6)))
-+ div = 2;
-+ } else {
-+ struct div4_clk *c;
-+ for (c = div4_clks; c->name; c++) {
-+ if (!strcmp(name, c->name)) {
-+ parent_name = "pllc1";
-+ table = div4_div_table;
-+ reg = c->reg;
-+ shift = c->shift;
-+ break;
-+ }
-+ }
-+ if (!c->name)
-+ return ERR_PTR(-EINVAL);
-+ }
-+
-+ if (!table) {
-+ return clk_register_fixed_factor(NULL, name, parent_name, 0,
-+ mult, div);
-+ } else {
-+ return clk_register_divider_table(NULL, name, parent_name, 0,
-+ cpg->reg + reg, shift, 4, 0,
-+ table, &cpg->lock);
-+ }
-+}
-+
-+static void __init r8a7740_cpg_clocks_init(struct device_node *np)
-+{
-+ struct r8a7740_cpg *cpg;
-+ struct clk **clks;
-+ unsigned int i;
-+ int num_clks;
-+
-+ if (of_property_read_u32(np, "renesas,mode", &cpg_mode))
-+ pr_warn("%s: missing renesas,mode property\n", __func__);
-+
-+ num_clks = of_property_count_strings(np, "clock-output-names");
-+ if (num_clks < 0) {
-+ pr_err("%s: failed to count clocks\n", __func__);
-+ return;
-+ }
-+
-+ cpg = kzalloc(sizeof(*cpg), GFP_KERNEL);
-+ clks = kzalloc(num_clks * sizeof(*clks), GFP_KERNEL);
-+ if (cpg == NULL || clks == NULL) {
-+ /* We're leaking memory on purpose, there's no point in cleaning
-+ * up as the system won't boot anyway.
-+ */
-+ return;
-+ }
-+
-+ spin_lock_init(&cpg->lock);
-+
-+ cpg->data.clks = clks;
-+ cpg->data.clk_num = num_clks;
-+
-+ cpg->reg = of_iomap(np, 0);
-+ if (WARN_ON(cpg->reg == NULL))
-+ return;
-+
-+ for (i = 0; i < num_clks; ++i) {
-+ const char *name;
-+ struct clk *clk;
-+
-+ of_property_read_string_index(np, "clock-output-names", i,
-+ &name);
-+
-+ clk = r8a7740_cpg_register_clock(np, cpg, name);
-+ if (IS_ERR(clk))
-+ pr_err("%s: failed to register %s %s clock (%ld)\n",
-+ __func__, np->name, name, PTR_ERR(clk));
-+ else
-+ cpg->data.clks[i] = clk;
-+ }
-+
-+ of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
-+}
-+CLK_OF_DECLARE(r8a7740_cpg_clks, "renesas,r8a7740-cpg-clocks",
-+ r8a7740_cpg_clocks_init);
---
-2.1.2
-
diff --git a/patches.renesas/0548-ARM-shmobile-armadillo800eva-Spelling-and-grammar.patch b/patches.renesas/0548-ARM-shmobile-armadillo800eva-Spelling-and-grammar.patch
deleted file mode 100644
index 57e7f9aaf7f05..0000000000000
--- a/patches.renesas/0548-ARM-shmobile-armadillo800eva-Spelling-and-grammar.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 0bcf3166388a4053a04ef66dbeac4779536e1822 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 18 Mar 2014 10:39:23 +0100
-Subject: ARM: shmobile: armadillo800eva: Spelling and grammar
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1668a7a699f8c96bc99a50e94aadfe328adf9b76)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index c655ec642d6c..232d1a051f07 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -205,8 +205,8 @@ config MACH_ARMADILLO800EVA_REFERENCE
- select SND_SOC_WM8978 if SND_SIMPLE_CARD
- select USE_OF
- ---help---
-- Use reference implementation of Aramdillo800 EVA board support
-- which makes a greater use of device tree at the expense
-+ Use reference implementation of Armadillo800 EVA board support
-+ which makes greater use of device tree at the expense
- of not supporting a number of devices.
-
- This is intended to aid developers
---
-2.1.2
-
diff --git a/patches.renesas/0549-ARM-shmobile-multiplatform-Enable-MSIOF-in-defconfig.patch b/patches.renesas/0549-ARM-shmobile-multiplatform-Enable-MSIOF-in-defconfig.patch
deleted file mode 100644
index 8689ce4a63048..0000000000000
--- a/patches.renesas/0549-ARM-shmobile-multiplatform-Enable-MSIOF-in-defconfig.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From dec7f01dd1fd1abec46f086a2a0dc5fa10b355b7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:19 +0100
-Subject: ARM: shmobile: multiplatform: Enable MSIOF in defconfig
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d477a4a2fcbf59feb617de9502ae8b862e1578ed)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 83b07258a385..2a27d4622cc9 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -78,6 +78,7 @@ CONFIG_I2C_GPIO=y
- CONFIG_I2C_RCAR=y
- CONFIG_SPI=y
- CONFIG_SPI_RSPI=y
-+CONFIG_SPI_SH_MSIOF=y
- CONFIG_GPIO_EM=y
- CONFIG_GPIO_RCAR=y
- # CONFIG_HWMON is not set
---
-2.1.2
-
diff --git a/patches.renesas/0550-ARM-shmobile-Include-i2c-shmobile.c-in-shmobile_defc.patch b/patches.renesas/0550-ARM-shmobile-Include-i2c-shmobile.c-in-shmobile_defc.patch
deleted file mode 100644
index d2ab5c8b085ac..0000000000000
--- a/patches.renesas/0550-ARM-shmobile-Include-i2c-shmobile.c-in-shmobile_defc.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From f90b7b05b06859429b0bc3c6187c3390acfaa574 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 26 Mar 2014 14:16:19 +0900
-Subject: ARM: shmobile: Include i2c-shmobile.c in shmobile_defconfig
-
-Many SoCs include I2C controller instances compatible with
-the i2c-shmobile.c driver. To increase hardware support enable
-the driver in the shmobile_defconfig multiplatform configuration.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Wolfram Sang <wsa@the-dreams.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c2e90c4b7c15fbb2215b47a23b446ba53e6dbf59)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 2a27d4622cc9..d96133a686e5 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -75,6 +75,7 @@ CONFIG_SERIAL_SH_SCI=y
- CONFIG_SERIAL_SH_SCI_NR_UARTS=20
- CONFIG_SERIAL_SH_SCI_CONSOLE=y
- CONFIG_I2C_GPIO=y
-+CONFIG_I2C_SH_MOBILE=y
- CONFIG_I2C_RCAR=y
- CONFIG_SPI=y
- CONFIG_SPI_RSPI=y
---
-2.1.2
-
diff --git a/patches.renesas/0551-ARM-shmobile-Include-at24.c-in-shmobile_defconfig.patch b/patches.renesas/0551-ARM-shmobile-Include-at24.c-in-shmobile_defconfig.patch
deleted file mode 100644
index 17097afa0f1b0..0000000000000
--- a/patches.renesas/0551-ARM-shmobile-Include-at24.c-in-shmobile_defconfig.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 461799c5eb4015868179d16eb2ff542fa1f7a028 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 26 Mar 2014 14:19:11 +0900
-Subject: ARM: shmobile: Include at24.c in shmobile_defconfig
-
-The Koelsch board includes an at24-compatible EEPROM hooked up via I2C.
-To increase hardware support enable the driver in the shmobile_defconfig
-multiplatform configuration.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Wolfram Sang <wsa@the-dreams.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f5e1367f8f94293f098cab3e906934e535df1a94)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index d96133a686e5..146ee70dd459 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -43,6 +43,7 @@ CONFIG_DEVTMPFS=y
- CONFIG_DEVTMPFS_MOUNT=y
- CONFIG_MTD=y
- CONFIG_MTD_M25P80=y
-+CONFIG_EEPROM_AT24=y
- CONFIG_BLK_DEV_SD=y
- CONFIG_ATA=y
- CONFIG_SATA_RCAR=y
---
-2.1.2
-
diff --git a/patches.renesas/0552-ARM-shmobile-Enable-USBHS-gadget-support-in-shmobile.patch b/patches.renesas/0552-ARM-shmobile-Enable-USBHS-gadget-support-in-shmobile.patch
deleted file mode 100644
index 98e39da83b885..0000000000000
--- a/patches.renesas/0552-ARM-shmobile-Enable-USBHS-gadget-support-in-shmobile.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 1c8f83a3cd747c2a513ff2b26e3f67d813bd9a91 Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <ulrich.hecht@gmail.com>
-Date: Fri, 28 Mar 2014 17:54:01 +0100
-Subject: ARM: shmobile: Enable USBHS gadget support in shmobile_defconfig
-
-The renesas_usbhs driver provides USB gadget support for most Renesas
-platforms. To increase hardware support enable the driver in the
-shmobile_defconfig multiplatform configuration.
-
-Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 41551f3d7d9a37b55a6f84d77200bfe29d42c466)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 146ee70dd459..c10e626e8510 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -103,7 +103,11 @@ CONFIG_SOUND=y
- CONFIG_SND=y
- CONFIG_SND_SOC=y
- CONFIG_SND_SOC_RCAR=y
-+CONFIG_USB=y
- CONFIG_USB_RCAR_GEN2_PHY=y
-+CONFIG_USB_RENESAS_USBHS=y
-+CONFIG_USB_GADGET=y
-+CONFIG_USB_RENESAS_USBHS_UDC=y
- CONFIG_MMC=y
- CONFIG_MMC_SDHI=y
- CONFIG_MMC_SH_MMCIF=y
---
-2.1.2
-
diff --git a/patches.renesas/0553-ARM-shmobile-Enable-HIGHMEM-in-shmobile_defconfig.patch b/patches.renesas/0553-ARM-shmobile-Enable-HIGHMEM-in-shmobile_defconfig.patch
deleted file mode 100644
index fff3c20052d36..0000000000000
--- a/patches.renesas/0553-ARM-shmobile-Enable-HIGHMEM-in-shmobile_defconfig.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From db067a27fd06c6f1432762c8207502ca62e04f1b Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 2 Apr 2014 18:06:24 +0900
-Subject: ARM: shmobile: Enable HIGHMEM in shmobile_defconfig
-
-Many mach-shmobile hardware platforms include support for more
-than 1GiB of RAM. Enable HIGHMEM by default to allow use of
-larger amounts of memory.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 667d0f7b0e940bf36e8d12bd7d64aa0f9217b3ac)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index c10e626e8510..b73a0380bb03 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -25,6 +25,7 @@ CONFIG_SCHED_MC=y
- CONFIG_HAVE_ARM_ARCH_TIMER=y
- CONFIG_NR_CPUS=8
- CONFIG_AEABI=y
-+CONFIG_HIGHMEM=y
- CONFIG_ZBOOT_ROM_TEXT=0x0
- CONFIG_ZBOOT_ROM_BSS=0x0
- CONFIG_ARM_APPENDED_DTB=y
---
-2.1.2
-
diff --git a/patches.renesas/0554-ARM-shmobile-Enable-VSP1-in-shmobile_defconfig.patch b/patches.renesas/0554-ARM-shmobile-Enable-VSP1-in-shmobile_defconfig.patch
deleted file mode 100644
index 6521d46091725..0000000000000
--- a/patches.renesas/0554-ARM-shmobile-Enable-VSP1-in-shmobile_defconfig.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From f6fe435a21eb3defcf8f6843983fb285358386ee Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Tue, 8 Apr 2014 21:37:58 +0900
-Subject: ARM: shmobile: Enable VSP1 in shmobile_defconfig
-
-Both r8a7790 and r8a7791 have multiple on-chip VSP1 devices, so
-enable the VSP1 driver by default in the shmobile_defconfig.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e4224fe8bfd955d1aea5f89f2f3ac38dc4a590fc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index b73a0380bb03..8fb30b09f960 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -92,10 +92,14 @@ CONFIG_REGULATOR_FIXED_VOLTAGE=y
- CONFIG_REGULATOR_GPIO=y
- CONFIG_MEDIA_SUPPORT=y
- CONFIG_MEDIA_CAMERA_SUPPORT=y
-+CONFIG_MEDIA_CONTROLLER=y
-+CONFIG_VIDEO_V4L2_SUBDEV_API=y
- CONFIG_V4L_PLATFORM_DRIVERS=y
- CONFIG_SOC_CAMERA=y
- CONFIG_SOC_CAMERA_PLATFORM=y
- CONFIG_VIDEO_RCAR_VIN=y
-+CONFIG_V4L_MEM2MEM_DRIVERS=y
-+CONFIG_VIDEO_RENESAS_VSP1=y
- # CONFIG_MEDIA_SUBDRV_AUTOSELECT is not set
- CONFIG_VIDEO_ADV7180=y
- CONFIG_DRM=y
---
-2.1.2
-
diff --git a/patches.renesas/0555-ARM-shmobile-Enable-USB-EO-HCI-HCD-support-in-shmobi.patch b/patches.renesas/0555-ARM-shmobile-Enable-USB-EO-HCI-HCD-support-in-shmobi.patch
deleted file mode 100644
index 731ead0f848ec..0000000000000
--- a/patches.renesas/0555-ARM-shmobile-Enable-USB-EO-HCI-HCD-support-in-shmobi.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 84557bdec628d20185bed2b31016fe60ace95908 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 10 Apr 2014 16:12:45 +0900
-Subject: ARM: shmobile: Enable USB [EO]HCI HCD support in shmobile_defconfig
-
-The USB [EO]HCI HCD drivers provide USB host support for Renesas
-R-Car Gen2 platforms. To increase hardware support enable the driver in the
-shmobile_defconfig multiplatform configuration.
-
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1d59eb190e3dc575c7bbee4a163c3facd0de2ed9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 8fb30b09f960..6d6437cbbc52 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -110,6 +110,8 @@ CONFIG_SND_SOC=y
- CONFIG_SND_SOC_RCAR=y
- CONFIG_USB=y
- CONFIG_USB_RCAR_GEN2_PHY=y
-+CONFIG_USB_EHCI_HCD=y
-+CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_RENESAS_USBHS=y
- CONFIG_USB_GADGET=y
- CONFIG_USB_RENESAS_USBHS_UDC=y
---
-2.1.2
-
diff --git a/patches.renesas/0556-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-C.patch b/patches.renesas/0556-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-C.patch
deleted file mode 100644
index 7c393127e5fa8..0000000000000
--- a/patches.renesas/0556-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-C.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 7921fc7ce52297a1672943a5e13ba2846b235aef Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 6 Mar 2014 12:16:58 +0900
-Subject: ARM: shmobile: Update r8a7791 CPU freq to 1500MHz in C
-
-The correct maximum CPU frequency for r8a7791 is 1500 MHz
-so update the r8a7791 SoC C code to reflect this.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ce4b6a04c49b0b414d537b45ededd9dfd4e48336)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index e28404e43860..a7e4966f5e18 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -213,7 +213,7 @@ void __init r8a7791_add_standard_devices(void)
- void __init r8a7791_init_early(void)
- {
- #ifndef CONFIG_ARM_ARCH_TIMER
-- shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
-+ shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
- #endif
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0557-ARM-shmobile-Add-shared-shmobile_init_delay.patch b/patches.renesas/0557-ARM-shmobile-Add-shared-shmobile_init_delay.patch
deleted file mode 100644
index 03667fb6e9158..0000000000000
--- a/patches.renesas/0557-ARM-shmobile-Add-shared-shmobile_init_delay.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 1b5975c8593b8f8cefbdccd4c2a1268a3aec1ae8 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 6 Mar 2014 12:28:24 +0900
-Subject: ARM: shmobile: Add shared shmobile_init_delay()
-
-Introduce shmobile_init_delay() that gets CPU specific
-parameters from DT and sets up the early delay from
-there. This allows us to both remove frequency information
-from the C code and consolidate existing code.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c39dae380b4a11f1050a2ef6607598dcbe0541be)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/common.h | 1 +
- arch/arm/mach-shmobile/timer.c | 28 ++++++++++++++++++++++++++++
- 2 files changed, 29 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
-index cb8e32deb2a3..f7a360edcc35 100644
---- a/arch/arm/mach-shmobile/include/mach/common.h
-+++ b/arch/arm/mach-shmobile/include/mach/common.h
-@@ -4,6 +4,7 @@
- extern void shmobile_earlytimer_init(void);
- extern void shmobile_setup_delay(unsigned int max_cpu_core_mhz,
- unsigned int mult, unsigned int div);
-+extern void shmobile_init_delay(void);
- struct twd_local_timer;
- extern void shmobile_setup_console(void);
- extern void shmobile_boot_vector(void);
-diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
-index 62d7052d6f21..ccecde9a3362 100644
---- a/arch/arm/mach-shmobile/timer.c
-+++ b/arch/arm/mach-shmobile/timer.c
-@@ -21,6 +21,7 @@
- #include <linux/platform_device.h>
- #include <linux/clocksource.h>
- #include <linux/delay.h>
-+#include <linux/of_address.h>
-
- void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
- unsigned int mult, unsigned int div)
-@@ -39,6 +40,33 @@ void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
- preset_lpj = max_cpu_core_mhz * value;
- }
-
-+void __init shmobile_init_delay(void)
-+{
-+ struct device_node *np, *parent;
-+ u32 max_freq, freq;
-+
-+ max_freq = 0;
-+
-+ parent = of_find_node_by_path("/cpus");
-+ if (parent) {
-+ for_each_child_of_node(parent, np) {
-+ if (!of_property_read_u32(np, "clock-frequency", &freq))
-+ max_freq = max(max_freq, freq);
-+ }
-+ of_node_put(parent);
-+ }
-+
-+ if (max_freq) {
-+ if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8"))
-+ shmobile_setup_delay(max_freq, 1, 3);
-+ else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
-+ shmobile_setup_delay(max_freq, 1, 3);
-+ else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15"))
-+ if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
-+ shmobile_setup_delay(max_freq, 2, 4);
-+ }
-+}
-+
- static void __init shmobile_late_time_init(void)
- {
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0558-ARM-shmobile-Remove-legacy-EMEV2-SoC-support.patch b/patches.renesas/0558-ARM-shmobile-Remove-legacy-EMEV2-SoC-support.patch
deleted file mode 100644
index d7d55065f5879..0000000000000
--- a/patches.renesas/0558-ARM-shmobile-Remove-legacy-EMEV2-SoC-support.patch
+++ /dev/null
@@ -1,338 +0,0 @@
-From 0d5897cc9a1151617dc32b090b5d773c7317d20c Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 13 Feb 2014 17:26:08 +0900
-Subject: ARM: shmobile: Remove legacy EMEV2 SoC support
-
-Get rid of legacy EMEV2 SoC code including the legacy clock
-framework implementation. The multiplatform implementation
-together with DT board support shall be used instead.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 094c62c3313e1a1c7929a2f69c07ba3382c358e4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/Makefile | 3 +-
- arch/arm/mach-shmobile/Kconfig | 10 --
- arch/arm/mach-shmobile/Makefile | 1 -
- arch/arm/mach-shmobile/clock-emev2.c | 231 ----------------------------
- arch/arm/mach-shmobile/include/mach/emev2.h | 1 -
- arch/arm/mach-shmobile/setup-emev2.c | 4 -
- 6 files changed, 1 insertion(+), 249 deletions(-)
- delete mode 100644 arch/arm/mach-shmobile/clock-emev2.c
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 032030361bef..41927cc4b0ee 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -244,8 +244,7 @@ dtb-$(CONFIG_ARCH_U8500) += ste-snowball.dtb \
- dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
- dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
- s3c6410-smdk6410.dtb
--dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += emev2-kzm9d.dtb \
-- r7s72100-genmai.dtb \
-+dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
- r7s72100-genmai-reference.dtb \
- r8a7740-armadillo800eva.dtb \
- r8a7778-bockw.dtb \
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 232d1a051f07..d833fa4ea883 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -140,16 +140,6 @@ config ARCH_R8A7791
- select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
- select SYS_SUPPORTS_SH_CMT
-
--config ARCH_EMEV2
-- bool "Emma Mobile EV2"
-- select ARCH_WANT_OPTIONAL_GPIOLIB
-- select ARM_GIC
-- select CPU_V7
-- select MIGHT_HAVE_PCI
-- select USE_OF
-- select AUTO_ZRELADDR
-- select SYS_SUPPORTS_EM_STI
--
- config ARCH_R7S72100
- bool "RZ/A1H (R7S72100)"
- select ARCH_WANT_OPTIONAL_GPIOLIB
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 4caffc912a81..76053770aa04 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -31,7 +31,6 @@ obj-$(CONFIG_ARCH_R8A7778) += clock-r8a7778.o
- obj-$(CONFIG_ARCH_R8A7779) += clock-r8a7779.o
- obj-$(CONFIG_ARCH_R8A7790) += clock-r8a7790.o
- obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o
--obj-$(CONFIG_ARCH_EMEV2) += clock-emev2.o
- obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o
- endif
-
-diff --git a/arch/arm/mach-shmobile/clock-emev2.c b/arch/arm/mach-shmobile/clock-emev2.c
-deleted file mode 100644
-index 5ac13ba71d54..000000000000
---- a/arch/arm/mach-shmobile/clock-emev2.c
-+++ /dev/null
-@@ -1,231 +0,0 @@
--/*
-- * Emma Mobile EV2 clock framework support
-- *
-- * Copyright (C) 2012 Magnus Damm
-- *
-- * 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 of the License.
-- *
-- * 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 St, Fifth Floor, Boston, MA 02110-1301 USA
-- */
--#include <linux/init.h>
--#include <linux/kernel.h>
--#include <linux/io.h>
--#include <linux/sh_clk.h>
--#include <linux/clkdev.h>
--#include <mach/common.h>
--
--#define EMEV2_SMU_BASE 0xe0110000
--
--/* EMEV2 SMU registers */
--#define USIAU0_RSTCTRL 0x094
--#define USIBU1_RSTCTRL 0x0ac
--#define USIBU2_RSTCTRL 0x0b0
--#define USIBU3_RSTCTRL 0x0b4
--#define STI_RSTCTRL 0x124
--#define USIAU0GCLKCTRL 0x4a0
--#define USIBU1GCLKCTRL 0x4b8
--#define USIBU2GCLKCTRL 0x4bc
--#define USIBU3GCLKCTRL 0x04c0
--#define STIGCLKCTRL 0x528
--#define USIAU0SCLKDIV 0x61c
--#define USIB2SCLKDIV 0x65c
--#define USIB3SCLKDIV 0x660
--#define STI_CLKSEL 0x688
--
--/* not pretty, but hey */
--static void __iomem *smu_base;
--
--static void emev2_smu_write(unsigned long value, int offs)
--{
-- BUG_ON(!smu_base || (offs >= PAGE_SIZE));
-- iowrite32(value, smu_base + offs);
--}
--
--static struct clk_mapping smu_mapping = {
-- .phys = EMEV2_SMU_BASE,
-- .len = PAGE_SIZE,
--};
--
--/* Fixed 32 KHz root clock from C32K pin */
--static struct clk c32k_clk = {
-- .rate = 32768,
-- .mapping = &smu_mapping,
--};
--
--/* PLL3 multiplies C32K with 7000 */
--static unsigned long pll3_recalc(struct clk *clk)
--{
-- return clk->parent->rate * 7000;
--}
--
--static struct sh_clk_ops pll3_clk_ops = {
-- .recalc = pll3_recalc,
--};
--
--static struct clk pll3_clk = {
-- .ops = &pll3_clk_ops,
-- .parent = &c32k_clk,
--};
--
--static struct clk *main_clks[] = {
-- &c32k_clk,
-- &pll3_clk,
--};
--
--enum { SCLKDIV_USIAU0, SCLKDIV_USIBU2, SCLKDIV_USIBU1, SCLKDIV_USIBU3,
-- SCLKDIV_NR };
--
--#define SCLKDIV(_reg, _shift) \
--{ \
-- .parent = &pll3_clk, \
-- .enable_reg = IOMEM(EMEV2_SMU_BASE + (_reg)), \
-- .enable_bit = _shift, \
--}
--
--static struct clk sclkdiv_clks[SCLKDIV_NR] = {
-- [SCLKDIV_USIAU0] = SCLKDIV(USIAU0SCLKDIV, 0),
-- [SCLKDIV_USIBU2] = SCLKDIV(USIB2SCLKDIV, 16),
-- [SCLKDIV_USIBU1] = SCLKDIV(USIB2SCLKDIV, 0),
-- [SCLKDIV_USIBU3] = SCLKDIV(USIB3SCLKDIV, 0),
--};
--
--enum { GCLK_USIAU0_SCLK, GCLK_USIBU1_SCLK, GCLK_USIBU2_SCLK, GCLK_USIBU3_SCLK,
-- GCLK_STI_SCLK,
-- GCLK_NR };
--
--#define GCLK_SCLK(_parent, _reg) \
--{ \
-- .parent = _parent, \
-- .enable_reg = IOMEM(EMEV2_SMU_BASE + (_reg)), \
-- .enable_bit = 1, /* SCLK_GCC */ \
--}
--
--static struct clk gclk_clks[GCLK_NR] = {
-- [GCLK_USIAU0_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIAU0],
-- USIAU0GCLKCTRL),
-- [GCLK_USIBU1_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU1],
-- USIBU1GCLKCTRL),
-- [GCLK_USIBU2_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU2],
-- USIBU2GCLKCTRL),
-- [GCLK_USIBU3_SCLK] = GCLK_SCLK(&sclkdiv_clks[SCLKDIV_USIBU3],
-- USIBU3GCLKCTRL),
-- [GCLK_STI_SCLK] = GCLK_SCLK(&c32k_clk, STIGCLKCTRL),
--};
--
--static int emev2_gclk_enable(struct clk *clk)
--{
-- iowrite32(ioread32(clk->mapped_reg) | (1 << clk->enable_bit),
-- clk->mapped_reg);
-- return 0;
--}
--
--static void emev2_gclk_disable(struct clk *clk)
--{
-- iowrite32(ioread32(clk->mapped_reg) & ~(1 << clk->enable_bit),
-- clk->mapped_reg);
--}
--
--static struct sh_clk_ops emev2_gclk_clk_ops = {
-- .enable = emev2_gclk_enable,
-- .disable = emev2_gclk_disable,
-- .recalc = followparent_recalc,
--};
--
--static int __init emev2_gclk_register(struct clk *clks, int nr)
--{
-- struct clk *clkp;
-- int ret = 0;
-- int k;
--
-- for (k = 0; !ret && (k < nr); k++) {
-- clkp = clks + k;
-- clkp->ops = &emev2_gclk_clk_ops;
-- ret |= clk_register(clkp);
-- }
--
-- return ret;
--}
--
--static unsigned long emev2_sclkdiv_recalc(struct clk *clk)
--{
-- unsigned int sclk_div;
--
-- sclk_div = (ioread32(clk->mapped_reg) >> clk->enable_bit) & 0xff;
--
-- return clk->parent->rate / (sclk_div + 1);
--}
--
--static struct sh_clk_ops emev2_sclkdiv_clk_ops = {
-- .recalc = emev2_sclkdiv_recalc,
--};
--
--static int __init emev2_sclkdiv_register(struct clk *clks, int nr)
--{
-- struct clk *clkp;
-- int ret = 0;
-- int k;
--
-- for (k = 0; !ret && (k < nr); k++) {
-- clkp = clks + k;
-- clkp->ops = &emev2_sclkdiv_clk_ops;
-- ret |= clk_register(clkp);
-- }
--
-- return ret;
--}
--
--static struct clk_lookup lookups[] = {
-- CLKDEV_DEV_ID("serial8250-em.0", &gclk_clks[GCLK_USIAU0_SCLK]),
-- CLKDEV_DEV_ID("e1020000.uart", &gclk_clks[GCLK_USIAU0_SCLK]),
-- CLKDEV_DEV_ID("serial8250-em.1", &gclk_clks[GCLK_USIBU1_SCLK]),
-- CLKDEV_DEV_ID("e1030000.uart", &gclk_clks[GCLK_USIBU1_SCLK]),
-- CLKDEV_DEV_ID("serial8250-em.2", &gclk_clks[GCLK_USIBU2_SCLK]),
-- CLKDEV_DEV_ID("e1040000.uart", &gclk_clks[GCLK_USIBU2_SCLK]),
-- CLKDEV_DEV_ID("serial8250-em.3", &gclk_clks[GCLK_USIBU3_SCLK]),
-- CLKDEV_DEV_ID("e1050000.uart", &gclk_clks[GCLK_USIBU3_SCLK]),
-- CLKDEV_DEV_ID("em_sti.0", &gclk_clks[GCLK_STI_SCLK]),
-- CLKDEV_DEV_ID("e0180000.sti", &gclk_clks[GCLK_STI_SCLK]),
--};
--
--void __init emev2_clock_init(void)
--{
-- int k, ret = 0;
--
-- smu_base = ioremap(EMEV2_SMU_BASE, PAGE_SIZE);
-- BUG_ON(!smu_base);
--
-- /* setup STI timer to run on 32.768 kHz and deassert reset */
-- emev2_smu_write(0, STI_CLKSEL);
-- emev2_smu_write(1, STI_RSTCTRL);
--
-- /* deassert reset for UART0->UART3 */
-- emev2_smu_write(2, USIAU0_RSTCTRL);
-- emev2_smu_write(2, USIBU1_RSTCTRL);
-- emev2_smu_write(2, USIBU2_RSTCTRL);
-- emev2_smu_write(2, USIBU3_RSTCTRL);
--
-- for (k = 0; !ret && (k < ARRAY_SIZE(main_clks)); k++)
-- ret = clk_register(main_clks[k]);
--
-- if (!ret)
-- ret = emev2_sclkdiv_register(sclkdiv_clks, SCLKDIV_NR);
--
-- if (!ret)
-- ret = emev2_gclk_register(gclk_clks, GCLK_NR);
--
-- clkdev_add_table(lookups, ARRAY_SIZE(lookups));
--
-- if (!ret)
-- shmobile_clk_init();
-- else
-- panic("failed to setup emev2 clocks\n");
--}
-diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h
-index fcb142a14e07..d64e188a9755 100644
---- a/arch/arm/mach-shmobile/include/mach/emev2.h
-+++ b/arch/arm/mach-shmobile/include/mach/emev2.h
-@@ -3,7 +3,6 @@
-
- extern void emev2_map_io(void);
- extern void emev2_init_delay(void);
--extern void emev2_clock_init(void);
- extern struct smp_operations emev2_smp_ops;
-
- #endif /* __ASM_EMEV2_H__ */
-diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
-index c71d667007b8..b15a0ed769fe 100644
---- a/arch/arm/mach-shmobile/setup-emev2.c
-+++ b/arch/arm/mach-shmobile/setup-emev2.c
-@@ -50,11 +50,7 @@ void __init emev2_init_delay(void)
-
- static void __init emev2_add_standard_devices_dt(void)
- {
--#ifdef CONFIG_COMMON_CLK
- of_clk_init(NULL);
--#else
-- emev2_clock_init();
--#endif
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0559-ARM-shmobile-Remove-EMEV2-header-file.patch b/patches.renesas/0559-ARM-shmobile-Remove-EMEV2-header-file.patch
deleted file mode 100644
index 0df48eae5b565..0000000000000
--- a/patches.renesas/0559-ARM-shmobile-Remove-EMEV2-header-file.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From b0b0c5f518774d800fce4ae453adceba98556224 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 17 Feb 2014 16:35:08 +0900
-Subject: ARM: shmobile: Remove EMEV2 header file
-
-There is no C board code left for the EMEV2 SoC, so
-get rid of the emev2.h include file to save some lines.
-While at it make functions static.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: Resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 505891ec2558771cd84fe00fc1646275b4c069ed)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/emev2.h | 8 --------
- arch/arm/mach-shmobile/setup-emev2.c | 7 ++++---
- arch/arm/mach-shmobile/smp-emev2.c | 1 -
- 3 files changed, 4 insertions(+), 12 deletions(-)
- delete mode 100644 arch/arm/mach-shmobile/include/mach/emev2.h
-
-diff --git a/arch/arm/mach-shmobile/include/mach/emev2.h b/arch/arm/mach-shmobile/include/mach/emev2.h
-deleted file mode 100644
-index d64e188a9755..000000000000
---- a/arch/arm/mach-shmobile/include/mach/emev2.h
-+++ /dev/null
-@@ -1,8 +0,0 @@
--#ifndef __ASM_EMEV2_H__
--#define __ASM_EMEV2_H__
--
--extern void emev2_map_io(void);
--extern void emev2_init_delay(void);
--extern struct smp_operations emev2_smp_ops;
--
--#endif /* __ASM_EMEV2_H__ */
-diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
-index b15a0ed769fe..d953ff6e78a2 100644
---- a/arch/arm/mach-shmobile/setup-emev2.c
-+++ b/arch/arm/mach-shmobile/setup-emev2.c
-@@ -21,7 +21,6 @@
- #include <linux/init.h>
- #include <linux/of_platform.h>
- #include <mach/common.h>
--#include <mach/emev2.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/map.h>
-@@ -38,12 +37,12 @@ static struct map_desc emev2_io_desc[] __initdata = {
- #endif
- };
-
--void __init emev2_map_io(void)
-+static void __init emev2_map_io(void)
- {
- iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
- }
-
--void __init emev2_init_delay(void)
-+static void __init emev2_init_delay(void)
- {
- shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
- }
-@@ -59,6 +58,8 @@ static const char *emev2_boards_compat_dt[] __initconst = {
- NULL,
- };
-
-+extern struct smp_operations emev2_smp_ops;
-+
- DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
- .smp = smp_ops(emev2_smp_ops),
- .map_io = emev2_map_io,
-diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
-index f2ca92308f75..2dfd748da7f3 100644
---- a/arch/arm/mach-shmobile/smp-emev2.c
-+++ b/arch/arm/mach-shmobile/smp-emev2.c
-@@ -24,7 +24,6 @@
- #include <linux/io.h>
- #include <linux/delay.h>
- #include <mach/common.h>
--#include <mach/emev2.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_scu.h>
-
---
-2.1.2
-
diff --git a/patches.renesas/0560-ARM-shmobile-Make-use-of-r8a7790_add_standard_device.patch b/patches.renesas/0560-ARM-shmobile-Make-use-of-r8a7790_add_standard_device.patch
deleted file mode 100644
index 94abfc69f39f5..0000000000000
--- a/patches.renesas/0560-ARM-shmobile-Make-use-of-r8a7790_add_standard_device.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 79799ad71e9026269274b4121a62cdc947dd646f Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Mon, 24 Feb 2014 14:49:07 +0900
-Subject: ARM: shmobile: Make use of r8a7790_add_standard_devices()
-
-Move non-PFC and non-GPIO devices off from r8a7790_pinmux_init()
-and into r8a7790_add_standard_devices() which is the normal place
-to keep regular devices in the legacy case.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f05b4b52845a18e833644eb3a820a55e3278d2b4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7790.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index c4616f0698c6..a901d9ef53f6 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -185,12 +185,6 @@ void __init r8a7790_pinmux_init(void)
- r8a7790_register_gpio(3);
- r8a7790_register_gpio(4);
- r8a7790_register_gpio(5);
-- r8a7790_register_i2c(0);
-- r8a7790_register_i2c(1);
-- r8a7790_register_i2c(2);
-- r8a7790_register_i2c(3);
-- r8a7790_register_audio_dmac(0);
-- r8a7790_register_audio_dmac(1);
- }
-
- #define __R8A7790_SCIF(scif_type, _scscr, index, baseaddr, irq) \
-@@ -308,6 +302,12 @@ void __init r8a7790_add_standard_devices(void)
- r8a7790_add_dt_devices();
- r8a7790_register_irqc(0);
- r8a7790_register_thermal();
-+ r8a7790_register_i2c(0);
-+ r8a7790_register_i2c(1);
-+ r8a7790_register_i2c(2);
-+ r8a7790_register_i2c(3);
-+ r8a7790_register_audio_dmac(0);
-+ r8a7790_register_audio_dmac(1);
- }
-
- void __init r8a7790_init_early(void)
---
-2.1.2
-
diff --git a/patches.renesas/0561-ARM-shmobile-rcar-gen2-Cache-Mode-Monitor-Register-V.patch b/patches.renesas/0561-ARM-shmobile-rcar-gen2-Cache-Mode-Monitor-Register-V.patch
deleted file mode 100644
index c60f165729804..0000000000000
--- a/patches.renesas/0561-ARM-shmobile-rcar-gen2-Cache-Mode-Monitor-Register-V.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 08dd877a443bdd0a95d9418b26f0a7a43c6cb63d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Wed, 12 Mar 2014 19:44:49 +0100
-Subject: ARM: shmobile: rcar-gen2: Cache Mode Monitor Register Value
-
-The MD pins are sampled at reset time, hence the read value will always be
-the same, and we can avoid the overhead of ioremapping the register on
-every read.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 835d737d664650d7f164a5b688271a424db4434c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index 10604480f325..542c5a47173f 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -30,12 +30,16 @@
-
- u32 rcar_gen2_read_mode_pins(void)
- {
-- void __iomem *modemr = ioremap_nocache(MODEMR, 4);
-- u32 mode;
--
-- BUG_ON(!modemr);
-- mode = ioread32(modemr);
-- iounmap(modemr);
-+ static u32 mode;
-+ static bool mode_valid;
-+
-+ if (!mode_valid) {
-+ void __iomem *modemr = ioremap_nocache(MODEMR, 4);
-+ BUG_ON(!modemr);
-+ mode = ioread32(modemr);
-+ iounmap(modemr);
-+ mode_valid = true;
-+ }
-
- return mode;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0562-ARM-shmobile-Check-r8a7791-MD21-at-SMP-boot.patch b/patches.renesas/0562-ARM-shmobile-Check-r8a7791-MD21-at-SMP-boot.patch
deleted file mode 100644
index aca297c42dc33..0000000000000
--- a/patches.renesas/0562-ARM-shmobile-Check-r8a7791-MD21-at-SMP-boot.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 3b637e2f9160e1fea82f7e22f8ac2c2c3a64d8c1 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Wed, 26 Feb 2014 18:59:16 +0900
-Subject: ARM: shmobile: Check r8a7791 MD21 at SMP boot
-
-On r8a7791 the hardware boot mode bit MD21 indicates if hardware
-debug mode is enabled or not. In case hardware debug mode is enabled
-print a warning and refrain from booting secondary CPU cores.
-
-Without this patch Koelsch with SW8-4 set to OFF will hang at SMP boot.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Tested-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 277efd30cfc72ec2f44a9bc95d93807b867bd9e9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/smp-r8a7791.c | 15 ++++++++++++++-
- 1 file changed, 14 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index 2df5bd190fe4..ec979529f30f 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -20,6 +20,7 @@
- #include <asm/smp_plat.h>
- #include <mach/common.h>
- #include <mach/r8a7791.h>
-+#include <mach/rcar-gen2.h>
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
-@@ -51,9 +52,21 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
- iounmap(p);
- }
-
-+static int r8a7791_smp_boot_secondary(unsigned int cpu,
-+ struct task_struct *idle)
-+{
-+ /* Error out when hardware debug mode is enabled */
-+ if (rcar_gen2_read_mode_pins() & BIT(21)) {
-+ pr_warn("Unable to boot CPU%u when MD21 is set\n", cpu);
-+ return -ENOTSUPP;
-+ }
-+
-+ return shmobile_smp_apmu_boot_secondary(cpu, idle);
-+}
-+
- struct smp_operations r8a7791_smp_ops __initdata = {
- .smp_prepare_cpus = r8a7791_smp_prepare_cpus,
-- .smp_boot_secondary = shmobile_smp_apmu_boot_secondary,
-+ .smp_boot_secondary = r8a7791_smp_boot_secondary,
- #ifdef CONFIG_HOTPLUG_CPU
- .cpu_disable = shmobile_smp_cpu_disable,
- .cpu_die = shmobile_smp_apmu_cpu_die,
---
-2.1.2
-
diff --git a/patches.renesas/0563-ARM-shmobile-r8a7778-bockw-Move-select-RENESAS_INTC_.patch b/patches.renesas/0563-ARM-shmobile-r8a7778-bockw-Move-select-RENESAS_INTC_.patch
deleted file mode 100644
index dd115d683ddb7..0000000000000
--- a/patches.renesas/0563-ARM-shmobile-r8a7778-bockw-Move-select-RENESAS_INTC_.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 04e83252db26ec9123e3a2f9095d0c8f066ccf85 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Sun, 23 Mar 2014 20:36:18 +0100
-Subject: ARM: shmobile: r8a7778/bockw: Move "select RENESAS_INTC_IRQPIN" under
- SoC
-
-Move the "select RENESAS_INTC_IRQPIN" from the two bockw-specific sections
-to the one r8a7778-specific section, like is done for the other SoCs.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-[horms+renesas@verge.net.au: Resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit e35db38d66d1e4007cfc1bb90a05e11b4aaee2a8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index d833fa4ea883..d19a06899e10 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -108,6 +108,7 @@ config ARCH_R8A7778
- select SH_CLK_CPG
- select ARM_GIC
- select SYS_SUPPORTS_SH_TMU
-+ select RENESAS_INTC_IRQPIN
-
- config ARCH_R8A7779
- bool "R-Car H1 (R8A77790)"
-@@ -206,7 +207,6 @@ config MACH_BOCKW
- depends on ARCH_R8A7778
- select ARCH_REQUIRE_GPIOLIB
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-- select RENESAS_INTC_IRQPIN
- select SND_SOC_AK4554 if SND_SIMPLE_CARD
- select SND_SOC_AK4642 if SND_SIMPLE_CARD
- select USE_OF
-@@ -215,7 +215,6 @@ config MACH_BOCKW_REFERENCE
- bool "BOCK-W - Reference Device Tree Implementation"
- depends on ARCH_R8A7778
- select ARCH_REQUIRE_GPIOLIB
-- select RENESAS_INTC_IRQPIN
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
- select USE_OF
- ---help---
---
-2.1.2
-
diff --git a/patches.renesas/0564-ARM-shmobile-r8a7791-Use-rcar_gen2_read_mode_pins-he.patch b/patches.renesas/0564-ARM-shmobile-r8a7791-Use-rcar_gen2_read_mode_pins-he.patch
deleted file mode 100644
index 586f49dd1e8f8..0000000000000
--- a/patches.renesas/0564-ARM-shmobile-r8a7791-Use-rcar_gen2_read_mode_pins-he.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 5b1d7957b9a17a33a353897be2d9269395c6ad53 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Wed, 12 Mar 2014 19:44:50 +0100
-Subject: ARM: shmobile: r8a7791: Use rcar_gen2_read_mode_pins() helper
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit edcf139081f501b1468ae6665217e8320d4c75e8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 11 ++---------
- 1 file changed, 2 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 701383fe3267..36e57508d879 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -25,6 +25,7 @@
- #include <linux/clkdev.h>
- #include <mach/clock.h>
- #include <mach/common.h>
-+#include <mach/rcar-gen2.h>
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-@@ -43,8 +44,6 @@
- * see "p1 / 2" on R8A7791_CLOCK_ROOT() below
- */
-
--#define MD(nr) (1 << nr)
--
- #define CPG_BASE 0xe6150000
- #define CPG_LEN 0x1000
-
-@@ -68,7 +67,6 @@
- #define MSTPSR9 IOMEM(0xe61509a4)
- #define MSTPSR11 IOMEM(0xe61509ac)
-
--#define MODEMR 0xE6160060
- #define SDCKCR 0xE6150074
- #define SD1CKCR 0xE6150078
- #define SD2CKCR 0xE615026c
-@@ -295,14 +293,9 @@ static struct clk_lookup lookups[] = {
-
- void __init r8a7791_clock_init(void)
- {
-- void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
-- u32 mode;
-+ u32 mode = rcar_gen2_read_mode_pins();
- int k, ret = 0;
-
-- BUG_ON(!modemr);
-- mode = ioread32(modemr);
-- iounmap(modemr);
--
- switch (mode & (MD(14) | MD(13))) {
- case 0:
- R8A7791_CLOCK_ROOT(15, &extal_clk, 172, 208, 106, 88);
---
-2.1.2
-
diff --git a/patches.renesas/0565-ARM-shmobile-Introduce-shmobile_clk_workaround.patch b/patches.renesas/0565-ARM-shmobile-Introduce-shmobile_clk_workaround.patch
deleted file mode 100644
index 1a726b54554a3..0000000000000
--- a/patches.renesas/0565-ARM-shmobile-Introduce-shmobile_clk_workaround.patch
+++ /dev/null
@@ -1,118 +0,0 @@
-From cd4289779ab941fc8096ac9e8980eb6197b8b310 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 13 Mar 2014 08:36:17 +0900
-Subject: ARM: shmobile: Introduce shmobile_clk_workaround()
-
-Introduce a new clock workaround function used by DT reference
-code on the mach-shmobile subarchitecture. The new function
-shmobile_clk_workaround() is used to configure clkdev to
-allow DT and platform devices to coexist. It is possible for
-the DT reference board code to also request enabling of the clock
-in case the driver does not implement clock control.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-[horms+renesas@verge.net.au: Removed trailing blank line]
-Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 25f5550f5a4b18fd77a2e719ba63cb34931ab66a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 2 +-
- arch/arm/mach-shmobile/clock.c | 28 ++++++++++++++++++++++++++++
- arch/arm/mach-shmobile/include/mach/clock.h | 16 ++++++++++++++++
- 3 files changed, 45 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 76053770aa04..9c5cd8c53a85 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -21,8 +21,8 @@ obj-$(CONFIG_ARCH_EMEV2) += setup-emev2.o
- obj-$(CONFIG_ARCH_R7S72100) += setup-r7s72100.o
-
- # Clock objects
--ifndef CONFIG_COMMON_CLK
- obj-y += clock.o
-+ifndef CONFIG_COMMON_CLK
- obj-$(CONFIG_ARCH_SH7372) += clock-sh7372.o
- obj-$(CONFIG_ARCH_SH73A0) += clock-sh73a0.o
- obj-$(CONFIG_ARCH_R8A73A4) += clock-r8a73a4.o
-diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
-index ad7df629d995..e7232a0373b9 100644
---- a/arch/arm/mach-shmobile/clock.c
-+++ b/arch/arm/mach-shmobile/clock.c
-@@ -21,6 +21,32 @@
- */
- #include <linux/kernel.h>
- #include <linux/init.h>
-+
-+#ifdef CONFIG_COMMON_CLK
-+#include <linux/clk.h>
-+#include <linux/clkdev.h>
-+#include <mach/clock.h>
-+
-+void __init shmobile_clk_workaround(const struct clk_name *clks,
-+ int nr_clks, bool enable)
-+{
-+ const struct clk_name *clkn;
-+ struct clk *clk;
-+ unsigned int i;
-+
-+ for (i = 0; i < nr_clks; ++i) {
-+ clkn = clks + i;
-+ clk = clk_get(NULL, clkn->clk);
-+ if (!IS_ERR(clk)) {
-+ clk_register_clkdev(clk, clkn->con_id, clkn->dev_id);
-+ if (enable)
-+ clk_prepare_enable(clk);
-+ clk_put(clk);
-+ }
-+ }
-+}
-+
-+#else /* CONFIG_COMMON_CLK */
- #include <linux/sh_clk.h>
- #include <linux/export.h>
- #include <mach/clock.h>
-@@ -58,3 +84,5 @@ void __clk_put(struct clk *clk)
- {
- }
- EXPORT_SYMBOL(__clk_put);
-+
-+#endif /* CONFIG_COMMON_CLK */
-diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h
-index 03e56074928c..9a93cf924b9c 100644
---- a/arch/arm/mach-shmobile/include/mach/clock.h
-+++ b/arch/arm/mach-shmobile/include/mach/clock.h
-@@ -1,6 +1,21 @@
- #ifndef CLOCK_H
- #define CLOCK_H
-
-+#ifdef CONFIG_COMMON_CLK
-+/* temporary clock configuration helper for platform devices */
-+
-+struct clk_name {
-+ const char *clk;
-+ const char *con_id;
-+ const char *dev_id;
-+};
-+
-+void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks,
-+ bool enable);
-+
-+#else /* CONFIG_COMMON_CLK */
-+/* legacy clock implementation */
-+
- unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk);
- extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops;
-
-@@ -36,4 +51,5 @@ do { \
- (p)->div = d; \
- } while (0)
-
-+#endif /* CONFIG_COMMON_CLK */
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0566-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-l.patch b/patches.renesas/0566-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-l.patch
deleted file mode 100644
index 564aec80bdcde..0000000000000
--- a/patches.renesas/0566-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-l.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 97d838953cdd297f8048e059d53dfc1051169db3 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 1 Apr 2014 13:02:15 +0200
-Subject: ARM: shmobile: r8a7790: Fix the I2C clocks parents in legacy code
-
-All I2C clocks derive from the HP clock, not from the P clock. Fix them.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ab077bfdc4eaffa5328a9843d4d7970718ac0b8a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 3f93503f5b96..331013995fe3 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -249,10 +249,10 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP1007] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 7, MSTPSR10, 0), /* SSI8 */
- [MSTP1006] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 6, MSTPSR10, 0), /* SSI9 */
- [MSTP1005] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR10, 5, MSTPSR10, 0), /* SSI ALL */
-- [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
-- [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
-- [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-- [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
-+ [MSTP931] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
-+ [MSTP930] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
-+ [MSTP929] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-+ [MSTP928] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
- [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
- [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
- [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
---
-2.1.2
-
diff --git a/patches.renesas/0567-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-l.patch b/patches.renesas/0567-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-l.patch
deleted file mode 100644
index 2ff1b960ad9b8..0000000000000
--- a/patches.renesas/0567-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-l.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 14ab2a6cafeb1995d310fd8f9aaa9f4ee7946b7d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 1 Apr 2014 13:02:16 +0200
-Subject: ARM: shmobile: r8a7791: Fix the I2C clocks parents in legacy code
-
-All I2C clocks derive from the HP clock, not from the P clock. Fix them.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2b1b6e6865aeb236f759ad3f91db27b514e29023)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 36e57508d879..3b26c7eee873 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -188,12 +188,12 @@ static struct clk mstp_clks[MSTP_NR] = {
- [MSTP1108] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 8, MSTPSR11, 0), /* SCIFA5 */
- [MSTP1107] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 7, MSTPSR11, 0), /* SCIFA4 */
- [MSTP1106] = SH_CLK_MSTP32_STS(&mp_clk, SMSTPCR11, 6, MSTPSR11, 0), /* SCIFA3 */
-- [MSTP931] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
-- [MSTP930] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
-- [MSTP929] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-- [MSTP928] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
-- [MSTP927] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
-- [MSTP925] = SH_CLK_MSTP32_STS(&p_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
-+ [MSTP931] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 31, MSTPSR9, 0), /* I2C0 */
-+ [MSTP930] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 30, MSTPSR9, 0), /* I2C1 */
-+ [MSTP929] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 29, MSTPSR9, 0), /* I2C2 */
-+ [MSTP928] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 28, MSTPSR9, 0), /* I2C3 */
-+ [MSTP927] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 27, MSTPSR9, 0), /* I2C4 */
-+ [MSTP925] = SH_CLK_MSTP32_STS(&hp_clk, SMSTPCR9, 25, MSTPSR9, 0), /* I2C5 */
- [MSTP917] = SH_CLK_MSTP32_STS(&qspi_clk, SMSTPCR9, 17, MSTPSR9, 0), /* QSPI */
- [MSTP815] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 15, MSTPSR8, 0), /* SATA0 */
- [MSTP814] = SH_CLK_MSTP32_STS(&zs_clk, SMSTPCR8, 14, MSTPSR8, 0), /* SATA1 */
---
-2.1.2
-
diff --git a/patches.renesas/0568-ARM-shmobile-Use-shmobile_clk_workaround-on-Lager.patch b/patches.renesas/0568-ARM-shmobile-Use-shmobile_clk_workaround-on-Lager.patch
deleted file mode 100644
index 151cdea125218..0000000000000
--- a/patches.renesas/0568-ARM-shmobile-Use-shmobile_clk_workaround-on-Lager.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From cf84c64cd8b8f4fe4c6cb0abe4b4e96765b81a32 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 13 Mar 2014 08:36:26 +0900
-Subject: ARM: shmobile: Use shmobile_clk_workaround() on Lager
-
-Convert the Lager DT reference code to use the newly introduced
-function shmobile_clk_workaround().
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e6597e0e19bbabfdd1983dbe79892d8ba210a180)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 65 ++++++++++----------------
- 1 file changed, 25 insertions(+), 40 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 440aac36d693..c76248b9a5e7 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -18,12 +18,11 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#include <linux/clk.h>
--#include <linux/clkdev.h>
- #include <linux/dma-mapping.h>
- #include <linux/init.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
-+#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
-@@ -86,46 +85,32 @@ static void __init lager_add_du_device(void)
- platform_device_register_full(&info);
- }
-
-+/*
-+ * This is a really crude hack to provide clkdev support to platform
-+ * devices until they get moved to DT.
-+ */
-+static const struct clk_name clk_names[] = {
-+ { "cmt0", NULL, "sh_cmt.0" },
-+ { "scifa0", NULL, "sh-sci.0" },
-+ { "scifa1", NULL, "sh-sci.1" },
-+ { "scifb0", NULL, "sh-sci.2" },
-+ { "scifb1", NULL, "sh-sci.3" },
-+ { "scifb2", NULL, "sh-sci.4" },
-+ { "scifa2", NULL, "sh-sci.5" },
-+ { "scif0", NULL, "sh-sci.6" },
-+ { "scif1", NULL, "sh-sci.7" },
-+ { "hscif0", NULL, "sh-sci.8" },
-+ { "hscif1", NULL, "sh-sci.9" },
-+ { "du0", "du.0", "rcar-du-r8a7790" },
-+ { "du1", "du.1", "rcar-du-r8a7790" },
-+ { "du2", "du.2", "rcar-du-r8a7790" },
-+ { "lvds0", "lvds.0", "rcar-du-r8a7790" },
-+ { "lvds1", "lvds.1", "rcar-du-r8a7790" },
-+};
-+
- static void __init lager_add_standard_devices(void)
- {
-- /*
-- * This is a really crude hack to provide clkdev support to platform
-- * devices until they get moved to DT.
-- */
-- static const struct clk_name {
-- const char *clk;
-- const char *con_id;
-- const char *dev_id;
-- } clk_names[] = {
-- { "cmt0", NULL, "sh_cmt.0" },
-- { "scifa0", NULL, "sh-sci.0" },
-- { "scifa1", NULL, "sh-sci.1" },
-- { "scifb0", NULL, "sh-sci.2" },
-- { "scifb1", NULL, "sh-sci.3" },
-- { "scifb2", NULL, "sh-sci.4" },
-- { "scifa2", NULL, "sh-sci.5" },
-- { "scif0", NULL, "sh-sci.6" },
-- { "scif1", NULL, "sh-sci.7" },
-- { "hscif0", NULL, "sh-sci.8" },
-- { "hscif1", NULL, "sh-sci.9" },
-- { "du0", "du.0", "rcar-du-r8a7790" },
-- { "du1", "du.1", "rcar-du-r8a7790" },
-- { "du2", "du.2", "rcar-du-r8a7790" },
-- { "lvds0", "lvds.0", "rcar-du-r8a7790" },
-- { "lvds1", "lvds.1", "rcar-du-r8a7790" },
-- };
-- struct clk *clk;
-- unsigned int i;
--
-- for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
-- clk = clk_get(NULL, clk_names[i].clk);
-- if (!IS_ERR(clk)) {
-- clk_register_clkdev(clk, clk_names[i].con_id,
-- clk_names[i].dev_id);
-- clk_put(clk);
-- }
-- }
--
-+ shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
- r8a7790_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0569-ARM-shmobile-Use-shmobile_clk_workaround-on-Koelsch.patch b/patches.renesas/0569-ARM-shmobile-Use-shmobile_clk_workaround-on-Koelsch.patch
deleted file mode 100644
index a78ffe6df81d2..0000000000000
--- a/patches.renesas/0569-ARM-shmobile-Use-shmobile_clk_workaround-on-Koelsch.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-From 303e7edecd5a9fa10a4b1403617dadb4ffe81871 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 13 Mar 2014 08:36:35 +0900
-Subject: ARM: shmobile: Use shmobile_clk_workaround() on Koelsch
-
-Convert the Koelsch DT reference code to use the newly introduced
-function shmobile_clk_workaround().
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 89aff406dbc3ea3dfc008e8472181532c0c0f4ea)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 71 ++++++++++--------------
- 1 file changed, 28 insertions(+), 43 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index a3fd30242bd8..a760f7f19bc9 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -19,12 +19,11 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#include <linux/clk.h>
--#include <linux/clkdev.h>
- #include <linux/dma-mapping.h>
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
-+#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
-@@ -82,49 +81,35 @@ static void __init koelsch_add_du_device(void)
- platform_device_register_full(&info);
- }
-
-+/*
-+ * This is a really crude hack to provide clkdev support to platform
-+ * devices until they get moved to DT.
-+ */
-+static const struct clk_name clk_names[] = {
-+ { "cmt0", NULL, "sh_cmt.0" },
-+ { "scifa0", NULL, "sh-sci.0" },
-+ { "scifa1", NULL, "sh-sci.1" },
-+ { "scifb0", NULL, "sh-sci.2" },
-+ { "scifb1", NULL, "sh-sci.3" },
-+ { "scifb2", NULL, "sh-sci.4" },
-+ { "scifa2", NULL, "sh-sci.5" },
-+ { "scif0", NULL, "sh-sci.6" },
-+ { "scif1", NULL, "sh-sci.7" },
-+ { "scif2", NULL, "sh-sci.8" },
-+ { "scif3", NULL, "sh-sci.9" },
-+ { "scif4", NULL, "sh-sci.10" },
-+ { "scif5", NULL, "sh-sci.11" },
-+ { "scifa3", NULL, "sh-sci.12" },
-+ { "scifa4", NULL, "sh-sci.13" },
-+ { "scifa5", NULL, "sh-sci.14" },
-+ { "du0", "du.0", "rcar-du-r8a7791" },
-+ { "du1", "du.1", "rcar-du-r8a7791" },
-+ { "lvds0", "lvds.0", "rcar-du-r8a7791" },
-+};
-+
- static void __init koelsch_add_standard_devices(void)
- {
-- /*
-- * This is a really crude hack to provide clkdev support to the CMT and
-- * DU devices until they get moved to DT.
-- */
-- static const struct clk_name {
-- const char *clk;
-- const char *con_id;
-- const char *dev_id;
-- } clk_names[] = {
-- { "cmt0", NULL, "sh_cmt.0" },
-- { "scifa0", NULL, "sh-sci.0" },
-- { "scifa1", NULL, "sh-sci.1" },
-- { "scifb0", NULL, "sh-sci.2" },
-- { "scifb1", NULL, "sh-sci.3" },
-- { "scifb2", NULL, "sh-sci.4" },
-- { "scifa2", NULL, "sh-sci.5" },
-- { "scif0", NULL, "sh-sci.6" },
-- { "scif1", NULL, "sh-sci.7" },
-- { "scif2", NULL, "sh-sci.8" },
-- { "scif3", NULL, "sh-sci.9" },
-- { "scif4", NULL, "sh-sci.10" },
-- { "scif5", NULL, "sh-sci.11" },
-- { "scifa3", NULL, "sh-sci.12" },
-- { "scifa4", NULL, "sh-sci.13" },
-- { "scifa5", NULL, "sh-sci.14" },
-- { "du0", "du.0", "rcar-du-r8a7791" },
-- { "du1", "du.1", "rcar-du-r8a7791" },
-- { "lvds0", "lvds.0", "rcar-du-r8a7791" },
-- };
-- struct clk *clk;
-- unsigned int i;
--
-- for (i = 0; i < ARRAY_SIZE(clk_names); ++i) {
-- clk = clk_get(NULL, clk_names[i].clk);
-- if (!IS_ERR(clk)) {
-- clk_register_clkdev(clk, clk_names[i].con_id,
-- clk_names[i].dev_id);
-- clk_put(clk);
-- }
-- }
--
-+ shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
- r8a7791_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0570-ARM-shmobile-koelsch-Annotate-clk_names-with-__initc.patch b/patches.renesas/0570-ARM-shmobile-koelsch-Annotate-clk_names-with-__initc.patch
deleted file mode 100644
index dd699d7f5ecf7..0000000000000
--- a/patches.renesas/0570-ARM-shmobile-koelsch-Annotate-clk_names-with-__initc.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 38e079066bd999d1f3e635a634015635a6c93352 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 13 Mar 2014 15:29:57 +0900
-Subject: ARM: shmobile: koelsch: Annotate clk_names with __initconst
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-(cherry picked from commit f6f98b3e44ea408e33eb4d695a4225cc11210cdb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index a760f7f19bc9..1e6a4361c0eb 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -85,7 +85,7 @@ static void __init koelsch_add_du_device(void)
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
- */
--static const struct clk_name clk_names[] = {
-+static const struct clk_name clk_names[] __initconst = {
- { "cmt0", NULL, "sh_cmt.0" },
- { "scifa0", NULL, "sh-sci.0" },
- { "scifa1", NULL, "sh-sci.1" },
---
-2.1.2
-
diff --git a/patches.renesas/0571-ARM-shmobile-lager-Annotate-clk_names-with-__initcon.patch b/patches.renesas/0571-ARM-shmobile-lager-Annotate-clk_names-with-__initcon.patch
deleted file mode 100644
index 09c022f3cb014..0000000000000
--- a/patches.renesas/0571-ARM-shmobile-lager-Annotate-clk_names-with-__initcon.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 086c161a27f44aea534a5c520b500600eeff28fe Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 13 Mar 2014 15:29:58 +0900
-Subject: ARM: shmobile: lager: Annotate clk_names with __initconst
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-(cherry picked from commit f71c77286b2c1f809a85e8e42df88eb2ec132e5f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index c76248b9a5e7..7ff395efa9fe 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -89,7 +89,7 @@ static void __init lager_add_du_device(void)
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
- */
--static const struct clk_name clk_names[] = {
-+static const struct clk_name clk_names[] __initconst = {
- { "cmt0", NULL, "sh_cmt.0" },
- { "scifa0", NULL, "sh-sci.0" },
- { "scifa1", NULL, "sh-sci.1" },
---
-2.1.2
-
diff --git a/patches.renesas/0572-ARM-shmobile-koelsch-reference-Work-around-core-cloc.patch b/patches.renesas/0572-ARM-shmobile-koelsch-reference-Work-around-core-cloc.patch
deleted file mode 100644
index 420117ca0b038..0000000000000
--- a/patches.renesas/0572-ARM-shmobile-koelsch-reference-Work-around-core-cloc.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 2a2218cdcfb37763d12218f2e92231bb608c34d5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Thu, 13 Mar 2014 15:29:30 +0100
-Subject: ARM: shmobile: koelsch-reference: Work around core clock issues
-
-Due to issues with runtime PM clock management, clocks not explicitly
-managed by their drivers may not be enabled at all, or be inadvertently
-disabled by the clk_disable_unused() late initcall.
-
-Until this is fixed, add a temporary workaround, calling
-shmobile_clk_workaround() with enable == true.
-
-For now this enables the clocks for: ether, i2c2, msiof0, qspi_mod, and
-thermal. More clocks can be added if needed.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 53cf0cf7ba2ef785b339826a0765bb6b1756adeb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 1e6a4361c0eb..a39114a1fe1b 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -107,9 +107,21 @@ static const struct clk_name clk_names[] __initconst = {
- { "lvds0", "lvds.0", "rcar-du-r8a7791" },
- };
-
-+/*
-+ * This is a really crude hack to work around core platform clock issues
-+ */
-+static const struct clk_name clk_enables[] = {
-+ { "ether", NULL, "ee700000.ethernet" },
-+ { "i2c2", NULL, "e6530000.i2c" },
-+ { "msiof0", NULL, "e6e20000.spi" },
-+ { "qspi_mod", NULL, "e6b10000.spi" },
-+ { "thermal", NULL, "e61f0000.thermal" },
-+};
-+
- static void __init koelsch_add_standard_devices(void)
- {
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
-+ shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
- r8a7791_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0573-ARM-shmobile-koelsch-reference-Annotate-clk_enables-.patch b/patches.renesas/0573-ARM-shmobile-koelsch-reference-Annotate-clk_enables-.patch
deleted file mode 100644
index c4feeb517ae98..0000000000000
--- a/patches.renesas/0573-ARM-shmobile-koelsch-reference-Annotate-clk_enables-.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 2d8eeff7a5cca9d2575c8427a8bc0827fca69e04 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 17 Mar 2014 11:19:56 +0900
-Subject: ARM: shmobile: koelsch-reference: Annotate clk_enables as __initconst
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-(cherry picked from commit 9e7b83c221cc257f4dc37acc82bbcb80627c0ab9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index a39114a1fe1b..63117d52db9e 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -110,7 +110,7 @@ static const struct clk_name clk_names[] __initconst = {
- /*
- * This is a really crude hack to work around core platform clock issues
- */
--static const struct clk_name clk_enables[] = {
-+static const struct clk_name clk_enables[] __initconst = {
- { "ether", NULL, "ee700000.ethernet" },
- { "i2c2", NULL, "e6530000.i2c" },
- { "msiof0", NULL, "e6e20000.spi" },
---
-2.1.2
-
diff --git a/patches.renesas/0574-ARM-shmobile-lager-reference-Work-around-core-clock-.patch b/patches.renesas/0574-ARM-shmobile-lager-reference-Work-around-core-clock-.patch
deleted file mode 100644
index 54971ba17ff06..0000000000000
--- a/patches.renesas/0574-ARM-shmobile-lager-reference-Work-around-core-clock-.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From a1040eac2c64d7823413beab41c24239f838f3bf Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 17 Mar 2014 11:18:56 +0900
-Subject: ARM: shmobile: lager-reference: Work around core clock issues
-
-Due to issues with runtime PM clock management, clocks not explicitly
-managed by their drivers may not be enabled at all, or be inadvertently
-disabled by the clk_disable_unused() late initcall.
-
-Until this is fixed, add a temporary workaround, calling
-shmobile_clk_workaround() with enable == true.
-
-For now this enables the clocks for: ether, msiof1, qspi_mod, and
-thermal. More clocks can be added if needed.
-
-Based on work for the koelsch board by Geert Uytterhoeven.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Acked-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-(cherry picked from commit aa5de826afe747c353162bbc116c63ab5335f91c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 7ff395efa9fe..313118c5f365 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -108,9 +108,20 @@ static const struct clk_name clk_names[] __initconst = {
- { "lvds1", "lvds.1", "rcar-du-r8a7790" },
- };
-
-+/*
-+ * This is a really crude hack to work around core platform clock issues
-+ */
-+static const struct clk_name clk_enables[] __initconst = {
-+ { "ether", NULL, "ee700000.ethernet" },
-+ { "msiof1", NULL, "e6e10000.spi" },
-+ { "qspi_mod", NULL, "e6b10000.spi" },
-+ { "thermal", NULL, "e61f0000.thermal" },
-+};
-+
- static void __init lager_add_standard_devices(void)
- {
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
-+ shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
- r8a7790_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0575-ARM-shmobile-Add-Lager-clock-workarounds-for-SDHI-an.patch b/patches.renesas/0575-ARM-shmobile-Add-Lager-clock-workarounds-for-SDHI-an.patch
deleted file mode 100644
index 219f3101d7f65..0000000000000
--- a/patches.renesas/0575-ARM-shmobile-Add-Lager-clock-workarounds-for-SDHI-an.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 066d349294d0dd7ff5feb2f0195ca5974681fe50 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Tue, 18 Mar 2014 21:52:47 +0900
-Subject: ARM: shmobile: Add Lager clock workarounds for SDHI and MMCIF
-
-Add MMCIF1, SDHI0 and SDHI2 to the clock workaround list for
-Lager multiplatform. Without these additional lines wakeup
-from Suspend-to-RAM never happens.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f98b55d730492e664fb2649bd7054fec0fe81acd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 313118c5f365..1eb48cffb4c5 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -114,7 +114,10 @@ static const struct clk_name clk_names[] __initconst = {
- static const struct clk_name clk_enables[] __initconst = {
- { "ether", NULL, "ee700000.ethernet" },
- { "msiof1", NULL, "e6e10000.spi" },
-+ { "mmcif1", NULL, "ee220000.mmc" },
- { "qspi_mod", NULL, "e6b10000.spi" },
-+ { "sdhi0", NULL, "ee100000.sd" },
-+ { "sdhi2", NULL, "ee140000.sd" },
- { "thermal", NULL, "e61f0000.thermal" },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0576-ARM-shmobile-Add-Koelsch-clock-workarounds-for-SDHI.patch b/patches.renesas/0576-ARM-shmobile-Add-Koelsch-clock-workarounds-for-SDHI.patch
deleted file mode 100644
index 9e5e161e01c0c..0000000000000
--- a/patches.renesas/0576-ARM-shmobile-Add-Koelsch-clock-workarounds-for-SDHI.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3c00fef7b5e720b3be998f4a95e2ee6645d024c4 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Tue, 18 Mar 2014 21:54:34 +0900
-Subject: ARM: shmobile: Add Koelsch clock workarounds for SDHI
-
-Add SDHI0, SDHI1 and SDHI2 to the clock workaround list for
-Koelsch multiplatform. Without these additional lines wakeup
-from Suspend-to-RAM never happens.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f278ea78beeb17ea07d11fc3372d4f98c94dcf46)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 63117d52db9e..941f8b394e84 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -115,6 +115,9 @@ static const struct clk_name clk_enables[] __initconst = {
- { "i2c2", NULL, "e6530000.i2c" },
- { "msiof0", NULL, "e6e20000.spi" },
- { "qspi_mod", NULL, "e6b10000.spi" },
-+ { "sdhi0", NULL, "ee100000.sd" },
-+ { "sdhi1", NULL, "ee140000.sd" },
-+ { "sdhi2", NULL, "ee160000.sd" },
- { "thermal", NULL, "e61f0000.thermal" },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0577-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-D.patch b/patches.renesas/0577-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-D.patch
deleted file mode 100644
index 2a14b8b39a313..0000000000000
--- a/patches.renesas/0577-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-D.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 94fd20cbf23bf6ba7cd664926435027e28a726e1 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Thu, 6 Mar 2014 12:15:36 +0900
-Subject: ARM: shmobile: Update r8a7791 CPU freq to 1500MHz in DTS
-
-The correct maximum CPU frequency for r8a7791 is 1500 MHz
-so update the r8a7791 SoC DTS to reflect this.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 896b79df8d60c01d46be23c10cc0f1a6691cc588)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 52346051f6f9..4c720d13673e 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -37,14 +37,14 @@
- device_type = "cpu";
- compatible = "arm,cortex-a15";
- reg = <0>;
-- clock-frequency = <1300000000>;
-+ clock-frequency = <1500000000>;
- };
-
- cpu1: cpu@1 {
- device_type = "cpu";
- compatible = "arm,cortex-a15";
- reg = <1>;
-- clock-frequency = <1300000000>;
-+ clock-frequency = <1500000000>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0578-ARM-shmobile-r8a7790-lager-dts-Rename-label-spi-to-q.patch b/patches.renesas/0578-ARM-shmobile-r8a7790-lager-dts-Rename-label-spi-to-q.patch
deleted file mode 100644
index 0e6709809843f..0000000000000
--- a/patches.renesas/0578-ARM-shmobile-r8a7790-lager-dts-Rename-label-spi-to-q.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 4769132ac322d3e50e6c9b52348a97b9aab03ed2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:13 +0100
-Subject: ARM: shmobile: r8a7790/lager dts: Rename label spi to qspi, add spi0
- alias
-
-Prepare for the advent of MSIOF SPI, which will be spi1 to spi4.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fad6d45cdf8269d6d1c6784792c74c53e2304b32)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 4 ++--
- arch/arm/boot/dts/r8a7790.dtsi | 3 ++-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index d01048ab3e77..46c263c80438 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -155,7 +155,7 @@
- renesas,function = "mmc1";
- };
-
-- qspi_pins: spi {
-+ qspi_pins: spi0 {
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
- };
-@@ -190,7 +190,7 @@
- status = "okay";
- };
-
--&spi {
-+&qspi {
- pinctrl-0 = <&qspi_pins>;
- pinctrl-names = "default";
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 10b326bdf831..dc72302ab6a4 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -24,6 +24,7 @@
- i2c1 = &i2c1;
- i2c2 = &i2c2;
- i2c3 = &i2c3;
-+ spi0 = &qspi;
- };
-
- cpus {
-@@ -765,7 +766,7 @@
- };
- };
-
-- spi: spi@e6b10000 {
-+ qspi: spi@e6b10000 {
- compatible = "renesas,qspi-r8a7790", "renesas,qspi";
- reg = <0 0xe6b10000 0 0x2c>;
- interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
---
-2.1.2
-
diff --git a/patches.renesas/0579-ARM-shmobile-r8a7791-koelsch-dts-Rename-label-spi-to.patch b/patches.renesas/0579-ARM-shmobile-r8a7791-koelsch-dts-Rename-label-spi-to.patch
deleted file mode 100644
index 458539400faf4..0000000000000
--- a/patches.renesas/0579-ARM-shmobile-r8a7791-koelsch-dts-Rename-label-spi-to.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From c280825bf02c3828884231e8fd5d9709c2ba3688 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:14 +0100
-Subject: ARM: shmobile: r8a7791/koelsch dts: Rename label spi to qspi, add
- spi0 alias
-
-Prepare for the advent of MSIOF SPI, which will be spi1 to spi3.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6f3e4ee340ea11d9aba39c5beaa80f0d3f368428)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++--
- arch/arm/boot/dts/r8a7791.dtsi | 3 ++-
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index de1b6977c69a..5558cc19c1b0 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -244,7 +244,7 @@
- renesas,function = "sdhi2";
- };
-
-- qspi_pins: spi {
-+ qspi_pins: spi0 {
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
- };
-@@ -301,7 +301,7 @@
- status = "okay";
- };
-
--&spi {
-+&qspi {
- pinctrl-0 = <&qspi_pins>;
- pinctrl-names = "default";
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 4c720d13673e..46aa2f1514bf 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -27,6 +27,7 @@
- i2c3 = &i2c3;
- i2c4 = &i2c4;
- i2c5 = &i2c5;
-+ spi0 = &qspi;
- };
-
- cpus {
-@@ -789,7 +790,7 @@
- };
- };
-
-- spi: spi@e6b10000 {
-+ qspi: spi@e6b10000 {
- compatible = "renesas,qspi-r8a7791", "renesas,qspi";
- reg = <0 0xe6b10000 0 0x2c>;
- interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
---
-2.1.2
-
diff --git a/patches.renesas/0580-ARM-shmobile-r8a7790-dtsi-Add-MSIOF-nodes-and-aliase.patch b/patches.renesas/0580-ARM-shmobile-r8a7790-dtsi-Add-MSIOF-nodes-and-aliase.patch
deleted file mode 100644
index ebd10be5b738f..0000000000000
--- a/patches.renesas/0580-ARM-shmobile-r8a7790-dtsi-Add-MSIOF-nodes-and-aliase.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c5d727e6d6a18f8a78b06d024700adeeebcb9dcd Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:15 +0100
-Subject: ARM: shmobile: r8a7790 dtsi: Add MSIOF nodes and aliases
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ae8a6146afc9dddbbf342b3a77b9bf44618511dd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 44 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index dc72302ab6a4..da665fa92624 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -25,6 +25,10 @@
- i2c2 = &i2c2;
- i2c3 = &i2c3;
- spi0 = &qspi;
-+ spi1 = &msiof0;
-+ spi2 = &msiof1;
-+ spi3 = &msiof2;
-+ spi4 = &msiof3;
- };
-
- cpus {
-@@ -776,4 +780,44 @@
- #size-cells = <0>;
- status = "disabled";
- };
-+
-+ msiof0: spi@e6e20000 {
-+ compatible = "renesas,msiof-r8a7790";
-+ reg = <0 0xe6e20000 0 0x0064>;
-+ interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7790_CLK_MSIOF0>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ msiof1: spi@e6e10000 {
-+ compatible = "renesas,msiof-r8a7790";
-+ reg = <0 0xe6e10000 0 0x0064>;
-+ interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7790_CLK_MSIOF1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ msiof2: spi@e6e00000 {
-+ compatible = "renesas,msiof-r8a7790";
-+ reg = <0 0xe6e00000 0 0x0064>;
-+ interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7790_CLK_MSIOF2>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ msiof3: spi@e6c90000 {
-+ compatible = "renesas,msiof-r8a7790";
-+ reg = <0 0xe6c90000 0 0x0064>;
-+ interrupts = <0 159 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7790_CLK_MSIOF3>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0581-ARM-shmobile-r8a7791-dtsi-Add-MSIOF-nodes-and-aliase.patch b/patches.renesas/0581-ARM-shmobile-r8a7791-dtsi-Add-MSIOF-nodes-and-aliase.patch
deleted file mode 100644
index df2e9e9e2de78..0000000000000
--- a/patches.renesas/0581-ARM-shmobile-r8a7791-dtsi-Add-MSIOF-nodes-and-aliase.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From b66f287cb28e269782dd5dc98f3bd13142e39057 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:16 +0100
-Subject: ARM: shmobile: r8a7791 dtsi: Add MSIOF nodes and aliases
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7713d3abe220c7d578768c07d183f6efbfa8895b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 46aa2f1514bf..082644cde7da 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -28,6 +28,9 @@
- i2c4 = &i2c4;
- i2c5 = &i2c5;
- spi0 = &qspi;
-+ spi1 = &msiof0;
-+ spi2 = &msiof1;
-+ spi3 = &msiof2;
- };
-
- cpus {
-@@ -800,4 +803,34 @@
- #size-cells = <0>;
- status = "disabled";
- };
-+
-+ msiof0: spi@e6e20000 {
-+ compatible = "renesas,msiof-r8a7791";
-+ reg = <0 0xe6e20000 0 0x0064>;
-+ interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7791_CLK_MSIOF0>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ msiof1: spi@e6e10000 {
-+ compatible = "renesas,msiof-r8a7791";
-+ reg = <0 0xe6e10000 0 0x0064>;
-+ interrupts = <0 157 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_MSIOF1>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
-+ msiof2: spi@e6e00000 {
-+ compatible = "renesas,msiof-r8a7791";
-+ reg = <0 0xe6e00000 0 0x0064>;
-+ interrupts = <0 158 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp2_clks R8A7791_CLK_MSIOF2>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0582-ARM-shmobile-lager-dts-Add-MSIOF-nodes.patch b/patches.renesas/0582-ARM-shmobile-lager-dts-Add-MSIOF-nodes.patch
deleted file mode 100644
index 3f8d6edd9fdcd..0000000000000
--- a/patches.renesas/0582-ARM-shmobile-lager-dts-Add-MSIOF-nodes.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From e95eba241174f7197fc3ad6efce2ad69d82aaa89 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:17 +0100
-Subject: ARM: shmobile: lager dts: Add MSIOF nodes
-
-Add pinctrl and SPI device for MSIOF on Lager.
-On this board, only MSIOF1 is in use. Its bus contains a single device
-(a Renesas R2A11302FT PMIC), for which no bindings are defined yet.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b0403b91e18c567fe68976253ed5759c50fb3eae)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 46c263c80438..539667bb15b0 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -159,6 +159,12 @@
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
- };
-+
-+ msiof1_pins: spi2 {
-+ renesas,groups = "msiof1_clk", "msiof1_sync", "msiof1_rx",
-+ "msiof1_tx";
-+ renesas,function = "msiof1";
-+ };
- };
-
- &ether {
-@@ -221,6 +227,22 @@
- };
- };
-
-+&msiof1 {
-+ pinctrl-0 = <&msiof1_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ pmic: pmic@0 {
-+ compatible = "renesas,r2a11302ft";
-+ reg = <0>;
-+ spi-max-frequency = <6000000>;
-+ spi-cpol;
-+ spi-cpha;
-+ };
-+
-+};
-+
- &sdhi0 {
- pinctrl-0 = <&sdhi0_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0583-ARM-shmobile-koelsch-dts-Add-MSIOF-nodes.patch b/patches.renesas/0583-ARM-shmobile-koelsch-dts-Add-MSIOF-nodes.patch
deleted file mode 100644
index c59cfb3ec99b4..0000000000000
--- a/patches.renesas/0583-ARM-shmobile-koelsch-dts-Add-MSIOF-nodes.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 1b974bebd5e3cf804d012c798e464e14c668ebaf Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Tue, 25 Feb 2014 11:30:18 +0100
-Subject: ARM: shmobile: koelsch dts: Add MSIOF nodes
-
-Add pinctrl and SPI device for MSIOF on Koelsch.
-On this board, only MSIOF0 is in use. Its bus contains a single device
-(a Renesas R2A11302FT PMIC), for which no bindings are defined yet.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b16f05ab75571ec360f5b7298888fd6cdf06f586)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 5558cc19c1b0..ff66416ec40e 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -248,6 +248,12 @@
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
- };
-+
-+ msiof0_pins: spi1 {
-+ renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
-+ "msiof0_tx";
-+ renesas,function = "msiof0";
-+ };
- };
-
- &ether {
-@@ -331,3 +337,18 @@
- };
- };
- };
-+
-+&msiof0 {
-+ pinctrl-0 = <&msiof0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ pmic: pmic@0 {
-+ compatible = "renesas,r2a11302ft";
-+ reg = <0>;
-+ spi-max-frequency = <6000000>;
-+ spi-cpol;
-+ spi-cpha;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0584-ARM-shmobile-r8a7778-dtsi-Improve-and-correct-HSPI-n.patch b/patches.renesas/0584-ARM-shmobile-r8a7778-dtsi-Improve-and-correct-HSPI-n.patch
deleted file mode 100644
index 7c46bc7fe0eec..0000000000000
--- a/patches.renesas/0584-ARM-shmobile-r8a7778-dtsi-Improve-and-correct-HSPI-n.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 4062b632c01e05441246f24b2aeefed606584173 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 14 Mar 2014 11:06:40 +0100
-Subject: ARM: shmobile: r8a7778 dtsi: Improve and correct HSPI nodes
-
- - Add "renesas,hspi-r8a7778" compatible value,
- - Correct reference to parent interrupt controller
- (use "interrupt-parent" instead of "interrupt-controller"),
- - Add missing "#address-cells" and "#size-cells" properties, which are
- needed when populating the SPI buses.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a34c50d53dc7779b404baab61b290827cb898562)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7778.dtsi | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
-index 85c5b3b99f5e..3c6fab5c9702 100644
---- a/arch/arm/boot/dts/r8a7778.dtsi
-+++ b/arch/arm/boot/dts/r8a7778.dtsi
-@@ -204,26 +204,32 @@
- };
-
- hspi0: spi@fffc7000 {
-- compatible = "renesas,hspi";
-+ compatible = "renesas,hspi-r8a7778", "renesas,hspi";
- reg = <0xfffc7000 0x18>;
-- interrupt-controller = <&gic>;
-+ interrupt-parent = <&gic>;
- interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
- status = "disabled";
- };
-
- hspi1: spi@fffc8000 {
-- compatible = "renesas,hspi";
-+ compatible = "renesas,hspi-r8a7778", "renesas,hspi";
- reg = <0xfffc8000 0x18>;
-- interrupt-controller = <&gic>;
-+ interrupt-parent = <&gic>;
- interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
- status = "disabled";
- };
-
- hspi2: spi@fffc6000 {
-- compatible = "renesas,hspi";
-+ compatible = "renesas,hspi-r8a7778", "renesas,hspi";
- reg = <0xfffc6000 0x18>;
-- interrupt-controller = <&gic>;
-+ interrupt-parent = <&gic>;
- interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
- status = "disabled";
- };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0585-ARM-shmobile-r8a7779-dtsi-Improve-and-correct-HSPI-n.patch b/patches.renesas/0585-ARM-shmobile-r8a7779-dtsi-Improve-and-correct-HSPI-n.patch
deleted file mode 100644
index 5f536a52ddd41..0000000000000
--- a/patches.renesas/0585-ARM-shmobile-r8a7779-dtsi-Improve-and-correct-HSPI-n.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From a2d9837e154d1715e100310e640bbf8fdf1b4052 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 14 Mar 2014 11:06:40 +0100
-Subject: ARM: shmobile: r8a7779 dtsi: Improve and correct HSPI nodes
-
- - Add "renesas,hspi-r8a7779" compatible value,
- - Correct reference to parent interrupt controller
- (use "interrupt-parent" instead of "interrupt-controller"),
- - Add missing "#address-cells" and "#size-cells" properties, which are
- needed when populating the SPI buses.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7709c33b391e217d73b38853a7914a3a3e285cbc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index d0561d4c7c46..8b1a336ee401 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -256,26 +256,32 @@
- };
-
- hspi0: spi@fffc7000 {
-- compatible = "renesas,hspi";
-+ compatible = "renesas,hspi-r8a7779", "renesas,hspi";
- reg = <0xfffc7000 0x18>;
-- interrupt-controller = <&gic>;
-+ interrupt-parent = <&gic>;
- interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
- status = "disabled";
- };
-
- hspi1: spi@fffc8000 {
-- compatible = "renesas,hspi";
-+ compatible = "renesas,hspi-r8a7779", "renesas,hspi";
- reg = <0xfffc8000 0x18>;
-- interrupt-controller = <&gic>;
-+ interrupt-parent = <&gic>;
- interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
- status = "disabled";
- };
-
- hspi2: spi@fffc6000 {
-- compatible = "renesas,hspi";
-+ compatible = "renesas,hspi-r8a7779", "renesas,hspi";
- reg = <0xfffc6000 0x18>;
-- interrupt-controller = <&gic>;
-+ interrupt-parent = <&gic>;
- interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
-+ #address-cells = <1>;
-+ #size-cells = <0>;
- status = "disabled";
- };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0586-ARM-shmobile-bockw-reference-dts-Add-SPI-FLASH.patch b/patches.renesas/0586-ARM-shmobile-bockw-reference-dts-Add-SPI-FLASH.patch
deleted file mode 100644
index 831aebbf1a1f5..0000000000000
--- a/patches.renesas/0586-ARM-shmobile-bockw-reference-dts-Add-SPI-FLASH.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 41ff9e57618cd568af84068a4d8b2da11d976eaf Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Fri, 14 Mar 2014 11:06:41 +0100
-Subject: ARM: shmobile: bockw reference dts: Add SPI FLASH
-
-Add Spansion s25fl008k SPI FLASH and MTD partition, based on bockw legacy
-board code.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Tested-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6d879a097acaeaa9deba6d4949b466886b18652e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-index 06cda19dac6a..f76f6ec01e19 100644
---- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-@@ -109,4 +109,18 @@
- pinctrl-0 = <&hspi0_pins>;
- pinctrl-names = "default";
- status = "okay";
-+
-+ flash: flash@0 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "spansion,s25fl008k";
-+ reg = <0>;
-+ spi-max-frequency = <104000000>;
-+ m25p,fast-read;
-+
-+ partition@0 {
-+ label = "data(spi)";
-+ reg = <0x00000000 0x00100000>;
-+ };
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0587-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-La.patch b/patches.renesas/0587-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-La.patch
deleted file mode 100644
index 3751d18465cfa..0000000000000
--- a/patches.renesas/0587-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-La.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From a7fb7c9992556d4bc476c8f6ba2c89a5425d15df Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Tue, 18 Mar 2014 21:57:48 +0900
-Subject: ARM: shmobile: Add DTS gpio-keys support for SW2 on Lager
-
-Add DTS gpio-keys support for SW2 on the Lager board.
-This makes the DT code match the legacy board code.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f7dcd382a8d6ce8c6da12786c8311e71e214290d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 34 ++++++++++++++++++++++++++++++++++
- 1 file changed, 34 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 539667bb15b0..422bb178e0de 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -12,6 +12,7 @@
- /dts-v1/;
- #include "r8a7790.dtsi"
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-
- / {
- model = "Lager";
-@@ -36,6 +37,39 @@
- #size-cells = <1>;
- };
-
-+ gpio_keys {
-+ compatible = "gpio-keys";
-+
-+ button@1 {
-+ linux,code = <KEY_1>;
-+ label = "SW2-1";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
-+ };
-+ button@2 {
-+ linux,code = <KEY_2>;
-+ label = "SW2-2";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
-+ };
-+ button@3 {
-+ linux,code = <KEY_3>;
-+ label = "SW2-3";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ gpios = <&gpio1 26 GPIO_ACTIVE_LOW>;
-+ };
-+ button@4 {
-+ linux,code = <KEY_4>;
-+ label = "SW2-4";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ gpios = <&gpio1 28 GPIO_ACTIVE_LOW>;
-+ };
-+ };
-+
- leds {
- compatible = "gpio-leds";
- led6 {
---
-2.1.2
-
diff --git a/patches.renesas/0588-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-Ko.patch b/patches.renesas/0588-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-Ko.patch
deleted file mode 100644
index 91dbc0a918a39..0000000000000
--- a/patches.renesas/0588-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-Ko.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 89464bbcfe53459eab692b46d551776da99f277c Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm@opensource.se>
-Date: Tue, 18 Mar 2014 22:01:17 +0900
-Subject: ARM: shmobile: Add DTS gpio-keys support for SW2 on Koelsch
-
-Add DTS gpio-keys support for SW2 on the Koelsch board.
-This makes the DT code match the legacy board code. Also
-update the existing gpio-keys nodes to make use of KEY_n.
-
-Signed-off-by: Magnus Damm <damm@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7f168b1e921f137db4f323428819f4c86ede4320)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 43 +++++++++++++++++++++++++++++------
- 1 file changed, 36 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index ff66416ec40e..194ab9c33ba3 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -13,6 +13,7 @@
- /dts-v1/;
- #include "r8a7791.dtsi"
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
-
- / {
- model = "Koelsch";
-@@ -40,51 +41,79 @@
- gpio-keys {
- compatible = "gpio-keys";
-
-+ key-1 {
-+ gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
-+ linux,code = <KEY_1>;
-+ label = "SW2-1";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-2 {
-+ gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
-+ linux,code = <KEY_2>;
-+ label = "SW2-2";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-3 {
-+ gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
-+ linux,code = <KEY_3>;
-+ label = "SW2-3";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
-+ key-4 {
-+ gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
-+ linux,code = <KEY_4>;
-+ label = "SW2-4";
-+ gpio-key,wakeup;
-+ debounce-interval = <20>;
-+ };
- key-a {
- gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
-- linux,code = <30>;
-+ linux,code = <KEY_A>;
- label = "SW30";
- gpio-key,wakeup;
- debounce-interval = <20>;
- };
- key-b {
- gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
-- linux,code = <48>;
-+ linux,code = <KEY_B>;
- label = "SW31";
- gpio-key,wakeup;
- debounce-interval = <20>;
- };
- key-c {
- gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
-- linux,code = <46>;
-+ linux,code = <KEY_C>;
- label = "SW32";
- gpio-key,wakeup;
- debounce-interval = <20>;
- };
- key-d {
- gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
-- linux,code = <32>;
-+ linux,code = <KEY_D>;
- label = "SW33";
- gpio-key,wakeup;
- debounce-interval = <20>;
- };
- key-e {
- gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
-- linux,code = <18>;
-+ linux,code = <KEY_E>;
- label = "SW34";
- gpio-key,wakeup;
- debounce-interval = <20>;
- };
- key-f {
- gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
-- linux,code = <33>;
-+ linux,code = <KEY_F>;
- label = "SW35";
- gpio-key,wakeup;
- debounce-interval = <20>;
- };
- key-g {
- gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
-- linux,code = <34>;
-+ linux,code = <KEY_G>;
- label = "SW36";
- gpio-key,wakeup;
- debounce-interval = <20>;
---
-2.1.2
-
diff --git a/patches.renesas/0589-ARM-shmobile-lager-Set-ethernet-PHY-LED-mode.patch b/patches.renesas/0589-ARM-shmobile-lager-Set-ethernet-PHY-LED-mode.patch
deleted file mode 100644
index 050a1b0cf1fcf..0000000000000
--- a/patches.renesas/0589-ARM-shmobile-lager-Set-ethernet-PHY-LED-mode.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 1e6b7d1acc990ac4f16dc6c9447502117be516ff Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 18 Mar 2014 19:04:47 +0100
-Subject: ARM: shmobile: lager: Set ethernet PHY LED mode
-
-The Lager board uses the ethernet PHY LED0 as a link signal connected to
-the ethernet controller. Specify the corresponding LED mode for the PHY.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f17dd09d5133bc0705c8319df77169cb8491eaad)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 422bb178e0de..bbd6160b9b5c 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -213,6 +213,7 @@
- reg = <1>;
- interrupt-parent = <&irqc0>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ led-mode = <1>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0590-ARM-shmobile-koelsch-Set-ethernet-PHY-LED-mode.patch b/patches.renesas/0590-ARM-shmobile-koelsch-Set-ethernet-PHY-LED-mode.patch
deleted file mode 100644
index da71eb93731a8..0000000000000
--- a/patches.renesas/0590-ARM-shmobile-koelsch-Set-ethernet-PHY-LED-mode.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 748d67dab8a6b5e8f7dcd0b4a0f22067fa71ecbe Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 18 Mar 2014 19:04:48 +0100
-Subject: ARM: shmobile: koelsch: Set ethernet PHY LED mode
-
-The Koelsch board uses the ethernet PHY LED0 as a link signal connected
-to the ethernet controller. Specify the corresponding LED mode for the
-PHY.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 19f647cbd432eff181777bbe0f302c62af4a180d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 194ab9c33ba3..aba971d0848e 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -297,6 +297,7 @@
- reg = <1>;
- interrupt-parent = <&irqc0>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ micrel,led-mode = <1>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0591-ARM-shmobile-armadillo-reference-dts-Use-KEY_-macros.patch b/patches.renesas/0591-ARM-shmobile-armadillo-reference-dts-Use-KEY_-macros.patch
deleted file mode 100644
index 47ef4e13374d0..0000000000000
--- a/patches.renesas/0591-ARM-shmobile-armadillo-reference-dts-Use-KEY_-macros.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 16bea8dc706d7009fad0121ab350319e7966c448 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Sun, 23 Mar 2014 20:35:01 +0100
-Subject: ARM: shmobile: armadillo-reference dts: Use KEY_* macros for
- gpio-keys
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c9b60e922c7551ff1c477a121ad09f3790c1a575)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index 95a849bf921f..97342a4820cf 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -11,6 +11,7 @@
- /dts-v1/;
- #include "r8a7740.dtsi"
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
- #include <dt-bindings/pwm/pwm.h>
-
-@@ -77,26 +78,26 @@
-
- power-key {
- gpios = <&pfc 99 GPIO_ACTIVE_LOW>;
-- linux,code = <116>;
-+ linux,code = <KEY_POWER>;
- label = "SW3";
- gpio-key,wakeup;
- };
-
- back-key {
- gpios = <&pfc 100 GPIO_ACTIVE_LOW>;
-- linux,code = <158>;
-+ linux,code = <KEY_BACK>;
- label = "SW4";
- };
-
- menu-key {
- gpios = <&pfc 97 GPIO_ACTIVE_LOW>;
-- linux,code = <139>;
-+ linux,code = <KEY_MENU>;
- label = "SW5";
- };
-
- home-key {
- gpios = <&pfc 98 GPIO_ACTIVE_LOW>;
-- linux,code = <102>;
-+ linux,code = <KEY_HOME>;
- label = "SW6";
- };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0592-ARM-shmobile-kzm9g-reference-dts-Use-KEY_-macros-for.patch b/patches.renesas/0592-ARM-shmobile-kzm9g-reference-dts-Use-KEY_-macros-for.patch
deleted file mode 100644
index 1bc2df8da77f8..0000000000000
--- a/patches.renesas/0592-ARM-shmobile-kzm9g-reference-dts-Use-KEY_-macros-for.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 038f0a1d830f027bd0283e60855c30a7d9701ba5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Date: Sun, 23 Mar 2014 20:35:02 +0100
-Subject: ARM: shmobile: kzm9g-reference dts: Use KEY_* macros for gpio-keys
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 39f0163098d136411538060fd53c8b8c255cda05)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-index eb8886b535e4..a99171c8a782 100644
---- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-@@ -14,6 +14,7 @@
- /dts-v1/;
- #include "sh73a0.dtsi"
- #include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/input/input.h>
- #include <dt-bindings/interrupt-controller/irq.h>
-
- / {
-@@ -112,43 +113,43 @@
-
- back-key {
- gpios = <&pcf8575 8 GPIO_ACTIVE_LOW>;
-- linux,code = <158>;
-+ linux,code = <KEY_BACK>;
- label = "SW3";
- };
-
- right-key {
- gpios = <&pcf8575 9 GPIO_ACTIVE_LOW>;
-- linux,code = <106>;
-+ linux,code = <KEY_RIGHT>;
- label = "SW2-R";
- };
-
- left-key {
- gpios = <&pcf8575 10 GPIO_ACTIVE_LOW>;
-- linux,code = <105>;
-+ linux,code = <KEY_LEFT>;
- label = "SW2-L";
- };
-
- enter-key {
- gpios = <&pcf8575 11 GPIO_ACTIVE_LOW>;
-- linux,code = <28>;
-+ linux,code = <KEY_ENTER>;
- label = "SW2-P";
- };
-
- up-key {
- gpios = <&pcf8575 12 GPIO_ACTIVE_LOW>;
-- linux,code = <103>;
-+ linux,code = <KEY_UP>;
- label = "SW2-U";
- };
-
- down-key {
- gpios = <&pcf8575 13 GPIO_ACTIVE_LOW>;
-- linux,code = <108>;
-+ linux,code = <KEY_DOWN>;
- label = "SW2-D";
- };
-
- home-key {
- gpios = <&pcf8575 14 GPIO_ACTIVE_LOW>;
-- linux,code = <102>;
-+ linux,code = <KEY_HOME>;
- label = "SW1";
- };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0593-ARM-shmobile-r8a7791-add-IIC-B-clocks-to-dtsi.patch b/patches.renesas/0593-ARM-shmobile-r8a7791-add-IIC-B-clocks-to-dtsi.patch
deleted file mode 100644
index 5ea8c3d815fb3..0000000000000
--- a/patches.renesas/0593-ARM-shmobile-r8a7791-add-IIC-B-clocks-to-dtsi.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From cdf240b8573df7bd8dc246339e1d772ca8849681 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 10 Mar 2014 12:26:57 +0100
-Subject: ARM: shmobile: r8a7791: add IIC(B) clocks to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c08691b578338004ee467cfe51850e7ffb523647)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 25 +++++++++++++------------
- 1 file changed, 13 insertions(+), 12 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 082644cde7da..35b4b838cbd0 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -716,15 +716,16 @@
- mstp3_clks: mstp3_clks@e615013c {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
-- clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>,
-- <&cpg_clocks R8A7791_CLK_SD0>, <&mmc0_clk>, <&rclk_clk>;
-+ clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7791_CLK_SD0>,
-+ <&mmc0_clk>, <&hp_clk>, <&hp_clk>, <&rclk_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-- R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1
-- R8A7791_CLK_SDHI0 R8A7791_CLK_MMCIF0 R8A7791_CLK_CMT1
-+ R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1 R8A7791_CLK_SDHI0
-+ R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_IIC1 R8A7791_CLK_CMT1
- >;
- clock-output-names =
-- "tpu0", "sdhi2", "sdhi1", "sdhi0", "mmcif0", "cmt1";
-+ "tpu0", "sdhi2", "sdhi1", "sdhi0",
-+ "mmcif0", "i2c7", "i2c8", "cmt1";
- };
- mstp5_clks: mstp5_clks@e6150144 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
-@@ -768,17 +769,17 @@
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-- clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>,
-- <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-- <&p_clk>;
-+ clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, <&p_clk>,
-+ <&cp_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-+ <&p_clk>, <&p_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-- R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD
-- R8A7791_CLK_I2C5 R8A7791_CLK_I2C4 R8A7791_CLK_I2C3
-- R8A7791_CLK_I2C2 R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
-+ R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5
-+ R8A7791_CLK_IICDVFS R8A7791_CLK_I2C4 R8A7791_CLK_I2C3 R8A7791_CLK_I2C2
-+ R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
- >;
- clock-output-names =
-- "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c4", "i2c3",
-+ "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3",
- "i2c2", "i2c1", "i2c0";
- };
- mstp11_clks: mstp11_clks@e615099c {
---
-2.1.2
-
diff --git a/patches.renesas/0594-ARM-shmobile-r8a7791-add-IIC-B-cores-to-dtsi.patch b/patches.renesas/0594-ARM-shmobile-r8a7791-add-IIC-B-cores-to-dtsi.patch
deleted file mode 100644
index 983f104e58dd4..0000000000000
--- a/patches.renesas/0594-ARM-shmobile-r8a7791-add-IIC-B-cores-to-dtsi.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 6ab4dd2738d6e14dda8e8a2accdabc92d4ce6d93 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 10 Mar 2014 12:26:58 +0100
-Subject: ARM: shmobile: r8a7791: add IIC(B) cores to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 36408d9dd0c398fc3efe87231a4c847601878c97)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 36 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 36 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 35b4b838cbd0..e47a2fcd2627 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -27,6 +27,9 @@
- i2c3 = &i2c3;
- i2c4 = &i2c4;
- i2c5 = &i2c5;
-+ i2c6 = &i2c6;
-+ i2c7 = &i2c7;
-+ i2c8 = &i2c8;
- spi0 = &qspi;
- spi1 = &msiof0;
- spi2 = &msiof1;
-@@ -184,6 +187,7 @@
- <0 17 IRQ_TYPE_LEVEL_HIGH>;
- };
-
-+ /* The memory map in the User's Manual maps the cores to bus numbers */
- i2c0: i2c@e6508000 {
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -235,6 +239,7 @@
- };
-
- i2c5: i2c@e6528000 {
-+ /* doesn't need pinmux */
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7791";
-@@ -244,6 +249,37 @@
- status = "disabled";
- };
-
-+ i2c6: i2c@e60b0000 {
-+ /* doesn't need pinmux */
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7791", "renesas,rmobile-iic";
-+ reg = <0 0xe60b0000 0 0x425>;
-+ interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7791_CLK_IICDVFS>;
-+ status = "disabled";
-+ };
-+
-+ i2c7: i2c@e6500000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7791", "renesas,rmobile-iic";
-+ reg = <0 0xe6500000 0 0x425>;
-+ interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7791_CLK_IIC0>;
-+ status = "disabled";
-+ };
-+
-+ i2c8: i2c@e6510000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7791", "renesas,rmobile-iic";
-+ reg = <0 0xe6510000 0 0x425>;
-+ interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7791_CLK_IIC1>;
-+ status = "disabled";
-+ };
-+
- pfc: pfc@e6060000 {
- compatible = "renesas,pfc-r8a7791";
- reg = <0 0xe6060000 0 0x250>;
---
-2.1.2
-
diff --git a/patches.renesas/0595-ARM-shmobile-koelsch-make-i2c2-pfc-node-unique.patch b/patches.renesas/0595-ARM-shmobile-koelsch-make-i2c2-pfc-node-unique.patch
deleted file mode 100644
index fe18318af234a..0000000000000
--- a/patches.renesas/0595-ARM-shmobile-koelsch-make-i2c2-pfc-node-unique.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3d8d2dc6885e19a65ea38e5dcb02c03ce58a8d01 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 10 Mar 2014 12:26:59 +0100
-Subject: ARM: shmobile: koelsch: make i2c2-pfc node unique
-
-This node should have a unique name so it can be distinguished when
-other i2c busses are added later.
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e6a4c001116ca28a3c5698168a2a1fe274fa6d2c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index aba971d0848e..745b9ecde867 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -228,7 +228,7 @@
- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
- pinctrl-names = "default";
-
-- i2c2_pins: i2c {
-+ i2c2_pins: i2c2 {
- renesas,groups = "i2c2";
- renesas,function = "i2c2";
- };
---
-2.1.2
-
diff --git a/patches.renesas/0596-ARM-shmobile-koelsch-activate-i2c6-bus.patch b/patches.renesas/0596-ARM-shmobile-koelsch-activate-i2c6-bus.patch
deleted file mode 100644
index f60709d5cdf86..0000000000000
--- a/patches.renesas/0596-ARM-shmobile-koelsch-activate-i2c6-bus.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b1f1ae1ec2ac4810da166ab5ac553a36a9f948dc Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Mon, 10 Mar 2014 12:27:00 +0100
-Subject: ARM: shmobile: koelsch: activate i2c6 bus
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit aa28e55dd9b6832a56b1a37fbe65c34ddcd32bdf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 745b9ecde867..3b25a0c0de0c 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -224,6 +224,11 @@
- };
- };
-
-+&i2c6 {
-+ status = "okay";
-+ clock-frequency = <100000>;
-+};
-+
- &pfc {
- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0597-ARM-shmobile-Use-r8a7740-suffix-for-i2c-mmcif-fsi2-c.patch b/patches.renesas/0597-ARM-shmobile-Use-r8a7740-suffix-for-i2c-mmcif-fsi2-c.patch
deleted file mode 100644
index 77b57060e79f3..0000000000000
--- a/patches.renesas/0597-ARM-shmobile-Use-r8a7740-suffix-for-i2c-mmcif-fsi2-c.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 9d3520da2d8b9e734cb9068ef55c1f129b3a3347 Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <ulrich.hecht@gmail.com>
-Date: Thu, 27 Mar 2014 11:45:44 +0100
-Subject: ARM: shmobile: Use r8a7740 suffix for i2c, mmcif, fsi2 compat strings
-
-Add "renesas,*-r8a7740" to the compatible strings for consistency with other
-devices.
-
-Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
-Acked-by: Wolfram Sang <wsa@the-dreams.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5c53f50c50badff499568a703467c3c9f23f9bfd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740.dtsi | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index 2551e9438d35..3834b94dc02a 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -125,7 +125,7 @@
- i2c0: i2c@fff20000 {
- #address-cells = <1>;
- #size-cells = <0>;
-- compatible = "renesas,rmobile-iic";
-+ compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
- reg = <0xfff20000 0x425>;
- interrupt-parent = <&gic>;
- interrupts = <0 201 IRQ_TYPE_LEVEL_HIGH
-@@ -138,7 +138,7 @@
- i2c1: i2c@e6c20000 {
- #address-cells = <1>;
- #size-cells = <0>;
-- compatible = "renesas,rmobile-iic";
-+ compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
- reg = <0xe6c20000 0x425>;
- interrupt-parent = <&gic>;
- interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH
-@@ -173,7 +173,7 @@
- };
-
- mmcif0: mmc@e6bd0000 {
-- compatible = "renesas,sh-mmcif";
-+ compatible = "renesas,mmcif-r8a7740", "renesas,sh-mmcif";
- reg = <0xe6bd0000 0x100>;
- interrupt-parent = <&gic>;
- interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH
-@@ -219,7 +219,7 @@
-
- sh_fsi2: sound@fe1f0000 {
- #sound-dai-cells = <1>;
-- compatible = "renesas,sh_fsi2";
-+ compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2";
- reg = <0xfe1f0000 0x400>;
- interrupt-parent = <&gic>;
- interrupts = <0 9 0x4>;
---
-2.1.2
-
diff --git a/patches.renesas/0598-ARM-shmobile-armadillo-reference-dts-enable-RTC.patch b/patches.renesas/0598-ARM-shmobile-armadillo-reference-dts-enable-RTC.patch
deleted file mode 100644
index 8cbf9b5cf991c..0000000000000
--- a/patches.renesas/0598-ARM-shmobile-armadillo-reference-dts-enable-RTC.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From c18b98319d8f57f9b69305bbb9bdea33fb95f9d8 Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <ulrich.hecht@gmail.com>
-Date: Mon, 31 Mar 2014 17:38:20 +0200
-Subject: ARM: shmobile: armadillo-reference dts: enable RTC
-
-This enables the Seiko real-time clock that is attached to a couple of
-GPIO pins.
-
-Signed-off-by: Ulrich Hecht <ulrich.hecht@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 584b23db5beb3bd3a3c0767248a4843cac848a58)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index 97342a4820cf..0cb235a450b9 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -118,6 +118,16 @@
- };
- };
-
-+ i2c2: i2c@2 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "i2c-gpio";
-+ gpios = <&pfc 208 GPIO_ACTIVE_HIGH /* sda */
-+ &pfc 91 GPIO_ACTIVE_HIGH /* scl */
-+ >;
-+ i2c-gpio,delay-us = <5>;
-+ };
-+
- backlight {
- compatible = "pwm-backlight";
- pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
-@@ -167,6 +177,14 @@
- };
- };
-
-+&i2c2 {
-+ status = "okay";
-+ rtc@30 {
-+ compatible = "seiko,s35390a";
-+ reg = <0x30>;
-+ };
-+};
-+
- &pfc {
- pinctrl-0 = <&scifa1_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0599-ARM-shmobile-lager-Correct-setting-of-ethernet-PHY-L.patch b/patches.renesas/0599-ARM-shmobile-lager-Correct-setting-of-ethernet-PHY-L.patch
deleted file mode 100644
index c475e58b0c68a..0000000000000
--- a/patches.renesas/0599-ARM-shmobile-lager-Correct-setting-of-ethernet-PHY-L.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 7c3b28b3f12af2b17f18d1a7740b10e1d62e9635 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 8 Apr 2014 09:21:35 +0900
-Subject: ARM: shmobile: lager: Correct setting of ethernet PHY LED mode
-
-The correct binding is "micrel,led-mode", not "led-mode".
-
-This corrects an error which was introduced when setting of ethernet PHY
-LED mode was added by 82e62182d59bd1d0 ("ARM: shmobile: lager: Set ethernet
-PHY LED mode").
-
-This makes the lager code consistent with the koelsch code which was added
-by ae00d12a032490b3 ("ARM: shmobile: koelsch: Set ethernet PHY LED mode").
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1c47a6aae8bc6113463c47e9b8d35e35e97411b2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index bbd6160b9b5c..e0126f015404 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -213,7 +213,7 @@
- reg = <1>;
- interrupt-parent = <&irqc0>;
- interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-- led-mode = <1>;
-+ micrel,led-mode = <1>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0600-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-D.patch b/patches.renesas/0600-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-D.patch
deleted file mode 100644
index 623271e50a063..0000000000000
--- a/patches.renesas/0600-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-D.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 145e6ea4e52df485f77da3fad6007cd06beb61c6 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 1 Apr 2014 13:02:17 +0200
-Subject: ARM: shmobile: r8a7790: Fix the I2C clocks parents in DT
-
-All I2C clocks derive from the HP clock, not from the P clock. Fix them.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3672b059e3a8582171863e1c588059a37aa56b75)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index da665fa92624..da821693e22a 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -758,7 +758,7 @@
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
- clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>,
-- <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>;
-+ <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD
---
-2.1.2
-
diff --git a/patches.renesas/0601-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-D.patch b/patches.renesas/0601-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-D.patch
deleted file mode 100644
index 74466cef63a42..0000000000000
--- a/patches.renesas/0601-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-D.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From becf8f1a26ac133cf225d3cf3205b7014a2245da Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 1 Apr 2014 13:02:18 +0200
-Subject: ARM: shmobile: r8a7791: Fix the I2C clocks parents in DT
-
-All I2C clocks derive from the HP clock, not from the P clock. Fix them.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 11b48db9321d11c623155a1c82544988508f9aca)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index e47a2fcd2627..44f03444ef74 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -805,9 +805,9 @@
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-- clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, <&p_clk>,
-- <&cp_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-- <&p_clk>, <&p_clk>;
-+ clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, <&hp_clk>,
-+ <&cp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>,
-+ <&hp_clk>, <&hp_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5
---
-2.1.2
-
diff --git a/patches.renesas/0602-ARM-shmobile-r8a7790-add-IIC-B-clocks-to-dtsi.patch b/patches.renesas/0602-ARM-shmobile-r8a7790-add-IIC-B-clocks-to-dtsi.patch
deleted file mode 100644
index f3bbe3d4a4dc5..0000000000000
--- a/patches.renesas/0602-ARM-shmobile-r8a7790-add-IIC-B-clocks-to-dtsi.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From dac357d3c86780b6dc94fbfc9d7b2cbae4ac0b3b Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 11 Mar 2014 22:24:37 +0100
-Subject: ARM: shmobile: r8a7790: add IIC(B) clocks to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-[horms+renesas@verge.net.au resolved conflicts]
-[horms+renesas@verge.net.au consistently use space as separator]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 17465149d8a1a3b7a00f02796d7d364522d0383b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 27 ++++++++++++++-------------
- 1 file changed, 14 insertions(+), 13 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index da821693e22a..eb63c45ad8ce 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -702,18 +702,19 @@
- mstp3_clks: mstp3_clks@e615013c {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
-- clocks = <&cp_clk>, <&mmc1_clk>, <&sd3_clk>, <&sd2_clk>,
-- <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>,
-- <&mmc0_clk>, <&rclk_clk>;
-+ clocks = <&hp_clk>, <&cp_clk>, <&mmc1_clk>, <&sd3_clk>,
-+ <&sd2_clk>, <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, <&mmc0_clk>,
-+ <&hp_clk>, <&hp_clk>, <&rclk_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-- R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
-- R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0
-- R8A7790_CLK_MMCIF0 R8A7790_CLK_CMT1
-+ R8A7790_CLK_IIC2 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
-+ R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 R8A7790_CLK_MMCIF0
-+ R8A7790_CLK_IIC0 R8A7790_CLK_IIC1 R8A7790_CLK_CMT1
- >;
- clock-output-names =
-- "tpu0", "mmcif1", "sdhi3", "sdhi2",
-- "sdhi1", "sdhi0", "mmcif0", "cmt1";
-+ "iic2", "tpu0", "mmcif1", "sdhi3",
-+ "sdhi2", "sdhi1", "sdhi0", "mmcif0",
-+ "iic0", "iic1", "cmt1";
- };
- mstp5_clks: mstp5_clks@e6150144 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
-@@ -757,16 +758,16 @@
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-- clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>,
-+ clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>, <&cp_clk>,
- <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-- R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD
-- R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1
-- R8A7790_CLK_I2C0
-+ R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD R8A7790_CLK_IICDVFS
-+ R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
- >;
- clock-output-names =
-- "rcan1", "rcan0", "qspi_mod", "i2c3", "i2c2", "i2c1", "i2c0";
-+ "rcan1", "rcan0", "qspi_mod", "iic3",
-+ "i2c3", "i2c2", "i2c1", "i2c0";
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0603-ARM-shmobile-r8a7790-add-IIC-B-cores-to-dtsi.patch b/patches.renesas/0603-ARM-shmobile-r8a7790-add-IIC-B-cores-to-dtsi.patch
deleted file mode 100644
index 761bb85d15b4e..0000000000000
--- a/patches.renesas/0603-ARM-shmobile-r8a7790-add-IIC-B-cores-to-dtsi.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 179f16d0a4e11c4c99e3ab9de23ac64912a27fce Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@sang-engineering.com>
-Date: Tue, 25 Mar 2014 19:56:29 +0100
-Subject: ARM: shmobile: r8a7790: add IIC(B) cores to dtsi
-
-Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 05f3991622013692b8ef428a6703663331544248)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 44 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 44 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index eb63c45ad8ce..d38d70339149 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -24,6 +24,10 @@
- i2c1 = &i2c1;
- i2c2 = &i2c2;
- i2c3 = &i2c3;
-+ i2c4 = &iic0;
-+ i2c5 = &iic1;
-+ i2c6 = &iic2;
-+ i2c7 = &iic3;
- spi0 = &qspi;
- spi1 = &msiof0;
- spi2 = &msiof1;
-@@ -236,6 +240,46 @@
- status = "disabled";
- };
-
-+ iic0: i2c@e6500000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
-+ reg = <0 0xe6500000 0 0x425>;
-+ interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7790_CLK_IIC0>;
-+ status = "disabled";
-+ };
-+
-+ iic1: i2c@e6510000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
-+ reg = <0 0xe6510000 0 0x425>;
-+ interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7790_CLK_IIC1>;
-+ status = "disabled";
-+ };
-+
-+ iic2: i2c@e6520000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
-+ reg = <0 0xe6520000 0 0x425>;
-+ interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7790_CLK_IIC2>;
-+ status = "disabled";
-+ };
-+
-+ iic3: i2c@e60b0000 {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ compatible = "renesas,iic-r8a7790", "renesas,rmobile-iic";
-+ reg = <0 0xe60b0000 0 0x425>;
-+ interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R8A7790_CLK_IICDVFS>;
-+ status = "disabled";
-+ };
-+
- mmcif0: mmcif@ee200000 {
- compatible = "renesas,mmcif-r8a7790", "renesas,sh-mmcif";
- reg = <0 0xee200000 0 0x80>;
---
-2.1.2
-
diff --git a/patches.renesas/0604-ARM-shmobile-r8a7778-remove-old-style-audio-clock.patch b/patches.renesas/0604-ARM-shmobile-r8a7778-remove-old-style-audio-clock.patch
deleted file mode 100644
index 88201a19012af..0000000000000
--- a/patches.renesas/0604-ARM-shmobile-r8a7778-remove-old-style-audio-clock.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From d6fcd883b4a1d3f67ab21d808039a7de55e4a05c Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:56:42 -0700
-Subject: ARM: shmobile: r8a7778: remove old style audio clock
-
-Current sound driver moves to new style clock,
-but is keeping compatiblity at this point.
-Move to new style on r8a7778
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a9d83bd6abc00e14e2db1660e2c7d889745bb3aa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7778.c | 22 +++++++++-------------
- 1 file changed, 9 insertions(+), 13 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 9989b1b06ffd..6609beb9b9b4 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -175,10 +175,6 @@ static struct clk mstp_clks[MSTP_NR] = {
-
- static struct clk_lookup lookups[] = {
- /* main */
-- CLKDEV_CON_ID("audio_clk_a", &audio_clk_a),
-- CLKDEV_CON_ID("audio_clk_b", &audio_clk_b),
-- CLKDEV_CON_ID("audio_clk_c", &audio_clk_c),
-- CLKDEV_CON_ID("audio_clk_internal", &s1_clk),
- CLKDEV_CON_ID("shyway_clk", &s_clk),
- CLKDEV_CON_ID("peripheral_clk", &p_clk),
-
-@@ -234,15 +230,15 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("ssi.6", "rcar_sound", &mstp_clks[MSTP309]),
- CLKDEV_ICK_ID("ssi.7", "rcar_sound", &mstp_clks[MSTP308]),
- CLKDEV_ICK_ID("ssi.8", "rcar_sound", &mstp_clks[MSTP307]),
-- CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP531]),
-- CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP530]),
-- CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP529]),
-- CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP528]),
-- CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP527]),
-- CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP526]),
-- CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP525]),
-- CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP524]),
-- CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP523]),
-+ CLKDEV_ICK_ID("src.0", "rcar_sound", &mstp_clks[MSTP531]),
-+ CLKDEV_ICK_ID("src.1", "rcar_sound", &mstp_clks[MSTP530]),
-+ CLKDEV_ICK_ID("src.2", "rcar_sound", &mstp_clks[MSTP529]),
-+ CLKDEV_ICK_ID("src.3", "rcar_sound", &mstp_clks[MSTP528]),
-+ CLKDEV_ICK_ID("src.4", "rcar_sound", &mstp_clks[MSTP527]),
-+ CLKDEV_ICK_ID("src.5", "rcar_sound", &mstp_clks[MSTP526]),
-+ CLKDEV_ICK_ID("src.6", "rcar_sound", &mstp_clks[MSTP525]),
-+ CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP524]),
-+ CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP523]),
- };
-
- void __init r8a7778_clock_init(void)
---
-2.1.2
-
diff --git a/patches.renesas/0605-ARM-shmobile-r8a7790-remove-old-style-audio-clock.patch b/patches.renesas/0605-ARM-shmobile-r8a7790-remove-old-style-audio-clock.patch
deleted file mode 100644
index e6c9bfc55a99a..0000000000000
--- a/patches.renesas/0605-ARM-shmobile-r8a7790-remove-old-style-audio-clock.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 48faf39521f8623127fe5ad0f3a136dfb6f501cf Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:56:50 -0700
-Subject: ARM: shmobile: r8a7790: remove old style audio clock
-
-Current sound driver moves to new style clock,
-but is keeping compatiblity at this point.
-Move to new style on r8a7790
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 932616eed0308cbebbb20a079e4bed3674bf1117)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 24 ++++++++++--------------
- 1 file changed, 10 insertions(+), 14 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 331013995fe3..a936ae7de083 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -294,10 +294,6 @@ static struct clk mstp_clks[MSTP_NR] = {
- static struct clk_lookup lookups[] = {
-
- /* main clocks */
-- CLKDEV_CON_ID("audio_clk_a", &audio_clk_a),
-- CLKDEV_CON_ID("audio_clk_b", &audio_clk_b),
-- CLKDEV_CON_ID("audio_clk_c", &audio_clk_c),
-- CLKDEV_CON_ID("audio_clk_internal", &m2_clk),
- CLKDEV_CON_ID("extal", &extal_clk),
- CLKDEV_CON_ID("extal_div2", &extal_div2_clk),
- CLKDEV_CON_ID("main", &main_clk),
-@@ -381,16 +377,16 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("clk_b", "rcar_sound", &audio_clk_b),
- CLKDEV_ICK_ID("clk_c", "rcar_sound", &audio_clk_c),
- CLKDEV_ICK_ID("clk_i", "rcar_sound", &m2_clk),
-- CLKDEV_ICK_ID("scu.0", "rcar_sound", &mstp_clks[MSTP1031]),
-- CLKDEV_ICK_ID("scu.1", "rcar_sound", &mstp_clks[MSTP1030]),
-- CLKDEV_ICK_ID("scu.2", "rcar_sound", &mstp_clks[MSTP1029]),
-- CLKDEV_ICK_ID("scu.3", "rcar_sound", &mstp_clks[MSTP1028]),
-- CLKDEV_ICK_ID("scu.4", "rcar_sound", &mstp_clks[MSTP1027]),
-- CLKDEV_ICK_ID("scu.5", "rcar_sound", &mstp_clks[MSTP1026]),
-- CLKDEV_ICK_ID("scu.6", "rcar_sound", &mstp_clks[MSTP1025]),
-- CLKDEV_ICK_ID("scu.7", "rcar_sound", &mstp_clks[MSTP1024]),
-- CLKDEV_ICK_ID("scu.8", "rcar_sound", &mstp_clks[MSTP1023]),
-- CLKDEV_ICK_ID("scu.9", "rcar_sound", &mstp_clks[MSTP1022]),
-+ CLKDEV_ICK_ID("src.0", "rcar_sound", &mstp_clks[MSTP1031]),
-+ CLKDEV_ICK_ID("src.1", "rcar_sound", &mstp_clks[MSTP1030]),
-+ CLKDEV_ICK_ID("src.2", "rcar_sound", &mstp_clks[MSTP1029]),
-+ CLKDEV_ICK_ID("src.3", "rcar_sound", &mstp_clks[MSTP1028]),
-+ CLKDEV_ICK_ID("src.4", "rcar_sound", &mstp_clks[MSTP1027]),
-+ CLKDEV_ICK_ID("src.5", "rcar_sound", &mstp_clks[MSTP1026]),
-+ CLKDEV_ICK_ID("src.6", "rcar_sound", &mstp_clks[MSTP1025]),
-+ CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP1024]),
-+ CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP1023]),
-+ CLKDEV_ICK_ID("src.9", "rcar_sound", &mstp_clks[MSTP1022]),
- CLKDEV_ICK_ID("ssi.0", "rcar_sound", &mstp_clks[MSTP1015]),
- CLKDEV_ICK_ID("ssi.1", "rcar_sound", &mstp_clks[MSTP1014]),
- CLKDEV_ICK_ID("ssi.2", "rcar_sound", &mstp_clks[MSTP1013]),
---
-2.1.2
-
diff --git a/patches.renesas/0606-ARM-shmobile-bockw-remove-old-style-audio-clock.patch b/patches.renesas/0606-ARM-shmobile-bockw-remove-old-style-audio-clock.patch
deleted file mode 100644
index 30dc8b64d8df3..0000000000000
--- a/patches.renesas/0606-ARM-shmobile-bockw-remove-old-style-audio-clock.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From bc01e1fec58ab06f1aadf54e449201c9d0629bc5 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:56:57 -0700
-Subject: ARM: shmobile: bockw: remove old style audio clock
-
-Current audio clock didn't have dependency to device/driver,
-but, it was not good design for DT support.
-To avoid branch merge conflict issue,
-it is using this load map, and this patch is 3) part.
- 1) add new style clock in platform
- 2) add new style clock method in driver
- 3) remove old tyle clock from platform
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 115897dab004f580fc8b4c6bab057940ccb64989)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index b4122f8cb8d9..1aca107f959f 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -591,6 +591,7 @@ static void __init bockw_init(void)
- {
- void __iomem *base;
- struct clk *clk;
-+ struct platform_device *pdev;
- int i;
-
- r8a7778_clock_init();
-@@ -673,9 +674,6 @@ static void __init bockw_init(void)
- }
-
- /* for Audio */
-- clk = clk_get(NULL, "audio_clk_b");
-- clk_set_rate(clk, 24576000);
-- clk_put(clk);
- rsnd_codec_power(5, 1); /* enable ak4642 */
-
- platform_device_register_simple(
-@@ -684,11 +682,15 @@ static void __init bockw_init(void)
- platform_device_register_simple(
- "ak4554-adc-dac", 1, NULL, 0);
-
-- platform_device_register_resndata(
-+ pdev = platform_device_register_resndata(
- &platform_bus, "rcar_sound", -1,
- rsnd_resources, ARRAY_SIZE(rsnd_resources),
- &rsnd_info, sizeof(rsnd_info));
-
-+ clk = clk_get(&pdev->dev, "clk_b");
-+ clk_set_rate(clk, 24576000);
-+ clk_put(clk);
-+
- for (i = 0; i < ARRAY_SIZE(rsnd_card_info); i++) {
- struct platform_device_info cardinfo = {
- .parent = &platform_bus,
---
-2.1.2
-
diff --git a/patches.renesas/0607-ARM-shmobile-bockw-switch-to-use-dai-info-for-R-Car-.patch b/patches.renesas/0607-ARM-shmobile-bockw-switch-to-use-dai-info-for-R-Car-.patch
deleted file mode 100644
index 72663d96dc896..0000000000000
--- a/patches.renesas/0607-ARM-shmobile-bockw-switch-to-use-dai-info-for-R-Car-.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 72fb9d57d0b5a30491a49eabf64993cbfdb89d7a Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:57:05 -0700
-Subject: ARM: shmobile: bockw: switch to use dai info for R-Car sound
-
-Now, R-Car sound driver supports dai info settings.
-switch to use it
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a3f50d1bdd47dfa07cb42f7d954739389664f166)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw.c | 53 ++++++++++++++++++++++++------------
- 1 file changed, 35 insertions(+), 18 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index 1aca107f959f..f444be2f241e 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -345,24 +345,39 @@ static struct rsnd_ssi_platform_info rsnd_ssi[] = {
- RSND_SSI_UNUSED, /* SSI 0 */
- RSND_SSI_UNUSED, /* SSI 1 */
- RSND_SSI_UNUSED, /* SSI 2 */
-- RSND_SSI_SET(1, HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), RSND_SSI_PLAY),
-- RSND_SSI_SET(2, HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
-- RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), RSND_SSI_PLAY),
-- RSND_SSI_SET(0, HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0),
-- RSND_SSI_SET(3, HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), RSND_SSI_PLAY),
-- RSND_SSI_SET(4, HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI(HPBDMA_SLAVE_HPBIF3_TX, gic_iid(0x85), 0),
-+ RSND_SSI(HPBDMA_SLAVE_HPBIF4_RX, gic_iid(0x85), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI(HPBDMA_SLAVE_HPBIF5_TX, gic_iid(0x86), 0),
-+ RSND_SSI(HPBDMA_SLAVE_HPBIF6_RX, gic_iid(0x86), 0),
-+ RSND_SSI(HPBDMA_SLAVE_HPBIF7_TX, gic_iid(0x86), 0),
-+ RSND_SSI(HPBDMA_SLAVE_HPBIF8_RX, gic_iid(0x86), RSND_SSI_CLK_PIN_SHARE),
- };
-
--static struct rsnd_scu_platform_info rsnd_scu[9] = {
-- { .flags = 0, }, /* SRU 0 */
-- { .flags = 0, }, /* SRU 1 */
-- { .flags = 0, }, /* SRU 2 */
-- { .flags = RSND_SCU_USE_HPBIF, },
-- { .flags = RSND_SCU_USE_HPBIF, },
-- { .flags = RSND_SCU_USE_HPBIF, },
-- { .flags = RSND_SCU_USE_HPBIF, },
-- { .flags = RSND_SCU_USE_HPBIF, },
-- { .flags = RSND_SCU_USE_HPBIF, },
-+static struct rsnd_src_platform_info rsnd_src[9] = {
-+ RSND_SRC_UNUSED, /* SRU 0 */
-+ RSND_SRC_UNUSED, /* SRU 1 */
-+ RSND_SRC_UNUSED, /* SRU 2 */
-+ RSND_SRC(0, 0),
-+ RSND_SRC(0, 0),
-+ RSND_SRC(0, 0),
-+ RSND_SRC(0, 0),
-+ RSND_SRC(0, 0),
-+ RSND_SRC(0, 0),
-+};
-+
-+static struct rsnd_dai_platform_info rsnd_dai[] = {
-+ {
-+ .playback = { .ssi = &rsnd_ssi[5], .src = &rsnd_src[5] },
-+ .capture = { .ssi = &rsnd_ssi[6], .src = &rsnd_src[6] },
-+ }, {
-+ .playback = { .ssi = &rsnd_ssi[3], .src = &rsnd_src[3] },
-+ }, {
-+ .capture = { .ssi = &rsnd_ssi[4], .src = &rsnd_src[4] },
-+ }, {
-+ .playback = { .ssi = &rsnd_ssi[7], .src = &rsnd_src[7] },
-+ }, {
-+ .capture = { .ssi = &rsnd_ssi[8], .src = &rsnd_src[8] },
-+ },
- };
-
- enum {
-@@ -437,8 +452,10 @@ static struct rcar_snd_info rsnd_info = {
- .flags = RSND_GEN1,
- .ssi_info = rsnd_ssi,
- .ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
-- .scu_info = rsnd_scu,
-- .scu_info_nr = ARRAY_SIZE(rsnd_scu),
-+ .src_info = rsnd_src,
-+ .src_info_nr = ARRAY_SIZE(rsnd_src),
-+ .dai_info = rsnd_dai,
-+ .dai_info_nr = ARRAY_SIZE(rsnd_dai),
- .start = rsnd_start,
- .stop = rsnd_stop,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0608-ARM-shmobile-lager-switch-to-use-dai-info-for-R-Car-.patch b/patches.renesas/0608-ARM-shmobile-lager-switch-to-use-dai-info-for-R-Car-.patch
deleted file mode 100644
index 0a0113b609c43..0000000000000
--- a/patches.renesas/0608-ARM-shmobile-lager-switch-to-use-dai-info-for-R-Car-.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 46d3595e32833a17780de5eed3257d6c145bd77f Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 13 Apr 2014 17:57:12 -0700
-Subject: ARM: shmobile: lager: switch to use dai info for R-Car sound
-
-Now, R-Car sound driver supports dai info settings.
-switch to use it
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 50f359d7389be354b46d781f3b234d3008d20f2f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 17 ++++++++++++-----
- 1 file changed, 12 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 18c7e0311aa6..05c263b5de59 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -567,20 +567,27 @@ static struct resource rsnd_resources[] __initdata = {
- };
-
- static struct rsnd_ssi_platform_info rsnd_ssi[] = {
-- RSND_SSI_SET(0, 0, gic_spi(370), RSND_SSI_PLAY),
-- RSND_SSI_SET(0, 0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE),
-+ RSND_SSI(0, gic_spi(370), 0),
-+ RSND_SSI(0, gic_spi(371), RSND_SSI_CLK_PIN_SHARE),
- };
-
--static struct rsnd_scu_platform_info rsnd_scu[2] = {
-+static struct rsnd_src_platform_info rsnd_src[2] = {
- /* no member at this point */
- };
-
-+static struct rsnd_dai_platform_info rsnd_dai = {
-+ .playback = { .ssi = &rsnd_ssi[0], },
-+ .capture = { .ssi = &rsnd_ssi[1], },
-+};
-+
- static struct rcar_snd_info rsnd_info = {
- .flags = RSND_GEN2,
- .ssi_info = rsnd_ssi,
- .ssi_info_nr = ARRAY_SIZE(rsnd_ssi),
-- .scu_info = rsnd_scu,
-- .scu_info_nr = ARRAY_SIZE(rsnd_scu),
-+ .src_info = rsnd_src,
-+ .src_info_nr = ARRAY_SIZE(rsnd_src),
-+ .dai_info = &rsnd_dai,
-+ .dai_info_nr = 1,
- };
-
- static struct asoc_simple_card_info rsnd_card_info = {
---
-2.1.2
-
diff --git a/patches.renesas/0609-ARM-shmobile-koelsch-legacy-Enable-Quad-SPI-transfer.patch b/patches.renesas/0609-ARM-shmobile-koelsch-legacy-Enable-Quad-SPI-transfer.patch
deleted file mode 100644
index ee690cc21be94..0000000000000
--- a/patches.renesas/0609-ARM-shmobile-koelsch-legacy-Enable-Quad-SPI-transfer.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9679362cca951fbe3f123448e742fb6e83572220 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 19:35:57 +0200
-Subject: ARM: shmobile: koelsch legacy: Enable Quad SPI transfers for the SPI
- FLASH
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4d4a0ff30c39b82c1dc549f2cc7a62b514431e64)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 5a034ff405d0..a12a9d3b4b6e 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -216,7 +216,7 @@ static const struct spi_board_info spi_info[] __initconst = {
- {
- .modalias = "m25p80",
- .platform_data = &spi_flash_data,
-- .mode = SPI_MODE_0,
-+ .mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
- .max_speed_hz = 30000000,
- .bus_num = 0,
- .chip_select = 0,
---
-2.1.2
-
diff --git a/patches.renesas/0610-ARM-shmobile-koelsch-dts-Enable-Quad-SPI-transfers-f.patch b/patches.renesas/0610-ARM-shmobile-koelsch-dts-Enable-Quad-SPI-transfers-f.patch
deleted file mode 100644
index ba2b6107f2c31..0000000000000
--- a/patches.renesas/0610-ARM-shmobile-koelsch-dts-Enable-Quad-SPI-transfers-f.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9c5902777d484334144a0dd8d5fda2a8270be924 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 19:35:58 +0200
-Subject: ARM: shmobile: koelsch dts: Enable Quad SPI transfers for the SPI
- FLASH
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ed56083acfe7c872318b8321c7d0e25a6b520371)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 3b25a0c0de0c..0d69813def85 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -354,6 +354,8 @@
- compatible = "spansion,s25fl512s";
- reg = <0>;
- spi-max-frequency = <30000000>;
-+ spi-tx-bus-width = <4>;
-+ spi-rx-bus-width = <4>;
- m25p,fast-read;
-
- partition@0 {
---
-2.1.2
-
diff --git a/patches.renesas/0611-ARM-shmobile-lager-dts-Enable-Quad-SPI-transfers-for.patch b/patches.renesas/0611-ARM-shmobile-lager-dts-Enable-Quad-SPI-transfers-for.patch
deleted file mode 100644
index 7c582ffec23ef..0000000000000
--- a/patches.renesas/0611-ARM-shmobile-lager-dts-Enable-Quad-SPI-transfers-for.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 6b4856e92f5583794daa563c753deaa4bcd9efa2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 19:36:00 +0200
-Subject: ARM: shmobile: lager dts: Enable Quad SPI transfers for the SPI FLASH
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9909d2cb41a9c752cbbef5d9fb57d80a7196e951)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index e0126f015404..86d676f62942 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -243,6 +243,8 @@
- compatible = "spansion,s25fl512s";
- reg = <0>;
- spi-max-frequency = <30000000>;
-+ spi-tx-bus-width = <4>;
-+ spi-rx-bus-width = <4>;
- m25p,fast-read;
-
- partition@0 {
---
-2.1.2
-
diff --git a/patches.renesas/0612-ARM-shmobile-lager-legacy-Enable-Quad-SPI-transfers-.patch b/patches.renesas/0612-ARM-shmobile-lager-legacy-Enable-Quad-SPI-transfers-.patch
deleted file mode 100644
index 5b67d5b41436e..0000000000000
--- a/patches.renesas/0612-ARM-shmobile-lager-legacy-Enable-Quad-SPI-transfers-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 3069df3d2dfbba4408e6d57a7386312a9c59fc8f Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 14 Apr 2014 19:35:59 +0200
-Subject: ARM: shmobile: lager legacy: Enable Quad SPI transfers for the SPI
- FLASH
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a09b2f0ba170dc89a67d6c4c4f027b37a085dad9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 05c263b5de59..f8b1e05463cc 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -325,12 +325,12 @@ static const struct rspi_plat_data qspi_pdata __initconst = {
-
- static const struct spi_board_info spi_info[] __initconst = {
- {
-- .modalias = "m25p80",
-- .platform_data = &spi_flash_data,
-- .mode = SPI_MODE_0,
-- .max_speed_hz = 30000000,
-- .bus_num = 0,
-- .chip_select = 0,
-+ .modalias = "m25p80",
-+ .platform_data = &spi_flash_data,
-+ .mode = SPI_MODE_0 | SPI_TX_QUAD | SPI_RX_QUAD,
-+ .max_speed_hz = 30000000,
-+ .bus_num = 0,
-+ .chip_select = 0,
- },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0613-ARM-shmobile-r8a7740-Remove-unused-r8a7740_add_early.patch b/patches.renesas/0613-ARM-shmobile-r8a7740-Remove-unused-r8a7740_add_early.patch
deleted file mode 100644
index 3e9523528f712..0000000000000
--- a/patches.renesas/0613-ARM-shmobile-r8a7740-Remove-unused-r8a7740_add_early.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From a91a29902d51f369e5523a47aa575fd90346d1f7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Tue, 15 Apr 2014 14:33:57 +0200
-Subject: ARM: shmobile: r8a7740: Remove unused r8a7740_add_early_devices_dt()
-
-It was removed in commit 744fdc8dc0e22cc5b61ee1bcde9375f188daa330 ("ARM:
-shmobile: r8a7740: Prepare for reference DT setup"), but accidentally
-resurrected in commit 88378837780166d67a11142cd6f76596c0a2d8c3 ("ARM:
-shmobile: Remove unused r8a7740 auxdata table").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 72dc392ae5bbad3477053ac4c5708dba6706ffa0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7740.c | 11 -----------
- 1 file changed, 11 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 8f3c68101d59..cba3a07a97c2 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -869,17 +869,6 @@ void __init r8a7740_add_early_devices(void)
-
- #ifdef CONFIG_USE_OF
-
--void __init r8a7740_add_early_devices_dt(void)
--{
-- shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
--
-- early_platform_add_devices(r8a7740_early_devices,
-- ARRAY_SIZE(r8a7740_early_devices));
--
-- /* setup early console here as well */
-- shmobile_setup_console();
--}
--
- void __init r8a7740_add_standard_devices_dt(void)
- {
- platform_add_devices(r8a7740_devices_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0614-ARM-shmobile-sh7372-Call-sh7372_add_early_devices-in.patch b/patches.renesas/0614-ARM-shmobile-sh7372-Call-sh7372_add_early_devices-in.patch
deleted file mode 100644
index 6a56e75f0b0ab..0000000000000
--- a/patches.renesas/0614-ARM-shmobile-sh7372-Call-sh7372_add_early_devices-in.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From a0deb723c438dee7513aa7d865f92602d654146e Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Tue, 15 Apr 2014 14:33:59 +0200
-Subject: ARM: shmobile: sh7372: Call sh7372_add_early_devices() instead of
- open coding
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1fba31f047639a6c7accf4f6d075a6cf9eacecc0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-sh7372.c | 6 +-----
- 1 file changed, 1 insertion(+), 5 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 27301278c208..f8176b051be4 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -1037,11 +1037,7 @@ void __init sh7372_add_early_devices_dt(void)
- {
- shmobile_setup_delay(800, 1, 3); /* Cortex-A8 @ 800MHz */
-
-- early_platform_add_devices(sh7372_early_devices,
-- ARRAY_SIZE(sh7372_early_devices));
--
-- /* setup early console here as well */
-- shmobile_setup_console();
-+ sh7372_add_early_devices();
- }
-
- void __init sh7372_add_standard_devices_dt(void)
---
-2.1.2
-
diff --git a/patches.renesas/0615-ARM-shmobile-r8a7740-Make-r8a7740_meram_workaround-_.patch b/patches.renesas/0615-ARM-shmobile-r8a7740-Make-r8a7740_meram_workaround-_.patch
deleted file mode 100644
index e257d8a9dc2ab..0000000000000
--- a/patches.renesas/0615-ARM-shmobile-r8a7740-Make-r8a7740_meram_workaround-_.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From da70ebf307b8c7d1da22bc9fe0eb91e8d70a2a00 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Tue, 15 Apr 2014 14:33:58 +0200
-Subject: ARM: shmobile: r8a7740: Make r8a7740_meram_workaround() __init
-
-It's called from eva_init() only, which is __init
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bb6c3d58c36adb205b4bf233fd1c4079e02a6811)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index cba3a07a97c2..a177a7b3bdbd 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -765,7 +765,7 @@ static struct platform_device *r8a7740_late_devices[] __initdata = {
- * "Media RAM (MERAM)" on r8a7740 documentation
- */
- #define MEBUFCNTR 0xFE950098
--void r8a7740_meram_workaround(void)
-+void __init r8a7740_meram_workaround(void)
- {
- void __iomem *reg;
-
---
-2.1.2
-
diff --git a/patches.renesas/0616-ARM-shmobile-armadillo-reference-dts-Seiko-Instrumen.patch b/patches.renesas/0616-ARM-shmobile-armadillo-reference-dts-Seiko-Instrumen.patch
deleted file mode 100644
index 511bd63a814c2..0000000000000
--- a/patches.renesas/0616-ARM-shmobile-armadillo-reference-dts-Seiko-Instrumen.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From db9dec57c3e47b8b344bcea873b0946520e23b9f Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Tue, 15 Apr 2014 14:51:50 +0200
-Subject: ARM: shmobile: armadillo-reference dts: Seiko Instruments, Inc is
- "sii"
-
-Use "sii,s35390a" instead of "seiko,s35390a", cfr.
-Documentation/devicetree/bindings/i2c/trivial-devices.txt and
-Documentation/devicetree/bindings/vendor-prefixes.txt.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit dd485ab9a88267f4db0d58ace23b19e876ebf8ac)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index 0cb235a450b9..10344e6edd20 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -180,7 +180,7 @@
- &i2c2 {
- status = "okay";
- rtc@30 {
-- compatible = "seiko,s35390a";
-+ compatible = "sii,s35390a";
- reg = <0x30>;
- };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0617-ARM-shmobile-Ignore-callbacks-for-subsys-generic_pm_.patch b/patches.renesas/0617-ARM-shmobile-Ignore-callbacks-for-subsys-generic_pm_.patch
deleted file mode 100644
index da718943142ba..0000000000000
--- a/patches.renesas/0617-ARM-shmobile-Ignore-callbacks-for-subsys-generic_pm_.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 28a2a11738940e5ca3ce363488bd1dc96428121f Mon Sep 17 00:00:00 2001
-From: Ulf Hansson <ulf.hansson@linaro.org>
-Date: Fri, 11 Apr 2014 17:26:41 +0200
-Subject: ARM: shmobile: Ignore callbacks for subsys generic_pm_domain_data
-
-There are no active users of these callbacks, thus there are no benefit
-of trying to invoke them.
-
-Cc: Simon Horman <horms@verge.net.au>
-Cc: Magnus Damm <magnus.damm@gmail.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ab496b9d259e754f5d646219e4f032b274b9fffe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/pm-rmobile.c | 38 +++----------------------------------
- 1 file changed, 3 insertions(+), 35 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
-index 1fc05d9453d0..f710235aff2f 100644
---- a/arch/arm/mach-shmobile/pm-rmobile.c
-+++ b/arch/arm/mach-shmobile/pm-rmobile.c
-@@ -99,39 +99,7 @@ static int rmobile_pd_power_up(struct generic_pm_domain *genpd)
-
- static bool rmobile_pd_active_wakeup(struct device *dev)
- {
-- bool (*active_wakeup)(struct device *dev);
--
-- active_wakeup = dev_gpd_data(dev)->ops.active_wakeup;
-- return active_wakeup ? active_wakeup(dev) : true;
--}
--
--static int rmobile_pd_stop_dev(struct device *dev)
--{
-- int (*stop)(struct device *dev);
--
-- stop = dev_gpd_data(dev)->ops.stop;
-- if (stop) {
-- int ret = stop(dev);
-- if (ret)
-- return ret;
-- }
-- return pm_clk_suspend(dev);
--}
--
--static int rmobile_pd_start_dev(struct device *dev)
--{
-- int (*start)(struct device *dev);
-- int ret;
--
-- ret = pm_clk_resume(dev);
-- if (ret)
-- return ret;
--
-- start = dev_gpd_data(dev)->ops.start;
-- if (start)
-- ret = start(dev);
--
-- return ret;
-+ return true;
- }
-
- static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
-@@ -140,8 +108,8 @@ static void rmobile_init_pm_domain(struct rmobile_pm_domain *rmobile_pd)
- struct dev_power_governor *gov = rmobile_pd->gov;
-
- pm_genpd_init(genpd, gov ? : &simple_qos_governor, false);
-- genpd->dev_ops.stop = rmobile_pd_stop_dev;
-- genpd->dev_ops.start = rmobile_pd_start_dev;
-+ genpd->dev_ops.stop = pm_clk_suspend;
-+ genpd->dev_ops.start = pm_clk_resume;
- genpd->dev_ops.active_wakeup = rmobile_pd_active_wakeup;
- genpd->dev_irq_safe = true;
- genpd->power_off = rmobile_pd_power_down;
---
-2.1.2
-
diff --git a/patches.renesas/0618-ARM-shmobile-henninger-initial-device-tree.patch b/patches.renesas/0618-ARM-shmobile-henninger-initial-device-tree.patch
deleted file mode 100644
index 61ddcdcceef83..0000000000000
--- a/patches.renesas/0618-ARM-shmobile-henninger-initial-device-tree.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From ca93af9a38b50a06ffa5e4df8ae87d613955f994 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Fri, 25 Apr 2014 02:42:41 +0400
-Subject: ARM: shmobile: henninger: initial device tree
-
-Add the initial device tree for the R8A7791 SoC based Henninger board. SCIF0
-serial port support is included, so that the serial console can work.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4b37ab033e6f8c9750f98fefe9bdc341b6943268)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/Makefile | 1 +
- arch/arm/boot/dts/r8a7791-henninger.dts | 50 +++++++++++++++++++++++++++++++++
- 2 files changed, 51 insertions(+)
- create mode 100644 arch/arm/boot/dts/r8a7791-henninger.dts
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 41927cc4b0ee..234247b51db7 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -261,6 +261,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
- sh7372-mackerel.dtb
- dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
- r7s72100-genmai-reference.dtb \
-+ r8a7791-henninger.dtb \
- r8a7791-koelsch.dtb \
- r8a7790-lager.dtb
- dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-new file mode 100644
-index 000000000000..0053f52bc969
---- /dev/null
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -0,0 +1,50 @@
-+/*
-+ * Device Tree Source for the Henninger board
-+ *
-+ * Copyright (C) 2014 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Cogent Embedded, Inc.
-+ *
-+ * This file is licensed under the terms of the GNU General Public License
-+ * version 2. This program is licensed "as is" without any warranty of any
-+ * kind, whether express or implied.
-+ */
-+
-+/dts-v1/;
-+#include "r8a7791.dtsi"
-+
-+/ {
-+ model = "Henninger";
-+ compatible = "renesas,henninger", "renesas,r8a7791";
-+
-+ aliases {
-+ serial0 = &scif0;
-+ };
-+
-+ chosen {
-+ bootargs = "console=ttySC0,38400 ignore_loglevel";
-+ };
-+
-+ memory@40000000 {
-+ device_type = "memory";
-+ reg = <0 0x40000000 0 0x40000000>;
-+ };
-+
-+ memory@200000000 {
-+ device_type = "memory";
-+ reg = <2 0x00000000 0 0x40000000>;
-+ };
-+};
-+
-+&pfc {
-+ scif0_pins: serial0 {
-+ renesas,groups = "scif0_data_d";
-+ renesas,function = "scif0";
-+ };
-+};
-+
-+&scif0 {
-+ pinctrl-0 = <&scif0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0619-ARM-shmobile-henninger-add-Ether-DT-support.patch b/patches.renesas/0619-ARM-shmobile-henninger-add-Ether-DT-support.patch
deleted file mode 100644
index 15c1dffc16d94..0000000000000
--- a/patches.renesas/0619-ARM-shmobile-henninger-add-Ether-DT-support.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From d4afdefd17b4d7942552a352245c0afcad03fd73 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Fri, 25 Apr 2014 02:44:12 +0400
-Subject: ARM: shmobile: henninger: add Ether DT support
-
-Define the Henninger board dependent part of the Ether device node.
-Enable DHCP and NFS root for the kernel booting.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 26b0d2cf73cb5091962c81598a36346d05e9ba83)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 28 +++++++++++++++++++++++++++-
- 1 file changed, 27 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index 0053f52bc969..f82f306c074d 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -21,7 +21,7 @@
- };
-
- chosen {
-- bootargs = "console=ttySC0,38400 ignore_loglevel";
-+ bootargs = "console=ttySC0,38400 ignore_loglevel rw root=/dev/nfs ip=dhcp";
- };
-
- memory@40000000 {
-@@ -40,6 +40,16 @@
- renesas,groups = "scif0_data_d";
- renesas,function = "scif0";
- };
-+
-+ ether_pins: ether {
-+ renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
-+ renesas,function = "eth";
-+ };
-+
-+ phy1_pins: phy1 {
-+ renesas,groups = "intc_irq0";
-+ renesas,function = "intc";
-+ };
- };
-
- &scif0 {
-@@ -48,3 +58,19 @@
-
- status = "okay";
- };
-+
-+&ether {
-+ pinctrl-0 = <&ether_pins &phy1_pins>;
-+ pinctrl-names = "default";
-+
-+ phy-handle = <&phy1>;
-+ renesas,ether-link-active-low;
-+ status = "ok";
-+
-+ phy1: ethernet-phy@1 {
-+ reg = <1>;
-+ interrupt-parent = <&irqc0>;
-+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
-+ micrel,led-mode = <1>;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0620-ARM-shmobile-henninger-enable-SATA0.patch b/patches.renesas/0620-ARM-shmobile-henninger-enable-SATA0.patch
deleted file mode 100644
index 46cb86e2670e5..0000000000000
--- a/patches.renesas/0620-ARM-shmobile-henninger-enable-SATA0.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 8a4a9a92ff1b5f8df020195bd09d5e73180c3f7c Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 26 Apr 2014 02:51:27 +0400
-Subject: ARM: shmobile: henninger: enable SATA0
-
-Enable SATA0 device for the Henninger board.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5a62ec57004f1a434bfd3feed43e447b5780baf6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index f82f306c074d..6e67cea3104c 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -74,3 +74,7 @@
- micrel,led-mode = <1>;
- };
- };
-+
-+&sata0 {
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0621-ARM-shmobile-henninger-specify-EXTAL-frequency.patch b/patches.renesas/0621-ARM-shmobile-henninger-specify-EXTAL-frequency.patch
deleted file mode 100644
index 09f3e67b0446f..0000000000000
--- a/patches.renesas/0621-ARM-shmobile-henninger-specify-EXTAL-frequency.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From ba15e086d93e12aa00a23f58540dc17d71e4cbc0 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Fri, 2 May 2014 02:56:33 +0400
-Subject: ARM: shmobile: henninger: specify EXTAL frequency
-
-When creating the initial device tree for the Henninger board, I've overlooked
-that EXTAL frequency needs to be overridden there. The 'sh-sci' driver managed
-to work somehow but the SDHI driver that I've tried to enable just hanged with
-the default EXTAL frequency of 0...
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2af0d93762e91d4496cc2e63761c70ae9f50f997)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index 6e67cea3104c..0a655231d531 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -35,6 +35,10 @@
- };
- };
-
-+&extal_clk {
-+ clock-frequency = <20000000>;
-+};
-+
- &pfc {
- scif0_pins: serial0 {
- renesas,groups = "scif0_data_d";
---
-2.1.2
-
diff --git a/patches.renesas/0622-ARM-shmobile-henninger-add-SDHI0-2-DT-support.patch b/patches.renesas/0622-ARM-shmobile-henninger-add-SDHI0-2-DT-support.patch
deleted file mode 100644
index e089148d852d4..0000000000000
--- a/patches.renesas/0622-ARM-shmobile-henninger-add-SDHI0-2-DT-support.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From cd677f69f985d751616fb0cc55873953af7e96f5 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 3 May 2014 21:04:34 +0400
-Subject: ARM: shmobile: henninger: add SDHI0/2 DT support
-
-Define the Henninger board dependent part of the SDHI0/2 device nodes along with
-the necessary voltage regulators (note that the Vcc regulators are dummy -- they
-are required but don't actually exist on the board). Also, GPIOs have to be used
-for the CD and WP signals due to the SDHI driver constraints...
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1299df03d7191ab4356c995dde8b912d3c8922e9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 76 +++++++++++++++++++++++++++++++++
- 1 file changed, 76 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index 0a655231d531..2e45c06dd96b 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -11,6 +11,7 @@
-
- /dts-v1/;
- #include "r8a7791.dtsi"
-+#include <dt-bindings/gpio/gpio.h>
-
- / {
- model = "Henninger";
-@@ -33,6 +34,50 @@
- device_type = "memory";
- reg = <2 0x00000000 0 0x40000000>;
- };
-+
-+ vcc_sdhi0: regulator@0 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI0 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-always-on;
-+ };
-+
-+ vccq_sdhi0: regulator@1 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI0 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
-+
-+ vcc_sdhi2: regulator@2 {
-+ compatible = "regulator-fixed";
-+
-+ regulator-name = "SDHI2 Vcc";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-always-on;
-+ };
-+
-+ vccq_sdhi2: regulator@3 {
-+ compatible = "regulator-gpio";
-+
-+ regulator-name = "SDHI2 VccQ";
-+ regulator-min-microvolt = <1800000>;
-+ regulator-max-microvolt = <3300000>;
-+
-+ gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
-+ gpios-states = <1>;
-+ states = <3300000 1
-+ 1800000 0>;
-+ };
- };
-
- &extal_clk {
-@@ -54,6 +99,16 @@
- renesas,groups = "intc_irq0";
- renesas,function = "intc";
- };
-+
-+ sdhi0_pins: sd0 {
-+ renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
-+ renesas,function = "sdhi0";
-+ };
-+
-+ sdhi2_pins: sd2 {
-+ renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
-+ renesas,function = "sdhi2";
-+ };
- };
-
- &scif0 {
-@@ -82,3 +137,24 @@
- &sata0 {
- status = "okay";
- };
-+
-+&sdhi0 {
-+ pinctrl-0 = <&sdhi0_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi0>;
-+ vqmmc-supply = <&vccq_sdhi0>;
-+ cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
-+ wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
-+ status = "okay";
-+};
-+
-+&sdhi2 {
-+ pinctrl-0 = <&sdhi2_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&vcc_sdhi2>;
-+ vqmmc-supply = <&vccq_sdhi2>;
-+ cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0623-ARM-shmobile-henninger-add-QSPI-DT-support.patch b/patches.renesas/0623-ARM-shmobile-henninger-add-QSPI-DT-support.patch
deleted file mode 100644
index 4d98cda3bccf0..0000000000000
--- a/patches.renesas/0623-ARM-shmobile-henninger-add-QSPI-DT-support.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 3251845df5eaef00d9fd27c3e8164cc52cc69f50 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 6 May 2014 02:45:31 +0400
-Subject: ARM: shmobile: henninger: add QSPI DT support
-
-Define the Henninger board dependent part of the QSPI device node.
-Add device nodes for Spansion S25FL512S SPI flash and MTD partitions on it.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f59838d448356feb4f0ce70785a49045d842c9c3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 38 +++++++++++++++++++++++++++++++++
- 1 file changed, 38 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index 2e45c06dd96b..1d715a3a6bb5 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -109,6 +109,11 @@
- renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
- renesas,function = "sdhi2";
- };
-+
-+ qspi_pins: spi0 {
-+ renesas,groups = "qspi_ctrl", "qspi_data4";
-+ renesas,function = "qspi";
-+ };
- };
-
- &scif0 {
-@@ -158,3 +163,36 @@
- cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
- status = "okay";
- };
-+
-+&qspi {
-+ pinctrl-0 = <&qspi_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ flash@0 {
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+ compatible = "spansion,s25fl512s";
-+ reg = <0>;
-+ spi-max-frequency = <30000000>;
-+ spi-tx-bus-width = <4>;
-+ spi-rx-bus-width = <4>;
-+ m25p,fast-read;
-+
-+ partition@0 {
-+ label = "loader_prg";
-+ reg = <0x00000000 0x00040000>;
-+ read-only;
-+ };
-+ partition@40000 {
-+ label = "user_prg";
-+ reg = <0x00040000 0x00400000>;
-+ read-only;
-+ };
-+ partition@440000 {
-+ label = "flash_fs";
-+ reg = <0x00440000 0x03bc0000>;
-+ };
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0624-ARM-shmobile-henninger-add-MSIOF0-DT-support.patch b/patches.renesas/0624-ARM-shmobile-henninger-add-MSIOF0-DT-support.patch
deleted file mode 100644
index 0624f85ddba1f..0000000000000
--- a/patches.renesas/0624-ARM-shmobile-henninger-add-MSIOF0-DT-support.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 7526bccbe261402f30b3294f303e8fedf9f460f7 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Wed, 7 May 2014 00:47:59 +0400
-Subject: ARM: shmobile: henninger: add MSIOF0 DT support
-
-Define the Henninger board dependent part of the MSIOF0 device node.
-Add device node for Renesas R2A11302FT PMIC for which no bindings exist yet.
-
-Based on the Koelsch MSIOF device tree patch by Geert Uytterhoeven.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 667366bff7c4d38c6efa60f2e32d13c26a58d7d4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index 1d715a3a6bb5..cc6d992e8db2 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -114,6 +114,12 @@
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
- };
-+
-+ msiof0_pins: spi1 {
-+ renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
-+ "msiof0_tx";
-+ renesas,function = "msiof0";
-+ };
- };
-
- &scif0 {
-@@ -196,3 +202,18 @@
- };
- };
- };
-+
-+&msiof0 {
-+ pinctrl-0 = <&msiof0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+
-+ pmic@0 {
-+ compatible = "renesas,r2a11302ft";
-+ reg = <0>;
-+ spi-max-frequency = <6000000>;
-+ spi-cpol;
-+ spi-cpha;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0625-ARM-shmobile-r8a7740-dtsi-Add-Ethernet-support.patch b/patches.renesas/0625-ARM-shmobile-r8a7740-dtsi-Add-Ethernet-support.patch
deleted file mode 100644
index 3d06456eba0ec..0000000000000
--- a/patches.renesas/0625-ARM-shmobile-r8a7740-dtsi-Add-Ethernet-support.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 9e1d89566a4868ce17ee35e29f113937ed056694 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 7 May 2014 22:32:29 +0200
-Subject: ARM: shmobile: r8a7740 dtsi: Add Ethernet support
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 08ec67b50db7ca8c9077e67ca23850cdc5bfc716)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740.dtsi | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index 3834b94dc02a..560d8d71cea4 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -122,6 +122,19 @@
- 0 149 IRQ_TYPE_LEVEL_HIGH>;
- };
-
-+ ether: ethernet@e9a00000 {
-+ compatible = "renesas,gether-r8a7740";
-+ reg = <0xe9a00000 0x800>,
-+ <0xe9a01800 0x800>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
-+ /* clocks = <&mstp3_clks R8A7740_CLK_GETHER>; */
-+ phy-mode = "mii";
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+ status = "disabled";
-+ };
-+
- i2c0: i2c@fff20000 {
- #address-cells = <1>;
- #size-cells = <0>;
---
-2.1.2
-
diff --git a/patches.renesas/0626-ARM-shmobile-armadillo-reference-dts-Add-Ethernet-su.patch b/patches.renesas/0626-ARM-shmobile-armadillo-reference-dts-Add-Ethernet-su.patch
deleted file mode 100644
index 8d7bb9d20b04e..0000000000000
--- a/patches.renesas/0626-ARM-shmobile-armadillo-reference-dts-Add-Ethernet-su.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From 4558346c5b7b75ea541365fb1f0ebc1a36ba6eb7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 7 May 2014 22:32:30 +0200
-Subject: ARM: shmobile: armadillo-reference dts: Add Ethernet support
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 15d89dc9bfde872885c6226d86fb25676cbedfb3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 17 +++++++++++++++++
- 1 file changed, 17 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index 10344e6edd20..486007d7ffe4 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -158,6 +158,18 @@
- };
- };
-
-+&ether {
-+ pinctrl-0 = <&ether_pins>;
-+ pinctrl-names = "default";
-+
-+ phy-handle = <&phy0>;
-+ status = "ok";
-+
-+ phy0: ethernet-phy@0 {
-+ reg = <0>;
-+ };
-+};
-+
- &i2c0 {
- status = "okay";
- touchscreen@55 {
-@@ -189,6 +201,11 @@
- pinctrl-0 = <&scifa1_pins>;
- pinctrl-names = "default";
-
-+ ether_pins: ether {
-+ renesas,groups = "gether_mii", "gether_int";
-+ renesas,function = "gether";
-+ };
-+
- scifa1_pins: serial1 {
- renesas,groups = "scifa1_data";
- renesas,function = "scifa1";
---
-2.1.2
-
diff --git a/patches.renesas/0627-ARM-shmobile-r8a7740-Correct-name-of-DT-Ethernet-clo.patch b/patches.renesas/0627-ARM-shmobile-r8a7740-Correct-name-of-DT-Ethernet-clo.patch
deleted file mode 100644
index 622f645ad1316..0000000000000
--- a/patches.renesas/0627-ARM-shmobile-r8a7740-Correct-name-of-DT-Ethernet-clo.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 720a9aee4733513383e1381b8b1f1b62db8ac0ea Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 7 May 2014 22:32:28 +0200
-Subject: ARM: shmobile: r8a7740: Correct name of DT Ethernet clock
-
-The preferred node name in DT for an Ethernet device is "ethernet".
-"sh-eth" was used in preliminary and incomplete bindings.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 93131c36d49e932151a5f482f50ea40f3f0c987f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7740.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index dd989f93498f..433ec674ead1 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -596,7 +596,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_mmcif", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("e6bd0000.mmc", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("r8a7740-gether", &mstp_clks[MSTP309]),
-- CLKDEV_DEV_ID("e9a00000.sh-eth", &mstp_clks[MSTP309]),
-+ CLKDEV_DEV_ID("e9a00000.ethernet", &mstp_clks[MSTP309]),
- CLKDEV_DEV_ID("renesas-tpu-pwm", &mstp_clks[MSTP304]),
- CLKDEV_DEV_ID("e6600000.pwm", &mstp_clks[MSTP304]),
-
---
-2.1.2
-
diff --git a/patches.renesas/0628-ARM-shmobile-sh7372-Switch-to-new-style-CMT-device.patch b/patches.renesas/0628-ARM-shmobile-sh7372-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index 397644175c623..0000000000000
--- a/patches.renesas/0628-ARM-shmobile-sh7372-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From de2673abbe132a935a63be593020abbc96557b11 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:09 +0200
-Subject: ARM: shmobile: sh7372: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 386f60aae35271efa4dc7c407f65269b7cb71edb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh7372.c | 6 +++---
- arch/arm/mach-shmobile/setup-sh7372.c | 20 ++++----------------
- 2 files changed, 7 insertions(+), 19 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
-index 28489978b09c..c622b491edaf 100644
---- a/arch/arm/mach-shmobile/clock-sh7372.c
-+++ b/arch/arm/mach-shmobile/clock-sh7372.c
-@@ -565,10 +565,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("r8a66597_hcd.1", &mstp_clks[MSTP406]), /* USB1 */
- CLKDEV_DEV_ID("r8a66597_udc.1", &mstp_clks[MSTP406]), /* USB1 */
- CLKDEV_DEV_ID("renesas_usbhs.1", &mstp_clks[MSTP406]), /* USB1 */
-- CLKDEV_DEV_ID("sh_cmt.4", &mstp_clks[MSTP405]), /* CMT4 */
-- CLKDEV_DEV_ID("sh_cmt.3", &mstp_clks[MSTP404]), /* CMT3 */
- CLKDEV_DEV_ID("sh_keysc.0", &mstp_clks[MSTP403]), /* KEYSC */
-- CLKDEV_DEV_ID("sh_cmt.2", &mstp_clks[MSTP400]), /* CMT2 */
-
- /* ICK */
- CLKDEV_ICK_ID("dsit_clk", "sh-mipi-dsi.0", &div6_clks[DIV6_DSIT]),
-@@ -581,6 +578,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]),
- CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),
- CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.4", &mstp_clks[MSTP405]), /* CMT4 */
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.3", &mstp_clks[MSTP404]), /* CMT3 */
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.2", &mstp_clks[MSTP400]), /* CMT2 */
- CLKDEV_ICK_ID("diva", "sh_fsi2", &fsidivs[FSIDIV_A]),
- CLKDEV_ICK_ID("divb", "sh_fsi2", &fsidivs[FSIDIV_B]),
- CLKDEV_ICK_ID("xcka", "sh_fsi2", &fsiack_clk),
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index f8176b051be4..0995b7299229 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -119,28 +119,16 @@ SH7372_SCIF(PORT_SCIFB, 6, 0xe6c30000, evt2irq(0x0d60));
-
- /* CMT */
- static struct sh_timer_config cmt2_platform_data = {
-- .name = "CMT2",
-- .channel_offset = 0x40,
-- .timer_bit = 5,
-- .clockevent_rating = 125,
-- .clocksource_rating = 125,
-+ .channels_mask = 0x20,
- };
-
- static struct resource cmt2_resources[] = {
-- [0] = {
-- .name = "CMT2",
-- .start = 0xe6130040,
-- .end = 0xe613004b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x0b80), /* CMT2 */
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xe6130000, 0x50),
-+ DEFINE_RES_IRQ(evt2irq(0x0b80)),
- };
-
- static struct platform_device cmt2_device = {
-- .name = "sh_cmt",
-+ .name = "sh-cmt-32-fast",
- .id = 2,
- .dev = {
- .platform_data = &cmt2_platform_data,
---
-2.1.2
-
diff --git a/patches.renesas/0629-ARM-shmobile-sh73a0-Switch-to-new-style-CMT-device.patch b/patches.renesas/0629-ARM-shmobile-sh73a0-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index 53c081f0feef5..0000000000000
--- a/patches.renesas/0629-ARM-shmobile-sh73a0-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,94 +0,0 @@
-From 86ea21f05552452126376b6f6733152bbde1cd5b Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:10 +0200
-Subject: ARM: shmobile: sh73a0: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 652256fd475053f7fd8c2cd3e85f37be96d594db)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh73a0.c | 2 -
- arch/arm/mach-shmobile/setup-sh73a0.c | 36 +++++++++++-----------------------
- 2 files changed, 13 insertions(+), 25 deletions(-)
-
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -650,7 +650,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
- CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
- CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
-- CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]), /* CMT10 */
- CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */
- CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */
- CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
-@@ -683,6 +682,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("dsip_clk", "sh-mipi-dsi.1", &div6_clks[DIV6_DSI1P]),
- CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
- CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */
- };
-
- void __init sh73a0_clock_init(void)
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -104,35 +104,23 @@ SH73A0_SCIF(PORT_SCIFA, 6, 0xe6cc0000, g
- SH73A0_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(143));
- SH73A0_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(80));
-
--static struct sh_timer_config cmt10_platform_data = {
-- .name = "CMT10",
-- .channel_offset = 0x10,
-- .timer_bit = 0,
-- .clockevent_rating = 80,
-- .clocksource_rating = 125,
-+static struct sh_timer_config cmt1_platform_data = {
-+ .channels_mask = 0x3f,
- };
-
--static struct resource cmt10_resources[] = {
-- [0] = {
-- .name = "CMT10",
-- .start = 0xe6138010,
-- .end = 0xe613801b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_spi(65),
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt1_resources[] = {
-+ DEFINE_RES_MEM(0xe6138000, 0x200),
-+ DEFINE_RES_IRQ(gic_spi(65)),
- };
-
--static struct platform_device cmt10_device = {
-- .name = "sh_cmt",
-- .id = 10,
-+static struct platform_device cmt1_device = {
-+ .name = "sh-cmt-48",
-+ .id = 1,
- .dev = {
-- .platform_data = &cmt10_platform_data,
-+ .platform_data = &cmt1_platform_data,
- },
-- .resource = cmt10_resources,
-- .num_resources = ARRAY_SIZE(cmt10_resources),
-+ .resource = cmt1_resources,
-+ .num_resources = ARRAY_SIZE(cmt1_resources),
- };
-
- /* TMU */
-@@ -749,7 +737,7 @@ static struct platform_device *sh73a0_de
- &scif6_device,
- &scif7_device,
- &scif8_device,
-- &cmt10_device,
-+ &cmt1_device,
- };
-
- static struct platform_device *sh73a0_early_devices[] __initdata = {
diff --git a/patches.renesas/0630-ARM-shmobile-r8a73a4-Switch-to-new-style-CMT-device.patch b/patches.renesas/0630-ARM-shmobile-r8a73a4-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index 82b55af01bd64..0000000000000
--- a/patches.renesas/0630-ARM-shmobile-r8a73a4-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 7a4cf8b3ebf8cafacc04b0ce9fd0756d8e010642 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:11 +0200
-Subject: ARM: shmobile: r8a73a4: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 52065ef71e2c4da9e9661da68915741afc72ec1d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a73a4.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a73a4.c | 17 +++++++----------
- 2 files changed, 8 insertions(+), 11 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
-index 7348d58f500e..b5bc22c6a858 100644
---- a/arch/arm/mach-shmobile/clock-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
-@@ -597,7 +597,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e6560000.i2c", &mstp_clks[MSTP317]),
- CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]),
- CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]),
-- CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.1", &mstp_clks[MSTP329]),
- CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]),
- CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]),
- CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
-diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
-index cd36f8078325..9333770cfac2 100644
---- a/arch/arm/mach-shmobile/setup-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
-@@ -169,20 +169,17 @@ static const struct resource thermal0_resources[] = {
- thermal0_resources, \
- ARRAY_SIZE(thermal0_resources))
-
--static struct sh_timer_config cmt10_platform_data = {
-- .name = "CMT10",
-- .timer_bit = 0,
-- .clockevent_rating = 80,
-+static struct sh_timer_config cmt1_platform_data = {
-+ .channels_mask = 0xff,
- };
-
--static struct resource cmt10_resources[] = {
-- DEFINE_RES_MEM(0xe6130010, 0x0c),
-- DEFINE_RES_MEM(0xe6130000, 0x04),
-- DEFINE_RES_IRQ(gic_spi(120)), /* CMT1_0 */
-+static struct resource cmt1_resources[] = {
-+ DEFINE_RES_MEM(0xe6130000, 0x1004),
-+ DEFINE_RES_IRQ(gic_spi(120)),
- };
-
- #define r8a7790_register_cmt(idx) \
-- platform_device_register_resndata(&platform_bus, "sh_cmt", \
-+ platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
- idx, cmt##idx##_resources, \
- ARRAY_SIZE(cmt##idx##_resources), \
- &cmt##idx##_platform_data, \
-@@ -196,7 +193,7 @@ void __init r8a73a4_add_dt_devices(void)
- r8a73a4_register_scif(3);
- r8a73a4_register_scif(4);
- r8a73a4_register_scif(5);
-- r8a7790_register_cmt(10);
-+ r8a7790_register_cmt(1);
- }
-
- /* DMA */
---
-2.1.2
-
diff --git a/patches.renesas/0631-ARM-shmobile-r8a7740-Switch-to-new-style-CMT-device.patch b/patches.renesas/0631-ARM-shmobile-r8a7740-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index cb8d32808c91d..0000000000000
--- a/patches.renesas/0631-ARM-shmobile-r8a7740-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,101 +0,0 @@
-From 93e3437363954dc3cd2227123692f53bd83e2a2f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:12 +0200
-Subject: ARM: shmobile: r8a7740: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e0ad56a35e02fe16f12cc18867903f8462d587bf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7740.c | 36 ++++++++++++----------------------
- 2 files changed, 13 insertions(+), 25 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index 433ec674ead1..5ea385e46860 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -583,7 +583,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]),
- CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]),
-
-- CLKDEV_DEV_ID("sh_cmt.10", &mstp_clks[MSTP329]),
- CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]),
- CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]),
- CLKDEV_DEV_ID("i2c-sh_mobile.1", &mstp_clks[MSTP323]),
-@@ -604,6 +603,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e6870000.sd", &mstp_clks[MSTP415]),
-
- /* ICK */
-+ CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]),
- CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]),
- CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]),
- CLKDEV_ICK_ID("phy", "renesas_usbhs", &mstp_clks[MSTP406]),
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index a177a7b3bdbd..236ac3c8f9ae 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -237,35 +237,23 @@ R8A7740_SCIF(PORT_SCIFA, 7, 0xe6cd0000, gic_spi(107));
- R8A7740_SCIF(PORT_SCIFB, 8, 0xe6c30000, gic_spi(108));
-
- /* CMT */
--static struct sh_timer_config cmt10_platform_data = {
-- .name = "CMT10",
-- .channel_offset = 0x10,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 125,
-+static struct sh_timer_config cmt1_platform_data = {
-+ .channels_mask = 0x3f,
- };
-
--static struct resource cmt10_resources[] = {
-- [0] = {
-- .name = "CMT10",
-- .start = 0xe6138010,
-- .end = 0xe613801b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_spi(58),
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt1_resources[] = {
-+ DEFINE_RES_MEM(0xe6138000, 0x170),
-+ DEFINE_RES_IRQ(gic_spi(58)),
- };
-
--static struct platform_device cmt10_device = {
-- .name = "sh_cmt",
-- .id = 10,
-+static struct platform_device cmt1_device = {
-+ .name = "sh-cmt-48",
-+ .id = 1,
- .dev = {
-- .platform_data = &cmt10_platform_data,
-+ .platform_data = &cmt1_platform_data,
- },
-- .resource = cmt10_resources,
-- .num_resources = ARRAY_SIZE(cmt10_resources),
-+ .resource = cmt1_resources,
-+ .num_resources = ARRAY_SIZE(cmt1_resources),
- };
-
- /* TMU */
-@@ -400,7 +388,7 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = {
- &scif6_device,
- &scif7_device,
- &scif8_device,
-- &cmt10_device,
-+ &cmt1_device,
- };
-
- static struct platform_device *r8a7740_early_devices[] __initdata = {
---
-2.1.2
-
diff --git a/patches.renesas/0632-ARM-shmobile-r8a7790-Switch-to-new-style-CMT-device.patch b/patches.renesas/0632-ARM-shmobile-r8a7790-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index abf8f2a013b06..0000000000000
--- a/patches.renesas/0632-ARM-shmobile-r8a7790-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 39245efde9e8d8ac26422a933a59ae57df79b288 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:13 +0200
-Subject: ARM: shmobile: r8a7790: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-[horms+renesas@verge.net.au resolved conflict: use clk_names]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 711ee6c8dee1df265773786cd0ec96f2cae5c189)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7790.c | 17 +++++++----------
- 3 files changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 1eb48cffb4c5..1bca2748aa7c 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -90,7 +90,7 @@ static void __init lager_add_du_device(void)
- * devices until they get moved to DT.
- */
- static const struct clk_name clk_names[] __initconst = {
-- { "cmt0", NULL, "sh_cmt.0" },
-+ { "cmt0", "fck", "sh-cmt-48-gen2.0" },
- { "scifa0", NULL, "sh-sci.0" },
- { "scifa1", NULL, "sh-sci.1" },
- { "scifb0", NULL, "sh-sci.2" },
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index a936ae7de083..296a057109e4 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -357,7 +357,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.3", &mstp_clks[MSTP311]),
- CLKDEV_DEV_ID("sh_mmcif.1", &mstp_clks[MSTP305]),
-- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
- CLKDEV_DEV_ID("renesas_usbhs", &mstp_clks[MSTP704]),
- CLKDEV_DEV_ID("pci-rcar-gen2.0", &mstp_clks[MSTP703]),
-@@ -367,6 +366,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sata-r8a7790.1", &mstp_clks[MSTP814]),
-
- /* ICK */
-+ CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.0", &mstp_clks[MSTP124]),
- CLKDEV_ICK_ID("usbhs", "usb_phy_rcar_gen2", &mstp_clks[MSTP704]),
- CLKDEV_ICK_ID("lvds.0", "rcar-du-r8a7790", &mstp_clks[MSTP726]),
- CLKDEV_ICK_ID("lvds.1", "rcar-du-r8a7790", &mstp_clks[MSTP725]),
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index a901d9ef53f6..2a6708358d4e 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -263,20 +263,17 @@ static const struct resource thermal_resources[] __initconst = {
- thermal_resources, \
- ARRAY_SIZE(thermal_resources))
-
--static const struct sh_timer_config cmt00_platform_data __initconst = {
-- .name = "CMT00",
-- .timer_bit = 0,
-- .clockevent_rating = 80,
-+static struct sh_timer_config cmt0_platform_data = {
-+ .channels_mask = 0x60,
- };
-
--static const struct resource cmt00_resources[] __initconst = {
-- DEFINE_RES_MEM(0xffca0510, 0x0c),
-- DEFINE_RES_MEM(0xffca0500, 0x04),
-- DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
-+static struct resource cmt0_resources[] = {
-+ DEFINE_RES_MEM(0xffca0000, 0x1004),
-+ DEFINE_RES_IRQ(gic_spi(142)),
- };
-
- #define r8a7790_register_cmt(idx) \
-- platform_device_register_resndata(&platform_bus, "sh_cmt", \
-+ platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
- idx, cmt##idx##_resources, \
- ARRAY_SIZE(cmt##idx##_resources), \
- &cmt##idx##_platform_data, \
-@@ -294,7 +291,7 @@ void __init r8a7790_add_dt_devices(void)
- r8a7790_register_scif(7);
- r8a7790_register_scif(8);
- r8a7790_register_scif(9);
-- r8a7790_register_cmt(00);
-+ r8a7790_register_cmt(0);
- }
-
- void __init r8a7790_add_standard_devices(void)
---
-2.1.2
-
diff --git a/patches.renesas/0633-ARM-shmobile-r8a7791-Switch-to-new-style-CMT-device.patch b/patches.renesas/0633-ARM-shmobile-r8a7791-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index 5ad2011f001fb..0000000000000
--- a/patches.renesas/0633-ARM-shmobile-r8a7791-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From 9d243c41464dc8db6373bc85f1cd1ec284885000 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:14 +0200
-Subject: ARM: shmobile: r8a7791: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-[horms+renesas@verge.net.au resolved conflict: use clk_names]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 356af68bf483e4564f75a35287a8f5f39d31041f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7791.c | 17 +++++++----------
- 3 files changed, 9 insertions(+), 12 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 941f8b394e84..bd9093221f76 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -86,7 +86,7 @@ static void __init koelsch_add_du_device(void)
- * devices until they get moved to DT.
- */
- static const struct clk_name clk_names[] __initconst = {
-- { "cmt0", NULL, "sh_cmt.0" },
-+ { "cmt0", "fck", "sh-cmt-48-gen2.0" },
- { "scifa0", NULL, "sh-sci.0" },
- { "scifa1", NULL, "sh-sci.1" },
- { "scifb0", NULL, "sh-sci.2" },
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 3b26c7eee873..e2fdfcc14436 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -264,7 +264,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_mobile_sdhi.0", &mstp_clks[MSTP314]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.1", &mstp_clks[MSTP312]),
- CLKDEV_DEV_ID("sh_mobile_sdhi.2", &mstp_clks[MSTP311]),
-- CLKDEV_DEV_ID("sh_cmt.0", &mstp_clks[MSTP124]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.0", &mstp_clks[MSTP124]),
- CLKDEV_DEV_ID("qspi.0", &mstp_clks[MSTP917]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
- CLKDEV_DEV_ID("i2c-rcar_gen2.0", &mstp_clks[MSTP931]),
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index a7e4966f5e18..9839daca32a3 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -128,20 +128,17 @@ R8A7791_SCIFA(14, 0xe6c80000, gic_spi(31)); /* SCIFA5 */
- &scif##index##_platform_data, \
- sizeof(scif##index##_platform_data))
-
--static const struct sh_timer_config cmt00_platform_data __initconst = {
-- .name = "CMT00",
-- .timer_bit = 0,
-- .clockevent_rating = 80,
-+static struct sh_timer_config cmt0_platform_data = {
-+ .channels_mask = 0x60,
- };
-
--static const struct resource cmt00_resources[] __initconst = {
-- DEFINE_RES_MEM(0xffca0510, 0x0c),
-- DEFINE_RES_MEM(0xffca0500, 0x04),
-- DEFINE_RES_IRQ(gic_spi(142)), /* CMT0_0 */
-+static struct resource cmt0_resources[] = {
-+ DEFINE_RES_MEM(0xffca0000, 0x1004),
-+ DEFINE_RES_IRQ(gic_spi(142)),
- };
-
- #define r8a7791_register_cmt(idx) \
-- platform_device_register_resndata(&platform_bus, "sh_cmt", \
-+ platform_device_register_resndata(&platform_bus, "sh-cmt-48-gen2", \
- idx, cmt##idx##_resources, \
- ARRAY_SIZE(cmt##idx##_resources), \
- &cmt##idx##_platform_data, \
-@@ -200,7 +197,7 @@ void __init r8a7791_add_dt_devices(void)
- r8a7791_register_scif(12);
- r8a7791_register_scif(13);
- r8a7791_register_scif(14);
-- r8a7791_register_cmt(00);
-+ r8a7791_register_cmt(0);
- }
-
- void __init r8a7791_add_standard_devices(void)
---
-2.1.2
-
diff --git a/patches.renesas/0634-ARM-shmobile-sh7372-Switch-to-new-style-TMU-device.patch b/patches.renesas/0634-ARM-shmobile-sh7372-Switch-to-new-style-TMU-device.patch
deleted file mode 100644
index c3a2571802b32..0000000000000
--- a/patches.renesas/0634-ARM-shmobile-sh7372-Switch-to-new-style-TMU-device.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From 45afb7607c20e73998cd2a4b009908bbdf8119e5 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:16 +0200
-Subject: ARM: shmobile: sh7372: Switch to new style TMU device
-
-The TMU (Timer Unit) driver implements a new style of platform data that
-handles the timer as a single device with multiple channel. Switch from
-the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8e8236a9d86e5cf5979be13c3063d2381fbed285)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh7372.c | 3 +-
- arch/arm/mach-shmobile/setup-sh7372.c | 69 +++++++----------------------------
- 2 files changed, 15 insertions(+), 57 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
-index c622b491edaf..d16d9ca7f79e 100644
---- a/arch/arm/mach-shmobile/clock-sh7372.c
-+++ b/arch/arm/mach-shmobile/clock-sh7372.c
-@@ -515,8 +515,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("uio_pdrv_genirq.1", &mstp_clks[MSTP128]), /* VEU0 */
- CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU */
- CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2 */
-- CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
-- CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
- CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX0 */
- CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]), /* LCDC1 */
- CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* IIC0 */
-@@ -577,6 +575,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("ick", "sh-mobile-hdmi", &div6_reparent_clks[DIV6_HDMI]),
- CLKDEV_ICK_ID("icka", "sh_fsi2", &div6_reparent_clks[DIV6_FSIA]),
- CLKDEV_ICK_ID("ickb", "sh_fsi2", &div6_reparent_clks[DIV6_FSIB]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
- CLKDEV_ICK_ID("spu2", "sh_fsi2", &mstp_clks[MSTP223]),
- CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.4", &mstp_clks[MSTP405]), /* CMT4 */
- CLKDEV_ICK_ID("fck", "sh-cmt-32-fast.3", &mstp_clks[MSTP404]), /* CMT3 */
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 0995b7299229..2a8b9f2a2f54 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -138,64 +138,25 @@ static struct platform_device cmt2_device = {
- };
-
- /* TMU */
--static struct sh_timer_config tmu00_platform_data = {
-- .name = "TMU00",
-- .channel_offset = 0x4,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct sh_timer_config tmu0_platform_data = {
-+ .channels_mask = 7,
- };
-
--static struct resource tmu00_resources[] = {
-- [0] = {
-- .name = "TMU00",
-- .start = 0xfff60008,
-- .end = 0xfff60013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = intcs_evt2irq(0xe80), /* TMU_TUNI0 */
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource tmu0_resources[] = {
-+ DEFINE_RES_MEM(0xfff60000, 0x2c),
-+ DEFINE_RES_IRQ(intcs_evt2irq(0xe80)),
-+ DEFINE_RES_IRQ(intcs_evt2irq(0xea0)),
-+ DEFINE_RES_IRQ(intcs_evt2irq(0xec0)),
- };
-
--static struct platform_device tmu00_device = {
-- .name = "sh_tmu",
-+static struct platform_device tmu0_device = {
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
-- .platform_data = &tmu00_platform_data,
-- },
-- .resource = tmu00_resources,
-- .num_resources = ARRAY_SIZE(tmu00_resources),
--};
--
--static struct sh_timer_config tmu01_platform_data = {
-- .name = "TMU01",
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu01_resources[] = {
-- [0] = {
-- .name = "TMU01",
-- .start = 0xfff60014,
-- .end = 0xfff6001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = intcs_evt2irq(0xea0), /* TMU_TUNI1 */
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu01_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu01_platform_data,
-+ .platform_data = &tmu0_platform_data,
- },
-- .resource = tmu01_resources,
-- .num_resources = ARRAY_SIZE(tmu01_resources),
-+ .resource = tmu0_resources,
-+ .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
- /* I2C */
-@@ -940,8 +901,7 @@ static struct platform_device *sh7372_early_devices[] __initdata = {
- &scif5_device,
- &scif6_device,
- &cmt2_device,
-- &tmu00_device,
-- &tmu01_device,
-+ &tmu0_device,
- &ipmmu_device,
- };
-
-@@ -988,8 +948,7 @@ void __init sh7372_add_standard_devices(void)
- { "A4R", &veu2_device, },
- { "A4R", &veu3_device, },
- { "A4R", &jpu_device, },
-- { "A4R", &tmu00_device, },
-- { "A4R", &tmu01_device, },
-+ { "A4R", &tmu0_device, },
- };
-
- sh7372_init_pm_domains();
---
-2.1.2
-
diff --git a/patches.renesas/0635-ARM-shmobile-sh73a0-Switch-to-new-style-TMU-device.patch b/patches.renesas/0635-ARM-shmobile-sh73a0-Switch-to-new-style-TMU-device.patch
deleted file mode 100644
index ef1d40f54b552..0000000000000
--- a/patches.renesas/0635-ARM-shmobile-sh73a0-Switch-to-new-style-TMU-device.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From c7b4a0ea203b8311be6f7c3e0502aa07dc48cc66 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:17 +0200
-Subject: ARM: shmobile: sh73a0: Switch to new style TMU device
-
-The TMU (Timer Unit) driver implements a new style of platform data that
-handles the timer as a single device with multiple channel. Switch from
-the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3df592bc335a6efe30c88c9e39d29ceb5c20bbfb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh73a0.c | 3 -
- arch/arm/mach-shmobile/setup-sh73a0.c | 56 +++++++---------------------------
- 2 files changed, 14 insertions(+), 45 deletions(-)
-
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -633,8 +633,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-mobile-csi2.1", &mstp_clks[MSTP128]), /* CSI2-RX1 */
- CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]), /* CEU0 */
- CLKDEV_DEV_ID("sh-mobile-csi2.0", &mstp_clks[MSTP126]), /* CSI2-RX0 */
-- CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]), /* TMU00 */
-- CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]), /* TMU01 */
- CLKDEV_DEV_ID("sh-mipi-dsi.0", &mstp_clks[MSTP118]), /* DSITX */
- CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]), /* I2C0 */
- CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */
-@@ -683,6 +681,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
- CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
- CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
- };
-
- void __init sh73a0_clock_init(void)
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -124,54 +124,25 @@ static struct platform_device cmt1_devic
- };
-
- /* TMU */
--static struct sh_timer_config tmu00_platform_data = {
-- .name = "TMU00",
-- .channel_offset = 0x4,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct sh_timer_config tmu0_platform_data = {
-+ .channels_mask = 7,
- };
-
--static struct resource tmu00_resources[] = {
-- [0] = DEFINE_RES_MEM(0xfff60008, 0xc),
-- [1] = {
-- .start = intcs_evt2irq(0x0e80), /* TMU0_TUNI00 */
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource tmu0_resources[] = {
-+ DEFINE_RES_MEM(0xfff60000, 0x2c),
-+ DEFINE_RES_IRQ(intcs_evt2irq(0xe80)),
-+ DEFINE_RES_IRQ(intcs_evt2irq(0xea0)),
-+ DEFINE_RES_IRQ(intcs_evt2irq(0xec0)),
- };
-
--static struct platform_device tmu00_device = {
-- .name = "sh_tmu",
-+static struct platform_device tmu0_device = {
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
-- .platform_data = &tmu00_platform_data,
-- },
-- .resource = tmu00_resources,
-- .num_resources = ARRAY_SIZE(tmu00_resources),
--};
--
--static struct sh_timer_config tmu01_platform_data = {
-- .name = "TMU01",
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu01_resources[] = {
-- [0] = DEFINE_RES_MEM(0xfff60014, 0xc),
-- [1] = {
-- .start = intcs_evt2irq(0x0ea0), /* TMU0_TUNI01 */
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu01_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu01_platform_data,
-+ .platform_data = &tmu0_platform_data,
- },
-- .resource = tmu01_resources,
-- .num_resources = ARRAY_SIZE(tmu01_resources),
-+ .resource = tmu0_resources,
-+ .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
- static struct resource i2c0_resources[] = {
-@@ -741,8 +712,7 @@ static struct platform_device *sh73a0_de
- };
-
- static struct platform_device *sh73a0_early_devices[] __initdata = {
-- &tmu00_device,
-- &tmu01_device,
-+ &tmu0_device,
- &ipmmu_device,
- };
-
diff --git a/patches.renesas/0636-ARM-shmobile-r8a7740-Switch-to-new-style-TMU-device.patch b/patches.renesas/0636-ARM-shmobile-r8a7740-Switch-to-new-style-TMU-device.patch
deleted file mode 100644
index ffc5a5c660d82..0000000000000
--- a/patches.renesas/0636-ARM-shmobile-r8a7740-Switch-to-new-style-TMU-device.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 25bd60b4415c5b4bc612e91c0c1fb2707459c895 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:18 +0200
-Subject: ARM: shmobile: r8a7740: Switch to new style TMU device
-
-The TMU (Timer Unit) driver implements a new style of platform data that
-handles the timer as a single device with multiple channel. Switch from
-the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8ec72e46067d237dd60a08582e6427159c3f4b5f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7740.c | 8 +--
- arch/arm/mach-shmobile/setup-r8a7740.c | 97 +++++-----------------------------
- 2 files changed, 15 insertions(+), 90 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index 5ea385e46860..50931e3c97c7 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -548,15 +548,9 @@ static struct clk_lookup lookups[] = {
-
- /* MSTP32 clocks */
- CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]),
-- CLKDEV_DEV_ID("sh_tmu.3", &mstp_clks[MSTP111]),
-- CLKDEV_DEV_ID("sh_tmu.4", &mstp_clks[MSTP111]),
-- CLKDEV_DEV_ID("sh_tmu.5", &mstp_clks[MSTP111]),
- CLKDEV_DEV_ID("i2c-sh_mobile.0", &mstp_clks[MSTP116]),
- CLKDEV_DEV_ID("fff20000.i2c", &mstp_clks[MSTP116]),
- CLKDEV_DEV_ID("sh_mobile_lcdc_fb.1", &mstp_clks[MSTP117]),
-- CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP125]),
-- CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP125]),
-- CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP125]),
- CLKDEV_DEV_ID("sh_mobile_ceu.0", &mstp_clks[MSTP127]),
- CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]),
-
-@@ -603,6 +597,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e6870000.sd", &mstp_clks[MSTP415]),
-
- /* ICK */
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP111]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]),
- CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]),
- CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]),
- CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]),
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 236ac3c8f9ae..069cd3d0b18f 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -257,94 +257,25 @@ static struct platform_device cmt1_device = {
- };
-
- /* TMU */
--static struct sh_timer_config tmu00_platform_data = {
-- .name = "TMU00",
-- .channel_offset = 0x4,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct sh_timer_config tmu0_platform_data = {
-+ .channels_mask = 7,
- };
-
--static struct resource tmu00_resources[] = {
-- [0] = {
-- .name = "TMU00",
-- .start = 0xfff80008,
-- .end = 0xfff80014 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_spi(198),
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource tmu0_resources[] = {
-+ DEFINE_RES_MEM(0xfff80000, 0x2c),
-+ DEFINE_RES_IRQ(gic_spi(198)),
-+ DEFINE_RES_IRQ(gic_spi(199)),
-+ DEFINE_RES_IRQ(gic_spi(200)),
- };
-
--static struct platform_device tmu00_device = {
-- .name = "sh_tmu",
-+static struct platform_device tmu0_device = {
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
-- .platform_data = &tmu00_platform_data,
-- },
-- .resource = tmu00_resources,
-- .num_resources = ARRAY_SIZE(tmu00_resources),
--};
--
--static struct sh_timer_config tmu01_platform_data = {
-- .name = "TMU01",
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu01_resources[] = {
-- [0] = {
-- .name = "TMU01",
-- .start = 0xfff80014,
-- .end = 0xfff80020 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_spi(199),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu01_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu01_platform_data,
-- },
-- .resource = tmu01_resources,
-- .num_resources = ARRAY_SIZE(tmu01_resources),
--};
--
--static struct sh_timer_config tmu02_platform_data = {
-- .name = "TMU02",
-- .channel_offset = 0x1C,
-- .timer_bit = 2,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu02_resources[] = {
-- [0] = {
-- .name = "TMU02",
-- .start = 0xfff80020,
-- .end = 0xfff8002C - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_spi(200),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu02_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu02_platform_data,
-+ .platform_data = &tmu0_platform_data,
- },
-- .resource = tmu02_resources,
-- .num_resources = ARRAY_SIZE(tmu02_resources),
-+ .resource = tmu0_resources,
-+ .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
- /* IPMMUI (an IPMMU module for ICB/LMB) */
-@@ -396,9 +327,7 @@ static struct platform_device *r8a7740_early_devices[] __initdata = {
- &irqpin1_device,
- &irqpin2_device,
- &irqpin3_device,
-- &tmu00_device,
-- &tmu01_device,
-- &tmu02_device,
-+ &tmu0_device,
- &ipmmu_device,
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0637-ARM-shmobile-r8a7778-Switch-to-new-style-TMU-device.patch b/patches.renesas/0637-ARM-shmobile-r8a7778-Switch-to-new-style-TMU-device.patch
deleted file mode 100644
index ad82a8068f637..0000000000000
--- a/patches.renesas/0637-ARM-shmobile-r8a7778-Switch-to-new-style-TMU-device.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From de52088b87688a1162080fdeb7ae203d538f01bb Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 2 May 2014 20:21:25 +0200
-Subject: ARM: shmobile: r8a7778: Switch to new style TMU device
-
-The TMU (Timer Unit) driver implements a new style of platform data that
-handles the timer as a single device with multiple channel. Switch from
-the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 535ef0d9575b0809915341481ef3bac6bb5d0aaa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7778.c | 4 ++--
- arch/arm/mach-shmobile/setup-r8a7778.c | 28 +++++++---------------------
- 2 files changed, 9 insertions(+), 23 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 6609beb9b9b4..13f8f3ab8840 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -207,8 +207,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
- CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
- CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
-- CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */
-- CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP015]), /* TMU01 */
- CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
- CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */
- CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
-@@ -239,6 +237,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("src.6", "rcar_sound", &mstp_clks[MSTP525]),
- CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP524]),
- CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP523]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP015]),
- };
-
- void __init r8a7778_clock_init(void)
-diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
-index 6d694526e4ca..8c02e24f2483 100644
---- a/arch/arm/mach-shmobile/setup-r8a7778.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
-@@ -71,33 +71,20 @@ R8A7778_SCIF(5, 0xffe45000, gic_iid(0x6b));
- sizeof(scif##index##_platform_data))
-
- /* TMU */
--static struct resource sh_tmu0_resources[] __initdata = {
-- DEFINE_RES_MEM(0xffd80008, 12),
-- DEFINE_RES_IRQ(gic_iid(0x40)),
--};
--
--static struct sh_timer_config sh_tmu0_platform_data __initdata = {
-- .name = "TMU00",
-- .channel_offset = 0x4,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct sh_timer_config sh_tmu0_platform_data = {
-+ .channels_mask = 7,
- };
-
--static struct resource sh_tmu1_resources[] __initdata = {
-- DEFINE_RES_MEM(0xffd80014, 12),
-+static struct resource sh_tmu0_resources[] = {
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(gic_iid(0x40)),
- DEFINE_RES_IRQ(gic_iid(0x41)),
--};
--
--static struct sh_timer_config sh_tmu1_platform_data __initdata = {
-- .name = "TMU01",
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ DEFINE_RES_IRQ(gic_iid(0x42)),
- };
-
- #define r8a7778_register_tmu(idx) \
- platform_device_register_resndata( \
-- &platform_bus, "sh_tmu", idx, \
-+ &platform_bus, "sh-tmu", idx, \
- sh_tmu##idx##_resources, \
- ARRAY_SIZE(sh_tmu##idx##_resources), \
- &sh_tmu##idx##_platform_data, \
-@@ -312,7 +299,6 @@ void __init r8a7778_add_dt_devices(void)
- r8a7778_register_scif(4);
- r8a7778_register_scif(5);
- r8a7778_register_tmu(0);
-- r8a7778_register_tmu(1);
- }
-
- /* HPB-DMA */
---
-2.1.2
-
diff --git a/patches.renesas/0638-ARM-shmobile-r8a7779-Switch-to-new-style-TMU-device.patch b/patches.renesas/0638-ARM-shmobile-r8a7779-Switch-to-new-style-TMU-device.patch
deleted file mode 100644
index 6e66a8a711eae..0000000000000
--- a/patches.renesas/0638-ARM-shmobile-r8a7779-Switch-to-new-style-TMU-device.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From d81351c2ceecda2cb078d1b87be49babcd42ac71 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:20 +0200
-Subject: ARM: shmobile: r8a7779: Switch to new style TMU device
-
-The TMU (Timer Unit) driver implements a new style of platform data that
-handles the timer as a single device with multiple channel. Switch from
-the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e4ae34e285b1c102686cb1c2a39ef93f930bf8f4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7779.c | 4 +--
- arch/arm/mach-shmobile/setup-r8a7779.c | 66 +++++++---------------------------
- 2 files changed, 14 insertions(+), 56 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index 8e403ae0c7b2..a13298bd37a8 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -173,9 +173,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("ohci-platform.1", &mstp_clks[MSTP101]), /* USB OHCI port2 */
- CLKDEV_DEV_ID("ehci-platform.0", &mstp_clks[MSTP100]), /* USB EHCI port0/1 */
- CLKDEV_DEV_ID("ohci-platform.0", &mstp_clks[MSTP100]), /* USB OHCI port0/1 */
-- CLKDEV_DEV_ID("sh_tmu.0", &mstp_clks[MSTP016]), /* TMU00 */
-- CLKDEV_DEV_ID("sh_tmu.1", &mstp_clks[MSTP016]), /* TMU01 */
-- CLKDEV_DEV_ID("sh_tmu.2", &mstp_clks[MSTP016]), /* TMU02 */
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]), /* TMU0 */
- CLKDEV_DEV_ID("i2c-rcar.0", &mstp_clks[MSTP030]), /* I2C0 */
- CLKDEV_DEV_ID("ffc70000.i2c", &mstp_clks[MSTP030]), /* I2C0 */
- CLKDEV_DEV_ID("i2c-rcar.1", &mstp_clks[MSTP029]), /* I2C1 */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index 8e860b36997a..d197b5adc886 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -219,64 +219,25 @@ R8A7779_SCIF(4, 0xffe44000, gic_iid(0x7c));
- R8A7779_SCIF(5, 0xffe45000, gic_iid(0x7d));
-
- /* TMU */
--static struct sh_timer_config tmu00_platform_data = {
-- .name = "TMU00",
-- .channel_offset = 0x4,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct sh_timer_config tmu0_platform_data = {
-+ .channels_mask = 7,
- };
-
--static struct resource tmu00_resources[] = {
-- [0] = {
-- .name = "TMU00",
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_iid(0x40),
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource tmu0_resources[] = {
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(gic_iid(0x40)),
-+ DEFINE_RES_IRQ(gic_iid(0x41)),
-+ DEFINE_RES_IRQ(gic_iid(0x42)),
- };
-
--static struct platform_device tmu00_device = {
-- .name = "sh_tmu",
-+static struct platform_device tmu0_device = {
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
-- .platform_data = &tmu00_platform_data,
-- },
-- .resource = tmu00_resources,
-- .num_resources = ARRAY_SIZE(tmu00_resources),
--};
--
--static struct sh_timer_config tmu01_platform_data = {
-- .name = "TMU01",
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu01_resources[] = {
-- [0] = {
-- .name = "TMU01",
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = gic_iid(0x41),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu01_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu01_platform_data,
-+ .platform_data = &tmu0_platform_data,
- },
-- .resource = tmu01_resources,
-- .num_resources = ARRAY_SIZE(tmu01_resources),
-+ .resource = tmu0_resources,
-+ .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
- /* I2C */
-@@ -685,8 +646,7 @@ static struct platform_device *r8a7779_devices_dt[] __initdata = {
- &scif3_device,
- &scif4_device,
- &scif5_device,
-- &tmu00_device,
-- &tmu01_device,
-+ &tmu0_device,
- };
-
- static struct platform_device *r8a7779_standard_devices[] __initdata = {
---
-2.1.2
-
diff --git a/patches.renesas/0639-ARM-shmobile-r7s72100-Switch-to-new-style-MTU2-devic.patch b/patches.renesas/0639-ARM-shmobile-r7s72100-Switch-to-new-style-MTU2-devic.patch
deleted file mode 100644
index c3d7f7486a810..0000000000000
--- a/patches.renesas/0639-ARM-shmobile-r7s72100-Switch-to-new-style-MTU2-devic.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 140cad9153ee69734b82413611c1d5e7b2736ec1 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:22 +0200
-Subject: ARM: shmobile: r7s72100: Switch to new style MTU2 device
-
-The MTU2 (Multi-Function Timer Pulse Unit 2) driver implements a new
-style of platform data that handles the timer as a single device with
-multiple channel. Switch from the old-style platform data to the
-new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c17fcfbcc0f6b4f3cae761149e1a6108dd6750e7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 2 +-
- arch/arm/mach-shmobile/setup-r7s72100.c | 26 +++++++++-----------------
- 2 files changed, 10 insertions(+), 18 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index bee0073c9b64..644f1c2a96c7 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -204,7 +204,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
- CLKDEV_DEV_ID("fcfeec00.i2c", &mstp_clks[MSTP94]),
- CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),
-- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP33]),
-
- /* ICK */
- CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP47]),
-@@ -215,6 +214,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
-+ CLKDEV_ICK_ID("fck", "sh-mtu2", &mstp_clks[MSTP33]),
- };
-
- void __init r7s72100_clock_init(void)
-diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
-index 9c0b3a9d5f7a..545db1512480 100644
---- a/arch/arm/mach-shmobile/setup-r7s72100.c
-+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
-@@ -62,24 +62,16 @@ R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
- sizeof(scif##index##_platform_data))
-
-
--static struct sh_timer_config mtu2_0_platform_data __initdata = {
-- .name = "MTU2_0",
-- .timer_bit = 0,
-- .channel_offset = -0x80,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] __initdata = {
-+ DEFINE_RES_MEM(0xfcff0000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
- };
-
--static struct resource mtu2_0_resources[] __initdata = {
-- DEFINE_RES_MEM(0xfcff0300, 0x27),
-- DEFINE_RES_IRQ(gic_iid(139)), /* MTU2 TGI0A */
--};
--
--#define r7s72100_register_mtu2(idx) \
-- platform_device_register_resndata(&platform_bus, "sh_mtu2", \
-- idx, mtu2_##idx##_resources, \
-- ARRAY_SIZE(mtu2_##idx##_resources), \
-- &mtu2_##idx##_platform_data, \
-- sizeof(struct sh_timer_config))
-+#define r7s72100_register_mtu2() \
-+ platform_device_register_resndata(&platform_bus, "sh-mtu2", \
-+ -1, mtu2_resources, \
-+ ARRAY_SIZE(mtu2_resources), \
-+ NULL, 0)
-
- void __init r7s72100_add_dt_devices(void)
- {
-@@ -91,7 +83,7 @@ void __init r7s72100_add_dt_devices(void)
- r7s72100_register_scif(5);
- r7s72100_register_scif(6);
- r7s72100_register_scif(7);
-- r7s72100_register_mtu2(0);
-+ r7s72100_register_mtu2();
- }
-
- void __init r7s72100_init_early(void)
---
-2.1.2
-
diff --git a/patches.renesas/0640-ARM-shmobile-Add-r8a7740-Maximum-CPU-Frequency-to-DT.patch b/patches.renesas/0640-ARM-shmobile-Add-r8a7740-Maximum-CPU-Frequency-to-DT.patch
deleted file mode 100644
index be11fa747903c..0000000000000
--- a/patches.renesas/0640-ARM-shmobile-Add-r8a7740-Maximum-CPU-Frequency-to-DT.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 4dc9e0e0edf77b15fa062a82357854700ff75261 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 8 May 2014 08:32:29 +0900
-Subject: ARM: shmobile: Add r8a7740 Maximum CPU Frequency to DTS
-
-Add 800 MHz to the r8a7740 DTS to describe the maximum CPU frequency.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Tested-by: Geert Uytterhoeven <geert@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 63575d8cd5cba0c657ac5c18f75e91e2e30cc0eb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740.dtsi | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index 560d8d71cea4..a4498de64f7d 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -22,6 +22,7 @@
- compatible = "arm,cortex-a9";
- device_type = "cpu";
- reg = <0x0>;
-+ clock-frequency = <800000000>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0641-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-in-common-.patch b/patches.renesas/0641-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-in-common-.patch
deleted file mode 100644
index 7bdfd8f14ff13..0000000000000
--- a/patches.renesas/0641-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-in-common-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 4bcd8049b2e0cadf40686b20137e4f9b564e9022 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 8 May 2014 08:32:38 +0900
-Subject: ARM: shmobile: Use r8a7740 DT CPU Frequency in common case
-
-Convert the common C-code-less r8a7740 DT board support
-to use shmobile_init_delay() to be able to migrate away
-from per-SoC delay setup functions.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Tested-by: Geert Uytterhoeven <geert@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a0c1fb0c285d9aa5f9d078449cfa37883a3f5a91)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 069cd3d0b18f..f498ad52c85f 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -841,7 +841,7 @@ static const char *r8a7740_boards_compat_dt[] __initdata = {
-
- DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
- .map_io = r8a7740_map_io,
-- .init_early = r8a7740_init_delay,
-+ .init_early = shmobile_init_delay,
- .init_irq = r8a7740_init_irq_of,
- .init_machine = r8a7740_generic_init,
- .dt_compat = r8a7740_boards_compat_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0642-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-for-Armadi.patch b/patches.renesas/0642-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-for-Armadi.patch
deleted file mode 100644
index da42c50851150..0000000000000
--- a/patches.renesas/0642-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-for-Armadi.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From e2ec0f66a4da97e7ea078aa0a11969102e625c6c Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 8 May 2014 08:32:47 +0900
-Subject: ARM: shmobile: Use r8a7740 DT CPU Frequency for Armadillo DT Ref
-
-Convert the Armadillo r8a7740 DT reference board support
-to use shmobile_init_delay() to be able to migrate away
-from per-SoC delay setup functions.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Tested-by: Geert Uytterhoeven <geert@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e568802d13eb1dbcbe688aa4e7cf1db866a52e3e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-index 57d1a78367b6..57d246eb8813 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-@@ -187,7 +187,7 @@ static const char *eva_boards_compat_dt[] __initdata = {
-
- DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva-reference")
- .map_io = r8a7740_map_io,
-- .init_early = r8a7740_init_delay,
-+ .init_early = shmobile_init_delay,
- .init_irq = r8a7740_init_irq_of,
- .init_machine = eva_init,
- .init_late = shmobile_init_late,
---
-2.1.2
-
diff --git a/patches.renesas/0643-ARM-shmobile-Remove-unused-r8a7740_init_delay.patch b/patches.renesas/0643-ARM-shmobile-Remove-unused-r8a7740_init_delay.patch
deleted file mode 100644
index b8c60c6b9b774..0000000000000
--- a/patches.renesas/0643-ARM-shmobile-Remove-unused-r8a7740_init_delay.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From af0135ab78a30273740357a2e20d6269a932b382 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 8 May 2014 08:32:56 +0900
-Subject: ARM: shmobile: Remove unused r8a7740_init_delay()
-
-Remove the now unused r8a7740_init_delay() function.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Tested-by: Geert Uytterhoeven <geert@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bf901fbd9040effe4aa1389f78efcc1c2736a44b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r8a7740.h | 1 -
- arch/arm/mach-shmobile/setup-r8a7740.c | 5 -----
- 2 files changed, 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
-index d07932f872b6..5e3c9ec06303 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
-@@ -47,7 +47,6 @@ enum {
- };
-
- extern void r8a7740_meram_workaround(void);
--extern void r8a7740_init_delay(void);
- extern void r8a7740_init_irq_of(void);
- extern void r8a7740_map_io(void);
- extern void r8a7740_add_early_devices(void);
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index f498ad52c85f..c96099e3638c 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -793,11 +793,6 @@ void __init r8a7740_add_standard_devices_dt(void)
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
-
--void __init r8a7740_init_delay(void)
--{
-- shmobile_setup_delay(800, 1, 3); /* Cortex-A9 @ 800MHz */
--};
--
- void __init r8a7740_init_irq_of(void)
- {
- void __iomem *intc_prio_base = ioremap_nocache(0xe6900010, 0x10);
---
-2.1.2
-
diff --git a/patches.renesas/0644-ARM-shmobile-Minor-cleanup-of-the-Armadillo-legacy-b.patch b/patches.renesas/0644-ARM-shmobile-Minor-cleanup-of-the-Armadillo-legacy-b.patch
deleted file mode 100644
index 99d2c20c557ff..0000000000000
--- a/patches.renesas/0644-ARM-shmobile-Minor-cleanup-of-the-Armadillo-legacy-b.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From 12a99a095ed5bf0e279d42e1f44acdbcc02c12cd Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 8 May 2014 08:37:53 +0900
-Subject: ARM: shmobile: Minor cleanup of the Armadillo legacy board code
-
-Cleanup the legacy Armadillo board code slightly by
-removing the pointless eva_add_early_devices() function
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fd105ecf17fe459d979f336a7389d87172a1cf6d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index dfdc9730e029..d4e7f771c174 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -1292,11 +1292,6 @@ static void __init eva_earlytimer_init(void)
- eva_clock_init();
- }
-
--static void __init eva_add_early_devices(void)
--{
-- r8a7740_add_early_devices();
--}
--
- #define RESCNT2 IOMEM(0xe6188020)
- static void eva_restart(enum reboot_mode mode, const char *cmd)
- {
-@@ -1311,7 +1306,7 @@ static const char *eva_boards_compat_dt[] __initdata = {
-
- DT_MACHINE_START(ARMADILLO800EVA_DT, "armadillo800eva")
- .map_io = r8a7740_map_io,
-- .init_early = eva_add_early_devices,
-+ .init_early = r8a7740_add_early_devices,
- .init_irq = r8a7740_init_irq_of,
- .init_machine = eva_init,
- .init_late = shmobile_init_late,
---
-2.1.2
-
diff --git a/patches.renesas/0645-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-in-common-.patch b/patches.renesas/0645-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-in-common-.patch
deleted file mode 100644
index 0c919d6e67efb..0000000000000
--- a/patches.renesas/0645-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-in-common-.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 971ba3a290605f9d9e374317790bef314c2cea21 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Mon, 12 May 2014 08:25:18 +0900
-Subject: ARM: shmobile: Use r8a7791 DT CPU Frequency in common case
-
-Convert the common C-code-less r8a7791 DT board support
-to use shmobile_init_delay() to be able to migrate away
-from per-SoC delay setup functions.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 648c687a6a43a6473caedba4785a16537bd21bfb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 9839daca32a3..71bc5ae053f5 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -222,7 +222,7 @@ static const char *r8a7791_boards_compat_dt[] __initdata = {
-
- DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
- .smp = smp_ops(r8a7791_smp_ops),
-- .init_early = r8a7791_init_early,
-+ .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .dt_compat = r8a7791_boards_compat_dt,
- MACHINE_END
---
-2.1.2
-
diff --git a/patches.renesas/0646-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-for-Koelsc.patch b/patches.renesas/0646-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-for-Koelsc.patch
deleted file mode 100644
index 4ea89c0063d75..0000000000000
--- a/patches.renesas/0646-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-for-Koelsc.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 54b3b4337835bacf10fd5b91134aabd2d39a93e9 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Mon, 12 May 2014 08:25:27 +0900
-Subject: ARM: shmobile: Use r8a7791 DT CPU Frequency for Koelsch
-
-Convert the Koelsch board support to use shmobile_init_delay()
-to be able to migrate away from per-SoC delay setup functions.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7e99497cf5e7b46ff5f434beae45f6f35005e8b6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index bd9093221f76..e85f7b685d26 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -139,7 +139,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
-
- DT_MACHINE_START(KOELSCH_DT, "koelsch")
- .smp = smp_ops(r8a7791_smp_ops),
-- .init_early = r8a7791_init_early,
-+ .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .init_machine = koelsch_add_standard_devices,
- .init_late = shmobile_init_late,
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index a12a9d3b4b6e..c6c68892caa3 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -522,7 +522,7 @@ static const char * const koelsch_boards_compat_dt[] __initconst = {
-
- DT_MACHINE_START(KOELSCH_DT, "koelsch")
- .smp = smp_ops(r8a7791_smp_ops),
-- .init_early = r8a7791_init_early,
-+ .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .init_machine = koelsch_init,
- .init_late = shmobile_init_late,
---
-2.1.2
-
diff --git a/patches.renesas/0647-ARM-shmobile-Remove-unused-r8a7791_init_early.patch b/patches.renesas/0647-ARM-shmobile-Remove-unused-r8a7791_init_early.patch
deleted file mode 100644
index fc127f221899b..0000000000000
--- a/patches.renesas/0647-ARM-shmobile-Remove-unused-r8a7791_init_early.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 2558c3883f0416555150d88dd6658da9911ca31a Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Mon, 12 May 2014 08:25:37 +0900
-Subject: ARM: shmobile: Remove unused r8a7791_init_early()
-
-Remove the now unused r8a7791_init_early() function.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 595e9b00fb81f971d84ff451861423d02c39d060)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 -
- arch/arm/mach-shmobile/setup-r8a7791.c | 7 -------
- 2 files changed, 8 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h
-index 200fa699f730..664274cc4b64 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7791.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h
-@@ -5,7 +5,6 @@ void r8a7791_add_standard_devices(void);
- void r8a7791_add_dt_devices(void);
- void r8a7791_clock_init(void);
- void r8a7791_pinmux_init(void);
--void r8a7791_init_early(void);
- extern struct smp_operations r8a7791_smp_ops;
-
- #endif /* __ASM_R8A7791_H__ */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 71bc5ae053f5..74a416e52fb9 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -207,13 +207,6 @@ void __init r8a7791_add_standard_devices(void)
- r8a7791_register_thermal();
- }
-
--void __init r8a7791_init_early(void)
--{
--#ifndef CONFIG_ARM_ARCH_TIMER
-- shmobile_setup_delay(1500, 2, 4); /* Cortex-A15 @ 1500MHz */
--#endif
--}
--
- #ifdef CONFIG_USE_OF
- static const char *r8a7791_boards_compat_dt[] __initdata = {
- "renesas,r8a7791",
---
-2.1.2
-
diff --git a/patches.renesas/0648-ARM-shmobile-dts-Move-interrupt-parent-property-to-r.patch b/patches.renesas/0648-ARM-shmobile-dts-Move-interrupt-parent-property-to-r.patch
deleted file mode 100644
index 60df50bc2765b..0000000000000
--- a/patches.renesas/0648-ARM-shmobile-dts-Move-interrupt-parent-property-to-r.patch
+++ /dev/null
@@ -1,620 +0,0 @@
-From d1ed6d2e525d1c201533130ecb69f6c1376024ba Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 30 Apr 2014 02:41:28 +0200
-Subject: ARM: shmobile: dts: Move interrupt-parent property to root node
-
-There's no need to duplicate the interrupt-parent property in all DT
-nodes as the kernel automatically walks parent nodes to find the
-property. Specify it once in the root node only.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9ff254adc1e32db46000a33b8ecbc4d7047672be)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a73a4.dtsi | 18 ------------------
- arch/arm/boot/dts/r8a7740.dtsi | 12 +-----------
- arch/arm/boot/dts/r8a7778.dtsi | 18 +-----------------
- arch/arm/boot/dts/r8a7779.dtsi | 21 +--------------------
- arch/arm/boot/dts/r8a7791.dtsi | 3 ---
- 5 files changed, 3 insertions(+), 69 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
-index 62d0211bd192..82c5ac825386 100644
---- a/arch/arm/boot/dts/r8a73a4.dtsi
-+++ b/arch/arm/boot/dts/r8a73a4.dtsi
-@@ -55,7 +55,6 @@
- #interrupt-cells = <2>;
- interrupt-controller;
- reg = <0 0xe61c0000 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 0 IRQ_TYPE_LEVEL_HIGH>,
- <0 1 IRQ_TYPE_LEVEL_HIGH>,
- <0 2 IRQ_TYPE_LEVEL_HIGH>,
-@@ -95,7 +94,6 @@
- #interrupt-cells = <2>;
- interrupt-controller;
- reg = <0 0xe61c0200 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
- <0 33 IRQ_TYPE_LEVEL_HIGH>,
- <0 34 IRQ_TYPE_LEVEL_HIGH>,
-@@ -136,7 +134,6 @@
- dma0: dma-controller@e6700020 {
- compatible = "renesas,shdma-r8a73a4";
- reg = <0 0xe6700020 0 0x89e0>;
-- interrupt-parent = <&gic>;
- interrupts = <0 220 IRQ_TYPE_LEVEL_HIGH
- 0 200 IRQ_TYPE_LEVEL_HIGH
- 0 201 IRQ_TYPE_LEVEL_HIGH
-@@ -171,7 +168,6 @@
- compatible = "renesas,rcar-thermal";
- reg = <0 0xe61f0000 0 0x14>, <0 0xe61f0100 0 0x38>,
- <0 0xe61f0200 0 0x38>, <0 0xe61f0300 0 0x38>;
-- interrupt-parent = <&gic>;
- interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
- };
-
-@@ -180,7 +176,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6500000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 174 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -190,7 +185,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6510000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 175 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -200,7 +194,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6520000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 176 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -210,7 +203,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6530000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 177 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -220,7 +212,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6540000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 178 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -230,7 +221,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe60b0000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 179 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -240,7 +230,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6550000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 184 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -250,7 +239,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6560000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 185 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -260,7 +248,6 @@
- #size-cells = <0>;
- compatible = "renesas,rmobile-iic";
- reg = <0 0xe6570000 0 0x428>;
-- interrupt-parent = <&gic>;
- interrupts = <0 173 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -268,7 +255,6 @@
- mmcif0: mmc@ee200000 {
- compatible = "renesas,sh-mmcif";
- reg = <0 0xee200000 0 0x80>;
-- interrupt-parent = <&gic>;
- interrupts = <0 169 IRQ_TYPE_LEVEL_HIGH>;
- reg-io-width = <4>;
- status = "disabled";
-@@ -277,7 +263,6 @@
- mmcif1: mmc@ee220000 {
- compatible = "renesas,sh-mmcif";
- reg = <0 0xee220000 0 0x80>;
-- interrupt-parent = <&gic>;
- interrupts = <0 170 IRQ_TYPE_LEVEL_HIGH>;
- reg-io-width = <4>;
- status = "disabled";
-@@ -309,7 +294,6 @@
- sdhi0: sd@ee100000 {
- compatible = "renesas,sdhi-r8a73a4";
- reg = <0 0xee100000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- status = "disabled";
-@@ -318,7 +302,6 @@
- sdhi1: sd@ee120000 {
- compatible = "renesas,sdhi-r8a73a4";
- reg = <0 0xee120000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 166 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- status = "disabled";
-@@ -327,7 +310,6 @@
- sdhi2: sd@ee140000 {
- compatible = "renesas,sdhi-r8a73a4";
- reg = <0 0xee140000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- status = "disabled";
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index a4498de64f7d..ce7a0b29ae7c 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -14,6 +14,7 @@
-
- / {
- compatible = "renesas,r8a7740";
-+ interrupt-parent = <&gic>;
-
- cpus {
- #address-cells = <1>;
-@@ -49,7 +50,6 @@
- <0xe6900020 1>,
- <0xe6900040 1>,
- <0xe6900060 1>;
-- interrupt-parent = <&gic>;
- interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
-@@ -70,7 +70,6 @@
- <0xe6900024 1>,
- <0xe6900044 1>,
- <0xe6900064 1>;
-- interrupt-parent = <&gic>;
- interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
-@@ -91,7 +90,6 @@
- <0xe6900028 1>,
- <0xe6900048 1>,
- <0xe6900068 1>;
-- interrupt-parent = <&gic>;
- interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
-@@ -112,7 +110,6 @@
- <0xe690002c 1>,
- <0xe690004c 1>,
- <0xe690006c 1>;
-- interrupt-parent = <&gic>;
- interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
- 0 149 IRQ_TYPE_LEVEL_HIGH
-@@ -141,7 +138,6 @@
- #size-cells = <0>;
- compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
- reg = <0xfff20000 0x425>;
-- interrupt-parent = <&gic>;
- interrupts = <0 201 IRQ_TYPE_LEVEL_HIGH
- 0 202 IRQ_TYPE_LEVEL_HIGH
- 0 203 IRQ_TYPE_LEVEL_HIGH
-@@ -154,7 +150,6 @@
- #size-cells = <0>;
- compatible = "renesas,iic-r8a7740", "renesas,rmobile-iic";
- reg = <0xe6c20000 0x425>;
-- interrupt-parent = <&gic>;
- interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH
- 0 71 IRQ_TYPE_LEVEL_HIGH
- 0 72 IRQ_TYPE_LEVEL_HIGH
-@@ -189,7 +184,6 @@
- mmcif0: mmc@e6bd0000 {
- compatible = "renesas,mmcif-r8a7740", "renesas,sh-mmcif";
- reg = <0xe6bd0000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 56 IRQ_TYPE_LEVEL_HIGH
- 0 57 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
-@@ -198,7 +192,6 @@
- sdhi0: sd@e6850000 {
- compatible = "renesas,sdhi-r8a7740";
- reg = <0xe6850000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 117 IRQ_TYPE_LEVEL_HIGH
- 0 118 IRQ_TYPE_LEVEL_HIGH
- 0 119 IRQ_TYPE_LEVEL_HIGH>;
-@@ -210,7 +203,6 @@
- sdhi1: sd@e6860000 {
- compatible = "renesas,sdhi-r8a7740";
- reg = <0xe6860000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 121 IRQ_TYPE_LEVEL_HIGH
- 0 122 IRQ_TYPE_LEVEL_HIGH
- 0 123 IRQ_TYPE_LEVEL_HIGH>;
-@@ -222,7 +214,6 @@
- sdhi2: sd@e6870000 {
- compatible = "renesas,sdhi-r8a7740";
- reg = <0xe6870000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 125 IRQ_TYPE_LEVEL_HIGH
- 0 126 IRQ_TYPE_LEVEL_HIGH
- 0 127 IRQ_TYPE_LEVEL_HIGH>;
-@@ -235,7 +226,6 @@
- #sound-dai-cells = <1>;
- compatible = "renesas,fsi2-r8a7740", "renesas,sh_fsi2";
- reg = <0xfe1f0000 0x400>;
-- interrupt-parent = <&gic>;
- interrupts = <0 9 0x4>;
- status = "disabled";
- };
-diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
-index 3c6fab5c9702..3af0a2187493 100644
---- a/arch/arm/boot/dts/r8a7778.dtsi
-+++ b/arch/arm/boot/dts/r8a7778.dtsi
-@@ -20,6 +20,7 @@
-
- / {
- compatible = "renesas,r8a7778";
-+ interrupt-parent = <&gic>;
-
- cpus {
- cpu@0 {
-@@ -52,7 +53,6 @@
- <0xfe780024 4>,
- <0xfe780044 4>,
- <0xfe780064 4>;
-- interrupt-parent = <&gic>;
- interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH
- 0 28 IRQ_TYPE_LEVEL_HIGH
- 0 29 IRQ_TYPE_LEVEL_HIGH
-@@ -63,7 +63,6 @@
- gpio0: gpio@ffc40000 {
- compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
- reg = <0xffc40000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -75,7 +74,6 @@
- gpio1: gpio@ffc41000 {
- compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
- reg = <0xffc41000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -87,7 +85,6 @@
- gpio2: gpio@ffc42000 {
- compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
- reg = <0xffc42000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -99,7 +96,6 @@
- gpio3: gpio@ffc43000 {
- compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
- reg = <0xffc43000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -111,7 +107,6 @@
- gpio4: gpio@ffc44000 {
- compatible = "renesas,gpio-r8a7778", "renesas,gpio-rcar";
- reg = <0xffc44000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -130,7 +125,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7778";
- reg = <0xffc70000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 67 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -140,7 +134,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7778";
- reg = <0xffc71000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -150,7 +143,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7778";
- reg = <0xffc72000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 76 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -160,7 +152,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7778";
- reg = <0xffc73000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 77 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -168,7 +159,6 @@
- mmcif: mmc@ffe4e000 {
- compatible = "renesas,sh-mmcif";
- reg = <0xffe4e000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 61 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -176,7 +166,6 @@
- sdhi0: sd@ffe4c000 {
- compatible = "renesas,sdhi-r8a7778";
- reg = <0xffe4c000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 87 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -186,7 +175,6 @@
- sdhi1: sd@ffe4d000 {
- compatible = "renesas,sdhi-r8a7778";
- reg = <0xffe4d000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -196,7 +184,6 @@
- sdhi2: sd@ffe4f000 {
- compatible = "renesas,sdhi-r8a7778";
- reg = <0xffe4f000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 86 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -206,7 +193,6 @@
- hspi0: spi@fffc7000 {
- compatible = "renesas,hspi-r8a7778", "renesas,hspi";
- reg = <0xfffc7000 0x18>;
-- interrupt-parent = <&gic>;
- interrupts = <0 63 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -216,7 +202,6 @@
- hspi1: spi@fffc8000 {
- compatible = "renesas,hspi-r8a7778", "renesas,hspi";
- reg = <0xfffc8000 0x18>;
-- interrupt-parent = <&gic>;
- interrupts = <0 84 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -226,7 +211,6 @@
- hspi2: spi@fffc6000 {
- compatible = "renesas,hspi-r8a7778", "renesas,hspi";
- reg = <0xfffc6000 0x18>;
-- interrupt-parent = <&gic>;
- interrupts = <0 85 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index 8b1a336ee401..b517c8e6b420 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -15,6 +15,7 @@
-
- / {
- compatible = "renesas,r8a7779";
-+ interrupt-parent = <&gic>;
-
- cpus {
- #address-cells = <1>;
-@@ -59,7 +60,6 @@
- gpio0: gpio@ffc40000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc40000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 141 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -71,7 +71,6 @@
- gpio1: gpio@ffc41000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc41000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -83,7 +82,6 @@
- gpio2: gpio@ffc42000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc42000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -95,7 +93,6 @@
- gpio3: gpio@ffc43000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc43000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -107,7 +104,6 @@
- gpio4: gpio@ffc44000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc44000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -119,7 +115,6 @@
- gpio5: gpio@ffc45000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc45000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 146 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -131,7 +126,6 @@
- gpio6: gpio@ffc46000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
- reg = <0xffc46000 0x2c>;
-- interrupt-parent = <&gic>;
- interrupts = <0 147 IRQ_TYPE_LEVEL_HIGH>;
- #gpio-cells = <2>;
- gpio-controller;
-@@ -150,7 +144,6 @@
- <0xfe780024 4>,
- <0xfe780044 4>,
- <0xfe780064 4>;
-- interrupt-parent = <&gic>;
- interrupts = <0 27 IRQ_TYPE_LEVEL_HIGH
- 0 28 IRQ_TYPE_LEVEL_HIGH
- 0 29 IRQ_TYPE_LEVEL_HIGH
-@@ -163,7 +156,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc70000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -173,7 +165,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc71000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -183,7 +174,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc72000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -193,7 +183,6 @@
- #size-cells = <0>;
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc73000 0x1000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
- status = "disabled";
- };
-@@ -211,14 +200,12 @@
- sata: sata@fc600000 {
- compatible = "renesas,rcar-sata";
- reg = <0xfc600000 0x2000>;
-- interrupt-parent = <&gic>;
- interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
- };
-
- sdhi0: sd@ffe4c000 {
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4c000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -228,7 +215,6 @@
- sdhi1: sd@ffe4d000 {
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4d000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -238,7 +224,6 @@
- sdhi2: sd@ffe4e000 {
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4e000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -248,7 +233,6 @@
- sdhi3: sd@ffe4f000 {
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4f000 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
- cap-sd-highspeed;
- cap-sdio-irq;
-@@ -258,7 +242,6 @@
- hspi0: spi@fffc7000 {
- compatible = "renesas,hspi-r8a7779", "renesas,hspi";
- reg = <0xfffc7000 0x18>;
-- interrupt-parent = <&gic>;
- interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -268,7 +251,6 @@
- hspi1: spi@fffc8000 {
- compatible = "renesas,hspi-r8a7779", "renesas,hspi";
- reg = <0xfffc8000 0x18>;
-- interrupt-parent = <&gic>;
- interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -278,7 +260,6 @@
- hspi2: spi@fffc6000 {
- compatible = "renesas,hspi-r8a7779", "renesas,hspi";
- reg = <0xfffc6000 0x18>;
-- interrupt-parent = <&gic>;
- interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 44f03444ef74..ed57f6f5f532 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -289,7 +289,6 @@
- sdhi0: sd@ee100000 {
- compatible = "renesas,sdhi-r8a7791";
- reg = <0 0xee100000 0 0x200>;
-- interrupt-parent = <&gic>;
- interrupts = <0 165 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7791_CLK_SDHI0>;
- status = "disabled";
-@@ -298,7 +297,6 @@
- sdhi1: sd@ee140000 {
- compatible = "renesas,sdhi-r8a7791";
- reg = <0 0xee140000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 167 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7791_CLK_SDHI1>;
- status = "disabled";
-@@ -307,7 +305,6 @@
- sdhi2: sd@ee160000 {
- compatible = "renesas,sdhi-r8a7791";
- reg = <0 0xee160000 0 0x100>;
-- interrupt-parent = <&gic>;
- interrupts = <0 168 IRQ_TYPE_LEVEL_HIGH>;
- clocks = <&mstp3_clks R8A7791_CLK_SDHI2>;
- status = "disabled";
---
-2.1.2
-
diff --git a/patches.renesas/0649-ARM-shmobile-r8a7790-dtsi-Add-GPIO-clocks.patch b/patches.renesas/0649-ARM-shmobile-r8a7790-dtsi-Add-GPIO-clocks.patch
deleted file mode 100644
index d16c6027bcc2a..0000000000000
--- a/patches.renesas/0649-ARM-shmobile-r8a7790-dtsi-Add-GPIO-clocks.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From ccf4a8aafca2c7b605b84ff45263de7bb43d9834 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 23 Apr 2014 10:25:27 +0200
-Subject: ARM: shmobile: r8a7790 dtsi: Add GPIO clocks
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 81f6883f0b1bbb1dbca34cc65257f823acb55cbd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 13 ++++++++++++-
- 1 file changed, 12 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index d38d70339149..7ff29601f962 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -117,6 +117,7 @@
- gpio-ranges = <&pfc 0 0 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7790_CLK_GPIO0>;
- };
-
- gpio1: gpio@e6051000 {
-@@ -128,6 +129,7 @@
- gpio-ranges = <&pfc 0 32 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7790_CLK_GPIO1>;
- };
-
- gpio2: gpio@e6052000 {
-@@ -139,6 +141,7 @@
- gpio-ranges = <&pfc 0 64 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7790_CLK_GPIO2>;
- };
-
- gpio3: gpio@e6053000 {
-@@ -150,6 +153,7 @@
- gpio-ranges = <&pfc 0 96 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7790_CLK_GPIO3>;
- };
-
- gpio4: gpio@e6054000 {
-@@ -161,6 +165,7 @@
- gpio-ranges = <&pfc 0 128 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7790_CLK_GPIO4>;
- };
-
- gpio5: gpio@e6055000 {
-@@ -172,6 +177,7 @@
- gpio-ranges = <&pfc 0 160 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7790_CLK_GPIO5>;
- };
-
- thermal@e61f0000 {
-@@ -802,14 +808,19 @@
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-- clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>, <&cp_clk>,
-+ clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>,
-+ <&cp_clk>, <&cp_clk>, <&cp_clk>,
-+ <&p_clk>, <&p_clk>, <&cpg_clocks R8A7790_CLK_QSPI>, <&cp_clk>,
- <&hp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-+ R8A7790_CLK_GPIO5 R8A7790_CLK_GPIO4 R8A7790_CLK_GPIO3
-+ R8A7790_CLK_GPIO2 R8A7790_CLK_GPIO1 R8A7790_CLK_GPIO0
- R8A7790_CLK_RCAN1 R8A7790_CLK_RCAN0 R8A7790_CLK_QSPI_MOD R8A7790_CLK_IICDVFS
- R8A7790_CLK_I2C3 R8A7790_CLK_I2C2 R8A7790_CLK_I2C1 R8A7790_CLK_I2C0
- >;
- clock-output-names =
-+ "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
- "rcan1", "rcan0", "qspi_mod", "iic3",
- "i2c3", "i2c2", "i2c1", "i2c0";
- };
---
-2.1.2
-
diff --git a/patches.renesas/0650-ARM-shmobile-r8a7791-dtsi-Add-GPIO-clocks.patch b/patches.renesas/0650-ARM-shmobile-r8a7791-dtsi-Add-GPIO-clocks.patch
deleted file mode 100644
index e71059c9fa107..0000000000000
--- a/patches.renesas/0650-ARM-shmobile-r8a7791-dtsi-Add-GPIO-clocks.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 84f8b8b8ba4f88dc51998708f164c2646cfa85a8 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 23 Apr 2014 10:25:28 +0200
-Subject: ARM: shmobile: r8a7791 dtsi: Add GPIO clocks
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4faf9c5e56d1326067f5faca551eb67ecf76696c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 19 ++++++++++++++++---
- 1 file changed, 16 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index ed57f6f5f532..8d7ffaeff6e0 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -76,6 +76,7 @@
- gpio-ranges = <&pfc 0 0 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO0>;
- };
-
- gpio1: gpio@e6051000 {
-@@ -87,6 +88,7 @@
- gpio-ranges = <&pfc 0 32 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO1>;
- };
-
- gpio2: gpio@e6052000 {
-@@ -98,6 +100,7 @@
- gpio-ranges = <&pfc 0 64 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO2>;
- };
-
- gpio3: gpio@e6053000 {
-@@ -109,6 +112,7 @@
- gpio-ranges = <&pfc 0 96 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO3>;
- };
-
- gpio4: gpio@e6054000 {
-@@ -120,6 +124,7 @@
- gpio-ranges = <&pfc 0 128 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO4>;
- };
-
- gpio5: gpio@e6055000 {
-@@ -131,6 +136,7 @@
- gpio-ranges = <&pfc 0 160 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO5>;
- };
-
- gpio6: gpio@e6055400 {
-@@ -142,6 +148,7 @@
- gpio-ranges = <&pfc 0 192 32>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO6>;
- };
-
- gpio7: gpio@e6055800 {
-@@ -153,6 +160,7 @@
- gpio-ranges = <&pfc 0 224 26>;
- #interrupt-cells = <2>;
- interrupt-controller;
-+ clocks = <&mstp9_clks R8A7791_CLK_GPIO7>;
- };
-
- thermal@e61f0000 {
-@@ -802,18 +810,23 @@
- mstp9_clks: mstp9_clks@e6150994 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150994 0 4>, <0 0xe61509a4 0 4>;
-- clocks = <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, <&hp_clk>,
-+ clocks = <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
-+ <&cp_clk>, <&cp_clk>, <&cp_clk>, <&cp_clk>,
-+ <&p_clk>, <&p_clk>, <&cpg_clocks R8A7791_CLK_QSPI>, <&hp_clk>,
- <&cp_clk>, <&hp_clk>, <&hp_clk>, <&hp_clk>,
- <&hp_clk>, <&hp_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
-+ R8A7791_CLK_GPIO7 R8A7791_CLK_GPIO6 R8A7791_CLK_GPIO5 R8A7791_CLK_GPIO4
-+ R8A7791_CLK_GPIO3 R8A7791_CLK_GPIO2 R8A7791_CLK_GPIO1 R8A7791_CLK_GPIO0
- R8A7791_CLK_RCAN1 R8A7791_CLK_RCAN0 R8A7791_CLK_QSPI_MOD R8A7791_CLK_I2C5
- R8A7791_CLK_IICDVFS R8A7791_CLK_I2C4 R8A7791_CLK_I2C3 R8A7791_CLK_I2C2
- R8A7791_CLK_I2C1 R8A7791_CLK_I2C0
- >;
- clock-output-names =
-- "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3",
-- "i2c2", "i2c1", "i2c0";
-+ "gpio7", "gpio6", "gpio5", "gpio4", "gpio3", "gpio2", "gpio1", "gpio0",
-+ "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
-+ "i2c1", "i2c0";
- };
- mstp11_clks: mstp11_clks@e615099c {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0651-ARM-shmobile-marzen-reference-Set-SMSC-lan-to-use-ir.patch b/patches.renesas/0651-ARM-shmobile-marzen-reference-Set-SMSC-lan-to-use-ir.patch
deleted file mode 100644
index 63d9a71ffa587..0000000000000
--- a/patches.renesas/0651-ARM-shmobile-marzen-reference-Set-SMSC-lan-to-use-ir.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 01af01bb3f41d83b8a0d490530cd66fb2b1ed0ab Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Wed, 15 May 2013 11:57:30 +0900
-Subject: ARM: shmobile: marzen-reference: Set SMSC lan to use irq-push-pull
-
-This change makes the DTS consistent with the platform data
-that exists in board-marzen.c.
-
-Empirically it does not appear to be necessary.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c9af5428be0cea61a34fa8d5dda83d4c57a03b06)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen-reference.dts | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
-index 76f5eef7d1cc..b27c6373ff4d 100644
---- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
-+++ b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
-@@ -45,6 +45,7 @@
- phy-mode = "mii";
- interrupt-parent = <&irqpin0>;
- interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
-+ smsc,irq-push-pull;
- reg-io-width = <4>;
- vddvario-supply = <&fixedregulator3v3>;
- vdd33a-supply = <&fixedregulator3v3>;
---
-2.1.2
-
diff --git a/patches.renesas/0652-ARM-shmobile-Use-shmobile_init_late-on-r8a7740.patch b/patches.renesas/0652-ARM-shmobile-Use-shmobile_init_late-on-r8a7740.patch
deleted file mode 100644
index fae2a60cba745..0000000000000
--- a/patches.renesas/0652-ARM-shmobile-Use-shmobile_init_late-on-r8a7740.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 89cefdfa9cf24f021d9aa0d3d4a8f1d540f23b7b Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Mon, 12 May 2014 08:10:50 +0900
-Subject: ARM: shmobile: Use shmobile_init_late() on r8a7740
-
-Hook up ->init_late for r8a7740 to initialize Suspend-to-RAM
-and CPUIdle in case of C-code less board support for r8a7740.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 34b9fa401eeef4e388bb7563110733c73c452c80)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7740.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index c96099e3638c..35dec233301e 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -839,6 +839,7 @@ DT_MACHINE_START(R8A7740_DT, "Generic R8A7740 (Flattened Device Tree)")
- .init_early = shmobile_init_delay,
- .init_irq = r8a7740_init_irq_of,
- .init_machine = r8a7740_generic_init,
-+ .init_late = shmobile_init_late,
- .dt_compat = r8a7740_boards_compat_dt,
- MACHINE_END
-
---
-2.1.2
-
diff --git a/patches.renesas/0653-ARM-shmobile-lager-Enable-SCIF0-and-SCIF1-serial-por.patch b/patches.renesas/0653-ARM-shmobile-lager-Enable-SCIF0-and-SCIF1-serial-por.patch
deleted file mode 100644
index fc5a888ab715e..0000000000000
--- a/patches.renesas/0653-ARM-shmobile-lager-Enable-SCIF0-and-SCIF1-serial-por.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From dce9e4711699fac663929e680ce75d5b04e5f229 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 30 Apr 2014 02:31:45 +0200
-Subject: ARM: shmobile: lager: Enable SCIF0 and SCIF1 serial ports in DT
-
-SCIF0 and SCIF1 are used as debug serial ports. Enable them and
-configure pinmuxing appropriately. We can now remove the clkdev
-registration hack for SCIF devices from the Lager reference board file.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-[horms+renesas@verge.net.au: updated changelog to remove references to
- device renaming]
-[horms+renesas@verge.net.au: resolved conflicts]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 4e9c4877aacc134b568e480eb8998de58b43d63e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/boot/dts/r8a7790-lager.dts
----
- arch/arm/boot/dts/r8a7790-lager.dts | 20 +++++++++++++++++++-
- arch/arm/mach-shmobile/board-lager-reference.c | 10 ----------
- arch/arm/mach-shmobile/setup-r8a7790.c | 10 +++++-----
- 3 files changed, 24 insertions(+), 16 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 86d676f62942..9becef78c797 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -18,6 +18,11 @@
- model = "Lager";
- compatible = "renesas,lager", "renesas,r8a7790";
-
-+ aliases {
-+ serial6 = &scif0;
-+ serial7 = &scif1;
-+ };
-+
- chosen {
- bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
- };
-@@ -146,7 +151,7 @@
- };
-
- &pfc {
-- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
-+ pinctrl-0 = <&du_pins>;
- pinctrl-names = "default";
-
- du_pins: du {
-@@ -277,7 +282,20 @@
- spi-cpol;
- spi-cpha;
- };
-+};
-
-+&scif0 {
-+ pinctrl-0 = <&scif0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
-+&scif1 {
-+ pinctrl-0 = <&scif1_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
- };
-
- &sdhi0 {
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 1bca2748aa7c..749832e3f33c 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -91,16 +91,6 @@ static void __init lager_add_du_device(void)
- */
- static const struct clk_name clk_names[] __initconst = {
- { "cmt0", "fck", "sh-cmt-48-gen2.0" },
-- { "scifa0", NULL, "sh-sci.0" },
-- { "scifa1", NULL, "sh-sci.1" },
-- { "scifb0", NULL, "sh-sci.2" },
-- { "scifb1", NULL, "sh-sci.3" },
-- { "scifb2", NULL, "sh-sci.4" },
-- { "scifa2", NULL, "sh-sci.5" },
-- { "scif0", NULL, "sh-sci.6" },
-- { "scif1", NULL, "sh-sci.7" },
-- { "hscif0", NULL, "sh-sci.8" },
-- { "hscif1", NULL, "sh-sci.9" },
- { "du0", "du.0", "rcar-du-r8a7790" },
- { "du1", "du.1", "rcar-du-r8a7790" },
- { "du2", "du.2", "rcar-du-r8a7790" },
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 2a6708358d4e..6bd08b127fa4 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -281,6 +281,11 @@ static struct resource cmt0_resources[] = {
-
- void __init r8a7790_add_dt_devices(void)
- {
-+ r8a7790_register_cmt(0);
-+}
-+
-+void __init r8a7790_add_standard_devices(void)
-+{
- r8a7790_register_scif(0);
- r8a7790_register_scif(1);
- r8a7790_register_scif(2);
-@@ -291,11 +296,6 @@ void __init r8a7790_add_dt_devices(void)
- r8a7790_register_scif(7);
- r8a7790_register_scif(8);
- r8a7790_register_scif(9);
-- r8a7790_register_cmt(0);
--}
--
--void __init r8a7790_add_standard_devices(void)
--{
- r8a7790_add_dt_devices();
- r8a7790_register_irqc(0);
- r8a7790_register_thermal();
---
-2.1.2
-
diff --git a/patches.renesas/0654-ARM-shmobile-koelsch-Enable-SCIF0-and-SCIF1-serial-p.patch b/patches.renesas/0654-ARM-shmobile-koelsch-Enable-SCIF0-and-SCIF1-serial-p.patch
deleted file mode 100644
index e78a3dbe4f471..0000000000000
--- a/patches.renesas/0654-ARM-shmobile-koelsch-Enable-SCIF0-and-SCIF1-serial-p.patch
+++ /dev/null
@@ -1,126 +0,0 @@
-From f935f61c380a601ee6fd2a814ab87c634b2f37da Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 30 Apr 2014 02:31:46 +0200
-Subject: ARM: shmobile: koelsch: Enable SCIF0 and SCIF1 serial ports in DT
-
-SCIF0 and SCIF1 are used as debug serial ports. Enable them and
-configure pinmuxing appropriately. We can now remove the clkdev
-registration hack for SCIF devices from the Koelsch reference board
-file.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-[horms+renesas@verge.net.au: added aliases to avoid device renumbering]
-[horms+renesas@verge.net.au: resolved conflicts]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 5ba55fa81aee9493928c245f142a0bfe9f32d02f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 21 ++++++++++++++++++++-
- arch/arm/mach-shmobile/board-koelsch-reference.c | 15 ---------------
- arch/arm/mach-shmobile/setup-r8a7791.c | 10 +++++-----
- 3 files changed, 25 insertions(+), 21 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 0d69813def85..05d44f9b202f 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -19,6 +19,11 @@
- model = "Koelsch";
- compatible = "renesas,koelsch", "renesas,r8a7791";
-
-+ aliases {
-+ serial6 = &scif0;
-+ serial7 = &scif1;
-+ };
-+
- chosen {
- bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
- };
-@@ -230,7 +235,7 @@
- };
-
- &pfc {
-- pinctrl-0 = <&du_pins &scif0_pins &scif1_pins>;
-+ pinctrl-0 = <&du_pins>;
- pinctrl-names = "default";
-
- i2c2_pins: i2c2 {
-@@ -310,6 +315,20 @@
- status = "okay";
- };
-
-+&scif0 {
-+ pinctrl-0 = <&scif0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
-+&scif1 {
-+ pinctrl-0 = <&scif1_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
- &sdhi0 {
- pinctrl-0 = <&sdhi0_pins>;
- pinctrl-names = "default";
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index e85f7b685d26..d322a162b4b0 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -87,21 +87,6 @@ static void __init koelsch_add_du_device(void)
- */
- static const struct clk_name clk_names[] __initconst = {
- { "cmt0", "fck", "sh-cmt-48-gen2.0" },
-- { "scifa0", NULL, "sh-sci.0" },
-- { "scifa1", NULL, "sh-sci.1" },
-- { "scifb0", NULL, "sh-sci.2" },
-- { "scifb1", NULL, "sh-sci.3" },
-- { "scifb2", NULL, "sh-sci.4" },
-- { "scifa2", NULL, "sh-sci.5" },
-- { "scif0", NULL, "sh-sci.6" },
-- { "scif1", NULL, "sh-sci.7" },
-- { "scif2", NULL, "sh-sci.8" },
-- { "scif3", NULL, "sh-sci.9" },
-- { "scif4", NULL, "sh-sci.10" },
-- { "scif5", NULL, "sh-sci.11" },
-- { "scifa3", NULL, "sh-sci.12" },
-- { "scifa4", NULL, "sh-sci.13" },
-- { "scifa5", NULL, "sh-sci.14" },
- { "du0", "du.0", "rcar-du-r8a7791" },
- { "du1", "du.1", "rcar-du-r8a7791" },
- { "lvds0", "lvds.0", "rcar-du-r8a7791" },
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 74a416e52fb9..04a96ddb3224 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -182,6 +182,11 @@ static const struct resource thermal_resources[] __initconst = {
-
- void __init r8a7791_add_dt_devices(void)
- {
-+ r8a7791_register_cmt(0);
-+}
-+
-+void __init r8a7791_add_standard_devices(void)
-+{
- r8a7791_register_scif(0);
- r8a7791_register_scif(1);
- r8a7791_register_scif(2);
-@@ -197,11 +202,6 @@ void __init r8a7791_add_dt_devices(void)
- r8a7791_register_scif(12);
- r8a7791_register_scif(13);
- r8a7791_register_scif(14);
-- r8a7791_register_cmt(0);
--}
--
--void __init r8a7791_add_standard_devices(void)
--{
- r8a7791_add_dt_devices();
- r8a7791_register_irqc(0);
- r8a7791_register_thermal();
---
-2.1.2
-
diff --git a/patches.renesas/0655-ARM-shmobile-r7s72100-add-essential-clock-nodes-to-d.patch b/patches.renesas/0655-ARM-shmobile-r7s72100-add-essential-clock-nodes-to-d.patch
deleted file mode 100644
index 9fecc10b5cbe0..0000000000000
--- a/patches.renesas/0655-ARM-shmobile-r7s72100-add-essential-clock-nodes-to-d.patch
+++ /dev/null
@@ -1,167 +0,0 @@
-From ae34743efe7e2a380cb6c62774633a2458c09e9b Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:06 +0200
-Subject: ARM: shmobile: r7s72100: add essential clock nodes to dtsi
-
-Only essential clocks are added for now. Other clocks will be added when
-needed.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b6face404f38f783c4428d953efa4eeb68d7cc24)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100.dtsi | 86 +++++++++++++++++++++++++++++-
- include/dt-bindings/clock/r7s72100-clock.h | 28 ++++++++++
- 2 files changed, 113 insertions(+), 1 deletion(-)
- create mode 100644 include/dt-bindings/clock/r7s72100-clock.h
-
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index ee700717a34b..5a6e2481b567 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -1,13 +1,15 @@
- /*
- * Device Tree Source for the r7s72100 SoC
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-14 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
- * kind, whether express or implied.
- */
-
-+#include <dt-bindings/clock/r7s72100-clock.h>
- #include <dt-bindings/interrupt-controller/irq.h>
-
- / {
-@@ -28,6 +30,88 @@
- spi4 = &spi4;
- };
-
-+ clocks {
-+ ranges;
-+ #address-cells = <1>;
-+ #size-cells = <1>;
-+
-+ /* External clocks */
-+ extal_clk: extal_clk {
-+ #clock-cells = <0>;
-+ compatible = "fixed-clock";
-+ /* If clk present, value must be set by board */
-+ clock-frequency = <0>;
-+ clock-output-names = "extal";
-+ };
-+
-+ usb_x1_clk: usb_x1_clk {
-+ #clock-cells = <0>;
-+ compatible = "fixed-clock";
-+ /* If clk present, value must be set by board */
-+ clock-frequency = <0>;
-+ clock-output-names = "usb_x1";
-+ };
-+
-+ /* Special CPG clocks */
-+ cpg_clocks: cpg_clocks@fcfe0000 {
-+ #clock-cells = <1>;
-+ compatible = "renesas,r7s72100-cpg-clocks",
-+ "renesas,rz-cpg-clocks";
-+ reg = <0xfcfe0000 0x18>;
-+ clocks = <&extal_clk>, <&usb_x1_clk>;
-+ clock-output-names = "pll", "i", "g";
-+ };
-+
-+ /* Fixed factor clocks */
-+ b_clk: b_clk {
-+ #clock-cells = <0>;
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R7S72100_CLK_PLL>;
-+ clock-mult = <1>;
-+ clock-div = <3>;
-+ clock-output-names = "b";
-+ };
-+ p1_clk: p1_clk {
-+ #clock-cells = <0>;
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R7S72100_CLK_PLL>;
-+ clock-mult = <1>;
-+ clock-div = <6>;
-+ clock-output-names = "p1";
-+ };
-+ p0_clk: p0_clk {
-+ #clock-cells = <0>;
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R7S72100_CLK_PLL>;
-+ clock-mult = <1>;
-+ clock-div = <12>;
-+ clock-output-names = "p0";
-+ };
-+
-+ /* MSTP clocks */
-+ mstp3_clks: mstp3_clks@fcfe0420 {
-+ #clock-cells = <1>;
-+ compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
-+ reg = <0xfcfe0420 4>;
-+ clocks = <&p0_clk>;
-+ clock-indices = <R7S72100_CLK_MTU2>;
-+ clock-output-names = "mtu2";
-+ };
-+
-+ mstp4_clks: mstp4_clks@fcfe0424 {
-+ #clock-cells = <1>;
-+ compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
-+ reg = <0xfcfe0424 4>;
-+ clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>,
-+ <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>;
-+ clock-indices = <
-+ R7S72100_CLK_SCIF0 R7S72100_CLK_SCIF1 R7S72100_CLK_SCIF2 R7S72100_CLK_SCIF3
-+ R7S72100_CLK_SCIF4 R7S72100_CLK_SCIF5 R7S72100_CLK_SCIF6 R7S72100_CLK_SCIF7
-+ >;
-+ clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7";
-+ };
-+ };
-+
- cpus {
- #address-cells = <1>;
- #size-cells = <0>;
-diff --git a/include/dt-bindings/clock/r7s72100-clock.h b/include/dt-bindings/clock/r7s72100-clock.h
-new file mode 100644
-index 000000000000..c756f1cf0d52
---- /dev/null
-+++ b/include/dt-bindings/clock/r7s72100-clock.h
-@@ -0,0 +1,28 @@
-+/*
-+ * Copyright (C) 2014 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.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; version 2 of the License.
-+ */
-+
-+#ifndef __DT_BINDINGS_CLOCK_R7S72100_H__
-+#define __DT_BINDINGS_CLOCK_R7S72100_H__
-+
-+#define R7S72100_CLK_PLL 0
-+
-+/* MSTP3 */
-+#define R7S72100_CLK_MTU2 3
-+
-+/* MSTP4 */
-+#define R7S72100_CLK_SCIF0 7
-+#define R7S72100_CLK_SCIF1 6
-+#define R7S72100_CLK_SCIF2 5
-+#define R7S72100_CLK_SCIF3 4
-+#define R7S72100_CLK_SCIF4 3
-+#define R7S72100_CLK_SCIF5 2
-+#define R7S72100_CLK_SCIF6 1
-+#define R7S72100_CLK_SCIF7 0
-+
-+#endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0656-ARM-shmobile-r7s72100-genmai-populate-nodes-for-exte.patch b/patches.renesas/0656-ARM-shmobile-r7s72100-genmai-populate-nodes-for-exte.patch
deleted file mode 100644
index d2158c5556c6a..0000000000000
--- a/patches.renesas/0656-ARM-shmobile-r7s72100-genmai-populate-nodes-for-exte.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From ed1025a13fd22e2385576b4f959b1450619e336d Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:07 +0200
-Subject: ARM: shmobile: r7s72100: genmai: populate nodes for external clocks
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5f76a5699f52052468e006e6c58010c5183b8386)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-index e664611a47c8..941e72ce7c82 100644
---- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-+++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-@@ -30,6 +30,14 @@
- };
- };
-
-+&extal_clk {
-+ clock-frequency = <13330000>;
-+};
-+
-+&usb_x1_clk {
-+ clock-frequency = <48000000>;
-+};
-+
- &i2c2 {
- status = "okay";
- clock-frequency = <400000>;
---
-2.1.2
-
diff --git a/patches.renesas/0657-ARM-shmobile-r7s72100-add-scif-nodes-to-dtsi.patch b/patches.renesas/0657-ARM-shmobile-r7s72100-add-scif-nodes-to-dtsi.patch
deleted file mode 100644
index f6fe07c42b0c6..0000000000000
--- a/patches.renesas/0657-ARM-shmobile-r7s72100-add-scif-nodes-to-dtsi.patch
+++ /dev/null
@@ -1,125 +0,0 @@
-From 9b85f11aa82b56d9010bd10828bb7ce1e960f233 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:08 +0200
-Subject: ARM: shmobile: r7s72100: add scif nodes to dtsi
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4c84c1b3accabdfb7aa8e98a4644c94df0703bb0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100.dtsi | 96 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 96 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index 5a6e2481b567..a4a67380b0a2 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -200,6 +200,102 @@
- status = "disabled";
- };
-
-+ scif0: serial@e8007000 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe8007000 64>;
-+ interrupts = <0 190 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 191 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 192 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 189 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF0>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif1: serial@e8007800 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe8007800 64>;
-+ interrupts = <0 194 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 195 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 196 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 193 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF1>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif2: serial@e8008000 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe8008000 64>;
-+ interrupts = <0 198 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 199 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 200 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 197 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF2>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif3: serial@e8008800 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe8008800 64>;
-+ interrupts = <0 202 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 203 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 204 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 201 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF3>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif4: serial@e8009000 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe8009000 64>;
-+ interrupts = <0 206 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 207 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 208 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 205 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF4>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif5: serial@e8009800 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe8009800 64>;
-+ interrupts = <0 210 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 211 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 212 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 209 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF5>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif6: serial@e800a000 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe800a000 64>;
-+ interrupts = <0 214 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 215 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 216 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 213 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF6>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif7: serial@e800a800 {
-+ compatible = "renesas,scif-r7s72100", "renesas,scif";
-+ reg = <0xe800a800 64>;
-+ interrupts = <0 218 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 219 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 220 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 217 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp4_clks R7S72100_CLK_SCIF7>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
- spi0: spi@e800c800 {
- compatible = "renesas,rspi-r7s72100", "renesas,rspi-rz";
- reg = <0xe800c800 0x24>;
---
-2.1.2
-
diff --git a/patches.renesas/0658-ARM-shmobile-r7s72100-genmai-add-uart-alias-and-acti.patch b/patches.renesas/0658-ARM-shmobile-r7s72100-genmai-add-uart-alias-and-acti.patch
deleted file mode 100644
index 4e74cba1f141e..0000000000000
--- a/patches.renesas/0658-ARM-shmobile-r7s72100-genmai-add-uart-alias-and-acti.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From c942e82891bb7f96d137e0e8ecfdb1e22ad6053b Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:09 +0200
-Subject: ARM: shmobile: r7s72100: genmai: add uart alias and activate scif2 as
- console
-
-We keep the UART naming backwards compatible with the legacy version.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5be13fefdb83c15ed69eb032dfe011162d1a5269)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 11 ++++++++++-
- 1 file changed, 10 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-index 941e72ce7c82..ca88458e0706 100644
---- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-+++ b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-@@ -1,7 +1,8 @@
- /*
- * Device Tree Source for the Genmai board
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-14 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
-@@ -15,6 +16,10 @@
- model = "Genmai";
- compatible = "renesas,genmai-reference", "renesas,r7s72100";
-
-+ aliases {
-+ serial2 = &scif2;
-+ };
-+
- chosen {
- bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
- };
-@@ -48,3 +53,7 @@
- pagesize = <64>;
- };
- };
-+
-+&scif2 {
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0659-ARM-shmobile-r7s72100-genmai-platform-scif-devices-o.patch b/patches.renesas/0659-ARM-shmobile-r7s72100-genmai-platform-scif-devices-o.patch
deleted file mode 100644
index dd7082f66c11a..0000000000000
--- a/patches.renesas/0659-ARM-shmobile-r7s72100-genmai-platform-scif-devices-o.patch
+++ /dev/null
@@ -1,159 +0,0 @@
-From 1b68ac7781e0009b33c63a72d5b4c8e6ad91a2fc Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:10 +0200
-Subject: ARM: shmobile: r7s72100: genmai: platform scif devices only for
- legacy support
-
-We have now DT support for SCIF, so use the platform_device
-initialization only for the legacy support.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d45b21c9021d7de7941b00f0902a9401fb32a3d9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai.c | 44 +++++++++++++++++++++++++++++++++
- arch/arm/mach-shmobile/setup-r7s72100.c | 43 --------------------------------
- 2 files changed, 44 insertions(+), 43 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index 6c328d63b819..c94201ee8596 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -21,6 +21,7 @@
-
- #include <linux/kernel.h>
- #include <linux/platform_device.h>
-+#include <linux/serial_sci.h>
- #include <linux/sh_eth.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
-@@ -89,6 +90,40 @@ static const struct spi_board_info spi_info[] __initconst = {
- },
- };
-
-+/* SCIF */
-+#define R7S72100_SCIF(index, baseaddr, irq) \
-+static const struct plat_sci_port scif##index##_platform_data = { \
-+ .type = PORT_SCIF, \
-+ .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \
-+ .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
-+ .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \
-+ SCSCR_REIE, \
-+}; \
-+ \
-+static struct resource scif##index##_resources[] = { \
-+ DEFINE_RES_MEM(baseaddr, 0x100), \
-+ DEFINE_RES_IRQ(irq + 1), \
-+ DEFINE_RES_IRQ(irq + 2), \
-+ DEFINE_RES_IRQ(irq + 3), \
-+ DEFINE_RES_IRQ(irq), \
-+} \
-+
-+R7S72100_SCIF(0, 0xe8007000, gic_iid(221));
-+R7S72100_SCIF(1, 0xe8007800, gic_iid(225));
-+R7S72100_SCIF(2, 0xe8008000, gic_iid(229));
-+R7S72100_SCIF(3, 0xe8008800, gic_iid(233));
-+R7S72100_SCIF(4, 0xe8009000, gic_iid(237));
-+R7S72100_SCIF(5, 0xe8009800, gic_iid(241));
-+R7S72100_SCIF(6, 0xe800a000, gic_iid(245));
-+R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
-+
-+#define r7s72100_register_scif(index) \
-+ platform_device_register_resndata(&platform_bus, "sh-sci", index, \
-+ scif##index##_resources, \
-+ ARRAY_SIZE(scif##index##_resources), \
-+ &scif##index##_platform_data, \
-+ sizeof(scif##index##_platform_data))
-+
- static void __init genmai_add_standard_devices(void)
- {
- r7s72100_clock_init();
-@@ -102,6 +137,15 @@ static void __init genmai_add_standard_devices(void)
- r7s72100_register_rspi(3);
- r7s72100_register_rspi(4);
- spi_register_board_info(spi_info, ARRAY_SIZE(spi_info));
-+
-+ r7s72100_register_scif(0);
-+ r7s72100_register_scif(1);
-+ r7s72100_register_scif(2);
-+ r7s72100_register_scif(3);
-+ r7s72100_register_scif(4);
-+ r7s72100_register_scif(5);
-+ r7s72100_register_scif(6);
-+ r7s72100_register_scif(7);
- }
-
- static const char * const genmai_boards_compat_dt[] __initconst = {
-diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
-index 545db1512480..412e179429cd 100644
---- a/arch/arm/mach-shmobile/setup-r7s72100.c
-+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
-@@ -21,47 +21,12 @@
- #include <linux/irq.h>
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
--#include <linux/serial_sci.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/r7s72100.h>
- #include <asm/mach/arch.h>
-
--#define R7S72100_SCIF(index, baseaddr, irq) \
--static const struct plat_sci_port scif##index##_platform_data = { \
-- .type = PORT_SCIF, \
-- .regtype = SCIx_SH2_SCIF_FIFODATA_REGTYPE, \
-- .flags = UPF_BOOT_AUTOCONF | UPF_IOREMAP, \
-- .scscr = SCSCR_RIE | SCSCR_TIE | SCSCR_RE | SCSCR_TE | \
-- SCSCR_REIE, \
--}; \
-- \
--static struct resource scif##index##_resources[] = { \
-- DEFINE_RES_MEM(baseaddr, 0x100), \
-- DEFINE_RES_IRQ(irq + 1), \
-- DEFINE_RES_IRQ(irq + 2), \
-- DEFINE_RES_IRQ(irq + 3), \
-- DEFINE_RES_IRQ(irq), \
--} \
--
--R7S72100_SCIF(0, 0xe8007000, gic_iid(221));
--R7S72100_SCIF(1, 0xe8007800, gic_iid(225));
--R7S72100_SCIF(2, 0xe8008000, gic_iid(229));
--R7S72100_SCIF(3, 0xe8008800, gic_iid(233));
--R7S72100_SCIF(4, 0xe8009000, gic_iid(237));
--R7S72100_SCIF(5, 0xe8009800, gic_iid(241));
--R7S72100_SCIF(6, 0xe800a000, gic_iid(245));
--R7S72100_SCIF(7, 0xe800a800, gic_iid(249));
--
--#define r7s72100_register_scif(index) \
-- platform_device_register_resndata(&platform_bus, "sh-sci", index, \
-- scif##index##_resources, \
-- ARRAY_SIZE(scif##index##_resources), \
-- &scif##index##_platform_data, \
-- sizeof(scif##index##_platform_data))
--
--
- static struct resource mtu2_resources[] __initdata = {
- DEFINE_RES_MEM(0xfcff0000, 0x400),
- DEFINE_RES_IRQ_NAMED(gic_iid(139), "tgi0a"),
-@@ -75,14 +40,6 @@ static struct resource mtu2_resources[] __initdata = {
-
- void __init r7s72100_add_dt_devices(void)
- {
-- r7s72100_register_scif(0);
-- r7s72100_register_scif(1);
-- r7s72100_register_scif(2);
-- r7s72100_register_scif(3);
-- r7s72100_register_scif(4);
-- r7s72100_register_scif(5);
-- r7s72100_register_scif(6);
-- r7s72100_register_scif(7);
- r7s72100_register_mtu2();
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0660-ARM-shmobile-r7s72100-add-i2c-clocks-to-dtsi.patch b/patches.renesas/0660-ARM-shmobile-r7s72100-add-i2c-clocks-to-dtsi.patch
deleted file mode 100644
index ecc8177be65d0..0000000000000
--- a/patches.renesas/0660-ARM-shmobile-r7s72100-add-i2c-clocks-to-dtsi.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From 99229899541e43b3386778a9679ed53208013de5 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:11 +0200
-Subject: ARM: shmobile: r7s72100: add i2c clocks to dtsi
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d165566b8dc425e52a4f2c19c27c63d9807128b2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100.dtsi | 15 +++++++++++++++
- include/dt-bindings/clock/r7s72100-clock.h | 6 ++++++
- 2 files changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index a4a67380b0a2..afce2e344c7a 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -110,6 +110,17 @@
- >;
- clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4", "scif5", "scif6", "scif7";
- };
-+
-+ mstp9_clks: mstp9_clks@fcfe0438 {
-+ #clock-cells = <1>;
-+ compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
-+ reg = <0xfcfe0438 4>;
-+ clocks = <&p0_clk>, <&p0_clk>, <&p0_clk>, <&p0_clk>;
-+ clock-indices = <
-+ R7S72100_CLK_I2C0 R7S72100_CLK_I2C1 R7S72100_CLK_I2C2 R7S72100_CLK_I2C3
-+ >;
-+ clock-output-names = "i2c0", "i2c1", "i2c2", "i2c3";
-+ };
- };
-
- cpus {
-@@ -145,6 +156,7 @@
- <0 162 IRQ_TYPE_LEVEL_HIGH>,
- <0 163 IRQ_TYPE_LEVEL_HIGH>,
- <0 164 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R7S72100_CLK_I2C0>;
- clock-frequency = <100000>;
- status = "disabled";
- };
-@@ -162,6 +174,7 @@
- <0 170 IRQ_TYPE_LEVEL_HIGH>,
- <0 171 IRQ_TYPE_LEVEL_HIGH>,
- <0 172 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R7S72100_CLK_I2C1>;
- clock-frequency = <100000>;
- status = "disabled";
- };
-@@ -179,6 +192,7 @@
- <0 178 IRQ_TYPE_LEVEL_HIGH>,
- <0 179 IRQ_TYPE_LEVEL_HIGH>,
- <0 180 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R7S72100_CLK_I2C2>;
- clock-frequency = <100000>;
- status = "disabled";
- };
-@@ -196,6 +210,7 @@
- <0 186 IRQ_TYPE_LEVEL_HIGH>,
- <0 187 IRQ_TYPE_LEVEL_HIGH>,
- <0 188 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp9_clks R7S72100_CLK_I2C3>;
- clock-frequency = <100000>;
- status = "disabled";
- };
-diff --git a/include/dt-bindings/clock/r7s72100-clock.h b/include/dt-bindings/clock/r7s72100-clock.h
-index c756f1cf0d52..ff84e0bafd7b 100644
---- a/include/dt-bindings/clock/r7s72100-clock.h
-+++ b/include/dt-bindings/clock/r7s72100-clock.h
-@@ -25,4 +25,10 @@
- #define R7S72100_CLK_SCIF6 1
- #define R7S72100_CLK_SCIF7 0
-
-+/* MSTP9 */
-+#define R7S72100_CLK_I2C0 7
-+#define R7S72100_CLK_I2C1 6
-+#define R7S72100_CLK_I2C2 5
-+#define R7S72100_CLK_I2C3 4
-+
- #endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0661-ARM-shmobile-r7s72100-remove-I2C-DT-clocks-from-lega.patch b/patches.renesas/0661-ARM-shmobile-r7s72100-remove-I2C-DT-clocks-from-lega.patch
deleted file mode 100644
index a559dfb731933..0000000000000
--- a/patches.renesas/0661-ARM-shmobile-r7s72100-remove-I2C-DT-clocks-from-lega.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From c7366c6697fb54b46b255bed74fb487df22ef850 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:12 +0200
-Subject: ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock
- support
-
-Not used anymore since we switched to CCF.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 316b9353784386aedc4f2643dfdfda30da268b0b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 4 ----
- 1 file changed, 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index 644f1c2a96c7..1a797fe9e42f 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -199,10 +199,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e800d800.spi", &mstp_clks[MSTP105]),
- CLKDEV_DEV_ID("e800e000.spi", &mstp_clks[MSTP104]),
- CLKDEV_DEV_ID("e800e800.spi", &mstp_clks[MSTP103]),
-- CLKDEV_DEV_ID("fcfee000.i2c", &mstp_clks[MSTP97]),
-- CLKDEV_DEV_ID("fcfee400.i2c", &mstp_clks[MSTP96]),
-- CLKDEV_DEV_ID("fcfee800.i2c", &mstp_clks[MSTP95]),
-- CLKDEV_DEV_ID("fcfeec00.i2c", &mstp_clks[MSTP94]),
- CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),
-
- /* ICK */
---
-2.1.2
-
diff --git a/patches.renesas/0662-ARM-shmobile-r7s72100-add-spi-clocks-to-dtsi.patch b/patches.renesas/0662-ARM-shmobile-r7s72100-add-spi-clocks-to-dtsi.patch
deleted file mode 100644
index 42270f183c8c5..0000000000000
--- a/patches.renesas/0662-ARM-shmobile-r7s72100-add-spi-clocks-to-dtsi.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 849ab92b9850c897d389df5d3fe97ff7694967ab Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:13 +0200
-Subject: ARM: shmobile: r7s72100: add spi clocks to dtsi
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 52eed4f5c267bd50d870f9c63d0a83d6f83d8bab)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100.dtsi | 18 ++++++++++++++++++
- include/dt-bindings/clock/r7s72100-clock.h | 7 +++++++
- 2 files changed, 25 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index afce2e344c7a..f50fbc8f3bd9 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -121,6 +121,19 @@
- >;
- clock-output-names = "i2c0", "i2c1", "i2c2", "i2c3";
- };
-+
-+ mstp10_clks: mstp10_clks@fcfe043c {
-+ #clock-cells = <1>;
-+ compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-clocks";
-+ reg = <0xfcfe043c 4>;
-+ clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>,
-+ <&p1_clk>;
-+ clock-indices = <
-+ R7S72100_CLK_SPI0 R7S72100_CLK_SPI1 R7S72100_CLK_SPI2 R7S72100_CLK_SPI3
-+ R7S72100_CLK_SPI4
-+ >;
-+ clock-output-names = "spi0", "spi1", "spi2", "spi3", "spi4";
-+ };
- };
-
- cpus {
-@@ -318,6 +331,7 @@
- <0 239 IRQ_TYPE_LEVEL_HIGH>,
- <0 240 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "error", "rx", "tx";
-+ clocks = <&mstp10_clks R7S72100_CLK_SPI0>;
- num-cs = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -331,6 +345,7 @@
- <0 242 IRQ_TYPE_LEVEL_HIGH>,
- <0 243 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "error", "rx", "tx";
-+ clocks = <&mstp10_clks R7S72100_CLK_SPI1>;
- num-cs = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -344,6 +359,7 @@
- <0 245 IRQ_TYPE_LEVEL_HIGH>,
- <0 246 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "error", "rx", "tx";
-+ clocks = <&mstp10_clks R7S72100_CLK_SPI2>;
- num-cs = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -357,6 +373,7 @@
- <0 248 IRQ_TYPE_LEVEL_HIGH>,
- <0 249 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "error", "rx", "tx";
-+ clocks = <&mstp10_clks R7S72100_CLK_SPI3>;
- num-cs = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-@@ -370,6 +387,7 @@
- <0 251 IRQ_TYPE_LEVEL_HIGH>,
- <0 252 IRQ_TYPE_LEVEL_HIGH>;
- interrupt-names = "error", "rx", "tx";
-+ clocks = <&mstp10_clks R7S72100_CLK_SPI4>;
- num-cs = <1>;
- #address-cells = <1>;
- #size-cells = <0>;
-diff --git a/include/dt-bindings/clock/r7s72100-clock.h b/include/dt-bindings/clock/r7s72100-clock.h
-index ff84e0bafd7b..5128f4d94f44 100644
---- a/include/dt-bindings/clock/r7s72100-clock.h
-+++ b/include/dt-bindings/clock/r7s72100-clock.h
-@@ -31,4 +31,11 @@
- #define R7S72100_CLK_I2C2 5
- #define R7S72100_CLK_I2C3 4
-
-+/* MSTP10 */
-+#define R7S72100_CLK_SPI0 7
-+#define R7S72100_CLK_SPI1 6
-+#define R7S72100_CLK_SPI2 5
-+#define R7S72100_CLK_SPI3 4
-+#define R7S72100_CLK_SPI4 3
-+
- #endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0663-ARM-shmobile-r7s72100-remove-SPI-DT-clocks-from-lega.patch b/patches.renesas/0663-ARM-shmobile-r7s72100-remove-SPI-DT-clocks-from-lega.patch
deleted file mode 100644
index 6aed66f87518a..0000000000000
--- a/patches.renesas/0663-ARM-shmobile-r7s72100-remove-SPI-DT-clocks-from-lega.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From e4369ec07be28b534fe09eafa7a725895137b184 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:14 +0200
-Subject: ARM: shmobile: r7s72100: remove SPI DT clocks from legacy clock
- support
-
-Not used anymore since we switched to CCF.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3158e053ff45ed36d531d775cf0040642b91b606)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r7s72100.c | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index 1a797fe9e42f..df187484de5d 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -194,11 +194,6 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("rspi-rz.2", &mstp_clks[MSTP105]),
- CLKDEV_DEV_ID("rspi-rz.3", &mstp_clks[MSTP104]),
- CLKDEV_DEV_ID("rspi-rz.4", &mstp_clks[MSTP103]),
-- CLKDEV_DEV_ID("e800c800.spi", &mstp_clks[MSTP107]),
-- CLKDEV_DEV_ID("e800d000.spi", &mstp_clks[MSTP106]),
-- CLKDEV_DEV_ID("e800d800.spi", &mstp_clks[MSTP105]),
-- CLKDEV_DEV_ID("e800e000.spi", &mstp_clks[MSTP104]),
-- CLKDEV_DEV_ID("e800e800.spi", &mstp_clks[MSTP103]),
- CLKDEV_DEV_ID("r7s72100-ether", &mstp_clks[MSTP74]),
-
- /* ICK */
---
-2.1.2
-
diff --git a/patches.renesas/0664-ARM-shmobile-Add-forward-declaration-of-struct-clk-t.patch b/patches.renesas/0664-ARM-shmobile-Add-forward-declaration-of-struct-clk-t.patch
deleted file mode 100644
index c10d3f33e52d4..0000000000000
--- a/patches.renesas/0664-ARM-shmobile-Add-forward-declaration-of-struct-clk-t.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 3743219eee51446646a7807ba99f50eb0db34cb3 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 03:10:16 +0200
-Subject: ARM: shmobile: Add forward declaration of struct clk to silence
- warning
-
-arch/arm/mach-shmobile/board-genmai-reference.c:23:0:
-arch/arm/mach-shmobile/include/mach/clock.h:19:54: warning: 'struct clk' declared inside parameter list [enabled by default]
-arch/arm/mach-shmobile/include/mach/clock.h:19:54: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1f9c7a691fefc2158bed4d5403422cc9b99ca335)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/clock.h | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/include/mach/clock.h
-index 9a93cf924b9c..31b6417463e6 100644
---- a/arch/arm/mach-shmobile/include/mach/clock.h
-+++ b/arch/arm/mach-shmobile/include/mach/clock.h
-@@ -16,6 +16,7 @@ void shmobile_clk_workaround(const struct clk_name *clks, int nr_clks,
- #else /* CONFIG_COMMON_CLK */
- /* legacy clock implementation */
-
-+struct clk;
- unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk);
- extern struct sh_clk_ops shmobile_fixed_ratio_clk_ops;
-
---
-2.1.2
-
diff --git a/patches.renesas/0665-ARM-shmobile-r7s72100-use-workaround-for-non-DT-cloc.patch b/patches.renesas/0665-ARM-shmobile-r7s72100-use-workaround-for-non-DT-cloc.patch
deleted file mode 100644
index bc471a916f6d3..0000000000000
--- a/patches.renesas/0665-ARM-shmobile-r7s72100-use-workaround-for-non-DT-cloc.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 74108fbd9c0ea6a6d9696e992513afa74edddf6c Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Wed, 14 May 2014 03:10:15 +0200
-Subject: ARM: shmobile: r7s72100: use workaround for non DT-clocks
-
-MTU2 is not yet prepared for DT usage, so use the common workaround via
-clkdev for now.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9fbb1ae01b878e2cce9626fa6fdc9e5dcefeb6b5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai-reference.c | 14 ++++++++++++--
- 1 file changed, 12 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index 7630c1053e32..33015e5ed52a 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -18,18 +18,28 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#include <linux/clk-provider.h>
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
-+#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/r7s72100.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-
-+#ifdef CONFIG_COMMON_CLK
-+/*
-+ * This is a really crude hack to provide clkdev support to platform
-+ * devices until they get moved to DT.
-+ */
-+static const struct clk_name clk_names[] = {
-+ { "mtu2", "fck", "sh-mtu2" },
-+};
-+#endif
-+
- static void __init genmai_add_standard_devices(void)
- {
- #ifdef CONFIG_COMMON_CLK
-- of_clk_init(NULL);
-+ shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true);
- #else
- r7s72100_clock_init();
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0666-ARM-shmobile-Set-clock-frequency-in-HZ-from-OF-nodes.patch b/patches.renesas/0666-ARM-shmobile-Set-clock-frequency-in-HZ-from-OF-nodes.patch
deleted file mode 100644
index 64e93ce649120..0000000000000
--- a/patches.renesas/0666-ARM-shmobile-Set-clock-frequency-in-HZ-from-OF-nodes.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From ccb5373448691d47807bfa160cc6bcfa06252c35 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 13 May 2014 15:59:18 +0900
-Subject: ARM: shmobile: Set clock frequency in HZ from OF nodes
-
-shmobile_init_delay() looks for OF "clock-frequency" to determine
-the delay which is set by calling shmobile_setup_delay().
-
-Unfortunately this seems to be incorrect in detail as
-"clock-frequency" node values are in HZ whereas the frequency
-argument to shmobile_setup_delay() is in MHz.
-
-Provide a variant of shmobile_setup_delay() that accepts HZ to
-correct this problem.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f492b81777c93b33afe892b424e022022b5bc297)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/timer.c | 23 ++++++++++++++++++++---
- 1 file changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
-index ccecde9a3362..68bc0b82226d 100644
---- a/arch/arm/mach-shmobile/timer.c
-+++ b/arch/arm/mach-shmobile/timer.c
-@@ -23,6 +23,23 @@
- #include <linux/delay.h>
- #include <linux/of_address.h>
-
-+void __init shmobile_setup_delay_hz(unsigned int max_cpu_core_hz,
-+ unsigned int mult, unsigned int div)
-+{
-+ /* calculate a worst-case loops-per-jiffy value
-+ * based on maximum cpu core hz setting and the
-+ * __delay() implementation in arch/arm/lib/delay.S
-+ *
-+ * this will result in a longer delay than expected
-+ * when the cpu core runs on lower frequencies.
-+ */
-+
-+ unsigned int value = HZ * div / mult;
-+
-+ if (!preset_lpj)
-+ preset_lpj = max_cpu_core_hz / value;
-+}
-+
- void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
- unsigned int mult, unsigned int div)
- {
-@@ -58,12 +75,12 @@ void __init shmobile_init_delay(void)
-
- if (max_freq) {
- if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8"))
-- shmobile_setup_delay(max_freq, 1, 3);
-+ shmobile_setup_delay_hz(max_freq, 1, 3);
- else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
-- shmobile_setup_delay(max_freq, 1, 3);
-+ shmobile_setup_delay_hz(max_freq, 1, 3);
- else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15"))
- if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
-- shmobile_setup_delay(max_freq, 2, 4);
-+ shmobile_setup_delay_hz(max_freq, 2, 4);
- }
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0667-ARM-shmobile-r8a7740-dtsi-Remove-duplicate-interrupt.patch b/patches.renesas/0667-ARM-shmobile-r8a7740-dtsi-Remove-duplicate-interrupt.patch
deleted file mode 100644
index 9d1b0da755183..0000000000000
--- a/patches.renesas/0667-ARM-shmobile-r8a7740-dtsi-Remove-duplicate-interrupt.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 5d48a53e45aa5ddc46e88a0be50b5cc6152d6d6c Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:41:12 +0200
-Subject: ARM: shmobile: r8a7740 dtsi: Remove duplicate interrupt-parent
- property
-
-Caused by interaction between commit
-08ec67b50db7ca8c9077e67ca23850cdc5bfc716 ("ARM: shmobile: r8a7740 dtsi:
-Add Ethernet support") and commit 9ff254adc1e32db46000a33b8ecbc4d7047672be
-("ARM: shmobile: dts: Move interrupt-parent property to root node").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3fa3985e624aea24334abc9a33b484c3d316e64e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740.dtsi | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index ce7a0b29ae7c..55d29f4d2ed6 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -124,7 +124,6 @@
- compatible = "renesas,gether-r8a7740";
- reg = <0xe9a00000 0x800>,
- <0xe9a01800 0x800>;
-- interrupt-parent = <&gic>;
- interrupts = <0 110 IRQ_TYPE_LEVEL_HIGH>;
- /* clocks = <&mstp3_clks R8A7740_CLK_GETHER>; */
- phy-mode = "mii";
---
-2.1.2
-
diff --git a/patches.renesas/0668-ARM-shmobile-Remove-non-multiplatform-Genmai-referen.patch b/patches.renesas/0668-ARM-shmobile-Remove-non-multiplatform-Genmai-referen.patch
deleted file mode 100644
index 3552a1eba8658..0000000000000
--- a/patches.renesas/0668-ARM-shmobile-Remove-non-multiplatform-Genmai-referen.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From d57c54652095a0505113d06b0eca9aa951ec4381 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 16 May 2014 14:10:12 +0200
-Subject: ARM: shmobile: Remove non-multiplatform Genmai reference support
-
-Now that r7s72100 has CCF support, remove the legacy Genmai reference
-Kconfig bits for the non-multiplatform case.
-
-Starting from this commit Genmai board support is always enabled via
-CONFIG_MACH_GENMAI, and CONFIG_ARCH_MULTIPLATFORM is used to select
-between board-genmai.c and board-genmai-reference.c
-
-The file board-genmai-reference.c can no longer be used together with
-the legacy sh-clk clock framework, instead CCF is used.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 551f80a5c915c4615cd4065ad4db5cf68f765b97)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/boot/dts/Makefile
----
- arch/arm/boot/dts/Makefile | 1 -
- arch/arm/mach-shmobile/Kconfig | 11 -----------
- arch/arm/mach-shmobile/Makefile | 1 -
- arch/arm/mach-shmobile/Makefile.boot | 1 -
- 4 files changed, 14 deletions(-)
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 234247b51db7..f4d6c845a4cd 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -245,7 +245,6 @@ dtb-$(CONFIG_ARCH_S3C24XX) += s3c2416-smdk2416.dtb
- dtb-$(CONFIG_ARCH_S3C64XX) += s3c6410-mini6410.dtb \
- s3c6410-smdk6410.dtb
- dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
-- r7s72100-genmai-reference.dtb \
- r8a7740-armadillo800eva.dtb \
- r8a7778-bockw.dtb \
- r8a7778-bockw-reference.dtb \
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index d19a06899e10..b50c753482c7 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -229,17 +229,6 @@ config MACH_GENMAI
- depends on ARCH_R7S72100
- select USE_OF
-
--config MACH_GENMAI_REFERENCE
-- bool "Genmai board - Reference Device Tree Implementation"
-- depends on ARCH_R7S72100
-- select USE_OF
-- ---help---
-- Use reference implementation of Genmai board support
-- which makes use of device tree at the expense
-- of not supporting a number of devices.
--
-- This is intended to aid developers
--
- config MACH_MARZEN
- bool "MARZEN board"
- depends on ARCH_R8A7779
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 9c5cd8c53a85..38d5fe825e93 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -66,7 +66,6 @@ obj-$(CONFIG_MACH_MACKEREL) += board-mackerel.o
- obj-$(CONFIG_MACH_BOCKW) += board-bockw.o
- obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
- obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
--obj-$(CONFIG_MACH_GENMAI_REFERENCE) += board-genmai-reference.o
- obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
- obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o
- obj-$(CONFIG_MACH_LAGER) += board-lager.o
-diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
-index 99455ecafa05..918fccffa1b6 100644
---- a/arch/arm/mach-shmobile/Makefile.boot
-+++ b/arch/arm/mach-shmobile/Makefile.boot
-@@ -7,7 +7,6 @@ loadaddr-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += 0x40008000
- loadaddr-$(CONFIG_MACH_BOCKW) += 0x60008000
- loadaddr-$(CONFIG_MACH_BOCKW_REFERENCE) += 0x60008000
- loadaddr-$(CONFIG_MACH_GENMAI) += 0x08008000
--loadaddr-$(CONFIG_MACH_GENMAI_REFERENCE) += 0x08008000
- loadaddr-$(CONFIG_MACH_KOELSCH) += 0x40008000
- loadaddr-$(CONFIG_MACH_KZM9G) += 0x41008000
- loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
---
-2.1.2
-
diff --git a/patches.renesas/0669-ARM-shmobile-genmai-reference-Remove-legacy-clock-su.patch b/patches.renesas/0669-ARM-shmobile-genmai-reference-Remove-legacy-clock-su.patch
deleted file mode 100644
index e97811d893696..0000000000000
--- a/patches.renesas/0669-ARM-shmobile-genmai-reference-Remove-legacy-clock-su.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From fa8306a4b7bbbba32d5a3b4dad36905e6a2924d9 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 16 May 2014 14:10:13 +0200
-Subject: ARM: shmobile: genmai-reference: Remove legacy clock support
-
-genmai-reference is now only built for multiplatform which means that
-CCF comes with the package. Remove unused legacy code ifdefs to clean up
-the code.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 88351216f595786a24ff6cb7df7b101811981c78)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai-reference.c | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index 33015e5ed52a..968bbba20d08 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -26,7 +26,6 @@
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-
--#ifdef CONFIG_COMMON_CLK
- /*
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
-@@ -34,15 +33,10 @@
- static const struct clk_name clk_names[] = {
- { "mtu2", "fck", "sh-mtu2" },
- };
--#endif
-
- static void __init genmai_add_standard_devices(void)
- {
--#ifdef CONFIG_COMMON_CLK
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), true);
--#else
-- r7s72100_clock_init();
--#endif
- r7s72100_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0670-ARM-shmobile-Sync-Genmai-DTS-with-Genmai-reference-D.patch b/patches.renesas/0670-ARM-shmobile-Sync-Genmai-DTS-with-Genmai-reference-D.patch
deleted file mode 100644
index a96e85398ff6e..0000000000000
--- a/patches.renesas/0670-ARM-shmobile-Sync-Genmai-DTS-with-Genmai-reference-D.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 4ad6b9e6a9c3a0e56e4f50a386e8d8259ac5b767 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 16 May 2014 14:10:14 +0200
-Subject: ARM: shmobile: Sync Genmai DTS with Genmai reference DTS
-
-Copy the device nodes from Genmai reference into the Genmai device tree
-file. This will allow us to use a single DTS file regardless of kernel
-configuration. In case of legacy C board code the device nodes may or
-may not be used, but in the multiplatform case all the DT device nodes
-will be used.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2606f47be55fd4545ed9236467682c636fd23f9d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai.dts | 30 +++++++++++++++++++++++++++++-
- 1 file changed, 29 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
-index b1deaf7e2e06..56849b55e1c2 100644
---- a/arch/arm/boot/dts/r7s72100-genmai.dts
-+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
-@@ -1,7 +1,8 @@
- /*
- * Device Tree Source for the Genmai board
- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-+ * Copyright (C) 2013-14 Renesas Solutions Corp.
-+ * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
- *
- * This file is licensed under the terms of the GNU General Public License
- * version 2. This program is licensed "as is" without any warranty of any
-@@ -15,6 +16,10 @@
- model = "Genmai";
- compatible = "renesas,genmai", "renesas,r7s72100";
-
-+ aliases {
-+ serial2 = &scif2;
-+ };
-+
- chosen {
- bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
- };
-@@ -29,3 +34,26 @@
- #size-cells = <1>;
- };
- };
-+
-+&extal_clk {
-+ clock-frequency = <13330000>;
-+};
-+
-+&usb_x1_clk {
-+ clock-frequency = <48000000>;
-+};
-+
-+&i2c2 {
-+ status = "okay";
-+ clock-frequency = <400000>;
-+
-+ eeprom@50 {
-+ compatible = "renesas,24c128";
-+ reg = <0x50>;
-+ pagesize = <64>;
-+ };
-+};
-+
-+&scif2 {
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0671-ARM-shmobile-Let-Genmai-multiplatform-boot-with-Genm.patch b/patches.renesas/0671-ARM-shmobile-Let-Genmai-multiplatform-boot-with-Genm.patch
deleted file mode 100644
index f0b4c7f48ce81..0000000000000
--- a/patches.renesas/0671-ARM-shmobile-Let-Genmai-multiplatform-boot-with-Genm.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From f85e4ee632f3c97fdc2b6f02071de5b3ff52613a Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 16 May 2014 14:10:15 +0200
-Subject: ARM: shmobile: Let Genmai multiplatform boot with Genmai DTB
-
-Let the multiplatform Genmai support boot with the unified DTS.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 23f679fa6de3b3f7e1d9e1d8eaeafa5167a55a17)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/boot/dts/Makefile
----
- arch/arm/boot/dts/Makefile | 2 +-
- arch/arm/mach-shmobile/board-genmai-reference.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index f4d6c845a4cd..6ec1b220c4c4 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -259,7 +259,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
- r8a73a4-ape6evm-reference.dtb \
- sh7372-mackerel.dtb
- dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
-- r7s72100-genmai-reference.dtb \
-+ r7s72100-genmai.dtb \
- r8a7791-henninger.dtb \
- r8a7791-koelsch.dtb \
- r8a7790-lager.dtb
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index 968bbba20d08..2ff6ad6e608e 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -42,7 +42,7 @@ static void __init genmai_add_standard_devices(void)
- }
-
- static const char * const genmai_boards_compat_dt[] __initconst = {
-- "renesas,genmai-reference",
-+ "renesas,genmai",
- NULL,
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0672-ARM-shmobile-Remove-Genmai-reference-DTS.patch b/patches.renesas/0672-ARM-shmobile-Remove-Genmai-reference-DTS.patch
deleted file mode 100644
index a218b950e487d..0000000000000
--- a/patches.renesas/0672-ARM-shmobile-Remove-Genmai-reference-DTS.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 5d332faf26d42b236b658c10731b8d861304ba68 Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Fri, 16 May 2014 14:10:16 +0200
-Subject: ARM: shmobile: Remove Genmai reference DTS
-
-Now that the DTS file r7s72100-genmai.dts can be used with
-board-genmai.c and board-genmai-reference.c, proceed with removing
-r7s72100-genmai-reference.dts.
-
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a5176e0d9de31a54e08468f21c15dc08e006857f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai-reference.dts | 59 -------------------------
- 1 file changed, 59 deletions(-)
- delete mode 100644 arch/arm/boot/dts/r7s72100-genmai-reference.dts
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai-reference.dts b/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-deleted file mode 100644
-index ca88458e0706..000000000000
---- a/arch/arm/boot/dts/r7s72100-genmai-reference.dts
-+++ /dev/null
-@@ -1,59 +0,0 @@
--/*
-- * Device Tree Source for the Genmai board
-- *
-- * Copyright (C) 2013-14 Renesas Solutions Corp.
-- * Copyright (C) 2014 Wolfram Sang, Sang Engineering <wsa@sang-engineering.com>
-- *
-- * This file is licensed under the terms of the GNU General Public License
-- * version 2. This program is licensed "as is" without any warranty of any
-- * kind, whether express or implied.
-- */
--
--/dts-v1/;
--#include "r7s72100.dtsi"
--
--/ {
-- model = "Genmai";
-- compatible = "renesas,genmai-reference", "renesas,r7s72100";
--
-- aliases {
-- serial2 = &scif2;
-- };
--
-- chosen {
-- bootargs = "console=ttySC2,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
-- };
--
-- memory {
-- device_type = "memory";
-- reg = <0x08000000 0x08000000>;
-- };
--
-- lbsc {
-- #address-cells = <1>;
-- #size-cells = <1>;
-- };
--};
--
--&extal_clk {
-- clock-frequency = <13330000>;
--};
--
--&usb_x1_clk {
-- clock-frequency = <48000000>;
--};
--
--&i2c2 {
-- status = "okay";
-- clock-frequency = <400000>;
--
-- eeprom@50 {
-- compatible = "renesas,24c128";
-- reg = <0x50>;
-- pagesize = <64>;
-- };
--};
--
--&scif2 {
-- status = "okay";
--};
---
-2.1.2
-
diff --git a/patches.renesas/0673-USB-delete-CONFIG_USB_DEVICEFS-from-defconfig.patch b/patches.renesas/0673-USB-delete-CONFIG_USB_DEVICEFS-from-defconfig.patch
deleted file mode 100644
index 3070c318edbe4..0000000000000
--- a/patches.renesas/0673-USB-delete-CONFIG_USB_DEVICEFS-from-defconfig.patch
+++ /dev/null
@@ -1,1110 +0,0 @@
-From 1fddf4d6e39878fab14f3181aa1969145d705390 Mon Sep 17 00:00:00 2001
-From: Naoki MATSUMOTO <nekomatu@gmail.com>
-Date: Thu, 15 May 2014 20:17:44 +0900
-Subject: USB: delete CONFIG_USB_DEVICEFS from defconfig
-
-It no longer occurs in Kconfig.
-USB: remove CONFIG_USB_DEVICEFS(fb28d58b) leaked remove defconfig.
-
-Signed-off-by: Naoki MATSUMOTO <nekomatu+linux@gmail.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 3a0d89d3f80df15fee3802e030d51f1848269a01)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/badge4_defconfig | 1 -
- arch/arm/configs/cm_x2xx_defconfig | 1 -
- arch/arm/configs/cm_x300_defconfig | 1 -
- arch/arm/configs/colibri_pxa270_defconfig | 1 -
- arch/arm/configs/colibri_pxa300_defconfig | 1 -
- arch/arm/configs/corgi_defconfig | 1 -
- arch/arm/configs/davinci_all_defconfig | 1 -
- arch/arm/configs/em_x270_defconfig | 1 -
- arch/arm/configs/footbridge_defconfig | 1 -
- arch/arm/configs/ixp4xx_defconfig | 1 -
- arch/arm/configs/kzm9g_defconfig | 1 -
- arch/arm/configs/mini2440_defconfig | 1 -
- arch/arm/configs/mv78xx0_defconfig | 1 -
- arch/arm/configs/neponset_defconfig | 1 -
- arch/arm/configs/omap1_defconfig | 1 -
- arch/arm/configs/pcm027_defconfig | 1 -
- arch/arm/configs/s3c2410_defconfig | 1 -
- arch/arm/configs/s3c6400_defconfig | 1 -
- arch/arm/configs/spitz_defconfig | 1 -
- arch/arm/configs/trizeps4_defconfig | 1 -
- arch/arm/configs/viper_defconfig | 1 -
- arch/arm/configs/zeus_defconfig | 1 -
- arch/avr32/configs/hammerhead_defconfig | 1 -
- arch/blackfin/configs/BF526-EZBRD_defconfig | 1 -
- arch/blackfin/configs/BF527-EZKIT-V2_defconfig | 1 -
- arch/blackfin/configs/BF527-EZKIT_defconfig | 1 -
- arch/blackfin/configs/BF548-EZKIT_defconfig | 1 -
- arch/blackfin/configs/CM-BF527_defconfig | 1 -
- arch/blackfin/configs/CM-BF548_defconfig | 1 -
- arch/blackfin/configs/IP0X_defconfig | 1 -
- arch/ia64/configs/bigsur_defconfig | 1 -
- arch/ia64/configs/generic_defconfig | 1 -
- arch/ia64/configs/gensparse_defconfig | 1 -
- arch/ia64/configs/tiger_defconfig | 1 -
- arch/mips/configs/fuloong2e_defconfig | 1 -
- arch/mips/configs/lemote2f_defconfig | 1 -
- arch/mips/configs/mpc30x_defconfig | 1 -
- arch/mips/configs/msp71xx_defconfig | 1 -
- arch/mips/configs/mtx1_defconfig | 1 -
- arch/mips/configs/rm200_defconfig | 1 -
- arch/mips/configs/sb1250_swarm_defconfig | 1 -
- arch/mips/configs/tb0219_defconfig | 1 -
- arch/mips/configs/tb0226_defconfig | 1 -
- arch/parisc/configs/c3000_defconfig | 1 -
- arch/parisc/configs/default_defconfig | 1 -
- arch/powerpc/configs/40x/ep405_defconfig | 1 -
- arch/powerpc/configs/44x/canyonlands_defconfig | 1 -
- arch/powerpc/configs/44x/sam440ep_defconfig | 1 -
- arch/powerpc/configs/52xx/cm5200_defconfig | 1 -
- arch/powerpc/configs/52xx/pcm030_defconfig | 1 -
- arch/powerpc/configs/52xx/tqm5200_defconfig | 1 -
- arch/powerpc/configs/83xx/mpc8313_rdb_defconfig | 1 -
- arch/powerpc/configs/83xx/mpc8315_rdb_defconfig | 1 -
- arch/powerpc/configs/83xx/mpc832x_rdb_defconfig | 1 -
- arch/powerpc/configs/83xx/mpc834x_itx_defconfig | 1 -
- arch/powerpc/configs/83xx/sbc834x_defconfig | 1 -
- arch/powerpc/configs/85xx/ge_imp3a_defconfig | 1 -
- arch/powerpc/configs/85xx/socrates_defconfig | 1 -
- arch/powerpc/configs/85xx/xes_mpc85xx_defconfig | 1 -
- arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig | 1 -
- arch/powerpc/configs/amigaone_defconfig | 1 -
- arch/powerpc/configs/c2k_defconfig | 1 -
- arch/powerpc/configs/cell_defconfig | 1 -
- arch/powerpc/configs/celleb_defconfig | 1 -
- arch/powerpc/configs/chrp32_defconfig | 1 -
- arch/powerpc/configs/g5_defconfig | 1 -
- arch/powerpc/configs/linkstation_defconfig | 1 -
- arch/powerpc/configs/maple_defconfig | 1 -
- arch/powerpc/configs/mpc5200_defconfig | 1 -
- arch/powerpc/configs/mpc86xx_defconfig | 1 -
- arch/powerpc/configs/pmac32_defconfig | 1 -
- arch/powerpc/configs/ppc6xx_defconfig | 1 -
- arch/powerpc/configs/storcenter_defconfig | 1 -
- arch/sh/configs/ecovec24_defconfig | 1 -
- arch/sh/configs/landisk_defconfig | 1 -
- arch/sh/configs/rsk7203_defconfig | 1 -
- arch/sh/configs/sdk7780_defconfig | 1 -
- arch/sh/configs/se7343_defconfig | 1 -
- arch/sh/configs/se7780_defconfig | 1 -
- arch/sh/configs/sh2007_defconfig | 1 -
- arch/sh/configs/sh7785lcr_defconfig | 1 -
- arch/sh/configs/titan_defconfig | 1 -
- arch/sh/configs/urquell_defconfig | 1 -
- arch/unicore32/configs/unicore32_defconfig | 1 -
- 84 files changed, 84 deletions(-)
-
-diff --git a/arch/arm/configs/badge4_defconfig b/arch/arm/configs/badge4_defconfig
-index 5b54abbeb0b3..60b0b9368b1b 100644
---- a/arch/arm/configs/badge4_defconfig
-+++ b/arch/arm/configs/badge4_defconfig
-@@ -74,7 +74,6 @@ CONFIG_SOUND=y
- CONFIG_SOUND_PRIME=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_ACM=m
- CONFIG_USB_PRINTER=m
-diff --git a/arch/arm/configs/cm_x2xx_defconfig b/arch/arm/configs/cm_x2xx_defconfig
-index a93ff8da5bab..dc01c049a520 100644
---- a/arch/arm/configs/cm_x2xx_defconfig
-+++ b/arch/arm/configs/cm_x2xx_defconfig
-@@ -144,7 +144,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/arm/configs/cm_x300_defconfig b/arch/arm/configs/cm_x300_defconfig
-index f4b767256f95..7df040e91c1c 100644
---- a/arch/arm/configs/cm_x300_defconfig
-+++ b/arch/arm/configs/cm_x300_defconfig
-@@ -129,7 +129,6 @@ CONFIG_HID_TOPSEED=y
- CONFIG_HID_THRUSTMASTER=y
- CONFIG_HID_ZEROPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/arm/configs/colibri_pxa270_defconfig b/arch/arm/configs/colibri_pxa270_defconfig
-index 2ef2c5e8aaec..18c311ae1113 100644
---- a/arch/arm/configs/colibri_pxa270_defconfig
-+++ b/arch/arm/configs/colibri_pxa270_defconfig
-@@ -124,7 +124,6 @@ CONFIG_FONT_8x16=y
- CONFIG_LOGO=y
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_SERIAL=m
- CONFIG_USB_GADGET=m
-diff --git a/arch/arm/configs/colibri_pxa300_defconfig b/arch/arm/configs/colibri_pxa300_defconfig
-index b985334e42dd..2641dd6ed2f5 100644
---- a/arch/arm/configs/colibri_pxa300_defconfig
-+++ b/arch/arm/configs/colibri_pxa300_defconfig
-@@ -49,7 +49,6 @@ CONFIG_LOGO=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_STORAGE=y
- CONFIG_MMC=y
-diff --git a/arch/arm/configs/corgi_defconfig b/arch/arm/configs/corgi_defconfig
-index 1fd1d1de3220..c1470a00f55a 100644
---- a/arch/arm/configs/corgi_defconfig
-+++ b/arch/arm/configs/corgi_defconfig
-@@ -172,7 +172,6 @@ CONFIG_HID_SAMSUNG=m
- CONFIG_HID_SONY=m
- CONFIG_HID_SUNPLUS=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_SL811_HCD=m
- CONFIG_USB_SL811_CS=m
-diff --git a/arch/arm/configs/davinci_all_defconfig b/arch/arm/configs/davinci_all_defconfig
-index ab2f7378352c..24fb7a60518e 100644
---- a/arch/arm/configs/davinci_all_defconfig
-+++ b/arch/arm/configs/davinci_all_defconfig
-@@ -134,7 +134,6 @@ CONFIG_HID_SAMSUNG=m
- CONFIG_HID_SONY=m
- CONFIG_HID_SUNPLUS=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_MUSB_HDRC=m
- CONFIG_USB_MUSB_PERIPHERAL=y
-diff --git a/arch/arm/configs/em_x270_defconfig b/arch/arm/configs/em_x270_defconfig
-index 60a21e01eb70..4560c9ca6636 100644
---- a/arch/arm/configs/em_x270_defconfig
-+++ b/arch/arm/configs/em_x270_defconfig
-@@ -144,7 +144,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/arm/configs/footbridge_defconfig b/arch/arm/configs/footbridge_defconfig
-index 038518ab39a8..17bb3f7b5802 100644
---- a/arch/arm/configs/footbridge_defconfig
-+++ b/arch/arm/configs/footbridge_defconfig
-@@ -101,7 +101,6 @@ CONFIG_SOUND=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=m
- CONFIG_USB_DEBUG=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_PRINTER=m
- CONFIG_EXT2_FS=y
-diff --git a/arch/arm/configs/ixp4xx_defconfig b/arch/arm/configs/ixp4xx_defconfig
-index 063e2ab2c8f1..1af665e847d1 100644
---- a/arch/arm/configs/ixp4xx_defconfig
-+++ b/arch/arm/configs/ixp4xx_defconfig
-@@ -169,7 +169,6 @@ CONFIG_SENSORS_W83781D=y
- CONFIG_WATCHDOG=y
- CONFIG_IXP4XX_WATCHDOG=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/arm/configs/kzm9g_defconfig b/arch/arm/configs/kzm9g_defconfig
-index 12bd1f63c399..bd097d455f87 100644
---- a/arch/arm/configs/kzm9g_defconfig
-+++ b/arch/arm/configs/kzm9g_defconfig
-@@ -106,7 +106,6 @@ CONFIG_SND_SOC=y
- CONFIG_SND_SOC_SH4_FSI=y
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_R8A66597_HCD=y
- CONFIG_USB_RENESAS_USBHS=y
- CONFIG_USB_STORAGE=y
-diff --git a/arch/arm/configs/mini2440_defconfig b/arch/arm/configs/mini2440_defconfig
-index a07948a87caa..9c93f5655248 100644
---- a/arch/arm/configs/mini2440_defconfig
-+++ b/arch/arm/configs/mini2440_defconfig
-@@ -217,7 +217,6 @@ CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_HID_TOPSEED=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_ACM=m
-diff --git a/arch/arm/configs/mv78xx0_defconfig b/arch/arm/configs/mv78xx0_defconfig
-index 1f08219c1b3c..0dae1c1f007a 100644
---- a/arch/arm/configs/mv78xx0_defconfig
-+++ b/arch/arm/configs/mv78xx0_defconfig
-@@ -80,7 +80,6 @@ CONFIG_I2C=y
- CONFIG_I2C_CHARDEV=y
- CONFIG_I2C_MV64XXX=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_ROOT_HUB_TT=y
- CONFIG_USB_EHCI_TT_NEWSCHED=y
-diff --git a/arch/arm/configs/neponset_defconfig b/arch/arm/configs/neponset_defconfig
-index d7dc9922cfff..63aa319b44bb 100644
---- a/arch/arm/configs/neponset_defconfig
-+++ b/arch/arm/configs/neponset_defconfig
-@@ -69,7 +69,6 @@ CONFIG_SOUND_PRIME=y
- # CONFIG_USB_HID is not set
- CONFIG_USB=m
- CONFIG_USB_DEBUG=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_OHCI_HCD=m
- CONFIG_USB_STORAGE=m
-diff --git a/arch/arm/configs/omap1_defconfig b/arch/arm/configs/omap1_defconfig
-index d74edbad18fc..0f258d555fbc 100644
---- a/arch/arm/configs/omap1_defconfig
-+++ b/arch/arm/configs/omap1_defconfig
-@@ -198,7 +198,6 @@ CONFIG_SND_OMAP_SOC=y
- CONFIG_USB=y
- CONFIG_USB_PHY=y
- CONFIG_USB_DEBUG=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/arm/configs/pcm027_defconfig b/arch/arm/configs/pcm027_defconfig
-index 2f136c30a989..0a847d04ddc1 100644
---- a/arch/arm/configs/pcm027_defconfig
-+++ b/arch/arm/configs/pcm027_defconfig
-@@ -76,7 +76,6 @@ CONFIG_SND_PCM_OSS=y
- CONFIG_SND_PXA2XX_AC97=y
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_STORAGE=y
- CONFIG_MMC=y
-diff --git a/arch/arm/configs/s3c2410_defconfig b/arch/arm/configs/s3c2410_defconfig
-index 193448f31284..eb4d204bff47 100644
---- a/arch/arm/configs/s3c2410_defconfig
-+++ b/arch/arm/configs/s3c2410_defconfig
-@@ -324,7 +324,6 @@ CONFIG_SND_USB_CAIAQ=m
- CONFIG_SND_SOC=y
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_ACM=m
-diff --git a/arch/arm/configs/s3c6400_defconfig b/arch/arm/configs/s3c6400_defconfig
-index 3a186d653dac..e2f9fa5bb54b 100644
---- a/arch/arm/configs/s3c6400_defconfig
-+++ b/arch/arm/configs/s3c6400_defconfig
-@@ -56,7 +56,6 @@ CONFIG_SND_S3C24XX_SOC=m
- CONFIG_SND_SOC_SMDK_WM9713=m
- CONFIG_USB=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_ACM=m
- CONFIG_USB_PRINTER=m
-diff --git a/arch/arm/configs/spitz_defconfig b/arch/arm/configs/spitz_defconfig
-index 2e0419d1b964..a1ede1966baf 100644
---- a/arch/arm/configs/spitz_defconfig
-+++ b/arch/arm/configs/spitz_defconfig
-@@ -166,7 +166,6 @@ CONFIG_HID_SAMSUNG=m
- CONFIG_HID_SONY=m
- CONFIG_HID_SUNPLUS=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_OHCI_HCD=m
- CONFIG_USB_SL811_HCD=m
-diff --git a/arch/arm/configs/trizeps4_defconfig b/arch/arm/configs/trizeps4_defconfig
-index 3162173fa75a..932ee4e4a13a 100644
---- a/arch/arm/configs/trizeps4_defconfig
-+++ b/arch/arm/configs/trizeps4_defconfig
-@@ -165,7 +165,6 @@ CONFIG_SND_PXA2XX_AC97=y
- CONFIG_SND_USB_AUDIO=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_STORAGE=m
-diff --git a/arch/arm/configs/viper_defconfig b/arch/arm/configs/viper_defconfig
-index d36e0d3c86ec..0d717a5eff29 100644
---- a/arch/arm/configs/viper_defconfig
-+++ b/arch/arm/configs/viper_defconfig
-@@ -127,7 +127,6 @@ CONFIG_SND_MIXER_OSS=m
- CONFIG_SND_PCM_OSS=m
- CONFIG_SND_PXA2XX_AC97=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_ISP116X_HCD=m
- CONFIG_USB_SL811_HCD=m
- CONFIG_USB_R8A66597_HCD=m
-diff --git a/arch/arm/configs/zeus_defconfig b/arch/arm/configs/zeus_defconfig
-index 731d4f985310..cd11da8b5123 100644
---- a/arch/arm/configs/zeus_defconfig
-+++ b/arch/arm/configs/zeus_defconfig
-@@ -132,7 +132,6 @@ CONFIG_SND_SOC=m
- CONFIG_SND_PXA2XX_SOC=m
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_OHCI_HCD=m
- CONFIG_USB_ACM=m
- CONFIG_USB_STORAGE=m
-diff --git a/arch/avr32/configs/hammerhead_defconfig b/arch/avr32/configs/hammerhead_defconfig
-index 18db853386c8..4912f0aadaa1 100644
---- a/arch/avr32/configs/hammerhead_defconfig
-+++ b/arch/avr32/configs/hammerhead_defconfig
-@@ -117,7 +117,6 @@ CONFIG_HID_SAMSUNG=m
- CONFIG_HID_SONY=m
- CONFIG_HID_SUNPLUS=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=m
- CONFIG_USB_ISP116X_HCD=m
-diff --git a/arch/blackfin/configs/BF526-EZBRD_defconfig b/arch/blackfin/configs/BF526-EZBRD_defconfig
-index 2f2c6acf210c..1759fad54017 100644
---- a/arch/blackfin/configs/BF526-EZBRD_defconfig
-+++ b/arch/blackfin/configs/BF526-EZBRD_defconfig
-@@ -123,7 +123,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OTG_BLACKLIST_HUB=y
- CONFIG_USB_MON=y
-diff --git a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
-index 91535c38e7f2..357729682c00 100644
---- a/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
-+++ b/arch/blackfin/configs/BF527-EZKIT-V2_defconfig
-@@ -147,7 +147,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OTG_BLACKLIST_HUB=y
- CONFIG_USB_MON=y
-diff --git a/arch/blackfin/configs/BF527-EZKIT_defconfig b/arch/blackfin/configs/BF527-EZKIT_defconfig
-index af2738c7441b..2e73a5d33da8 100644
---- a/arch/blackfin/configs/BF527-EZKIT_defconfig
-+++ b/arch/blackfin/configs/BF527-EZKIT_defconfig
-@@ -141,7 +141,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OTG_BLACKLIST_HUB=y
- CONFIG_USB_MON=y
-diff --git a/arch/blackfin/configs/BF548-EZKIT_defconfig b/arch/blackfin/configs/BF548-EZKIT_defconfig
-index e716fdfd2cf2..f0a2ddf5de46 100644
---- a/arch/blackfin/configs/BF548-EZKIT_defconfig
-+++ b/arch/blackfin/configs/BF548-EZKIT_defconfig
-@@ -159,7 +159,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OTG_BLACKLIST_HUB=y
- CONFIG_USB_MON=y
-diff --git a/arch/blackfin/configs/CM-BF527_defconfig b/arch/blackfin/configs/CM-BF527_defconfig
-index f59c80ee78e3..05108b85ab12 100644
---- a/arch/blackfin/configs/CM-BF527_defconfig
-+++ b/arch/blackfin/configs/CM-BF527_defconfig
-@@ -95,7 +95,6 @@ CONFIG_WATCHDOG=y
- CONFIG_BFIN_WDT=y
- CONFIG_USB=m
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OTG_BLACKLIST_HUB=y
- CONFIG_USB_MON=m
-diff --git a/arch/blackfin/configs/CM-BF548_defconfig b/arch/blackfin/configs/CM-BF548_defconfig
-index b9af4fa69984..9ff79df6825c 100644
---- a/arch/blackfin/configs/CM-BF548_defconfig
-+++ b/arch/blackfin/configs/CM-BF548_defconfig
-@@ -94,7 +94,6 @@ CONFIG_WATCHDOG=y
- CONFIG_BFIN_WDT=y
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=m
- CONFIG_USB_MUSB_HDRC=m
-diff --git a/arch/blackfin/configs/IP0X_defconfig b/arch/blackfin/configs/IP0X_defconfig
-index 629516578760..5adf0da58499 100644
---- a/arch/blackfin/configs/IP0X_defconfig
-+++ b/arch/blackfin/configs/IP0X_defconfig
-@@ -73,7 +73,6 @@ CONFIG_SPI_BFIN5XX=y
- # CONFIG_HWMON is not set
- CONFIG_WATCHDOG=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_OTG_WHITELIST=y
- CONFIG_USB_MON=y
- CONFIG_USB_ISP1362_HCD=y
-diff --git a/arch/ia64/configs/bigsur_defconfig b/arch/ia64/configs/bigsur_defconfig
-index cf5993f05d4f..4c4ac163c600 100644
---- a/arch/ia64/configs/bigsur_defconfig
-+++ b/arch/ia64/configs/bigsur_defconfig
-@@ -75,7 +75,6 @@ CONFIG_SND_PCM_OSS=m
- CONFIG_SND_CS4281=m
- CONFIG_USB_HIDDEV=y
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_UHCI_HCD=m
- CONFIG_USB_ACM=m
-diff --git a/arch/ia64/configs/generic_defconfig b/arch/ia64/configs/generic_defconfig
-index efbd2929aeb7..8f4d051d190c 100644
---- a/arch/ia64/configs/generic_defconfig
-+++ b/arch/ia64/configs/generic_defconfig
-@@ -144,7 +144,6 @@ CONFIG_HID_SAMSUNG=m
- CONFIG_HID_SONY=m
- CONFIG_HID_SUNPLUS=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
- CONFIG_USB_OHCI_HCD=m
-diff --git a/arch/ia64/configs/gensparse_defconfig b/arch/ia64/configs/gensparse_defconfig
-index f64980dd20c3..d663efd1e4db 100644
---- a/arch/ia64/configs/gensparse_defconfig
-+++ b/arch/ia64/configs/gensparse_defconfig
-@@ -126,7 +126,6 @@ CONFIG_SND_CS46XX=m
- CONFIG_SND_EMU10K1=m
- CONFIG_SND_FM801=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
- CONFIG_USB_OHCI_HCD=m
-diff --git a/arch/ia64/configs/tiger_defconfig b/arch/ia64/configs/tiger_defconfig
-index 0f4e9e41f130..2f4bc3e80efc 100644
---- a/arch/ia64/configs/tiger_defconfig
-+++ b/arch/ia64/configs/tiger_defconfig
-@@ -103,7 +103,6 @@ CONFIG_DRM_RADEON=m
- CONFIG_DRM_MGA=m
- CONFIG_DRM_SIS=m
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_EHCI_HCD=m
- CONFIG_USB_OHCI_HCD=m
- CONFIG_USB_UHCI_HCD=y
-diff --git a/arch/mips/configs/fuloong2e_defconfig b/arch/mips/configs/fuloong2e_defconfig
-index e5b73de08fc5..002680648dcb 100644
---- a/arch/mips/configs/fuloong2e_defconfig
-+++ b/arch/mips/configs/fuloong2e_defconfig
-@@ -188,7 +188,6 @@ CONFIG_USB_KBD=y
- CONFIG_USB_MOUSE=y
- CONFIG_USB=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OTG_WHITELIST=y
- CONFIG_USB_WUSB_CBAF=m
-diff --git a/arch/mips/configs/lemote2f_defconfig b/arch/mips/configs/lemote2f_defconfig
-index 343bebc4b63b..227a9de32246 100644
---- a/arch/mips/configs/lemote2f_defconfig
-+++ b/arch/mips/configs/lemote2f_defconfig
-@@ -297,7 +297,6 @@ CONFIG_HID_WACOM=m
- CONFIG_HID_ZEROPLUS=m
- CONFIG_ZEROPLUS_FF=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_DYNAMIC_MINORS=y
- CONFIG_USB_OTG_WHITELIST=y
-diff --git a/arch/mips/configs/mpc30x_defconfig b/arch/mips/configs/mpc30x_defconfig
-index c16de9812920..7a346605c498 100644
---- a/arch/mips/configs/mpc30x_defconfig
-+++ b/arch/mips/configs/mpc30x_defconfig
-@@ -47,7 +47,6 @@ CONFIG_GPIO_VR41XX=y
- # CONFIG_VGA_CONSOLE is not set
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_OHCI_HCD=m
- CONFIG_RTC_CLASS=y
- CONFIG_RTC_DRV_VR41XX=y
-diff --git a/arch/mips/configs/msp71xx_defconfig b/arch/mips/configs/msp71xx_defconfig
-index d1142e9cd9a1..201edfb2637d 100644
---- a/arch/mips/configs/msp71xx_defconfig
-+++ b/arch/mips/configs/msp71xx_defconfig
-@@ -67,7 +67,6 @@ CONFIG_I2C_CHARDEV=y
- CONFIG_I2C_PMCMSP=y
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_ROOT_HUB_TT=y
-diff --git a/arch/mips/configs/mtx1_defconfig b/arch/mips/configs/mtx1_defconfig
-index 593946afc483..d269a5326a30 100644
---- a/arch/mips/configs/mtx1_defconfig
-+++ b/arch/mips/configs/mtx1_defconfig
-@@ -575,7 +575,6 @@ CONFIG_USB_HIDDEV=y
- CONFIG_USB_KBD=m
- CONFIG_USB_MOUSE=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
- CONFIG_USB_EHCI_ROOT_HUB_TT=y
-diff --git a/arch/mips/configs/rm200_defconfig b/arch/mips/configs/rm200_defconfig
-index 59d9d2fdcd48..73e7bf49461c 100644
---- a/arch/mips/configs/rm200_defconfig
-+++ b/arch/mips/configs/rm200_defconfig
-@@ -301,7 +301,6 @@ CONFIG_USB_HIDDEV=y
- CONFIG_USB_KBD=m
- CONFIG_USB_MOUSE=m
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
- # CONFIG_USB_EHCI_TT_NEWSCHED is not set
-diff --git a/arch/mips/configs/sb1250_swarm_defconfig b/arch/mips/configs/sb1250_swarm_defconfig
-index 5b0463ef9389..51bab13ef6f8 100644
---- a/arch/mips/configs/sb1250_swarm_defconfig
-+++ b/arch/mips/configs/sb1250_swarm_defconfig
-@@ -72,7 +72,6 @@ CONFIG_SERIO_RAW=m
- # CONFIG_HW_RANDOM is not set
- # CONFIG_HWMON is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_EXT2_FS=y
-diff --git a/arch/mips/configs/tb0219_defconfig b/arch/mips/configs/tb0219_defconfig
-index 30036b4cbeb1..11f51505d562 100644
---- a/arch/mips/configs/tb0219_defconfig
-+++ b/arch/mips/configs/tb0219_defconfig
-@@ -72,7 +72,6 @@ CONFIG_GPIO_TB0219=y
- # CONFIG_VGA_CONSOLE is not set
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
- # CONFIG_USB_EHCI_TT_NEWSCHED is not set
-diff --git a/arch/mips/configs/tb0226_defconfig b/arch/mips/configs/tb0226_defconfig
-index 81bfa1d4d8e3..d99b1905a1ba 100644
---- a/arch/mips/configs/tb0226_defconfig
-+++ b/arch/mips/configs/tb0226_defconfig
-@@ -69,7 +69,6 @@ CONFIG_SERIAL_VR41XX_CONSOLE=y
- # CONFIG_VGA_CONSOLE is not set
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_EHCI_HCD=y
- # CONFIG_USB_EHCI_TT_NEWSCHED is not set
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/parisc/configs/c3000_defconfig b/arch/parisc/configs/c3000_defconfig
-index acacd348df89..b2c3905682d9 100644
---- a/arch/parisc/configs/c3000_defconfig
-+++ b/arch/parisc/configs/c3000_defconfig
-@@ -128,7 +128,6 @@ CONFIG_SND_AD1889=y
- CONFIG_USB_HIDDEV=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_PRINTER=m
- CONFIG_USB_STORAGE=m
-diff --git a/arch/parisc/configs/default_defconfig b/arch/parisc/configs/default_defconfig
-index ba61495e1fa4..4d8127e8428a 100644
---- a/arch/parisc/configs/default_defconfig
-+++ b/arch/parisc/configs/default_defconfig
-@@ -145,7 +145,6 @@ CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_HID_TOPSEED=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_UHCI_HCD=y
-diff --git a/arch/powerpc/configs/40x/ep405_defconfig b/arch/powerpc/configs/40x/ep405_defconfig
-index 17582a3420fb..09e078ab5ff6 100644
---- a/arch/powerpc/configs/40x/ep405_defconfig
-+++ b/arch/powerpc/configs/40x/ep405_defconfig
-@@ -58,7 +58,6 @@ CONFIG_SERIAL_OF_PLATFORM=y
- CONFIG_THERMAL=y
- CONFIG_VIDEO_OUTPUT_CONTROL=m
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
-diff --git a/arch/powerpc/configs/44x/canyonlands_defconfig b/arch/powerpc/configs/44x/canyonlands_defconfig
-index d5be93e6e92d..47aefd0d2a8f 100644
---- a/arch/powerpc/configs/44x/canyonlands_defconfig
-+++ b/arch/powerpc/configs/44x/canyonlands_defconfig
-@@ -72,7 +72,6 @@ CONFIG_I2C_IBM_IIC=y
- CONFIG_SENSORS_AD7414=y
- CONFIG_USB=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=m
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/44x/sam440ep_defconfig b/arch/powerpc/configs/44x/sam440ep_defconfig
-index ca088cd581af..9622eb2a3e37 100644
---- a/arch/powerpc/configs/44x/sam440ep_defconfig
-+++ b/arch/powerpc/configs/44x/sam440ep_defconfig
-@@ -83,7 +83,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_EHCI_HCD=m
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/52xx/cm5200_defconfig b/arch/powerpc/configs/52xx/cm5200_defconfig
-index 0b88c7b30bb9..7f979fb48972 100644
---- a/arch/powerpc/configs/52xx/cm5200_defconfig
-+++ b/arch/powerpc/configs/52xx/cm5200_defconfig
-@@ -65,7 +65,6 @@ CONFIG_I2C_MPC=y
- # CONFIG_HWMON is not set
- CONFIG_WATCHDOG=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_OHCI_HCD_PPC_OF_BE=y
-diff --git a/arch/powerpc/configs/52xx/pcm030_defconfig b/arch/powerpc/configs/52xx/pcm030_defconfig
-index 430aa182fa1c..279686dffbf8 100644
---- a/arch/powerpc/configs/52xx/pcm030_defconfig
-+++ b/arch/powerpc/configs/52xx/pcm030_defconfig
-@@ -77,7 +77,6 @@ CONFIG_I2C_CHARDEV=y
- CONFIG_I2C_MPC=y
- # CONFIG_HWMON is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_OHCI_HCD=m
- # CONFIG_USB_OHCI_HCD_PPC_SOC is not set
-diff --git a/arch/powerpc/configs/52xx/tqm5200_defconfig b/arch/powerpc/configs/52xx/tqm5200_defconfig
-index 7af4c5bb7c63..39a686eb31a0 100644
---- a/arch/powerpc/configs/52xx/tqm5200_defconfig
-+++ b/arch/powerpc/configs/52xx/tqm5200_defconfig
-@@ -76,7 +76,6 @@ CONFIG_FB_FOREIGN_ENDIAN=y
- CONFIG_FB_SM501=y
- CONFIG_FRAMEBUFFER_CONSOLE=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
-index e4ad2e27551a..e4a43fe93ae5 100644
---- a/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
-+++ b/arch/powerpc/configs/83xx/mpc8313_rdb_defconfig
-@@ -75,7 +75,6 @@ CONFIG_WATCHDOG=y
- CONFIG_VIDEO_OUTPUT_CONTROL=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_FSL=y
-diff --git a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
-index 34ff5686be08..4e5e4bc1cef0 100644
---- a/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
-+++ b/arch/powerpc/configs/83xx/mpc8315_rdb_defconfig
-@@ -72,7 +72,6 @@ CONFIG_WATCHDOG=y
- CONFIG_VIDEO_OUTPUT_CONTROL=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_FSL=y
-diff --git a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
-index b4da1a7e6449..5adc4cea42d3 100644
---- a/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
-+++ b/arch/powerpc/configs/83xx/mpc832x_rdb_defconfig
-@@ -61,7 +61,6 @@ CONFIG_WATCHDOG=y
- CONFIG_VIDEO_OUTPUT_CONTROL=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
-index 291f8221d5a6..82b6b6c88d6a 100644
---- a/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
-+++ b/arch/powerpc/configs/83xx/mpc834x_itx_defconfig
-@@ -71,7 +71,6 @@ CONFIG_SPI_BITBANG=y
- CONFIG_WATCHDOG=y
- CONFIG_VIDEO_OUTPUT_CONTROL=m
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_FSL=y
-diff --git a/arch/powerpc/configs/83xx/sbc834x_defconfig b/arch/powerpc/configs/83xx/sbc834x_defconfig
-index 6d6463fe06fc..f859fb128346 100644
---- a/arch/powerpc/configs/83xx/sbc834x_defconfig
-+++ b/arch/powerpc/configs/83xx/sbc834x_defconfig
-@@ -71,7 +71,6 @@ CONFIG_I2C_MPC=y
- CONFIG_WATCHDOG=y
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_FSL=y
-diff --git a/arch/powerpc/configs/85xx/ge_imp3a_defconfig b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
-index c9765b54dd1a..dc939de9b5b0 100644
---- a/arch/powerpc/configs/85xx/ge_imp3a_defconfig
-+++ b/arch/powerpc/configs/85xx/ge_imp3a_defconfig
-@@ -158,7 +158,6 @@ CONFIG_HID_TOPSEED=y
- CONFIG_HID_THRUSTMASTER=y
- CONFIG_HID_ZEROPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_EHCI_HCD=y
- # CONFIG_USB_EHCI_TT_NEWSCHED is not set
- CONFIG_USB_EHCI_FSL=y
-diff --git a/arch/powerpc/configs/85xx/socrates_defconfig b/arch/powerpc/configs/85xx/socrates_defconfig
-index 77506b5d5a41..0eb5954d481f 100644
---- a/arch/powerpc/configs/85xx/socrates_defconfig
-+++ b/arch/powerpc/configs/85xx/socrates_defconfig
-@@ -87,7 +87,6 @@ CONFIG_FONTS=y
- CONFIG_FONT_8x16=y
- CONFIG_USB=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
-index 1cd6fcb368e9..98bd50cac54b 100644
---- a/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
-+++ b/arch/powerpc/configs/85xx/xes_mpc85xx_defconfig
-@@ -126,7 +126,6 @@ CONFIG_SENSORS_LM90=y
- CONFIG_WATCHDOG=y
- CONFIG_VIDEO_OUTPUT_CONTROL=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_ISP1760_HCD=y
-diff --git a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
-index f51c7ebc181e..76f43df3dec7 100644
---- a/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
-+++ b/arch/powerpc/configs/86xx/mpc8641_hpcn_defconfig
-@@ -123,7 +123,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/amigaone_defconfig b/arch/powerpc/configs/amigaone_defconfig
-index b6d49da9c82c..8c66b13e59fc 100644
---- a/arch/powerpc/configs/amigaone_defconfig
-+++ b/arch/powerpc/configs/amigaone_defconfig
-@@ -108,7 +108,6 @@ CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_HID_TOPSEED=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_UHCI_HCD=y
-diff --git a/arch/powerpc/configs/c2k_defconfig b/arch/powerpc/configs/c2k_defconfig
-index 671a8f960afa..3d091b556dff 100644
---- a/arch/powerpc/configs/c2k_defconfig
-+++ b/arch/powerpc/configs/c2k_defconfig
-@@ -262,7 +262,6 @@ CONFIG_USBPCWATCHDOG=m
- # CONFIG_VGA_CONSOLE is not set
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
-diff --git a/arch/powerpc/configs/cell_defconfig b/arch/powerpc/configs/cell_defconfig
-index 22a403d78d34..4bee1a6d41d0 100644
---- a/arch/powerpc/configs/cell_defconfig
-+++ b/arch/powerpc/configs/cell_defconfig
-@@ -179,7 +179,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
- CONFIG_HID=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=m
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=m
- CONFIG_USB_EHCI_HCD=m
- # CONFIG_USB_EHCI_HCD_PPC_OF is not set
-diff --git a/arch/powerpc/configs/celleb_defconfig b/arch/powerpc/configs/celleb_defconfig
-index 895449ed971e..6d7b22f41b50 100644
---- a/arch/powerpc/configs/celleb_defconfig
-+++ b/arch/powerpc/configs/celleb_defconfig
-@@ -87,7 +87,6 @@ CONFIG_WATCHDOG=y
- # CONFIG_VGA_CONSOLE is not set
- CONFIG_USB_HIDDEV=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=m
-diff --git a/arch/powerpc/configs/chrp32_defconfig b/arch/powerpc/configs/chrp32_defconfig
-index b20554efddcc..db5b30857e1c 100644
---- a/arch/powerpc/configs/chrp32_defconfig
-+++ b/arch/powerpc/configs/chrp32_defconfig
-@@ -111,7 +111,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=m
- # CONFIG_USB_EHCI_HCD_PPC_OF is not set
-diff --git a/arch/powerpc/configs/g5_defconfig b/arch/powerpc/configs/g5_defconfig
-index 1ea22fc24ea8..3c72fa615bd9 100644
---- a/arch/powerpc/configs/g5_defconfig
-+++ b/arch/powerpc/configs/g5_defconfig
-@@ -175,7 +175,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- # CONFIG_USB_EHCI_HCD_PPC_OF is not set
-diff --git a/arch/powerpc/configs/linkstation_defconfig b/arch/powerpc/configs/linkstation_defconfig
-index 8a874b999867..67389b959649 100644
---- a/arch/powerpc/configs/linkstation_defconfig
-+++ b/arch/powerpc/configs/linkstation_defconfig
-@@ -112,7 +112,6 @@ CONFIG_VIDEO_OUTPUT_CONTROL=m
- CONFIG_HID=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/maple_defconfig b/arch/powerpc/configs/maple_defconfig
-index 2a5afac29861..95e545d9f25c 100644
---- a/arch/powerpc/configs/maple_defconfig
-+++ b/arch/powerpc/configs/maple_defconfig
-@@ -79,7 +79,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_ROOT_HUB_TT=y
-diff --git a/arch/powerpc/configs/mpc5200_defconfig b/arch/powerpc/configs/mpc5200_defconfig
-index 8b682d1cf4d6..530601e8ccfe 100644
---- a/arch/powerpc/configs/mpc5200_defconfig
-+++ b/arch/powerpc/configs/mpc5200_defconfig
-@@ -113,7 +113,6 @@ CONFIG_HID_TOPSEED=y
- CONFIG_HID_THRUSTMASTER=y
- CONFIG_HID_ZEROPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/mpc86xx_defconfig b/arch/powerpc/configs/mpc86xx_defconfig
-index a1cc8179e9fd..35595ea74ff4 100644
---- a/arch/powerpc/configs/mpc86xx_defconfig
-+++ b/arch/powerpc/configs/mpc86xx_defconfig
-@@ -126,7 +126,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
-diff --git a/arch/powerpc/configs/pmac32_defconfig b/arch/powerpc/configs/pmac32_defconfig
-index a73626b09051..553e66278010 100644
---- a/arch/powerpc/configs/pmac32_defconfig
-+++ b/arch/powerpc/configs/pmac32_defconfig
-@@ -279,7 +279,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_HID_TOPSEED=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_DYNAMIC_MINORS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=m
-diff --git a/arch/powerpc/configs/ppc6xx_defconfig b/arch/powerpc/configs/ppc6xx_defconfig
-index c2353bf059fd..809845841469 100644
---- a/arch/powerpc/configs/ppc6xx_defconfig
-+++ b/arch/powerpc/configs/ppc6xx_defconfig
-@@ -966,7 +966,6 @@ CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=m
-diff --git a/arch/powerpc/configs/storcenter_defconfig b/arch/powerpc/configs/storcenter_defconfig
-index ebb2a66c99d3..7687f4dbee76 100644
---- a/arch/powerpc/configs/storcenter_defconfig
-+++ b/arch/powerpc/configs/storcenter_defconfig
-@@ -73,7 +73,6 @@ CONFIG_I2C_CHARDEV=y
- CONFIG_I2C_MPC=y
- # CONFIG_HWMON is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_STORAGE=y
-diff --git a/arch/sh/configs/ecovec24_defconfig b/arch/sh/configs/ecovec24_defconfig
-index c6c2becdc8ab..0b364e3b0ff8 100644
---- a/arch/sh/configs/ecovec24_defconfig
-+++ b/arch/sh/configs/ecovec24_defconfig
-@@ -107,7 +107,6 @@ CONFIG_SND_SOC=y
- CONFIG_SND_SOC_SH4_FSI=y
- CONFIG_SND_FSI_DA7210=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_R8A66597_HCD=y
- CONFIG_USB_STORAGE=y
-diff --git a/arch/sh/configs/landisk_defconfig b/arch/sh/configs/landisk_defconfig
-index 3670e937f2b7..6783f31315c7 100644
---- a/arch/sh/configs/landisk_defconfig
-+++ b/arch/sh/configs/landisk_defconfig
-@@ -80,7 +80,6 @@ CONFIG_HID_SAMSUNG=m
- CONFIG_HID_SONY=m
- CONFIG_HID_SUNPLUS=m
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- # CONFIG_USB_EHCI_TT_NEWSCHED is not set
-diff --git a/arch/sh/configs/rsk7203_defconfig b/arch/sh/configs/rsk7203_defconfig
-index 4e5229b0c5bb..549412d4b21a 100644
---- a/arch/sh/configs/rsk7203_defconfig
-+++ b/arch/sh/configs/rsk7203_defconfig
-@@ -100,7 +100,6 @@ CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_R8A66597_HCD=y
- CONFIG_NEW_LEDS=y
-diff --git a/arch/sh/configs/sdk7780_defconfig b/arch/sh/configs/sdk7780_defconfig
-index ae1115849dda..fa37e897399b 100644
---- a/arch/sh/configs/sdk7780_defconfig
-+++ b/arch/sh/configs/sdk7780_defconfig
-@@ -101,7 +101,6 @@ CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
-diff --git a/arch/sh/configs/se7343_defconfig b/arch/sh/configs/se7343_defconfig
-index be9c474197b3..af3fe7352471 100644
---- a/arch/sh/configs/se7343_defconfig
-+++ b/arch/sh/configs/se7343_defconfig
-@@ -94,7 +94,6 @@ CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
- CONFIG_USB_DEBUG=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_ISP116X_HCD=y
- CONFIG_UIO=y
- CONFIG_EXT2_FS=y
-diff --git a/arch/sh/configs/se7780_defconfig b/arch/sh/configs/se7780_defconfig
-index c8c5e7f7a68d..b0ef63ce525a 100644
---- a/arch/sh/configs/se7780_defconfig
-+++ b/arch/sh/configs/se7780_defconfig
-@@ -94,7 +94,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
-diff --git a/arch/sh/configs/sh2007_defconfig b/arch/sh/configs/sh2007_defconfig
-index 0d2f41472a19..0c08d9244c97 100644
---- a/arch/sh/configs/sh2007_defconfig
-+++ b/arch/sh/configs/sh2007_defconfig
-@@ -97,7 +97,6 @@ CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
- CONFIG_LOGO=y
- # CONFIG_HID_SUPPORT is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- # CONFIG_USB_DEVICE_CLASS is not set
- CONFIG_USB_MON=y
- CONFIG_NEW_LEDS=y
-diff --git a/arch/sh/configs/sh7785lcr_defconfig b/arch/sh/configs/sh7785lcr_defconfig
-index 51561f5677d8..d29da4a0f6c2 100644
---- a/arch/sh/configs/sh7785lcr_defconfig
-+++ b/arch/sh/configs/sh7785lcr_defconfig
-@@ -88,7 +88,6 @@ CONFIG_HID_SAMSUNG=y
- CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=m
- # CONFIG_USB_EHCI_TT_NEWSCHED is not set
-diff --git a/arch/sh/configs/titan_defconfig b/arch/sh/configs/titan_defconfig
-index e2cbd92d520b..a77b778c745b 100644
---- a/arch/sh/configs/titan_defconfig
-+++ b/arch/sh/configs/titan_defconfig
-@@ -215,7 +215,6 @@ CONFIG_WATCHDOG=y
- CONFIG_SH_WDT=m
- # CONFIG_USB_HID is not set
- CONFIG_USB=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_EHCI_ROOT_HUB_TT=y
-diff --git a/arch/sh/configs/urquell_defconfig b/arch/sh/configs/urquell_defconfig
-index d7f89be9f474..1e843dbed5f0 100644
---- a/arch/sh/configs/urquell_defconfig
-+++ b/arch/sh/configs/urquell_defconfig
-@@ -117,7 +117,6 @@ CONFIG_HID_SONY=y
- CONFIG_HID_SUNPLUS=y
- CONFIG_USB=y
- CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
--CONFIG_USB_DEVICEFS=y
- CONFIG_USB_MON=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_STORAGE=y
-diff --git a/arch/unicore32/configs/unicore32_defconfig b/arch/unicore32/configs/unicore32_defconfig
-index c9dd3198b6f7..45f47f88d86a 100644
---- a/arch/unicore32/configs/unicore32_defconfig
-+++ b/arch/unicore32/configs/unicore32_defconfig
-@@ -149,7 +149,6 @@ CONFIG_SND_PCM_OSS=m
- # USB support
- CONFIG_USB_ARCH_HAS_HCD=n
- CONFIG_USB=n
--CONFIG_USB_DEVICEFS=n
- CONFIG_USB_PRINTER=n
- CONFIG_USB_STORAGE=n
- # Inventra Highspeed Dual Role Controller
---
-2.1.2
-
diff --git a/patches.renesas/0674-ARM-shmobile-r8a7779-Add-clock-index-macros-for-DT-s.patch b/patches.renesas/0674-ARM-shmobile-r8a7779-Add-clock-index-macros-for-DT-s.patch
deleted file mode 100644
index c7530f663b315..0000000000000
--- a/patches.renesas/0674-ARM-shmobile-r8a7779-Add-clock-index-macros-for-DT-s.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 2d74d066e91fc2e93745cc17b1ddce40d477e1b7 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Wed, 28 May 2014 10:52:34 +0900
-Subject: ARM: shmobile: r8a7779: Add clock index macros for DT sources
-
-Add macros usable by device tree sources to reference r8a7779 clocks by
-index.
-
-Based on work for the r8a7791 SoC by Laurent Pinchart.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Mike Turquette <mturquette@linaro.org>
-(cherry picked from commit b59e869674f5b6779c65ddb13cf799cd01c07072)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/dt-bindings/clock/r8a7779-clock.h | 64 +++++++++++++++++++++++++++++++
- 1 file changed, 64 insertions(+)
- create mode 100644 include/dt-bindings/clock/r8a7779-clock.h
-
-diff --git a/include/dt-bindings/clock/r8a7779-clock.h b/include/dt-bindings/clock/r8a7779-clock.h
-new file mode 100644
-index 000000000000..381a6114237a
---- /dev/null
-+++ b/include/dt-bindings/clock/r8a7779-clock.h
-@@ -0,0 +1,64 @@
-+/*
-+ * Copyright (C) 2013 Horms Solutions Ltd.
-+ *
-+ * Contact: Simon Horman <horms@verge.net.au>
-+ *
-+ * 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 __DT_BINDINGS_CLOCK_R8A7779_H__
-+#define __DT_BINDINGS_CLOCK_R8A7779_H__
-+
-+/* CPG */
-+#define R8A7779_CLK_PLLA 0
-+#define R8A7779_CLK_Z 1
-+#define R8A7779_CLK_ZS 2
-+#define R8A7779_CLK_S 3
-+#define R8A7779_CLK_S1 4
-+#define R8A7779_CLK_P 5
-+#define R8A7779_CLK_B 6
-+#define R8A7779_CLK_OUT 7
-+
-+/* MSTP 0 */
-+#define R8A7779_CLK_HSPI 7
-+#define R8A7779_CLK_TMU2 14
-+#define R8A7779_CLK_TMU1 15
-+#define R8A7779_CLK_TMU0 16
-+#define R8A7779_CLK_HSCIF1 18
-+#define R8A7779_CLK_HSCIF0 19
-+#define R8A7779_CLK_SCIF5 21
-+#define R8A7779_CLK_SCIF4 22
-+#define R8A7779_CLK_SCIF3 23
-+#define R8A7779_CLK_SCIF2 24
-+#define R8A7779_CLK_SCIF1 25
-+#define R8A7779_CLK_SCIF0 26
-+#define R8A7779_CLK_I2C3 27
-+#define R8A7779_CLK_I2C2 28
-+#define R8A7779_CLK_I2C1 29
-+#define R8A7779_CLK_I2C0 30
-+
-+/* MSTP 1 */
-+#define R8A7779_CLK_USB01 0
-+#define R8A7779_CLK_USB2 1
-+#define R8A7779_CLK_DU 3
-+#define R8A7779_CLK_VIN2 8
-+#define R8A7779_CLK_VIN1 9
-+#define R8A7779_CLK_VIN0 10
-+#define R8A7779_CLK_ETHER 14
-+#define R8A7779_CLK_SATA 15
-+#define R8A7779_CLK_PCIE 16
-+#define R8A7779_CLK_VIN3 20
-+
-+/* MSTP 3 */
-+#define R8A7779_CLK_SDHI3 20
-+#define R8A7779_CLK_SDHI2 21
-+#define R8A7779_CLK_SDHI1 22
-+#define R8A7779_CLK_SDHI0 23
-+#define R8A7779_CLK_MMC1 30
-+#define R8A7779_CLK_MMC0 31
-+
-+
-+#endif /* __DT_BINDINGS_CLOCK_R8A7779_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0675-ARM-shmobile-armadillo800eva-fixup-HDMI-sound-flags-.patch b/patches.renesas/0675-ARM-shmobile-armadillo800eva-fixup-HDMI-sound-flags-.patch
deleted file mode 100644
index afc7fdee43763..0000000000000
--- a/patches.renesas/0675-ARM-shmobile-armadillo800eva-fixup-HDMI-sound-flags-.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 63903c85819f13c84a1b84079b60b0450e83b391 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 27 May 2014 19:57:16 -0700
-Subject: ARM: shmobile: armadillo800eva: fixup HDMI sound flags setting
-
-c7a507eea1db1430476289f525f9c853d5d485e8
-(ASoC: fsi: fixup SND_SOC_DAIFMT_CBx_CFx flags)
-fixuped FSI driver's behavior
-which didn't match to ALSA flags.
-
-But, it didn't care about armadillo800eva HDMI sound flags.
-This patch fixed it.
-
-Reported-by: Bui Duc Phuc(Fukuda) <bd-phuc@jinso.co.jp>
-Reported-by: Hiep Cao Minh <cm-hiep@jinso.co.jp>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 730359857f5f0e1fac9881c63d389d73adb5f416)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index d4e7f771c174..5b2aee4eac0c 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -1009,7 +1009,7 @@ static struct asoc_simple_card_info fsi2_hdmi_info = {
- .platform = "sh_fsi2",
- .cpu_dai = {
- .name = "fsib-dai",
-- .fmt = SND_SOC_DAIFMT_CBM_CFM,
-+ .fmt = SND_SOC_DAIFMT_CBS_CFS,
- },
- .codec_dai = {
- .name = "sh_mobile_hdmi-hifi",
---
-2.1.2
-
diff --git a/patches.renesas/0676-ARM-kconfig-allow-PCI-support-to-be-selected-with-AR.patch b/patches.renesas/0676-ARM-kconfig-allow-PCI-support-to-be-selected-with-AR.patch
deleted file mode 100644
index a7c631ef52a43..0000000000000
--- a/patches.renesas/0676-ARM-kconfig-allow-PCI-support-to-be-selected-with-AR.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From 9d3436e9dcd7ae92bf011bdbba84d65fc45afd81 Mon Sep 17 00:00:00 2001
-From: Will Deacon <will.deacon@arm.com>
-Date: Tue, 27 May 2014 23:26:35 +0100
-Subject: ARM: kconfig: allow PCI support to be selected with
- ARCH_MULTIPLATFORM
-
-When targetting ARCH_MULTIPLATFORM, we may include support for SoCs with
-PCI-capable devices (e.g. mach-virt with virtio-pci).
-
-This patch allows PCI support to be selected for these SoCs by selecting
-CONFIG_MIGHT_HAVE_PCI when CONFIG_ARCH_MULTIPLATFORM=y and removes the
-individual selections from multi-platform enabled SoCs.
-
-Acked-by: Rob Herring <robh@kernel.org>
-Signed-off-by: Will Deacon <will.deacon@arm.com>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-(cherry picked from commit 08d38bebb4dcd6414944f8277ea5ea30010664fe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/mach-bcm/Kconfig
- arch/arm/mach-cns3xxx/Kconfig
- arch/arm/mach-imx/Kconfig
----
- arch/arm/Kconfig | 1 +
- arch/arm/mach-cns3xxx/Kconfig | 1 -
- arch/arm/mach-imx/Kconfig | 3 ---
- arch/arm/mach-mvebu/Kconfig | 1 -
- arch/arm/mach-shmobile/Kconfig | 1 -
- arch/arm/mach-tegra/Kconfig | 1 -
- 6 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
-index bb7270772b24..69fc8c1ee833 100644
---- a/arch/arm/Kconfig
-+++ b/arch/arm/Kconfig
-@@ -312,6 +312,7 @@ config ARCH_MULTIPLATFORM
- select AUTO_ZRELADDR
- select COMMON_CLK
- select GENERIC_CLOCKEVENTS
-+ select MIGHT_HAVE_PCI
- select MULTI_IRQ_HANDLER
- select SPARSE_IRQ
- select USE_OF
-diff --git a/arch/arm/mach-cns3xxx/Kconfig b/arch/arm/mach-cns3xxx/Kconfig
-index c6f58a15c95e..5191e10b3945 100644
---- a/arch/arm/mach-cns3xxx/Kconfig
-+++ b/arch/arm/mach-cns3xxx/Kconfig
-@@ -2,7 +2,6 @@ config ARCH_CNS3XXX
- bool "Cavium Networks CNS3XXX family" if ARCH_MULTI_V6
- select ARM_GIC
- select CPU_V6K
-- select MIGHT_HAVE_PCI
- select PCI_DOMAINS if PCI
- help
- Support for Cavium Networks CNS3XXX platform.
-diff --git a/arch/arm/mach-imx/Kconfig b/arch/arm/mach-imx/Kconfig
-index ff2447389f27..54fc3c5d1862 100644
---- a/arch/arm/mach-imx/Kconfig
-+++ b/arch/arm/mach-imx/Kconfig
-@@ -96,7 +96,6 @@ config SOC_IMX25
-
- config SOC_IMX27
- bool
-- select ARCH_HAS_CPUFREQ
- select ARCH_HAS_OPP
- select CPU_ARM926T
- select IMX_HAVE_IOMUX_V1
-@@ -122,7 +121,6 @@ config SOC_IMX35
-
- config SOC_IMX5
- bool
-- select ARCH_HAS_CPUFREQ
- select ARCH_HAS_OPP
- select ARCH_MXC_IOMUX_V3
- select MXC_TZIC
-@@ -791,7 +789,6 @@ config SOC_IMX6Q
- select HAVE_IMX_MMDC
- select HAVE_IMX_SRC
- select MFD_SYSCON
-- select MIGHT_HAVE_PCI
- select PCI_DOMAINS if PCI
- select PINCTRL_IMX6Q
- select PL310_ERRATA_588369 if CACHE_PL310
-diff --git a/arch/arm/mach-mvebu/Kconfig b/arch/arm/mach-mvebu/Kconfig
-index 875a35263dc3..0451caf88c65 100644
---- a/arch/arm/mach-mvebu/Kconfig
-+++ b/arch/arm/mach-mvebu/Kconfig
-@@ -9,7 +9,6 @@ config ARCH_MVEBU
- select MVEBU_MBUS
- select ZONE_DMA if ARM_LPAE
- select ARCH_REQUIRE_GPIOLIB
-- select MIGHT_HAVE_PCI
- select PCI_QUIRKS if PCI
-
- if ARCH_MVEBU
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index b50c753482c7..54c9210461c7 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -8,7 +8,6 @@ config ARCH_SHMOBILE_MULTI
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
- select ARM_GIC
-- select MIGHT_HAVE_PCI
- select ARCH_DMA_ADDR_T_64BIT if ARM_LPAE
- select NO_IOPORT_MAP
- select PINCTRL
-diff --git a/arch/arm/mach-tegra/Kconfig b/arch/arm/mach-tegra/Kconfig
-index 92d660f9610f..b3c521eba7a7 100644
---- a/arch/arm/mach-tegra/Kconfig
-+++ b/arch/arm/mach-tegra/Kconfig
-@@ -7,7 +7,6 @@ config ARCH_TEGRA
- select CLKSRC_MMIO
- select HAVE_ARM_SCU if SMP
- select HAVE_ARM_TWD if SMP
-- select MIGHT_HAVE_PCI
- select PINCTRL
- select ARCH_HAS_RESET_CONTROLLER
- select RESET_CONTROLLER
---
-2.1.2
-
diff --git a/patches.renesas/0677-ARM-shmobile-r8a7791-Fix-SD2CKCR-register-address.patch b/patches.renesas/0677-ARM-shmobile-r8a7791-Fix-SD2CKCR-register-address.patch
deleted file mode 100644
index fe841f28949db..0000000000000
--- a/patches.renesas/0677-ARM-shmobile-r8a7791-Fix-SD2CKCR-register-address.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 9e26903bf76980800af81fdf38557e45e57cc2c6 Mon Sep 17 00:00:00 2001
-From: Shinobu Uehara <shinobu.uehara.xc@renesas.com>
-Date: Mon, 21 Jul 2014 22:04:29 -0700
-Subject: ARM: shmobile: r8a7791: Fix SD2CKCR register address
-
-59e79895b95892863617ce630fbda467f2470575
-(ARM: shmobile: r8a7791: Add clocks)
-added r8a7791 SD clocks when v3.14.
-
-2c60a7df72711fb8b4be1e6aa651ab166a8931bc
-(ARM: shmobile: Add SDHI devices for Koelsch DTS)
-enabled SD on r8a7791 Koelsch when v3.15.
-
-1299df03d7191ab4356c995dde8b912d3c8922e9
-(ARM: shmobile: henninger: add SDHI0/2 DT support)
-enable SD on r8a7791 Henninger when v3.16.
-
-But r8a7791 SD clock had wrong address.
-This patch fixup it.
-
-[Kuninori Morimoto: tidyup for upstreaming]
-
-Signed-off-by: Shinobu Uehara <shinobu.uehara.xc@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c9b227723d051184b9e78f20c75ae2f9d44a6ea2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 8d7ffaeff6e0..79f68acfd5d4 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -540,9 +540,9 @@
- #clock-cells = <0>;
- clock-output-names = "sd1";
- };
-- sd2_clk: sd3_clk@e615007c {
-+ sd2_clk: sd3_clk@e615026c {
- compatible = "renesas,r8a7791-div6-clock", "renesas,cpg-div6-clock";
-- reg = <0 0xe615007c 0 4>;
-+ reg = <0 0xe615026c 0 4>;
- clocks = <&pll1_div2_clk>;
- #clock-cells = <0>;
- clock-output-names = "sd2";
---
-2.1.2
-
diff --git a/patches.renesas/0678-ASoC-sh-Migo-R-sound-needs-I2C.patch b/patches.renesas/0678-ASoC-sh-Migo-R-sound-needs-I2C.patch
deleted file mode 100644
index 23ac8588be944..0000000000000
--- a/patches.renesas/0678-ASoC-sh-Migo-R-sound-needs-I2C.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From a5a8df7a02b1bfbd51146cf1f22f7b129508ab3c Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Tue, 29 Apr 2014 19:18:30 +0800
-Subject: ASoC: sh: Migo-R sound needs I2C
-
-The WM8978 driver needs I2C to be enabled, so the
-SND_SIU_MIGOR option also requires this.
-
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Xia Kaixu <kaixu.xia@linaro.org>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 7b6ad9e85bad73bac3ce799864e0e3a66a0469e2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig
-index ff60e11ecb56..b43fdf0d08af 100644
---- a/sound/soc/sh/Kconfig
-+++ b/sound/soc/sh/Kconfig
-@@ -56,7 +56,7 @@ config SND_SH7760_AC97
-
- config SND_SIU_MIGOR
- tristate "SIU sound support on Migo-R"
-- depends on SH_MIGOR
-+ depends on SH_MIGOR && I2C
- select SND_SOC_SH4_SIU
- select SND_SOC_WM8978
- help
---
-2.1.2
-
diff --git a/patches.renesas/0679-ASoC-rsnd-remove-old-clock-style-support.patch b/patches.renesas/0679-ASoC-rsnd-remove-old-clock-style-support.patch
deleted file mode 100644
index e9bfcaf4d88cc..0000000000000
--- a/patches.renesas/0679-ASoC-rsnd-remove-old-clock-style-support.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From dc172b9e53d9793668d90bb51f5e76cb79c3c125 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 01:59:00 -0700
-Subject: ASoC: rsnd: remove old clock style support
-
-All platform which used old style was
-switched to new style.
-R-Car sound can remove old style clock support,
-use device dependent clock now.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5e392ea0da04d4206d56ec1479565fb42a044b57)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/adg.c | 39 +++------------------------------------
- 1 file changed, 3 insertions(+), 36 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/adg.c b/sound/soc/sh/rcar/adg.c
-index 69c44269ebdb..41556b2ef21e 100644
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -397,9 +397,8 @@ int rsnd_adg_probe(struct platform_device *pdev,
- {
- struct rsnd_adg *adg;
- struct device *dev = rsnd_priv_to_dev(priv);
-- struct clk *clk, *clk_orig;
-+ struct clk *clk;
- int i;
-- bool use_old_style = false;
-
- adg = devm_kzalloc(dev, sizeof(*adg), GFP_KERNEL);
- if (!adg) {
-@@ -407,45 +406,13 @@ int rsnd_adg_probe(struct platform_device *pdev,
- return -ENOMEM;
- }
-
-- clk_orig = devm_clk_get(dev, NULL);
- adg->clk[CLKA] = devm_clk_get(dev, "clk_a");
- adg->clk[CLKB] = devm_clk_get(dev, "clk_b");
- adg->clk[CLKC] = devm_clk_get(dev, "clk_c");
- adg->clk[CLKI] = devm_clk_get(dev, "clk_i");
-
-- /*
-- * It request device dependent audio clock.
-- * But above all clks will indicate rsnd module clock
-- * if platform doesn't it
-- */
-- for_each_rsnd_clk(clk, adg, i) {
-- if (clk_orig == clk) {
-- dev_warn(dev,
-- "doesn't have device dependent clock, use independent clock\n");
-- use_old_style = true;
-- break;
-- }
-- }
--
-- /*
-- * note:
-- * these exist in order to keep compatible with
-- * platform which has device independent audio clock,
-- * but will be removed soon
-- */
-- if (use_old_style) {
-- adg->clk[CLKA] = devm_clk_get(NULL, "audio_clk_a");
-- adg->clk[CLKB] = devm_clk_get(NULL, "audio_clk_b");
-- adg->clk[CLKC] = devm_clk_get(NULL, "audio_clk_c");
-- adg->clk[CLKI] = devm_clk_get(NULL, "audio_clk_internal");
-- }
--
-- for_each_rsnd_clk(clk, adg, i) {
-- if (IS_ERR(clk)) {
-- dev_err(dev, "Audio clock failed\n");
-- return -EIO;
-- }
-- }
-+ for_each_rsnd_clk(clk, adg, i)
-+ dev_dbg(dev, "clk %d : %p\n", i, clk);
-
- rsnd_adg_ssi_clk_init(priv, adg);
-
---
-2.1.2
-
diff --git a/patches.renesas/0680-ASoC-rsnd-remove-compatibility-code.patch b/patches.renesas/0680-ASoC-rsnd-remove-compatibility-code.patch
deleted file mode 100644
index cf8208d4e2a0e..0000000000000
--- a/patches.renesas/0680-ASoC-rsnd-remove-compatibility-code.patch
+++ /dev/null
@@ -1,429 +0,0 @@
-From d0650c75c67b0c29b39c461e96bfcde6382b2d3b Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 01:59:26 -0700
-Subject: ASoC: rsnd: remove compatibility code
-
-Now, all platform is using new style rsnd_dai_platform_info.
-Keeping compatibility is no longer needed.
-We can cleanup code.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 29e69fd2cd6f55233f64f600ad55ce2b661784d1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 22 +++------------
- sound/soc/sh/rcar/core.c | 54 ++++++++-----------------------------
- sound/soc/sh/rcar/rsnd.h | 3 ---
- sound/soc/sh/rcar/src.c | 69 +++++++++++++++---------------------------------
- sound/soc/sh/rcar/ssi.c | 51 +----------------------------------
- 5 files changed, 36 insertions(+), 163 deletions(-)
-
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index 34a3c02a4576..a03268ec59c3 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -34,40 +34,24 @@
- * B : SSI direction
- */
- #define RSND_SSI_CLK_PIN_SHARE (1 << 31)
--#define RSND_SSI_PLAY (1 << 24)
-
- #define RSND_SSI(_dma_id, _pio_irq, _flags) \
- { .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
--#define RSND_SSI_SET(_dai_id, _dma_id, _pio_irq, _flags) \
--{ .dai_id = _dai_id, .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
- #define RSND_SSI_UNUSED \
--{ .dai_id = -1, .dma_id = -1, .pio_irq = -1, .flags = 0 }
-+{ .dma_id = -1, .pio_irq = -1, .flags = 0 }
-
- struct rsnd_ssi_platform_info {
-- int dai_id; /* will be removed */
- int dma_id;
- int pio_irq;
- u32 flags;
- };
-
--/*
-- * flags
-- */
--#define RSND_SCU_USE_HPBIF (1 << 31) /* it needs RSND_SSI_DEPENDENT */
--
- #define RSND_SRC(rate, _dma_id) \
--{ .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
--#define RSND_SRC_SET(rate, _dma_id) \
-- { .flags = RSND_SCU_USE_HPBIF, .convert_rate = rate, .dma_id = _dma_id, }
-+{ .convert_rate = rate, .dma_id = _dma_id, }
- #define RSND_SRC_UNUSED \
-- { .flags = 0, .convert_rate = 0, .dma_id = 0, }
--
--#define rsnd_scu_platform_info rsnd_src_platform_info
--#define src_info scu_info
--#define src_info_nr scu_info_nr
-+{ .convert_rate = 0, .dma_id = -1, }
-
- struct rsnd_src_platform_info {
-- u32 flags;
- u32 convert_rate; /* sampling rate convert */
- int dma_id; /* for Gen2 SCU */
- };
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 89424470a1f3..a2ae46f83038 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -467,10 +467,7 @@ static int rsnd_soc_dai_trigger(struct snd_pcm_substream *substream, int cmd,
- struct rsnd_priv *priv = snd_soc_dai_get_drvdata(dai);
- struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
- struct rsnd_dai_stream *io = rsnd_rdai_to_io(rdai, substream);
-- struct rsnd_mod *mod = rsnd_ssi_mod_get_frm_dai(priv,
-- rsnd_dai_id(priv, rdai),
-- rsnd_dai_is_play(rdai, io));
-- int ssi_id = rsnd_mod_id(mod);
-+ int ssi_id = rsnd_mod_id(rsnd_io_to_mod_ssi(io));
- int ret;
- unsigned long flags;
-
-@@ -583,7 +580,6 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io)
- {
- struct rsnd_mod *mod;
-- struct rsnd_dai_platform_info *dai_info = rdai->info;
- int ret;
- int ssi_id = -1;
- int src_id = -1;
-@@ -598,20 +594,10 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is
- * using fixed path.
- */
-- if (dai_info) {
-- if (rsnd_is_enable_path(io, ssi))
-- ssi_id = rsnd_info_id(priv, io, ssi);
-- if (rsnd_is_enable_path(io, src))
-- src_id = rsnd_info_id(priv, io, src);
-- } else {
-- /* get SSI's ID */
-- mod = rsnd_ssi_mod_get_frm_dai(priv,
-- rsnd_dai_id(priv, rdai),
-- rsnd_dai_is_play(rdai, io));
-- if (!mod)
-- return 0;
-- ssi_id = src_id = rsnd_mod_id(mod);
-- }
-+ if (rsnd_is_enable_path(io, ssi))
-+ ssi_id = rsnd_info_id(priv, io, ssi);
-+ if (rsnd_is_enable_path(io, src))
-+ src_id = rsnd_info_id(priv, io, src);
-
- ret = 0;
-
-@@ -725,30 +711,15 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- struct snd_soc_dai_driver *drv;
- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct rsnd_dai *rdai;
-- struct rsnd_mod *pmod, *cmod;
-+ struct rsnd_ssi_platform_info *pmod, *cmod;
- struct device *dev = rsnd_priv_to_dev(priv);
- int dai_nr;
- int i;
-
- rsnd_of_parse_dai(pdev, of_data, priv);
-
-- /*
-- * dai_nr should be set via dai_info_nr,
-- * but allow it to keeping compatible
-- */
- dai_nr = info->dai_info_nr;
- if (!dai_nr) {
-- /* get max dai nr */
-- for (dai_nr = 0; dai_nr < 32; dai_nr++) {
-- pmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 1);
-- cmod = rsnd_ssi_mod_get_frm_dai(priv, dai_nr, 0);
--
-- if (!pmod && !cmod)
-- break;
-- }
-- }
--
-- if (!dai_nr) {
- dev_err(dev, "no dai\n");
- return -EIO;
- }
-@@ -765,11 +736,10 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- priv->rdai = rdai;
-
- for (i = 0; i < dai_nr; i++) {
-- if (info->dai_info)
-- rdai[i].info = &info->dai_info[i];
-+ rdai[i].info = &info->dai_info[i];
-
-- pmod = rsnd_ssi_mod_get_frm_dai(priv, i, 1);
-- cmod = rsnd_ssi_mod_get_frm_dai(priv, i, 0);
-+ pmod = rdai[i].info->playback.ssi;
-+ cmod = rdai[i].info->capture.ssi;
-
- /*
- * init rsnd_dai
-@@ -787,8 +757,7 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- drv[i].playback.channels_min = 2;
- drv[i].playback.channels_max = 2;
-
-- if (info->dai_info)
-- rdai[i].playback.info = &info->dai_info[i].playback;
-+ rdai[i].playback.info = &info->dai_info[i].playback;
- rsnd_path_init(priv, &rdai[i], &rdai[i].playback);
- }
- if (cmod) {
-@@ -797,8 +766,7 @@ static int rsnd_dai_probe(struct platform_device *pdev,
- drv[i].capture.channels_min = 2;
- drv[i].capture.channels_max = 2;
-
-- if (info->dai_info)
-- rdai[i].capture.info = &info->dai_info[i].capture;
-+ rdai[i].capture.info = &info->dai_info[i].capture;
- rsnd_path_init(priv, &rdai[i], &rdai[i].capture);
- }
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 619d198c7d2e..061b04cbd7d5 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -379,9 +379,6 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv);
- struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
--struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
-- int dai_id, int is_play);
- int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
--int rsnd_ssi_is_play(struct rsnd_mod *mod);
-
- #endif
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 4d0720ed5a90..09424bcf86ec 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -27,12 +27,9 @@ struct rsnd_src {
- #define OTBL_18 (6 << 16)
- #define OTBL_16 (8 << 16)
-
--#define rsnd_src_mode_flags(p) ((p)->info->flags)
- #define rsnd_src_convert_rate(p) ((p)->info->convert_rate)
- #define rsnd_mod_to_src(_mod) \
- container_of((_mod), struct rsnd_src, mod)
--#define rsnd_src_hpbif_is_enable(src) \
-- (rsnd_src_mode_flags(src) & RSND_SCU_USE_HPBIF)
- #define rsnd_src_dma_available(src) \
- rsnd_dma_available(rsnd_mod_to_dma(&(src)->mod))
-
-@@ -80,34 +77,35 @@ struct rsnd_src {
- *
- * This driver request
- * struct rsnd_src_platform_info {
-- * u32 flags;
- * u32 convert_rate;
-+ * int dma_id;
- * }
- *
-- * rsnd_src_hpbif_is_enable() will be true
-- * if flags had RSND_SRC_USE_HPBIF,
-- * and it controls whether SSIU is used or not.
-- *
- * rsnd_src_convert_rate() indicates
- * above convert_rate, and it controls
- * whether SRC is used or not.
- *
- * ex) doesn't use SRC
-- * struct rsnd_src_platform_info info = {
-- * .flags = 0,
-- * .convert_rate = 0,
-+ * static struct rsnd_dai_platform_info rsnd_dai = {
-+ * .playback = { .ssi = &rsnd_ssi[0], },
- * };
- *
- * ex) uses SRC
-- * struct rsnd_src_platform_info info = {
-- * .flags = RSND_SRC_USE_HPBIF,
-- * .convert_rate = 48000,
-+ * static struct rsnd_src_platform_info rsnd_src[] = {
-+ * RSND_SCU(48000, 0),
-+ * ...
-+ * };
-+ * static struct rsnd_dai_platform_info rsnd_dai = {
-+ * .playback = { .ssi = &rsnd_ssi[0], .src = &rsnd_src[0] },
- * };
- *
- * ex) uses SRC bypass mode
-- * struct rsnd_src_platform_info info = {
-- * .flags = RSND_SRC_USE_HPBIF,
-- * .convert_rate = 0,
-+ * static struct rsnd_src_platform_info rsnd_src[] = {
-+ * RSND_SCU(0, 0),
-+ * ...
-+ * };
-+ * static struct rsnd_dai_platform_info rsnd_dai = {
-+ * .playback = { .ssi = &rsnd_ssi[0], .src = &rsnd_src[0] },
- * };
- *
- */
-@@ -119,24 +117,14 @@ int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
- struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
-- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- int ssi_id = rsnd_mod_id(ssi_mod);
-- int has_src = 0;
-
- /*
- * SSI_MODE0
- */
-- if (info->dai_info) {
-- has_src = !!src_mod;
-- } else {
-- struct rsnd_src *src = rsnd_mod_to_src(src_mod);
-- has_src = rsnd_src_hpbif_is_enable(src);
-- }
--
- rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id),
-- has_src ? 0 : (1 << ssi_id));
-+ src_mod ? 0 : (1 << ssi_id));
-
- /*
- * SSI_MODE1
-@@ -534,21 +522,13 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
- struct rsnd_dai_stream *io)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-- struct rsnd_mod *ssi = rsnd_ssi_mod_get(priv, rsnd_mod_id(mod));
- struct device *dev = rsnd_priv_to_dev(priv);
- int ret;
-- int is_play;
--
-- if (info->dai_info)
-- is_play = rsnd_info_is_playback(priv, src);
-- else
-- is_play = rsnd_ssi_is_play(ssi);
-
- ret = rsnd_dma_init(priv,
- rsnd_mod_to_dma(mod),
-- is_play,
-+ rsnd_info_is_playback(priv, src),
- src->info->dma_id);
- if (ret < 0)
- dev_err(dev, "SRC DMA failed\n");
-@@ -699,11 +679,6 @@ int rsnd_src_probe(struct platform_device *pdev,
- snprintf(name, RSND_SRC_NAME_SIZE, "src.%d", i);
-
- clk = devm_clk_get(dev, name);
-- if (IS_ERR(clk)) {
-- snprintf(name, RSND_SRC_NAME_SIZE, "scu.%d", i);
-- clk = devm_clk_get(dev, name);
-- }
--
- if (IS_ERR(clk))
- return PTR_ERR(clk);
-
-@@ -711,12 +686,10 @@ int rsnd_src_probe(struct platform_device *pdev,
- src->clk = clk;
-
- ops = &rsnd_src_non_ops;
-- if (rsnd_src_hpbif_is_enable(src)) {
-- if (rsnd_is_gen1(priv))
-- ops = &rsnd_src_gen1_ops;
-- if (rsnd_is_gen2(priv))
-- ops = &rsnd_src_gen2_ops;
-- }
-+ if (rsnd_is_gen1(priv))
-+ ops = &rsnd_src_gen1_ops;
-+ if (rsnd_is_gen2(priv))
-+ ops = &rsnd_src_gen2_ops;
-
- rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i);
-
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 1d8387c25bd8..3a088e569921 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -422,20 +422,13 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct device *dev = rsnd_priv_to_dev(priv);
- int dma_id = ssi->info->dma_id;
-- int is_play;
- int ret;
-
-- if (info->dai_info)
-- is_play = rsnd_info_is_playback(priv, ssi);
-- else
-- is_play = rsnd_ssi_is_play(&ssi->mod);
--
- ret = rsnd_dma_init(
- priv, rsnd_mod_to_dma(mod),
-- is_play,
-+ rsnd_info_is_playback(priv, ssi),
- dma_id);
-
- if (ret < 0)
-@@ -512,41 +505,6 @@ static struct rsnd_mod_ops rsnd_ssi_non_ops = {
- /*
- * ssi mod function
- */
--struct rsnd_mod *rsnd_ssi_mod_get_frm_dai(struct rsnd_priv *priv,
-- int dai_id, int is_play)
--{
-- struct rsnd_dai_platform_info *dai_info = NULL;
-- struct rsnd_dai_path_info *path_info = NULL;
-- struct rsnd_ssi_platform_info *target_info = NULL;
-- struct rsnd_ssi *ssi;
-- int i, has_play;
--
-- if (priv->rdai)
-- dai_info = priv->rdai[dai_id].info;
-- if (dai_info)
-- path_info = (is_play) ? &dai_info->playback : &dai_info->capture;
-- if (path_info)
-- target_info = path_info->ssi;
--
-- is_play = !!is_play;
--
-- for_each_rsnd_ssi(ssi, priv, i) {
-- if (target_info == ssi->info)
-- return &ssi->mod;
--
-- /* for compatible */
-- if (rsnd_ssi_dai_id(ssi) != dai_id)
-- continue;
--
-- has_play = rsnd_ssi_is_play(&ssi->mod);
--
-- if (is_play == has_play)
-- return &ssi->mod;
-- }
--
-- return NULL;
--}
--
- struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id)
- {
- if (WARN_ON(id < 0 || id >= rsnd_ssi_nr(priv)))
-@@ -562,13 +520,6 @@ int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod)
- return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_CLK_PIN_SHARE);
- }
-
--int rsnd_ssi_is_play(struct rsnd_mod *mod)
--{
-- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
--
-- return !!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_PLAY);
--}
--
- static void rsnd_ssi_parent_clk_setup(struct rsnd_priv *priv, struct rsnd_ssi *ssi)
- {
- if (!rsnd_ssi_is_pin_sharing(&ssi->mod))
---
-2.1.2
-
diff --git a/patches.renesas/0681-ASoC-rsnd-add-rsnd_path_parse-macro.patch b/patches.renesas/0681-ASoC-rsnd-add-rsnd_path_parse-macro.patch
deleted file mode 100644
index da15209e01eeb..0000000000000
--- a/patches.renesas/0681-ASoC-rsnd-add-rsnd_path_parse-macro.patch
+++ /dev/null
@@ -1,90 +0,0 @@
-From fd65e0a967c01325c5cf07f5879ce581d1581880 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 17:43:26 -0700
-Subject: ASoC: rsnd: add rsnd_path_parse() macro
-
-Current R-Car sound supports only SRC/SSI,
-but, other module will be supported.
-This patch adds rsnd_path_parse() macro to share code
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 739f9502fdd7c7202123ded842415a0392b7dc40)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 43 ++++++++++++++++++++++---------------------
- 1 file changed, 22 insertions(+), 21 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index a2ae46f83038..8bc3ef2503b5 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -575,14 +575,27 @@ static const struct snd_soc_dai_ops rsnd_soc_dai_ops = {
- .set_fmt = rsnd_soc_dai_set_fmt,
- };
-
-+#define rsnd_path_parse(priv, io, type) \
-+({ \
-+ struct rsnd_mod *mod; \
-+ int ret = 0; \
-+ int id = -1; \
-+ \
-+ if (rsnd_is_enable_path(io, type)) { \
-+ id = rsnd_info_id(priv, io, type); \
-+ if (id >= 0) { \
-+ mod = rsnd_##type##_mod_get(priv, id); \
-+ ret = rsnd_dai_connect(mod, io); \
-+ } \
-+ } \
-+ ret; \
-+})
-+
- static int rsnd_path_init(struct rsnd_priv *priv,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io)
- {
-- struct rsnd_mod *mod;
- int ret;
-- int ssi_id = -1;
-- int src_id = -1;
-
- /*
- * Gen1 is created by SRU/SSI, and this SRU is base module of
-@@ -594,28 +607,16 @@ static int rsnd_path_init(struct rsnd_priv *priv,
- * Gen2 SCU path is very flexible, but, Gen1 SRU (SCU parts) is
- * using fixed path.
- */
-- if (rsnd_is_enable_path(io, ssi))
-- ssi_id = rsnd_info_id(priv, io, ssi);
-- if (rsnd_is_enable_path(io, src))
-- src_id = rsnd_info_id(priv, io, src);
--
-- ret = 0;
-
- /* SRC */
-- if (src_id >= 0) {
-- mod = rsnd_src_mod_get(priv, src_id);
-- ret = rsnd_dai_connect(mod, io);
-- if (ret < 0)
-- return ret;
-- }
-+ ret = rsnd_path_parse(priv, io, src);
-+ if (ret < 0)
-+ return ret;
-
- /* SSI */
-- if (ssi_id >= 0) {
-- mod = rsnd_ssi_mod_get(priv, ssi_id);
-- ret = rsnd_dai_connect(mod, io);
-- if (ret < 0)
-- return ret;
-- }
-+ ret = rsnd_path_parse(priv, io, ssi);
-+ if (ret < 0)
-+ return ret;
-
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0682-ASoC-rsnd-add-rsnd_get_adinr.patch b/patches.renesas/0682-ASoC-rsnd-add-rsnd_get_adinr.patch
deleted file mode 100644
index f13709fba9419..0000000000000
--- a/patches.renesas/0682-ASoC-rsnd-add-rsnd_get_adinr.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 48915c4596ae7546d2eaf2d4279d49acf49904e1 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 17:44:14 -0700
-Subject: ASoC: rsnd: add rsnd_get_adinr()
-
-SRC module needs ADINR register settings,
-but, it has many similar xxx_ADINR register,
-and needs same settings.
-This patch adds rsnd_get_adinr() to sharing code.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit d7bdbc5d9e4e813522f46632527826211270b9d0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 26 ++++++++++++++++++++++++++
- sound/soc/sh/rcar/rsnd.h | 1 +
- sound/soc/sh/rcar/src.c | 26 +++-----------------------
- 3 files changed, 30 insertions(+), 23 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 8bc3ef2503b5..c3a5035e2459 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -309,6 +309,32 @@ void rsnd_dma_quit(struct rsnd_priv *priv,
- }
-
- /*
-+ * settting function
-+ */
-+u32 rsnd_get_adinr(struct rsnd_mod *mod)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ u32 adinr = runtime->channels;
-+
-+ switch (runtime->sample_bits) {
-+ case 16:
-+ adinr |= (8 << 16);
-+ break;
-+ case 32:
-+ adinr |= (0 << 16);
-+ break;
-+ default:
-+ dev_warn(dev, "not supported sample bits\n");
-+ return 0;
-+ }
-+
-+ return adinr;
-+}
-+
-+/*
- * rsnd_dai functions
- */
- #define __rsnd_mod_call(mod, func, rdai, io) \
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 061b04cbd7d5..fee3ec21aaeb 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -136,6 +136,7 @@ void rsnd_write(struct rsnd_priv *priv, struct rsnd_mod *mod,
- enum rsnd_reg reg, u32 data);
- void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod, enum rsnd_reg reg,
- u32 mask, u32 data);
-+u32 rsnd_get_adinr(struct rsnd_mod *mod);
-
- /*
- * R-Car DMA
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 09424bcf86ec..60e966d22c9e 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -18,15 +18,6 @@ struct rsnd_src {
-
- #define RSND_SRC_NAME_SIZE 16
-
--/*
-- * ADINR
-- */
--#define OTBL_24 (0 << 16)
--#define OTBL_22 (2 << 16)
--#define OTBL_20 (4 << 16)
--#define OTBL_18 (6 << 16)
--#define OTBL_16 (8 << 16)
--
- #define rsnd_src_convert_rate(p) ((p)->info->convert_rate)
- #define rsnd_mod_to_src(_mod) \
- container_of((_mod), struct rsnd_src, mod)
-@@ -197,7 +188,6 @@ static int rsnd_src_set_convert_rate(struct rsnd_mod *mod,
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
- u32 convert_rate = rsnd_src_convert_rate(src);
-- u32 adinr = runtime->channels;
- u32 fsrate = 0;
-
- if (convert_rate)
-@@ -214,17 +204,7 @@ static int rsnd_src_set_convert_rate(struct rsnd_mod *mod,
- rsnd_mod_write(mod, SRC_SRCIR, 1);
-
- /* Set channel number and output bit length */
-- switch (runtime->sample_bits) {
-- case 16:
-- adinr |= OTBL_16;
-- break;
-- case 32:
-- adinr |= OTBL_24;
-- break;
-- default:
-- return -EIO;
-- }
-- rsnd_mod_write(mod, SRC_ADINR, adinr);
-+ rsnd_mod_write(mod, SRC_ADINR, rsnd_get_adinr(mod));
-
- /* Enable the initial value of IFS */
- if (fsrate) {
-@@ -487,8 +467,8 @@ static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-- rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_mod_read(mod, SRC_ADINR));
-- rsnd_mod_write(mod, SSI_BUSIF_MODE, rsnd_mod_read(mod, SRC_BUSIF_MODE));
-+ rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_get_adinr(mod));
-+ rsnd_mod_write(mod, SSI_BUSIF_MODE, 1);
-
- rsnd_mod_write(mod, SRC_SRCCR, 0x00011110);
-
---
-2.1.2
-
diff --git a/patches.renesas/0683-ASoC-rsnd-remove-duplicate-parameter-from-rsnd_mod_o.patch b/patches.renesas/0683-ASoC-rsnd-remove-duplicate-parameter-from-rsnd_mod_o.patch
deleted file mode 100644
index b0e9cb592a0b8..0000000000000
--- a/patches.renesas/0683-ASoC-rsnd-remove-duplicate-parameter-from-rsnd_mod_o.patch
+++ /dev/null
@@ -1,507 +0,0 @@
-From a309e856ed7e621886a7aed78e2a759ac08e6f75 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 17:44:29 -0700
-Subject: ASoC: rsnd: remove duplicate parameter from rsnd_mod_ops
-
-Now, it can get rsnd_dai_stream pointer from rsnd_mod.
-Remove duplicate parameter from rsnd_mod_ops
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b42fccf69cd7153d1158c85137ec718d7309e074)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 10 +++---
- sound/soc/sh/rcar/rsnd.h | 24 +++++--------
- sound/soc/sh/rcar/src.c | 91 ++++++++++++++++++++----------------------------
- sound/soc/sh/rcar/ssi.c | 34 ++++++++----------
- 4 files changed, 65 insertions(+), 94 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index c3a5035e2459..798c7cc8d8be 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -337,19 +337,19 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod)
- /*
- * rsnd_dai functions
- */
--#define __rsnd_mod_call(mod, func, rdai, io) \
-+#define __rsnd_mod_call(mod, func, rdai) \
- ({ \
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \
- struct device *dev = rsnd_priv_to_dev(priv); \
- dev_dbg(dev, "%s [%d] %s\n", \
- rsnd_mod_name(mod), rsnd_mod_id(mod), #func); \
-- (mod)->ops->func(mod, rdai, io); \
-+ (mod)->ops->func(mod, rdai); \
- })
-
--#define rsnd_mod_call(mod, func, rdai, io) \
-+#define rsnd_mod_call(mod, func, rdai) \
- (!(mod) ? -ENODEV : \
- !((mod)->ops->func) ? 0 : \
-- __rsnd_mod_call(mod, func, (rdai), (io)))
-+ __rsnd_mod_call(mod, func, (rdai)))
-
- #define rsnd_dai_call(rdai, io, fn) \
- ({ \
-@@ -359,7 +359,7 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod)
- mod = (io)->mod[i]; \
- if (!mod) \
- continue; \
-- ret = rsnd_mod_call(mod, fn, (rdai), (io)); \
-+ ret = rsnd_mod_call(mod, fn, (rdai)); \
- if (ret < 0) \
- break; \
- } \
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index fee3ec21aaeb..6156ceebd58b 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -172,23 +172,17 @@ enum rsnd_mod_type {
- struct rsnd_mod_ops {
- char *name;
- int (*probe)(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- int (*remove)(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- int (*init)(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- int (*quit)(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- int (*start)(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- int (*stop)(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- };
-
- struct rsnd_dai_stream;
-@@ -365,11 +359,9 @@ unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime);
- int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
- int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io);
-+ struct rsnd_dai *rdai);
-
- #define rsnd_src_nr(priv) ((priv)->src_nr)
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 60e966d22c9e..2a0f7e63ffc8 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -105,9 +105,9 @@ struct rsnd_src {
- * Gen1/Gen2 common functions
- */
- int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(ssi_mod);
- struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
- int ssi_id = rsnd_mod_id(ssi_mod);
-
-@@ -145,8 +145,7 @@ int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
- }
-
- int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(ssi_mod);
-
-@@ -182,9 +181,9 @@ unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
- }
-
- static int rsnd_src_set_convert_rate(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
- u32 convert_rate = rsnd_src_convert_rate(src);
-@@ -221,8 +220,7 @@ static int rsnd_src_set_convert_rate(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_init(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-@@ -232,8 +230,7 @@ static int rsnd_src_init(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_quit(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-@@ -243,8 +240,7 @@ static int rsnd_src_quit(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_start(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-@@ -262,8 +258,7 @@ static int rsnd_src_start(struct rsnd_mod *mod,
-
-
- static int rsnd_src_stop(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-@@ -281,9 +276,9 @@ static struct rsnd_mod_ops rsnd_src_non_ops = {
- * Gen1 functions
- */
- static int rsnd_src_set_route_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct src_route_config {
- u32 mask;
- int shift;
-@@ -319,9 +314,9 @@ static int rsnd_src_set_route_gen1(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_set_convert_timing_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-@@ -378,12 +373,11 @@ static int rsnd_src_set_convert_timing_gen1(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- int ret;
-
-- ret = rsnd_src_set_convert_rate(mod, rdai, io);
-+ ret = rsnd_src_set_convert_rate(mod, rdai);
- if (ret < 0)
- return ret;
-
-@@ -400,24 +394,23 @@ static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_init_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- int ret;
-
-- ret = rsnd_src_init(mod, rdai, io);
-+ ret = rsnd_src_init(mod, rdai);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_src_set_route_gen1(mod, rdai, io);
-+ ret = rsnd_src_set_route_gen1(mod, rdai);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_src_set_convert_rate_gen1(mod, rdai, io);
-+ ret = rsnd_src_set_convert_rate_gen1(mod, rdai);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_src_set_convert_timing_gen1(mod, rdai, io);
-+ ret = rsnd_src_set_convert_timing_gen1(mod, rdai);
- if (ret < 0)
- return ret;
-
-@@ -425,25 +418,23 @@ static int rsnd_src_init_gen1(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_start_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- int id = rsnd_mod_id(mod);
-
- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), (1 << id));
-
-- return rsnd_src_start(mod, rdai, io);
-+ return rsnd_src_start(mod, rdai);
- }
-
- static int rsnd_src_stop_gen1(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- int id = rsnd_mod_id(mod);
-
- rsnd_mod_bset(mod, SRC_ROUTE_CTRL, (1 << id), 0);
-
-- return rsnd_src_stop(mod, rdai, io);
-+ return rsnd_src_stop(mod, rdai);
- }
-
- static struct rsnd_mod_ops rsnd_src_gen1_ops = {
-@@ -458,12 +449,11 @@ static struct rsnd_mod_ops rsnd_src_gen1_ops = {
- * Gen2 functions
- */
- static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- int ret;
-
-- ret = rsnd_src_set_convert_rate(mod, rdai, io);
-+ ret = rsnd_src_set_convert_rate(mod, rdai);
- if (ret < 0)
- return ret;
-
-@@ -479,9 +469,9 @@ static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_set_convert_timing_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
- u32 convert_rate = rsnd_src_convert_rate(src);
-@@ -498,8 +488,7 @@ static int rsnd_src_set_convert_timing_gen2(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-@@ -517,8 +506,7 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_remove_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
-
-@@ -526,20 +514,19 @@ static int rsnd_src_remove_gen2(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_init_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- int ret;
-
-- ret = rsnd_src_init(mod, rdai, io);
-+ ret = rsnd_src_init(mod, rdai);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_src_set_convert_rate_gen2(mod, rdai, io);
-+ ret = rsnd_src_set_convert_rate_gen2(mod, rdai);
- if (ret < 0)
- return ret;
-
-- ret = rsnd_src_set_convert_timing_gen2(mod, rdai, io);
-+ ret = rsnd_src_set_convert_timing_gen2(mod, rdai);
- if (ret < 0)
- return ret;
-
-@@ -547,8 +534,7 @@ static int rsnd_src_init_gen2(struct rsnd_mod *mod,
- }
-
- static int rsnd_src_start_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-@@ -557,12 +543,11 @@ static int rsnd_src_start_gen2(struct rsnd_mod *mod,
- rsnd_mod_write(mod, SSI_CTRL, 0x1);
- rsnd_mod_write(mod, SRC_CTRL, 0x11);
-
-- return rsnd_src_start(mod, rdai, io);
-+ return rsnd_src_start(mod, rdai);
- }
-
- static int rsnd_src_stop_gen2(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-@@ -571,7 +556,7 @@ static int rsnd_src_stop_gen2(struct rsnd_mod *mod,
-
- rsnd_dma_stop(rsnd_mod_to_dma(&src->mod));
-
-- return rsnd_src_stop(mod, rdai, io);
-+ return rsnd_src_stop(mod, rdai);
- }
-
- static struct rsnd_mod_ops rsnd_src_gen2_ops = {
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 3a088e569921..36654bd4e428 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -240,10 +240,10 @@ static void rsnd_ssi_hw_stop(struct rsnd_ssi *ssi,
- * SSI mod common functions
- */
- static int rsnd_ssi_init(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- u32 cr;
-
-@@ -287,14 +287,13 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- ssi->cr_own = cr;
- ssi->err = -1; /* ignore 1st error */
-
-- rsnd_src_ssi_mode_init(mod, rdai, io);
-+ rsnd_src_ssi_mode_init(mod, rdai);
-
- return 0;
- }
-
- static int rsnd_ssi_quit(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-@@ -359,8 +358,7 @@ static irqreturn_t rsnd_ssi_pio_interrupt(int irq, void *data)
- }
-
- static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct device *dev = rsnd_priv_to_dev(priv);
-@@ -379,15 +377,15 @@ static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
- }
-
- static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-
- /* enable PIO IRQ */
- ssi->cr_etc = UIEN | OIEN | DIEN;
-
-- rsnd_src_enable_ssi_irq(mod, rdai, io);
-+ rsnd_src_enable_ssi_irq(mod, rdai);
-
- rsnd_ssi_hw_start(ssi, rdai, io);
-
-@@ -395,8 +393,7 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
- }
-
- static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-
-@@ -417,8 +414,7 @@ static struct rsnd_mod_ops rsnd_ssi_pio_ops = {
- };
-
- static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-@@ -438,8 +434,7 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
- }
-
- static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- rsnd_dma_quit(rsnd_mod_to_priv(mod), rsnd_mod_to_dma(mod));
-
-@@ -447,11 +442,11 @@ static int rsnd_ssi_dma_remove(struct rsnd_mod *mod,
- }
-
- static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
- struct rsnd_dma *dma = rsnd_mod_to_dma(&ssi->mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-
- /* enable DMA transfer */
- ssi->cr_etc = DMEN;
-@@ -468,8 +463,7 @@ static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
- }
-
- static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct rsnd_dai_stream *io)
-+ struct rsnd_dai *rdai)
- {
- struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
- struct rsnd_dma *dma = rsnd_mod_to_dma(&ssi->mod);
---
-2.1.2
-
diff --git a/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch b/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch
deleted file mode 100644
index 2434429ff0d51..0000000000000
--- a/patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch
+++ /dev/null
@@ -1,106 +0,0 @@
-From 66906c2c256667fb95ba5397288fd0b4df50dd6e Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 17:44:41 -0700
-Subject: ASoC: rsnd: enable to use multi parameter on
- rsnd_dai_call/rsnd_mod_call
-
-rsnd_mod_ops would like to come to use multi parameter.
-modify macro to enable it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 68b6af3656a1f3303cca094a19e26653fad1853a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 26 +++++++++++++-------------
- 1 file changed, 13 insertions(+), 13 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -337,7 +337,7 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod)
- /*
- * rsnd_dai functions
- */
--#define __rsnd_mod_call(mod, func, rdai) \
-+#define __rsnd_mod_call(mod, func, rdai...) \
- ({ \
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod); \
- struct device *dev = rsnd_priv_to_dev(priv); \
-@@ -346,12 +346,12 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod)
- (mod)->ops->func(mod, rdai); \
- })
-
--#define rsnd_mod_call(mod, func, rdai) \
-+#define rsnd_mod_call(mod, func, rdai...) \
- (!(mod) ? -ENODEV : \
- !((mod)->ops->func) ? 0 : \
-- __rsnd_mod_call(mod, func, (rdai)))
-+ __rsnd_mod_call(mod, func, rdai))
-
--#define rsnd_dai_call(rdai, io, fn) \
-+#define rsnd_dai_call(fn, io, rdai...) \
- ({ \
- struct rsnd_mod *mod; \
- int ret = 0, i; \
-@@ -359,7 +359,7 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod)
- mod = (io)->mod[i]; \
- if (!mod) \
- continue; \
-- ret = rsnd_mod_call(mod, fn, (rdai)); \
-+ ret = rsnd_mod_call(mod, fn, rdai); \
- if (ret < 0) \
- break; \
- } \
-@@ -509,20 +509,20 @@ static int rsnd_soc_dai_trigger(struct s
- if (ret < 0)
- goto dai_trigger_end;
-
-- ret = rsnd_dai_call(rdai, io, init);
-+ ret = rsnd_dai_call(init, io, rdai);
- if (ret < 0)
- goto dai_trigger_end;
-
-- ret = rsnd_dai_call(rdai, io, start);
-+ ret = rsnd_dai_call(start, io, rdai);
- if (ret < 0)
- goto dai_trigger_end;
- break;
- case SNDRV_PCM_TRIGGER_STOP:
-- ret = rsnd_dai_call(rdai, io, stop);
-+ ret = rsnd_dai_call(stop, io, rdai);
- if (ret < 0)
- goto dai_trigger_end;
-
-- ret = rsnd_dai_call(rdai, io, quit);
-+ ret = rsnd_dai_call(quit, io, rdai);
- if (ret < 0)
- goto dai_trigger_end;
-
-@@ -949,11 +949,11 @@ static int rsnd_probe(struct platform_de
- }
-
- for_each_rsnd_dai(rdai, priv, i) {
-- ret = rsnd_dai_call(rdai, &rdai->playback, probe);
-+ ret = rsnd_dai_call(probe, &rdai->playback, rdai);
- if (ret)
- return ret;
-
-- ret = rsnd_dai_call(rdai, &rdai->capture, probe);
-+ ret = rsnd_dai_call(probe, &rdai->capture, rdai);
- if (ret)
- return ret;
- }
-@@ -996,11 +996,11 @@ static int rsnd_remove(struct platform_d
- pm_runtime_disable(&pdev->dev);
-
- for_each_rsnd_dai(rdai, priv, i) {
-- ret = rsnd_dai_call(rdai, &rdai->playback, remove);
-+ ret = rsnd_dai_call(remove, &rdai->playback, rdai);
- if (ret)
- return ret;
-
-- ret = rsnd_dai_call(rdai, &rdai->capture, remove);
-+ ret = rsnd_dai_call(remove, &rdai->capture, rdai);
- if (ret)
- return ret;
- }
diff --git a/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch b/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch
deleted file mode 100644
index de9af5eaf72b5..0000000000000
--- a/patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch
+++ /dev/null
@@ -1,561 +0,0 @@
-From 46c96710342f4fef77b84a22c0c16816b0ab5a5e Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 8 May 2014 17:44:49 -0700
-Subject: ASoC: rsnd: add DVC support
-
-This patch adds DVC (Digital Volume Controller)
-support which is member of CMD unit.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/sound/rcar_snd.h | 10 +
- sound/soc/sh/rcar/Makefile | 2
- sound/soc/sh/rcar/adg.c | 18 ++
- sound/soc/sh/rcar/core.c | 20 +++
- sound/soc/sh/rcar/dvc.c | 273 +++++++++++++++++++++++++++++++++++++++++++++
- sound/soc/sh/rcar/gen.c | 11 +
- sound/soc/sh/rcar/rsnd.h | 40 ++++++
- sound/soc/sh/rcar/src.c | 4
- 8 files changed, 376 insertions(+), 2 deletions(-)
- create mode 100644 sound/soc/sh/rcar/dvc.c
-
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -56,9 +56,17 @@ struct rsnd_src_platform_info {
- int dma_id; /* for Gen2 SCU */
- };
-
-+/*
-+ * flags
-+ */
-+struct rsnd_dvc_platform_info {
-+ u32 flags;
-+};
-+
- struct rsnd_dai_path_info {
- struct rsnd_ssi_platform_info *ssi;
- struct rsnd_src_platform_info *src;
-+ struct rsnd_dvc_platform_info *dvc;
- };
-
- struct rsnd_dai_platform_info {
-@@ -83,6 +91,8 @@ struct rcar_snd_info {
- int ssi_info_nr;
- struct rsnd_src_platform_info *src_info;
- int src_info_nr;
-+ struct rsnd_dvc_platform_info *dvc_info;
-+ int dvc_info_nr;
- struct rsnd_dai_platform_info *dai_info;
- int dai_info_nr;
- int (*start)(int id);
---- a/sound/soc/sh/rcar/Makefile
-+++ b/sound/soc/sh/rcar/Makefile
-@@ -1,2 +1,2 @@
--snd-soc-rcar-objs := core.o gen.o src.o adg.o ssi.o
-+snd-soc-rcar-objs := core.o gen.o src.o adg.o ssi.o dvc.o
- obj-$(CONFIG_SND_SOC_RCAR) += snd-soc-rcar.o
-\ No newline at end of file
---- a/sound/soc/sh/rcar/adg.c
-+++ b/sound/soc/sh/rcar/adg.c
-@@ -57,6 +57,24 @@ static u32 rsnd_adg_ssi_ws_timing_gen2(s
- return (0x6 + ws) << 8;
- }
-
-+int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_dai *rdai,
-+ struct rsnd_mod *mod,
-+ struct rsnd_dai_stream *io)
-+{
-+ int id = rsnd_mod_id(mod);
-+ int shift = (id % 2) ? 16 : 0;
-+ u32 mask, val;
-+
-+ val = rsnd_adg_ssi_ws_timing_gen2(io);
-+
-+ val = val << shift;
-+ mask = 0xffff << shift;
-+
-+ rsnd_mod_bset(mod, CMDOUT_TIMSEL, mask, val);
-+
-+ return 0;
-+}
-+
- static int rsnd_adg_set_src_timsel_gen2(struct rsnd_dai *rdai,
- struct rsnd_mod *mod,
- struct rsnd_dai_stream *io,
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -644,6 +644,11 @@ static int rsnd_path_init(struct rsnd_pr
- if (ret < 0)
- return ret;
-
-+ /* DVC */
-+ ret = rsnd_path_parse(priv, io, dvc);
-+ if (ret < 0)
-+ return ret;
-+
- return ret;
- }
-
-@@ -867,6 +872,20 @@ static struct snd_pcm_ops rsnd_pcm_ops =
-
- static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd)
- {
-+ struct rsnd_priv *priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
-+ struct rsnd_dai *rdai;
-+ int i, ret;
-+
-+ for_each_rsnd_dai(rdai, priv, i) {
-+ ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd);
-+ if (ret)
-+ return ret;
-+
-+ ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd);
-+ if (ret)
-+ return ret;
-+ }
-+
- return snd_pcm_lib_preallocate_pages_for_all(
- rtd->pcm,
- SNDRV_DMA_TYPE_DEV,
-@@ -906,6 +925,7 @@ static int rsnd_probe(struct platform_de
- rsnd_gen_probe,
- rsnd_ssi_probe,
- rsnd_src_probe,
-+ rsnd_dvc_probe,
- rsnd_adg_probe,
- rsnd_dai_probe,
- };
---- /dev/null
-+++ b/sound/soc/sh/rcar/dvc.c
-@@ -0,0 +1,273 @@
-+/*
-+ * Renesas R-Car DVC support
-+ *
-+ * Copyright (C) 2014 Renesas Solutions Corp.
-+ * Kuninori Morimoto <kuninori.morimoto.gx@renesas.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 "rsnd.h"
-+
-+#define RSND_DVC_NAME_SIZE 16
-+#define RSND_DVC_VOLUME_MAX 100
-+#define RSND_DVC_VOLUME_NUM 2
-+struct rsnd_dvc {
-+ struct rsnd_dvc_platform_info *info; /* rcar_snd.h */
-+ struct rsnd_mod mod;
-+ struct clk *clk;
-+ long volume[RSND_DVC_VOLUME_NUM];
-+};
-+
-+#define rsnd_mod_to_dvc(_mod) \
-+ container_of((_mod), struct rsnd_dvc, mod)
-+
-+#define for_each_rsnd_dvc(pos, priv, i) \
-+ for ((i) = 0; \
-+ ((i) < rsnd_dvc_nr(priv)) && \
-+ ((pos) = (struct rsnd_dvc *)(priv)->dvc + i); \
-+ i++)
-+
-+static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
-+{
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ u32 max = (0x00800000 - 1);
-+ u32 vol[RSND_DVC_VOLUME_NUM];
-+ int i;
-+
-+ for (i = 0; i < RSND_DVC_VOLUME_NUM; i++)
-+ vol[i] = max / RSND_DVC_VOLUME_MAX * dvc->volume[i];
-+
-+ rsnd_mod_write(mod, DVC_VOL0R, vol[0]);
-+ rsnd_mod_write(mod, DVC_VOL1R, vol[1]);
-+}
-+
-+static int rsnd_dvc_init(struct rsnd_mod *dvc_mod,
-+ struct rsnd_dai *rdai)
-+{
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(dvc_mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(dvc_mod);
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(dvc_mod);
-+ struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ int dvc_id = rsnd_mod_id(dvc_mod);
-+ int src_id = rsnd_mod_id(src_mod);
-+ u32 route[] = {
-+ [0] = 0x30000,
-+ [1] = 0x30001,
-+ [2] = 0x40000,
-+ [3] = 0x10000,
-+ [4] = 0x20000,
-+ [5] = 0x40100
-+ };
-+
-+ if (src_id >= ARRAY_SIZE(route)) {
-+ dev_err(dev, "DVC%d isn't connected to SRC%d\n", dvc_id, src_id);
-+ return -EINVAL;
-+ }
-+
-+ clk_prepare_enable(dvc->clk);
-+
-+ /*
-+ * fixme
-+ * it doesn't support CTU/MIX
-+ */
-+ rsnd_mod_write(dvc_mod, CMD_ROUTE_SLCT, route[src_id]);
-+
-+ rsnd_mod_write(dvc_mod, DVC_SWRSR, 0);
-+ rsnd_mod_write(dvc_mod, DVC_SWRSR, 1);
-+
-+ rsnd_mod_write(dvc_mod, DVC_DVUIR, 1);
-+
-+ rsnd_mod_write(dvc_mod, DVC_ADINR, rsnd_get_adinr(dvc_mod));
-+
-+ /* enable Volume */
-+ rsnd_mod_write(dvc_mod, DVC_DVUCR, 0x100);
-+
-+ /* ch0/ch1 Volume */
-+ rsnd_dvc_volume_update(dvc_mod);
-+
-+ rsnd_mod_write(dvc_mod, DVC_DVUIR, 0);
-+
-+ rsnd_mod_write(dvc_mod, DVC_DVUER, 1);
-+
-+ rsnd_adg_set_cmd_timsel_gen2(rdai, dvc_mod, io);
-+
-+ return 0;
-+}
-+
-+static int rsnd_dvc_quit(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai)
-+{
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+
-+ clk_disable_unprepare(dvc->clk);
-+
-+ return 0;
-+}
-+
-+static int rsnd_dvc_start(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai)
-+{
-+ rsnd_mod_write(mod, CMD_CTRL, 0x10);
-+
-+ return 0;
-+}
-+
-+static int rsnd_dvc_stop(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai)
-+{
-+ rsnd_mod_write(mod, CMD_CTRL, 0);
-+
-+ return 0;
-+}
-+
-+static int rsnd_dvc_volume_info(struct snd_kcontrol *kctrl,
-+ struct snd_ctl_elem_info *uinfo)
-+{
-+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
-+ uinfo->count = RSND_DVC_VOLUME_NUM;
-+ uinfo->value.integer.min = 0;
-+ uinfo->value.integer.max = RSND_DVC_VOLUME_MAX;
-+
-+ return 0;
-+}
-+
-+static int rsnd_dvc_volume_get(struct snd_kcontrol *kctrl,
-+ struct snd_ctl_elem_value *ucontrol)
-+{
-+ struct rsnd_mod *mod = snd_kcontrol_chip(kctrl);
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ int i;
-+
-+ for (i = 0; i < RSND_DVC_VOLUME_NUM; i++)
-+ ucontrol->value.integer.value[i] = dvc->volume[i];
-+
-+ return 0;
-+}
-+
-+static int rsnd_dvc_volume_put(struct snd_kcontrol *kctrl,
-+ struct snd_ctl_elem_value *ucontrol)
-+{
-+ struct rsnd_mod *mod = snd_kcontrol_chip(kctrl);
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ int i, change = 0;
-+
-+ for (i = 0; i < RSND_DVC_VOLUME_NUM; i++) {
-+ if (ucontrol->value.integer.value[i] < 0 ||
-+ ucontrol->value.integer.value[i] > RSND_DVC_VOLUME_MAX)
-+ return -EINVAL;
-+
-+ change |= (ucontrol->value.integer.value[i] != dvc->volume[i]);
-+ }
-+
-+ if (change) {
-+ for (i = 0; i < RSND_DVC_VOLUME_NUM; i++)
-+ dvc->volume[i] = ucontrol->value.integer.value[i];
-+
-+ rsnd_dvc_volume_update(mod);
-+ }
-+
-+ return change;
-+}
-+
-+static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct snd_soc_pcm_runtime *rtd)
-+{
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ struct snd_card *card = rtd->card->snd_card;
-+ struct snd_kcontrol *kctrl;
-+ static struct snd_kcontrol_new knew = {
-+ .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-+ .name = "Playback Volume",
-+ .info = rsnd_dvc_volume_info,
-+ .get = rsnd_dvc_volume_get,
-+ .put = rsnd_dvc_volume_put,
-+ };
-+ int ret;
-+
-+ if (!rsnd_dai_is_play(rdai, io)) {
-+ dev_err(dev, "DVC%d is connected to Capture DAI\n",
-+ rsnd_mod_id(mod));
-+ return -EINVAL;
-+ }
-+
-+ kctrl = snd_ctl_new1(&knew, mod);
-+ if (!kctrl)
-+ return -ENOMEM;
-+
-+ ret = snd_ctl_add(card, kctrl);
-+ if (ret < 0)
-+ return ret;
-+
-+ return 0;
-+}
-+
-+static struct rsnd_mod_ops rsnd_dvc_ops = {
-+ .name = "dvc (gen2)",
-+ .init = rsnd_dvc_init,
-+ .quit = rsnd_dvc_quit,
-+ .start = rsnd_dvc_start,
-+ .stop = rsnd_dvc_stop,
-+ .pcm_new = rsnd_dvc_pcm_new,
-+};
-+
-+struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id)
-+{
-+ if (WARN_ON(id < 0 || id >= rsnd_dvc_nr(priv)))
-+ id = 0;
-+
-+ return &((struct rsnd_dvc *)(priv->dvc) + id)->mod;
-+}
-+
-+int rsnd_dvc_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv)
-+{
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ struct rsnd_dvc *dvc;
-+ struct clk *clk;
-+ char name[RSND_DVC_NAME_SIZE];
-+ int i, nr;
-+
-+ nr = info->dvc_info_nr;
-+ if (!nr)
-+ return 0;
-+
-+ /* This driver doesn't support Gen1 at this point */
-+ if (rsnd_is_gen1(priv)) {
-+ dev_warn(dev, "CMD is not supported on Gen1\n");
-+ return -EINVAL;
-+ }
-+
-+ dvc = devm_kzalloc(dev, sizeof(*dvc) * nr, GFP_KERNEL);
-+ if (!dvc) {
-+ dev_err(dev, "CMD allocate failed\n");
-+ return -ENOMEM;
-+ }
-+
-+ priv->dvc_nr = nr;
-+ priv->dvc = dvc;
-+
-+ for_each_rsnd_dvc(dvc, priv, i) {
-+ snprintf(name, RSND_DVC_NAME_SIZE, "dvc.%d", i);
-+
-+ clk = devm_clk_get(dev, name);
-+ if (IS_ERR(clk))
-+ return PTR_ERR(clk);
-+
-+ dvc->info = &info->dvc_info[i];
-+ dvc->clk = clk;
-+
-+ rsnd_mod_init(priv, &dvc->mod, &rsnd_dvc_ops, RSND_MOD_DVC, i);
-+
-+ dev_dbg(dev, "CMD%d probed\n", i);
-+ }
-+
-+ return 0;
-+}
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -181,6 +181,8 @@ static int rsnd_gen2_regmap_init(struct
- RSND_GEN2_M_REG(gen, SCU, SRC_BUSIF_MODE, 0x0, 0x20),
- RSND_GEN2_M_REG(gen, SCU, SRC_ROUTE_MODE0,0xc, 0x20),
- RSND_GEN2_M_REG(gen, SCU, SRC_CTRL, 0x10, 0x20),
-+ RSND_GEN2_M_REG(gen, SCU, CMD_ROUTE_SLCT, 0x18c, 0x20),
-+ RSND_GEN2_M_REG(gen, SCU, CMD_CTRL, 0x190, 0x20),
- RSND_GEN2_M_REG(gen, SCU, SRC_SWRSR, 0x200, 0x40),
- RSND_GEN2_M_REG(gen, SCU, SRC_SRCIR, 0x204, 0x40),
- RSND_GEN2_M_REG(gen, SCU, SRC_ADINR, 0x214, 0x40),
-@@ -189,6 +191,14 @@ static int rsnd_gen2_regmap_init(struct
- RSND_GEN2_M_REG(gen, SCU, SRC_SRCCR, 0x224, 0x40),
- RSND_GEN2_M_REG(gen, SCU, SRC_BSDSR, 0x22c, 0x40),
- RSND_GEN2_M_REG(gen, SCU, SRC_BSISR, 0x238, 0x40),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_SWRSR, 0xe00, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_DVUIR, 0xe04, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_ADINR, 0xe08, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_DVUCR, 0xe10, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_ZCMCR, 0xe14, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_VOL0R, 0xe28, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_VOL1R, 0xe2c, 0x100),
-+ RSND_GEN2_M_REG(gen, SCU, DVC_DVUER, 0xe48, 0x100),
-
- RSND_GEN2_S_REG(gen, ADG, BRRA, 0x00),
- RSND_GEN2_S_REG(gen, ADG, BRRB, 0x04),
-@@ -207,6 +217,7 @@ static int rsnd_gen2_regmap_init(struct
- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL2, 0x50),
- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL3, 0x54),
- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL4, 0x58),
-+ RSND_GEN2_S_REG(gen, ADG, CMDOUT_TIMSEL, 0x5c),
-
- RSND_GEN2_M_REG(gen, SSI, SSICR, 0x00, 0x40),
- RSND_GEN2_M_REG(gen, SSI, SSISR, 0x04, 0x40),
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -44,6 +44,15 @@ enum rsnd_reg {
- RSND_REG_SRC_IFSCR,
- RSND_REG_SRC_IFSVR,
- RSND_REG_SRC_SRCCR,
-+ RSND_REG_CMD_ROUTE_SLCT,
-+ RSND_REG_DVC_SWRSR,
-+ RSND_REG_DVC_DVUIR,
-+ RSND_REG_DVC_ADINR,
-+ RSND_REG_DVC_DVUCR,
-+ RSND_REG_DVC_ZCMCR,
-+ RSND_REG_DVC_VOL0R,
-+ RSND_REG_DVC_VOL1R,
-+ RSND_REG_DVC_DVUER,
-
- /* ADG */
- RSND_REG_BRRA,
-@@ -79,6 +88,8 @@ enum rsnd_reg {
- RSND_REG_SHARE17,
- RSND_REG_SHARE18,
- RSND_REG_SHARE19,
-+ RSND_REG_SHARE20,
-+ RSND_REG_SHARE21,
-
- RSND_REG_MAX,
- };
-@@ -114,6 +125,8 @@ enum rsnd_reg {
- #define RSND_REG_SRCOUT_TIMSEL3 RSND_REG_SHARE17
- #define RSND_REG_SRCOUT_TIMSEL4 RSND_REG_SHARE18
- #define RSND_REG_AUDIO_CLK_SEL2 RSND_REG_SHARE19
-+#define RSND_REG_CMD_CTRL RSND_REG_SHARE20
-+#define RSND_REG_CMDOUT_TIMSEL RSND_REG_SHARE21
-
- struct rsnd_of_data;
- struct rsnd_priv;
-@@ -166,6 +179,7 @@ void rsnd_dma_quit(struct rsnd_priv *pr
- enum rsnd_mod_type {
- RSND_MOD_SRC = 0,
- RSND_MOD_SSI,
-+ RSND_MOD_DVC,
- RSND_MOD_MAX,
- };
-
-@@ -183,6 +197,9 @@ struct rsnd_mod_ops {
- struct rsnd_dai *rdai);
- int (*stop)(struct rsnd_mod *mod,
- struct rsnd_dai *rdai);
-+ int (*pcm_new)(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct snd_soc_pcm_runtime *rtd);
- };
-
- struct rsnd_dai_stream;
-@@ -223,6 +240,7 @@ struct rsnd_dai_stream {
- };
- #define rsnd_io_to_mod_ssi(io) ((io)->mod[RSND_MOD_SSI])
- #define rsnd_io_to_mod_src(io) ((io)->mod[RSND_MOD_SRC])
-+#define rsnd_io_to_mod_dvc(io) ((io)->mod[RSND_MOD_DVC])
-
- struct rsnd_dai {
- char name[RSND_DAI_NAME_SIZE];
-@@ -286,6 +304,9 @@ int rsnd_adg_set_convert_clk_gen2(struct
- int rsnd_adg_set_convert_timing_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai,
- struct rsnd_dai_stream *io);
-+int rsnd_adg_set_cmd_timsel_gen2(struct rsnd_dai *rdai,
-+ struct rsnd_mod *mod,
-+ struct rsnd_dai_stream *io);
-
- /*
- * R-Car sound priv
-@@ -323,6 +344,12 @@ struct rsnd_priv {
- int ssi_nr;
-
- /*
-+ * below value will be filled on rsnd_dvc_probe()
-+ */
-+ void *dvc;
-+ int dvc_nr;
-+
-+ /*
- * below value will be filled on rsnd_dai_probe()
- */
- struct snd_soc_dai_driver *daidrv;
-@@ -374,4 +401,17 @@ int rsnd_ssi_probe(struct platform_devic
- struct rsnd_mod *rsnd_ssi_mod_get(struct rsnd_priv *priv, int id);
- int rsnd_ssi_is_pin_sharing(struct rsnd_mod *mod);
-
-+/*
-+ * R-Car DVC
-+ */
-+int rsnd_dvc_probe(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv);
-+void rsnd_dvc_remove(struct platform_device *pdev,
-+ struct rsnd_priv *priv);
-+struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id);
-+
-+#define rsnd_dvc_nr(priv) ((priv)->dvc_nr)
-+
-+
- #endif
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -536,12 +536,14 @@ static int rsnd_src_init_gen2(struct rsn
- static int rsnd_src_start_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-+ u32 val = rsnd_io_to_mod_dvc(io) ? 0x01 : 0x11;
-
- rsnd_dma_start(rsnd_mod_to_dma(&src->mod));
-
- rsnd_mod_write(mod, SSI_CTRL, 0x1);
-- rsnd_mod_write(mod, SRC_CTRL, 0x11);
-+ rsnd_mod_write(mod, SRC_CTRL, val);
-
- return rsnd_src_start(mod, rdai);
- }
diff --git a/patches.renesas/0686-ASoC-rsnd-Fix-warnings-due-to-improper-printk-format.patch b/patches.renesas/0686-ASoC-rsnd-Fix-warnings-due-to-improper-printk-format.patch
deleted file mode 100644
index 9f4e4611f4fba..0000000000000
--- a/patches.renesas/0686-ASoC-rsnd-Fix-warnings-due-to-improper-printk-format.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From eaf2e318aa4596c780a241bac4dff3bdc3d23353 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 13 May 2014 01:10:20 +0200
-Subject: ASoC: rsnd: Fix warnings due to improper printk formats
-
-Use the %pap printk specifier to print resource_size_t variables. This
-fixes warnings on platforms where resource_size_t has a different size
-than int.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit e6b0d896ab0597d37422cae3cef3e789431549eb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index a135d4c9d080..a1583b57bf8d 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -263,13 +263,13 @@ static int rsnd_gen2_probe(struct platform_device *pdev,
- return ret;
-
- dev_dbg(dev, "Gen2 device probed\n");
-- dev_dbg(dev, "SCU : %08x => %p\n", scu_res->start,
-+ dev_dbg(dev, "SCU : %pap => %p\n", &scu_res->start,
- gen->base[RSND_GEN2_SCU]);
-- dev_dbg(dev, "ADG : %08x => %p\n", adg_res->start,
-+ dev_dbg(dev, "ADG : %pap => %p\n", &adg_res->start,
- gen->base[RSND_GEN2_ADG]);
-- dev_dbg(dev, "SSIU : %08x => %p\n", ssiu_res->start,
-+ dev_dbg(dev, "SSIU : %pap => %p\n", &ssiu_res->start,
- gen->base[RSND_GEN2_SSIU]);
-- dev_dbg(dev, "SSI : %08x => %p\n", ssi_res->start,
-+ dev_dbg(dev, "SSI : %pap => %p\n", &ssi_res->start,
- gen->base[RSND_GEN2_SSI]);
-
- return 0;
-@@ -356,11 +356,11 @@ static int rsnd_gen1_probe(struct platform_device *pdev,
- return ret;
-
- dev_dbg(dev, "Gen1 device probed\n");
-- dev_dbg(dev, "SRU : %08x => %p\n", sru_res->start,
-+ dev_dbg(dev, "SRU : %pap => %p\n", &sru_res->start,
- gen->base[RSND_GEN1_SRU]);
-- dev_dbg(dev, "ADG : %08x => %p\n", adg_res->start,
-+ dev_dbg(dev, "ADG : %pap => %p\n", &adg_res->start,
- gen->base[RSND_GEN1_ADG]);
-- dev_dbg(dev, "SSI : %08x => %p\n", ssi_res->start,
-+ dev_dbg(dev, "SSI : %pap => %p\n", &ssi_res->start,
- gen->base[RSND_GEN1_SSI]);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0687-ASoC-rsnd-DT-node-clean-up-by-using-the-of_node_put.patch b/patches.renesas/0687-ASoC-rsnd-DT-node-clean-up-by-using-the-of_node_put.patch
deleted file mode 100644
index 9dd18c6839feb..0000000000000
--- a/patches.renesas/0687-ASoC-rsnd-DT-node-clean-up-by-using-the-of_node_put.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 990221a11227e160afdf238c910ae841e6c2a367 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 22 May 2014 23:24:59 -0700
-Subject: ASoC: rsnd: DT node clean up by using the of_node_put()
-
-Driver needs to call of_node_put() after of_get_chile_by_name()
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit f451e48d8e1cae07d55b4a5b558c008cd4dc9a73)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/src.c | 7 +++++--
- sound/soc/sh/rcar/ssi.c | 7 +++++--
- 2 files changed, 10 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index e3b078e7c3aa..df5d7f87c66d 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -598,18 +598,21 @@ static void rsnd_of_parse_src(struct platform_device *pdev,
-
- nr = of_get_child_count(src_node);
- if (!nr)
-- return;
-+ goto rsnd_of_parse_src_end;
-
- src_info = devm_kzalloc(dev,
- sizeof(struct rsnd_src_platform_info) * nr,
- GFP_KERNEL);
- if (!src_info) {
- dev_err(dev, "src info allocation error\n");
-- return;
-+ goto rsnd_of_parse_src_end;
- }
-
- info->src_info = src_info;
- info->src_info_nr = nr;
-+
-+rsnd_of_parse_src_end:
-+ of_node_put(src_node);
- }
-
- int rsnd_src_probe(struct platform_device *pdev,
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 36654bd4e428..97bc4707c624 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -554,14 +554,14 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
-
- nr = of_get_child_count(node);
- if (!nr)
-- return;
-+ goto rsnd_of_parse_ssi_end;
-
- ssi_info = devm_kzalloc(dev,
- sizeof(struct rsnd_ssi_platform_info) * nr,
- GFP_KERNEL);
- if (!ssi_info) {
- dev_err(dev, "ssi info allocation error\n");
-- return;
-+ goto rsnd_of_parse_ssi_end;
- }
-
- info->ssi_info = ssi_info;
-@@ -584,6 +584,9 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
- */
- ssi_info->pio_irq = irq_of_parse_and_map(np, 0);
- }
-+
-+rsnd_of_parse_ssi_end:
-+ of_node_put(node);
- }
-
- int rsnd_ssi_probe(struct platform_device *pdev,
---
-2.1.2
-
diff --git a/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch b/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch
deleted file mode 100644
index 221406ada4a34..0000000000000
--- a/patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 92e03fb9e8f73b2729d23c433924608148699f89 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 22 May 2014 23:25:30 -0700
-Subject: ASoC: rsnd: save platform_device instead of device
-
-DT DMA support needs struct platform_device pointer,
-and it can get struct device pointer from platform_device.
-Save platform_device instead of device.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 9f464f8e076e6fcc8d249e76d84f4fb99c1fecff)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 2 +-
- sound/soc/sh/rcar/rsnd.h | 5 +++--
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -955,7 +955,7 @@ static int rsnd_probe(struct platform_de
- return -ENODEV;
- }
-
-- priv->dev = dev;
-+ priv->pdev = pdev;
- priv->info = info;
- spin_lock_init(&priv->lock);
-
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -317,7 +317,7 @@ struct rsnd_of_data {
-
- struct rsnd_priv {
-
-- struct device *dev;
-+ struct platform_device *pdev;
- struct rcar_snd_info *info;
- spinlock_t lock;
-
-@@ -357,7 +357,8 @@ struct rsnd_priv {
- int rdai_nr;
- };
-
--#define rsnd_priv_to_dev(priv) ((priv)->dev)
-+#define rsnd_priv_to_pdev(priv) ((priv)->pdev)
-+#define rsnd_priv_to_dev(priv) (&(rsnd_priv_to_pdev(priv)->dev))
- #define rsnd_priv_to_info(priv) ((priv)->info)
- #define rsnd_lock(priv, flags) spin_lock_irqsave(&priv->lock, flags)
- #define rsnd_unlock(priv, flags) spin_unlock_irqrestore(&priv->lock, flags)
diff --git a/patches.renesas/0689-ASoC-rsnd-remove-rsnd_src_non_ops.patch b/patches.renesas/0689-ASoC-rsnd-remove-rsnd_src_non_ops.patch
deleted file mode 100644
index 8dd04260fce2c..0000000000000
--- a/patches.renesas/0689-ASoC-rsnd-remove-rsnd_src_non_ops.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 308cc1b1768f19c03c5422ff615c49ea1a7a20a0 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 22 May 2014 23:25:37 -0700
-Subject: ASoC: rsnd: remove rsnd_src_non_ops
-
-Renesas sound driver is supporting Gen1/Gen2.
-SRC probe can return error if it was unknown
-generation.
-Now, rsnd_src_non_ops is not needed.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 033e7ed85b8513db4efacbdf0f22db2bed4ff405)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/src.c | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index df5d7f87c66d..89d24eea3948 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -268,10 +268,6 @@ static int rsnd_src_stop(struct rsnd_mod *mod,
- return 0;
- }
-
--static struct rsnd_mod_ops rsnd_src_non_ops = {
-- .name = "src (non)",
--};
--
- /*
- * Gen1 functions
- */
-@@ -627,6 +623,16 @@ int rsnd_src_probe(struct platform_device *pdev,
- char name[RSND_SRC_NAME_SIZE];
- int i, nr;
-
-+ ops = NULL;
-+ if (rsnd_is_gen1(priv))
-+ ops = &rsnd_src_gen1_ops;
-+ if (rsnd_is_gen2(priv))
-+ ops = &rsnd_src_gen2_ops;
-+ if (!ops) {
-+ dev_err(dev, "unknown Generation\n");
-+ return -EIO;
-+ }
-+
- rsnd_of_parse_src(pdev, of_data, priv);
-
- /*
-@@ -655,12 +661,6 @@ int rsnd_src_probe(struct platform_device *pdev,
- src->info = &info->src_info[i];
- src->clk = clk;
-
-- ops = &rsnd_src_non_ops;
-- if (rsnd_is_gen1(priv))
-- ops = &rsnd_src_gen1_ops;
-- if (rsnd_is_gen2(priv))
-- ops = &rsnd_src_gen2_ops;
--
- rsnd_mod_init(priv, &src->mod, ops, RSND_MOD_SRC, i);
-
- dev_dbg(dev, "SRC%d probed\n", i);
---
-2.1.2
-
diff --git a/patches.renesas/0690-ASoC-rsnd-module-name-is-unified.patch b/patches.renesas/0690-ASoC-rsnd-module-name-is-unified.patch
deleted file mode 100644
index 548e954a118e4..0000000000000
--- a/patches.renesas/0690-ASoC-rsnd-module-name-is-unified.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 3ea6a94d129dc0b1ffe7a95490a94af1785a7bfb Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 22 May 2014 23:25:43 -0700
-Subject: ASoC: rsnd: module name is unified
-
-Renesas sound driver uses many modules (= SSI/SRC/DVC),
-and each module had own name.
-But, each module name can be used as several purpose,
-like clock name, DMA name etc...
-This patch uses common name for each module.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 8aefda5046f417c551e3acdeb2cf37949a4b75e9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/dvc.c | 20 ++++++++++++++++++--
- sound/soc/sh/rcar/src.c | 23 ++++++++++++++++++++---
- sound/soc/sh/rcar/ssi.c | 15 +++++++++++----
- 3 files changed, 49 insertions(+), 9 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
-index 74769b1be005..ed0007006899 100644
---- a/sound/soc/sh/rcar/dvc.c
-+++ b/sound/soc/sh/rcar/dvc.c
-@@ -13,6 +13,9 @@
- #define RSND_DVC_NAME_SIZE 16
- #define RSND_DVC_VOLUME_MAX 100
- #define RSND_DVC_VOLUME_NUM 2
-+
-+#define DVC_NAME "dvc"
-+
- struct rsnd_dvc {
- struct rsnd_dvc_platform_info *info; /* rcar_snd.h */
- struct rsnd_mod mod;
-@@ -43,6 +46,17 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
- rsnd_mod_write(mod, DVC_VOL1R, vol[1]);
- }
-
-+static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+
-+ dev_dbg(dev, "%s (Gen2) is probed\n", rsnd_mod_name(mod));
-+
-+ return 0;
-+}
-+
- static int rsnd_dvc_init(struct rsnd_mod *dvc_mod,
- struct rsnd_dai *rdai)
- {
-@@ -208,7 +222,8 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
- }
-
- static struct rsnd_mod_ops rsnd_dvc_ops = {
-- .name = "dvc (gen2)",
-+ .name = DVC_NAME,
-+ .probe = rsnd_dvc_probe_gen2,
- .init = rsnd_dvc_init,
- .quit = rsnd_dvc_quit,
- .start = rsnd_dvc_start,
-@@ -255,7 +270,8 @@ int rsnd_dvc_probe(struct platform_device *pdev,
- priv->dvc = dvc;
-
- for_each_rsnd_dvc(dvc, priv, i) {
-- snprintf(name, RSND_DVC_NAME_SIZE, "dvc.%d", i);
-+ snprintf(name, RSND_DVC_NAME_SIZE, "%s.%d",
-+ DVC_NAME, i);
-
- clk = devm_clk_get(dev, name);
- if (IS_ERR(clk))
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 89d24eea3948..200eda019bc7 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -10,6 +10,8 @@
- */
- #include "rsnd.h"
-
-+#define SRC_NAME "src"
-+
- struct rsnd_src {
- struct rsnd_src_platform_info *info; /* rcar_snd.h */
- struct rsnd_mod mod;
-@@ -389,6 +391,17 @@ static int rsnd_src_set_convert_rate_gen1(struct rsnd_mod *mod,
- return 0;
- }
-
-+static int rsnd_src_probe_gen1(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai)
-+{
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+
-+ dev_dbg(dev, "%s (Gen1) is probed\n", rsnd_mod_name(mod));
-+
-+ return 0;
-+}
-+
- static int rsnd_src_init_gen1(struct rsnd_mod *mod,
- struct rsnd_dai *rdai)
- {
-@@ -434,7 +447,8 @@ static int rsnd_src_stop_gen1(struct rsnd_mod *mod,
- }
-
- static struct rsnd_mod_ops rsnd_src_gen1_ops = {
-- .name = "sru (gen1)",
-+ .name = SRC_NAME,
-+ .probe = rsnd_src_probe_gen1,
- .init = rsnd_src_init_gen1,
- .quit = rsnd_src_quit,
- .start = rsnd_src_start_gen1,
-@@ -498,6 +512,8 @@ static int rsnd_src_probe_gen2(struct rsnd_mod *mod,
- if (ret < 0)
- dev_err(dev, "SRC DMA failed\n");
-
-+ dev_dbg(dev, "%s (Gen2) is probed\n", rsnd_mod_name(mod));
-+
- return ret;
- }
-
-@@ -558,7 +574,7 @@ static int rsnd_src_stop_gen2(struct rsnd_mod *mod,
- }
-
- static struct rsnd_mod_ops rsnd_src_gen2_ops = {
-- .name = "src (gen2)",
-+ .name = SRC_NAME,
- .probe = rsnd_src_probe_gen2,
- .remove = rsnd_src_remove_gen2,
- .init = rsnd_src_init_gen2,
-@@ -652,7 +668,8 @@ int rsnd_src_probe(struct platform_device *pdev,
- priv->src = src;
-
- for_each_rsnd_src(src, priv, i) {
-- snprintf(name, RSND_SRC_NAME_SIZE, "src.%d", i);
-+ snprintf(name, RSND_SRC_NAME_SIZE, "%s.%d",
-+ SRC_NAME, i);
-
- clk = devm_clk_get(dev, name);
- if (IS_ERR(clk))
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 97bc4707c624..b821ec6683d2 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -57,6 +57,8 @@
- */
- #define CONT (1 << 8) /* WS Continue Function */
-
-+#define SSI_NAME "ssi"
-+
- struct rsnd_ssi {
- struct clk *clk;
- struct rsnd_ssi_platform_info *info; /* rcar_snd.h */
-@@ -373,6 +375,8 @@ static int rsnd_ssi_pio_probe(struct rsnd_mod *mod,
- if (ret)
- dev_err(dev, "SSI request interrupt failed\n");
-
-+ dev_dbg(dev, "%s (PIO) is probed\n", rsnd_mod_name(mod));
-+
- return ret;
- }
-
-@@ -405,7 +409,7 @@ static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
- }
-
- static struct rsnd_mod_ops rsnd_ssi_pio_ops = {
-- .name = "ssi (pio)",
-+ .name = SSI_NAME,
- .probe = rsnd_ssi_pio_probe,
- .init = rsnd_ssi_init,
- .quit = rsnd_ssi_quit,
-@@ -430,6 +434,8 @@ static int rsnd_ssi_dma_probe(struct rsnd_mod *mod,
- if (ret < 0)
- dev_err(dev, "SSI DMA failed\n");
-
-+ dev_dbg(dev, "%s (DMA) is probed\n", rsnd_mod_name(mod));
-+
- return ret;
- }
-
-@@ -480,7 +486,7 @@ static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
- }
-
- static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
-- .name = "ssi (dma)",
-+ .name = SSI_NAME,
- .probe = rsnd_ssi_dma_probe,
- .remove = rsnd_ssi_dma_remove,
- .init = rsnd_ssi_init,
-@@ -493,7 +499,7 @@ static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
- * Non SSI
- */
- static struct rsnd_mod_ops rsnd_ssi_non_ops = {
-- .name = "ssi (non)",
-+ .name = SSI_NAME,
- };
-
- /*
-@@ -620,7 +626,8 @@ int rsnd_ssi_probe(struct platform_device *pdev,
- for_each_rsnd_ssi(ssi, priv, i) {
- pinfo = &info->ssi_info[i];
-
-- snprintf(name, RSND_SSI_NAME_SIZE, "ssi.%d", i);
-+ snprintf(name, RSND_SSI_NAME_SIZE, "%s.%d",
-+ SSI_NAME, i);
-
- clk = devm_clk_get(dev, name);
- if (IS_ERR(clk))
---
-2.1.2
-
diff --git a/patches.renesas/0691-ASoC-rsnd-care-DMA-slave-channel-name-for-DT.patch b/patches.renesas/0691-ASoC-rsnd-care-DMA-slave-channel-name-for-DT.patch
deleted file mode 100644
index 932923613d5be..0000000000000
--- a/patches.renesas/0691-ASoC-rsnd-care-DMA-slave-channel-name-for-DT.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From eef4df7bd7dcef66994207b7dd1f1a0f2b14a412 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 22 May 2014 23:25:49 -0700
-Subject: ASoC: rsnd: care DMA slave channel name for DT
-
-Renesas sound driver is supporting to use DMAEngine.
-But, DMA slave channel name "tx", "rx" is not enough
-in DT case.
-Becuase, it has many ports and path combination.
-
-This patch adds rsnd_dma_of_name() to find
-DMA channel name, for example
-memory to SSI0 is "mem_ssi0",
-SSI0 to memory is "ssi0_mem",
-SSI0 to SRC0 is "ssi0_src0",
-SRC0 to SSI0 is "src0_ssi0",
-SRC0 to DVC0 is "src0_dvc0"...
-
-Renesas sound want to use PIO transfer mode for some reasons.
-It will be PIO tranfer mode if device node doesn't have
-DMA settings.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 199e7688bdf7d188d70c3432c96ec13d8a14b341)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/renesas,rsnd.txt | 1 +
- sound/soc/sh/rcar/core.c | 80 +++++++++++++++++++++-
- sound/soc/sh/rcar/ssi.c | 6 ++
- 3 files changed, 86 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-index a44e9179faf5..8346cab046cd 100644
---- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-@@ -20,6 +20,7 @@ Required properties:
- SSI subnode properties:
- - interrupts : Should contain SSI interrupt for PIO transfer
- - shared-pin : if shared clock pin
-+- pio-transfer : use PIO transfer mode
-
- SRC subnode properties:
- no properties at this point
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 7bb9a2e69ad4..19f44640e1a8 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -255,11 +255,81 @@ int rsnd_dma_available(struct rsnd_dma *dma)
- return !!dma->chan;
- }
-
-+#define DMA_NAME_SIZE 16
-+#define MOD_MAX 4 /* MEM/SSI/SRC/DVC */
-+static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod)
-+{
-+ if (mod)
-+ return snprintf(dma_name, DMA_NAME_SIZE / 2, "%s%d",
-+ rsnd_mod_name(mod), rsnd_mod_id(mod));
-+ else
-+ return snprintf(dma_name, DMA_NAME_SIZE / 2, "mem");
-+
-+}
-+
-+static void rsnd_dma_of_name(struct rsnd_dma *dma,
-+ int is_play, char *dma_name)
-+{
-+ struct rsnd_mod *this = rsnd_dma_to_mod(dma);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(this);
-+ struct rsnd_mod *ssi = rsnd_io_to_mod_ssi(io);
-+ struct rsnd_mod *src = rsnd_io_to_mod_src(io);
-+ struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
-+ struct rsnd_mod *mod[MOD_MAX];
-+ struct rsnd_mod *src_mod, *dst_mod;
-+ int i, index;
-+
-+
-+ for (i = 0; i < MOD_MAX; i++)
-+ mod[i] = NULL;
-+
-+ /*
-+ * in play case...
-+ *
-+ * src -> dst
-+ *
-+ * mem -> SSI
-+ * mem -> SRC -> SSI
-+ * mem -> SRC -> DVC -> SSI
-+ */
-+ mod[0] = NULL; /* for "mem" */
-+ index = 1;
-+ for (i = 1; i < MOD_MAX; i++) {
-+ if (!src) {
-+ mod[i] = ssi;
-+ break;
-+ } else if (!dvc) {
-+ mod[i] = src;
-+ src = NULL;
-+ } else {
-+ mod[i] = dvc;
-+ dvc = NULL;
-+ }
-+
-+ if (mod[i] == this)
-+ index = i;
-+ }
-+
-+ if (is_play) {
-+ src_mod = mod[index - 1];
-+ dst_mod = mod[index];
-+ } else {
-+ src_mod = mod[index];
-+ dst_mod = mod[index + 1];
-+ }
-+
-+ index = 0;
-+ index = _rsnd_dma_of_name(dma_name + index, src_mod);
-+ *(dma_name + index++) = '_';
-+ index = _rsnd_dma_of_name(dma_name + index, dst_mod);
-+}
-+
- int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- int is_play, int id)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_slave_config cfg;
-+ char dma_name[DMA_NAME_SIZE];
- dma_cap_mask_t mask;
- int ret;
-
-@@ -271,9 +341,17 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- dma_cap_zero(mask);
- dma_cap_set(DMA_SLAVE, mask);
-
-+ if (dev->of_node)
-+ rsnd_dma_of_name(dma, is_play, dma_name);
-+ else
-+ snprintf(dma_name, DMA_NAME_SIZE,
-+ is_play ? "tx" : "rx");
-+
-+ dev_dbg(dev, "dma name : %s\n", dma_name);
-+
- dma->chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
- (void *)id, dev,
-- is_play ? "tx" : "rx");
-+ dma_name);
- if (!dma->chan) {
- dev_err(dev, "can't get dma channel\n");
- return -EIO;
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index b821ec6683d2..2df723df5d19 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -589,6 +589,12 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
- * irq
- */
- ssi_info->pio_irq = irq_of_parse_and_map(np, 0);
-+
-+ /*
-+ * DMA
-+ */
-+ ssi_info->dma_id = of_get_property(np, "pio-transfer", NULL) ?
-+ 0 : 1;
- }
-
- rsnd_of_parse_ssi_end:
---
-2.1.2
-
diff --git a/patches.renesas/0692-ASoC-rsnd-add-rsnd_gen_dma_addr-for-DMAC-addr.patch b/patches.renesas/0692-ASoC-rsnd-add-rsnd_gen_dma_addr-for-DMAC-addr.patch
deleted file mode 100644
index c90c9555be801..0000000000000
--- a/patches.renesas/0692-ASoC-rsnd-add-rsnd_gen_dma_addr-for-DMAC-addr.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 6185440d23f6d10c1d5bd2a26f157ca11b647cda Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 22 May 2014 23:25:54 -0700
-Subject: ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr
-
-The DMAC src/dst addr needs to be set from driver when DT case.
-(It was set from SoC/DMAEngine code when non-DT case)
-This patch adds rsnd_gen_dma_addr() to set DMAC src/dst addr.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ad32d0c7b0e993433df152ae747652647eb65a27)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 5 +--
- sound/soc/sh/rcar/gen.c | 95 ++++++++++++++++++++++++++++++++++++++++++++++++
- sound/soc/sh/rcar/rsnd.h | 5 +++
- 3 files changed, 101 insertions(+), 4 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 19f44640e1a8..91880156e1ae 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -357,10 +357,7 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- return -EIO;
- }
-
-- cfg.slave_id = id;
-- cfg.dst_addr = 0; /* use default addr when playback */
-- cfg.src_addr = 0; /* use default addr when capture */
-- cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-+ rsnd_gen_dma_addr(priv, dma, &cfg, is_play, id);
-
- ret = dmaengine_slave_config(dma->chan, &cfg);
- if (ret < 0)
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index a1583b57bf8d..1dd2b7d38c2c 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -156,6 +156,101 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
- }
-
- /*
-+ * DMA read/write register offset
-+ *
-+ * RSND_xxx_I_N for Audio DMAC input
-+ * RSND_xxx_O_N for Audio DMAC output
-+ * RSND_xxx_I_P for Audio DMAC peri peri input
-+ * RSND_xxx_O_P for Audio DMAC peri peri output
-+ *
-+ * ex) R-Car H2 case
-+ * mod / DMAC in / DMAC out / DMAC PP in / DMAC pp out
-+ * SSI : 0xec541000 / 0xec241008 / 0xec24100c / 0xec400000 / 0xec400000
-+ * SCU : 0xec500000 / 0xec000000 / 0xec004000 / 0xec300000 / 0xec304000
-+ * CMD : 0xec500000 / 0xec008000 0xec308000
-+ */
-+#define RDMA_SSI_I_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0x8)
-+#define RDMA_SSI_O_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0xc)
-+
-+#define RDMA_SSI_I_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
-+#define RDMA_SSI_O_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
-+
-+#define RDMA_SRC_I_N(addr, i) (addr ##_reg - 0x00500000 + (0x400 * i))
-+#define RDMA_SRC_O_N(addr, i) (addr ##_reg - 0x004fc000 + (0x400 * i))
-+
-+#define RDMA_SRC_I_P(addr, i) (addr ##_reg - 0x00200000 + (0x400 * i))
-+#define RDMA_SRC_O_P(addr, i) (addr ##_reg - 0x001fc000 + (0x400 * i))
-+
-+#define RDMA_CMD_O_N(addr, i) (addr ##_reg - 0x004f8000 + (0x400 * i))
-+#define RDMA_CMD_O_P(addr, i) (addr ##_reg - 0x001f8000 + (0x400 * i))
-+
-+void rsnd_gen_dma_addr(struct rsnd_priv *priv,
-+ struct rsnd_dma *dma,
-+ struct dma_slave_config *cfg,
-+ int is_play, int slave_id)
-+{
-+ struct platform_device *pdev = rsnd_priv_to_pdev(priv);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ dma_addr_t ssi_reg = platform_get_resource(pdev,
-+ IORESOURCE_MEM, RSND_GEN2_SSI)->start;
-+ dma_addr_t src_reg = platform_get_resource(pdev,
-+ IORESOURCE_MEM, RSND_GEN2_SCU)->start;
-+ int is_ssi = !!(rsnd_io_to_mod_ssi(io) == mod);
-+ int use_src = !!rsnd_io_to_mod_src(io);
-+ int use_dvc = !!rsnd_io_to_mod_dvc(io);
-+ int id = rsnd_mod_id(mod);
-+ struct dma_addr {
-+ dma_addr_t src_addr;
-+ dma_addr_t dst_addr;
-+ } dma_addrs[2][2][3] = {
-+ { /* SRC */
-+ /* Capture */
-+ {{ 0, 0 },
-+ { RDMA_SRC_O_N(src, id), 0 },
-+ { RDMA_CMD_O_N(src, id), 0 }},
-+ /* Playback */
-+ {{ 0, 0, },
-+ { 0, RDMA_SRC_I_N(src, id) },
-+ { 0, RDMA_SRC_I_N(src, id) }}
-+ }, { /* SSI */
-+ /* Capture */
-+ {{ RDMA_SSI_O_N(ssi, id), 0 },
-+ { RDMA_SSI_O_P(ssi, id), RDMA_SRC_I_P(src, id) },
-+ { RDMA_SSI_O_P(ssi, id), RDMA_SRC_I_P(src, id) }},
-+ /* Playback */
-+ {{ 0, RDMA_SSI_I_N(ssi, id) },
-+ { RDMA_SRC_O_P(src, id), RDMA_SSI_I_P(ssi, id) },
-+ { RDMA_CMD_O_P(src, id), RDMA_SSI_I_P(ssi, id) }}
-+ }
-+ };
-+
-+ cfg->slave_id = slave_id;
-+ cfg->src_addr = 0;
-+ cfg->dst_addr = 0;
-+ cfg->direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-+
-+ /*
-+ * gen1 uses default DMA addr
-+ */
-+ if (rsnd_is_gen1(priv))
-+ return;
-+
-+ /* it shouldn't happen */
-+ if (use_dvc & !use_src) {
-+ dev_err(dev, "DVC is selected without SRC\n");
-+ return;
-+ }
-+
-+ cfg->src_addr = dma_addrs[is_ssi][is_play][use_src + use_dvc].src_addr;
-+ cfg->dst_addr = dma_addrs[is_ssi][is_play][use_src + use_dvc].dst_addr;
-+
-+ dev_dbg(dev, "dma%d addr - src : %x / dst : %x\n",
-+ id, cfg->src_addr, cfg->dst_addr);
-+}
-+
-+/*
- * Gen2
- */
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 344f9415e669..39d98af5ee05 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -281,6 +281,11 @@ int rsnd_gen_probe(struct platform_device *pdev,
- void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- enum rsnd_reg reg);
-+void rsnd_gen_dma_addr(struct rsnd_priv *priv,
-+ struct rsnd_dma *dma,
-+ struct dma_slave_config *cfg,
-+ int is_play, int slave_id);
-+
- #define rsnd_is_gen1(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN1)
- #define rsnd_is_gen2(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN2)
-
---
-2.1.2
-
diff --git a/patches.renesas/0693-ASoC-rsnd-fixup-index-of-src-dst-mod-when-capture.patch b/patches.renesas/0693-ASoC-rsnd-fixup-index-of-src-dst-mod-when-capture.patch
deleted file mode 100644
index 3fb679b00adcd..0000000000000
--- a/patches.renesas/0693-ASoC-rsnd-fixup-index-of-src-dst-mod-when-capture.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1b4f4d85fa2a5c943ef1b6ad607a13130a49f21d Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 10 Jun 2014 23:41:03 -0700
-Subject: ASoC: rsnd: fixup index of src/dst mod when capture
-
-Index of dma name should use -1, not +1 when capture case.
-Thank you Dan.
-
-Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 4cf612780cec81317a0278b28679a8b69ea8f09c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 91880156e1ae..4e86265f625c 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -315,7 +315,7 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
- dst_mod = mod[index];
- } else {
- src_mod = mod[index];
-- dst_mod = mod[index + 1];
-+ dst_mod = mod[index - 1];
- }
-
- index = 0;
---
-2.1.2
-
diff --git a/patches.renesas/0694-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch b/patches.renesas/0694-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch
deleted file mode 100644
index f10c7144a0f21..0000000000000
--- a/patches.renesas/0694-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 2c3dae4e793325fda02053478bbe527d2b43c1df Mon Sep 17 00:00:00 2001
-From: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Date: Thu, 15 May 2014 12:17:34 +0200
-Subject: Documentation: dt-bindings: update xhci-platform DT binding
-
-This commit extends the compatible string list of the xhci-platform
-binding with the new "armada-375-xhci" and "armada-380-xhci"
-compatible strings. It is used to describe the XHCI controller which
-is available in the Armada 375 and 38x SoCs.
-
-It also indicates that an optional 'clocks' property is now supported.
-
-Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
-Acked-by: Mathias Nyman <mathias.nyman@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 023bfe83e278dca17abc491f8e1182211edb0559)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/usb/usb-xhci.txt | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-index 90f8f607d125..999be5ca901c 100644
---- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
-+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-@@ -1,11 +1,16 @@
- USB xHCI controllers
-
- Required properties:
-- - compatible: should be "generic-xhci" (deprecated: "xhci-platform").
-+ - compatible: should be one of "generic-xhci",
-+ "marvell,armada-375-xhci", "marvell,armada-380-xhci" (deprecated:
-+ "xhci-platform").
- - reg: should contain address and length of the standard XHCI
- register set for the device.
- - interrupts: one XHCI interrupt should be described here.
-
-+Optional property:
-+ - clocks: reference to a clock
-+
- Example:
- usb@f0931000 {
- compatible = "generic-xhci";
---
-2.1.2
-
diff --git a/patches.renesas/0695-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch b/patches.renesas/0695-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch
deleted file mode 100644
index a8cab63ab3168..0000000000000
--- a/patches.renesas/0695-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 07910224660c07df5647e72c250cb4062f2840f1 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Wed, 28 May 2014 20:23:26 +0900
-Subject: Documentation: dt-bindings: update xhci-platform DT binding for R-Car
- H2 and M2
-
-This commit extends the compatible string list of the xhci-platform
-binding with the new "renesas,xhci-r8a7790" and "renesas,xhci-r8a7791"
-compatible strings. It is used to describe the xHCI controller which
-is available in the R-Car H2 and M2 SoCs.
-
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit c7c1ce8061c0dc5b848e5df0ba459dbbf78057d7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/usb/usb-xhci.txt | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-index 999be5ca901c..5a79377c6a96 100644
---- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
-+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-@@ -2,7 +2,8 @@ USB xHCI controllers
-
- Required properties:
- - compatible: should be one of "generic-xhci",
-- "marvell,armada-375-xhci", "marvell,armada-380-xhci" (deprecated:
-+ "marvell,armada-375-xhci", "marvell,armada-380-xhci",
-+ "renesas,xhci-r8a7790", "renesas,xhci-r8a7791" (deprecated:
- "xhci-platform").
- - reg: should contain address and length of the standard XHCI
- register set for the device.
---
-2.1.2
-
diff --git a/patches.renesas/0696-mmc-sh-mmcif-update-to-print-version-and-bus-clock-r.patch b/patches.renesas/0696-mmc-sh-mmcif-update-to-print-version-and-bus-clock-r.patch
deleted file mode 100644
index 8d323c81873eb..0000000000000
--- a/patches.renesas/0696-mmc-sh-mmcif-update-to-print-version-and-bus-clock-r.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From db71dc69e3a61256a46c16e519f12525af1bbfc3 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 4 Jun 2014 12:42:08 +0100
-Subject: mmc: sh-mmcif: update to print version and bus clock rate on probe
-
-Change the initial print to show chip version and the bus rate it is
-working at instead of the driver version. This is more useful information
-as we already know which driver version from the kernel it is in.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit ba09ab6ba9d2ec27cd68e8cf655ac163cd4d5f6a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index 656fbba4c422..dc9a28a29c18 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -1469,16 +1469,17 @@ static int sh_mmcif_probe(struct platform_device *pdev)
-
- mutex_init(&host->thread_lock);
-
-- clk_disable_unprepare(host->hclk);
- ret = mmc_add_host(mmc);
- if (ret < 0)
- goto emmcaddh;
-
- dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
-
-- dev_info(&pdev->dev, "driver version %s\n", DRIVER_VERSION);
-- dev_dbg(&pdev->dev, "chip ver H'%04x\n",
-- sh_mmcif_readl(host->addr, MMCIF_CE_VERSION) & 0x0000ffff);
-+ dev_info(&pdev->dev, "Chip version 0x%04x, clock rate %luMHz\n",
-+ sh_mmcif_readl(host->addr, MMCIF_CE_VERSION) & 0xffff,
-+ clk_get_rate(host->hclk) / 1000000UL);
-+
-+ clk_disable_unprepare(host->hclk);
- return ret;
-
- emmcaddh:
---
-2.1.2
-
diff --git a/patches.renesas/0697-mmc-sh-mmcif-use-devm_-for-ioremap.patch b/patches.renesas/0697-mmc-sh-mmcif-use-devm_-for-ioremap.patch
deleted file mode 100644
index 63bee1fa12c32..0000000000000
--- a/patches.renesas/0697-mmc-sh-mmcif-use-devm_-for-ioremap.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 0e550111e1308a62addba2f2708594f41ce3402c Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 4 Jun 2014 12:42:09 +0100
-Subject: mmc: sh-mmcif: use devm_ for ioremap
-
-Start tidying the probe/release code by using devm_ioremap_resource() to
-map the IO registers.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit 402de61c9ef9aff9990f6629cc7527827db331e0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 24 ++++++------------------
- 1 file changed, 6 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index dc9a28a29c18..e25821fe4e9e 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -1378,22 +1378,15 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- dev_err(&pdev->dev, "Get irq error\n");
- return -ENXIO;
- }
-+
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-- if (!res) {
-- dev_err(&pdev->dev, "platform_get_resource error.\n");
-- return -ENXIO;
-- }
-- reg = ioremap(res->start, resource_size(res));
-- if (!reg) {
-- dev_err(&pdev->dev, "ioremap error.\n");
-- return -ENOMEM;
-- }
-+ reg = devm_ioremap_resource(&pdev->dev, res);
-+ if (IS_ERR(reg))
-+ return PTR_ERR(reg);
-
- mmc = mmc_alloc_host(sizeof(struct sh_mmcif_host), &pdev->dev);
-- if (!mmc) {
-- ret = -ENOMEM;
-- goto ealloch;
-- }
-+ if (!mmc)
-+ return -ENOMEM;
-
- ret = mmc_of_parse(mmc);
- if (ret < 0)
-@@ -1498,8 +1491,6 @@ eclkget:
- pm_runtime_disable(&pdev->dev);
- eofparse:
- mmc_free_host(mmc);
--ealloch:
-- iounmap(reg);
- return ret;
- }
-
-@@ -1524,9 +1515,6 @@ static int sh_mmcif_remove(struct platform_device *pdev)
- */
- cancel_delayed_work_sync(&host->timeout_work);
-
-- if (host->addr)
-- iounmap(host->addr);
--
- irq[0] = platform_get_irq(pdev, 0);
- irq[1] = platform_get_irq(pdev, 1);
-
---
-2.1.2
-
diff --git a/patches.renesas/0698-mmc-sh-mmcif-use-devm_-for-clock-management.patch b/patches.renesas/0698-mmc-sh-mmcif-use-devm_-for-clock-management.patch
deleted file mode 100644
index 73cb2f3ff0946..0000000000000
--- a/patches.renesas/0698-mmc-sh-mmcif-use-devm_-for-clock-management.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From fa4cb2f5a0cea83433a1eca0b4a71c590ca31655 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 4 Jun 2014 12:42:10 +0100
-Subject: mmc: sh-mmcif: use devm_ for clock management
-
-Use the devm_clk_get() code to get the clock and allow it to be freed
-automatically on release.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit 5337a334e4f4f1e9384054e34e08ffab9be93c81)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 18 ++++++++----------
- 1 file changed, 8 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index e25821fe4e9e..ec9bda30da73 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -1390,7 +1390,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
-
- ret = mmc_of_parse(mmc);
- if (ret < 0)
-- goto eofparse;
-+ goto err_host;
-
- host = mmc_priv(mmc);
- host->mmc = mmc;
-@@ -1420,19 +1420,19 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- pm_runtime_enable(&pdev->dev);
- host->power = false;
-
-- host->hclk = clk_get(&pdev->dev, NULL);
-+ host->hclk = devm_clk_get(&pdev->dev, NULL);
- if (IS_ERR(host->hclk)) {
- ret = PTR_ERR(host->hclk);
- dev_err(&pdev->dev, "cannot get clock: %d\n", ret);
-- goto eclkget;
-+ goto err_pm;
- }
- ret = sh_mmcif_clk_update(host);
- if (ret < 0)
-- goto eclkupdate;
-+ goto err_pm;
-
- ret = pm_runtime_resume(&pdev->dev);
- if (ret < 0)
-- goto eresume;
-+ goto err_clk;
-
- INIT_DELAYED_WORK(&host->timeout_work, mmcif_timeout_work);
-
-@@ -1483,13 +1483,11 @@ ereqirq1:
- free_irq(irq[0], host);
- ereqirq0:
- pm_runtime_suspend(&pdev->dev);
--eresume:
-+err_clk:
- clk_disable_unprepare(host->hclk);
--eclkupdate:
-- clk_put(host->hclk);
--eclkget:
-+err_pm:
- pm_runtime_disable(&pdev->dev);
--eofparse:
-+err_host:
- mmc_free_host(mmc);
- return ret;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0699-mmc-sh-mmcif-use-devm_-for-irq-management.patch b/patches.renesas/0699-mmc-sh-mmcif-use-devm_-for-irq-management.patch
deleted file mode 100644
index 4a9a7d78b5ac3..0000000000000
--- a/patches.renesas/0699-mmc-sh-mmcif-use-devm_-for-irq-management.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 188fe79de024289c8b6c6a6a92302c313d0eed14 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 4 Jun 2014 12:42:11 +0100
-Subject: mmc: sh-mmcif: use devm_ for irq management
-
-Use devm_request_threaded_irq() for the host interrupt handlers so we
-do not have to worry about freeing them on exit or error. Tidies up the
-exit path code for the driver.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit 75bed8a19d15f94bf712bf610ad4e3425c035ebc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 26 ++++++++------------------
- 1 file changed, 8 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index ec9bda30da73..a0776cec070c 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -1440,17 +1440,19 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- sh_mmcif_writel(host->addr, MMCIF_CE_INT_MASK, MASK_ALL);
-
- name = irq[1] < 0 ? dev_name(&pdev->dev) : "sh_mmc:error";
-- ret = request_threaded_irq(irq[0], sh_mmcif_intr, sh_mmcif_irqt, 0, name, host);
-+ ret = devm_request_threaded_irq(&pdev->dev, irq[0], sh_mmcif_intr,
-+ sh_mmcif_irqt, 0, name, host);
- if (ret) {
- dev_err(&pdev->dev, "request_irq error (%s)\n", name);
-- goto ereqirq0;
-+ goto err_irq;
- }
- if (irq[1] >= 0) {
-- ret = request_threaded_irq(irq[1], sh_mmcif_intr, sh_mmcif_irqt,
-- 0, "sh_mmc:int", host);
-+ ret = devm_request_threaded_irq(&pdev->dev, irq[1],
-+ sh_mmcif_intr, sh_mmcif_irqt,
-+ 0, "sh_mmc:int", host);
- if (ret) {
- dev_err(&pdev->dev, "request_irq error (sh_mmc:int)\n");
-- goto ereqirq1;
-+ goto err_irq;
- }
- }
-
-@@ -1477,11 +1479,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
-
- emmcaddh:
- erqcd:
-- if (irq[1] >= 0)
-- free_irq(irq[1], host);
--ereqirq1:
-- free_irq(irq[0], host);
--ereqirq0:
-+err_irq:
- pm_runtime_suspend(&pdev->dev);
- err_clk:
- clk_disable_unprepare(host->hclk);
-@@ -1495,7 +1493,6 @@ err_host:
- static int sh_mmcif_remove(struct platform_device *pdev)
- {
- struct sh_mmcif_host *host = platform_get_drvdata(pdev);
-- int irq[2];
-
- host->dying = true;
- clk_prepare_enable(host->hclk);
-@@ -1513,13 +1510,6 @@ static int sh_mmcif_remove(struct platform_device *pdev)
- */
- cancel_delayed_work_sync(&host->timeout_work);
-
-- irq[0] = platform_get_irq(pdev, 0);
-- irq[1] = platform_get_irq(pdev, 1);
--
-- free_irq(irq[0], host);
-- if (irq[1] >= 0)
-- free_irq(irq[1], host);
--
- clk_disable_unprepare(host->hclk);
- mmc_free_host(host->mmc);
- pm_runtime_put_sync(&pdev->dev);
---
-2.1.2
-
diff --git a/patches.renesas/0700-mmc-sh-mmcif-no-need-to-call-pm_runtime_suspend-on-e.patch b/patches.renesas/0700-mmc-sh-mmcif-no-need-to-call-pm_runtime_suspend-on-e.patch
deleted file mode 100644
index 7c226a6e94075..0000000000000
--- a/patches.renesas/0700-mmc-sh-mmcif-no-need-to-call-pm_runtime_suspend-on-e.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From a245390905a40530c320d08a968617a53237a8fe Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 4 Jun 2014 12:42:12 +0100
-Subject: mmc: sh-mmcif: no need to call pm_runtime_suspend on error
-
-The pm_runtime call should implicitly disable the device once the
-probe is over if there is no explicit reference gained. There is no
-need to call pm_runtime_suspend() before the pm_runtime_disable()
-call.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit 17ec61c8e8dd656647b50b1db1e223c02fb051a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index a0776cec070c..80e200e59dda 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -1444,7 +1444,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- sh_mmcif_irqt, 0, name, host);
- if (ret) {
- dev_err(&pdev->dev, "request_irq error (%s)\n", name);
-- goto err_irq;
-+ goto err_clk;
- }
- if (irq[1] >= 0) {
- ret = devm_request_threaded_irq(&pdev->dev, irq[1],
-@@ -1452,7 +1452,7 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- 0, "sh_mmc:int", host);
- if (ret) {
- dev_err(&pdev->dev, "request_irq error (sh_mmc:int)\n");
-- goto err_irq;
-+ goto err_clk;
- }
- }
-
-@@ -1479,8 +1479,6 @@ static int sh_mmcif_probe(struct platform_device *pdev)
-
- emmcaddh:
- erqcd:
--err_irq:
-- pm_runtime_suspend(&pdev->dev);
- err_clk:
- clk_disable_unprepare(host->hclk);
- err_pm:
---
-2.1.2
-
diff --git a/patches.renesas/0701-mmc-sh-mmcif-final-error-path-cleanup.patch b/patches.renesas/0701-mmc-sh-mmcif-final-error-path-cleanup.patch
deleted file mode 100644
index a3bc584618504..0000000000000
--- a/patches.renesas/0701-mmc-sh-mmcif-final-error-path-cleanup.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 1732e449b1f6de14bb80ff14647cb6ba212e5ea8 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 4 Jun 2014 12:42:13 +0100
-Subject: mmc: sh-mmcif: final error path cleanup
-
-Remove the error path items that are no longer needed. The mmc card-detect
-code cleans up after itself (and registers with devm) and the host error
-is the same as the clock disable.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit 39792eaab1561e145b07cc36025c23b175b26a1e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index 80e200e59dda..0289b4ecccb3 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -1459,14 +1459,14 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- if (pd && pd->use_cd_gpio) {
- ret = mmc_gpio_request_cd(mmc, pd->cd_gpio, 0);
- if (ret < 0)
-- goto erqcd;
-+ goto err_clk;
- }
-
- mutex_init(&host->thread_lock);
-
- ret = mmc_add_host(mmc);
- if (ret < 0)
-- goto emmcaddh;
-+ goto err_clk;
-
- dev_pm_qos_expose_latency_limit(&pdev->dev, 100);
-
-@@ -1477,8 +1477,6 @@ static int sh_mmcif_probe(struct platform_device *pdev)
- clk_disable_unprepare(host->hclk);
- return ret;
-
--emmcaddh:
--erqcd:
- err_clk:
- clk_disable_unprepare(host->hclk);
- err_pm:
---
-2.1.2
-
diff --git a/patches.renesas/0702-pinctrl-sh-pfc-r8a7791-Add-HSCIF-pin-support.patch b/patches.renesas/0702-pinctrl-sh-pfc-r8a7791-Add-HSCIF-pin-support.patch
deleted file mode 100644
index 1608badc8f1e7..0000000000000
--- a/patches.renesas/0702-pinctrl-sh-pfc-r8a7791-Add-HSCIF-pin-support.patch
+++ /dev/null
@@ -1,299 +0,0 @@
-From f51077a76ad2f36b6a81a84ea809a5f806b49a8d Mon Sep 17 00:00:00 2001
-From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Date: Tue, 10 Jun 2014 11:37:15 +0900
-Subject: pinctrl: sh-pfc: r8a7791: Add HSCIF pin support
-
-Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 92b14d56d3edf68eff258bc69a62e295dbfb4780)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 250 +++++++++++++++++++++++++++++++++++
- 1 file changed, 250 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 2e688dc4a3c8..394b234488cc 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -1867,6 +1867,192 @@ static const unsigned int eth_rmii_mux[] = {
- ETH_RXD0_MARK, ETH_RXD1_MARK, ETH_RX_ER_MARK, ETH_CRS_DV_MARK,
- ETH_TXD0_MARK, ETH_TXD1_MARK, ETH_TX_EN_MARK, ETH_REFCLK_MARK,
- };
-+
-+/* - HSCIF0 ----------------------------------------------------------------- */
-+static const unsigned int hscif0_data_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(7, 3), RCAR_GP_PIN(7, 4),
-+};
-+static const unsigned int hscif0_data_mux[] = {
-+ HRX0_MARK, HTX0_MARK,
-+};
-+static const unsigned int hscif0_clk_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(7, 2),
-+};
-+static const unsigned int hscif0_clk_mux[] = {
-+ HSCK0_MARK,
-+};
-+static const unsigned int hscif0_ctrl_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(7, 1), RCAR_GP_PIN(7, 0),
-+};
-+static const unsigned int hscif0_ctrl_mux[] = {
-+ HRTS0_N_MARK, HCTS0_N_MARK,
-+};
-+static const unsigned int hscif0_data_b_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(3, 12), RCAR_GP_PIN(3, 15),
-+};
-+static const unsigned int hscif0_data_b_mux[] = {
-+ HRX0_B_MARK, HTX0_B_MARK,
-+};
-+static const unsigned int hscif0_ctrl_b_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(3, 14), RCAR_GP_PIN(3, 13),
-+};
-+static const unsigned int hscif0_ctrl_b_mux[] = {
-+ HRTS0_N_B_MARK, HCTS0_N_B_MARK,
-+};
-+static const unsigned int hscif0_data_c_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
-+};
-+static const unsigned int hscif0_data_c_mux[] = {
-+ HRX0_C_MARK, HTX0_C_MARK,
-+};
-+static const unsigned int hscif0_clk_c_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(5, 31),
-+};
-+static const unsigned int hscif0_clk_c_mux[] = {
-+ HSCK0_C_MARK,
-+};
-+/* - HSCIF1 ----------------------------------------------------------------- */
-+static const unsigned int hscif1_data_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(7, 5), RCAR_GP_PIN(7, 6),
-+};
-+static const unsigned int hscif1_data_mux[] = {
-+ HRX1_MARK, HTX1_MARK,
-+};
-+static const unsigned int hscif1_clk_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(7, 7),
-+};
-+static const unsigned int hscif1_clk_mux[] = {
-+ HSCK1_MARK,
-+};
-+static const unsigned int hscif1_ctrl_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(7, 9), RCAR_GP_PIN(7, 8),
-+};
-+static const unsigned int hscif1_ctrl_mux[] = {
-+ HRTS1_N_MARK, HCTS1_N_MARK,
-+};
-+static const unsigned int hscif1_data_b_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(1, 17), RCAR_GP_PIN(1, 18),
-+};
-+static const unsigned int hscif1_data_b_mux[] = {
-+ HRX1_B_MARK, HTX1_B_MARK,
-+};
-+static const unsigned int hscif1_data_c_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(7, 14), RCAR_GP_PIN(7, 15),
-+};
-+static const unsigned int hscif1_data_c_mux[] = {
-+ HRX1_C_MARK, HTX1_C_MARK,
-+};
-+static const unsigned int hscif1_clk_c_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(7, 16),
-+};
-+static const unsigned int hscif1_clk_c_mux[] = {
-+ HSCK1_C_MARK,
-+};
-+static const unsigned int hscif1_ctrl_c_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(7, 18), RCAR_GP_PIN(7, 17),
-+};
-+static const unsigned int hscif1_ctrl_c_mux[] = {
-+ HRTS1_N_C_MARK, HCTS1_N_C_MARK,
-+};
-+static const unsigned int hscif1_data_d_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(4, 28), RCAR_GP_PIN(4, 18),
-+};
-+static const unsigned int hscif1_data_d_mux[] = {
-+ HRX1_D_MARK, HTX1_D_MARK,
-+};
-+static const unsigned int hscif1_data_e_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(7, 14), RCAR_GP_PIN(7, 15),
-+};
-+static const unsigned int hscif1_data_e_mux[] = {
-+ HRX1_C_MARK, HTX1_C_MARK,
-+};
-+static const unsigned int hscif1_clk_e_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(2, 6),
-+};
-+static const unsigned int hscif1_clk_e_mux[] = {
-+ HSCK1_E_MARK,
-+};
-+static const unsigned int hscif1_ctrl_e_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(2, 8), RCAR_GP_PIN(2, 7),
-+};
-+static const unsigned int hscif1_ctrl_e_mux[] = {
-+ HRTS1_N_E_MARK, HCTS1_N_E_MARK,
-+};
-+/* - HSCIF2 ----------------------------------------------------------------- */
-+static const unsigned int hscif2_data_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(4, 16), RCAR_GP_PIN(4, 17),
-+};
-+static const unsigned int hscif2_data_mux[] = {
-+ HRX2_MARK, HTX2_MARK,
-+};
-+static const unsigned int hscif2_clk_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(4, 15),
-+};
-+static const unsigned int hscif2_clk_mux[] = {
-+ HSCK2_MARK,
-+};
-+static const unsigned int hscif2_ctrl_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(4, 14), RCAR_GP_PIN(4, 13),
-+};
-+static const unsigned int hscif2_ctrl_mux[] = {
-+ HRTS2_N_MARK, HCTS2_N_MARK,
-+};
-+static const unsigned int hscif2_data_b_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(1, 20), RCAR_GP_PIN(1, 22),
-+};
-+static const unsigned int hscif2_data_b_mux[] = {
-+ HRX2_B_MARK, HTX2_B_MARK,
-+};
-+static const unsigned int hscif2_ctrl_b_pins[] = {
-+ /* RTS, CTS */
-+ RCAR_GP_PIN(1, 23), RCAR_GP_PIN(1, 21),
-+};
-+static const unsigned int hscif2_ctrl_b_mux[] = {
-+ HRTS2_N_B_MARK, HCTS2_N_B_MARK,
-+};
-+static const unsigned int hscif2_data_c_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(2, 0), RCAR_GP_PIN(2, 1),
-+};
-+static const unsigned int hscif2_data_c_mux[] = {
-+ HRX2_C_MARK, HTX2_C_MARK,
-+};
-+static const unsigned int hscif2_clk_c_pins[] = {
-+ /* SCK */
-+ RCAR_GP_PIN(5, 31),
-+};
-+static const unsigned int hscif2_clk_c_mux[] = {
-+ HSCK2_C_MARK,
-+};
-+static const unsigned int hscif2_data_d_pins[] = {
-+ /* RX, TX */
-+ RCAR_GP_PIN(1, 20), RCAR_GP_PIN(5, 31),
-+};
-+static const unsigned int hscif2_data_d_mux[] = {
-+ HRX2_B_MARK, HTX2_D_MARK,
-+};
- /* - I2C0 ------------------------------------------------------------------- */
- static const unsigned int i2c0_pins[] = {
- /* SCL, SDA */
-@@ -3885,6 +4071,32 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(eth_magic),
- SH_PFC_PIN_GROUP(eth_mdio),
- SH_PFC_PIN_GROUP(eth_rmii),
-+ SH_PFC_PIN_GROUP(hscif0_data),
-+ SH_PFC_PIN_GROUP(hscif0_clk),
-+ SH_PFC_PIN_GROUP(hscif0_ctrl),
-+ SH_PFC_PIN_GROUP(hscif0_data_b),
-+ SH_PFC_PIN_GROUP(hscif0_ctrl_b),
-+ SH_PFC_PIN_GROUP(hscif0_data_c),
-+ SH_PFC_PIN_GROUP(hscif0_clk_c),
-+ SH_PFC_PIN_GROUP(hscif1_data),
-+ SH_PFC_PIN_GROUP(hscif1_clk),
-+ SH_PFC_PIN_GROUP(hscif1_ctrl),
-+ SH_PFC_PIN_GROUP(hscif1_data_b),
-+ SH_PFC_PIN_GROUP(hscif1_data_c),
-+ SH_PFC_PIN_GROUP(hscif1_clk_c),
-+ SH_PFC_PIN_GROUP(hscif1_ctrl_c),
-+ SH_PFC_PIN_GROUP(hscif1_data_d),
-+ SH_PFC_PIN_GROUP(hscif1_data_e),
-+ SH_PFC_PIN_GROUP(hscif1_clk_e),
-+ SH_PFC_PIN_GROUP(hscif1_ctrl_e),
-+ SH_PFC_PIN_GROUP(hscif2_data),
-+ SH_PFC_PIN_GROUP(hscif2_clk),
-+ SH_PFC_PIN_GROUP(hscif2_ctrl),
-+ SH_PFC_PIN_GROUP(hscif2_data_b),
-+ SH_PFC_PIN_GROUP(hscif2_ctrl_b),
-+ SH_PFC_PIN_GROUP(hscif2_data_c),
-+ SH_PFC_PIN_GROUP(hscif2_clk_c),
-+ SH_PFC_PIN_GROUP(hscif2_data_d),
- SH_PFC_PIN_GROUP(i2c0),
- SH_PFC_PIN_GROUP(i2c0_b),
- SH_PFC_PIN_GROUP(i2c0_c),
-@@ -4183,6 +4395,41 @@ static const char * const eth_groups[] = {
- "eth_rmii",
- };
-
-+static const char * const hscif0_groups[] = {
-+ "hscif0_data",
-+ "hscif0_clk",
-+ "hscif0_ctrl",
-+ "hscif0_data_b",
-+ "hscif0_ctrl_b",
-+ "hscif0_data_c",
-+ "hscif0_clk_c",
-+};
-+
-+static const char * const hscif1_groups[] = {
-+ "hscif1_data",
-+ "hscif1_clk",
-+ "hscif1_ctrl",
-+ "hscif1_data_b",
-+ "hscif1_data_c",
-+ "hscif1_clk_c",
-+ "hscif1_ctrl_c",
-+ "hscif1_data_d",
-+ "hscif1_data_e",
-+ "hscif1_clk_e",
-+ "hscif1_ctrl_e",
-+};
-+
-+static const char * const hscif2_groups[] = {
-+ "hscif2_data",
-+ "hscif2_clk",
-+ "hscif2_ctrl",
-+ "hscif2_data_b",
-+ "hscif2_ctrl_b",
-+ "hscif2_data_c",
-+ "hscif2_clk_c",
-+ "hscif2_data_d",
-+};
-+
- static const char * const i2c0_groups[] = {
- "i2c0",
- "i2c0_b",
-@@ -4547,6 +4794,9 @@ static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(du0),
- SH_PFC_FUNCTION(du1),
- SH_PFC_FUNCTION(eth),
-+ SH_PFC_FUNCTION(hscif0),
-+ SH_PFC_FUNCTION(hscif1),
-+ SH_PFC_FUNCTION(hscif2),
- SH_PFC_FUNCTION(i2c0),
- SH_PFC_FUNCTION(i2c1),
- SH_PFC_FUNCTION(i2c2),
---
-2.1.2
-
diff --git a/patches.renesas/0703-media-vb2-Check-if-there-are-buffers-before-streamon.patch b/patches.renesas/0703-media-vb2-Check-if-there-are-buffers-before-streamon.patch
deleted file mode 100644
index 0ce09796f43fc..0000000000000
--- a/patches.renesas/0703-media-vb2-Check-if-there-are-buffers-before-streamon.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 4fbb481a565ad61ed101d6a849ff78efe1ef688c Mon Sep 17 00:00:00 2001
-From: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Date: Wed, 8 Jan 2014 05:01:33 -0300
-Subject: [media] vb2: Check if there are buffers before streamon
-
-This patch adds a test preventing streamon() if there is no buffer
-ready.
-
-Without this patch, a user could call streamon() before
-preparing any buffer. This leads to a situation where if he calls
-close() before calling streamoff() the device is kept streaming.
-
-Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com>
-Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 249f5a58bc844506fef2e9d5d55a88fbc708c5fa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/v4l2-core/videobuf2-core.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/drivers/media/v4l2-core/videobuf2-core.c
-+++ b/drivers/media/v4l2-core/videobuf2-core.c
-@@ -1784,6 +1784,11 @@ static int vb2_internal_streamon(struct
- return -EINVAL;
- }
-
-+ if (!q->num_buffers) {
-+ dprintk(1, "streamon: no buffers have been allocated\n");
-+ return -EINVAL;
-+ }
-+
- /*
- * If any buffers were queued before streamon,
- * we can now pass them to driver for processing.
diff --git a/patches.renesas/0704-media-vb2-rename-queued_count-to-owned_by_drv_count.patch b/patches.renesas/0704-media-vb2-rename-queued_count-to-owned_by_drv_count.patch
deleted file mode 100644
index 79158b687b9a1..0000000000000
--- a/patches.renesas/0704-media-vb2-rename-queued_count-to-owned_by_drv_count.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From a149403360c557cd39c94a5ed6b69fa87fd8bc48 Mon Sep 17 00:00:00 2001
-From: Hans Verkuil <hans.verkuil@cisco.com>
-Date: Thu, 6 Feb 2014 05:46:11 -0300
-Subject: [media] vb2: rename queued_count to owned_by_drv_count
-
-'queued_count' is a bit vague since it is not clear to which queue it
-refers to: the vb2 internal list of buffers or the driver-owned list
-of buffers.
-
-Rename to make it explicit.
-
-Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-Acked-by: Pawel Osciak <pawel@osciak.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 6ea3b980f058d9dbc79ba88c652d581fa2d00792)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- drivers/media/v4l2-core/videobuf2-core.c
----
- drivers/media/v4l2-core/videobuf2-core.c | 10 +++++-----
- include/media/videobuf2-core.h | 4 ++--
- 2 files changed, 7 insertions(+), 7 deletions(-)
-
---- a/drivers/media/v4l2-core/videobuf2-core.c
-+++ b/drivers/media/v4l2-core/videobuf2-core.c
-@@ -951,7 +951,7 @@ void vb2_buffer_done(struct vb2_buffer *
- spin_lock_irqsave(&q->done_lock, flags);
- vb->state = state;
- list_add_tail(&vb->done_entry, &q->done_list);
-- atomic_dec(&q->queued_count);
-+ atomic_dec(&q->owned_by_drv_count);
- spin_unlock_irqrestore(&q->done_lock, flags);
-
- /* Inform any processes that may be waiting for buffers */
-@@ -1240,7 +1240,7 @@ static void __enqueue_in_driver(struct v
- unsigned int plane;
-
- vb->state = VB2_BUF_STATE_ACTIVE;
-- atomic_inc(&q->queued_count);
-+ atomic_inc(&q->owned_by_drv_count);
-
- /* sync buffers */
- for (plane = 0; plane < vb->num_planes; ++plane)
-@@ -1394,7 +1394,7 @@ static int vb2_start_streaming(struct vb
- int ret;
-
- /* Tell the driver to start streaming */
-- ret = call_qop(q, start_streaming, q, atomic_read(&q->queued_count));
-+ ret = call_qop(q, start_streaming, q, atomic_read(&q->owned_by_drv_count));
-
- /*
- * If there are not enough buffers queued to start streaming, then
-@@ -1618,7 +1618,7 @@ int vb2_wait_for_all_buffers(struct vb2_
- }
-
- if (!q->retry_start_streaming)
-- wait_event(q->done_wq, !atomic_read(&q->queued_count));
-+ wait_event(q->done_wq, !atomic_read(&q->owned_by_drv_count));
- return 0;
- }
- EXPORT_SYMBOL_GPL(vb2_wait_for_all_buffers);
-@@ -1754,7 +1754,7 @@ static void __vb2_queue_cancel(struct vb
- * has not already dequeued before initiating cancel.
- */
- INIT_LIST_HEAD(&q->done_list);
-- atomic_set(&q->queued_count, 0);
-+ atomic_set(&q->owned_by_drv_count, 0);
- wake_up_all(&q->done_wq);
-
- /*
---- a/include/media/videobuf2-core.h
-+++ b/include/media/videobuf2-core.h
-@@ -320,7 +320,7 @@ struct v4l2_fh;
- * @bufs: videobuf buffer structures
- * @num_buffers: number of allocated/used buffers
- * @queued_list: list of buffers currently queued from userspace
-- * @queued_count: number of buffers owned by the driver
-+ * @owned_by_drv_count: number of buffers owned by the driver
- * @done_list: list of buffers ready to be dequeued to userspace
- * @done_lock: lock to protect done_list list
- * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued
-@@ -355,7 +355,7 @@ struct vb2_queue {
-
- struct list_head queued_list;
-
-- atomic_t queued_count;
-+ atomic_t owned_by_drv_count;
- struct list_head done_list;
- spinlock_t done_lock;
- wait_queue_head_t done_wq;
diff --git a/patches.renesas/0705-media-vb2-only-call-start_streaming-if-sufficient-bu.patch b/patches.renesas/0705-media-vb2-only-call-start_streaming-if-sufficient-bu.patch
deleted file mode 100644
index 0575e92da669c..0000000000000
--- a/patches.renesas/0705-media-vb2-only-call-start_streaming-if-sufficient-bu.patch
+++ /dev/null
@@ -1,505 +0,0 @@
-From daefcbf7d2e804567eab555b69c35136e043b084 Mon Sep 17 00:00:00 2001
-From: Hans Verkuil <hans.verkuil@cisco.com>
-Date: Mon, 24 Feb 2014 13:51:03 -0300
-Subject: [media] vb2: only call start_streaming if sufficient buffers are
- queued
-
-In commit 02f142ecd24aaf891324ffba8527284c1731b561 support was added to
-start_streaming to return -ENOBUFS if insufficient buffers were queued
-for the DMA engine to start. The vb2 core would attempt calling
-start_streaming again if another buffer would be queued up.
-
-Later analysis uncovered problems with the queue management if start_streaming
-would return an error: the buffers are enqueued to the driver before the
-start_streaming op is called, so after an error they are never returned to
-the vb2 core. The solution for this is to let the driver return them to
-the vb2 core in case of an error while starting the DMA engine. However,
-in the case of -ENOBUFS that would be weird: it is not a real error, it
-just says that more buffers are needed. Requiring start_streaming to give
-them back only to have them requeued again the next time the application
-calls QBUF is inefficient.
-
-This patch changes this mechanism: it adds a 'min_buffers_needed' field
-to vb2_queue that drivers can set with the minimum number of buffers
-required to start the DMA engine. The start_streaming op is only called
-if enough buffers are queued. The -ENOBUFS handling has been dropped in
-favor of this new method.
-
-Drivers are expected to return buffers back to vb2 core with state QUEUED
-if start_streaming would return an error. The vb2 core checks for this
-and produces a warning if that didn't happen and it will forcefully
-reclaim such buffers to ensure that the internal vb2 core state remains
-consistent and all buffer-related resources have been correctly freed
-and all op calls have been balanced.
-
-__reqbufs() has been updated to check that at least min_buffers_needed
-buffers could be allocated. If fewer buffers were allocated then __reqbufs
-will free what was allocated and return -ENOMEM. Based on a suggestion from
-Pawel Osciak.
-
-__create_bufs() doesn't do that check, since the use of __create_bufs
-assumes some advance scenario where the user might want more control.
-Instead streamon will check if enough buffers were allocated to prevent
-streaming with fewer than the minimum required number of buffers.
-
-Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit b3379c6201bb3555298cdbf0aa004af260f2a6a4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- drivers/media/platform/davinci/vpbe_display.c
- drivers/media/platform/davinci/vpif_capture.c
- drivers/media/platform/davinci/vpif_display.c
- drivers/media/v4l2-core/videobuf2-core.c
----
- drivers/media/platform/davinci/vpbe_display.c | 7 -
- drivers/media/platform/davinci/vpif_capture.c | 8 -
- drivers/media/platform/davinci/vpif_display.c | 8 -
- drivers/media/platform/s5p-tv/mixer_video.c | 6 -
- drivers/media/v4l2-core/videobuf2-core.c | 143 ++++++++++++++++--------
- drivers/staging/media/davinci_vpfe/vpfe_video.c | 3
- include/media/videobuf2-core.h | 14 +-
- 7 files changed, 115 insertions(+), 74 deletions(-)
-
---- a/drivers/media/platform/davinci/vpbe_display.c
-+++ b/drivers/media/platform/davinci/vpbe_display.c
-@@ -344,11 +344,6 @@ static int vpbe_start_streaming(struct v
- struct vpbe_device *vpbe_dev = fh->disp_dev->vpbe_dev;
- int ret;
-
-- /* If buffer queue is empty, return error */
-- if (list_empty(&layer->dma_queue)) {
-- v4l2_err(&vpbe_dev->v4l2_dev, "buffer queue is empty\n");
-- return -ENOBUFS;
-- }
- /* Get the next frame from the buffer queue */
- layer->next_frm = layer->cur_frm = list_entry(layer->dma_queue.next,
- struct vpbe_disp_buffer, list);
-@@ -1415,7 +1410,7 @@ static int vpbe_display_reqbufs(struct f
- q->ops = &video_qops;
- q->mem_ops = &vb2_dma_contig_memops;
- q->buf_struct_size = sizeof(struct vpbe_disp_buffer);
-- q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-+ q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-
- ret = vb2_queue_init(q);
- if (ret) {
---- a/drivers/media/platform/davinci/vpif_capture.c
-+++ b/drivers/media/platform/davinci/vpif_capture.c
-@@ -272,13 +272,7 @@ static int vpif_start_streaming(struct v
- unsigned long flags;
- int ret;
-
-- /* If buffer queue is empty, return error */
- spin_lock_irqsave(&common->irqlock, flags);
-- if (list_empty(&common->dma_queue)) {
-- spin_unlock_irqrestore(&common->irqlock, flags);
-- vpif_dbg(1, debug, "buffer queue is empty\n");
-- return -ENOBUFS;
-- }
-
- /* Get the next frame from the buffer queue */
- common->cur_frm = common->next_frm = list_entry(common->dma_queue.next,
-@@ -1023,7 +1017,7 @@ static int vpif_reqbufs(struct file *fil
- q->ops = &video_qops;
- q->mem_ops = &vb2_dma_contig_memops;
- q->buf_struct_size = sizeof(struct vpif_cap_buffer);
-- q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-+ q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-
- ret = vb2_queue_init(q);
- if (ret) {
---- a/drivers/media/platform/davinci/vpif_display.c
-+++ b/drivers/media/platform/davinci/vpif_display.c
-@@ -234,13 +234,7 @@ static int vpif_start_streaming(struct v
- unsigned long flags;
- int ret;
-
-- /* If buffer queue is empty, return error */
- spin_lock_irqsave(&common->irqlock, flags);
-- if (list_empty(&common->dma_queue)) {
-- spin_unlock_irqrestore(&common->irqlock, flags);
-- vpif_err("buffer queue is empty\n");
-- return -ENOBUFS;
-- }
-
- /* Get the next frame from the buffer queue */
- common->next_frm = common->cur_frm =
-@@ -983,7 +977,7 @@ static int vpif_reqbufs(struct file *fil
- q->ops = &video_qops;
- q->mem_ops = &vb2_dma_contig_memops;
- q->buf_struct_size = sizeof(struct vpif_disp_buffer);
-- q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-+ q->timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
-
- ret = vb2_queue_init(q);
- if (ret) {
---- a/drivers/media/platform/s5p-tv/mixer_video.c
-+++ b/drivers/media/platform/s5p-tv/mixer_video.c
-@@ -946,11 +946,6 @@ static int start_streaming(struct vb2_qu
-
- mxr_dbg(mdev, "%s\n", __func__);
-
-- if (count == 0) {
-- mxr_dbg(mdev, "no output buffers queued\n");
-- return -ENOBUFS;
-- }
--
- /* block any changes in output configuration */
- mxr_output_get(mdev);
-
-@@ -1124,6 +1119,7 @@ struct mxr_layer *mxr_base_layer_create(
- .drv_priv = layer,
- .buf_struct_size = sizeof(struct mxr_buffer),
- .ops = &mxr_video_qops,
-+ .min_buffers_needed = 1,
- .mem_ops = &vb2_dma_contig_memops,
- };
-
---- a/drivers/media/v4l2-core/videobuf2-core.c
-+++ b/drivers/media/v4l2-core/videobuf2-core.c
-@@ -693,6 +693,7 @@ static int __reqbufs(struct vb2_queue *q
- * Make sure the requested values and current defaults are sane.
- */
- num_buffers = min_t(unsigned int, req->count, VIDEO_MAX_FRAME);
-+ num_buffers = max_t(unsigned int, req->count, q->min_buffers_needed);
- memset(q->plane_sizes, 0, sizeof(q->plane_sizes));
- memset(q->alloc_ctx, 0, sizeof(q->alloc_ctx));
- q->memory = req->memory;
-@@ -716,9 +717,16 @@ static int __reqbufs(struct vb2_queue *q
- allocated_buffers = ret;
-
- /*
-+ * There is no point in continuing if we can't allocate the minimum
-+ * number of buffers needed by this vb2_queue.
-+ */
-+ if (allocated_buffers < q->min_buffers_needed)
-+ ret = -ENOMEM;
-+
-+ /*
- * Check if driver can handle the allocated number of buffers.
- */
-- if (allocated_buffers < num_buffers) {
-+ if (!ret && allocated_buffers < num_buffers) {
- num_buffers = allocated_buffers;
-
- ret = call_qop(q, queue_setup, q, NULL, &num_buffers,
-@@ -920,13 +928,20 @@ EXPORT_SYMBOL_GPL(vb2_plane_cookie);
- * vb2_buffer_done() - inform videobuf that an operation on a buffer is finished
- * @vb: vb2_buffer returned from the driver
- * @state: either VB2_BUF_STATE_DONE if the operation finished successfully
-- * or VB2_BUF_STATE_ERROR if the operation finished with an error
-+ * or VB2_BUF_STATE_ERROR if the operation finished with an error.
-+ * If start_streaming fails then it should return buffers with state
-+ * VB2_BUF_STATE_QUEUED to put them back into the queue.
- *
- * This function should be called by the driver after a hardware operation on
- * a buffer is finished and the buffer may be returned to userspace. The driver
- * cannot use this buffer anymore until it is queued back to it by videobuf
- * by the means of buf_queue callback. Only buffers previously queued to the
- * driver by buf_queue can be passed to this function.
-+ *
-+ * While streaming a buffer can only be returned in state DONE or ERROR.
-+ * The start_streaming op can also return them in case the DMA engine cannot
-+ * be started for some reason. In that case the buffers should be returned with
-+ * state QUEUED.
- */
- void vb2_buffer_done(struct vb2_buffer *vb, enum vb2_buffer_state state)
- {
-@@ -934,11 +949,17 @@ void vb2_buffer_done(struct vb2_buffer *
- unsigned long flags;
- unsigned int plane;
-
-- if (vb->state != VB2_BUF_STATE_ACTIVE)
-+ if (WARN_ON(vb->state != VB2_BUF_STATE_ACTIVE))
- return;
-
-- if (state != VB2_BUF_STATE_DONE && state != VB2_BUF_STATE_ERROR)
-- return;
-+ if (!q->start_streaming_called) {
-+ if (WARN_ON(state != VB2_BUF_STATE_QUEUED))
-+ state = VB2_BUF_STATE_QUEUED;
-+ } else if (!WARN_ON(!q->start_streaming_called)) {
-+ if (WARN_ON(state != VB2_BUF_STATE_DONE &&
-+ state != VB2_BUF_STATE_ERROR))
-+ state = VB2_BUF_STATE_ERROR;
-+ }
-
- dprintk(4, "Done processing on buffer %d, state: %d\n",
- vb->v4l2_buf.index, state);
-@@ -950,10 +971,14 @@ void vb2_buffer_done(struct vb2_buffer *
- /* Add the buffer to the done buffers list */
- spin_lock_irqsave(&q->done_lock, flags);
- vb->state = state;
-- list_add_tail(&vb->done_entry, &q->done_list);
-+ if (state != VB2_BUF_STATE_QUEUED)
-+ list_add_tail(&vb->done_entry, &q->done_list);
- atomic_dec(&q->owned_by_drv_count);
- spin_unlock_irqrestore(&q->done_lock, flags);
-
-+ if (state == VB2_BUF_STATE_QUEUED)
-+ return;
-+
- /* Inform any processes that may be waiting for buffers */
- wake_up(&q->done_wq);
- }
-@@ -1384,32 +1409,48 @@ EXPORT_SYMBOL_GPL(vb2_prepare_buf);
- * vb2_start_streaming() - Attempt to start streaming.
- * @q: videobuf2 queue
- *
-- * If there are not enough buffers, then retry_start_streaming is set to
-- * 1 and 0 is returned. The next time a buffer is queued and
-- * retry_start_streaming is 1, this function will be called again to
-- * retry starting the DMA engine.
-+ * Attempt to start streaming. When this function is called there must be
-+ * at least q->min_buffers_needed buffers queued up (i.e. the minimum
-+ * number of buffers required for the DMA engine to function). If the
-+ * @start_streaming op fails it is supposed to return all the driver-owned
-+ * buffers back to vb2 in state QUEUED. Check if that happened and if
-+ * not warn and reclaim them forcefully.
- */
- static int vb2_start_streaming(struct vb2_queue *q)
- {
-+ struct vb2_buffer *vb;
- int ret;
-
-- /* Tell the driver to start streaming */
-- ret = call_qop(q, start_streaming, q, atomic_read(&q->owned_by_drv_count));
--
- /*
-- * If there are not enough buffers queued to start streaming, then
-- * the start_streaming operation will return -ENOBUFS and you have to
-- * retry when the next buffer is queued.
-+ * If any buffers were queued before streamon,
-+ * we can now pass them to driver for processing.
- */
-- if (ret == -ENOBUFS) {
-- dprintk(1, "qbuf: not enough buffers, retry when more buffers are queued.\n");
-- q->retry_start_streaming = 1;
-+ list_for_each_entry(vb, &q->queued_list, queued_entry)
-+ __enqueue_in_driver(vb);
-+
-+ /* Tell the driver to start streaming */
-+ ret = call_qop(q, start_streaming, q,
-+ atomic_read(&q->owned_by_drv_count));
-+ q->start_streaming_called = ret == 0;
-+ if (!ret)
- return 0;
-+
-+ dprintk(1, "qbuf: driver refused to start streaming\n");
-+ if (WARN_ON(atomic_read(&q->owned_by_drv_count))) {
-+ unsigned i;
-+
-+ /*
-+ * Forcefully reclaim buffers if the driver did not
-+ * correctly return them to vb2.
-+ */
-+ for (i = 0; i < q->num_buffers; ++i) {
-+ vb = q->bufs[i];
-+ if (vb->state == VB2_BUF_STATE_ACTIVE)
-+ vb2_buffer_done(vb, VB2_BUF_STATE_QUEUED);
-+ }
-+ /* Must be zero now */
-+ WARN_ON(atomic_read(&q->owned_by_drv_count));
- }
-- if (ret)
-- dprintk(1, "qbuf: driver refused to start streaming\n");
-- else
-- q->retry_start_streaming = 0;
- return ret;
- }
-
-@@ -1449,6 +1490,7 @@ static int vb2_internal_qbuf(struct vb2_
- * dequeued in dqbuf.
- */
- list_add_tail(&vb->queued_entry, &q->queued_list);
-+ q->queued_count++;
- q->waiting_for_buffers = false;
- vb->state = VB2_BUF_STATE_QUEUED;
-
-@@ -1456,13 +1498,20 @@ static int vb2_internal_qbuf(struct vb2_
- * If already streaming, give the buffer to driver for processing.
- * If not, the buffer will be given to driver on next streamon.
- */
-- if (q->streaming)
-+ if (q->start_streaming_called)
- __enqueue_in_driver(vb);
-
- /* Fill buffer information for the userspace */
- __fill_v4l2_buffer(vb, b);
-
-- if (q->retry_start_streaming) {
-+ /*
-+ * If streamon has been called, and we haven't yet called
-+ * start_streaming() since not enough buffers were queued, and
-+ * we now have reached the minimum number of queued buffers,
-+ * then we can finally call start_streaming().
-+ */
-+ if (q->streaming && !q->start_streaming_called &&
-+ q->queued_count >= q->min_buffers_needed) {
- ret = vb2_start_streaming(q);
- if (ret)
- return ret;
-@@ -1617,7 +1666,7 @@ int vb2_wait_for_all_buffers(struct vb2_
- return -EINVAL;
- }
-
-- if (!q->retry_start_streaming)
-+ if (q->start_streaming_called)
- wait_event(q->done_wq, !atomic_read(&q->owned_by_drv_count));
- return 0;
- }
-@@ -1682,6 +1731,7 @@ static int vb2_internal_dqbuf(struct vb2
- __fill_v4l2_buffer(vb, b);
- /* Remove from videobuf queue */
- list_del(&vb->queued_entry);
-+ q->queued_count--;
- /* go back to dequeued state */
- __vb2_dqbuf(vb);
-
-@@ -1732,18 +1782,23 @@ static void __vb2_queue_cancel(struct vb
- {
- unsigned int i;
-
-- if (q->retry_start_streaming) {
-- q->retry_start_streaming = 0;
-- q->streaming = 0;
-- }
--
- /*
- * Tell driver to stop all transactions and release all queued
- * buffers.
- */
-- if (q->streaming)
-+ if (q->start_streaming_called)
- call_qop(q, stop_streaming, q);
- q->streaming = 0;
-+ q->start_streaming_called = 0;
-+ q->queued_count = 0;
-+
-+ if (WARN_ON(atomic_read(&q->owned_by_drv_count))) {
-+ for (i = 0; i < q->num_buffers; ++i)
-+ if (q->bufs[i]->state == VB2_BUF_STATE_ACTIVE)
-+ vb2_buffer_done(q->bufs[i], VB2_BUF_STATE_ERROR);
-+ /* Must be zero now */
-+ WARN_ON(atomic_read(&q->owned_by_drv_count));
-+ }
-
- /*
- * Remove all buffers from videobuf's list...
-@@ -1766,7 +1821,6 @@ static void __vb2_queue_cancel(struct vb
-
- static int vb2_internal_streamon(struct vb2_queue *q, enum v4l2_buf_type type)
- {
-- struct vb2_buffer *vb;
- int ret;
-
- if (type != q->type) {
-@@ -1788,19 +1842,22 @@ static int vb2_internal_streamon(struct
- dprintk(1, "streamon: no buffers have been allocated\n");
- return -EINVAL;
- }
-+ if (q->num_buffers < q->min_buffers_needed) {
-+ dprintk(1, "streamon: need at least %u allocated buffers\n",
-+ q->min_buffers_needed);
-+ return -EINVAL;
-+ }
-
- /*
-- * If any buffers were queued before streamon,
-- * we can now pass them to driver for processing.
-+ * Tell driver to start streaming provided sufficient buffers
-+ * are available.
- */
-- list_for_each_entry(vb, &q->queued_list, queued_entry)
-- __enqueue_in_driver(vb);
--
-- /* Tell driver to start streaming. */
-- ret = vb2_start_streaming(q);
-- if (ret) {
-- __vb2_queue_cancel(q);
-- return ret;
-+ if (q->queued_count >= q->min_buffers_needed) {
-+ ret = vb2_start_streaming(q);
-+ if (ret) {
-+ __vb2_queue_cancel(q);
-+ return ret;
-+ }
- }
-
- q->streaming = 1;
---- a/drivers/staging/media/davinci_vpfe/vpfe_video.c
-+++ b/drivers/staging/media/davinci_vpfe/vpfe_video.c
-@@ -1201,8 +1201,6 @@ static int vpfe_start_streaming(struct v
- unsigned long addr;
- int ret;
-
-- if (count == 0)
-- return -ENOBUFS;
- ret = mutex_lock_interruptible(&video->lock);
- if (ret)
- goto streamoff;
-@@ -1327,6 +1325,7 @@ static int vpfe_reqbufs(struct file *fil
- q->type = req_buf->type;
- q->io_modes = VB2_MMAP | VB2_USERPTR;
- q->drv_priv = fh;
-+ q->min_buffers_needed = 1;
- q->ops = &video_qops;
- q->mem_ops = &vb2_dma_contig_memops;
- q->buf_struct_size = sizeof(struct vpfe_cap_buffer);
---- a/include/media/videobuf2-core.h
-+++ b/include/media/videobuf2-core.h
-@@ -315,20 +315,24 @@ struct v4l2_fh;
- * @gfp_flags: additional gfp flags used when allocating the buffers.
- * Typically this is 0, but it may be e.g. GFP_DMA or __GFP_DMA32
- * to force the buffer allocation to a specific memory zone.
-+ * @min_buffers_needed: the minimum number of buffers needed before
-+ * start_streaming() can be called. Used when a DMA engine
-+ * cannot be started unless at least this number of buffers
-+ * have been queued into the driver.
- *
- * @memory: current memory type used
- * @bufs: videobuf buffer structures
- * @num_buffers: number of allocated/used buffers
- * @queued_list: list of buffers currently queued from userspace
-+ * @queued_count: number of buffers queued and ready for streaming.
- * @owned_by_drv_count: number of buffers owned by the driver
- * @done_list: list of buffers ready to be dequeued to userspace
- * @done_lock: lock to protect done_list list
- * @done_wq: waitqueue for processes waiting for buffers ready to be dequeued
- * @alloc_ctx: memory type/allocator-specific contexts for each plane
- * @streaming: current streaming state
-- * @retry_start_streaming: start_streaming() was called, but there were not enough
-- * buffers queued. If set, then retry calling start_streaming when
-- * queuing a new buffer.
-+ * @start_streaming_called: start_streaming() was called successfully and we
-+ * started streaming.
- * @waiting_for_buffers: used in poll() to check if vb2 is still waiting for
- * buffers. Only set for capture queues if qbuf has not yet been
- * called since poll() needs to return POLLERR in that situation.
-@@ -347,6 +351,7 @@ struct vb2_queue {
- unsigned int buf_struct_size;
- u32 timestamp_type;
- gfp_t gfp_flags;
-+ u32 min_buffers_needed;
-
- /* private: internal use only */
- enum v4l2_memory memory;
-@@ -354,6 +359,7 @@ struct vb2_queue {
- unsigned int num_buffers;
-
- struct list_head queued_list;
-+ unsigned int queued_count;
-
- atomic_t owned_by_drv_count;
- struct list_head done_list;
-@@ -364,7 +370,7 @@ struct vb2_queue {
- unsigned int plane_sizes[VIDEO_MAX_PLANES];
-
- unsigned int streaming:1;
-- unsigned int retry_start_streaming:1;
-+ unsigned int start_streaming_called:1;
- unsigned int waiting_for_buffers:1;
-
- struct vb2_fileio_data *fileio;
diff --git a/patches.renesas/0706-v4l-Add-ARGB-and-XRGB-pixel-formats.patch b/patches.renesas/0706-v4l-Add-ARGB-and-XRGB-pixel-formats.patch
deleted file mode 100644
index e3d4af6b567ad..0000000000000
--- a/patches.renesas/0706-v4l-Add-ARGB-and-XRGB-pixel-formats.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 81093c4977bc29068a0ed7e361806b3fa3b2d899 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Date: Thu, 22 May 2014 03:07:55 +0200
-Subject: v4l: Add ARGB and XRGB pixel formats
-
-The existing RGB pixel formats are ill-defined in respect to their alpha
-bits and their meaning is driver dependent. Create new standard ARGB and
-XRGB variants with clearly defined meanings and make the existing
-variants deprecated.
-
-The new pixel formats 4CC values have been selected to match the DRM
-4CCs for the same in-memory formats.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 3ddcdb02a95582bf472a89c934bca6e56f07a2db)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml
----
- include/uapi/linux/videodev2.h | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
-index fe94bb90582e..63274c1d037c 100644
---- a/include/uapi/linux/videodev2.h
-+++ b/include/uapi/linux/videodev2.h
-@@ -289,7 +289,11 @@ struct v4l2_pix_format {
- /* RGB formats */
- #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */
- #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 xxxxrrrr ggggbbbb */
-+#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 aaaarrrr ggggbbbb */
-+#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 xxxxrrrr ggggbbbb */
- #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */
-+#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */
-+#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */
- #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */
- #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */
- #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */
-@@ -297,7 +301,11 @@ struct v4l2_pix_format {
- #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */
- #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */
- #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */
-+#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */
-+#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */
- #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */
-+#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */
-+#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */
-
- /* Grey formats */
- #define V4L2_PIX_FMT_GREY v4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */
---
-2.1.2
-
diff --git a/patches.renesas/0707-DocBook-media-Document-ALPHA_COMPONENT-control-usage.patch b/patches.renesas/0707-DocBook-media-Document-ALPHA_COMPONENT-control-usage.patch
deleted file mode 100644
index eb92f9f8c8617..0000000000000
--- a/patches.renesas/0707-DocBook-media-Document-ALPHA_COMPONENT-control-usage.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From dbd016c0b6e5342227acb9425ef0ef00199b5ba0 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 22 May 2014 00:16:01 +0200
-Subject: DocBook: media: Document ALPHA_COMPONENT control usage on output
- devices
-
-Extend the V4L2_CID_ALPHA_COMPONENT control for use on output devices,
-to set the alpha component value when the output format doesn't have an
-alpha channel.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit e632d2f4e25c574a29b269f9f4b0cef2995e402d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/DocBook/media/v4l/controls.xml | 17 ++++++++++-------
- 1 file changed, 10 insertions(+), 7 deletions(-)
-
-diff --git a/Documentation/DocBook/media/v4l/controls.xml b/Documentation/DocBook/media/v4l/controls.xml
-index a5a3188e5af7..066800dcb123 100644
---- a/Documentation/DocBook/media/v4l/controls.xml
-+++ b/Documentation/DocBook/media/v4l/controls.xml
-@@ -398,14 +398,17 @@ to work.</entry>
- <row id="v4l2-alpha-component">
- <entry><constant>V4L2_CID_ALPHA_COMPONENT</constant></entry>
- <entry>integer</entry>
-- <entry> Sets the alpha color component on the capture device or on
-- the capture buffer queue of a mem-to-mem device. When a mem-to-mem
-- device produces frame format that includes an alpha component
-+ <entry>Sets the alpha color component. When a capture device (or
-+ capture queue of a mem-to-mem device) produces a frame format that
-+ includes an alpha component
- (e.g. <link linkend="rgb-formats">packed RGB image formats</link>)
-- and the alpha value is not defined by the mem-to-mem input data
-- this control lets you select the alpha component value of all
-- pixels. It is applicable to any pixel format that contains an alpha
-- component.
-+ and the alpha value is not defined by the device or the mem-to-mem
-+ input data this control lets you select the alpha component value of
-+ all pixels. When an output device (or output queue of a mem-to-mem
-+ device) consumes a frame format that doesn't include an alpha
-+ component and the device supports alpha channel processing this
-+ control lets you set the alpha component value of all pixels for
-+ further processing in the device.
- </entry>
- </row>
- <row>
---
-2.1.2
-
diff --git a/patches.renesas/0708-v4l-Support-extending-the-v4l2_pix_format-structure.patch b/patches.renesas/0708-v4l-Support-extending-the-v4l2_pix_format-structure.patch
deleted file mode 100644
index e1110b92f2a48..0000000000000
--- a/patches.renesas/0708-v4l-Support-extending-the-v4l2_pix_format-structure.patch
+++ /dev/null
@@ -1,728 +0,0 @@
-From 1fcfbdf95264aea9994629faea9a4f78b96fe5a4 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 14:41:05 +0200
-Subject: v4l: Support extending the v4l2_pix_format structure
-
-The v4l2_pix_format structure has no reserved field. It is embedded in
-the v4l2_framebuffer structure which has no reserved fields either, and
-in the v4l2_format structure which has reserved fields that were not
-previously required to be zeroed out by applications.
-
-To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer
-structure, and use the priv field as a magic value to indicate that the
-application has set all v4l2_pix_format extended fields and zeroed all
-reserved fields following the v4l2_pix_format field in the v4l2_format
-structure.
-
-The availability of this API extension is reported to userspace through
-the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the
-priv field is still set to the magic value at [GS]_FMT return wouldn't
-be enough, as older kernels don't zero the priv field on return.
-
-To simplify the internal API towards drivers zero the extended fields
-and set the priv field to the magic value for applications not aware of
-the extensions.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit af7553db487e1dbcd069d1bb9426fc8c591ea1f4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- Documentation/DocBook/media/v4l/v4l2.xml
- Documentation/DocBook/media/v4l/vidioc-querycap.xml
- drivers/media/platform/davinci/vpif_display.c
- drivers/media/platform/mem2mem_testdev.c
- include/uapi/linux/videodev2.h
----
- Documentation/DocBook/media/Makefile | 2 +-
- Documentation/DocBook/media/v4l/pixfmt.xml | 25 +++++++++--
- drivers/media/parport/bw-qcam.c | 2 -
- drivers/media/pci/cx18/cx18-ioctl.c | 1 -
- drivers/media/pci/cx25821/cx25821-video.c | 3 --
- drivers/media/pci/ivtv/ivtv-ioctl.c | 3 --
- drivers/media/pci/meye/meye.c | 2 -
- drivers/media/pci/saa7134/saa7134-empress.c | 3 --
- drivers/media/pci/saa7134/saa7134-video.c | 2 -
- drivers/media/pci/sta2x11/sta2x11_vip.c | 1 -
- drivers/media/platform/coda.c | 2 -
- drivers/media/platform/omap/omap_vout.c | 2 -
- drivers/media/platform/sh_veu.c | 2 -
- drivers/media/platform/vino.c | 5 ---
- drivers/media/platform/vivi.c | 1 -
- drivers/media/usb/cx231xx/cx231xx-417.c | 2 -
- drivers/media/usb/cx231xx/cx231xx-video.c | 2 -
- drivers/media/usb/gspca/gspca.c | 8 ++--
- drivers/media/usb/hdpvr/hdpvr-video.c | 1 -
- drivers/media/usb/stkwebcam/stk-webcam.c | 2 -
- drivers/media/usb/tlg2300/pd-video.c | 1 -
- drivers/media/usb/tm6000/tm6000-video.c | 2 -
- drivers/media/usb/zr364xx/zr364xx.c | 3 --
- drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 19 ++++++---
- drivers/media/v4l2-core/v4l2-ioctl.c | 61 +++++++++++++++++++++++++--
- include/uapi/linux/videodev2.h | 15 ++++++-
- 26 files changed, 112 insertions(+), 60 deletions(-)
-
-diff --git a/Documentation/DocBook/media/Makefile b/Documentation/DocBook/media/Makefile
-index 1d27f0a1abd1..494da944b39d 100644
---- a/Documentation/DocBook/media/Makefile
-+++ b/Documentation/DocBook/media/Makefile
-@@ -174,7 +174,7 @@ FILENAME = \
- DOCUMENTED = \
- -e "s/\(enum *\)v4l2_mpeg_cx2341x_video_\([a-z]*_spatial_filter_type\)/\1<link linkend=\"\2\">v4l2_mpeg_cx2341x_video_\2<\/link>/g" \
- -e "s/\(\(enum\|struct\) *\)\(v4l2_[a-zA-Z0-9_]*\)/\1<link linkend=\"\3\">\3<\/link>/g" \
-- -e "s/\(V4L2_PIX_FMT_[A-Z0-9_]\+\) /<link linkend=\"\1\">\1<\/link> /g" \
-+ -e "s/\(V4L2_PIX_FMT_[A-Z0-9_]\+\)\(\s\+v4l2_fourcc\)/<link linkend=\"\1\">\1<\/link>\2/g" \
- -e ":a;s/\(linkend=\".*\)_\(.*\">\)/\1-\2/;ta" \
- -e "s/v4l2\-mpeg\-vbi\-ITV0/v4l2-mpeg-vbi-itv0-1/g"
-
-diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
-index 72d72bd67d0a..6e1e520a2750 100644
---- a/Documentation/DocBook/media/v4l/pixfmt.xml
-+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
-@@ -103,9 +103,28 @@ see <xref linkend="colorspaces" />.</entry>
- <row>
- <entry>__u32</entry>
- <entry><structfield>priv</structfield></entry>
-- <entry>Reserved for custom (driver defined) additional
--information about formats. When not used drivers and applications must
--set this field to zero.</entry>
-+ <entry><para>This field indicates whether the remaining fields of the
-+<structname>v4l2_pix_format</structname> structure, also called the extended
-+fields, are valid. When set to <constant>V4L2_PIX_FMT_PRIV_MAGIC</constant>, it
-+indicates that the extended fields have been correctly initialized. When set to
-+any other value it indicates that the extended fields contain undefined values.
-+</para>
-+<para>Applications that wish to use the pixel format extended fields must first
-+ensure that the feature is supported by querying the device for the
-+<link linkend="querycap"><constant>V4L2_CAP_EXT_PIX_FORMAT</constant></link>
-+capability. If the capability isn't set the pixel format extended fields are not
-+supported and using the extended fields will lead to undefined results.</para>
-+<para>To use the extended fields, applications must set the
-+<structfield>priv</structfield> field to
-+<constant>V4L2_PIX_FMT_PRIV_MAGIC</constant>, initialize all the extended fields
-+and zero the unused bytes of the <structname>v4l2_format</structname>
-+<structfield>raw_data</structfield> field.</para>
-+<para>When the <structfield>priv</structfield> field isn't set to
-+<constant>V4L2_PIX_FMT_PRIV_MAGIC</constant> drivers must act as if all the
-+extended fields were set to zero. On return drivers must set the
-+<structfield>priv</structfield> field to
-+<constant>V4L2_PIX_FMT_PRIV_MAGIC</constant> and all the extended field to
-+applicable values.</para></entry>
- </row>
- </tbody>
- </tgroup>
-diff --git a/drivers/media/parport/bw-qcam.c b/drivers/media/parport/bw-qcam.c
-index d12bd33f39cb..b711b5b5b01a 100644
---- a/drivers/media/parport/bw-qcam.c
-+++ b/drivers/media/parport/bw-qcam.c
-@@ -757,7 +757,6 @@ static int qcam_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f
- pix->sizeimage = pix->width * pix->height;
- /* Just a guess */
- pix->colorspace = V4L2_COLORSPACE_SRGB;
-- pix->priv = 0;
- return 0;
- }
-
-@@ -783,7 +782,6 @@ static int qcam_try_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format
- pix->sizeimage = pix->width * pix->height;
- /* Just a guess */
- pix->colorspace = V4L2_COLORSPACE_SRGB;
-- pix->priv = 0;
- return 0;
- }
-
-diff --git a/drivers/media/pci/cx18/cx18-ioctl.c b/drivers/media/pci/cx18/cx18-ioctl.c
-index 1110bcb14e2f..c4c3ff30d0a3 100644
---- a/drivers/media/pci/cx18/cx18-ioctl.c
-+++ b/drivers/media/pci/cx18/cx18-ioctl.c
-@@ -156,7 +156,6 @@ static int cx18_g_fmt_vid_cap(struct file *file, void *fh,
- pixfmt->height = cx->cxhdl.height;
- pixfmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
- pixfmt->field = V4L2_FIELD_INTERLACED;
-- pixfmt->priv = 0;
- if (id->type == CX18_ENC_STREAM_TYPE_YUV) {
- pixfmt->pixelformat = s->pixelformat;
- pixfmt->sizeimage = s->vb_bytes_per_frame;
-diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c
-index d270819fd875..c7ae087b668b 100644
---- a/drivers/media/pci/cx25821/cx25821-video.c
-+++ b/drivers/media/pci/cx25821/cx25821-video.c
-@@ -576,7 +576,6 @@ static int cx25821_vidioc_g_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.bytesperline = (chan->width * chan->fmt->depth) >> 3;
- f->fmt.pix.sizeimage = chan->height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -615,7 +614,6 @@ static int cx25821_vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3;
- f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -867,7 +865,6 @@ static int cx25821_vidioc_try_fmt_vid_out(struct file *file, void *priv,
- f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3;
- f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
- return 0;
- }
-
-diff --git a/drivers/media/pci/ivtv/ivtv-ioctl.c b/drivers/media/pci/ivtv/ivtv-ioctl.c
-index 807b275a847e..d4d0f0ecab98 100644
---- a/drivers/media/pci/ivtv/ivtv-ioctl.c
-+++ b/drivers/media/pci/ivtv/ivtv-ioctl.c
-@@ -351,7 +351,6 @@ static int ivtv_g_fmt_vid_cap(struct file *file, void *fh, struct v4l2_format *f
- pixfmt->height = itv->cxhdl.height;
- pixfmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
- pixfmt->field = V4L2_FIELD_INTERLACED;
-- pixfmt->priv = 0;
- if (id->type == IVTV_ENC_STREAM_TYPE_YUV) {
- pixfmt->pixelformat = V4L2_PIX_FMT_HM12;
- /* YUV size is (Y=(h*720) + UV=(h*(720/2))) */
-@@ -418,7 +417,6 @@ static int ivtv_g_fmt_vid_out(struct file *file, void *fh, struct v4l2_format *f
- pixfmt->height = itv->main_rect.height;
- pixfmt->colorspace = V4L2_COLORSPACE_SMPTE170M;
- pixfmt->field = V4L2_FIELD_INTERLACED;
-- pixfmt->priv = 0;
- if (id->type == IVTV_DEC_STREAM_TYPE_YUV) {
- switch (itv->yuv_info.lace_mode & IVTV_YUV_MODE_MASK) {
- case IVTV_YUV_MODE_INTERLACED:
-@@ -1384,7 +1382,6 @@ static int ivtv_g_fbuf(struct file *file, void *fh, struct v4l2_framebuffer *fb)
- fb->fmt.bytesperline = fb->fmt.width;
- fb->fmt.colorspace = V4L2_COLORSPACE_SMPTE170M;
- fb->fmt.field = V4L2_FIELD_INTERLACED;
-- fb->fmt.priv = 0;
- if (fb->fmt.pixelformat != V4L2_PIX_FMT_PAL8)
- fb->fmt.bytesperline *= 2;
- if (fb->fmt.pixelformat == V4L2_PIX_FMT_RGB32 ||
-diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c
-index 54d5c821007c..4e7fba034a31 100644
---- a/drivers/media/pci/meye/meye.c
-+++ b/drivers/media/pci/meye/meye.c
-@@ -1166,7 +1166,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *fh,
- f->fmt.pix.sizeimage = f->fmt.pix.height *
- f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = 0;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -1232,7 +1231,6 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *fh,
- f->fmt.pix.sizeimage = f->fmt.pix.height *
- f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = 0;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-diff --git a/drivers/media/pci/saa7134/saa7134-empress.c b/drivers/media/pci/saa7134/saa7134-empress.c
-index 0a9047e754b9..71bf87204c5b 100644
---- a/drivers/media/pci/saa7134/saa7134-empress.c
-+++ b/drivers/media/pci/saa7134/saa7134-empress.c
-@@ -189,7 +189,6 @@ static int empress_g_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
- f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
- f->fmt.pix.bytesperline = 0;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -207,7 +206,6 @@ static int empress_s_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
- f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
- f->fmt.pix.bytesperline = 0;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -225,7 +223,6 @@ static int empress_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
- f->fmt.pix.sizeimage = TS_PACKET_SIZE * dev->ts.nr_packets;
- f->fmt.pix.bytesperline = 0;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c
-index 40396e8b16a8..c8c22156991b 100644
---- a/drivers/media/pci/saa7134/saa7134-video.c
-+++ b/drivers/media/pci/saa7134/saa7134-video.c
-@@ -1347,7 +1347,6 @@ static int saa7134_g_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.sizeimage =
- f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
- return 0;
- }
-
-@@ -1429,7 +1428,6 @@ static int saa7134_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.sizeimage =
- f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c
-index e5cfb6cfa18d..7219c598ef50 100644
---- a/drivers/media/pci/sta2x11/sta2x11_vip.c
-+++ b/drivers/media/pci/sta2x11/sta2x11_vip.c
-@@ -642,7 +642,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
- f->fmt.pix.sizeimage = f->fmt.pix.width * 2 * f->fmt.pix.height;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
- return 0;
- }
-
-diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c
-index 61f3dbcc259f..21c31bc5c380 100644
---- a/drivers/media/platform/coda.c
-+++ b/drivers/media/platform/coda.c
-@@ -613,8 +613,6 @@ static int coda_try_fmt(struct coda_ctx *ctx, struct coda_codec *codec,
- BUG();
- }
-
-- f->fmt.pix.priv = 0;
--
- return 0;
- }
-
-diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c
-index dfd0a21a0658..17b44401948e 100644
---- a/drivers/media/platform/omap/omap_vout.c
-+++ b/drivers/media/platform/omap/omap_vout.c
-@@ -165,7 +165,6 @@ static int omap_vout_try_format(struct v4l2_pix_format *pix)
-
- pix->pixelformat = omap_formats[ifmt].pixelformat;
- pix->field = V4L2_FIELD_ANY;
-- pix->priv = 0;
-
- switch (pix->pixelformat) {
- case V4L2_PIX_FMT_YUYV:
-@@ -1895,7 +1894,6 @@ static int __init omap_vout_setup_video_data(struct omap_vout_device *vout)
- pix->field = V4L2_FIELD_ANY;
- pix->bytesperline = pix->width * 2;
- pix->sizeimage = pix->bytesperline * pix->height;
-- pix->priv = 0;
- pix->colorspace = V4L2_COLORSPACE_JPEG;
-
- vout->bpp = RGB565_BPP;
-diff --git a/drivers/media/platform/sh_veu.c b/drivers/media/platform/sh_veu.c
-index 744e43b480bc..8dc279d4d561 100644
---- a/drivers/media/platform/sh_veu.c
-+++ b/drivers/media/platform/sh_veu.c
-@@ -425,7 +425,6 @@ static int sh_veu_g_fmt(struct sh_veu_file *veu_file, struct v4l2_format *f)
- pix->bytesperline = vfmt->bytesperline;
- pix->sizeimage = vfmt->bytesperline * pix->height *
- vfmt->fmt->depth / vfmt->fmt->ydepth;
-- pix->priv = 0;
- dev_dbg(veu->dev, "%s(): type: %d, size %u @ %ux%u, fmt %x\n", __func__,
- f->type, pix->sizeimage, pix->width, pix->height, pix->pixelformat);
-
-@@ -473,7 +472,6 @@ static int sh_veu_try_fmt(struct v4l2_format *f, const struct sh_veu_format *fmt
-
- pix->pixelformat = fmt->fourcc;
- pix->colorspace = sh_veu_4cc2cspace(pix->pixelformat);
-- pix->priv = 0;
-
- pr_debug("%s(): type: %d, size %u\n", __func__, f->type, pix->sizeimage);
-
-diff --git a/drivers/media/platform/vino.c b/drivers/media/platform/vino.c
-index c6af974c5b45..e58796e66ab1 100644
---- a/drivers/media/platform/vino.c
-+++ b/drivers/media/platform/vino.c
-@@ -3147,7 +3147,6 @@ static int vino_try_fmt_vid_cap(struct file *file, void *__fh,
- pf->colorspace =
- vino_data_formats[tempvcs.data_format].colorspace;
-
-- pf->priv = 0;
- return 0;
- }
-
-@@ -3175,8 +3174,6 @@ static int vino_g_fmt_vid_cap(struct file *file, void *__fh,
- pf->colorspace =
- vino_data_formats[vcs->data_format].colorspace;
-
-- pf->priv = 0;
--
- spin_unlock_irqrestore(&vino_drvdata->input_lock, flags);
- return 0;
- }
-@@ -3219,8 +3216,6 @@ static int vino_s_fmt_vid_cap(struct file *file, void *__fh,
- pf->colorspace =
- vino_data_formats[vcs->data_format].colorspace;
-
-- pf->priv = 0;
--
- spin_unlock_irqrestore(&vino_drvdata->input_lock, flags);
- return 0;
- }
-diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c
-index 2d4e73b45c5e..4807225d63db 100644
---- a/drivers/media/platform/vivi.c
-+++ b/drivers/media/platform/vivi.c
-@@ -1015,7 +1015,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
- else
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SRGB;
-- f->fmt.pix.priv = 0;
- return 0;
- }
-
-diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c
-index 2f63029e7a36..78a2e34a3286 100644
---- a/drivers/media/usb/cx231xx/cx231xx-417.c
-+++ b/drivers/media/usb/cx231xx/cx231xx-417.c
-@@ -1563,7 +1563,6 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.width = dev->ts1.width;
- f->fmt.pix.height = dev->ts1.height;
- f->fmt.pix.field = V4L2_FIELD_INTERLACED;
-- f->fmt.pix.priv = 0;
- dprintk(1, "VIDIOC_G_FMT: w: %d, h: %d\n",
- dev->ts1.width, dev->ts1.height);
- dprintk(3, "exit vidioc_g_fmt_vid_cap()\n");
-@@ -1582,7 +1581,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.sizeimage = mpeglines * mpeglinesize;
- f->fmt.pix.field = V4L2_FIELD_INTERLACED;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-- f->fmt.pix.priv = 0;
- dprintk(1, "VIDIOC_TRY_FMT: w: %d, h: %d\n",
- dev->ts1.width, dev->ts1.height);
- dprintk(3, "exit vidioc_try_fmt_vid_cap()\n");
-diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
-index 990626101718..71f10832f97b 100644
---- a/drivers/media/usb/cx231xx/cx231xx-video.c
-+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
-@@ -886,7 +886,6 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-
- f->fmt.pix.field = V4L2_FIELD_INTERLACED;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -931,7 +930,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * height;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
- f->fmt.pix.field = V4L2_FIELD_INTERLACED;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-diff --git a/drivers/media/usb/gspca/gspca.c b/drivers/media/usb/gspca/gspca.c
-index f3a7ace0fac9..1b3d7bf8dab6 100644
---- a/drivers/media/usb/gspca/gspca.c
-+++ b/drivers/media/usb/gspca/gspca.c
-@@ -1102,8 +1102,8 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
- struct gspca_dev *gspca_dev = video_drvdata(file);
-
- fmt->fmt.pix = gspca_dev->pixfmt;
-- /* some drivers use priv internally, zero it before giving it to
-- userspace */
-+ /* some drivers use priv internally, zero it before giving it back to
-+ the core */
- fmt->fmt.pix.priv = 0;
- return 0;
- }
-@@ -1139,8 +1139,8 @@ static int try_fmt_vid_cap(struct gspca_dev *gspca_dev,
- fmt->fmt.pix.height = h;
- gspca_dev->sd_desc->try_fmt(gspca_dev, fmt);
- }
-- /* some drivers use priv internally, zero it before giving it to
-- userspace */
-+ /* some drivers use priv internally, zero it before giving it back to
-+ the core */
- fmt->fmt.pix.priv = 0;
- return mode; /* used when s_fmt */
- }
-diff --git a/drivers/media/usb/hdpvr/hdpvr-video.c b/drivers/media/usb/hdpvr/hdpvr-video.c
-index 6bce01a674f9..caeae8ff365b 100644
---- a/drivers/media/usb/hdpvr/hdpvr-video.c
-+++ b/drivers/media/usb/hdpvr/hdpvr-video.c
-@@ -1022,7 +1022,6 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *_fh,
- f->fmt.pix.pixelformat = V4L2_PIX_FMT_MPEG;
- f->fmt.pix.sizeimage = dev->bulk_in_size;
- f->fmt.pix.bytesperline = 0;
-- f->fmt.pix.priv = 0;
- if (f->fmt.pix.width == 720) {
- /* SDTV formats */
- f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
-diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c
-index be77482c3070..adfa8320849a 100644
---- a/drivers/media/usb/stkwebcam/stk-webcam.c
-+++ b/drivers/media/usb/stkwebcam/stk-webcam.c
-@@ -923,7 +923,6 @@ static int stk_vidioc_g_fmt_vid_cap(struct file *filp,
- pix_format->bytesperline = 2 * pix_format->width;
- pix_format->sizeimage = pix_format->bytesperline
- * pix_format->height;
-- pix_format->priv = 0;
- return 0;
- }
-
-@@ -967,7 +966,6 @@ static int stk_try_fmt_vid_cap(struct file *filp,
- fmtd->fmt.pix.bytesperline = 2 * fmtd->fmt.pix.width;
- fmtd->fmt.pix.sizeimage = fmtd->fmt.pix.bytesperline
- * fmtd->fmt.pix.height;
-- fmtd->fmt.pix.priv = 0;
- return 0;
- }
-
-diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c
-index 8df668d06552..8cd7f02fcf9f 100644
---- a/drivers/media/usb/tlg2300/pd-video.c
-+++ b/drivers/media/usb/tlg2300/pd-video.c
-@@ -1321,7 +1321,6 @@ static void init_video_context(struct running_context *context)
- .bytesperline = 720 * 2,
- .sizeimage = 720 * 576 * 2,
- .colorspace = V4L2_COLORSPACE_SMPTE170M,
-- .priv = 0
- };
- }
-
-diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c
-index cc1aa14996ff..97ad689c794e 100644
---- a/drivers/media/usb/tm6000/tm6000-video.c
-+++ b/drivers/media/usb/tm6000/tm6000-video.c
-@@ -918,7 +918,6 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
- (f->fmt.pix.width * fh->fmt->depth) >> 3;
- f->fmt.pix.sizeimage =
- f->fmt.pix.height * f->fmt.pix.bytesperline;
-- f->fmt.pix.priv = 0;
-
- return 0;
- }
-@@ -959,7 +958,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.width &= ~0x01;
-
- f->fmt.pix.field = field;
-- f->fmt.pix.priv = 0;
-
- f->fmt.pix.bytesperline =
- (f->fmt.pix.width * fmt->depth) >> 3;
-diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c
-index 74d56df3347f..0f63954ee1d4 100644
---- a/drivers/media/usb/zr364xx/zr364xx.c
-+++ b/drivers/media/usb/zr364xx/zr364xx.c
-@@ -806,7 +806,6 @@ static int zr364xx_vidioc_try_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
- f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
-- f->fmt.pix.priv = 0;
- DBG("%s: V4L2_PIX_FMT_%s (%d) ok!\n", __func__,
- decode_fourcc(f->fmt.pix.pixelformat, pixelformat_name),
- f->fmt.pix.field);
-@@ -829,7 +828,6 @@ static int zr364xx_vidioc_g_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
- f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
-- f->fmt.pix.priv = 0;
- return 0;
- }
-
-@@ -866,7 +864,6 @@ static int zr364xx_vidioc_s_fmt_vid_cap(struct file *file, void *priv,
- f->fmt.pix.bytesperline = f->fmt.pix.width * 2;
- f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
- f->fmt.pix.colorspace = V4L2_COLORSPACE_JPEG;
-- f->fmt.pix.priv = 0;
- cam->vb_vidq.field = f->fmt.pix.field;
-
- if (f->fmt.pix.width == 160 && f->fmt.pix.height == 120)
-diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
-index fca336b65351..d0d6530c0b64 100644
---- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
-+++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c
-@@ -540,7 +540,16 @@ struct v4l2_framebuffer32 {
- __u32 capability;
- __u32 flags;
- compat_caddr_t base;
-- struct v4l2_pix_format fmt;
-+ struct {
-+ __u32 width;
-+ __u32 height;
-+ __u32 pixelformat;
-+ __u32 field;
-+ __u32 bytesperline;
-+ __u32 sizeimage;
-+ __u32 colorspace;
-+ __u32 priv;
-+ } fmt;
- };
-
- static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_framebuffer32 __user *up)
-@@ -550,10 +559,10 @@ static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_frame
- if (!access_ok(VERIFY_READ, up, sizeof(struct v4l2_framebuffer32)) ||
- get_user(tmp, &up->base) ||
- get_user(kp->capability, &up->capability) ||
-- get_user(kp->flags, &up->flags))
-+ get_user(kp->flags, &up->flags) ||
-+ copy_from_user(&kp->fmt, &up->fmt, sizeof(up->fmt)))
- return -EFAULT;
- kp->base = compat_ptr(tmp);
-- get_v4l2_pix_format(&kp->fmt, &up->fmt);
- return 0;
- }
-
-@@ -564,9 +573,9 @@ static int put_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_frame
- if (!access_ok(VERIFY_WRITE, up, sizeof(struct v4l2_framebuffer32)) ||
- put_user(tmp, &up->base) ||
- put_user(kp->capability, &up->capability) ||
-- put_user(kp->flags, &up->flags))
-+ put_user(kp->flags, &up->flags) ||
-+ copy_to_user(&up->fmt, &kp->fmt, sizeof(up->fmt)))
- return -EFAULT;
-- put_v4l2_pix_format(&kp->fmt, &up->fmt);
- return 0;
- }
-
-diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
-index 707aef705a47..feb9e3441c9d 100644
---- a/drivers/media/v4l2-core/v4l2-ioctl.c
-+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
-@@ -936,13 +936,48 @@ static int check_fmt(struct file *file, enum v4l2_buf_type type)
- return -EINVAL;
- }
-
-+static void v4l_sanitize_format(struct v4l2_format *fmt)
-+{
-+ unsigned int offset;
-+
-+ /*
-+ * The v4l2_pix_format structure has been extended with fields that were
-+ * not previously required to be set to zero by applications. The priv
-+ * field, when set to a magic value, indicates the the extended fields
-+ * are valid. Otherwise they will contain undefined values. To simplify
-+ * the API towards drivers zero the extended fields and set the priv
-+ * field to the magic value when the extended pixel format structure
-+ * isn't used by applications.
-+ */
-+
-+ if (fmt->type != V4L2_BUF_TYPE_VIDEO_CAPTURE &&
-+ fmt->type != V4L2_BUF_TYPE_VIDEO_OUTPUT)
-+ return;
-+
-+ if (fmt->fmt.pix.priv == V4L2_PIX_FMT_PRIV_MAGIC)
-+ return;
-+
-+ fmt->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
-+
-+ offset = offsetof(struct v4l2_pix_format, priv)
-+ + sizeof(fmt->fmt.pix.priv);
-+ memset(((void *)&fmt->fmt.pix) + offset, 0,
-+ sizeof(fmt->fmt.pix) - offset);
-+}
-+
- static int v4l_querycap(const struct v4l2_ioctl_ops *ops,
- struct file *file, void *fh, void *arg)
- {
- struct v4l2_capability *cap = (struct v4l2_capability *)arg;
-+ int ret;
-
- cap->version = LINUX_VERSION_CODE;
-- return ops->vidioc_querycap(file, fh, cap);
-+
-+ ret = ops->vidioc_querycap(file, fh, cap);
-+
-+ cap->capabilities |= V4L2_CAP_EXT_PIX_FORMAT;
-+
-+ return ret;
- }
-
- static int v4l_s_input(const struct v4l2_ioctl_ops *ops,
-@@ -1061,12 +1096,17 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops,
- bool is_vid = vfd->vfl_type == VFL_TYPE_GRABBER;
- bool is_rx = vfd->vfl_dir != VFL_DIR_TX;
- bool is_tx = vfd->vfl_dir != VFL_DIR_RX;
-+ int ret;
-+
-+ v4l_sanitize_format(p);
-
- switch (p->type) {
- case V4L2_BUF_TYPE_VIDEO_CAPTURE:
- if (unlikely(!is_rx || !is_vid || !ops->vidioc_g_fmt_vid_cap))
- break;
-- return ops->vidioc_g_fmt_vid_cap(file, fh, arg);
-+ ret = ops->vidioc_g_fmt_vid_cap(file, fh, arg);
-+ p->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
-+ return ret;
- case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
- if (unlikely(!is_rx || !is_vid || !ops->vidioc_g_fmt_vid_cap_mplane))
- break;
-@@ -1086,7 +1126,9 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops,
- case V4L2_BUF_TYPE_VIDEO_OUTPUT:
- if (unlikely(!is_tx || !is_vid || !ops->vidioc_g_fmt_vid_out))
- break;
-- return ops->vidioc_g_fmt_vid_out(file, fh, arg);
-+ ret = ops->vidioc_g_fmt_vid_out(file, fh, arg);
-+ p->fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
-+ return ret;
- case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
- if (unlikely(!is_tx || !is_vid || !ops->vidioc_g_fmt_vid_out_mplane))
- break;
-@@ -1446,7 +1488,18 @@ static int v4l_create_bufs(const struct v4l2_ioctl_ops *ops,
- struct v4l2_create_buffers *create = arg;
- int ret = check_fmt(file, create->format.type);
-
-- return ret ? ret : ops->vidioc_create_bufs(file, fh, create);
-+ if (ret)
-+ return ret;
-+
-+ v4l_sanitize_format(&create->format);
-+
-+ ret = ops->vidioc_create_bufs(file, fh, create);
-+
-+ if (create->format.type == V4L2_BUF_TYPE_VIDEO_CAPTURE ||
-+ create->format.type == V4L2_BUF_TYPE_VIDEO_OUTPUT)
-+ create->format.fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC;
-+
-+ return ret;
- }
-
- static int v4l_prepare_buf(const struct v4l2_ioctl_ops *ops,
-diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
-index 63274c1d037c..e6b41cf2c6b2 100644
---- a/include/uapi/linux/videodev2.h
-+++ b/include/uapi/linux/videodev2.h
-@@ -264,6 +264,7 @@ struct v4l2_capability {
- #define V4L2_CAP_RADIO 0x00040000 /* is a radio device */
- #define V4L2_CAP_MODULATOR 0x00080000 /* has a modulator */
-
-+#define V4L2_CAP_EXT_PIX_FORMAT 0x00200000 /* Supports the extended pixel format */
- #define V4L2_CAP_READWRITE 0x01000000 /* read/write systemcalls */
- #define V4L2_CAP_ASYNCIO 0x02000000 /* async I/O */
- #define V4L2_CAP_STREAMING 0x04000000 /* streaming I/O ioctls */
-@@ -439,6 +440,9 @@ struct v4l2_pix_format {
- #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */
- #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */
-
-+/* priv field value to indicates that subsequent fields are valid. */
-+#define V4L2_PIX_FMT_PRIV_MAGIC 0xdeadbeef
-+
- /*
- * F O R M A T E N U M E R A T I O N
- */
-@@ -732,7 +736,16 @@ struct v4l2_framebuffer {
- /* FIXME: in theory we should pass something like PCI device + memory
- * region + offset instead of some physical address */
- void *base;
-- struct v4l2_pix_format fmt;
-+ struct {
-+ __u32 width;
-+ __u32 height;
-+ __u32 pixelformat;
-+ __u32 field; /* enum v4l2_field */
-+ __u32 bytesperline; /* for padding, zero if unused */
-+ __u32 sizeimage;
-+ __u32 colorspace; /* enum v4l2_colorspace */
-+ __u32 priv; /* private data, depends on pixelformat */
-+ } fmt;
- };
- /* Flags for the 'capability' field. Read only */
- #define V4L2_FBUF_CAP_EXTERNOVERLAY 0x0001
---
-2.1.2
-
diff --git a/patches.renesas/0709-v4l-Add-premultiplied-alpha-flag-for-pixel-formats.patch b/patches.renesas/0709-v4l-Add-premultiplied-alpha-flag-for-pixel-formats.patch
deleted file mode 100644
index 4479307551e8d..0000000000000
--- a/patches.renesas/0709-v4l-Add-premultiplied-alpha-flag-for-pixel-formats.patch
+++ /dev/null
@@ -1,139 +0,0 @@
-From 2873c1c928f340ce5aed3d37b81b5ffa37b9cba5 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 15:12:43 +0200
-Subject: v4l: Add premultiplied alpha flag for pixel formats
-
-When set, the new V4L2_PIX_FMT_FLAG_PREMUL_ALPHA flag indicates that the
-pixel values are premultiplied by the alpha channel value.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit e6619dfbf287a75082ec04bc2a8d2df6e3a16299)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- Documentation/DocBook/media/v4l/v4l2.xml
----
- Documentation/DocBook/media/v4l/pixfmt.xml | 28 +++++++++++++++++++++++++++-
- drivers/media/v4l2-core/v4l2-ioctl.c | 5 +++--
- include/uapi/linux/videodev2.h | 8 +++++++-
- 3 files changed, 37 insertions(+), 4 deletions(-)
-
-diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml
-index 6e1e520a2750..75882a4b4d3d 100644
---- a/Documentation/DocBook/media/v4l/pixfmt.xml
-+++ b/Documentation/DocBook/media/v4l/pixfmt.xml
-@@ -126,6 +126,12 @@ extended fields were set to zero. On return drivers must set the
- <constant>V4L2_PIX_FMT_PRIV_MAGIC</constant> and all the extended field to
- applicable values.</para></entry>
- </row>
-+ <row>
-+ <entry>__u32</entry>
-+ <entry><structfield>flags</structfield></entry>
-+ <entry>Flags set by the application or driver, see <xref
-+linkend="format-flags" />.</entry>
-+ </row>
- </tbody>
- </tgroup>
- </table>
-@@ -211,9 +217,15 @@ codes can be used.</entry>
- and the number of valid entries in the
- <structfield>plane_fmt</structfield> array.</entry>
- </row>
-+ <row>
-+ <entry>__u8</entry>
-+ <entry><structfield>flags</structfield></entry>
-+ <entry>Flags set by the application or driver, see <xref
-+linkend="format-flags" />.</entry>
-+ </row>
- <row>
- <entry>__u8</entry>
-- <entry><structfield>reserved[11]</structfield></entry>
-+ <entry><structfield>reserved[10]</structfield></entry>
- <entry>Reserved for future extensions. Should be zeroed by the
- application.</entry>
- </row>
-@@ -1059,4 +1071,18 @@ concatenated to form the JPEG stream. </para>
- </tbody>
- </tgroup>
- </table>
-+
-+ <table frame="none" pgwide="1" id="format-flags">
-+ <title>Format Flags</title>
-+ <tgroup cols="3">
-+ &cs-def;
-+ <tbody valign="top">
-+ <row>
-+ <entry><constant>V4L2_PIX_FMT_FLAG_PREMUL_ALPHA</constant></entry>
-+ <entry>0x00000001</entry>
-+ <entry>The pixel values are premultiplied by the alpha channel value.</entry>
-+ </row>
-+ </tbody>
-+ </tgroup>
-+ </table>
- </section>
-diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c
-index feb9e3441c9d..9692009cfc4e 100644
---- a/drivers/media/v4l2-core/v4l2-ioctl.c
-+++ b/drivers/media/v4l2-core/v4l2-ioctl.c
-@@ -254,7 +254,8 @@ static void v4l_print_format(const void *arg, bool write_only)
- pix = &p->fmt.pix;
- pr_cont(", width=%u, height=%u, "
- "pixelformat=%c%c%c%c, field=%s, "
-- "bytesperline=%u, sizeimage=%u, colorspace=%d\n",
-+ "bytesperline=%u, sizeimage=%u, colorspace=%d, "
-+ "flags %u\n",
- pix->width, pix->height,
- (pix->pixelformat & 0xff),
- (pix->pixelformat >> 8) & 0xff,
-@@ -262,7 +263,7 @@ static void v4l_print_format(const void *arg, bool write_only)
- (pix->pixelformat >> 24) & 0xff,
- prt_names(pix->field, v4l2_field_names),
- pix->bytesperline, pix->sizeimage,
-- pix->colorspace);
-+ pix->colorspace, pix->flags);
- break;
- case V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE:
- case V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE:
-diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
-index e6b41cf2c6b2..8d6646ea9c33 100644
---- a/include/uapi/linux/videodev2.h
-+++ b/include/uapi/linux/videodev2.h
-@@ -283,6 +283,7 @@ struct v4l2_pix_format {
- __u32 sizeimage;
- __u32 colorspace; /* enum v4l2_colorspace */
- __u32 priv; /* private data, depends on pixelformat */
-+ __u32 flags; /* format flags (V4L2_PIX_FMT_FLAG_*) */
- };
-
- /* Pixel format FOURCC depth Description */
-@@ -443,6 +444,9 @@ struct v4l2_pix_format {
- /* priv field value to indicates that subsequent fields are valid. */
- #define V4L2_PIX_FMT_PRIV_MAGIC 0xdeadbeef
-
-+/* Flags */
-+#define V4L2_PIX_FMT_FLAG_PREMUL_ALPHA 0x00000001
-+
- /*
- * F O R M A T E N U M E R A T I O N
- */
-@@ -1699,6 +1703,7 @@ struct v4l2_plane_pix_format {
- * @colorspace: enum v4l2_colorspace; supplemental to pixelformat
- * @plane_fmt: per-plane information
- * @num_planes: number of planes for this format
-+ * @flags: format flags (V4L2_PIX_FMT_FLAG_*)
- */
- struct v4l2_pix_format_mplane {
- __u32 width;
-@@ -1709,7 +1714,8 @@ struct v4l2_pix_format_mplane {
-
- struct v4l2_plane_pix_format plane_fmt[VIDEO_MAX_PLANES];
- __u8 num_planes;
-- __u8 reserved[11];
-+ __u8 flags;
-+ __u8 reserved[10];
- } __attribute__ ((packed));
-
- /**
---
-2.1.2
-
diff --git a/patches.renesas/0710-v4l-vb2-Fix-stream-start-and-buffer-completion-race.patch b/patches.renesas/0710-v4l-vb2-Fix-stream-start-and-buffer-completion-race.patch
deleted file mode 100644
index 04897cd360633..0000000000000
--- a/patches.renesas/0710-v4l-vb2-Fix-stream-start-and-buffer-completion-race.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From dbe3c838841c240191362b722a7f1109ef1b077f Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 23 Jun 2014 23:00:22 +0200
-Subject: v4l: vb2: Fix stream start and buffer completion race
-
-videobuf2 stores the driver streaming state internally in the queue in
-the start_streaming_called variable. The state is set right after the
-driver start_stream operation returns, and checked in the
-vb2_buffer_done() function, typically called from the frame completion
-interrupt handler. A race condition exists if the hardware finishes
-processing the first frame before the start_stream operation returns.
-
-Fix this by setting start_streaming_called to 1 before calling the
-start_stream operation, and resetting it to 0 if the operation fails.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-(cherry picked from commit 752bfe5395aa0609def7292c97a37c314ace5837)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- drivers/media/v4l2-core/videobuf2-core.c
----
- drivers/media/v4l2-core/videobuf2-core.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
---- a/drivers/media/v4l2-core/videobuf2-core.c
-+++ b/drivers/media/v4l2-core/videobuf2-core.c
-@@ -1429,12 +1429,14 @@ static int vb2_start_streaming(struct vb
- __enqueue_in_driver(vb);
-
- /* Tell the driver to start streaming */
-+ q->start_streaming_called = 1;
- ret = call_qop(q, start_streaming, q,
- atomic_read(&q->owned_by_drv_count));
-- q->start_streaming_called = ret == 0;
- if (!ret)
- return 0;
-
-+ q->start_streaming_called = 0;
-+
- dprintk(1, "qbuf: driver refused to start streaming\n");
- if (WARN_ON(atomic_read(&q->owned_by_drv_count))) {
- unsigned i;
diff --git a/patches.renesas/0711-PCI-rcar-Remove-redundant-config-accessor-register-n.patch b/patches.renesas/0711-PCI-rcar-Remove-redundant-config-accessor-register-n.patch
deleted file mode 100644
index 45139fd658e2d..0000000000000
--- a/patches.renesas/0711-PCI-rcar-Remove-redundant-config-accessor-register-n.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From eabaac5c3ed4be41aa240d07bf82fd9fd1ad5f81 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Fri, 27 Jun 2014 18:59:13 +0400
-Subject: PCI: rcar: Remove redundant config accessor register number checks
-
-The PCI core will have already checked the configuration register address
-before calling the {read|write}() methods; so don't check it again in these
-methods.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Acked-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8eb12c3b420fb5243ce9b4a8878f3b88a3c91e33)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/pcie-rcar.c | 10 ----------
- 1 file changed, 10 deletions(-)
-
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-index 8e06124aa80f..c06b88846764 100644
---- a/drivers/pci/host/pcie-rcar.c
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -260,11 +260,6 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
- struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
- int ret;
-
-- if ((size == 2) && (where & 1))
-- return PCIBIOS_BAD_REGISTER_NUMBER;
-- else if ((size == 4) && (where & 3))
-- return PCIBIOS_BAD_REGISTER_NUMBER;
--
- ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
- bus, devfn, where, val);
- if (ret != PCIBIOS_SUCCESSFUL) {
-@@ -292,11 +287,6 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
- int shift, ret;
- u32 data;
-
-- if ((size == 2) && (where & 1))
-- return PCIBIOS_BAD_REGISTER_NUMBER;
-- else if ((size == 4) && (where & 3))
-- return PCIBIOS_BAD_REGISTER_NUMBER;
--
- ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
- bus, devfn, where, &data);
- if (ret != PCIBIOS_SUCCESSFUL)
---
-2.1.2
-
diff --git a/patches.renesas/0712-PCI-rcar-Use-correct-initial-HW-settings.patch b/patches.renesas/0712-PCI-rcar-Use-correct-initial-HW-settings.patch
deleted file mode 100644
index 131cdc8c034a3..0000000000000
--- a/patches.renesas/0712-PCI-rcar-Use-correct-initial-HW-settings.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 9be63ab64057d7450d9201429a34add28104a0f9 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Mon, 30 Jun 2014 08:54:22 +0100
-Subject: PCI: rcar: Use correct initial HW settings
-
-Although the R-Car PCIe driver works as it is, there are a number of
-incorrect settings that this patch corrects. It corrects:
- - enabling the PCI Express Extended Cap ID.
- - setting Data Link Layer Link Active Reporting Capable.
- - terminating list of capabilities.
-
-It also removes enabling the MAC data scrambling as this is the default HW
-setting, and removes incorrect code to enable slave bus mastering as this
-is done by the PCI core.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2c3fd4c935880d756cb57f4bcdb35bb4b8348ec8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/pcie-rcar.c | 15 ++++-----------
- 1 file changed, 4 insertions(+), 11 deletions(-)
-
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-index c06b88846764..680a8ccdcc24 100644
---- a/drivers/pci/host/pcie-rcar.c
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -483,14 +483,15 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
- rcar_rmw32(pcie, RCONF(PCI_SUBORDINATE_BUS), 0xff, 1);
-
- /* Initialize default capabilities. */
-- rcar_rmw32(pcie, REXPCAP(0), 0, PCI_CAP_ID_EXP);
-+ rcar_rmw32(pcie, REXPCAP(0), 0xff, PCI_CAP_ID_EXP);
- rcar_rmw32(pcie, REXPCAP(PCI_EXP_FLAGS),
- PCI_EXP_FLAGS_TYPE, PCI_EXP_TYPE_ROOT_PORT << 4);
- rcar_rmw32(pcie, RCONF(PCI_HEADER_TYPE), 0x7f,
- PCI_HEADER_TYPE_BRIDGE);
-
- /* Enable data link layer active state reporting */
-- rcar_rmw32(pcie, REXPCAP(PCI_EXP_LNKCAP), 0, PCI_EXP_LNKCAP_DLLLARC);
-+ rcar_rmw32(pcie, REXPCAP(PCI_EXP_LNKCAP), PCI_EXP_LNKCAP_DLLLARC,
-+ PCI_EXP_LNKCAP_DLLLARC);
-
- /* Write out the physical slot number = 0 */
- rcar_rmw32(pcie, REXPCAP(PCI_EXP_SLTCAP), PCI_EXP_SLTCAP_PSN, 0);
-@@ -499,10 +500,7 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
- rcar_rmw32(pcie, TLCTLR+1, 0x3f, 50);
-
- /* Terminate list of capabilities (Next Capability Offset=0) */
-- rcar_rmw32(pcie, RVCCAP(0), 0xfff0, 0);
--
-- /* Enable MAC data scrambling. */
-- rcar_rmw32(pcie, MACCTLR, SCRAMBLE_DISABLE, 0);
-+ rcar_rmw32(pcie, RVCCAP(0), 0xfff00000, 0);
-
- /* Enable MSI */
- if (IS_ENABLED(CONFIG_PCI_MSI))
-@@ -519,11 +517,6 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
- /* Enable INTx interrupts */
- rcar_rmw32(pcie, PCIEINTXR, 0, 0xF << 8);
-
-- /* Enable slave Bus Mastering */
-- rcar_rmw32(pcie, RCONF(PCI_STATUS), PCI_STATUS_DEVSEL_MASK,
-- PCI_COMMAND_IO | PCI_COMMAND_MEMORY | PCI_COMMAND_MASTER |
-- PCI_STATUS_CAP_LIST | PCI_STATUS_DEVSEL_FAST);
--
- wmb();
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0713-PCI-rcar-Cleanup-style-and-formatting.patch b/patches.renesas/0713-PCI-rcar-Cleanup-style-and-formatting.patch
deleted file mode 100644
index 594dc3da6288e..0000000000000
--- a/patches.renesas/0713-PCI-rcar-Cleanup-style-and-formatting.patch
+++ /dev/null
@@ -1,406 +0,0 @@
-From c3bafe6cf688577efac87e66a4415889f3777d31 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Mon, 30 Jun 2014 08:54:23 +0100
-Subject: PCI: rcar: Cleanup style and formatting
-
-This patch just makes symbol and function name changes to avoid potential
-conflicts, along with minor formatting changes.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b77188495de64abb5393cb96ac5ec518cf386310)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/pcie-rcar.c | 124 ++++++++++++++++++++++---------------------
- 1 file changed, 63 insertions(+), 61 deletions(-)
-
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-index 680a8ccdcc24..758e2b4645f1 100644
---- a/drivers/pci/host/pcie-rcar.c
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -105,7 +105,7 @@
- #define PCIE_CONF_DEV(d) (((d) & 0x1f) << 19)
- #define PCIE_CONF_FUNC(f) (((f) & 0x7) << 16)
-
--#define PCI_MAX_RESOURCES 4
-+#define RCAR_PCI_MAX_RESOURCES 4
- #define MAX_NR_INBOUND_MAPS 6
-
- struct rcar_msi {
-@@ -127,7 +127,7 @@ static inline struct rcar_msi *to_rcar_msi(struct msi_chip *chip)
- struct rcar_pcie {
- struct device *dev;
- void __iomem *base;
-- struct resource res[PCI_MAX_RESOURCES];
-+ struct resource res[RCAR_PCI_MAX_RESOURCES];
- struct resource busn;
- int root_bus_nr;
- struct clk *clk;
-@@ -140,36 +140,37 @@ static inline struct rcar_pcie *sys_to_pcie(struct pci_sys_data *sys)
- return sys->private_data;
- }
-
--static void pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
-- unsigned long reg)
-+static void rcar_pci_write_reg(struct rcar_pcie *pcie, unsigned long val,
-+ unsigned long reg)
- {
- writel(val, pcie->base + reg);
- }
-
--static unsigned long pci_read_reg(struct rcar_pcie *pcie, unsigned long reg)
-+static unsigned long rcar_pci_read_reg(struct rcar_pcie *pcie,
-+ unsigned long reg)
- {
- return readl(pcie->base + reg);
- }
-
- enum {
-- PCI_ACCESS_READ,
-- PCI_ACCESS_WRITE,
-+ RCAR_PCI_ACCESS_READ,
-+ RCAR_PCI_ACCESS_WRITE,
- };
-
- static void rcar_rmw32(struct rcar_pcie *pcie, int where, u32 mask, u32 data)
- {
- int shift = 8 * (where & 3);
-- u32 val = pci_read_reg(pcie, where & ~3);
-+ u32 val = rcar_pci_read_reg(pcie, where & ~3);
-
- val &= ~(mask << shift);
- val |= data << shift;
-- pci_write_reg(pcie, val, where & ~3);
-+ rcar_pci_write_reg(pcie, val, where & ~3);
- }
-
- static u32 rcar_read_conf(struct rcar_pcie *pcie, int where)
- {
- int shift = 8 * (where & 3);
-- u32 val = pci_read_reg(pcie, where & ~3);
-+ u32 val = rcar_pci_read_reg(pcie, where & ~3);
-
- return val >> shift;
- }
-@@ -205,14 +206,14 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie,
- if (dev != 0)
- return PCIBIOS_DEVICE_NOT_FOUND;
-
-- if (access_type == PCI_ACCESS_READ) {
-- *data = pci_read_reg(pcie, PCICONF(index));
-+ if (access_type == RCAR_PCI_ACCESS_READ) {
-+ *data = rcar_pci_read_reg(pcie, PCICONF(index));
- } else {
- /* Keep an eye out for changes to the root bus number */
- if (pci_is_root_bus(bus) && (reg == PCI_PRIMARY_BUS))
- pcie->root_bus_nr = *data & 0xff;
-
-- pci_write_reg(pcie, *data, PCICONF(index));
-+ rcar_pci_write_reg(pcie, *data, PCICONF(index));
- }
-
- return PCIBIOS_SUCCESSFUL;
-@@ -222,20 +223,20 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie,
- return PCIBIOS_DEVICE_NOT_FOUND;
-
- /* Clear errors */
-- pci_write_reg(pcie, pci_read_reg(pcie, PCIEERRFR), PCIEERRFR);
-+ rcar_pci_write_reg(pcie, rcar_pci_read_reg(pcie, PCIEERRFR), PCIEERRFR);
-
- /* Set the PIO address */
-- pci_write_reg(pcie, PCIE_CONF_BUS(bus->number) | PCIE_CONF_DEV(dev) |
-- PCIE_CONF_FUNC(func) | reg, PCIECAR);
-+ rcar_pci_write_reg(pcie, PCIE_CONF_BUS(bus->number) |
-+ PCIE_CONF_DEV(dev) | PCIE_CONF_FUNC(func) | reg, PCIECAR);
-
- /* Enable the configuration access */
- if (bus->parent->number == pcie->root_bus_nr)
-- pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR);
-+ rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE0, PCIECCTLR);
- else
-- pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR);
-+ rcar_pci_write_reg(pcie, CONFIG_SEND_ENABLE | TYPE1, PCIECCTLR);
-
- /* Check for errors */
-- if (pci_read_reg(pcie, PCIEERRFR) & UNSUPPORTED_REQUEST)
-+ if (rcar_pci_read_reg(pcie, PCIEERRFR) & UNSUPPORTED_REQUEST)
- return PCIBIOS_DEVICE_NOT_FOUND;
-
- /* Check for master and target aborts */
-@@ -243,13 +244,13 @@ static int rcar_pcie_config_access(struct rcar_pcie *pcie,
- (PCI_STATUS_REC_MASTER_ABORT | PCI_STATUS_REC_TARGET_ABORT))
- return PCIBIOS_DEVICE_NOT_FOUND;
-
-- if (access_type == PCI_ACCESS_READ)
-- *data = pci_read_reg(pcie, PCIECDR);
-+ if (access_type == RCAR_PCI_ACCESS_READ)
-+ *data = rcar_pci_read_reg(pcie, PCIECDR);
- else
-- pci_write_reg(pcie, *data, PCIECDR);
-+ rcar_pci_write_reg(pcie, *data, PCIECDR);
-
- /* Disable the configuration access */
-- pci_write_reg(pcie, 0, PCIECCTLR);
-+ rcar_pci_write_reg(pcie, 0, PCIECCTLR);
-
- return PCIBIOS_SUCCESSFUL;
- }
-@@ -260,7 +261,7 @@ static int rcar_pcie_read_conf(struct pci_bus *bus, unsigned int devfn,
- struct rcar_pcie *pcie = sys_to_pcie(bus->sysdata);
- int ret;
-
-- ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
-+ ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ,
- bus, devfn, where, val);
- if (ret != PCIBIOS_SUCCESSFUL) {
- *val = 0xffffffff;
-@@ -287,7 +288,7 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
- int shift, ret;
- u32 data;
-
-- ret = rcar_pcie_config_access(pcie, PCI_ACCESS_READ,
-+ ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_READ,
- bus, devfn, where, &data);
- if (ret != PCIBIOS_SUCCESSFUL)
- return ret;
-@@ -307,7 +308,7 @@ static int rcar_pcie_write_conf(struct pci_bus *bus, unsigned int devfn,
- } else
- data = val;
-
-- ret = rcar_pcie_config_access(pcie, PCI_ACCESS_WRITE,
-+ ret = rcar_pcie_config_access(pcie, RCAR_PCI_ACCESS_WRITE,
- bus, devfn, where, &data);
-
- return ret;
-@@ -325,7 +326,7 @@ static void rcar_pcie_setup_window(int win, struct resource *res,
- resource_size_t size;
- u32 mask;
-
-- pci_write_reg(pcie, 0x00000000, PCIEPTCTLR(win));
-+ rcar_pci_write_reg(pcie, 0x00000000, PCIEPTCTLR(win));
-
- /*
- * The PAMR mask is calculated in units of 128Bytes, which
-@@ -333,17 +334,17 @@ static void rcar_pcie_setup_window(int win, struct resource *res,
- */
- size = resource_size(res);
- mask = (roundup_pow_of_two(size) / SZ_128) - 1;
-- pci_write_reg(pcie, mask << 7, PCIEPAMR(win));
-+ rcar_pci_write_reg(pcie, mask << 7, PCIEPAMR(win));
-
-- pci_write_reg(pcie, upper_32_bits(res->start), PCIEPARH(win));
-- pci_write_reg(pcie, lower_32_bits(res->start), PCIEPARL(win));
-+ rcar_pci_write_reg(pcie, upper_32_bits(res->start), PCIEPARH(win));
-+ rcar_pci_write_reg(pcie, lower_32_bits(res->start), PCIEPARL(win));
-
- /* First resource is for IO */
- mask = PAR_ENABLE;
- if (res->flags & IORESOURCE_IO)
- mask |= IO_SPACE;
-
-- pci_write_reg(pcie, mask, PCIEPTCTLR(win));
-+ rcar_pci_write_reg(pcie, mask, PCIEPTCTLR(win));
- }
-
- static int rcar_pcie_setup(int nr, struct pci_sys_data *sys)
-@@ -355,7 +356,7 @@ static int rcar_pcie_setup(int nr, struct pci_sys_data *sys)
- pcie->root_bus_nr = -1;
-
- /* Setup PCI resources */
-- for (i = 0; i < PCI_MAX_RESOURCES; i++) {
-+ for (i = 0; i < RCAR_PCI_MAX_RESOURCES; i++) {
-
- res = &pcie->res[i];
- if (!res->flags)
-@@ -407,7 +408,7 @@ static int phy_wait_for_ack(struct rcar_pcie *pcie)
- unsigned int timeout = 100;
-
- while (timeout--) {
-- if (pci_read_reg(pcie, H1_PCIEPHYADRR) & PHY_ACK)
-+ if (rcar_pci_read_reg(pcie, H1_PCIEPHYADRR) & PHY_ACK)
- return 0;
-
- udelay(100);
-@@ -430,15 +431,15 @@ static void phy_write_reg(struct rcar_pcie *pcie,
- ((addr & 0xff) << ADR_POS);
-
- /* Set write data */
-- pci_write_reg(pcie, data, H1_PCIEPHYDOUTR);
-- pci_write_reg(pcie, phyaddr, H1_PCIEPHYADRR);
-+ rcar_pci_write_reg(pcie, data, H1_PCIEPHYDOUTR);
-+ rcar_pci_write_reg(pcie, phyaddr, H1_PCIEPHYADRR);
-
- /* Ignore errors as they will be dealt with if the data link is down */
- phy_wait_for_ack(pcie);
-
- /* Clear command */
-- pci_write_reg(pcie, 0, H1_PCIEPHYDOUTR);
-- pci_write_reg(pcie, 0, H1_PCIEPHYADRR);
-+ rcar_pci_write_reg(pcie, 0, H1_PCIEPHYDOUTR);
-+ rcar_pci_write_reg(pcie, 0, H1_PCIEPHYADRR);
-
- /* Ignore errors as they will be dealt with if the data link is down */
- phy_wait_for_ack(pcie);
-@@ -449,7 +450,7 @@ static int rcar_pcie_wait_for_dl(struct rcar_pcie *pcie)
- unsigned int timeout = 10;
-
- while (timeout--) {
-- if ((pci_read_reg(pcie, PCIETSTR) & DATA_LINK_ACTIVE))
-+ if ((rcar_pci_read_reg(pcie, PCIETSTR) & DATA_LINK_ACTIVE))
- return 0;
-
- msleep(5);
-@@ -463,17 +464,17 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
- int err;
-
- /* Begin initialization */
-- pci_write_reg(pcie, 0, PCIETCTLR);
-+ rcar_pci_write_reg(pcie, 0, PCIETCTLR);
-
- /* Set mode */
-- pci_write_reg(pcie, 1, PCIEMSR);
-+ rcar_pci_write_reg(pcie, 1, PCIEMSR);
-
- /*
- * Initial header for port config space is type 1, set the device
- * class to match. Hardware takes care of propagating the IDSETR
- * settings, so there is no need to bother with a quirk.
- */
-- pci_write_reg(pcie, PCI_CLASS_BRIDGE_PCI << 16, IDSETR1);
-+ rcar_pci_write_reg(pcie, PCI_CLASS_BRIDGE_PCI << 16, IDSETR1);
-
- /*
- * Setup Secondary Bus Number & Subordinate Bus Number, even though
-@@ -497,17 +498,17 @@ static int rcar_pcie_hw_init(struct rcar_pcie *pcie)
- rcar_rmw32(pcie, REXPCAP(PCI_EXP_SLTCAP), PCI_EXP_SLTCAP_PSN, 0);
-
- /* Set the completion timer timeout to the maximum 50ms. */
-- rcar_rmw32(pcie, TLCTLR+1, 0x3f, 50);
-+ rcar_rmw32(pcie, TLCTLR + 1, 0x3f, 50);
-
- /* Terminate list of capabilities (Next Capability Offset=0) */
- rcar_rmw32(pcie, RVCCAP(0), 0xfff00000, 0);
-
- /* Enable MSI */
- if (IS_ENABLED(CONFIG_PCI_MSI))
-- pci_write_reg(pcie, 0x101f0000, PCIEMSITXR);
-+ rcar_pci_write_reg(pcie, 0x101f0000, PCIEMSITXR);
-
- /* Finish initialization - establish a PCI Express link */
-- pci_write_reg(pcie, CFINIT, PCIETCTLR);
-+ rcar_pci_write_reg(pcie, CFINIT, PCIETCTLR);
-
- /* This will timeout if we don't have a link. */
- err = rcar_pcie_wait_for_dl(pcie);
-@@ -545,7 +546,7 @@ static int rcar_pcie_hw_init_h1(struct rcar_pcie *pcie)
- phy_write_reg(pcie, 0, 0x66, 0x1, 0x00008000);
-
- while (timeout--) {
-- if (pci_read_reg(pcie, H1_PCIEPHYSR))
-+ if (rcar_pci_read_reg(pcie, H1_PCIEPHYSR))
- return rcar_pcie_hw_init(pcie);
-
- msleep(5);
-@@ -584,7 +585,7 @@ static irqreturn_t rcar_pcie_msi_irq(int irq, void *data)
- struct rcar_msi *msi = &pcie->msi;
- unsigned long reg;
-
-- reg = pci_read_reg(pcie, PCIEMSIFR);
-+ reg = rcar_pci_read_reg(pcie, PCIEMSIFR);
-
- /* MSI & INTx share an interrupt - we only handle MSI here */
- if (!reg)
-@@ -595,7 +596,7 @@ static irqreturn_t rcar_pcie_msi_irq(int irq, void *data)
- unsigned int irq;
-
- /* clear the interrupt */
-- pci_write_reg(pcie, 1 << index, PCIEMSIFR);
-+ rcar_pci_write_reg(pcie, 1 << index, PCIEMSIFR);
-
- irq = irq_find_mapping(msi->domain, index);
- if (irq) {
-@@ -609,7 +610,7 @@ static irqreturn_t rcar_pcie_msi_irq(int irq, void *data)
- }
-
- /* see if there's any more pending in this vector */
-- reg = pci_read_reg(pcie, PCIEMSIFR);
-+ reg = rcar_pci_read_reg(pcie, PCIEMSIFR);
- }
-
- return IRQ_HANDLED;
-@@ -636,8 +637,8 @@ static int rcar_msi_setup_irq(struct msi_chip *chip, struct pci_dev *pdev,
-
- irq_set_msi_desc(irq, desc);
-
-- msg.address_lo = pci_read_reg(pcie, PCIEMSIALR) & ~MSIFE;
-- msg.address_hi = pci_read_reg(pcie, PCIEMSIAUR);
-+ msg.address_lo = rcar_pci_read_reg(pcie, PCIEMSIALR) & ~MSIFE;
-+ msg.address_hi = rcar_pci_read_reg(pcie, PCIEMSIAUR);
- msg.data = hwirq;
-
- write_msi_msg(irq, &msg);
-@@ -714,11 +715,11 @@ static int rcar_pcie_enable_msi(struct rcar_pcie *pcie)
- msi->pages = __get_free_pages(GFP_KERNEL, 0);
- base = virt_to_phys((void *)msi->pages);
-
-- pci_write_reg(pcie, base | MSIFE, PCIEMSIALR);
-- pci_write_reg(pcie, 0, PCIEMSIAUR);
-+ rcar_pci_write_reg(pcie, base | MSIFE, PCIEMSIALR);
-+ rcar_pci_write_reg(pcie, 0, PCIEMSIAUR);
-
- /* enable all MSI interrupts */
-- pci_write_reg(pcie, 0xffffffff, PCIEMSIIER);
-+ rcar_pci_write_reg(pcie, 0xffffffff, PCIEMSIIER);
-
- return 0;
-
-@@ -811,6 +812,7 @@ static int rcar_pcie_inbound_ranges(struct rcar_pcie *pcie,
- if (cpu_addr > 0) {
- unsigned long nr_zeros = __ffs64(cpu_addr);
- u64 alignment = 1ULL << nr_zeros;
-+
- size = min(range->size, alignment);
- } else {
- size = range->size;
-@@ -826,13 +828,13 @@ static int rcar_pcie_inbound_ranges(struct rcar_pcie *pcie,
- * Set up 64-bit inbound regions as the range parser doesn't
- * distinguish between 32 and 64-bit types.
- */
-- pci_write_reg(pcie, lower_32_bits(pci_addr), PCIEPRAR(idx));
-- pci_write_reg(pcie, lower_32_bits(cpu_addr), PCIELAR(idx));
-- pci_write_reg(pcie, lower_32_bits(mask) | flags, PCIELAMR(idx));
-+ rcar_pci_write_reg(pcie, lower_32_bits(pci_addr), PCIEPRAR(idx));
-+ rcar_pci_write_reg(pcie, lower_32_bits(cpu_addr), PCIELAR(idx));
-+ rcar_pci_write_reg(pcie, lower_32_bits(mask) | flags, PCIELAMR(idx));
-
-- pci_write_reg(pcie, upper_32_bits(pci_addr), PCIEPRAR(idx+1));
-- pci_write_reg(pcie, upper_32_bits(cpu_addr), PCIELAR(idx+1));
-- pci_write_reg(pcie, 0, PCIELAMR(idx+1));
-+ rcar_pci_write_reg(pcie, upper_32_bits(pci_addr), PCIEPRAR(idx+1));
-+ rcar_pci_write_reg(pcie, upper_32_bits(cpu_addr), PCIELAR(idx+1));
-+ rcar_pci_write_reg(pcie, 0, PCIELAMR(idx + 1));
-
- pci_addr += size;
- cpu_addr += size;
-@@ -937,7 +939,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
- of_pci_range_to_resource(&range, pdev->dev.of_node,
- &pcie->res[win++]);
-
-- if (win > PCI_MAX_RESOURCES)
-+ if (win > RCAR_PCI_MAX_RESOURCES)
- break;
- }
-
-@@ -967,7 +969,7 @@ static int rcar_pcie_probe(struct platform_device *pdev)
- return 0;
- }
-
-- data = pci_read_reg(pcie, MACSR);
-+ data = rcar_pci_read_reg(pcie, MACSR);
- dev_info(&pdev->dev, "PCIe x%d: link up\n", (data >> 20) & 0x3f);
-
- rcar_pcie_enable(pcie);
---
-2.1.2
-
diff --git a/patches.renesas/0714-PCI-rcar-Remove-rcar_pcie_setup_window-resource-argu.patch b/patches.renesas/0714-PCI-rcar-Remove-rcar_pcie_setup_window-resource-argu.patch
deleted file mode 100644
index 32ae667746c71..0000000000000
--- a/patches.renesas/0714-PCI-rcar-Remove-rcar_pcie_setup_window-resource-argu.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From bd3a7f225bd4d7278fcbb9d041109e635754c76c Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Mon, 30 Jun 2014 09:37:01 +0100
-Subject: PCI: rcar: Remove rcar_pcie_setup_window() resource argument
-
-rcar_pcie_setup_window() took both the window number and the resource,
-which was redundant because we can look up the resource from the window
-number.
-
-Remove the "res" argument.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0549252a1da98c5c39610e1700a9a1755acd0a70)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/pcie-rcar.c | 7 ++++---
- 1 file changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-index 758e2b4645f1..efdea0766b64 100644
---- a/drivers/pci/host/pcie-rcar.c
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -319,9 +319,10 @@ static struct pci_ops rcar_pcie_ops = {
- .write = rcar_pcie_write_conf,
- };
-
--static void rcar_pcie_setup_window(int win, struct resource *res,
-- struct rcar_pcie *pcie)
-+static void rcar_pcie_setup_window(int win, struct rcar_pcie *pcie)
- {
-+ struct resource *res = &pcie->res[win];
-+
- /* Setup PCIe address space mappings for each resource */
- resource_size_t size;
- u32 mask;
-@@ -362,7 +363,7 @@ static int rcar_pcie_setup(int nr, struct pci_sys_data *sys)
- if (!res->flags)
- continue;
-
-- rcar_pcie_setup_window(i, res, pcie);
-+ rcar_pcie_setup_window(i, pcie);
-
- if (res->flags & IORESOURCE_IO)
- pci_ioremap_io(nr * SZ_64K, res->start);
---
-2.1.2
-
diff --git a/patches.renesas/0715-spi-rspi-Remove-unused-variable-in-rspi_rz_transfer_.patch b/patches.renesas/0715-spi-rspi-Remove-unused-variable-in-rspi_rz_transfer_.patch
deleted file mode 100644
index d91fca98f6953..0000000000000
--- a/patches.renesas/0715-spi-rspi-Remove-unused-variable-in-rspi_rz_transfer_.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 6c154dcfa8e01972cc62b0a0944925cda5484c13 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert@linux-m68k.org>
-Date: Fri, 6 Jun 2014 13:38:42 +0200
-Subject: spi: rspi: Remove unused variable in rspi_rz_transfer_one()
-
-Introduced by commit 8b983e90ea1a3dd82070f96c062ad521a06b7cc0 ("spi: rspi:
-Extract rspi_common_transfer()"), which removed its users.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 95029a00886f0c8d79e700cb8983b881c75af0f1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 10112745bb17..ddee9df1547d 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -630,7 +630,6 @@ static int rspi_rz_transfer_one(struct spi_master *master,
- struct spi_transfer *xfer)
- {
- struct rspi_data *rspi = spi_master_get_devdata(master);
-- int ret;
-
- rspi_rz_receive_init(rspi);
-
---
-2.1.2
-
diff --git a/patches.renesas/0716-spi-rspi-Pass-spi_master-pointer-to-rspi_release_dma.patch b/patches.renesas/0716-spi-rspi-Pass-spi_master-pointer-to-rspi_release_dma.patch
deleted file mode 100644
index c5d70d79d8219..0000000000000
--- a/patches.renesas/0716-spi-rspi-Pass-spi_master-pointer-to-rspi_release_dma.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 560286cb3f5b72a94bb83a9d0d0601cbd89cdc90 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert@linux-m68k.org>
-Date: Fri, 6 Jun 2014 13:38:43 +0200
-Subject: spi: rspi: Pass spi_master pointer to rspi_release_dma()
-
-rspi_release_dma() doesn't need access to any fields in the driver private
-data, except for the pointer to the SPI master object. Hence just pass the
-needed pointer.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit afcc98dec91b7754e754670bdec0290aa07c3565)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index ddee9df1547d..38fd938d6360 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -926,19 +926,19 @@ static int rspi_request_dma(struct device *dev, struct spi_master *master,
- return 0;
- }
-
--static void rspi_release_dma(struct rspi_data *rspi)
-+static void rspi_release_dma(struct spi_master *master)
- {
-- if (rspi->master->dma_tx)
-- dma_release_channel(rspi->master->dma_tx);
-- if (rspi->master->dma_rx)
-- dma_release_channel(rspi->master->dma_rx);
-+ if (master->dma_tx)
-+ dma_release_channel(master->dma_tx);
-+ if (master->dma_rx)
-+ dma_release_channel(master->dma_rx);
- }
-
- static int rspi_remove(struct platform_device *pdev)
- {
- struct rspi_data *rspi = platform_get_drvdata(pdev);
-
-- rspi_release_dma(rspi);
-+ rspi_release_dma(rspi->master);
- pm_runtime_disable(&pdev->dev);
-
- return 0;
-@@ -1140,7 +1140,7 @@ static int rspi_probe(struct platform_device *pdev)
- return 0;
-
- error3:
-- rspi_release_dma(rspi);
-+ rspi_release_dma(master);
- error2:
- pm_runtime_disable(&pdev->dev);
- error1:
---
-2.1.2
-
diff --git a/patches.renesas/0717-sh_eth-remove-checks-around-dev_kfree_skb-calls.patch b/patches.renesas/0717-sh_eth-remove-checks-around-dev_kfree_skb-calls.patch
deleted file mode 100644
index 547c6ebe9663d..0000000000000
--- a/patches.renesas/0717-sh_eth-remove-checks-around-dev_kfree_skb-calls.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 63f44e207321de3a77610c49bec6fc0bf1b9d3fa Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 28 Jun 2014 04:10:00 +0400
-Subject: sh_eth: remove checks around dev_kfree_skb() calls
-
-Since consume_skb() (and hence dev_kfree_skb() macro) checks the passed pointer
-for NULL, there's no need to check for NULL before invoking dev_kfree_skb().
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 179d80aff82bf8dff9db30589fe5a2297c454d35)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/sh_eth.c | 18 ++++++------------
- 1 file changed, 6 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 10af820e1d45..26936b91f63f 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -1094,20 +1094,16 @@ static void sh_eth_ring_free(struct net_device *ndev)
-
- /* Free Rx skb ringbuffer */
- if (mdp->rx_skbuff) {
-- for (i = 0; i < mdp->num_rx_ring; i++) {
-- if (mdp->rx_skbuff[i])
-- dev_kfree_skb(mdp->rx_skbuff[i]);
-- }
-+ for (i = 0; i < mdp->num_rx_ring; i++)
-+ dev_kfree_skb(mdp->rx_skbuff[i]);
- }
- kfree(mdp->rx_skbuff);
- mdp->rx_skbuff = NULL;
-
- /* Free Tx skb ringbuffer */
- if (mdp->tx_skbuff) {
-- for (i = 0; i < mdp->num_tx_ring; i++) {
-- if (mdp->tx_skbuff[i])
-- dev_kfree_skb(mdp->tx_skbuff[i]);
-- }
-+ for (i = 0; i < mdp->num_tx_ring; i++)
-+ dev_kfree_skb(mdp->tx_skbuff[i]);
- }
- kfree(mdp->tx_skbuff);
- mdp->tx_skbuff = NULL;
-@@ -2077,13 +2073,11 @@ static void sh_eth_tx_timeout(struct net_device *ndev)
- rxdesc = &mdp->rx_ring[i];
- rxdesc->status = 0;
- rxdesc->addr = 0xBADF00D0;
-- if (mdp->rx_skbuff[i])
-- dev_kfree_skb(mdp->rx_skbuff[i]);
-+ dev_kfree_skb(mdp->rx_skbuff[i]);
- mdp->rx_skbuff[i] = NULL;
- }
- for (i = 0; i < mdp->num_tx_ring; i++) {
-- if (mdp->tx_skbuff[i])
-- dev_kfree_skb(mdp->tx_skbuff[i]);
-+ dev_kfree_skb(mdp->tx_skbuff[i]);
- mdp->tx_skbuff[i] = NULL;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0718-mmc-tmio-mmc-Add-renesas-sdhi-r8a7791-to-binding-doc.patch b/patches.renesas/0718-mmc-tmio-mmc-Add-renesas-sdhi-r8a7791-to-binding-doc.patch
deleted file mode 100644
index f3f5655729115..0000000000000
--- a/patches.renesas/0718-mmc-tmio-mmc-Add-renesas-sdhi-r8a7791-to-binding-doc.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 402e632d5f03251282c4afdb4f48b00b3dcaad8d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 9 Jul 2014 14:23:34 +0200
-Subject: mmc: tmio-mmc: Add renesas, sdhi-r8a7791 to binding documentation
-
-The driver already supports the r8a7791 SoC, and "renesas,sdhi-r8a7791"
-is already in use.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: Ian Molton <ian.molton@codethink.co.uk>
-Cc: Chris Ball <chris@printf.net>
-Cc: linux-mmc@vger.kernel.org
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit bf7978483c0c119e0d650710ee713f0ed95939ca)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/mmc/tmio_mmc.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
-index 6a2a1160a70d..fa0f327cde01 100644
---- a/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
-+++ b/Documentation/devicetree/bindings/mmc/tmio_mmc.txt
-@@ -18,6 +18,7 @@ Required properties:
- "renesas,sdhi-r8a7778" - SDHI IP on R8A7778 SoC
- "renesas,sdhi-r8a7779" - SDHI IP on R8A7779 SoC
- "renesas,sdhi-r8a7790" - SDHI IP on R8A7790 SoC
-+ "renesas,sdhi-r8a7791" - SDHI IP on R8A7791 SoC
-
- Optional properties:
- - toshiba,mmc-wrprotect-disable: write-protect detection is unavailable
---
-2.1.2
-
diff --git a/patches.renesas/0719-sh-pfc-r8a7791-add-CAN-pin-groups.patch b/patches.renesas/0719-sh-pfc-r8a7791-add-CAN-pin-groups.patch
deleted file mode 100644
index 35dfe87272ab6..0000000000000
--- a/patches.renesas/0719-sh-pfc-r8a7791-add-CAN-pin-groups.patch
+++ /dev/null
@@ -1,218 +0,0 @@
-From 501b7ca6ada6eaeff592471505e6c2e9fcd1f71c Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Wed, 2 Jul 2014 00:58:16 +0400
-Subject: sh-pfc: r8a7791: add CAN pin groups
-
-Add CAN0/1 data/clock pin groups to R8A7791 PFC driver.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit b067580f07b0ae5c323a1d5cd0caa629050406e3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 167 +++++++++++++++++++++++++++++++++++
- 1 file changed, 167 insertions(+)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 394b234488cc..576d41b459e9 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -1726,6 +1726,133 @@ static const unsigned int audio_clkout_mux[] = {
- AUDIO_CLKOUT_MARK,
- };
-
-+/* - CAN -------------------------------------------------------------------- */
-+
-+static const unsigned int can0_data_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(3, 26), RCAR_GP_PIN(3, 29),
-+};
-+
-+static const unsigned int can0_data_mux[] = {
-+ CAN0_TX_MARK, CAN0_RX_MARK,
-+};
-+
-+static const unsigned int can0_data_b_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(7, 4), RCAR_GP_PIN(7, 3),
-+};
-+
-+static const unsigned int can0_data_b_mux[] = {
-+ CAN0_TX_B_MARK, CAN0_RX_B_MARK,
-+};
-+
-+static const unsigned int can0_data_c_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(5, 17), RCAR_GP_PIN(5, 18),
-+};
-+
-+static const unsigned int can0_data_c_mux[] = {
-+ CAN0_TX_C_MARK, CAN0_RX_C_MARK,
-+};
-+
-+static const unsigned int can0_data_d_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(2, 26), RCAR_GP_PIN(2, 27),
-+};
-+
-+static const unsigned int can0_data_d_mux[] = {
-+ CAN0_TX_D_MARK, CAN0_RX_D_MARK,
-+};
-+
-+static const unsigned int can0_data_e_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(4, 18), RCAR_GP_PIN(4, 28),
-+};
-+
-+static const unsigned int can0_data_e_mux[] = {
-+ CAN0_TX_E_MARK, CAN0_RX_E_MARK,
-+};
-+
-+static const unsigned int can0_data_f_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(6, 7), RCAR_GP_PIN(6, 6),
-+};
-+
-+static const unsigned int can0_data_f_mux[] = {
-+ CAN0_TX_F_MARK, CAN0_RX_F_MARK,
-+};
-+
-+static const unsigned int can1_data_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(3, 21), RCAR_GP_PIN(3, 20),
-+};
-+
-+static const unsigned int can1_data_mux[] = {
-+ CAN1_TX_MARK, CAN1_RX_MARK,
-+};
-+
-+static const unsigned int can1_data_b_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(7, 8), RCAR_GP_PIN(7, 9),
-+};
-+
-+static const unsigned int can1_data_b_mux[] = {
-+ CAN1_TX_B_MARK, CAN1_RX_B_MARK,
-+};
-+
-+static const unsigned int can1_data_c_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(5, 20), RCAR_GP_PIN(5, 19),
-+};
-+
-+static const unsigned int can1_data_c_mux[] = {
-+ CAN1_TX_C_MARK, CAN1_RX_C_MARK,
-+};
-+
-+static const unsigned int can1_data_d_pins[] = {
-+ /* TX, RX */
-+ RCAR_GP_PIN(4, 29), RCAR_GP_PIN(4, 31),
-+};
-+
-+static const unsigned int can1_data_d_mux[] = {
-+ CAN1_TX_D_MARK, CAN1_RX_D_MARK,
-+};
-+
-+static const unsigned int can_clk_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(7, 2),
-+};
-+
-+static const unsigned int can_clk_mux[] = {
-+ CAN_CLK_MARK,
-+};
-+
-+static const unsigned int can_clk_b_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(5, 21),
-+};
-+
-+static const unsigned int can_clk_b_mux[] = {
-+ CAN_CLK_B_MARK,
-+};
-+
-+static const unsigned int can_clk_c_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(4, 30),
-+};
-+
-+static const unsigned int can_clk_c_mux[] = {
-+ CAN_CLK_C_MARK,
-+};
-+
-+static const unsigned int can_clk_d_pins[] = {
-+ /* CLK */
-+ RCAR_GP_PIN(7, 19),
-+};
-+
-+static const unsigned int can_clk_d_mux[] = {
-+ CAN_CLK_D_MARK,
-+};
-
- /* - DU --------------------------------------------------------------------- */
- static const unsigned int du_rgb666_pins[] = {
-@@ -4055,6 +4182,20 @@ static const struct sh_pfc_pin_group pinmux_groups[] = {
- SH_PFC_PIN_GROUP(audio_clk_b_b),
- SH_PFC_PIN_GROUP(audio_clk_c),
- SH_PFC_PIN_GROUP(audio_clkout),
-+ SH_PFC_PIN_GROUP(can0_data),
-+ SH_PFC_PIN_GROUP(can0_data_b),
-+ SH_PFC_PIN_GROUP(can0_data_c),
-+ SH_PFC_PIN_GROUP(can0_data_d),
-+ SH_PFC_PIN_GROUP(can0_data_e),
-+ SH_PFC_PIN_GROUP(can0_data_f),
-+ SH_PFC_PIN_GROUP(can1_data),
-+ SH_PFC_PIN_GROUP(can1_data_b),
-+ SH_PFC_PIN_GROUP(can1_data_c),
-+ SH_PFC_PIN_GROUP(can1_data_d),
-+ SH_PFC_PIN_GROUP(can_clk),
-+ SH_PFC_PIN_GROUP(can_clk_b),
-+ SH_PFC_PIN_GROUP(can_clk_c),
-+ SH_PFC_PIN_GROUP(can_clk_d),
- SH_PFC_PIN_GROUP(du_rgb666),
- SH_PFC_PIN_GROUP(du_rgb888),
- SH_PFC_PIN_GROUP(du_clk_out_0),
-@@ -4367,6 +4508,30 @@ static const char * const audio_clk_groups[] = {
- "audio_clkout",
- };
-
-+static const char * const can0_groups[] = {
-+ "can0_data_a",
-+ "can0_data_b",
-+ "can0_data_c",
-+ "can0_data_d",
-+ "can0_data_e",
-+ "can0_data_f",
-+ "can_clk_a",
-+ "can_clk_b",
-+ "can_clk_c",
-+ "can_clk_d",
-+};
-+
-+static const char * const can1_groups[] = {
-+ "can1_data_a",
-+ "can1_data_b",
-+ "can1_data_c",
-+ "can1_data_d",
-+ "can_clk_a",
-+ "can_clk_b",
-+ "can_clk_c",
-+ "can_clk_d",
-+};
-+
- static const char * const du_groups[] = {
- "du_rgb666",
- "du_rgb888",
-@@ -4790,6 +4955,8 @@ static const char * const vin2_groups[] = {
-
- static const struct sh_pfc_function pinmux_functions[] = {
- SH_PFC_FUNCTION(audio_clk),
-+ SH_PFC_FUNCTION(can0),
-+ SH_PFC_FUNCTION(can1),
- SH_PFC_FUNCTION(du),
- SH_PFC_FUNCTION(du0),
- SH_PFC_FUNCTION(du1),
---
-2.1.2
-
diff --git a/patches.renesas/0720-sh-pfc-Add-renesas-pfc-r8a7791-to-binding-documentat.patch b/patches.renesas/0720-sh-pfc-Add-renesas-pfc-r8a7791-to-binding-documentat.patch
deleted file mode 100644
index 21fe75fe2f97e..0000000000000
--- a/patches.renesas/0720-sh-pfc-Add-renesas-pfc-r8a7791-to-binding-documentat.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 19d2de65b18dc86717fc2495991ee4301a91347f Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 9 Jul 2014 14:23:36 +0200
-Subject: sh-pfc: Add renesas,pfc-r8a7791 to binding documentation
-
-The driver already supports the r8a7791 SoC, and "renesas,pfc-r8a7791"
-is already in use.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 590b4ceab95761c45dfc5d9afbbc6810c1fd64a7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
-index 35d2e1f186f0..daef6fad6a5f 100644
---- a/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
-+++ b/Documentation/devicetree/bindings/pinctrl/renesas,pfc-pinctrl.txt
-@@ -15,6 +15,7 @@ Required Properties:
- - "renesas,pfc-r8a7778": for R8A7778 (R-Mobile M1) compatible pin-controller.
- - "renesas,pfc-r8a7779": for R8A7779 (R-Car H1) compatible pin-controller.
- - "renesas,pfc-r8a7790": for R8A7790 (R-Car H2) compatible pin-controller.
-+ - "renesas,pfc-r8a7791": for R8A7791 (R-Car M2) compatible pin-controller.
- - "renesas,pfc-sh7372": for SH7372 (SH-Mobile AP4) compatible pin-controller.
- - "renesas,pfc-sh73a0": for SH73A0 (SH-Mobile AG5) compatible pin-controller.
-
---
-2.1.2
-
diff --git a/patches.renesas/0721-sh-pfc-sh73a0-Introduce-the-use-of-devm_regulator_re.patch b/patches.renesas/0721-sh-pfc-sh73a0-Introduce-the-use-of-devm_regulator_re.patch
deleted file mode 100644
index daefd1f826e21..0000000000000
--- a/patches.renesas/0721-sh-pfc-sh73a0-Introduce-the-use-of-devm_regulator_re.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 49864e07ee7ca3b8cccf7773dc356bd5aa603f5c Mon Sep 17 00:00:00 2001
-From: Himangi Saraogi <himangi774@gmail.com>
-Date: Mon, 7 Jul 2014 21:39:16 +0530
-Subject: sh-pfc: sh73a0: Introduce the use of devm_regulator_register
-
-This patch moves data allocated using regulator_register to
-devm_regulator_register and does away the calls to regulator_unregister.
-The sh73a0_pinmux_soc_exit function is no longer needed and is removed.
-
-Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
-Acked-by: Julia Lawall <julia.lawall@lip6.fr>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 01a7d13a8cfa6424a9568f3c7e925ace57cd3fc8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-sh73a0.c | 11 ++---------
- 1 file changed, 2 insertions(+), 9 deletions(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
-index ee370de4609a..0bd8f4401b42 100644
---- a/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-sh73a0.c
-@@ -3842,7 +3842,8 @@ static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
- cfg.init_data = &sh73a0_vccq_mc0_init_data;
- cfg.driver_data = pfc;
-
-- data->vccq_mc0 = regulator_register(&sh73a0_vccq_mc0_desc, &cfg);
-+ data->vccq_mc0 = devm_regulator_register(pfc->dev,
-+ &sh73a0_vccq_mc0_desc, &cfg);
- if (IS_ERR(data->vccq_mc0)) {
- ret = PTR_ERR(data->vccq_mc0);
- dev_err(pfc->dev, "Failed to register VCCQ MC0 regulator: %d\n",
-@@ -3855,16 +3856,8 @@ static int sh73a0_pinmux_soc_init(struct sh_pfc *pfc)
- return 0;
- }
-
--static void sh73a0_pinmux_soc_exit(struct sh_pfc *pfc)
--{
-- struct sh73a0_pinmux_data *data = pfc->soc_data;
--
-- regulator_unregister(data->vccq_mc0);
--}
--
- static const struct sh_pfc_soc_operations sh73a0_pinmux_ops = {
- .init = sh73a0_pinmux_soc_init,
-- .exit = sh73a0_pinmux_soc_exit,
- .get_bias = sh73a0_pinmux_get_bias,
- .set_bias = sh73a0_pinmux_set_bias,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0722-sh-Switch-to-new-style-CMT-device.patch b/patches.renesas/0722-sh-Switch-to-new-style-CMT-device.patch
deleted file mode 100644
index 91db03f9a235c..0000000000000
--- a/patches.renesas/0722-sh-Switch-to-new-style-CMT-device.patch
+++ /dev/null
@@ -1,993 +0,0 @@
-From de1f226be0ff9d6cf9cac245e7f0e357a3be969a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:08 +0200
-Subject: sh: Switch to new style CMT device
-
-The CMT (Compare Match Timer) driver implements a new style of platform
-data that handles the timer as a single device with multiple channel.
-Switch from the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9b17e48cd4df4e129976c37660cf9ec644c66059)
-Signed-off-by: Simon Horman <horms@verge.net.au>
----
- arch/sh/kernel/cpu/clock-cpg.c | 3 +-
- arch/sh/kernel/cpu/sh2/setup-sh7619.c | 66 +++------------
- arch/sh/kernel/cpu/sh2a/clock-sh7264.c | 2 +-
- arch/sh/kernel/cpu/sh2a/clock-sh7269.c | 2 +-
- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 66 +++------------
- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 66 +++------------
- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 69 +++------------
- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 66 +++------------
- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 150 +++------------------------------
- arch/sh/kernel/cpu/sh4a/clock-sh7343.c | 2 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7366.c | 2 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7722.c | 2 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7723.c | 2 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 2 +-
- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 18 +---
- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 18 +---
- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 18 +---
- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 18 +---
- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 18 +---
- 19 files changed, 106 insertions(+), 484 deletions(-)
-
-diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
-index f59b1f30d44b..8de314b8e5df 100644
---- a/arch/sh/kernel/cpu/clock-cpg.c
-+++ b/arch/sh/kernel/cpu/clock-cpg.c
-@@ -58,7 +58,8 @@ int __init __deprecated cpg_clk_init(void)
-
- clk_add_alias("tmu_fck", NULL, "peripheral_clk", NULL);
- clk_add_alias("mtu2_fck", NULL, "peripheral_clk", NULL);
-- clk_add_alias("cmt_fck", NULL, "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-cmt-16.0", "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-cmt-32.0", "peripheral_clk", NULL);
- clk_add_alias("sci_ick", NULL, "peripheral_clk", NULL);
-
- return ret;
-diff --git a/arch/sh/kernel/cpu/sh2/setup-sh7619.c b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
-index 3860b0be56c7..58c19adae900 100644
---- a/arch/sh/kernel/cpu/sh2/setup-sh7619.c
-+++ b/arch/sh/kernel/cpu/sh2/setup-sh7619.c
-@@ -152,62 +152,24 @@ static struct platform_device eth_device = {
- .resource = eth_resources,
- };
-
--static struct sh_timer_config cmt0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
-+static struct sh_timer_config cmt_platform_data = {
-+ .channels_mask = 3,
- };
-
--static struct resource cmt0_resources[] = {
-- [0] = {
-- .start = 0xf84a0072,
-- .end = 0xf84a0077,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 86,
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt_resources[] = {
-+ DEFINE_RES_MEM(0xf84a0070, 0x10),
-+ DEFINE_RES_IRQ(86),
-+ DEFINE_RES_IRQ(87),
- };
-
--static struct platform_device cmt0_device = {
-- .name = "sh_cmt",
-+static struct platform_device cmt_device = {
-+ .name = "sh-cmt-16",
- .id = 0,
- .dev = {
-- .platform_data = &cmt0_platform_data,
-- },
-- .resource = cmt0_resources,
-- .num_resources = ARRAY_SIZE(cmt0_resources),
--};
--
--static struct sh_timer_config cmt1_platform_data = {
-- .channel_offset = 0x08,
-- .timer_bit = 1,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
--};
--
--static struct resource cmt1_resources[] = {
-- [0] = {
-- .start = 0xf84a0078,
-- .end = 0xf84a007d,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 87,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt1_device = {
-- .name = "sh_cmt",
-- .id = 1,
-- .dev = {
-- .platform_data = &cmt1_platform_data,
-+ .platform_data = &cmt_platform_data,
- },
-- .resource = cmt1_resources,
-- .num_resources = ARRAY_SIZE(cmt1_resources),
-+ .resource = cmt_resources,
-+ .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
- static struct platform_device *sh7619_devices[] __initdata = {
-@@ -215,8 +177,7 @@ static struct platform_device *sh7619_devices[] __initdata = {
- &scif1_device,
- &scif2_device,
- &eth_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- };
-
- static int __init sh7619_devices_setup(void)
-@@ -235,8 +196,7 @@ static struct platform_device *sh7619_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &scif2_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- };
-
- #define STBCR3 0xf80a0000
-diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7264.c b/arch/sh/kernel/cpu/sh2a/clock-sh7264.c
-index fdf585c95289..c7f3c666a0ac 100644
---- a/arch/sh/kernel/cpu/sh2a/clock-sh7264.c
-+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7264.c
-@@ -117,7 +117,7 @@ static struct clk_lookup lookups[] = {
- /* MSTP clocks */
- CLKDEV_CON_ID("sci_ick", &mstp_clks[MSTP77]),
- CLKDEV_CON_ID("vdc3", &mstp_clks[MSTP74]),
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[MSTP72]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[MSTP72]),
- CLKDEV_CON_ID("usb0", &mstp_clks[MSTP60]),
- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP35]),
- CLKDEV_CON_ID("sdhi0", &mstp_clks[MSTP34]),
-diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7269.c b/arch/sh/kernel/cpu/sh2a/clock-sh7269.c
-index 6b787620de99..4f47464f2fb6 100644
---- a/arch/sh/kernel/cpu/sh2a/clock-sh7269.c
-+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7269.c
-@@ -158,7 +158,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP42]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.6", &mstp_clks[MSTP41]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[MSTP72]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[MSTP72]),
- CLKDEV_CON_ID("usb0", &mstp_clks[MSTP60]),
- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP35]),
- CLKDEV_CON_ID("adc0", &mstp_clks[MSTP32]),
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
-index d55a0f30ada3..374f8c09d924 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
-@@ -265,62 +265,24 @@ static struct platform_device scif3_device = {
- },
- };
-
--static struct sh_timer_config cmt0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
-+static struct sh_timer_config cmt_platform_data = {
-+ .channels_mask = 3,
- };
-
--static struct resource cmt0_resources[] = {
-- [0] = {
-- .start = 0xfffec002,
-- .end = 0xfffec007,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 142,
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt_resources[] = {
-+ DEFINE_RES_MEM(0xfffec000, 0x10),
-+ DEFINE_RES_IRQ(142),
-+ DEFINE_RES_IRQ(143),
- };
-
--static struct platform_device cmt0_device = {
-- .name = "sh_cmt",
-+static struct platform_device cmt_device = {
-+ .name = "sh-cmt-16",
- .id = 0,
- .dev = {
-- .platform_data = &cmt0_platform_data,
-- },
-- .resource = cmt0_resources,
-- .num_resources = ARRAY_SIZE(cmt0_resources),
--};
--
--static struct sh_timer_config cmt1_platform_data = {
-- .channel_offset = 0x08,
-- .timer_bit = 1,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
--};
--
--static struct resource cmt1_resources[] = {
-- [0] = {
-- .start = 0xfffec008,
-- .end = 0xfffec00d,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 143,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt1_device = {
-- .name = "sh_cmt",
-- .id = 1,
-- .dev = {
-- .platform_data = &cmt1_platform_data,
-+ .platform_data = &cmt_platform_data,
- },
-- .resource = cmt1_resources,
-- .num_resources = ARRAY_SIZE(cmt1_resources),
-+ .resource = cmt_resources,
-+ .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
- static struct sh_timer_config mtu2_0_platform_data = {
-@@ -404,8 +366,7 @@ static struct platform_device *sh7203_devices[] __initdata = {
- &scif1_device,
- &scif2_device,
- &scif3_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- &rtc_device,
-@@ -428,8 +389,7 @@ static struct platform_device *sh7203_early_devices[] __initdata = {
- &scif1_device,
- &scif2_device,
- &scif3_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- };
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
-index 241e745e3ced..d00e6fd998ec 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
-@@ -217,62 +217,24 @@ static struct platform_device scif3_device = {
- },
- };
-
--static struct sh_timer_config cmt0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
-+static struct sh_timer_config cmt_platform_data = {
-+ .channels_mask = 3,
- };
-
--static struct resource cmt0_resources[] = {
-- [0] = {
-- .start = 0xfffec002,
-- .end = 0xfffec007,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 140,
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt_resources[] = {
-+ DEFINE_RES_MEM(0xfffec000, 0x10),
-+ DEFINE_RES_IRQ(140),
-+ DEFINE_RES_IRQ(144),
- };
-
--static struct platform_device cmt0_device = {
-- .name = "sh_cmt",
-+static struct platform_device cmt_device = {
-+ .name = "sh-cmt-16",
- .id = 0,
- .dev = {
-- .platform_data = &cmt0_platform_data,
-- },
-- .resource = cmt0_resources,
-- .num_resources = ARRAY_SIZE(cmt0_resources),
--};
--
--static struct sh_timer_config cmt1_platform_data = {
-- .channel_offset = 0x08,
-- .timer_bit = 1,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
--};
--
--static struct resource cmt1_resources[] = {
-- [0] = {
-- .start = 0xfffec008,
-- .end = 0xfffec00d,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 144,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt1_device = {
-- .name = "sh_cmt",
-- .id = 1,
-- .dev = {
-- .platform_data = &cmt1_platform_data,
-+ .platform_data = &cmt_platform_data,
- },
-- .resource = cmt1_resources,
-- .num_resources = ARRAY_SIZE(cmt1_resources),
-+ .resource = cmt_resources,
-+ .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
- static struct sh_timer_config mtu2_0_platform_data = {
-@@ -364,8 +326,7 @@ static struct platform_device *sh7206_devices[] __initdata = {
- &scif1_device,
- &scif2_device,
- &scif3_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- &mtu2_2_device,
-@@ -388,8 +349,7 @@ static struct platform_device *sh7206_early_devices[] __initdata = {
- &scif1_device,
- &scif2_device,
- &scif3_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- &mtu2_2_device,
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c
-index ad5b0f429882..e95250e82752 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c
-@@ -433,65 +433,24 @@ static struct platform_device scif7_device = {
- },
- };
-
--static struct sh_timer_config cmt0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
-+static struct sh_timer_config cmt_platform_data = {
-+ .channels_mask = 3,
- };
-
--static struct resource cmt0_resources[] = {
-- [0] = {
-- .name = "CMT0",
-- .start = 0xfffec002,
-- .end = 0xfffec007,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 175,
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt_resources[] = {
-+ DEFINE_RES_MEM(0xfffec000, 0x10),
-+ DEFINE_RES_IRQ(175),
-+ DEFINE_RES_IRQ(176),
- };
-
--static struct platform_device cmt0_device = {
-- .name = "sh_cmt",
-+static struct platform_device cmt_device = {
-+ .name = "sh-cmt-16",
- .id = 0,
- .dev = {
-- .platform_data = &cmt0_platform_data,
-- },
-- .resource = cmt0_resources,
-- .num_resources = ARRAY_SIZE(cmt0_resources),
--};
--
--static struct sh_timer_config cmt1_platform_data = {
-- .name = "CMT1",
-- .channel_offset = 0x08,
-- .timer_bit = 1,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
--};
--
--static struct resource cmt1_resources[] = {
-- [0] = {
-- .name = "CMT1",
-- .start = 0xfffec008,
-- .end = 0xfffec00d,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 176,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt1_device = {
-- .name = "sh_cmt",
-- .id = 1,
-- .dev = {
-- .platform_data = &cmt1_platform_data,
-+ .platform_data = &cmt_platform_data,
- },
-- .resource = cmt1_resources,
-- .num_resources = ARRAY_SIZE(cmt1_resources),
-+ .resource = cmt_resources,
-+ .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
- static struct sh_timer_config mtu2_0_platform_data = {
-@@ -620,8 +579,7 @@ static struct platform_device *sh7264_devices[] __initdata = {
- &scif5_device,
- &scif6_device,
- &scif7_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- &rtc_device,
-@@ -649,8 +607,7 @@ static struct platform_device *sh7264_early_devices[] __initdata = {
- &scif5_device,
- &scif6_device,
- &scif7_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- };
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c
-index 3995119f65dc..0191e1ae8411 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c
-@@ -455,62 +455,24 @@ static struct platform_device scif7_device = {
- },
- };
-
--static struct sh_timer_config cmt0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
-+static struct sh_timer_config cmt_platform_data = {
-+ .channels_mask = 3,
- };
-
--static struct resource cmt0_resources[] = {
-- [0] = {
-- .start = 0xfffec002,
-- .end = 0xfffec007,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 188,
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt_resources[] = {
-+ DEFINE_RES_MEM(0xfffec000, 0x10),
-+ DEFINE_RES_IRQ(188),
-+ DEFINE_RES_IRQ(189),
- };
-
--static struct platform_device cmt0_device = {
-- .name = "sh_cmt",
-+static struct platform_device cmt_device = {
-+ .name = "sh-cmt-16",
- .id = 0,
- .dev = {
-- .platform_data = &cmt0_platform_data,
-- },
-- .resource = cmt0_resources,
-- .num_resources = ARRAY_SIZE(cmt0_resources),
--};
--
--static struct sh_timer_config cmt1_platform_data = {
-- .channel_offset = 0x08,
-- .timer_bit = 1,
-- .clockevent_rating = 125,
-- .clocksource_rating = 0, /* disabled due to code generation issues */
--};
--
--static struct resource cmt1_resources[] = {
-- [0] = {
-- .start = 0xfffec008,
-- .end = 0xfffec00d,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 189,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt1_device = {
-- .name = "sh_cmt",
-- .id = 1,
-- .dev = {
-- .platform_data = &cmt1_platform_data,
-+ .platform_data = &cmt_platform_data,
- },
-- .resource = cmt1_resources,
-- .num_resources = ARRAY_SIZE(cmt1_resources),
-+ .resource = cmt_resources,
-+ .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
- static struct sh_timer_config mtu2_0_platform_data = {
-@@ -629,8 +591,7 @@ static struct platform_device *sh7269_devices[] __initdata = {
- &scif5_device,
- &scif6_device,
- &scif7_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- &rtc_device,
-@@ -658,8 +619,7 @@ static struct platform_device *sh7269_early_devices[] __initdata = {
- &scif5_device,
- &scif6_device,
- &scif7_device,
-- &cmt0_device,
-- &cmt1_device,
-+ &cmt_device,
- &mtu2_0_device,
- &mtu2_1_device,
- };
-diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
-index 1d5729dc0724..a53d21925b94 100644
---- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
-+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
-@@ -152,141 +152,23 @@ static struct platform_device usbf_device = {
- .resource = usbf_resources,
- };
-
--static struct sh_timer_config cmt0_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 0,
-- .clockevent_rating = 125,
-- .clocksource_rating = 125,
-+static struct sh_timer_config cmt_platform_data = {
-+ .channels_mask = 0x1f,
- };
-
--static struct resource cmt0_resources[] = {
-- [0] = {
-- .start = 0x044a0010,
-- .end = 0x044a001b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
-+static struct resource cmt_resources[] = {
-+ DEFINE_RES_MEM(0x044a0000, 0x60),
-+ DEFINE_RES_IRQ(evt2irq(0xf00)),
- };
-
--static struct platform_device cmt0_device = {
-- .name = "sh_cmt",
-+static struct platform_device cmt_device = {
-+ .name = "sh-cmt-32",
- .id = 0,
- .dev = {
-- .platform_data = &cmt0_platform_data,
-- },
-- .resource = cmt0_resources,
-- .num_resources = ARRAY_SIZE(cmt0_resources),
--};
--
--static struct sh_timer_config cmt1_platform_data = {
-- .channel_offset = 0x20,
-- .timer_bit = 1,
--};
--
--static struct resource cmt1_resources[] = {
-- [0] = {
-- .start = 0x044a0020,
-- .end = 0x044a002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt1_device = {
-- .name = "sh_cmt",
-- .id = 1,
-- .dev = {
-- .platform_data = &cmt1_platform_data,
-- },
-- .resource = cmt1_resources,
-- .num_resources = ARRAY_SIZE(cmt1_resources),
--};
--
--static struct sh_timer_config cmt2_platform_data = {
-- .channel_offset = 0x30,
-- .timer_bit = 2,
--};
--
--static struct resource cmt2_resources[] = {
-- [0] = {
-- .start = 0x044a0030,
-- .end = 0x044a003b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt2_device = {
-- .name = "sh_cmt",
-- .id = 2,
-- .dev = {
-- .platform_data = &cmt2_platform_data,
-- },
-- .resource = cmt2_resources,
-- .num_resources = ARRAY_SIZE(cmt2_resources),
--};
--
--static struct sh_timer_config cmt3_platform_data = {
-- .channel_offset = 0x40,
-- .timer_bit = 3,
--};
--
--static struct resource cmt3_resources[] = {
-- [0] = {
-- .start = 0x044a0040,
-- .end = 0x044a004b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt3_device = {
-- .name = "sh_cmt",
-- .id = 3,
-- .dev = {
-- .platform_data = &cmt3_platform_data,
-- },
-- .resource = cmt3_resources,
-- .num_resources = ARRAY_SIZE(cmt3_resources),
--};
--
--static struct sh_timer_config cmt4_platform_data = {
-- .channel_offset = 0x50,
-- .timer_bit = 4,
--};
--
--static struct resource cmt4_resources[] = {
-- [0] = {
-- .start = 0x044a0050,
-- .end = 0x044a005b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device cmt4_device = {
-- .name = "sh_cmt",
-- .id = 4,
-- .dev = {
-- .platform_data = &cmt4_platform_data,
-+ .platform_data = &cmt_platform_data,
- },
-- .resource = cmt4_resources,
-- .num_resources = ARRAY_SIZE(cmt4_resources),
-+ .resource = cmt_resources,
-+ .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-@@ -375,11 +257,7 @@ static struct platform_device tmu2_device = {
- static struct platform_device *sh7720_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
-- &cmt0_device,
-- &cmt1_device,
-- &cmt2_device,
-- &cmt3_device,
-- &cmt4_device,
-+ &cmt_device,
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-@@ -398,11 +276,7 @@ arch_initcall(sh7720_devices_setup);
- static struct platform_device *sh7720_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
-- &cmt0_device,
-- &cmt1_device,
-- &cmt2_device,
-- &cmt3_device,
-- &cmt4_device,
-+ &cmt_device,
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c
-index 53638e231cd0..9edc06c02dcf 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7343.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7343.c
-@@ -227,7 +227,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("hudi0", &mstp_clks[MSTP019]),
- CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP017]),
- CLKDEV_CON_ID("tmu_fck", &mstp_clks[MSTP015]),
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[MSTP014]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32.0", &mstp_clks[MSTP014]),
- CLKDEV_CON_ID("rwdt0", &mstp_clks[MSTP013]),
- CLKDEV_CON_ID("mfi0", &mstp_clks[MSTP011]),
- CLKDEV_CON_ID("flctl0", &mstp_clks[MSTP010]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7366.c b/arch/sh/kernel/cpu/sh4a/clock-sh7366.c
-index 22e485d1990b..955b9add7810 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7366.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7366.c
-@@ -225,7 +225,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("hudi0", &mstp_clks[MSTP019]),
- CLKDEV_CON_ID("ubc0", &mstp_clks[MSTP017]),
- CLKDEV_CON_ID("tmu_fck", &mstp_clks[MSTP015]),
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[MSTP014]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32.0", &mstp_clks[MSTP014]),
- CLKDEV_CON_ID("rwdt0", &mstp_clks[MSTP013]),
- CLKDEV_CON_ID("mfi0", &mstp_clks[MSTP011]),
- CLKDEV_CON_ID("flctl0", &mstp_clks[MSTP010]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
-index c4cb740e4d10..40974934512a 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
-@@ -207,7 +207,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[HWBLK_TMU]),
- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[HWBLK_TMU]),
-
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[HWBLK_CMT]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32.0", &mstp_clks[HWBLK_CMT]),
- CLKDEV_DEV_ID("sh-wdt.0", &mstp_clks[HWBLK_RWDT]),
- CLKDEV_CON_ID("flctl0", &mstp_clks[HWBLK_FLCTL]),
-
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
-index 37c41c7747a3..da64734b0fd3 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
-@@ -236,7 +236,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("sh0", &mstp_clks[HWBLK_SHYWAY]),
- CLKDEV_CON_ID("hudi0", &mstp_clks[HWBLK_HUDI]),
- CLKDEV_CON_ID("ubc0", &mstp_clks[HWBLK_UBC]),
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[HWBLK_CMT]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-32.0", &mstp_clks[HWBLK_CMT]),
- CLKDEV_DEV_ID("sh-wdt.0", &mstp_clks[HWBLK_RWDT]),
- CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[HWBLK_DMAC1]),
- CLKDEV_CON_ID("flctl0", &mstp_clks[HWBLK_FLCTL]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
-index 0128af3399b7..f917f1926507 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
-@@ -309,7 +309,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[HWBLK_TMU0]),
- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[HWBLK_TMU1]),
-
-- CLKDEV_CON_ID("cmt_fck", &mstp_clks[HWBLK_CMT]),
-+ CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[HWBLK_CMT]),
- CLKDEV_DEV_ID("sh-wdt.0", &mstp_clks[HWBLK_RWDT]),
- CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[HWBLK_DMAC1]),
-
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
-index 245d19254489..ad96492f290d 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
-@@ -228,26 +228,16 @@ static struct platform_device jpu_device = {
- };
-
- static struct sh_timer_config cmt_platform_data = {
-- .channel_offset = 0x60,
-- .timer_bit = 5,
-- .clockevent_rating = 125,
-- .clocksource_rating = 200,
-+ .channels_mask = 0x20,
- };
-
- static struct resource cmt_resources[] = {
-- [0] = {
-- .start = 0x044a0060,
-- .end = 0x044a006b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0x044a0000, 0x70),
-+ DEFINE_RES_IRQ(evt2irq(0xf00)),
- };
-
- static struct platform_device cmt_device = {
-- .name = "sh_cmt",
-+ .name = "sh-cmt-32",
- .id = 0,
- .dev = {
- .platform_data = &cmt_platform_data,
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
-index 6f56cbd76b20..4e4985d95e53 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
-@@ -176,26 +176,16 @@ static struct platform_device veu1_device = {
- };
-
- static struct sh_timer_config cmt_platform_data = {
-- .channel_offset = 0x60,
-- .timer_bit = 5,
-- .clockevent_rating = 125,
-- .clocksource_rating = 200,
-+ .channels_mask = 0x20,
- };
-
- static struct resource cmt_resources[] = {
-- [0] = {
-- .start = 0x044a0060,
-- .end = 0x044a006b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0x044a0000, 0x70),
-+ DEFINE_RES_IRQ(evt2irq(0xf00)),
- };
-
- static struct platform_device cmt_device = {
-- .name = "sh_cmt",
-+ .name = "sh-cmt-32",
- .id = 0,
- .dev = {
- .platform_data = &cmt_platform_data,
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
-index 5a94efc8d4ce..4e3218f288e7 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
-@@ -413,26 +413,16 @@ static struct platform_device jpu_device = {
- };
-
- static struct sh_timer_config cmt_platform_data = {
-- .channel_offset = 0x60,
-- .timer_bit = 5,
-- .clockevent_rating = 125,
-- .clocksource_rating = 125,
-+ .channels_mask = 0x20,
- };
-
- static struct resource cmt_resources[] = {
-- [0] = {
-- .start = 0x044a0060,
-- .end = 0x044a006b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0x044a0000, 0x70),
-+ DEFINE_RES_IRQ(evt2irq(0xf00)),
- };
-
- static struct platform_device cmt_device = {
-- .name = "sh_cmt",
-+ .name = "sh-cmt-32",
- .id = 0,
- .dev = {
- .platform_data = &cmt_platform_data,
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
-index 3c5eb0993a75..5dfdb8501262 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
-@@ -245,26 +245,16 @@ static struct platform_device veu1_device = {
- };
-
- static struct sh_timer_config cmt_platform_data = {
-- .channel_offset = 0x60,
-- .timer_bit = 5,
-- .clockevent_rating = 125,
-- .clocksource_rating = 125,
-+ .channels_mask = 0x20,
- };
-
- static struct resource cmt_resources[] = {
-- [0] = {
-- .start = 0x044a0060,
-- .end = 0x044a006b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0x044a0000, 0x70),
-+ DEFINE_RES_IRQ(evt2irq(0xf00)),
- };
-
- static struct platform_device cmt_device = {
-- .name = "sh_cmt",
-+ .name = "sh-cmt-32",
- .id = 0,
- .dev = {
- .platform_data = &cmt_platform_data,
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
-index 60ebbc6842ff..b435f076f292 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
-@@ -648,26 +648,16 @@ static struct platform_device beu1_device = {
- };
-
- static struct sh_timer_config cmt_platform_data = {
-- .channel_offset = 0x60,
-- .timer_bit = 5,
-- .clockevent_rating = 125,
-- .clocksource_rating = 200,
-+ .channels_mask = 0x20,
- };
-
- static struct resource cmt_resources[] = {
-- [0] = {
-- .start = 0x044a0060,
-- .end = 0x044a006b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xf00),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0x044a0000, 0x70),
-+ DEFINE_RES_IRQ(evt2irq(0xf00)),
- };
-
- static struct platform_device cmt_device = {
-- .name = "sh_cmt",
-+ .name = "sh-cmt-32",
- .id = 0,
- .dev = {
- .platform_data = &cmt_platform_data,
---
-2.1.2
-
diff --git a/patches.renesas/0723-sh-Switch-to-new-style-TMU-device.patch b/patches.renesas/0723-sh-Switch-to-new-style-TMU-device.patch
deleted file mode 100644
index c3e3400e880ce..0000000000000
--- a/patches.renesas/0723-sh-Switch-to-new-style-TMU-device.patch
+++ /dev/null
@@ -1,3823 +0,0 @@
-From 75771018e86e09052c61fb4669c1d797325c627e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:15 +0200
-Subject: sh: Switch to new style TMU device
-
-The TMU (Timer Unit) driver implements a new style of platform data that
-handles the timer as a single device with multiple channel. Switch from
-the old-style platform data to the new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1399c195ef5009bf44a41649da4718f6e67c0bff)
-Signed-off-by: Simon Horman <horms@verge.net.au>
----
- arch/sh/kernel/cpu/clock-cpg.c | 5 +-
- arch/sh/kernel/cpu/sh3/setup-sh7705.c | 78 +--------
- arch/sh/kernel/cpu/sh3/setup-sh770x.c | 78 +--------
- arch/sh/kernel/cpu/sh3/setup-sh7710.c | 78 +--------
- arch/sh/kernel/cpu/sh3/setup-sh7720.c | 78 +--------
- arch/sh/kernel/cpu/sh4/setup-sh4-202.c | 78 +--------
- arch/sh/kernel/cpu/sh4/setup-sh7750.c | 138 ++-------------
- arch/sh/kernel/cpu/sh4/setup-sh7760.c | 78 +--------
- arch/sh/kernel/cpu/sh4a/clock-sh7722.c | 4 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7723.c | 8 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7724.c | 8 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7734.c | 12 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7757.c | 4 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7785.c | 8 +-
- arch/sh/kernel/cpu/sh4a/clock-sh7786.c | 16 +-
- arch/sh/kernel/cpu/sh4a/clock-shx3.c | 8 +-
- arch/sh/kernel/cpu/sh4a/setup-sh7343.c | 78 +--------
- arch/sh/kernel/cpu/sh4a/setup-sh7366.c | 78 +--------
- arch/sh/kernel/cpu/sh4a/setup-sh7722.c | 78 +--------
- arch/sh/kernel/cpu/sh4a/setup-sh7723.c | 154 ++---------------
- arch/sh/kernel/cpu/sh4a/setup-sh7724.c | 155 ++---------------
- arch/sh/kernel/cpu/sh4a/setup-sh7734.c | 235 +++-----------------------
- arch/sh/kernel/cpu/sh4a/setup-sh7757.c | 48 +-----
- arch/sh/kernel/cpu/sh4a/setup-sh7763.c | 154 ++---------------
- arch/sh/kernel/cpu/sh4a/setup-sh7770.c | 230 ++-----------------------
- arch/sh/kernel/cpu/sh4a/setup-sh7780.c | 154 ++---------------
- arch/sh/kernel/cpu/sh4a/setup-sh7785.c | 154 ++---------------
- arch/sh/kernel/cpu/sh4a/setup-sh7786.c | 299 +++------------------------------
- arch/sh/kernel/cpu/sh4a/setup-shx3.c | 150 ++---------------
- arch/sh/kernel/cpu/sh5/setup-sh5.c | 79 +--------
- 30 files changed, 239 insertions(+), 2486 deletions(-)
-
-diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
-index 8de314b8e5df..121ef690763f 100644
---- a/arch/sh/kernel/cpu/clock-cpg.c
-+++ b/arch/sh/kernel/cpu/clock-cpg.c
-@@ -56,7 +56,10 @@ int __init __deprecated cpg_clk_init(void)
-
- clkdev_add_table(lookups, ARRAY_SIZE(lookups));
-
-- clk_add_alias("tmu_fck", NULL, "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-tmu-sh3.0", "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-tmu.0", "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-tmu.1", "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-tmu.2", "peripheral_clk", NULL);
- clk_add_alias("mtu2_fck", NULL, "peripheral_clk", NULL);
- clk_add_alias("fck", "sh-cmt-16.0", "peripheral_clk", NULL);
- clk_add_alias("fck", "sh-cmt-32.0", "peripheral_clk", NULL);
-diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7705.c b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
-index c76b2543b85f..6a72fd14de21 100644
---- a/arch/sh/kernel/cpu/sh3/setup-sh7705.c
-+++ b/arch/sh/kernel/cpu/sh3/setup-sh7705.c
-@@ -143,25 +143,18 @@ static struct platform_device rtc_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xfffffe94,
-- .end = 0xfffffe9f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xfffffe90, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu-sh3",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -170,67 +163,10 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0xe,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xfffffea0,
-- .end = 0xfffffeab,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1a,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xfffffeac,
-- .end = 0xfffffebb,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh7705_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &rtc_device,
- };
-
-@@ -245,8 +181,6 @@ static struct platform_device *sh7705_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh3/setup-sh770x.c b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
-index ff1465c0519c..9139d14b9c53 100644
---- a/arch/sh/kernel/cpu/sh3/setup-sh770x.c
-+++ b/arch/sh/kernel/cpu/sh3/setup-sh770x.c
-@@ -185,25 +185,18 @@ static struct platform_device scif2_device = {
- #endif
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xfffffe94,
-- .end = 0xfffffe9f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xfffffe90, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu-sh3",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -212,61 +205,6 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0xe,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xfffffea0,
-- .end = 0xfffffeab,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1a,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xfffffeac,
-- .end = 0xfffffebb,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh770x_devices[] __initdata = {
- &scif0_device,
- #if defined(CONFIG_CPU_SUBTYPE_SH7706) || \
-@@ -279,8 +217,6 @@ static struct platform_device *sh770x_devices[] __initdata = {
- &scif2_device,
- #endif
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &rtc_device,
- };
-
-@@ -303,8 +239,6 @@ static struct platform_device *sh770x_early_devices[] __initdata = {
- &scif2_device,
- #endif
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7710.c b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
-index e2ce9360ed5a..e9ed300dba5c 100644
---- a/arch/sh/kernel/cpu/sh3/setup-sh7710.c
-+++ b/arch/sh/kernel/cpu/sh3/setup-sh7710.c
-@@ -142,25 +142,18 @@ static struct platform_device scif1_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xa412fe94,
-- .end = 0xa412fe9f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xa412fe90, 0x28),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu-sh3",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -169,67 +162,10 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0xe,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xa412fea0,
-- .end = 0xa412feab,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1a,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xa412feac,
-- .end = 0xa412feb5,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh7710_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &rtc_device,
- };
-
-@@ -244,8 +180,6 @@ static struct platform_device *sh7710_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh3/setup-sh7720.c b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
-index a53d21925b94..84df85a5b800 100644
---- a/arch/sh/kernel/cpu/sh3/setup-sh7720.c
-+++ b/arch/sh/kernel/cpu/sh3/setup-sh7720.c
-@@ -172,25 +172,18 @@ static struct platform_device cmt_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x02,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xa412fe94,
-- .end = 0xa412fe9f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xa412fe90, 0x28),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu-sh3",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -199,68 +192,11 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0xe,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xa412fea0,
-- .end = 0xa412feab,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1a,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xa412feac,
-- .end = 0xa412feb5,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh7720_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &rtc_device,
- &usb_ohci_device,
- &usbf_device,
-@@ -278,8 +214,6 @@ static struct platform_device *sh7720_early_devices[] __initdata = {
- &scif1_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
-index a8bd778d5ac8..e7a7b3cdf68d 100644
---- a/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
-+++ b/arch/sh/kernel/cpu/sh4/setup-sh4-202.c
-@@ -41,25 +41,18 @@ static struct platform_device scif0_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -68,66 +61,9 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh4202_devices[] __initdata = {
- &scif0_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- static int __init sh4202_devices_setup(void)
-@@ -140,8 +76,6 @@ arch_initcall(sh4202_devices_setup);
- static struct platform_device *sh4202_early_devices[] __initdata = {
- &scif0_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7750.c b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
-index a447a248491f..5f08c59b9f3e 100644
---- a/arch/sh/kernel/cpu/sh4/setup-sh7750.c
-+++ b/arch/sh/kernel/cpu/sh4/setup-sh7750.c
-@@ -82,25 +82,18 @@ static struct platform_device scif_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -109,26 +102,23 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
-+/* SH7750R, SH7751 and SH7751R all have two extra timer channels */
-+#if defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
-+ defined(CONFIG_CPU_SUBTYPE_SH7751) || \
-+ defined(CONFIG_CPU_SUBTYPE_SH7751R)
-+
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 3,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xfe100000, 0x20),
-+ DEFINE_RES_IRQ(evt2irq(0xb00)),
-+ DEFINE_RES_IRQ(evt2irq(0xb80)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -137,104 +127,15 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--/* SH7750R, SH7751 and SH7751R all have two extra timer channels */
--#if defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
-- defined(CONFIG_CPU_SUBTYPE_SH7751) || \
-- defined(CONFIG_CPU_SUBTYPE_SH7751R)
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xfe100008,
-- .end = 0xfe100013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xb00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xfe100014,
-- .end = 0xfe10001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xb80),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
- #endif
-
- static struct platform_device *sh7750_devices[] __initdata = {
- &rtc_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- #if defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
- defined(CONFIG_CPU_SUBTYPE_SH7751) || \
- defined(CONFIG_CPU_SUBTYPE_SH7751R)
-- &tmu3_device,
-- &tmu4_device,
-+ &tmu1_device,
- #endif
- };
-
-@@ -254,13 +155,10 @@ arch_initcall(sh7750_devices_setup);
-
- static struct platform_device *sh7750_early_devices[] __initdata = {
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- #if defined(CONFIG_CPU_SUBTYPE_SH7750R) || \
- defined(CONFIG_CPU_SUBTYPE_SH7751) || \
- defined(CONFIG_CPU_SUBTYPE_SH7751R)
-- &tmu3_device,
-- &tmu4_device,
-+ &tmu1_device,
- #endif
- };
-
-diff --git a/arch/sh/kernel/cpu/sh4/setup-sh7760.c b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
-index 1abd9fb4a386..973b736b3b98 100644
---- a/arch/sh/kernel/cpu/sh4/setup-sh7760.c
-+++ b/arch/sh/kernel/cpu/sh4/setup-sh7760.c
-@@ -227,25 +227,18 @@ static struct platform_device scif3_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -254,61 +247,6 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
-
- static struct platform_device *sh7760_devices[] __initdata = {
- &scif0_device,
-@@ -316,8 +254,6 @@ static struct platform_device *sh7760_devices[] __initdata = {
- &scif2_device,
- &scif3_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- static int __init sh7760_devices_setup(void)
-@@ -333,8 +269,6 @@ static struct platform_device *sh7760_early_devices[] __initdata = {
- &scif2_device,
- &scif3_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
-index 40974934512a..8f07a1a38692 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7722.c
-@@ -203,9 +203,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("uram0", &mstp_clks[HWBLK_URAM]),
- CLKDEV_CON_ID("xymem0", &mstp_clks[HWBLK_XYMEM]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[HWBLK_TMU]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[HWBLK_TMU]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[HWBLK_TMU]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[HWBLK_TMU]),
-
- CLKDEV_ICK_ID("fck", "sh-cmt-32.0", &mstp_clks[HWBLK_CMT]),
- CLKDEV_DEV_ID("sh-wdt.0", &mstp_clks[HWBLK_RWDT]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
-index da64734b0fd3..ccbcab550df2 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7723.c
-@@ -264,12 +264,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("veu0", &mstp_clks[HWBLK_VEU2H0]),
- CLKDEV_CON_ID("vpu0", &mstp_clks[HWBLK_VPU]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[HWBLK_TMU0]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[HWBLK_TMU0]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[HWBLK_TMU0]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[HWBLK_TMU1]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[HWBLK_TMU1]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[HWBLK_TMU1]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[HWBLK_TMU0]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[HWBLK_TMU1]),
-
- CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[HWBLK_SCIF0]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[HWBLK_SCIF1]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
-index f917f1926507..f579dd528198 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7724.c
-@@ -304,17 +304,13 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("hudi0", &mstp_clks[HWBLK_HUDI]),
- CLKDEV_CON_ID("ubc0", &mstp_clks[HWBLK_UBC]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[HWBLK_TMU0]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[HWBLK_TMU0]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[HWBLK_TMU0]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[HWBLK_TMU1]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[HWBLK_TMU0]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[HWBLK_TMU1]),
-
- CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[HWBLK_CMT]),
- CLKDEV_DEV_ID("sh-wdt.0", &mstp_clks[HWBLK_RWDT]),
- CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[HWBLK_DMAC1]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[HWBLK_TMU1]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[HWBLK_TMU1]),
- CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[HWBLK_SCIF0]),
- CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[HWBLK_SCIF1]),
- CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[HWBLK_SCIF2]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7734.c b/arch/sh/kernel/cpu/sh4a/clock-sh7734.c
-index ed9501519ab3..1fdf1ee672de 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7734.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7734.c
-@@ -201,15 +201,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("sci_fck", "sh-sci.4", &mstp_clks[MSTP022]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.5", &mstp_clks[MSTP021]),
- CLKDEV_CON_ID("hscif", &mstp_clks[MSTP019]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[MSTP016]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[MSTP016]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[MSTP016]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[MSTP015]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[MSTP015]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[MSTP015]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.6", &mstp_clks[MSTP014]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.7", &mstp_clks[MSTP014]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.8", &mstp_clks[MSTP014]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP015]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.2", &mstp_clks[MSTP014]),
- CLKDEV_CON_ID("ssi0", &mstp_clks[MSTP012]),
- CLKDEV_CON_ID("ssi1", &mstp_clks[MSTP011]),
- CLKDEV_CON_ID("ssi2", &mstp_clks[MSTP010]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
-index e84a43229b9c..10939f927213 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7757.c
-@@ -123,8 +123,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("riic6", &mstp_clks[MSTP000]),
- CLKDEV_CON_ID("riic7", &mstp_clks[MSTP000]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[MSTP113]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[MSTP114]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP113]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP114]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.2", &mstp_clks[MSTP112]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.1", &mstp_clks[MSTP111]),
- CLKDEV_ICK_ID("sci_fck", "sh-sci.0", &mstp_clks[MSTP110]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
-index 1c83788db76a..17d0ea55a5a2 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7785.c
-@@ -146,12 +146,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("mmcif_fck", &mstp_clks[MSTP013]),
- CLKDEV_CON_ID("flctl_fck", &mstp_clks[MSTP012]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[MSTP009]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP008]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP009]),
-
- CLKDEV_CON_ID("siof_fck", &mstp_clks[MSTP003]),
- CLKDEV_CON_ID("hspi_fck", &mstp_clks[MSTP002]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
-index 8bba6f159023..bec2a83f1ba5 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-sh7786.c
-@@ -155,18 +155,10 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("i2c1_fck", &mstp_clks[MSTP015]),
- CLKDEV_CON_ID("i2c0_fck", &mstp_clks[MSTP014]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.6", &mstp_clks[MSTP010]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.7", &mstp_clks[MSTP010]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.8", &mstp_clks[MSTP010]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.9", &mstp_clks[MSTP011]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.10", &mstp_clks[MSTP011]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.11", &mstp_clks[MSTP011]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP008]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP009]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.2", &mstp_clks[MSTP010]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.3", &mstp_clks[MSTP011]),
-
- CLKDEV_CON_ID("sdif1_fck", &mstp_clks[MSTP005]),
- CLKDEV_CON_ID("sdif0_fck", &mstp_clks[MSTP004]),
-diff --git a/arch/sh/kernel/cpu/sh4a/clock-shx3.c b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
-index a9422dab0ce7..9a49a44f6f94 100644
---- a/arch/sh/kernel/cpu/sh4a/clock-shx3.c
-+++ b/arch/sh/kernel/cpu/sh4a/clock-shx3.c
-@@ -124,12 +124,8 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("fe1_fck", &mstp_clks[MSTP001]),
- CLKDEV_CON_ID("fe0_fck", &mstp_clks[MSTP000]),
-
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.0", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.1", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.2", &mstp_clks[MSTP008]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.3", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.4", &mstp_clks[MSTP009]),
-- CLKDEV_ICK_ID("tmu_fck", "sh_tmu.5", &mstp_clks[MSTP009]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP008]),
-+ CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP009]),
-
- CLKDEV_CON_ID("hudi_fck", &mstp_clks[MSTP119]),
- CLKDEV_CON_ID("dmac_11_6_fck", &mstp_clks[MSTP105]),
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
-index ad96492f290d..ceb3dedad983 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7343.c
-@@ -247,25 +247,18 @@ static struct platform_device cmt_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -274,61 +267,6 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh7343_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
-@@ -336,8 +274,6 @@ static struct platform_device *sh7343_devices[] __initdata = {
- &scif3_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &iic0_device,
- &iic1_device,
- &vpu_device,
-@@ -363,8 +299,6 @@ static struct platform_device *sh7343_early_devices[] __initdata = {
- &scif3_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
-index 4e4985d95e53..f75f67343139 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7366.c
-@@ -195,25 +195,18 @@ static struct platform_device cmt_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 16,
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -222,67 +215,10 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh7366_devices[] __initdata = {
- &scif0_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &iic_device,
- &usb_host_device,
- &vpu_device,
-@@ -305,8 +241,6 @@ static struct platform_device *sh7366_early_devices[] __initdata = {
- &scif0_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
-index 4e3218f288e7..57f83a92a505 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7722.c
-@@ -432,25 +432,18 @@ static struct platform_device cmt_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -459,61 +452,6 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 18,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct siu_platform siu_platform_data = {
- .dma_slave_tx_a = SHDMA_SLAVE_SIUA_TX,
- .dma_slave_rx_a = SHDMA_SLAVE_SIUA_RX,
-@@ -549,8 +487,6 @@ static struct platform_device *sh7722_devices[] __initdata = {
- &scif2_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- &rtc_device,
- &usbf_device,
- &iic_device,
-@@ -578,8 +514,6 @@ static struct platform_device *sh7722_early_devices[] __initdata = {
- &scif2_device,
- &cmt_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
-index 5dfdb8501262..3533b56dd465 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7723.c
-@@ -264,25 +264,18 @@ static struct platform_device cmt_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -292,25 +285,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd90000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x920)),
-+ DEFINE_RES_IRQ(evt2irq(0x940)),
-+ DEFINE_RES_IRQ(evt2irq(0x960)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -319,114 +305,6 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffd90008,
-- .end = 0xffd90013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x920),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffd90014,
-- .end = 0xffd9001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x940),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffd90020,
-- .end = 0xffd9002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x920),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
- static struct resource rtc_resources[] = {
- [0] = {
- .start = 0xa465fec0,
-@@ -517,10 +395,6 @@ static struct platform_device *sh7723_devices[] __initdata = {
- &cmt_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- &rtc_device,
- &iic_device,
- &sh7723_usb_host_device,
-@@ -550,10 +424,6 @@ static struct platform_device *sh7723_early_devices[] __initdata = {
- &cmt_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
-index b435f076f292..b9e84b1d3aa7 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7724.c
-@@ -667,25 +667,18 @@ static struct platform_device cmt_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -695,25 +688,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd90000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x920)),
-+ DEFINE_RES_IRQ(evt2irq(0x940)),
-+ DEFINE_RES_IRQ(evt2irq(0x960)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -722,115 +708,6 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffd90008,
-- .end = 0xffd90013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x920),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffd90014,
-- .end = 0xffd9001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x940),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffd90020,
-- .end = 0xffd9002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x920),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
- /* JPU */
- static struct uio_info jpu_platform_data = {
- .name = "JPU",
-@@ -928,10 +805,6 @@ static struct platform_device *sh7724_devices[] __initdata = {
- &cmt_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- &dma0_device,
- &dma1_device,
- &rtc_device,
-@@ -971,10 +844,6 @@ static struct platform_device *sh7724_early_devices[] __initdata = {
- &cmt_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7734.c b/arch/sh/kernel/cpu/sh4a/setup-sh7734.c
-index dad4ed1b2f94..f617bcb734df 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7734.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7734.c
-@@ -200,25 +200,18 @@ static struct platform_device i2c0_device = {
-
- /* TMU */
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xFFD80008,
-- .end = 0xFFD80014 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -228,26 +221,19 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xFFD80014,
-- .end = 0xFFD80020 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd81000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x480)),
-+ DEFINE_RES_IRQ(evt2irq(0x4a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x4c0)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-+ .name = "sh-tmu",
-+ .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
- },
-@@ -256,25 +242,19 @@ static struct platform_device tmu1_device = {
- };
-
- static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xFFD80020,
-- .end = 0xFFD80030 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd82000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x500)),
-+ DEFINE_RES_IRQ(evt2irq(0x520)),
-+ DEFINE_RES_IRQ(evt2irq(0x540)),
- };
-
- static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-+ .name = "sh-tmu",
-+ .id = 2,
- .dev = {
- .platform_data = &tmu2_platform_data,
- },
-@@ -282,169 +262,6 @@ static struct platform_device tmu2_device = {
- .num_resources = ARRAY_SIZE(tmu2_resources),
- };
-
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xFFD81008,
-- .end = 0xFFD81014 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x480),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xFFD81014,
-- .end = 0xFFD81020 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4A0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xFFD81020,
-- .end = 0xFFD81030 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4C0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
--static struct sh_timer_config tmu6_platform_data = {
-- .channel_offset = 0x4,
-- .timer_bit = 0,
--};
--
--static struct resource tmu6_resources[] = {
-- [0] = {
-- .start = 0xFFD82008,
-- .end = 0xFFD82014 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x500),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu6_device = {
-- .name = "sh_tmu",
-- .id = 6,
-- .dev = {
-- .platform_data = &tmu6_platform_data,
-- },
-- .resource = tmu6_resources,
-- .num_resources = ARRAY_SIZE(tmu6_resources),
--};
--
--static struct sh_timer_config tmu7_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu7_resources[] = {
-- [0] = {
-- .start = 0xFFD82014,
-- .end = 0xFFD82020 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x520),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu7_device = {
-- .name = "sh_tmu",
-- .id = 7,
-- .dev = {
-- .platform_data = &tmu7_platform_data,
-- },
-- .resource = tmu7_resources,
-- .num_resources = ARRAY_SIZE(tmu7_resources),
--};
--
--static struct sh_timer_config tmu8_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu8_resources[] = {
-- [0] = {
-- .start = 0xFFD82020,
-- .end = 0xFFD82030 - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x540),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu8_device = {
-- .name = "sh_tmu",
-- .id = 8,
-- .dev = {
-- .platform_data = &tmu8_platform_data,
-- },
-- .resource = tmu8_resources,
-- .num_resources = ARRAY_SIZE(tmu8_resources),
--};
--
- static struct platform_device *sh7734_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
-@@ -455,12 +272,6 @@ static struct platform_device *sh7734_devices[] __initdata = {
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
-- &tmu6_device,
-- &tmu7_device,
-- &tmu8_device,
- &rtc_device,
- };
-
-@@ -474,12 +285,6 @@ static struct platform_device *sh7734_early_devices[] __initdata = {
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
-- &tmu6_device,
-- &tmu7_device,
-- &tmu8_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
-index e43e5db53913..7b24ec4b409a 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7757.c
-@@ -87,25 +87,17 @@ static struct platform_device scif4_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 3,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xfe430008,
-- .end = 0xfe430013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x580),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xfe430000, 0x20),
-+ DEFINE_RES_IRQ(evt2irq(0x580)),
-+ DEFINE_RES_IRQ(evt2irq(0x5a0)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -114,34 +106,6 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xfe430014,
-- .end = 0xfe43001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
- static struct resource spi0_resources[] = {
- [0] = {
- .start = 0xfe002000,
-@@ -782,7 +746,6 @@ static struct platform_device *sh7757_devices[] __initdata = {
- &scif3_device,
- &scif4_device,
- &tmu0_device,
-- &tmu1_device,
- &dma0_device,
- &dma1_device,
- &dma2_device,
-@@ -806,7 +769,6 @@ static struct platform_device *sh7757_early_devices[] __initdata = {
- &scif3_device,
- &scif4_device,
- &tmu0_device,
-- &tmu1_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
-index 5eebbd7f4c21..5a47d670ddec 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7763.c
-@@ -158,25 +158,18 @@ static struct platform_device usbf_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x580),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x580)),
-+ DEFINE_RES_IRQ(evt2irq(0x5a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x5c0)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -186,25 +179,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5a0),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd88000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0xe00)),
-+ DEFINE_RES_IRQ(evt2irq(0xe20)),
-+ DEFINE_RES_IRQ(evt2irq(0xe40)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -213,124 +199,12 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffd88008,
-- .end = 0xffd88013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffd88014,
-- .end = 0xffd8801f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe20),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffd88020,
-- .end = 0xffd8802b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe40),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
- static struct platform_device *sh7763_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &scif2_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- &rtc_device,
- &usb_ohci_device,
- &usbf_device,
-@@ -349,10 +223,6 @@ static struct platform_device *sh7763_early_devices[] __initdata = {
- &scif2_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
-index e1ba8cb74e5a..e9b532a76c37 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7770.c
-@@ -226,25 +226,18 @@ static struct platform_device scif9_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -254,25 +247,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd81000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x460)),
-+ DEFINE_RES_IRQ(evt2irq(0x480)),
-+ DEFINE_RES_IRQ(evt2irq(0x4a0)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -282,24 +268,18 @@ static struct platform_device tmu1_device = {
- };
-
- static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd82000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x4c0)),
-+ DEFINE_RES_IRQ(evt2irq(0x4e0)),
-+ DEFINE_RES_IRQ(evt2irq(0x500)),
- };
-
- static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 2,
- .dev = {
- .platform_data = &tmu2_platform_data,
-@@ -308,168 +288,6 @@ static struct platform_device tmu2_device = {
- .num_resources = ARRAY_SIZE(tmu2_resources),
- };
-
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffd81008,
-- .end = 0xffd81013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x460),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffd81014,
-- .end = 0xffd8101f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x480),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffd81020,
-- .end = 0xffd8102f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
--static struct sh_timer_config tmu6_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu6_resources[] = {
-- [0] = {
-- .start = 0xffd82008,
-- .end = 0xffd82013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu6_device = {
-- .name = "sh_tmu",
-- .id = 6,
-- .dev = {
-- .platform_data = &tmu6_platform_data,
-- },
-- .resource = tmu6_resources,
-- .num_resources = ARRAY_SIZE(tmu6_resources),
--};
--
--static struct sh_timer_config tmu7_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu7_resources[] = {
-- [0] = {
-- .start = 0xffd82014,
-- .end = 0xffd8201f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4e0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu7_device = {
-- .name = "sh_tmu",
-- .id = 7,
-- .dev = {
-- .platform_data = &tmu7_platform_data,
-- },
-- .resource = tmu7_resources,
-- .num_resources = ARRAY_SIZE(tmu7_resources),
--};
--
--static struct sh_timer_config tmu8_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu8_resources[] = {
-- [0] = {
-- .start = 0xffd82020,
-- .end = 0xffd8202b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x500),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu8_device = {
-- .name = "sh_tmu",
-- .id = 8,
-- .dev = {
-- .platform_data = &tmu8_platform_data,
-- },
-- .resource = tmu8_resources,
-- .num_resources = ARRAY_SIZE(tmu8_resources),
--};
--
- static struct platform_device *sh7770_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
-@@ -484,12 +302,6 @@ static struct platform_device *sh7770_devices[] __initdata = {
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
-- &tmu6_device,
-- &tmu7_device,
-- &tmu8_device,
- };
-
- static int __init sh7770_devices_setup(void)
-@@ -513,12 +325,6 @@ static struct platform_device *sh7770_early_devices[] __initdata = {
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
-- &tmu6_device,
-- &tmu7_device,
-- &tmu8_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
-index 668e54bafa86..3ee7dd9b3a65 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7780.c
-@@ -62,25 +62,18 @@ static struct platform_device scif1_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x580),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x580)),
-+ DEFINE_RES_IRQ(evt2irq(0x5a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x5c0)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -90,25 +83,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5a0),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffdc0000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0xe00)),
-+ DEFINE_RES_IRQ(evt2irq(0xe20)),
-+ DEFINE_RES_IRQ(evt2irq(0xe40)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -117,114 +103,6 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffdc0008,
-- .end = 0xffdc0013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffdc0014,
-- .end = 0xffdc001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe20),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffdc0020,
-- .end = 0xffdc002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe40),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
- static struct resource rtc_resources[] = {
- [0] = {
- .start = 0xffe80000,
-@@ -386,10 +264,6 @@ static struct platform_device *sh7780_devices[] __initdata = {
- &scif1_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- &rtc_device,
- &dma0_device,
- &dma1_device,
-@@ -407,10 +281,6 @@ static struct platform_device *sh7780_early_devices[] __initdata = {
- &scif1_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
-index 4aa679140209..c72d5a5d0995 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7785.c
-@@ -152,25 +152,18 @@ static struct platform_device scif5_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x580),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x580)),
-+ DEFINE_RES_IRQ(evt2irq(0x5a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x5c0)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -180,25 +173,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5a0),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffdc0000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0xe00)),
-+ DEFINE_RES_IRQ(evt2irq(0xe20)),
-+ DEFINE_RES_IRQ(evt2irq(0xe40)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -207,114 +193,6 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x5c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffdc0008,
-- .end = 0xffdc0013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe00),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffdc0014,
-- .end = 0xffdc001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe20),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffdc0020,
-- .end = 0xffdc002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0xe40),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
- /* DMA */
- static const struct sh_dmae_channel sh7785_dmae0_channels[] = {
- {
-@@ -460,10 +338,6 @@ static struct platform_device *sh7785_devices[] __initdata = {
- &scif5_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- &dma0_device,
- &dma1_device,
- };
-@@ -484,10 +358,6 @@ static struct platform_device *sh7785_early_devices[] __initdata = {
- &scif5_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
-index 5d619a551a3b..479e79bdd3d0 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-sh7786.c
-@@ -175,25 +175,18 @@ static struct platform_device scif5_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffd80008,
-- .end = 0xffd80013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffd80000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -203,25 +196,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffd80014,
-- .end = 0xffd8001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffda0000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x480)),
-+ DEFINE_RES_IRQ(evt2irq(0x4a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x4c0)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -231,24 +217,18 @@ static struct platform_device tmu1_device = {
- };
-
- static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffd80020,
-- .end = 0xffd8002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffdc0000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x7a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x7a0)),
-+ DEFINE_RES_IRQ(evt2irq(0x7a0)),
- };
-
- static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 2,
- .dev = {
- .platform_data = &tmu2_platform_data,
-@@ -258,24 +238,18 @@ static struct platform_device tmu2_device = {
- };
-
- static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffda0008,
-- .end = 0xffda0013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x480),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffde0000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x7c0)),
-+ DEFINE_RES_IRQ(evt2irq(0x7c0)),
-+ DEFINE_RES_IRQ(evt2irq(0x7c0)),
- };
-
- static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 3,
- .dev = {
- .platform_data = &tmu3_platform_data,
-@@ -284,222 +258,6 @@ static struct platform_device tmu3_device = {
- .num_resources = ARRAY_SIZE(tmu3_resources),
- };
-
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffda0014,
-- .end = 0xffda001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffda0020,
-- .end = 0xffda002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
--static struct sh_timer_config tmu6_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu6_resources[] = {
-- [0] = {
-- .start = 0xffdc0008,
-- .end = 0xffdc0013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x7a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu6_device = {
-- .name = "sh_tmu",
-- .id = 6,
-- .dev = {
-- .platform_data = &tmu6_platform_data,
-- },
-- .resource = tmu6_resources,
-- .num_resources = ARRAY_SIZE(tmu6_resources),
--};
--
--static struct sh_timer_config tmu7_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu7_resources[] = {
-- [0] = {
-- .start = 0xffdc0014,
-- .end = 0xffdc001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x7a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu7_device = {
-- .name = "sh_tmu",
-- .id = 7,
-- .dev = {
-- .platform_data = &tmu7_platform_data,
-- },
-- .resource = tmu7_resources,
-- .num_resources = ARRAY_SIZE(tmu7_resources),
--};
--
--static struct sh_timer_config tmu8_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu8_resources[] = {
-- [0] = {
-- .start = 0xffdc0020,
-- .end = 0xffdc002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x7a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu8_device = {
-- .name = "sh_tmu",
-- .id = 8,
-- .dev = {
-- .platform_data = &tmu8_platform_data,
-- },
-- .resource = tmu8_resources,
-- .num_resources = ARRAY_SIZE(tmu8_resources),
--};
--
--static struct sh_timer_config tmu9_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu9_resources[] = {
-- [0] = {
-- .start = 0xffde0008,
-- .end = 0xffde0013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x7c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu9_device = {
-- .name = "sh_tmu",
-- .id = 9,
-- .dev = {
-- .platform_data = &tmu9_platform_data,
-- },
-- .resource = tmu9_resources,
-- .num_resources = ARRAY_SIZE(tmu9_resources),
--};
--
--static struct sh_timer_config tmu10_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu10_resources[] = {
-- [0] = {
-- .start = 0xffde0014,
-- .end = 0xffde001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x7c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu10_device = {
-- .name = "sh_tmu",
-- .id = 10,
-- .dev = {
-- .platform_data = &tmu10_platform_data,
-- },
-- .resource = tmu10_resources,
-- .num_resources = ARRAY_SIZE(tmu10_resources),
--};
--
--static struct sh_timer_config tmu11_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu11_resources[] = {
-- [0] = {
-- .start = 0xffde0020,
-- .end = 0xffde002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x7c0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu11_device = {
-- .name = "sh_tmu",
-- .id = 11,
-- .dev = {
-- .platform_data = &tmu11_platform_data,
-- },
-- .resource = tmu11_resources,
-- .num_resources = ARRAY_SIZE(tmu11_resources),
--};
--
- static const struct sh_dmae_channel dmac0_channels[] = {
- {
- .offset = 0,
-@@ -641,15 +399,6 @@ static struct platform_device *sh7786_early_devices[] __initdata = {
- &tmu0_device,
- &tmu1_device,
- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
-- &tmu6_device,
-- &tmu7_device,
-- &tmu8_device,
-- &tmu9_device,
-- &tmu10_device,
-- &tmu11_device,
- };
-
- static struct platform_device *sh7786_devices[] __initdata = {
-diff --git a/arch/sh/kernel/cpu/sh4a/setup-shx3.c b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
-index 0856bcbb1da0..a78c5feb4e3b 100644
---- a/arch/sh/kernel/cpu/sh4a/setup-shx3.c
-+++ b/arch/sh/kernel/cpu/sh4a/setup-shx3.c
-@@ -100,25 +100,18 @@ static struct platform_device scif2_device = {
- };
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = 0xffc10008,
-- .end = 0xffc10013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x400),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffc10000, 0x30),
-+ DEFINE_RES_IRQ(evt2irq(0x400)),
-+ DEFINE_RES_IRQ(evt2irq(0x420)),
-+ DEFINE_RES_IRQ(evt2irq(0x440)),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -128,25 +121,18 @@ static struct platform_device tmu0_device = {
- };
-
- static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = 0xffc10014,
-- .end = 0xffc1001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x420),
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(0xffc20000, 0x2c),
-+ DEFINE_RES_IRQ(evt2irq(0x460)),
-+ DEFINE_RES_IRQ(evt2irq(0x480)),
-+ DEFINE_RES_IRQ(evt2irq(0x4a0)),
- };
-
- static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 1,
- .dev = {
- .platform_data = &tmu1_platform_data,
-@@ -155,124 +141,12 @@ static struct platform_device tmu1_device = {
- .num_resources = ARRAY_SIZE(tmu1_resources),
- };
-
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = 0xffc10020,
-- .end = 0xffc1002f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x440),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
--static struct sh_timer_config tmu3_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
--};
--
--static struct resource tmu3_resources[] = {
-- [0] = {
-- .start = 0xffc20008,
-- .end = 0xffc20013,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x460),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu3_device = {
-- .name = "sh_tmu",
-- .id = 3,
-- .dev = {
-- .platform_data = &tmu3_platform_data,
-- },
-- .resource = tmu3_resources,
-- .num_resources = ARRAY_SIZE(tmu3_resources),
--};
--
--static struct sh_timer_config tmu4_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
--};
--
--static struct resource tmu4_resources[] = {
-- [0] = {
-- .start = 0xffc20014,
-- .end = 0xffc2001f,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x480),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu4_device = {
-- .name = "sh_tmu",
-- .id = 4,
-- .dev = {
-- .platform_data = &tmu4_platform_data,
-- },
-- .resource = tmu4_resources,
-- .num_resources = ARRAY_SIZE(tmu4_resources),
--};
--
--static struct sh_timer_config tmu5_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu5_resources[] = {
-- [0] = {
-- .start = 0xffc20020,
-- .end = 0xffc2002b,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = evt2irq(0x4a0),
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu5_device = {
-- .name = "sh_tmu",
-- .id = 5,
-- .dev = {
-- .platform_data = &tmu5_platform_data,
-- },
-- .resource = tmu5_resources,
-- .num_resources = ARRAY_SIZE(tmu5_resources),
--};
--
- static struct platform_device *shx3_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &scif2_device,
- &tmu0_device,
- &tmu1_device,
-- &tmu2_device,
-- &tmu3_device,
-- &tmu4_device,
-- &tmu5_device,
- };
-
- static int __init shx3_devices_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh5/setup-sh5.c b/arch/sh/kernel/cpu/sh5/setup-sh5.c
-index 14d68213d16b..1bf0b2cf6652 100644
---- a/arch/sh/kernel/cpu/sh5/setup-sh5.c
-+++ b/arch/sh/kernel/cpu/sh5/setup-sh5.c
-@@ -71,30 +71,20 @@ static struct platform_device rtc_device = {
-
- #define TMU_BLOCK_OFF 0x01020000
- #define TMU_BASE PHYS_PERIPHERAL_BLOCK + TMU_BLOCK_OFF
--#define TMU0_BASE (TMU_BASE + 0x8 + (0xc * 0x0))
--#define TMU1_BASE (TMU_BASE + 0x8 + (0xc * 0x1))
--#define TMU2_BASE (TMU_BASE + 0x8 + (0xc * 0x2))
-
- static struct sh_timer_config tmu0_platform_data = {
-- .channel_offset = 0x04,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+ .channels_mask = 7,
- };
-
- static struct resource tmu0_resources[] = {
-- [0] = {
-- .start = TMU0_BASE,
-- .end = TMU0_BASE + 0xc - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = IRQ_TUNI0,
-- .flags = IORESOURCE_IRQ,
-- },
-+ DEFINE_RES_MEM(TMU_BASE, 0x30),
-+ DEFINE_RES_IRQ(IRQ_TUNI0),
-+ DEFINE_RES_IRQ(IRQ_TUNI1),
-+ DEFINE_RES_IRQ(IRQ_TUNI2),
- };
-
- static struct platform_device tmu0_device = {
-- .name = "sh_tmu",
-+ .name = "sh-tmu",
- .id = 0,
- .dev = {
- .platform_data = &tmu0_platform_data,
-@@ -103,66 +93,9 @@ static struct platform_device tmu0_device = {
- .num_resources = ARRAY_SIZE(tmu0_resources),
- };
-
--static struct sh_timer_config tmu1_platform_data = {
-- .channel_offset = 0x10,
-- .timer_bit = 1,
-- .clocksource_rating = 200,
--};
--
--static struct resource tmu1_resources[] = {
-- [0] = {
-- .start = TMU1_BASE,
-- .end = TMU1_BASE + 0xc - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = IRQ_TUNI1,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu1_device = {
-- .name = "sh_tmu",
-- .id = 1,
-- .dev = {
-- .platform_data = &tmu1_platform_data,
-- },
-- .resource = tmu1_resources,
-- .num_resources = ARRAY_SIZE(tmu1_resources),
--};
--
--static struct sh_timer_config tmu2_platform_data = {
-- .channel_offset = 0x1c,
-- .timer_bit = 2,
--};
--
--static struct resource tmu2_resources[] = {
-- [0] = {
-- .start = TMU2_BASE,
-- .end = TMU2_BASE + 0xc - 1,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = IRQ_TUNI2,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device tmu2_device = {
-- .name = "sh_tmu",
-- .id = 2,
-- .dev = {
-- .platform_data = &tmu2_platform_data,
-- },
-- .resource = tmu2_resources,
-- .num_resources = ARRAY_SIZE(tmu2_resources),
--};
--
- static struct platform_device *sh5_early_devices[] __initdata = {
- &scif0_device,
- &tmu0_device,
-- &tmu1_device,
-- &tmu2_device,
- };
-
- static struct platform_device *sh5_devices[] __initdata = {
---
-2.1.2
-
diff --git a/patches.renesas/0724-sh-Switch-to-new-style-MTU2-device.patch b/patches.renesas/0724-sh-Switch-to-new-style-MTU2-device.patch
deleted file mode 100644
index 867b73b7408c7..0000000000000
--- a/patches.renesas/0724-sh-Switch-to-new-style-MTU2-device.patch
+++ /dev/null
@@ -1,730 +0,0 @@
-From dfdcc20d59de3d006bdf38a5fcba726f03445ab0 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 23 Apr 2014 13:15:21 +0200
-Subject: sh: Switch to new style MTU2 device
-
-The MTU2 (Multi-Function Timer Pulse Unit 2) driver implements a new
-style of platform data that handles the timer as a single device with
-multiple channel. Switch from the old-style platform data to the
-new-style platform data.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5204601c0877b3ffc90e417bf30fccc9bdf47962)
-Signed-off-by: Simon Horman <horms@verge.net.au>
----
- arch/sh/kernel/cpu/clock-cpg.c | 2 +-
- arch/sh/kernel/cpu/sh2a/clock-sh7264.c | 2 +-
- arch/sh/kernel/cpu/sh2a/clock-sh7269.c | 2 +-
- arch/sh/kernel/cpu/sh2a/setup-mxg.c | 98 +++++-----------------------------
- arch/sh/kernel/cpu/sh2a/setup-sh7201.c | 98 +++++-----------------------------
- arch/sh/kernel/cpu/sh2a/setup-sh7203.c | 67 ++++-------------------
- arch/sh/kernel/cpu/sh2a/setup-sh7206.c | 98 +++++-----------------------------
- arch/sh/kernel/cpu/sh2a/setup-sh7264.c | 71 ++++--------------------
- arch/sh/kernel/cpu/sh2a/setup-sh7269.c | 67 ++++-------------------
- 9 files changed, 72 insertions(+), 433 deletions(-)
-
-diff --git a/arch/sh/kernel/cpu/clock-cpg.c b/arch/sh/kernel/cpu/clock-cpg.c
-index 121ef690763f..8525a671266f 100644
---- a/arch/sh/kernel/cpu/clock-cpg.c
-+++ b/arch/sh/kernel/cpu/clock-cpg.c
-@@ -60,7 +60,7 @@ int __init __deprecated cpg_clk_init(void)
- clk_add_alias("fck", "sh-tmu.0", "peripheral_clk", NULL);
- clk_add_alias("fck", "sh-tmu.1", "peripheral_clk", NULL);
- clk_add_alias("fck", "sh-tmu.2", "peripheral_clk", NULL);
-- clk_add_alias("mtu2_fck", NULL, "peripheral_clk", NULL);
-+ clk_add_alias("fck", "sh-mtu2", "peripheral_clk", NULL);
- clk_add_alias("fck", "sh-cmt-16.0", "peripheral_clk", NULL);
- clk_add_alias("fck", "sh-cmt-32.0", "peripheral_clk", NULL);
- clk_add_alias("sci_ick", NULL, "peripheral_clk", NULL);
-diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7264.c b/arch/sh/kernel/cpu/sh2a/clock-sh7264.c
-index c7f3c666a0ac..8638fba6cd7f 100644
---- a/arch/sh/kernel/cpu/sh2a/clock-sh7264.c
-+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7264.c
-@@ -119,7 +119,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_CON_ID("vdc3", &mstp_clks[MSTP74]),
- CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[MSTP72]),
- CLKDEV_CON_ID("usb0", &mstp_clks[MSTP60]),
-- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP35]),
-+ CLKDEV_ICK_ID("fck", "sh-mtu2", &mstp_clks[MSTP35]),
- CLKDEV_CON_ID("sdhi0", &mstp_clks[MSTP34]),
- CLKDEV_CON_ID("sdhi1", &mstp_clks[MSTP33]),
- CLKDEV_CON_ID("adc0", &mstp_clks[MSTP32]),
-diff --git a/arch/sh/kernel/cpu/sh2a/clock-sh7269.c b/arch/sh/kernel/cpu/sh2a/clock-sh7269.c
-index 4f47464f2fb6..f8a5c2abdfb3 100644
---- a/arch/sh/kernel/cpu/sh2a/clock-sh7269.c
-+++ b/arch/sh/kernel/cpu/sh2a/clock-sh7269.c
-@@ -160,7 +160,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("sci_fck", "sh-sci.7", &mstp_clks[MSTP40]),
- CLKDEV_ICK_ID("fck", "sh-cmt-16.0", &mstp_clks[MSTP72]),
- CLKDEV_CON_ID("usb0", &mstp_clks[MSTP60]),
-- CLKDEV_CON_ID("mtu2_fck", &mstp_clks[MSTP35]),
-+ CLKDEV_ICK_ID("fck", "sh-mtu2", &mstp_clks[MSTP35]),
- CLKDEV_CON_ID("adc0", &mstp_clks[MSTP32]),
- CLKDEV_CON_ID("rtc0", &mstp_clks[MSTP30]),
- };
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-mxg.c b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
-index 63e996f9a7ed..26fcdbd4127a 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-mxg.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-mxg.c
-@@ -114,88 +114,18 @@ static struct intc_mask_reg mask_registers[] __initdata = {
- static DECLARE_INTC_DESC(intc_desc, "mxg", vectors, groups,
- mask_registers, prio_registers, NULL);
-
--static struct sh_timer_config mtu2_0_platform_data = {
-- .channel_offset = -0x80,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] = {
-+ DEFINE_RES_MEM(0xff801000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(228, "tgi0a"),
-+ DEFINE_RES_IRQ_NAMED(234, "tgi1a"),
-+ DEFINE_RES_IRQ_NAMED(240, "tgi2a"),
- };
-
--static struct resource mtu2_0_resources[] = {
-- [0] = {
-- .start = 0xff801300,
-- .end = 0xff801326,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 228,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_0_device = {
-- .name = "sh_mtu2",
-- .id = 0,
-- .dev = {
-- .platform_data = &mtu2_0_platform_data,
-- },
-- .resource = mtu2_0_resources,
-- .num_resources = ARRAY_SIZE(mtu2_0_resources),
--};
--
--static struct sh_timer_config mtu2_1_platform_data = {
-- .channel_offset = -0x100,
-- .timer_bit = 1,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_1_resources[] = {
-- [0] = {
-- .start = 0xff801380,
-- .end = 0xff801390,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 234,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_1_device = {
-- .name = "sh_mtu2",
-- .id = 1,
-- .dev = {
-- .platform_data = &mtu2_1_platform_data,
-- },
-- .resource = mtu2_1_resources,
-- .num_resources = ARRAY_SIZE(mtu2_1_resources),
--};
--
--static struct sh_timer_config mtu2_2_platform_data = {
-- .channel_offset = 0x80,
-- .timer_bit = 2,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_2_resources[] = {
-- [0] = {
-- .start = 0xff801000,
-- .end = 0xff80100a,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 240,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_2_device = {
-- .name = "sh_mtu2",
-- .id = 2,
-- .dev = {
-- .platform_data = &mtu2_2_platform_data,
-- },
-- .resource = mtu2_2_resources,
-- .num_resources = ARRAY_SIZE(mtu2_2_resources),
-+static struct platform_device mtu2_device = {
-+ .name = "sh-mtu2",
-+ .id = -1,
-+ .resource = mtu2_resources,
-+ .num_resources = ARRAY_SIZE(mtu2_resources),
- };
-
- static struct plat_sci_port scif0_platform_data = {
-@@ -221,9 +151,7 @@ static struct platform_device scif0_device = {
-
- static struct platform_device *mxg_devices[] __initdata = {
- &scif0_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-- &mtu2_2_device,
-+ &mtu2_device,
- };
-
- static int __init mxg_devices_setup(void)
-@@ -240,9 +168,7 @@ void __init plat_irq_setup(void)
-
- static struct platform_device *mxg_early_devices[] __initdata = {
- &scif0_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-- &mtu2_2_device,
-+ &mtu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
-index 2c6874461536..abc0ce9fb800 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7201.c
-@@ -365,88 +365,18 @@ static struct platform_device rtc_device = {
- .resource = rtc_resources,
- };
-
--static struct sh_timer_config mtu2_0_platform_data = {
-- .channel_offset = -0x80,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] = {
-+ DEFINE_RES_MEM(0xfffe4000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(108, "tgi0a"),
-+ DEFINE_RES_IRQ_NAMED(116, "tgi1a"),
-+ DEFINE_RES_IRQ_NAMED(124, "tgi1b"),
- };
-
--static struct resource mtu2_0_resources[] = {
-- [0] = {
-- .start = 0xfffe4300,
-- .end = 0xfffe4326,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 108,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_0_device = {
-- .name = "sh_mtu2",
-- .id = 0,
-- .dev = {
-- .platform_data = &mtu2_0_platform_data,
-- },
-- .resource = mtu2_0_resources,
-- .num_resources = ARRAY_SIZE(mtu2_0_resources),
--};
--
--static struct sh_timer_config mtu2_1_platform_data = {
-- .channel_offset = -0x100,
-- .timer_bit = 1,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_1_resources[] = {
-- [0] = {
-- .start = 0xfffe4380,
-- .end = 0xfffe4390,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 116,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_1_device = {
-- .name = "sh_mtu2",
-- .id = 1,
-- .dev = {
-- .platform_data = &mtu2_1_platform_data,
-- },
-- .resource = mtu2_1_resources,
-- .num_resources = ARRAY_SIZE(mtu2_1_resources),
--};
--
--static struct sh_timer_config mtu2_2_platform_data = {
-- .channel_offset = 0x80,
-- .timer_bit = 2,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_2_resources[] = {
-- [0] = {
-- .start = 0xfffe4000,
-- .end = 0xfffe400a,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 124,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_2_device = {
-- .name = "sh_mtu2",
-- .id = 2,
-- .dev = {
-- .platform_data = &mtu2_2_platform_data,
-- },
-- .resource = mtu2_2_resources,
-- .num_resources = ARRAY_SIZE(mtu2_2_resources),
-+static struct platform_device mtu2_device = {
-+ .name = "sh-mtu2",
-+ .id = -1,
-+ .resource = mtu2_resources,
-+ .num_resources = ARRAY_SIZE(mtu2_resources),
- };
-
- static struct platform_device *sh7201_devices[] __initdata = {
-@@ -459,9 +389,7 @@ static struct platform_device *sh7201_devices[] __initdata = {
- &scif6_device,
- &scif7_device,
- &rtc_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-- &mtu2_2_device,
-+ &mtu2_device,
- };
-
- static int __init sh7201_devices_setup(void)
-@@ -485,9 +413,7 @@ static struct platform_device *sh7201_early_devices[] __initdata = {
- &scif5_device,
- &scif6_device,
- &scif7_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-- &mtu2_2_device,
-+ &mtu2_device,
- };
-
- #define STBCR3 0xfffe0408
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
-index 374f8c09d924..3b4894cba92f 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7203.c
-@@ -285,60 +285,17 @@ static struct platform_device cmt_device = {
- .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
--static struct sh_timer_config mtu2_0_platform_data = {
-- .channel_offset = -0x80,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] = {
-+ DEFINE_RES_MEM(0xfffe4000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(146, "tgi0a"),
-+ DEFINE_RES_IRQ_NAMED(153, "tgi1a"),
- };
-
--static struct resource mtu2_0_resources[] = {
-- [0] = {
-- .start = 0xfffe4300,
-- .end = 0xfffe4326,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 146,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_0_device = {
-- .name = "sh_mtu2",
-- .id = 0,
-- .dev = {
-- .platform_data = &mtu2_0_platform_data,
-- },
-- .resource = mtu2_0_resources,
-- .num_resources = ARRAY_SIZE(mtu2_0_resources),
--};
--
--static struct sh_timer_config mtu2_1_platform_data = {
-- .channel_offset = -0x100,
-- .timer_bit = 1,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_1_resources[] = {
-- [0] = {
-- .start = 0xfffe4380,
-- .end = 0xfffe4390,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 153,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_1_device = {
-- .name = "sh_mtu2",
-- .id = 1,
-- .dev = {
-- .platform_data = &mtu2_1_platform_data,
-- },
-- .resource = mtu2_1_resources,
-- .num_resources = ARRAY_SIZE(mtu2_1_resources),
-+static struct platform_device mtu2_device = {
-+ .name = "sh-mtu2",
-+ .id = -1,
-+ .resource = mtu2_resources,
-+ .num_resources = ARRAY_SIZE(mtu2_resources),
- };
-
- static struct resource rtc_resources[] = {
-@@ -367,8 +324,7 @@ static struct platform_device *sh7203_devices[] __initdata = {
- &scif2_device,
- &scif3_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-+ &mtu2_device,
- &rtc_device,
- };
-
-@@ -390,8 +346,7 @@ static struct platform_device *sh7203_early_devices[] __initdata = {
- &scif2_device,
- &scif3_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-+ &mtu2_device,
- };
-
- #define STBCR3 0xfffe0408
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
-index d00e6fd998ec..49bc5a34bec1 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7206.c
-@@ -237,88 +237,18 @@ static struct platform_device cmt_device = {
- .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
--static struct sh_timer_config mtu2_0_platform_data = {
-- .channel_offset = -0x80,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] = {
-+ DEFINE_RES_MEM(0xfffe4000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(156, "tgi0a"),
-+ DEFINE_RES_IRQ_NAMED(164, "tgi1a"),
-+ DEFINE_RES_IRQ_NAMED(180, "tgi2a"),
- };
-
--static struct resource mtu2_0_resources[] = {
-- [0] = {
-- .start = 0xfffe4300,
-- .end = 0xfffe4326,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 156,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_0_device = {
-- .name = "sh_mtu2",
-- .id = 0,
-- .dev = {
-- .platform_data = &mtu2_0_platform_data,
-- },
-- .resource = mtu2_0_resources,
-- .num_resources = ARRAY_SIZE(mtu2_0_resources),
--};
--
--static struct sh_timer_config mtu2_1_platform_data = {
-- .channel_offset = -0x100,
-- .timer_bit = 1,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_1_resources[] = {
-- [0] = {
-- .start = 0xfffe4380,
-- .end = 0xfffe4390,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 164,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_1_device = {
-- .name = "sh_mtu2",
-- .id = 1,
-- .dev = {
-- .platform_data = &mtu2_1_platform_data,
-- },
-- .resource = mtu2_1_resources,
-- .num_resources = ARRAY_SIZE(mtu2_1_resources),
--};
--
--static struct sh_timer_config mtu2_2_platform_data = {
-- .channel_offset = 0x80,
-- .timer_bit = 2,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_2_resources[] = {
-- [0] = {
-- .start = 0xfffe4000,
-- .end = 0xfffe400a,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 180,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_2_device = {
-- .name = "sh_mtu2",
-- .id = 2,
-- .dev = {
-- .platform_data = &mtu2_2_platform_data,
-- },
-- .resource = mtu2_2_resources,
-- .num_resources = ARRAY_SIZE(mtu2_2_resources),
-+static struct platform_device mtu2_device = {
-+ .name = "sh-mtu2s",
-+ .id = -1,
-+ .resource = mtu2_resources,
-+ .num_resources = ARRAY_SIZE(mtu2_resources),
- };
-
- static struct platform_device *sh7206_devices[] __initdata = {
-@@ -327,9 +257,7 @@ static struct platform_device *sh7206_devices[] __initdata = {
- &scif2_device,
- &scif3_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-- &mtu2_2_device,
-+ &mtu2_device,
- };
-
- static int __init sh7206_devices_setup(void)
-@@ -350,9 +278,7 @@ static struct platform_device *sh7206_early_devices[] __initdata = {
- &scif2_device,
- &scif3_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-- &mtu2_2_device,
-+ &mtu2_device,
- };
-
- #define STBCR3 0xfffe0408
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c
-index e95250e82752..608146455562 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7264.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7264.c
-@@ -453,64 +453,17 @@ static struct platform_device cmt_device = {
- .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
--static struct sh_timer_config mtu2_0_platform_data = {
-- .name = "MTU2_0",
-- .channel_offset = -0x80,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] = {
-+ DEFINE_RES_MEM(0xfffe4000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(179, "tgi0a"),
-+ DEFINE_RES_IRQ_NAMED(186, "tgi1a"),
- };
-
--static struct resource mtu2_0_resources[] = {
-- [0] = {
-- .name = "MTU2_0",
-- .start = 0xfffe4300,
-- .end = 0xfffe4326,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 179,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_0_device = {
-- .name = "sh_mtu2",
-- .id = 0,
-- .dev = {
-- .platform_data = &mtu2_0_platform_data,
-- },
-- .resource = mtu2_0_resources,
-- .num_resources = ARRAY_SIZE(mtu2_0_resources),
--};
--
--static struct sh_timer_config mtu2_1_platform_data = {
-- .name = "MTU2_1",
-- .channel_offset = -0x100,
-- .timer_bit = 1,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_1_resources[] = {
-- [0] = {
-- .name = "MTU2_1",
-- .start = 0xfffe4380,
-- .end = 0xfffe4390,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 186,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_1_device = {
-- .name = "sh_mtu2",
-- .id = 1,
-- .dev = {
-- .platform_data = &mtu2_1_platform_data,
-- },
-- .resource = mtu2_1_resources,
-- .num_resources = ARRAY_SIZE(mtu2_1_resources),
-+static struct platform_device mtu2_device = {
-+ .name = "sh-mtu2",
-+ .id = -1,
-+ .resource = mtu2_resources,
-+ .num_resources = ARRAY_SIZE(mtu2_resources),
- };
-
- static struct resource rtc_resources[] = {
-@@ -580,8 +533,7 @@ static struct platform_device *sh7264_devices[] __initdata = {
- &scif6_device,
- &scif7_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-+ &mtu2_device,
- &rtc_device,
- &r8a66597_usb_host_device,
- };
-@@ -608,8 +560,7 @@ static struct platform_device *sh7264_early_devices[] __initdata = {
- &scif6_device,
- &scif7_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-+ &mtu2_device,
- };
-
- void __init plat_early_device_setup(void)
-diff --git a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c
-index 0191e1ae8411..16ce5aa77bdd 100644
---- a/arch/sh/kernel/cpu/sh2a/setup-sh7269.c
-+++ b/arch/sh/kernel/cpu/sh2a/setup-sh7269.c
-@@ -475,60 +475,17 @@ static struct platform_device cmt_device = {
- .num_resources = ARRAY_SIZE(cmt_resources),
- };
-
--static struct sh_timer_config mtu2_0_platform_data = {
-- .channel_offset = -0x80,
-- .timer_bit = 0,
-- .clockevent_rating = 200,
-+static struct resource mtu2_resources[] = {
-+ DEFINE_RES_MEM(0xfffe4000, 0x400),
-+ DEFINE_RES_IRQ_NAMED(192, "tgi0a"),
-+ DEFINE_RES_IRQ_NAMED(203, "tgi1a"),
- };
-
--static struct resource mtu2_0_resources[] = {
-- [0] = {
-- .start = 0xfffe4300,
-- .end = 0xfffe4326,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 192,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_0_device = {
-- .name = "sh_mtu2",
-- .id = 0,
-- .dev = {
-- .platform_data = &mtu2_0_platform_data,
-- },
-- .resource = mtu2_0_resources,
-- .num_resources = ARRAY_SIZE(mtu2_0_resources),
--};
--
--static struct sh_timer_config mtu2_1_platform_data = {
-- .channel_offset = -0x100,
-- .timer_bit = 1,
-- .clockevent_rating = 200,
--};
--
--static struct resource mtu2_1_resources[] = {
-- [0] = {
-- .start = 0xfffe4380,
-- .end = 0xfffe4390,
-- .flags = IORESOURCE_MEM,
-- },
-- [1] = {
-- .start = 203,
-- .flags = IORESOURCE_IRQ,
-- },
--};
--
--static struct platform_device mtu2_1_device = {
-- .name = "sh_mtu2",
-- .id = 1,
-- .dev = {
-- .platform_data = &mtu2_1_platform_data,
-- },
-- .resource = mtu2_1_resources,
-- .num_resources = ARRAY_SIZE(mtu2_1_resources),
-+static struct platform_device mtu2_device = {
-+ .name = "sh-mtu2",
-+ .id = -1,
-+ .resource = mtu2_resources,
-+ .num_resources = ARRAY_SIZE(mtu2_resources),
- };
-
- static struct resource rtc_resources[] = {
-@@ -592,8 +549,7 @@ static struct platform_device *sh7269_devices[] __initdata = {
- &scif6_device,
- &scif7_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-+ &mtu2_device,
- &rtc_device,
- &r8a66597_usb_host_device,
- };
-@@ -620,8 +576,7 @@ static struct platform_device *sh7269_early_devices[] __initdata = {
- &scif6_device,
- &scif7_device,
- &cmt_device,
-- &mtu2_0_device,
-- &mtu2_1_device,
-+ &mtu2_device,
- };
-
- void __init plat_early_device_setup(void)
---
-2.1.2
-
diff --git a/patches.renesas/0725-clocksource-sh_cmt-Drop-support-for-legacy-platform-.patch b/patches.renesas/0725-clocksource-sh_cmt-Drop-support-for-legacy-platform-.patch
deleted file mode 100644
index f01691dd3cb97..0000000000000
--- a/patches.renesas/0725-clocksource-sh_cmt-Drop-support-for-legacy-platform-.patch
+++ /dev/null
@@ -1,280 +0,0 @@
-From 3299a98dc63658c707816ac96c99fa14df12fa70 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 28 Jan 2014 15:52:46 +0100
-Subject: clocksource: sh_cmt: Drop support for legacy platform data
-
-Now that all platforms have switched to the new-style platform data,
-drop support for the legacy version.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 31e912f598371bcfdffc990289029e1110f8b3f9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 172 ++++++++++---------------------------------
- 1 file changed, 40 insertions(+), 132 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index dfa780396b91..fcd38db9ce5c 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -114,9 +114,7 @@ struct sh_cmt_device {
- struct platform_device *pdev;
-
- const struct sh_cmt_info *info;
-- bool legacy;
-
-- void __iomem *mapbase_ch;
- void __iomem *mapbase;
- struct clk *clk;
-
-@@ -792,7 +790,7 @@ static int sh_cmt_register_clockevent(struct sh_cmt_channel *ch,
- int irq;
- int ret;
-
-- irq = platform_get_irq(ch->cmt->pdev, ch->cmt->legacy ? 0 : ch->index);
-+ irq = platform_get_irq(ch->cmt->pdev, ch->index);
- if (irq < 0) {
- dev_err(&ch->cmt->pdev->dev, "ch%u: failed to get irq\n",
- ch->index);
-@@ -863,33 +861,26 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- * Compute the address of the channel control register block. For the
- * timers with a per-channel start/stop register, compute its address
- * as well.
-- *
-- * For legacy configuration the address has been mapped explicitly.
- */
-- if (cmt->legacy) {
-- ch->ioctrl = cmt->mapbase_ch;
-- } else {
-- switch (cmt->info->model) {
-- case SH_CMT_16BIT:
-- ch->ioctrl = cmt->mapbase + 2 + ch->hwidx * 6;
-- break;
-- case SH_CMT_32BIT:
-- case SH_CMT_48BIT:
-- ch->ioctrl = cmt->mapbase + 0x10 + ch->hwidx * 0x10;
-- break;
-- case SH_CMT_32BIT_FAST:
-- /*
-- * The 32-bit "fast" timer has a single channel at hwidx
-- * 5 but is located at offset 0x40 instead of 0x60 for
-- * some reason.
-- */
-- ch->ioctrl = cmt->mapbase + 0x40;
-- break;
-- case SH_CMT_48BIT_GEN2:
-- ch->iostart = cmt->mapbase + ch->hwidx * 0x100;
-- ch->ioctrl = ch->iostart + 0x10;
-- break;
-- }
-+ switch (cmt->info->model) {
-+ case SH_CMT_16BIT:
-+ ch->ioctrl = cmt->mapbase + 2 + ch->hwidx * 6;
-+ break;
-+ case SH_CMT_32BIT:
-+ case SH_CMT_48BIT:
-+ ch->ioctrl = cmt->mapbase + 0x10 + ch->hwidx * 0x10;
-+ break;
-+ case SH_CMT_32BIT_FAST:
-+ /*
-+ * The 32-bit "fast" timer has a single channel at hwidx 5 but
-+ * is located at offset 0x40 instead of 0x60 for some reason.
-+ */
-+ ch->ioctrl = cmt->mapbase + 0x40;
-+ break;
-+ case SH_CMT_48BIT_GEN2:
-+ ch->iostart = cmt->mapbase + ch->hwidx * 0x100;
-+ ch->ioctrl = ch->iostart + 0x10;
-+ break;
- }
-
- if (cmt->info->width == (sizeof(ch->max_match_value) * 8))
-@@ -900,12 +891,7 @@ static int sh_cmt_setup_channel(struct sh_cmt_channel *ch, unsigned int index,
- ch->match_value = ch->max_match_value;
- raw_spin_lock_init(&ch->lock);
-
-- if (cmt->legacy) {
-- ch->timer_bit = ch->hwidx;
-- } else {
-- ch->timer_bit = cmt->info->model == SH_CMT_48BIT_GEN2
-- ? 0 : ch->hwidx;
-- }
-+ ch->timer_bit = cmt->info->model == SH_CMT_48BIT_GEN2 ? 0 : ch->hwidx;
-
- ret = sh_cmt_register(ch, dev_name(&cmt->pdev->dev),
- clockevent, clocksource);
-@@ -938,60 +924,12 @@ static int sh_cmt_map_memory(struct sh_cmt_device *cmt)
- return 0;
- }
-
--static int sh_cmt_map_memory_legacy(struct sh_cmt_device *cmt)
--{
-- struct sh_timer_config *cfg = cmt->pdev->dev.platform_data;
-- struct resource *res, *res2;
--
-- /* map memory, let mapbase_ch point to our channel */
-- res = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 0);
-- if (!res) {
-- dev_err(&cmt->pdev->dev, "failed to get I/O memory\n");
-- return -ENXIO;
-- }
--
-- cmt->mapbase_ch = ioremap_nocache(res->start, resource_size(res));
-- if (cmt->mapbase_ch == NULL) {
-- dev_err(&cmt->pdev->dev, "failed to remap I/O memory\n");
-- return -ENXIO;
-- }
--
-- /* optional resource for the shared timer start/stop register */
-- res2 = platform_get_resource(cmt->pdev, IORESOURCE_MEM, 1);
--
-- /* map second resource for CMSTR */
-- cmt->mapbase = ioremap_nocache(res2 ? res2->start :
-- res->start - cfg->channel_offset,
-- res2 ? resource_size(res2) : 2);
-- if (cmt->mapbase == NULL) {
-- dev_err(&cmt->pdev->dev, "failed to remap I/O second memory\n");
-- iounmap(cmt->mapbase_ch);
-- return -ENXIO;
-- }
--
-- /* identify the model based on the resources */
-- if (resource_size(res) == 6)
-- cmt->info = &sh_cmt_info[SH_CMT_16BIT];
-- else if (res2 && (resource_size(res2) == 4))
-- cmt->info = &sh_cmt_info[SH_CMT_48BIT_GEN2];
-- else
-- cmt->info = &sh_cmt_info[SH_CMT_32BIT];
--
-- return 0;
--}
--
--static void sh_cmt_unmap_memory(struct sh_cmt_device *cmt)
--{
-- iounmap(cmt->mapbase);
-- if (cmt->mapbase_ch)
-- iounmap(cmt->mapbase_ch);
--}
--
- static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
- const struct platform_device_id *id = pdev->id_entry;
-- unsigned int hw_channels;
-+ unsigned int mask;
-+ unsigned int i;
- int ret;
-
- memset(cmt, 0, sizeof(*cmt));
-@@ -1003,10 +941,9 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- }
-
- cmt->info = (const struct sh_cmt_info *)id->driver_data;
-- cmt->legacy = cmt->info ? false : true;
-
- /* Get hold of clock. */
-- cmt->clk = clk_get(&cmt->pdev->dev, cmt->legacy ? "cmt_fck" : "fck");
-+ cmt->clk = clk_get(&cmt->pdev->dev, "fck");
- if (IS_ERR(cmt->clk)) {
- dev_err(&cmt->pdev->dev, "cannot get clock\n");
- return PTR_ERR(cmt->clk);
-@@ -1016,27 +953,13 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- if (ret < 0)
- goto err_clk_put;
-
-- /*
-- * Map the memory resource(s). We need to support both the legacy
-- * platform device configuration (with one device per channel) and the
-- * new version (with multiple channels per device).
-- */
-- if (cmt->legacy)
-- ret = sh_cmt_map_memory_legacy(cmt);
-- else
-- ret = sh_cmt_map_memory(cmt);
--
-+ /* Map the memory resource(s). */
-+ ret = sh_cmt_map_memory(cmt);
- if (ret < 0)
- goto err_clk_unprepare;
-
- /* Allocate and setup the channels. */
-- if (cmt->legacy) {
-- cmt->num_channels = 1;
-- hw_channels = 0;
-- } else {
-- cmt->num_channels = hweight8(cfg->channels_mask);
-- hw_channels = cfg->channels_mask;
-- }
-+ cmt->num_channels = hweight8(cfg->channels_mask);
-
- cmt->channels = kzalloc(cmt->num_channels * sizeof(*cmt->channels),
- GFP_KERNEL);
-@@ -1045,35 +968,21 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- goto err_unmap;
- }
-
-- if (cmt->legacy) {
-- ret = sh_cmt_setup_channel(&cmt->channels[0],
-- cfg->timer_bit, cfg->timer_bit,
-- cfg->clockevent_rating != 0,
-- cfg->clocksource_rating != 0, cmt);
-+ /*
-+ * Use the first channel as a clock event device and the second channel
-+ * as a clock source. If only one channel is available use it for both.
-+ */
-+ for (i = 0, mask = cfg->channels_mask; i < cmt->num_channels; ++i) {
-+ unsigned int hwidx = ffs(mask) - 1;
-+ bool clocksource = i == 1 || cmt->num_channels == 1;
-+ bool clockevent = i == 0;
-+
-+ ret = sh_cmt_setup_channel(&cmt->channels[i], i, hwidx,
-+ clockevent, clocksource, cmt);
- if (ret < 0)
- goto err_unmap;
-- } else {
-- unsigned int mask = hw_channels;
-- unsigned int i;
-
-- /*
-- * Use the first channel as a clock event device and the second
-- * channel as a clock source. If only one channel is available
-- * use it for both.
-- */
-- for (i = 0; i < cmt->num_channels; ++i) {
-- unsigned int hwidx = ffs(mask) - 1;
-- bool clocksource = i == 1 || cmt->num_channels == 1;
-- bool clockevent = i == 0;
--
-- ret = sh_cmt_setup_channel(&cmt->channels[i], i, hwidx,
-- clockevent, clocksource,
-- cmt);
-- if (ret < 0)
-- goto err_unmap;
--
-- mask &= ~(1 << hwidx);
-- }
-+ mask &= ~(1 << hwidx);
- }
-
- platform_set_drvdata(pdev, cmt);
-@@ -1082,7 +991,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
-
- err_unmap:
- kfree(cmt->channels);
-- sh_cmt_unmap_memory(cmt);
-+ iounmap(cmt->mapbase);
- err_clk_unprepare:
- clk_unprepare(cmt->clk);
- err_clk_put:
-@@ -1133,7 +1042,6 @@ static int sh_cmt_remove(struct platform_device *pdev)
- }
-
- static const struct platform_device_id sh_cmt_id_table[] = {
-- { "sh_cmt", 0 },
- { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
- { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
- { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
---
-2.1.2
-
diff --git a/patches.renesas/0726-clocksource-sh_cmt-Replace-global-spinlock-with-a-pe.patch b/patches.renesas/0726-clocksource-sh_cmt-Replace-global-spinlock-with-a-pe.patch
deleted file mode 100644
index b90ca8a2dff1e..0000000000000
--- a/patches.renesas/0726-clocksource-sh_cmt-Replace-global-spinlock-with-a-pe.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 6de420f767f4c83f84403fd362bec640424429d3 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 16:49:05 +0100
-Subject: clocksource: sh_cmt: Replace global spinlock with a per-device
- spinlock
-
-The global spinlock is used to protect the shared start/stop register.
-Now that all CMT channels are handled by a single device instance, use a
-per-device spinlock.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit de599c8843ebbdfc29a119c94af481b1de76700e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_cmt.c | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index fcd38db9ce5c..190c655d8352 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -118,6 +118,8 @@ struct sh_cmt_device {
- void __iomem *mapbase;
- struct clk *clk;
-
-+ raw_spinlock_t lock; /* Protect the shared start/stop register */
-+
- struct sh_cmt_channel *channels;
- unsigned int num_channels;
-
-@@ -299,14 +301,12 @@ static unsigned long sh_cmt_get_counter(struct sh_cmt_channel *ch,
- return v2;
- }
-
--static DEFINE_RAW_SPINLOCK(sh_cmt_lock);
--
- static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
- {
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
-- raw_spin_lock_irqsave(&sh_cmt_lock, flags);
-+ raw_spin_lock_irqsave(&ch->cmt->lock, flags);
- value = sh_cmt_read_cmstr(ch);
-
- if (start)
-@@ -315,7 +315,7 @@ static void sh_cmt_start_stop_ch(struct sh_cmt_channel *ch, int start)
- value &= ~(1 << ch->timer_bit);
-
- sh_cmt_write_cmstr(ch, value);
-- raw_spin_unlock_irqrestore(&sh_cmt_lock, flags);
-+ raw_spin_unlock_irqrestore(&ch->cmt->lock, flags);
- }
-
- static int sh_cmt_enable(struct sh_cmt_channel *ch, unsigned long *rate)
-@@ -934,6 +934,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
-
- memset(cmt, 0, sizeof(*cmt));
- cmt->pdev = pdev;
-+ raw_spin_lock_init(&cmt->lock);
-
- if (!cfg) {
- dev_err(&cmt->pdev->dev, "missing platform data\n");
---
-2.1.2
-
diff --git a/patches.renesas/0727-clocksource-shmobile-Remove-unused-sh_timer_config-m.patch b/patches.renesas/0727-clocksource-shmobile-Remove-unused-sh_timer_config-m.patch
deleted file mode 100644
index 4e56b0ca2e802..0000000000000
--- a/patches.renesas/0727-clocksource-shmobile-Remove-unused-sh_timer_config-m.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From ed2a102bc496201d654500ef58c2e509e94ce356 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 18:50:53 +0100
-Subject: clocksource: shmobile: Remove unused sh_timer_config members
-
-The name, channel_offset, timer_bit, clockevent_rating and
-clocksource_rating members are unused. Remove them.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 628627bfd943c077c65489acd8b23c7bb14eb0e2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- include/linux/sh_timer.h | 5 -----
- 1 file changed, 5 deletions(-)
-
-diff --git a/include/linux/sh_timer.h b/include/linux/sh_timer.h
-index 8e1e036d6d45..64638b058076 100644
---- a/include/linux/sh_timer.h
-+++ b/include/linux/sh_timer.h
-@@ -2,11 +2,6 @@
- #define __SH_TIMER_H__
-
- struct sh_timer_config {
-- char *name;
-- long channel_offset;
-- int timer_bit;
-- unsigned long clockevent_rating;
-- unsigned long clocksource_rating;
- unsigned int channels_mask;
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0728-clocksource-sh_cmt-Add-DT-support.patch b/patches.renesas/0728-clocksource-sh_cmt-Add-DT-support.patch
deleted file mode 100644
index e17bc81b4ba14..0000000000000
--- a/patches.renesas/0728-clocksource-sh_cmt-Add-DT-support.patch
+++ /dev/null
@@ -1,203 +0,0 @@
-From dcdd09a574c635a9b7a1b32a9f890ece4e150092 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 12 Feb 2014 17:12:40 +0100
-Subject: clocksource: sh_cmt: Add DT support
-
-Document DT bindings and parse them in the CMT driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1768aa2f4c1248051013282c6cf63b368016cb53)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/timer/renesas,cmt.txt | 47 +++++++++++++++
- drivers/clocksource/sh_cmt.c | 66 ++++++++++++++++------
- 2 files changed, 95 insertions(+), 18 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/timer/renesas,cmt.txt
-
-diff --git a/Documentation/devicetree/bindings/timer/renesas,cmt.txt b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
-new file mode 100644
-index 000000000000..a17418b0ece3
---- /dev/null
-+++ b/Documentation/devicetree/bindings/timer/renesas,cmt.txt
-@@ -0,0 +1,47 @@
-+* Renesas R-Car Compare Match Timer (CMT)
-+
-+The CMT is a multi-channel 16/32/48-bit timer/counter with configurable clock
-+inputs and programmable compare match.
-+
-+Channels share hardware resources but their counter and compare match value
-+are independent. A particular CMT instance can implement only a subset of the
-+channels supported by the CMT model. Channel indices represent the hardware
-+position of the channel in the CMT and don't match the channel numbers in the
-+datasheets.
-+
-+Required Properties:
-+
-+ - compatible: must contain one of the following.
-+ - "renesas,cmt-32" for the 32-bit CMT
-+ (CMT0 on sh7372, sh73a0 and r8a7740)
-+ - "renesas,cmt-32-fast" for the 32-bit CMT with fast clock support
-+ (CMT[234] on sh7372, sh73a0 and r8a7740)
-+ - "renesas,cmt-48" for the 48-bit CMT
-+ (CMT1 on sh7372, sh73a0 and r8a7740)
-+ - "renesas,cmt-48-gen2" for the second generation 48-bit CMT
-+ (CMT[01] on r8a73a4, r8a7790 and r8a7791)
-+
-+ - reg: base address and length of the registers block for the timer module.
-+ - interrupts: interrupt-specifier for the timer, one per channel.
-+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
-+ in clock-names.
-+ - clock-names: must contain "fck" for the functional clock.
-+
-+ - renesas,channels-mask: bitmask of the available channels.
-+
-+
-+Example: R8A7790 (R-Car H2) CMT0 node
-+
-+ CMT0 on R8A7790 implements hardware channels 5 and 6 only and names
-+ them channels 0 and 1 in the documentation.
-+
-+ cmt0: timer@ffca0000 {
-+ compatible = "renesas,cmt-48-gen2";
-+ reg = <0 0xffca0000 0 0x1004>;
-+ interrupts = <0 142 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 142 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp1_clks R8A7790_CLK_CMT0>;
-+ clock-names = "fck";
-+
-+ renesas,channels-mask = <0x60>;
-+ };
-diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c
-index 190c655d8352..2bd13b53b727 100644
---- a/drivers/clocksource/sh_cmt.c
-+++ b/drivers/clocksource/sh_cmt.c
-@@ -24,6 +24,7 @@
- #include <linux/ioport.h>
- #include <linux/irq.h>
- #include <linux/module.h>
-+#include <linux/of.h>
- #include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-@@ -122,6 +123,7 @@ struct sh_cmt_device {
-
- struct sh_cmt_channel *channels;
- unsigned int num_channels;
-+ unsigned int hw_channels;
-
- bool has_clockevent;
- bool has_clocksource;
-@@ -924,10 +926,35 @@ static int sh_cmt_map_memory(struct sh_cmt_device *cmt)
- return 0;
- }
-
-+static const struct platform_device_id sh_cmt_id_table[] = {
-+ { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
-+ { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
-+ { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
-+ { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
-+ { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
-+
-+static const struct of_device_id sh_cmt_of_table[] __maybe_unused = {
-+ { .compatible = "renesas,cmt-32", .data = &sh_cmt_info[SH_CMT_32BIT] },
-+ { .compatible = "renesas,cmt-32-fast", .data = &sh_cmt_info[SH_CMT_32BIT_FAST] },
-+ { .compatible = "renesas,cmt-48", .data = &sh_cmt_info[SH_CMT_48BIT] },
-+ { .compatible = "renesas,cmt-48-gen2", .data = &sh_cmt_info[SH_CMT_48BIT_GEN2] },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(of, sh_cmt_of_table);
-+
-+static int sh_cmt_parse_dt(struct sh_cmt_device *cmt)
-+{
-+ struct device_node *np = cmt->pdev->dev.of_node;
-+
-+ return of_property_read_u32(np, "renesas,channels-mask",
-+ &cmt->hw_channels);
-+}
-+
- static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- {
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
-- const struct platform_device_id *id = pdev->id_entry;
- unsigned int mask;
- unsigned int i;
- int ret;
-@@ -936,13 +963,26 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- cmt->pdev = pdev;
- raw_spin_lock_init(&cmt->lock);
-
-- if (!cfg) {
-+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
-+ const struct of_device_id *id;
-+
-+ id = of_match_node(sh_cmt_of_table, pdev->dev.of_node);
-+ cmt->info = id->data;
-+
-+ ret = sh_cmt_parse_dt(cmt);
-+ if (ret < 0)
-+ return ret;
-+ } else if (pdev->dev.platform_data) {
-+ struct sh_timer_config *cfg = pdev->dev.platform_data;
-+ const struct platform_device_id *id = pdev->id_entry;
-+
-+ cmt->info = (const struct sh_cmt_info *)id->driver_data;
-+ cmt->hw_channels = cfg->channels_mask;
-+ } else {
- dev_err(&cmt->pdev->dev, "missing platform data\n");
- return -ENXIO;
- }
-
-- cmt->info = (const struct sh_cmt_info *)id->driver_data;
--
- /* Get hold of clock. */
- cmt->clk = clk_get(&cmt->pdev->dev, "fck");
- if (IS_ERR(cmt->clk)) {
-@@ -960,8 +1000,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- goto err_clk_unprepare;
-
- /* Allocate and setup the channels. */
-- cmt->num_channels = hweight8(cfg->channels_mask);
--
-+ cmt->num_channels = hweight8(cmt->hw_channels);
- cmt->channels = kzalloc(cmt->num_channels * sizeof(*cmt->channels),
- GFP_KERNEL);
- if (cmt->channels == NULL) {
-@@ -973,7 +1012,7 @@ static int sh_cmt_setup(struct sh_cmt_device *cmt, struct platform_device *pdev)
- * Use the first channel as a clock event device and the second channel
- * as a clock source. If only one channel is available use it for both.
- */
-- for (i = 0, mask = cfg->channels_mask; i < cmt->num_channels; ++i) {
-+ for (i = 0, mask = cmt->hw_channels; i < cmt->num_channels; ++i) {
- unsigned int hwidx = ffs(mask) - 1;
- bool clocksource = i == 1 || cmt->num_channels == 1;
- bool clockevent = i == 0;
-@@ -1042,21 +1081,12 @@ static int sh_cmt_remove(struct platform_device *pdev)
- return -EBUSY; /* cannot unregister clockevent and clocksource */
- }
-
--static const struct platform_device_id sh_cmt_id_table[] = {
-- { "sh-cmt-16", (kernel_ulong_t)&sh_cmt_info[SH_CMT_16BIT] },
-- { "sh-cmt-32", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT] },
-- { "sh-cmt-32-fast", (kernel_ulong_t)&sh_cmt_info[SH_CMT_32BIT_FAST] },
-- { "sh-cmt-48", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT] },
-- { "sh-cmt-48-gen2", (kernel_ulong_t)&sh_cmt_info[SH_CMT_48BIT_GEN2] },
-- { }
--};
--MODULE_DEVICE_TABLE(platform, sh_cmt_id_table);
--
- static struct platform_driver sh_cmt_device_driver = {
- .probe = sh_cmt_probe,
- .remove = sh_cmt_remove,
- .driver = {
- .name = "sh_cmt",
-+ .of_match_table = of_match_ptr(sh_cmt_of_table),
- },
- .id_table = sh_cmt_id_table,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0729-clocksource-sh_mtu2-Drop-support-for-legacy-platform.patch b/patches.renesas/0729-clocksource-sh_mtu2-Drop-support-for-legacy-platform.patch
deleted file mode 100644
index db5d518d2acbb..0000000000000
--- a/patches.renesas/0729-clocksource-sh_mtu2-Drop-support-for-legacy-platform.patch
+++ /dev/null
@@ -1,261 +0,0 @@
-From 409422d1d0e593caa5f0cdf7612115503f0d9802 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 18:13:57 +0100
-Subject: clocksource: sh_mtu2: Drop support for legacy platform data
-
-Now that all platforms have switched to the new-style platform data,
-drop support for the legacy version.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 1a5da0e43be0c07462e445549dbdd4a1731a3e11)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 130 ++++++++++--------------------------------
- 1 file changed, 31 insertions(+), 99 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 188d4e092efc..0342e4a01c9e 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -37,7 +37,6 @@ struct sh_mtu2_channel {
- unsigned int index;
-
- void __iomem *base;
-- int irq;
-
- struct clock_event_device ced;
- };
-@@ -51,7 +50,6 @@ struct sh_mtu2_device {
- struct sh_mtu2_channel *channels;
- unsigned int num_channels;
-
-- bool legacy;
- bool has_clockevent;
- };
-
-@@ -162,12 +160,8 @@ static inline unsigned long sh_mtu2_read(struct sh_mtu2_channel *ch, int reg_nr)
- {
- unsigned long offs;
-
-- if (reg_nr == TSTR) {
-- if (ch->mtu->legacy)
-- return ioread8(ch->mtu->mapbase);
-- else
-- return ioread8(ch->mtu->mapbase + 0x280);
-- }
-+ if (reg_nr == TSTR)
-+ return ioread8(ch->mtu->mapbase + 0x280);
-
- offs = mtu2_reg_offs[reg_nr];
-
-@@ -182,12 +176,8 @@ static inline void sh_mtu2_write(struct sh_mtu2_channel *ch, int reg_nr,
- {
- unsigned long offs;
-
-- if (reg_nr == TSTR) {
-- if (ch->mtu->legacy)
-- return iowrite8(value, ch->mtu->mapbase);
-- else
-- return iowrite8(value, ch->mtu->mapbase + 0x280);
-- }
-+ if (reg_nr == TSTR)
-+ return iowrite8(value, ch->mtu->mapbase + 0x280);
-
- offs = mtu2_reg_offs[reg_nr];
-
-@@ -331,7 +321,6 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- const char *name)
- {
- struct clock_event_device *ced = &ch->ced;
-- int ret;
-
- ced->name = name;
- ced->features = CLOCK_EVT_FEAT_PERIODIC;
-@@ -344,24 +333,12 @@ static void sh_mtu2_register_clockevent(struct sh_mtu2_channel *ch,
- dev_info(&ch->mtu->pdev->dev, "ch%u: used for clock events\n",
- ch->index);
- clockevents_register_device(ced);
--
-- ret = request_irq(ch->irq, sh_mtu2_interrupt,
-- IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-- dev_name(&ch->mtu->pdev->dev), ch);
-- if (ret) {
-- dev_err(&ch->mtu->pdev->dev, "ch%u: failed to request irq %d\n",
-- ch->index, ch->irq);
-- return;
-- }
- }
-
--static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name,
-- bool clockevent)
-+static int sh_mtu2_register(struct sh_mtu2_channel *ch, const char *name)
- {
-- if (clockevent) {
-- ch->mtu->has_clockevent = true;
-- sh_mtu2_register_clockevent(ch, name);
-- }
-+ ch->mtu->has_clockevent = true;
-+ sh_mtu2_register_clockevent(ch, name);
-
- return 0;
- }
-@@ -372,40 +349,32 @@ static int sh_mtu2_setup_channel(struct sh_mtu2_channel *ch, unsigned int index,
- static const unsigned int channel_offsets[] = {
- 0x300, 0x380, 0x000,
- };
-- bool clockevent;
-+ char name[6];
-+ int irq;
-+ int ret;
-
- ch->mtu = mtu;
-
-- if (mtu->legacy) {
-- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
--
-- clockevent = cfg->clockevent_rating != 0;
--
-- ch->irq = platform_get_irq(mtu->pdev, 0);
-- ch->base = mtu->mapbase - cfg->channel_offset;
-- ch->index = cfg->timer_bit;
-- } else {
-- char name[6];
--
-- clockevent = true;
--
-- sprintf(name, "tgi%ua", index);
-- ch->irq = platform_get_irq_byname(mtu->pdev, name);
-- ch->base = mtu->mapbase + channel_offsets[index];
-- ch->index = index;
-- }
--
-- if (ch->irq < 0) {
-+ sprintf(name, "tgi%ua", index);
-+ irq = platform_get_irq_byname(mtu->pdev, name);
-+ if (irq < 0) {
- /* Skip channels with no declared interrupt. */
-- if (!mtu->legacy)
-- return 0;
-+ return 0;
-+ }
-
-- dev_err(&mtu->pdev->dev, "ch%u: failed to get irq\n",
-- ch->index);
-- return ch->irq;
-+ ret = request_irq(irq, sh_mtu2_interrupt,
-+ IRQF_TIMER | IRQF_IRQPOLL | IRQF_NOBALANCING,
-+ dev_name(&ch->mtu->pdev->dev), ch);
-+ if (ret) {
-+ dev_err(&ch->mtu->pdev->dev, "ch%u: failed to request irq %d\n",
-+ index, irq);
-+ return ret;
- }
-
-- return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev), clockevent);
-+ ch->base = mtu->mapbase + channel_offsets[index];
-+ ch->index = index;
-+
-+ return sh_mtu2_register(ch, dev_name(&mtu->pdev->dev));
- }
-
- static int sh_mtu2_map_memory(struct sh_mtu2_device *mtu)
-@@ -422,46 +391,19 @@ static int sh_mtu2_map_memory(struct sh_mtu2_device *mtu)
- if (mtu->mapbase == NULL)
- return -ENXIO;
-
-- /*
-- * In legacy platform device configuration (with one device per channel)
-- * the resource points to the channel base address.
-- */
-- if (mtu->legacy) {
-- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-- mtu->mapbase += cfg->channel_offset;
-- }
--
- return 0;
- }
-
--static void sh_mtu2_unmap_memory(struct sh_mtu2_device *mtu)
--{
-- if (mtu->legacy) {
-- struct sh_timer_config *cfg = mtu->pdev->dev.platform_data;
-- mtu->mapbase -= cfg->channel_offset;
-- }
--
-- iounmap(mtu->mapbase);
--}
--
- static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- struct platform_device *pdev)
- {
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
-- const struct platform_device_id *id = pdev->id_entry;
- unsigned int i;
- int ret;
-
- mtu->pdev = pdev;
-- mtu->legacy = id->driver_data;
--
-- if (mtu->legacy && !cfg) {
-- dev_err(&mtu->pdev->dev, "missing platform data\n");
-- return -ENXIO;
-- }
-
- /* Get hold of clock. */
-- mtu->clk = clk_get(&mtu->pdev->dev, mtu->legacy ? "mtu2_fck" : "fck");
-+ mtu->clk = clk_get(&mtu->pdev->dev, "fck");
- if (IS_ERR(mtu->clk)) {
- dev_err(&mtu->pdev->dev, "cannot get clock\n");
- return PTR_ERR(mtu->clk);
-@@ -479,10 +421,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- }
-
- /* Allocate and setup the channels. */
-- if (mtu->legacy)
-- mtu->num_channels = 1;
-- else
-- mtu->num_channels = 3;
-+ mtu->num_channels = 3;
-
- mtu->channels = kzalloc(sizeof(*mtu->channels) * mtu->num_channels,
- GFP_KERNEL);
-@@ -491,16 +430,10 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
- goto err_unmap;
- }
-
-- if (mtu->legacy) {
-- ret = sh_mtu2_setup_channel(&mtu->channels[0], 0, mtu);
-+ for (i = 0; i < mtu->num_channels; ++i) {
-+ ret = sh_mtu2_setup_channel(&mtu->channels[i], i, mtu);
- if (ret < 0)
- goto err_unmap;
-- } else {
-- for (i = 0; i < mtu->num_channels; ++i) {
-- ret = sh_mtu2_setup_channel(&mtu->channels[i], i, mtu);
-- if (ret < 0)
-- goto err_unmap;
-- }
- }
-
- platform_set_drvdata(pdev, mtu);
-@@ -509,7 +442,7 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
-
- err_unmap:
- kfree(mtu->channels);
-- sh_mtu2_unmap_memory(mtu);
-+ iounmap(mtu->mapbase);
- err_clk_unprepare:
- clk_unprepare(mtu->clk);
- err_clk_put:
-@@ -560,7 +493,6 @@ static int sh_mtu2_remove(struct platform_device *pdev)
- }
-
- static const struct platform_device_id sh_mtu2_id_table[] = {
-- { "sh_mtu2", 1 },
- { "sh-mtu2", 0 },
- { },
- };
---
-2.1.2
-
diff --git a/patches.renesas/0730-clocksource-sh_mtu2-Replace-global-spinlock-with-a-p.patch b/patches.renesas/0730-clocksource-sh_mtu2-Replace-global-spinlock-with-a-p.patch
deleted file mode 100644
index 91703d474b6f0..0000000000000
--- a/patches.renesas/0730-clocksource-sh_mtu2-Replace-global-spinlock-with-a-p.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From c91591665631db71e5e2de581bdc7107452bff90 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 15:25:56 +0100
-Subject: clocksource: sh_mtu2: Replace global spinlock with a per-device
- spinlock
-
-The global spinlock is used to protect the shared start/stop register.
-Now that all MTU2 channels are handled by a single device instance, use
-a per-device spinlock.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit 8b2463d8cae2dda0c98ab5a15f25a0350a0e998d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_mtu2.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index 0342e4a01c9e..b0c229f4b4c6 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -47,14 +47,14 @@ struct sh_mtu2_device {
- void __iomem *mapbase;
- struct clk *clk;
-
-+ raw_spinlock_t lock; /* Protect the shared registers */
-+
- struct sh_mtu2_channel *channels;
- unsigned int num_channels;
-
- bool has_clockevent;
- };
-
--static DEFINE_RAW_SPINLOCK(sh_mtu2_lock);
--
- #define TSTR -1 /* shared register */
- #define TCR 0 /* channel register */
- #define TMDR 1 /* channel register */
-@@ -192,7 +192,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
-- raw_spin_lock_irqsave(&sh_mtu2_lock, flags);
-+ raw_spin_lock_irqsave(&ch->mtu->lock, flags);
- value = sh_mtu2_read(ch, TSTR);
-
- if (start)
-@@ -201,7 +201,7 @@ static void sh_mtu2_start_stop_ch(struct sh_mtu2_channel *ch, int start)
- value &= ~(1 << ch->index);
-
- sh_mtu2_write(ch, TSTR, value);
-- raw_spin_unlock_irqrestore(&sh_mtu2_lock, flags);
-+ raw_spin_unlock_irqrestore(&ch->mtu->lock, flags);
- }
-
- static int sh_mtu2_enable(struct sh_mtu2_channel *ch)
-@@ -402,6 +402,8 @@ static int sh_mtu2_setup(struct sh_mtu2_device *mtu,
-
- mtu->pdev = pdev;
-
-+ raw_spin_lock_init(&mtu->lock);
-+
- /* Get hold of clock. */
- mtu->clk = clk_get(&mtu->pdev->dev, "fck");
- if (IS_ERR(mtu->clk)) {
---
-2.1.2
-
diff --git a/patches.renesas/0731-clocksource-sh_mtu2-Add-DT-support.patch b/patches.renesas/0731-clocksource-sh_mtu2-Add-DT-support.patch
deleted file mode 100644
index e163550fa32f3..0000000000000
--- a/patches.renesas/0731-clocksource-sh_mtu2-Add-DT-support.patch
+++ /dev/null
@@ -1,96 +0,0 @@
-From 689c57a876eb1a749393d50fb733b2a5ef35623b Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 4 Mar 2014 18:28:26 +0100
-Subject: clocksource: sh_mtu2: Add DT support
-
-Document DT bindings and parse them in the MTU2 driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Wolfram Sang <wsa@sang-engineering.com>
-(cherry picked from commit cca8d0596c4c7acb371ea1bc5eee9b404b30516a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/timer/renesas,mtu2.txt | 39 ++++++++++++++++++++++
- drivers/clocksource/sh_mtu2.c | 8 +++++
- 2 files changed, 47 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/timer/renesas,mtu2.txt
-
-diff --git a/Documentation/devicetree/bindings/timer/renesas,mtu2.txt b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
-new file mode 100644
-index 000000000000..917453f826bc
---- /dev/null
-+++ b/Documentation/devicetree/bindings/timer/renesas,mtu2.txt
-@@ -0,0 +1,39 @@
-+* Renesas R-Car Multi-Function Timer Pulse Unit 2 (MTU2)
-+
-+The MTU2 is a multi-purpose, multi-channel timer/counter with configurable
-+clock inputs and programmable compare match.
-+
-+Channels share hardware resources but their counter and compare match value
-+are independent. The MTU2 hardware supports five channels indexed from 0 to 4.
-+
-+Required Properties:
-+
-+ - compatible: must contain "renesas,mtu2"
-+
-+ - reg: base address and length of the registers block for the timer module.
-+
-+ - interrupts: interrupt specifiers for the timer, one for each entry in
-+ interrupt-names.
-+ - interrupt-names: must contain one entry named "tgi?a" for each enabled
-+ channel, where "?" is the channel index expressed as one digit from "0" to
-+ "4".
-+
-+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
-+ in clock-names.
-+ - clock-names: must contain "fck" for the functional clock.
-+
-+
-+Example: R7S72100 (RZ/A1H) MTU2 node
-+
-+ mtu2: timer@fcff0000 {
-+ compatible = "renesas,mtu2";
-+ reg = <0xfcff0000 0x400>;
-+ interrupts = <0 139 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 146 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 150 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 154 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 159 IRQ_TYPE_LEVEL_HIGH>;
-+ interrupt-names = "tgi0a", "tgi1a", "tgi2a", "tgi3a", "tgi4a";
-+ clocks = <&mstp3_clks R7S72100_CLK_MTU2>;
-+ clock-names = "fck";
-+ };
-diff --git a/drivers/clocksource/sh_mtu2.c b/drivers/clocksource/sh_mtu2.c
-index b0c229f4b4c6..3d88698cf2b8 100644
---- a/drivers/clocksource/sh_mtu2.c
-+++ b/drivers/clocksource/sh_mtu2.c
-@@ -23,6 +23,7 @@
- #include <linux/ioport.h>
- #include <linux/irq.h>
- #include <linux/module.h>
-+#include <linux/of.h>
- #include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-@@ -500,11 +501,18 @@ static const struct platform_device_id sh_mtu2_id_table[] = {
- };
- MODULE_DEVICE_TABLE(platform, sh_mtu2_id_table);
-
-+static const struct of_device_id sh_mtu2_of_table[] __maybe_unused = {
-+ { .compatible = "renesas,mtu2" },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(of, sh_mtu2_of_table);
-+
- static struct platform_driver sh_mtu2_device_driver = {
- .probe = sh_mtu2_probe,
- .remove = sh_mtu2_remove,
- .driver = {
- .name = "sh_mtu2",
-+ .of_match_table = of_match_ptr(sh_mtu2_of_table),
- },
- .id_table = sh_mtu2_id_table,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0732-clocksource-sh_tmu-Drop-support-for-legacy-platform-.patch b/patches.renesas/0732-clocksource-sh_tmu-Drop-support-for-legacy-platform-.patch
deleted file mode 100644
index a7d15bbd91527..0000000000000
--- a/patches.renesas/0732-clocksource-sh_tmu-Drop-support-for-legacy-platform-.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From 7821081eda16c4f62a34338583c7c8eee8264173 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 28 Jan 2014 15:52:46 +0100
-Subject: clocksource: sh_tmu: Drop support for legacy platform data
-
-Now that all platforms have switched to the new-style platform data,
-drop support for the legacy version.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 681b9e852cf2d48ebd63954028814c7cece71945)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 82 ++++++++------------------------------------
- 1 file changed, 15 insertions(+), 67 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 6bd17a8f3dd4..3eee5c8c26aa 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -32,7 +32,6 @@
- #include <linux/spinlock.h>
-
- enum sh_tmu_model {
-- SH_TMU_LEGACY,
- SH_TMU,
- SH_TMU_SH3,
- };
-@@ -91,8 +90,6 @@ static inline unsigned long sh_tmu_read(struct sh_tmu_channel *ch, int reg_nr)
-
- if (reg_nr == TSTR) {
- switch (ch->tmu->model) {
-- case SH_TMU_LEGACY:
-- return ioread8(ch->tmu->mapbase);
- case SH_TMU_SH3:
- return ioread8(ch->tmu->mapbase + 2);
- case SH_TMU:
-@@ -115,8 +112,6 @@ static inline void sh_tmu_write(struct sh_tmu_channel *ch, int reg_nr,
-
- if (reg_nr == TSTR) {
- switch (ch->tmu->model) {
-- case SH_TMU_LEGACY:
-- return iowrite8(value, ch->tmu->mapbase);
- case SH_TMU_SH3:
- return iowrite8(value, ch->tmu->mapbase + 2);
- case SH_TMU:
-@@ -476,27 +471,12 @@ static int sh_tmu_channel_setup(struct sh_tmu_channel *ch, unsigned int index,
- return 0;
-
- ch->tmu = tmu;
-+ ch->index = index;
-
-- if (tmu->model == SH_TMU_LEGACY) {
-- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
--
-- /*
-- * The SH3 variant (SH770x, SH7705, SH7710 and SH7720) maps
-- * channel registers blocks at base + 2 + 12 * index, while all
-- * other variants map them at base + 4 + 12 * index. We can
-- * compute the index by just dividing by 12, the 2 bytes or 4
-- * bytes offset being hidden by the integer division.
-- */
-- ch->index = cfg->channel_offset / 12;
-- ch->base = tmu->mapbase + cfg->channel_offset;
-- } else {
-- ch->index = index;
--
-- if (tmu->model == SH_TMU_SH3)
-- ch->base = tmu->mapbase + 4 + ch->index * 12;
-- else
-- ch->base = tmu->mapbase + 8 + ch->index * 12;
-- }
-+ if (tmu->model == SH_TMU_SH3)
-+ ch->base = tmu->mapbase + 4 + ch->index * 12;
-+ else
-+ ch->base = tmu->mapbase + 8 + ch->index * 12;
-
- ch->irq = platform_get_irq(tmu->pdev, index);
- if (ch->irq < 0) {
-@@ -526,28 +506,9 @@ static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
- if (tmu->mapbase == NULL)
- return -ENXIO;
-
-- /*
-- * In legacy platform device configuration (with one device per channel)
-- * the resource points to the channel base address.
-- */
-- if (tmu->model == SH_TMU_LEGACY) {
-- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-- tmu->mapbase -= cfg->channel_offset;
-- }
--
- return 0;
- }
-
--static void sh_tmu_unmap_memory(struct sh_tmu_device *tmu)
--{
-- if (tmu->model == SH_TMU_LEGACY) {
-- struct sh_timer_config *cfg = tmu->pdev->dev.platform_data;
-- tmu->mapbase += cfg->channel_offset;
-- }
--
-- iounmap(tmu->mapbase);
--}
--
- static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- {
- struct sh_timer_config *cfg = pdev->dev.platform_data;
-@@ -564,8 +525,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- tmu->model = id->driver_data;
-
- /* Get hold of clock. */
-- tmu->clk = clk_get(&tmu->pdev->dev,
-- tmu->model == SH_TMU_LEGACY ? "tmu_fck" : "fck");
-+ tmu->clk = clk_get(&tmu->pdev->dev, "fck");
- if (IS_ERR(tmu->clk)) {
- dev_err(&tmu->pdev->dev, "cannot get clock\n");
- return PTR_ERR(tmu->clk);
-@@ -583,10 +543,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- }
-
- /* Allocate and setup the channels. */
-- if (tmu->model == SH_TMU_LEGACY)
-- tmu->num_channels = 1;
-- else
-- tmu->num_channels = hweight8(cfg->channels_mask);
-+ tmu->num_channels = hweight8(cfg->channels_mask);
-
- tmu->channels = kzalloc(sizeof(*tmu->channels) * tmu->num_channels,
- GFP_KERNEL);
-@@ -595,23 +552,15 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- goto err_unmap;
- }
-
-- if (tmu->model == SH_TMU_LEGACY) {
-- ret = sh_tmu_channel_setup(&tmu->channels[0], 0,
-- cfg->clockevent_rating != 0,
-- cfg->clocksource_rating != 0, tmu);
-+ /*
-+ * Use the first channel as a clock event device and the second channel
-+ * as a clock source.
-+ */
-+ for (i = 0; i < tmu->num_channels; ++i) {
-+ ret = sh_tmu_channel_setup(&tmu->channels[i], i,
-+ i == 0, i == 1, tmu);
- if (ret < 0)
- goto err_unmap;
-- } else {
-- /*
-- * Use the first channel as a clock event device and the second
-- * channel as a clock source.
-- */
-- for (i = 0; i < tmu->num_channels; ++i) {
-- ret = sh_tmu_channel_setup(&tmu->channels[i], i,
-- i == 0, i == 1, tmu);
-- if (ret < 0)
-- goto err_unmap;
-- }
- }
-
- platform_set_drvdata(pdev, tmu);
-@@ -620,7 +569,7 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
-
- err_unmap:
- kfree(tmu->channels);
-- sh_tmu_unmap_memory(tmu);
-+ iounmap(tmu->mapbase);
- err_clk_unprepare:
- clk_unprepare(tmu->clk);
- err_clk_put:
-@@ -671,7 +620,6 @@ static int sh_tmu_remove(struct platform_device *pdev)
- }
-
- static const struct platform_device_id sh_tmu_id_table[] = {
-- { "sh_tmu", SH_TMU_LEGACY },
- { "sh-tmu", SH_TMU },
- { "sh-tmu-sh3", SH_TMU_SH3 },
- { }
---
-2.1.2
-
diff --git a/patches.renesas/0733-clocksource-sh_tmu-Replace-global-spinlock-with-a-pe.patch b/patches.renesas/0733-clocksource-sh_tmu-Replace-global-spinlock-with-a-pe.patch
deleted file mode 100644
index 168b1af825470..0000000000000
--- a/patches.renesas/0733-clocksource-sh_tmu-Replace-global-spinlock-with-a-pe.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From 869e7a834998dbbb94c5b78e3306f2df926a7b15 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 17 Feb 2014 16:49:05 +0100
-Subject: clocksource: sh_tmu: Replace global spinlock with a per-device
- spinlock
-
-The global spinlock is used to protect the shared start/stop register.
-Now that all TMU channels are handled by a single device instance, use a
-per-device spinlock.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2b027f1f0f887097b4140a71b5c1e878da1e2fd9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/clocksource/sh_tmu.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 3eee5c8c26aa..560a31acbc9c 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -61,6 +61,8 @@ struct sh_tmu_device {
-
- enum sh_tmu_model model;
-
-+ raw_spinlock_t lock; /* Protect the shared start/stop register */
-+
- struct sh_tmu_channel *channels;
- unsigned int num_channels;
-
-@@ -68,8 +70,6 @@ struct sh_tmu_device {
- bool has_clocksource;
- };
-
--static DEFINE_RAW_SPINLOCK(sh_tmu_lock);
--
- #define TSTR -1 /* shared register */
- #define TCOR 0 /* channel register */
- #define TCNT 1 /* channel register */
-@@ -132,7 +132,7 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
- unsigned long flags, value;
-
- /* start stop register shared by multiple timer channels */
-- raw_spin_lock_irqsave(&sh_tmu_lock, flags);
-+ raw_spin_lock_irqsave(&ch->tmu->lock, flags);
- value = sh_tmu_read(ch, TSTR);
-
- if (start)
-@@ -141,7 +141,7 @@ static void sh_tmu_start_stop_ch(struct sh_tmu_channel *ch, int start)
- value &= ~(1 << ch->index);
-
- sh_tmu_write(ch, TSTR, value);
-- raw_spin_unlock_irqrestore(&sh_tmu_lock, flags);
-+ raw_spin_unlock_irqrestore(&ch->tmu->lock, flags);
- }
-
- static int __sh_tmu_enable(struct sh_tmu_channel *ch)
-@@ -524,6 +524,8 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- tmu->pdev = pdev;
- tmu->model = id->driver_data;
-
-+ raw_spin_lock_init(&tmu->lock);
-+
- /* Get hold of clock. */
- tmu->clk = clk_get(&tmu->pdev->dev, "fck");
- if (IS_ERR(tmu->clk)) {
---
-2.1.2
-
diff --git a/patches.renesas/0734-clocksource-sh_tmu-Add-DT-support.patch b/patches.renesas/0734-clocksource-sh_tmu-Add-DT-support.patch
deleted file mode 100644
index fbc2cb5abd5fa..0000000000000
--- a/patches.renesas/0734-clocksource-sh_tmu-Add-DT-support.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From d164b1c0ee06c776cba03c98028f18b1e525806e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 11 Apr 2014 16:23:40 +0200
-Subject: clocksource: sh_tmu: Add DT support
-
-Document DT bindings and parse them in the TMU driver.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3e29b5543f9250bb358169cff0594f58284ece74)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/timer/renesas,tmu.txt | 39 +++++++++++++++++
- drivers/clocksource/sh_tmu.c | 51 +++++++++++++++++-----
- 2 files changed, 80 insertions(+), 10 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/timer/renesas,tmu.txt
-
-diff --git a/Documentation/devicetree/bindings/timer/renesas,tmu.txt b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
-new file mode 100644
-index 000000000000..425d0c5f4aee
---- /dev/null
-+++ b/Documentation/devicetree/bindings/timer/renesas,tmu.txt
-@@ -0,0 +1,39 @@
-+* Renesas R-Car Timer Unit (TMU)
-+
-+The TMU is a 32-bit timer/counter with configurable clock inputs and
-+programmable compare match.
-+
-+Channels share hardware resources but their counter and compare match value
-+are independent. The TMU hardware supports up to three channels.
-+
-+Required Properties:
-+
-+ - compatible: must contain "renesas,tmu"
-+
-+ - reg: base address and length of the registers block for the timer module.
-+
-+ - interrupts: interrupt-specifier for the timer, one per channel.
-+
-+ - clocks: a list of phandle + clock-specifier pairs, one for each entry
-+ in clock-names.
-+ - clock-names: must contain "fck" for the functional clock.
-+
-+Optional Properties:
-+
-+ - #renesas,channels: number of channels implemented by the timer, must be 2
-+ or 3 (if not specified the value defaults to 3).
-+
-+
-+Example: R8A7779 (R-Car H1) TMU0 node
-+
-+ tmu0: timer@ffd80000 {
-+ compatible = "renesas,tmu";
-+ reg = <0xffd80000 0x30>;
-+ interrupts = <0 32 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 33 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 34 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7779_CLK_TMU0>;
-+ clock-names = "fck";
-+
-+ #renesas,channels = <3>;
-+ };
-diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c
-index 560a31acbc9c..0f665b8f2461 100644
---- a/drivers/clocksource/sh_tmu.c
-+++ b/drivers/clocksource/sh_tmu.c
-@@ -24,6 +24,7 @@
- #include <linux/ioport.h>
- #include <linux/irq.h>
- #include <linux/module.h>
-+#include <linux/of.h>
- #include <linux/platform_device.h>
- #include <linux/pm_domain.h>
- #include <linux/pm_runtime.h>
-@@ -509,23 +510,48 @@ static int sh_tmu_map_memory(struct sh_tmu_device *tmu)
- return 0;
- }
-
-+static int sh_tmu_parse_dt(struct sh_tmu_device *tmu)
-+{
-+ struct device_node *np = tmu->pdev->dev.of_node;
-+
-+ tmu->model = SH_TMU;
-+ tmu->num_channels = 3;
-+
-+ of_property_read_u32(np, "#renesas,channels", &tmu->num_channels);
-+
-+ if (tmu->num_channels != 2 && tmu->num_channels != 3) {
-+ dev_err(&tmu->pdev->dev, "invalid number of channels %u\n",
-+ tmu->num_channels);
-+ return -EINVAL;
-+ }
-+
-+ return 0;
-+}
-+
- static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- {
-- struct sh_timer_config *cfg = pdev->dev.platform_data;
-- const struct platform_device_id *id = pdev->id_entry;
- unsigned int i;
- int ret;
-
-- if (!cfg) {
-- dev_err(&tmu->pdev->dev, "missing platform data\n");
-- return -ENXIO;
-- }
--
- tmu->pdev = pdev;
-- tmu->model = id->driver_data;
-
- raw_spin_lock_init(&tmu->lock);
-
-+ if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) {
-+ ret = sh_tmu_parse_dt(tmu);
-+ if (ret < 0)
-+ return ret;
-+ } else if (pdev->dev.platform_data) {
-+ const struct platform_device_id *id = pdev->id_entry;
-+ struct sh_timer_config *cfg = pdev->dev.platform_data;
-+
-+ tmu->model = id->driver_data;
-+ tmu->num_channels = hweight8(cfg->channels_mask);
-+ } else {
-+ dev_err(&tmu->pdev->dev, "missing platform data\n");
-+ return -ENXIO;
-+ }
-+
- /* Get hold of clock. */
- tmu->clk = clk_get(&tmu->pdev->dev, "fck");
- if (IS_ERR(tmu->clk)) {
-@@ -545,8 +571,6 @@ static int sh_tmu_setup(struct sh_tmu_device *tmu, struct platform_device *pdev)
- }
-
- /* Allocate and setup the channels. */
-- tmu->num_channels = hweight8(cfg->channels_mask);
--
- tmu->channels = kzalloc(sizeof(*tmu->channels) * tmu->num_channels,
- GFP_KERNEL);
- if (tmu->channels == NULL) {
-@@ -628,11 +652,18 @@ static const struct platform_device_id sh_tmu_id_table[] = {
- };
- MODULE_DEVICE_TABLE(platform, sh_tmu_id_table);
-
-+static const struct of_device_id sh_tmu_of_table[] __maybe_unused = {
-+ { .compatible = "renesas,tmu" },
-+ { }
-+};
-+MODULE_DEVICE_TABLE(of, sh_tmu_of_table);
-+
- static struct platform_driver sh_tmu_device_driver = {
- .probe = sh_tmu_probe,
- .remove = sh_tmu_remove,
- .driver = {
- .name = "sh_tmu",
-+ .of_match_table = of_match_ptr(sh_tmu_of_table),
- },
- .id_table = sh_tmu_id_table,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0735-gpio-rcar-clamp-returned-value-to-0-1.patch b/patches.renesas/0735-gpio-rcar-clamp-returned-value-to-0-1.patch
deleted file mode 100644
index 2e8c0bb5bb45d..0000000000000
--- a/patches.renesas/0735-gpio-rcar-clamp-returned-value-to-0-1.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 2a4a115a97661af08f99a97b12a9f8476e011ee4 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?J=C3=BCrg=20Billeter?= <j@bitron.ch>
-Date: Tue, 24 Jun 2014 04:19:50 +0200
-Subject: gpio: rcar: clamp returned value to [0,1]
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-While it will be clamped to bool by gpiolib, let's make this sane
-in the driver as well.
-
-Signed-off-by: Jürg Billeter <j@bitron.ch>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 7cb5409b10d9f8316ca2539591acb6a5f7fd4139)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpio/gpio-rcar.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/gpio/gpio-rcar.c b/drivers/gpio/gpio-rcar.c
-index b6ae89ea8811..0d251dc7643d 100644
---- a/drivers/gpio/gpio-rcar.c
-+++ b/drivers/gpio/gpio-rcar.c
-@@ -240,9 +240,9 @@ static int gpio_rcar_get(struct gpio_chip *chip, unsigned offset)
- /* testing on r8a7790 shows that INDT does not show correct pin state
- * when configured as output, so use OUTDT in case of output pins */
- if (gpio_rcar_read(gpio_to_priv(chip), INOUTSEL) & bit)
-- return (int)(gpio_rcar_read(gpio_to_priv(chip), OUTDT) & bit);
-+ return !!(gpio_rcar_read(gpio_to_priv(chip), OUTDT) & bit);
- else
-- return (int)(gpio_rcar_read(gpio_to_priv(chip), INDT) & bit);
-+ return !!(gpio_rcar_read(gpio_to_priv(chip), INDT) & bit);
- }
-
- static void gpio_rcar_set(struct gpio_chip *chip, unsigned offset, int value)
---
-2.1.2
-
diff --git a/patches.renesas/0736-usb-renesas_usbhs-fix-usbhs_pipe_malloc-to-re-enable.patch b/patches.renesas/0736-usb-renesas_usbhs-fix-usbhs_pipe_malloc-to-re-enable.patch
deleted file mode 100644
index 9d8cd3e75e2bb..0000000000000
--- a/patches.renesas/0736-usb-renesas_usbhs-fix-usbhs_pipe_malloc-to-re-enable.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 08495f7b321a4caf92820b7ef3f9f785cce97bc3 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Wed, 9 Jul 2014 20:30:03 +0900
-Subject: usb: renesas_usbhs: fix usbhs_pipe_malloc() to re-enable a pipe.
-
-This patch fixes an issue that the driver cannot push a new data when
-a pipe is re-enabled after the pipe is queued.
-
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit 6a0541599f54b556442d6130e4f9faaad91bf3a2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/pipe.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
-index 7926e1c700f1..239b889ca5b5 100644
---- a/drivers/usb/renesas_usbhs/pipe.c
-+++ b/drivers/usb/renesas_usbhs/pipe.c
-@@ -710,6 +710,7 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
- usbhsp_pipe_select(pipe);
- usbhsp_pipe_cfg_set(pipe, 0xFFFF, pipecfg);
- usbhsp_pipe_buf_set(pipe, 0xFFFF, pipebuf);
-+ usbhs_pipe_clear(pipe);
-
- usbhs_pipe_sequence_data0(pipe);
-
---
-2.1.2
-
diff --git a/patches.renesas/0737-usb-renesas_usbhs-gadget-fix-re-enabling-pipe-withou.patch b/patches.renesas/0737-usb-renesas_usbhs-gadget-fix-re-enabling-pipe-withou.patch
deleted file mode 100644
index 53bae7c6f5533..0000000000000
--- a/patches.renesas/0737-usb-renesas_usbhs-gadget-fix-re-enabling-pipe-withou.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From bddfc00d111a346e29ef152840d3116d37929bad Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Wed, 9 Jul 2014 20:30:13 +0900
-Subject: usb: renesas_usbhs: gadget: fix re-enabling pipe without
- re-connecting
-
-This patch fixes an issue that the renesas_usbhs driver in gadget mode
-cannot work correctly even if I disabled DMAC of the driver when I used
-the g_zero driver and the testusb tool.
-
-When a usb cable is re-connected, the renesas_usbhs driver calls the
-usbhsp_flags_init() (via usbhs_hotplug() --> usbhs_mod_call(start) -->
-usbhsg_try_start() --> usbhs_pipe_init()). However, the driver doesn't
-call the usbhsp_flags_init() when usbhsg_ep_disable() is called.
-So, if a gadget driver calls usb_ep_enable() and usb_ep_disable() again
-and again, the renesas_usbhs driver will output the following log:
-
- renesas_usbhs renesas_usbhs: can't get pipe (BULK)
- renesas_usbhs renesas_usbhs: wrong recip request
-
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit dfb87b8bfe09f933abaf387693992089f6f9053e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/mod_gadget.c | 2 ++
- drivers/usb/renesas_usbhs/pipe.c | 10 ++++++++++
- drivers/usb/renesas_usbhs/pipe.h | 1 +
- 3 files changed, 13 insertions(+)
-
-diff --git a/drivers/usb/renesas_usbhs/mod_gadget.c b/drivers/usb/renesas_usbhs/mod_gadget.c
-index 458f3766bef1..04e6505777d0 100644
---- a/drivers/usb/renesas_usbhs/mod_gadget.c
-+++ b/drivers/usb/renesas_usbhs/mod_gadget.c
-@@ -600,8 +600,10 @@ static int usbhsg_ep_enable(struct usb_ep *ep,
- static int usbhsg_ep_disable(struct usb_ep *ep)
- {
- struct usbhsg_uep *uep = usbhsg_ep_to_uep(ep);
-+ struct usbhs_pipe *pipe = usbhsg_uep_to_pipe(uep);
-
- usbhsg_pipe_disable(uep);
-+ usbhs_pipe_free(pipe);
-
- uep->pipe->mod_private = NULL;
- uep->pipe = NULL;
-diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
-index 239b889ca5b5..75fbcf6b102e 100644
---- a/drivers/usb/renesas_usbhs/pipe.c
-+++ b/drivers/usb/renesas_usbhs/pipe.c
-@@ -640,6 +640,11 @@ static struct usbhs_pipe *usbhsp_get_pipe(struct usbhs_priv *priv, u32 type)
- return pipe;
- }
-
-+static void usbhsp_put_pipe(struct usbhs_pipe *pipe)
-+{
-+ usbhsp_flags_init(pipe);
-+}
-+
- void usbhs_pipe_init(struct usbhs_priv *priv,
- int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map))
- {
-@@ -727,6 +732,11 @@ struct usbhs_pipe *usbhs_pipe_malloc(struct usbhs_priv *priv,
- return pipe;
- }
-
-+void usbhs_pipe_free(struct usbhs_pipe *pipe)
-+{
-+ usbhsp_put_pipe(pipe);
-+}
-+
- void usbhs_pipe_select_fifo(struct usbhs_pipe *pipe, struct usbhs_fifo *fifo)
- {
- if (pipe->fifo)
-diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h
-index 3e5349879838..406f36d050e4 100644
---- a/drivers/usb/renesas_usbhs/pipe.h
-+++ b/drivers/usb/renesas_usbhs/pipe.h
-@@ -75,6 +75,7 @@ struct usbhs_pipe_info {
- char *usbhs_pipe_name(struct usbhs_pipe *pipe);
- struct usbhs_pipe
- *usbhs_pipe_malloc(struct usbhs_priv *priv, int endpoint_type, int dir_in);
-+void usbhs_pipe_free(struct usbhs_pipe *pipe);
- int usbhs_pipe_probe(struct usbhs_priv *priv);
- void usbhs_pipe_remove(struct usbhs_priv *priv);
- int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe);
---
-2.1.2
-
diff --git a/patches.renesas/0738-usb-renesas_usbhs-add-R-Car-Gen.-2-init-and-power-co.patch b/patches.renesas/0738-usb-renesas_usbhs-add-R-Car-Gen.-2-init-and-power-co.patch
deleted file mode 100644
index bc1e3ef44da3d..0000000000000
--- a/patches.renesas/0738-usb-renesas_usbhs-add-R-Car-Gen.-2-init-and-power-co.patch
+++ /dev/null
@@ -1,291 +0,0 @@
-From 3ad40ac9b1a0583b3eac18fe0cc3f434cb85f385 Mon Sep 17 00:00:00 2001
-From: Ulrich Hecht <ulrich.hecht@gmail.com>
-Date: Thu, 10 Jul 2014 09:53:59 +0200
-Subject: usb: renesas_usbhs: add R-Car Gen. 2 init and power control
-
-In preparation for DT conversion to reduce reliance on platform device
-callbacks.
-
-Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit 8ecef00fe1f33658ee36e902dba6850b51312073)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/Makefile | 2 +-
- drivers/usb/renesas_usbhs/common.c | 66 +++++++++++++++++++++++++++++---
- drivers/usb/renesas_usbhs/common.h | 2 +
- drivers/usb/renesas_usbhs/rcar2.c | 77 ++++++++++++++++++++++++++++++++++++++
- drivers/usb/renesas_usbhs/rcar2.h | 4 ++
- include/linux/usb/renesas_usbhs.h | 6 +++
- 6 files changed, 151 insertions(+), 6 deletions(-)
- create mode 100644 drivers/usb/renesas_usbhs/rcar2.c
- create mode 100644 drivers/usb/renesas_usbhs/rcar2.h
-
-diff --git a/drivers/usb/renesas_usbhs/Makefile b/drivers/usb/renesas_usbhs/Makefile
-index bc8aef4311a1..9e47f477b6d2 100644
---- a/drivers/usb/renesas_usbhs/Makefile
-+++ b/drivers/usb/renesas_usbhs/Makefile
-@@ -4,7 +4,7 @@
-
- obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs.o
-
--renesas_usbhs-y := common.o mod.o pipe.o fifo.o
-+renesas_usbhs-y := common.o mod.o pipe.o fifo.o rcar2.o
-
- ifneq ($(CONFIG_USB_RENESAS_USBHS_HCD),)
- renesas_usbhs-y += mod_host.o
-diff --git a/drivers/usb/renesas_usbhs/common.c b/drivers/usb/renesas_usbhs/common.c
-index 17267b0a2e95..1b9bf8d83235 100644
---- a/drivers/usb/renesas_usbhs/common.c
-+++ b/drivers/usb/renesas_usbhs/common.c
-@@ -15,12 +15,14 @@
- *
- */
- #include <linux/err.h>
-+#include <linux/gpio.h>
- #include <linux/io.h>
- #include <linux/module.h>
- #include <linux/pm_runtime.h>
- #include <linux/slab.h>
- #include <linux/sysfs.h>
- #include "common.h"
-+#include "rcar2.h"
-
- /*
- * image of renesas_usbhs
-@@ -284,6 +286,8 @@ static void usbhsc_set_buswait(struct usbhs_priv *priv)
- /*
- * platform default param
- */
-+
-+/* commonly used on old SH-Mobile SoCs */
- static u32 usbhsc_default_pipe_type[] = {
- USB_ENDPOINT_XFER_CONTROL,
- USB_ENDPOINT_XFER_ISOC,
-@@ -297,6 +301,26 @@ static u32 usbhsc_default_pipe_type[] = {
- USB_ENDPOINT_XFER_INT,
- };
-
-+/* commonly used on newer SH-Mobile and R-Car SoCs */
-+static u32 usbhsc_new_pipe_type[] = {
-+ USB_ENDPOINT_XFER_CONTROL,
-+ USB_ENDPOINT_XFER_ISOC,
-+ USB_ENDPOINT_XFER_ISOC,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_INT,
-+ USB_ENDPOINT_XFER_INT,
-+ USB_ENDPOINT_XFER_INT,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+ USB_ENDPOINT_XFER_BULK,
-+};
-+
- /*
- * power control
- */
-@@ -423,8 +447,7 @@ static int usbhs_probe(struct platform_device *pdev)
- int ret;
-
- /* check platform information */
-- if (!info ||
-- !info->platform_callback.get_id) {
-+ if (!info) {
- dev_err(&pdev->dev, "no platform information\n");
- return -EINVAL;
- }
-@@ -451,13 +474,32 @@ static int usbhs_probe(struct platform_device *pdev)
- /*
- * care platform info
- */
-- memcpy(&priv->pfunc,
-- &info->platform_callback,
-- sizeof(struct renesas_usbhs_platform_callback));
-+
- memcpy(&priv->dparam,
- &info->driver_param,
- sizeof(struct renesas_usbhs_driver_param));
-
-+ switch (priv->dparam.type) {
-+ case USBHS_TYPE_R8A7790:
-+ case USBHS_TYPE_R8A7791:
-+ priv->pfunc = usbhs_rcar2_ops;
-+ if (!priv->dparam.pipe_type) {
-+ priv->dparam.pipe_type = usbhsc_new_pipe_type;
-+ priv->dparam.pipe_size =
-+ ARRAY_SIZE(usbhsc_new_pipe_type);
-+ }
-+ break;
-+ default:
-+ if (!info->platform_callback.get_id) {
-+ dev_err(&pdev->dev, "no platform callbacks");
-+ return -EINVAL;
-+ }
-+ memcpy(&priv->pfunc,
-+ &info->platform_callback,
-+ sizeof(struct renesas_usbhs_platform_callback));
-+ break;
-+ }
-+
- /* set driver callback functions for platform */
- dfunc = &info->driver_callback;
- dfunc->notify_hotplug = usbhsc_drvcllbck_notify_hotplug;
-@@ -507,6 +549,20 @@ static int usbhs_probe(struct platform_device *pdev)
- */
- usbhs_sys_clock_ctrl(priv, 0);
-
-+ /* check GPIO determining if USB function should be enabled */
-+ if (priv->dparam.enable_gpio) {
-+ gpio_request_one(priv->dparam.enable_gpio, GPIOF_IN, NULL);
-+ ret = !gpio_get_value(priv->dparam.enable_gpio);
-+ gpio_free(priv->dparam.enable_gpio);
-+ if (ret) {
-+ dev_warn(&pdev->dev,
-+ "USB function not selected (GPIO %d)\n",
-+ priv->dparam.enable_gpio);
-+ ret = -ENOTSUPP;
-+ goto probe_end_mod_exit;
-+ }
-+ }
-+
- /*
- * platform call
- *
-diff --git a/drivers/usb/renesas_usbhs/common.h b/drivers/usb/renesas_usbhs/common.h
-index c69dd2fba360..a7996da6a1bd 100644
---- a/drivers/usb/renesas_usbhs/common.h
-+++ b/drivers/usb/renesas_usbhs/common.h
-@@ -268,6 +268,8 @@ struct usbhs_priv {
- * fifo control
- */
- struct usbhs_fifo_info fifo_info;
-+
-+ struct usb_phy *phy;
- };
-
- /*
-diff --git a/drivers/usb/renesas_usbhs/rcar2.c b/drivers/usb/renesas_usbhs/rcar2.c
-new file mode 100644
-index 000000000000..e6b9dcc1c289
---- /dev/null
-+++ b/drivers/usb/renesas_usbhs/rcar2.c
-@@ -0,0 +1,77 @@
-+/*
-+ * Renesas USB driver R-Car Gen. 2 initialization and power control
-+ *
-+ * Copyright (C) 2014 Ulrich Hecht
-+ *
-+ * 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/gpio.h>
-+#include <linux/of_gpio.h>
-+#include <linux/platform_data/gpio-rcar.h>
-+#include <linux/usb/phy.h>
-+#include "common.h"
-+#include "rcar2.h"
-+
-+static int usbhs_rcar2_hardware_init(struct platform_device *pdev)
-+{
-+ struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
-+ struct usb_phy *phy;
-+
-+ phy = usb_get_phy_dev(&pdev->dev, 0);
-+ if (IS_ERR(phy))
-+ return PTR_ERR(phy);
-+
-+ priv->phy = phy;
-+ return 0;
-+}
-+
-+static int usbhs_rcar2_hardware_exit(struct platform_device *pdev)
-+{
-+ struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
-+
-+ if (!priv->phy)
-+ return 0;
-+
-+ usb_put_phy(priv->phy);
-+ priv->phy = NULL;
-+
-+ return 0;
-+}
-+
-+static int usbhs_rcar2_power_ctrl(struct platform_device *pdev,
-+ void __iomem *base, int enable)
-+{
-+ struct usbhs_priv *priv = usbhs_pdev_to_priv(pdev);
-+
-+ if (!priv->phy)
-+ return -ENODEV;
-+
-+ if (enable) {
-+ int retval = usb_phy_init(priv->phy);
-+
-+ if (!retval)
-+ retval = usb_phy_set_suspend(priv->phy, 0);
-+ return retval;
-+ }
-+
-+ usb_phy_set_suspend(priv->phy, 1);
-+ usb_phy_shutdown(priv->phy);
-+ return 0;
-+}
-+
-+static int usbhs_rcar2_get_id(struct platform_device *pdev)
-+{
-+ return USBHS_GADGET;
-+}
-+
-+const struct renesas_usbhs_platform_callback usbhs_rcar2_ops = {
-+ .hardware_init = usbhs_rcar2_hardware_init,
-+ .hardware_exit = usbhs_rcar2_hardware_exit,
-+ .power_ctrl = usbhs_rcar2_power_ctrl,
-+ .get_id = usbhs_rcar2_get_id,
-+};
-diff --git a/drivers/usb/renesas_usbhs/rcar2.h b/drivers/usb/renesas_usbhs/rcar2.h
-new file mode 100644
-index 000000000000..f07f10d9b3b2
---- /dev/null
-+++ b/drivers/usb/renesas_usbhs/rcar2.h
-@@ -0,0 +1,4 @@
-+#include "common.h"
-+
-+extern const struct renesas_usbhs_platform_callback
-+ usbhs_rcar2_ops;
-diff --git a/include/linux/usb/renesas_usbhs.h b/include/linux/usb/renesas_usbhs.h
-index e452ba6ec6bd..d5952bb66752 100644
---- a/include/linux/usb/renesas_usbhs.h
-+++ b/include/linux/usb/renesas_usbhs.h
-@@ -153,6 +153,9 @@ struct renesas_usbhs_driver_param {
- */
- int pio_dma_border; /* default is 64byte */
-
-+ u32 type;
-+ u32 enable_gpio;
-+
- /*
- * option:
- */
-@@ -160,6 +163,9 @@ struct renesas_usbhs_driver_param {
- u32 has_sudmac:1; /* for SUDMAC */
- };
-
-+#define USBHS_TYPE_R8A7790 1
-+#define USBHS_TYPE_R8A7791 2
-+
- /*
- * option:
- *
---
-2.1.2
-
diff --git a/patches.renesas/0739-dmaengine-shdma-Add-more-register-documentation.patch b/patches.renesas/0739-dmaengine-shdma-Add-more-register-documentation.patch
deleted file mode 100644
index aa7aaf6d18cfb..0000000000000
--- a/patches.renesas/0739-dmaengine-shdma-Add-more-register-documentation.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From 87b7edbaa34fc283e4e115cbf2f0b0a8d66a7b47 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 14:37:38 +0200
-Subject: dmaengine: shdma: Add more register documentation
-
-Also add a few definitions that were missing.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6b32fafee2bb5fcf0b3d3d04a9762d3a0212089e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/sh/include/asm/dma-register.h | 36 +++++++++++++++++++-----------------
- drivers/dma/sh/shdmac.c | 12 ++++++------
- include/linux/sh_dma.h | 24 +++++++++++++-----------
- 3 files changed, 38 insertions(+), 34 deletions(-)
-
-diff --git a/arch/sh/include/asm/dma-register.h b/arch/sh/include/asm/dma-register.h
-index 51cd78feacff..c757b47e6b64 100644
---- a/arch/sh/include/asm/dma-register.h
-+++ b/arch/sh/include/asm/dma-register.h
-@@ -13,17 +13,17 @@
- #ifndef DMA_REGISTER_H
- #define DMA_REGISTER_H
-
--/* DMA register */
--#define SAR 0x00
--#define DAR 0x04
--#define TCR 0x08
--#define CHCR 0x0C
--#define DMAOR 0x40
-+/* DMA registers */
-+#define SAR 0x00 /* Source Address Register */
-+#define DAR 0x04 /* Destination Address Register */
-+#define TCR 0x08 /* Transfer Count Register */
-+#define CHCR 0x0C /* Channel Control Register */
-+#define DMAOR 0x40 /* DMA Operation Register */
-
- /* DMAOR definitions */
--#define DMAOR_AE 0x00000004
-+#define DMAOR_AE 0x00000004 /* Address Error Flag */
- #define DMAOR_NMIF 0x00000002
--#define DMAOR_DME 0x00000001
-+#define DMAOR_DME 0x00000001 /* DMA Master Enable */
-
- /* Definitions for the SuperH DMAC */
- #define REQ_L 0x00000000
-@@ -34,18 +34,20 @@
- #define ACK_W 0x00020000
- #define ACK_H 0x00000000
- #define ACK_L 0x00010000
--#define DM_INC 0x00004000
--#define DM_DEC 0x00008000
--#define DM_FIX 0x0000c000
--#define SM_INC 0x00001000
--#define SM_DEC 0x00002000
--#define SM_FIX 0x00003000
-+#define DM_INC 0x00004000 /* Destination addresses are incremented */
-+#define DM_DEC 0x00008000 /* Destination addresses are decremented */
-+#define DM_FIX 0x0000c000 /* Destination address is fixed */
-+#define SM_INC 0x00001000 /* Source addresses are incremented */
-+#define SM_DEC 0x00002000 /* Source addresses are decremented */
-+#define SM_FIX 0x00003000 /* Source address is fixed */
- #define RS_IN 0x00000200
- #define RS_OUT 0x00000300
-+#define RS_AUTO 0x00000400 /* Auto Request */
-+#define RS_ERS 0x00000800 /* DMA extended resource selector */
- #define TS_BLK 0x00000040
- #define TM_BUR 0x00000020
--#define CHCR_DE 0x00000001
--#define CHCR_TE 0x00000002
--#define CHCR_IE 0x00000004
-+#define CHCR_DE 0x00000001 /* DMA Enable */
-+#define CHCR_TE 0x00000002 /* Transfer End Flag */
-+#define CHCR_IE 0x00000004 /* Interrupt Enable */
-
- #endif
-diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c
-index 0d765c0e21ec..9acbba84759b 100644
---- a/drivers/dma/sh/shdmac.c
-+++ b/drivers/dma/sh/shdmac.c
-@@ -37,12 +37,12 @@
- #include "../dmaengine.h"
- #include "shdma.h"
-
--/* DMA register */
--#define SAR 0x00
--#define DAR 0x04
--#define TCR 0x08
--#define CHCR 0x0C
--#define DMAOR 0x40
-+/* DMA registers */
-+#define SAR 0x00 /* Source Address Register */
-+#define DAR 0x04 /* Destination Address Register */
-+#define TCR 0x08 /* Transfer Count Register */
-+#define CHCR 0x0C /* Channel Control Register */
-+#define DMAOR 0x40 /* DMA Operation Register */
-
- #define TEND 0x18 /* USB-DMAC */
-
-diff --git a/include/linux/sh_dma.h b/include/linux/sh_dma.h
-index b7b43b82231e..56b97eed28a4 100644
---- a/include/linux/sh_dma.h
-+++ b/include/linux/sh_dma.h
-@@ -95,19 +95,21 @@ struct sh_dmae_pdata {
- };
-
- /* DMAOR definitions */
--#define DMAOR_AE 0x00000004
-+#define DMAOR_AE 0x00000004 /* Address Error Flag */
- #define DMAOR_NMIF 0x00000002
--#define DMAOR_DME 0x00000001
-+#define DMAOR_DME 0x00000001 /* DMA Master Enable */
-
- /* Definitions for the SuperH DMAC */
--#define DM_INC 0x00004000
--#define DM_DEC 0x00008000
--#define DM_FIX 0x0000c000
--#define SM_INC 0x00001000
--#define SM_DEC 0x00002000
--#define SM_FIX 0x00003000
--#define CHCR_DE 0x00000001
--#define CHCR_TE 0x00000002
--#define CHCR_IE 0x00000004
-+#define DM_INC 0x00004000 /* Destination addresses are incremented */
-+#define DM_DEC 0x00008000 /* Destination addresses are decremented */
-+#define DM_FIX 0x0000c000 /* Destination address is fixed */
-+#define SM_INC 0x00001000 /* Source addresses are incremented */
-+#define SM_DEC 0x00002000 /* Source addresses are decremented */
-+#define SM_FIX 0x00003000 /* Source address is fixed */
-+#define RS_AUTO 0x00000400 /* Auto Request */
-+#define RS_ERS 0x00000800 /* DMA extended resource selector */
-+#define CHCR_DE 0x00000001 /* DMA Enable */
-+#define CHCR_TE 0x00000002 /* Transfer End Flag */
-+#define CHCR_IE 0x00000004 /* Interrupt Enable */
-
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0740-dmaengine-shdma-Use-defines-instead-of-hardcoded-num.patch b/patches.renesas/0740-dmaengine-shdma-Use-defines-instead-of-hardcoded-num.patch
deleted file mode 100644
index 30681c2b14b1d..0000000000000
--- a/patches.renesas/0740-dmaengine-shdma-Use-defines-instead-of-hardcoded-num.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From d75e715bd59869d0ca568f77ee12d995a431feec Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 14:37:41 +0200
-Subject: dmaengine: shdma: Use defines instead of hardcoded numbers
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0cdbee33ea42bfd5f61f824e258a1a0944dd2a27)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/dma/sh/shdma-arm.h | 4 ++--
- drivers/dma/sh/shdmac.c | 3 +--
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/dma/sh/shdma-arm.h b/drivers/dma/sh/shdma-arm.h
-index a2b8258426c9..a1b0ef45d6a2 100644
---- a/drivers/dma/sh/shdma-arm.h
-+++ b/drivers/dma/sh/shdma-arm.h
-@@ -45,7 +45,7 @@ enum {
- ((((i) & TS_LOW_BIT) << TS_LOW_SHIFT) |\
- (((i) & TS_HI_BIT) << TS_HI_SHIFT))
-
--#define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | 0x800 | TS_INDEX2VAL((xmit_sz)))
--#define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | 0x800 | TS_INDEX2VAL((xmit_sz)))
-+#define CHCR_TX(xmit_sz) (DM_FIX | SM_INC | RS_ERS | TS_INDEX2VAL((xmit_sz)))
-+#define CHCR_RX(xmit_sz) (DM_INC | SM_FIX | RS_ERS | TS_INDEX2VAL((xmit_sz)))
-
- #endif
-diff --git a/drivers/dma/sh/shdmac.c b/drivers/dma/sh/shdmac.c
-index 9acbba84759b..5c1fbe7d300a 100644
---- a/drivers/dma/sh/shdmac.c
-+++ b/drivers/dma/sh/shdmac.c
-@@ -238,9 +238,8 @@ static void dmae_init(struct sh_dmae_chan *sh_chan)
- {
- /*
- * Default configuration for dual address memory-memory transfer.
-- * 0x400 represents auto-request.
- */
-- u32 chcr = DM_INC | SM_INC | 0x400 | log2size_to_chcr(sh_chan,
-+ u32 chcr = DM_INC | SM_INC | RS_AUTO | log2size_to_chcr(sh_chan,
- LOG2_DEFAULT_XFER_SIZE);
- sh_chan->xmit_shift = calc_xmit_shift(sh_chan, chcr);
- chcr_write(sh_chan, chcr);
---
-2.1.2
-
diff --git a/patches.renesas/0741-dmaengine-sh-Rework-Kconfig-and-Makefile.patch b/patches.renesas/0741-dmaengine-sh-Rework-Kconfig-and-Makefile.patch
deleted file mode 100644
index 5e70ddb7d96a1..0000000000000
--- a/patches.renesas/0741-dmaengine-sh-Rework-Kconfig-and-Makefile.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From fdd7ce8e8a49133fe410ed2ecf84fc594e5bcf1e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Thu, 31 Jul 2014 09:34:04 +0900
-Subject: dmaengine: sh: Rework Kconfig and Makefile
-
-Separate helpers and drivers in the Kconfig and Makefile to improve
-readability and move the CONFIG_OF dependency from the Makefile to
-Kconfig.
-
-[pebolle@tiscali.nl: reported need to rename SHDMA_R8A73A4 instances]
-Reported-by: Paul Bolle <pebolle@tiscali.nl>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-[horms+renesas@verge.net.au: squashed rename of SHDMA_R8A73A4 instances]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Vinod Koul <vinod.koul@intel.com>
-
-(cherry picked from commit 9f2c2bb31258e11b1ebaf73bdf2a88f8afaa2dd2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/dma/sh/Kconfig | 24 +++++++++++++++++++-----
- drivers/dma/sh/Makefile | 16 ++++++++++++----
- drivers/dma/sh/shdma.h | 2 +-
- 3 files changed, 32 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/dma/sh/Kconfig b/drivers/dma/sh/Kconfig
-index 0f719816c91b..0349125a2e20 100644
---- a/drivers/dma/sh/Kconfig
-+++ b/drivers/dma/sh/Kconfig
-@@ -2,21 +2,39 @@
- # DMA engine configuration for sh
- #
-
-+#
-+# DMA Engine Helpers
-+#
-+
- config SH_DMAE_BASE
- bool "Renesas SuperH DMA Engine support"
-- depends on (SUPERH && SH_DMA) || ARCH_SHMOBILE || COMPILE_TEST
-+ depends on SUPERH || ARCH_SHMOBILE || COMPILE_TEST
-+ depends on !SUPERH || SH_DMA
- depends on !SH_DMA_API
- default y
- select DMA_ENGINE
- help
- Enable support for the Renesas SuperH DMA controllers.
-
-+#
-+# DMA Controllers
-+#
-+
- config SH_DMAE
- tristate "Renesas SuperH DMAC support"
- depends on SH_DMAE_BASE
- help
- Enable support for the Renesas SuperH DMA controllers.
-
-+if SH_DMAE
-+
-+config SH_DMAE_R8A73A4
-+ def_bool y
-+ depends on ARCH_R8A73A4
-+ depends on OF
-+
-+endif
-+
- config SUDMAC
- tristate "Renesas SUDMAC support"
- depends on SH_DMAE_BASE
-@@ -34,7 +52,3 @@ config RCAR_AUDMAC_PP
- depends on SH_DMAE_BASE
- help
- Enable support for the Renesas R-Car Audio DMAC Peripheral Peripheral controllers.
--
--config SHDMA_R8A73A4
-- def_bool y
-- depends on ARCH_R8A73A4 && SH_DMAE != n
-diff --git a/drivers/dma/sh/Makefile b/drivers/dma/sh/Makefile
-index 1ce88b28cfc6..0a5cfdb76e45 100644
---- a/drivers/dma/sh/Makefile
-+++ b/drivers/dma/sh/Makefile
-@@ -1,10 +1,18 @@
-+#
-+# DMA Engine Helpers
-+#
-+
- obj-$(CONFIG_SH_DMAE_BASE) += shdma-base.o shdma-of.o
--obj-$(CONFIG_SH_DMAE) += shdma.o
-+
-+#
-+# DMA Controllers
-+#
-+
- shdma-y := shdmac.o
--ifeq ($(CONFIG_OF),y)
--shdma-$(CONFIG_SHDMA_R8A73A4) += shdma-r8a73a4.o
--endif
-+shdma-$(CONFIG_SH_DMAE_R8A73A4) += shdma-r8a73a4.o
- shdma-objs := $(shdma-y)
-+obj-$(CONFIG_SH_DMAE) += shdma.o
-+
- obj-$(CONFIG_SUDMAC) += sudmac.o
- obj-$(CONFIG_RCAR_HPB_DMAE) += rcar-hpbdma.o
- obj-$(CONFIG_RCAR_AUDMAC_PP) += rcar-audmapp.o
-diff --git a/drivers/dma/sh/shdma.h b/drivers/dma/sh/shdma.h
-index 758a57b51875..2c0a969adc9f 100644
---- a/drivers/dma/sh/shdma.h
-+++ b/drivers/dma/sh/shdma.h
-@@ -62,7 +62,7 @@ struct sh_dmae_desc {
- #define to_sh_dev(chan) container_of(chan->shdma_chan.dma_chan.device,\
- struct sh_dmae_device, shdma_dev.dma_dev)
-
--#ifdef CONFIG_SHDMA_R8A73A4
-+#ifdef CONFIG_SH_DMAE_R8A73A4
- extern const struct sh_dmae_pdata r8a73a4_dma_pdata;
- #define r8a73a4_shdma_devid (&r8a73a4_dma_pdata)
- #else
---
-2.1.2
-
diff --git a/patches.renesas/0742-serial-sh-sci-Updated-calculation-of-bit-error-rate-.patch b/patches.renesas/0742-serial-sh-sci-Updated-calculation-of-bit-error-rate-.patch
deleted file mode 100644
index b9eb65f17d6e6..0000000000000
--- a/patches.renesas/0742-serial-sh-sci-Updated-calculation-of-bit-error-rate-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 79253be887e74e8c7e6e5c963eb918772ffdd0d4 Mon Sep 17 00:00:00 2001
-From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Date: Mon, 14 Jul 2014 16:09:58 +0900
-Subject: serial: sh-sci: Updated calculation of bit error rate and bit rate
-
-Currently, the decimal point is discarded calculation of BRR.
-Therefore, it can not calculate a value close to the correct value.
-This patch fixes this problem by using DIV_ROUND_CLOSEST.
-
-Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit b7d66397f4d282ddf2a2fe516fc9329c5a063459)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 88236da0ddf7..ce8013702560 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -1796,11 +1796,13 @@ static void sci_baud_calc_hscif(unsigned int bps, unsigned long freq,
- for (sr = 8; sr <= 32; sr++) {
- for (c = 0; c <= 3; c++) {
- /* integerized formulas from HSCIF documentation */
-- br = freq / (sr * (1 << (2 * c + 1)) * bps) - 1;
-+ br = DIV_ROUND_CLOSEST(freq, (sr *
-+ (1 << (2 * c + 1)) * bps)) - 1;
- if (br < 0 || br > 255)
- continue;
-- err = freq / ((br + 1) * bps * sr *
-- (1 << (2 * c + 1)) / 1000) - 1000;
-+ err = DIV_ROUND_CLOSEST(freq, ((br + 1) * bps * sr *
-+ (1 << (2 * c + 1)) / 1000)) -
-+ 1000;
- if (min_err > err) {
- min_err = err;
- *brr = br;
---
-2.1.2
-
diff --git a/patches.renesas/0743-serial-sh-sci-Fix-range-check-of-bit-rate-for-HSCIF.patch b/patches.renesas/0743-serial-sh-sci-Fix-range-check-of-bit-rate-for-HSCIF.patch
deleted file mode 100644
index 3e026bb9fb39f..0000000000000
--- a/patches.renesas/0743-serial-sh-sci-Fix-range-check-of-bit-rate-for-HSCIF.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From f26b05b6f8e3a25e9eab2dc4175f7f775b00a53c Mon Sep 17 00:00:00 2001
-From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Date: Mon, 14 Jul 2014 16:09:59 +0900
-Subject: serial: sh-sci: Fix range check of bit-rate for HSCIF
-
-If bit-rate calculation result of HSCIF is expect 255 from 0,
-driver does not calculate error bit. However, we need to round
-the value to calculate error bit in the case of negative value.
-This rounds the value of bit-rate using clamp(), and bit-rate is the
-case of negative value, it enables the calculation of the error bit.
-
-Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit bcb9973a6097652a12660958449301aada41de9c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index ce8013702560..7f571a8bdcfb 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -1798,8 +1798,7 @@ static void sci_baud_calc_hscif(unsigned int bps, unsigned long freq,
- /* integerized formulas from HSCIF documentation */
- br = DIV_ROUND_CLOSEST(freq, (sr *
- (1 << (2 * c + 1)) * bps)) - 1;
-- if (br < 0 || br > 255)
-- continue;
-+ br = clamp(br, 0, 255);
- err = DIV_ROUND_CLOSEST(freq, ((br + 1) * bps * sr *
- (1 << (2 * c + 1)) / 1000)) -
- 1000;
---
-2.1.2
-
diff --git a/patches.renesas/0744-serial-sh-sci-Add-calculation-recive-margin-for-HSCI.patch b/patches.renesas/0744-serial-sh-sci-Add-calculation-recive-margin-for-HSCI.patch
deleted file mode 100644
index 6b676391e84ea..0000000000000
--- a/patches.renesas/0744-serial-sh-sci-Add-calculation-recive-margin-for-HSCI.patch
+++ /dev/null
@@ -1,147 +0,0 @@
-From 0c50063c76e90d7b12485f5e9ea6513c018ae1dd Mon Sep 17 00:00:00 2001
-From: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Date: Mon, 14 Jul 2014 16:10:00 +0900
-Subject: serial: sh-sci: Add calculation recive margin for HSCIF
-
-When the error of the same bit rate is detected, we will need to select
-the recive margin is large. Current code holds the minimum error, it does
-not have to check the recive margin. This adds this calculation.
-
-Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 730c4e782c039caf40b467c35f595c005e94220c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/tty/serial/sh-sci.c | 77 ++++++++++++++++++++++++++++++++++-----------
- 1 file changed, 59 insertions(+), 18 deletions(-)
-
-diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-sci.c
-index 7f571a8bdcfb..d879c0ca400a 100644
---- a/drivers/tty/serial/sh-sci.c
-+++ b/drivers/tty/serial/sh-sci.c
-@@ -1783,13 +1783,30 @@ static unsigned int sci_scbrr_calc(struct sci_port *s, unsigned int bps,
- return ((freq + 16 * bps) / (32 * bps) - 1);
- }
-
-+/* calculate frame length from SMR */
-+static int sci_baud_calc_frame_len(unsigned int smr_val)
-+{
-+ int len = 10;
-+
-+ if (smr_val & SCSMR_CHR)
-+ len--;
-+ if (smr_val & SCSMR_PE)
-+ len++;
-+ if (smr_val & SCSMR_STOP)
-+ len++;
-+
-+ return len;
-+}
-+
-+
- /* calculate sample rate, BRR, and clock select for HSCIF */
- static void sci_baud_calc_hscif(unsigned int bps, unsigned long freq,
- int *brr, unsigned int *srr,
-- unsigned int *cks)
-+ unsigned int *cks, int frame_len)
- {
-- int sr, c, br, err;
-+ int sr, c, br, err, recv_margin;
- int min_err = 1000; /* 100% */
-+ int recv_max_margin = 0;
-
- /* Find the combination of sample rate and clock select with the
- smallest deviation from the desired baud rate. */
-@@ -1802,12 +1819,35 @@ static void sci_baud_calc_hscif(unsigned int bps, unsigned long freq,
- err = DIV_ROUND_CLOSEST(freq, ((br + 1) * bps * sr *
- (1 << (2 * c + 1)) / 1000)) -
- 1000;
-+ if (err < 0)
-+ continue;
-+
-+ /* Calc recv margin
-+ * M: Receive margin (%)
-+ * N: Ratio of bit rate to clock (N = sampling rate)
-+ * D: Clock duty (D = 0 to 1.0)
-+ * L: Frame length (L = 9 to 12)
-+ * F: Absolute value of clock frequency deviation
-+ *
-+ * M = |(0.5 - 1 / 2 * N) - ((L - 0.5) * F) -
-+ * (|D - 0.5| / N * (1 + F))|
-+ * NOTE: Usually, treat D for 0.5, F is 0 by this
-+ * calculation.
-+ */
-+ recv_margin = abs((500 -
-+ DIV_ROUND_CLOSEST(1000, sr << 1)) / 10);
- if (min_err > err) {
- min_err = err;
-- *brr = br;
-- *srr = sr - 1;
-- *cks = c;
-- }
-+ recv_max_margin = recv_margin;
-+ } else if ((min_err == err) &&
-+ (recv_margin > recv_max_margin))
-+ recv_max_margin = recv_margin;
-+ else
-+ continue;
-+
-+ *brr = br;
-+ *srr = sr - 1;
-+ *cks = c;
- }
- }
-
-@@ -1841,10 +1881,19 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
- {
- struct sci_port *s = to_sci_port(port);
- struct plat_sci_reg *reg;
-- unsigned int baud, smr_val, max_baud, cks = 0;
-+ unsigned int baud, smr_val = 0, max_baud, cks = 0;
- int t = -1;
- unsigned int srr = 15;
-
-+ if ((termios->c_cflag & CSIZE) == CS7)
-+ smr_val |= SCSMR_CHR;
-+ if (termios->c_cflag & PARENB)
-+ smr_val |= SCSMR_PE;
-+ if (termios->c_cflag & PARODD)
-+ smr_val |= SCSMR_PE | SCSMR_ODD;
-+ if (termios->c_cflag & CSTOPB)
-+ smr_val |= SCSMR_STOP;
-+
- /*
- * earlyprintk comes here early on with port->uartclk set to zero.
- * the clock framework is not up and running at this point so here
-@@ -1858,8 +1907,9 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
- baud = uart_get_baud_rate(port, termios, old, 0, max_baud);
- if (likely(baud && port->uartclk)) {
- if (s->cfg->type == PORT_HSCIF) {
-+ int frame_len = sci_baud_calc_frame_len(smr_val);
- sci_baud_calc_hscif(baud, port->uartclk, &t, &srr,
-- &cks);
-+ &cks, frame_len);
- } else {
- t = sci_scbrr_calc(s, baud, port->uartclk);
- for (cks = 0; t >= 256 && cks <= 3; cks++)
-@@ -1871,16 +1921,7 @@ static void sci_set_termios(struct uart_port *port, struct ktermios *termios,
-
- sci_reset(port);
-
-- smr_val = serial_port_in(port, SCSMR) & 3;
--
-- if ((termios->c_cflag & CSIZE) == CS7)
-- smr_val |= SCSMR_CHR;
-- if (termios->c_cflag & PARENB)
-- smr_val |= SCSMR_PE;
-- if (termios->c_cflag & PARODD)
-- smr_val |= SCSMR_PE | SCSMR_ODD;
-- if (termios->c_cflag & CSTOPB)
-- smr_val |= SCSMR_STOP;
-+ smr_val |= serial_port_in(port, SCSMR) & 3;
-
- uart_update_timeout(port, termios->c_cflag, baud);
-
---
-2.1.2
-
diff --git a/patches.renesas/0745-sh-pfc-r8a7791-fix-CAN-pin-groups.patch b/patches.renesas/0745-sh-pfc-r8a7791-fix-CAN-pin-groups.patch
deleted file mode 100644
index f6f6b31ae05bb..0000000000000
--- a/patches.renesas/0745-sh-pfc-r8a7791-fix-CAN-pin-groups.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 6c4fc4152dc30be36da21c2c627e2b014dcc90ff Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 29 Jul 2014 02:12:55 +0400
-Subject: sh-pfc: r8a7791: fix CAN pin groups
-
-I had made last-minute changes before submitting the patch "sh-pfc: r8a7791:
-add CAN pin groups"; now I'm seeing that they weren't complete: I had missed
-update to the pin group names in pin[01]_groups[]. Drop the "_a" suffixes there.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-(cherry picked from commit 302fb1781783ded370f515e8e649b8285ee29cdc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pinctrl/sh-pfc/pfc-r8a7791.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-index 576d41b459e9..c6e5deba238e 100644
---- a/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-+++ b/drivers/pinctrl/sh-pfc/pfc-r8a7791.c
-@@ -4509,24 +4509,24 @@ static const char * const audio_clk_groups[] = {
- };
-
- static const char * const can0_groups[] = {
-- "can0_data_a",
-+ "can0_data",
- "can0_data_b",
- "can0_data_c",
- "can0_data_d",
- "can0_data_e",
- "can0_data_f",
-- "can_clk_a",
-+ "can_clk",
- "can_clk_b",
- "can_clk_c",
- "can_clk_d",
- };
-
- static const char * const can1_groups[] = {
-- "can1_data_a",
-+ "can1_data",
- "can1_data_b",
- "can1_data_c",
- "can1_data_d",
-- "can_clk_a",
-+ "can_clk",
- "can_clk_b",
- "can_clk_c",
- "can_clk_d",
---
-2.1.2
-
diff --git a/patches.renesas/0746-spi-sh-msiof-Add-more-register-documentation.patch b/patches.renesas/0746-spi-sh-msiof-Add-more-register-documentation.patch
deleted file mode 100644
index 0527088f83122..0000000000000
--- a/patches.renesas/0746-spi-sh-msiof-Add-more-register-documentation.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From d95b68544779988bdf26faa3650fefe84d259189 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 12:16:16 +0200
-Subject: spi: sh-msiof: Add more register documentation
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2e2b36872d7b45b1f88a590283b14c67931b777f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 54 +++++++++++++++++++++++++++++++++++++++++++++-
- 1 file changed, 53 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 45b09142afe2..38824a994131 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -113,9 +113,61 @@ struct sh_msiof_spi_priv {
- #define CTR_TXE 0x00000200 /* Transmit Enable */
- #define CTR_RXE 0x00000100 /* Receive Enable */
-
--/* STR and IER */
-+/* FCTR */
-+#define FCTR_TFWM_MASK 0xe0000000 /* Transmit FIFO Watermark */
-+#define FCTR_TFWM_64 0x00000000 /* Transfer Request when 64 empty stages */
-+#define FCTR_TFWM_32 0x20000000 /* Transfer Request when 32 empty stages */
-+#define FCTR_TFWM_24 0x40000000 /* Transfer Request when 24 empty stages */
-+#define FCTR_TFWM_16 0x60000000 /* Transfer Request when 16 empty stages */
-+#define FCTR_TFWM_12 0x80000000 /* Transfer Request when 12 empty stages */
-+#define FCTR_TFWM_8 0xa0000000 /* Transfer Request when 8 empty stages */
-+#define FCTR_TFWM_4 0xc0000000 /* Transfer Request when 4 empty stages */
-+#define FCTR_TFWM_1 0xe0000000 /* Transfer Request when 1 empty stage */
-+#define FCTR_TFUA_MASK 0x07f00000 /* Transmit FIFO Usable Area */
-+#define FCTR_TFUA_SHIFT 20
-+#define FCTR_TFUA(i) ((i) << FCTR_TFUA_SHIFT)
-+#define FCTR_RFWM_MASK 0x0000e000 /* Receive FIFO Watermark */
-+#define FCTR_RFWM_1 0x00000000 /* Transfer Request when 1 valid stages */
-+#define FCTR_RFWM_4 0x00002000 /* Transfer Request when 4 valid stages */
-+#define FCTR_RFWM_8 0x00004000 /* Transfer Request when 8 valid stages */
-+#define FCTR_RFWM_16 0x00006000 /* Transfer Request when 16 valid stages */
-+#define FCTR_RFWM_32 0x00008000 /* Transfer Request when 32 valid stages */
-+#define FCTR_RFWM_64 0x0000a000 /* Transfer Request when 64 valid stages */
-+#define FCTR_RFWM_128 0x0000c000 /* Transfer Request when 128 valid stages */
-+#define FCTR_RFWM_256 0x0000e000 /* Transfer Request when 256 valid stages */
-+#define FCTR_RFUA_MASK 0x00001ff0 /* Receive FIFO Usable Area (0x40 = full) */
-+#define FCTR_RFUA_SHIFT 4
-+#define FCTR_RFUA(i) ((i) << FCTR_RFUA_SHIFT)
-+
-+/* STR */
-+#define STR_TFEMP 0x20000000 /* Transmit FIFO Empty */
-+#define STR_TDREQ 0x10000000 /* Transmit Data Transfer Request */
- #define STR_TEOF 0x00800000 /* Frame Transmission End */
-+#define STR_TFSERR 0x00200000 /* Transmit Frame Synchronization Error */
-+#define STR_TFOVF 0x00100000 /* Transmit FIFO Overflow */
-+#define STR_TFUDF 0x00080000 /* Transmit FIFO Underflow */
-+#define STR_RFFUL 0x00002000 /* Receive FIFO Full */
-+#define STR_RDREQ 0x00001000 /* Receive Data Transfer Request */
- #define STR_REOF 0x00000080 /* Frame Reception End */
-+#define STR_RFSERR 0x00000020 /* Receive Frame Synchronization Error */
-+#define STR_RFUDF 0x00000010 /* Receive FIFO Underflow */
-+#define STR_RFOVF 0x00000008 /* Receive FIFO Overflow */
-+
-+/* IER */
-+#define IER_TDMAE 0x80000000 /* Transmit Data DMA Transfer Req. Enable */
-+#define IER_TFEMPE 0x20000000 /* Transmit FIFO Empty Enable */
-+#define IER_TDREQE 0x10000000 /* Transmit Data Transfer Request Enable */
-+#define IER_TEOFE 0x00800000 /* Frame Transmission End Enable */
-+#define IER_TFSERRE 0x00200000 /* Transmit Frame Sync Error Enable */
-+#define IER_TFOVFE 0x00100000 /* Transmit FIFO Overflow Enable */
-+#define IER_TFUDFE 0x00080000 /* Transmit FIFO Underflow Enable */
-+#define IER_RDMAE 0x00008000 /* Receive Data DMA Transfer Req. Enable */
-+#define IER_RFFULE 0x00002000 /* Receive FIFO Full Enable */
-+#define IER_RDREQE 0x00001000 /* Receive Data Transfer Request Enable */
-+#define IER_REOFE 0x00000080 /* Frame Reception End Enable */
-+#define IER_RFSERRE 0x00000020 /* Receive Frame Sync Error Enable */
-+#define IER_RFUDFE 0x00000010 /* Receive FIFO Underflow Enable */
-+#define IER_RFOVFE 0x00000008 /* Receive FIFO Overflow Enable */
-
-
- static u32 sh_msiof_read(struct sh_msiof_spi_priv *p, int reg_offs)
---
-2.1.2
-
diff --git a/patches.renesas/0747-spi-sh-msiof-Extract-sh_msiof_spi_-start-stop-helper.patch b/patches.renesas/0747-spi-sh-msiof-Extract-sh_msiof_spi_-start-stop-helper.patch
deleted file mode 100644
index 07ab3165277fc..0000000000000
--- a/patches.renesas/0747-spi-sh-msiof-Extract-sh_msiof_spi_-start-stop-helper.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 8f823258e8982b397a040cdc46b25161654b1419 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 12:16:17 +0200
-Subject: spi: sh-msiof: Extract sh_msiof_spi_{start,stop}() helpers
-
-Based on an old patch by Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 76c02e71612533206cb062b875c9609bce83d23a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 51 +++++++++++++++++++++++++++++++++-------------
- 1 file changed, 37 insertions(+), 14 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 38824a994131..2cd5fcb86f71 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -509,6 +509,40 @@ static int sh_msiof_prepare_message(struct spi_master *master,
- return 0;
- }
-
-+static int sh_msiof_spi_start(struct sh_msiof_spi_priv *p, void *rx_buf)
-+{
-+ int ret;
-+
-+ /* setup clock and rx/tx signals */
-+ ret = sh_msiof_modify_ctr_wait(p, 0, CTR_TSCKE);
-+ if (rx_buf && !ret)
-+ ret = sh_msiof_modify_ctr_wait(p, 0, CTR_RXE);
-+ if (!ret)
-+ ret = sh_msiof_modify_ctr_wait(p, 0, CTR_TXE);
-+
-+ /* start by setting frame bit */
-+ if (!ret)
-+ ret = sh_msiof_modify_ctr_wait(p, 0, CTR_TFSE);
-+
-+ return ret;
-+}
-+
-+static int sh_msiof_spi_stop(struct sh_msiof_spi_priv *p, void *rx_buf)
-+{
-+ int ret;
-+
-+ /* shut down frame, rx/tx and clock signals */
-+ ret = sh_msiof_modify_ctr_wait(p, CTR_TFSE, 0);
-+ if (!ret)
-+ ret = sh_msiof_modify_ctr_wait(p, CTR_TXE, 0);
-+ if (rx_buf && !ret)
-+ ret = sh_msiof_modify_ctr_wait(p, CTR_RXE, 0);
-+ if (!ret)
-+ ret = sh_msiof_modify_ctr_wait(p, CTR_TSCKE, 0);
-+
-+ return ret;
-+}
-+
- static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- void (*tx_fifo)(struct sh_msiof_spi_priv *,
- const void *, int, int),
-@@ -536,15 +570,9 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- if (tx_buf)
- tx_fifo(p, tx_buf, words, fifo_shift);
-
-- /* setup clock and rx/tx signals */
-- ret = sh_msiof_modify_ctr_wait(p, 0, CTR_TSCKE);
-- if (rx_buf)
-- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_RXE);
-- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TXE);
--
-- /* start by setting frame bit */
- reinit_completion(&p->done);
-- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, 0, CTR_TFSE);
-+
-+ ret = sh_msiof_spi_start(p, rx_buf);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to start hardware\n");
- goto err;
-@@ -560,12 +588,7 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- /* clear status bits */
- sh_msiof_reset_str(p);
-
-- /* shut down frame, rx/tx and clock signals */
-- ret = sh_msiof_modify_ctr_wait(p, CTR_TFSE, 0);
-- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, CTR_TXE, 0);
-- if (rx_buf)
-- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, CTR_RXE, 0);
-- ret = ret ? ret : sh_msiof_modify_ctr_wait(p, CTR_TSCKE, 0);
-+ ret = sh_msiof_spi_stop(p, rx_buf);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to shut down hardware\n");
- goto err;
---
-2.1.2
-
diff --git a/patches.renesas/0748-spi-sh-msiof-Improve-transfer-error-handling.patch b/patches.renesas/0748-spi-sh-msiof-Improve-transfer-error-handling.patch
deleted file mode 100644
index 309d58f7b700d..0000000000000
--- a/patches.renesas/0748-spi-sh-msiof-Improve-transfer-error-handling.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 8287d99084cd46071a2074b95662ee7d663ad70c Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 12:16:18 +0200
-Subject: spi: sh-msiof: Improve transfer error handling
-
- - Add a timeout when waiting for the transfer complete interrupt,
- - If sh_msiof_spi_stop() fails, there's no need to clear IER, as the
- interrupt handler has already done that,
- - Propagate transfer failures in sh_msiof_transfer_one().
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 75b82e23a4ea20a9e1a48695ff5e01761889dbb3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 18 +++++++++++++-----
- 1 file changed, 13 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 2cd5fcb86f71..e5894a65c797 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -575,11 +575,16 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- ret = sh_msiof_spi_start(p, rx_buf);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to start hardware\n");
-- goto err;
-+ goto stop_ier;
- }
-
- /* wait for tx fifo to be emptied / rx fifo to be filled */
-- wait_for_completion(&p->done);
-+ ret = wait_for_completion_timeout(&p->done, HZ);
-+ if (!ret) {
-+ dev_err(&p->pdev->dev, "PIO timeout\n");
-+ ret = -ETIMEDOUT;
-+ goto stop_reset;
-+ }
-
- /* read rx fifo */
- if (rx_buf)
-@@ -591,12 +596,15 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- ret = sh_msiof_spi_stop(p, rx_buf);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to shut down hardware\n");
-- goto err;
-+ return ret;
- }
-
- return words;
-
-- err:
-+stop_reset:
-+ sh_msiof_reset_str(p);
-+ sh_msiof_spi_stop(p, rx_buf);
-+stop_ier:
- sh_msiof_write(p, IER, 0);
- return ret;
- }
-@@ -679,7 +687,7 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- rx_buf,
- words, bits);
- if (n < 0)
-- break;
-+ return n;
-
- bytes_done += n * bytes_per_word;
- words -= n;
---
-2.1.2
-
diff --git a/patches.renesas/0749-spi-sh-msiof-Refactor-sh_msiof_transfer_one.patch b/patches.renesas/0749-spi-sh-msiof-Refactor-sh_msiof_transfer_one.patch
deleted file mode 100644
index cea0b90d72eb7..0000000000000
--- a/patches.renesas/0749-spi-sh-msiof-Refactor-sh_msiof_transfer_one.patch
+++ /dev/null
@@ -1,119 +0,0 @@
-From aeba79f4237373a48c1de437b1d107381c5131f8 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 12:16:19 +0200
-Subject: spi: sh-msiof: Refactor sh_msiof_transfer_one()
-
- - Move buffer pointer and length setup to the top,
- - Make unsigned values unsigned,
- - Loop over words and increment pointers instead of recalculating them,
- which allows to kill bytes_done.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 0312d59130693adad85c2acfbc0b92a669930a41)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 43 +++++++++++++++++++++----------------------
- 1 file changed, 21 insertions(+), 22 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index e5894a65c797..824f44e6bd88 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -616,16 +616,17 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
- void (*tx_fifo)(struct sh_msiof_spi_priv *, const void *, int, int);
- void (*rx_fifo)(struct sh_msiof_spi_priv *, void *, int, int);
-- int bits;
-- int bytes_per_word;
-- int bytes_done;
-- int words;
-+ const void *tx_buf = t->tx_buf;
-+ void *rx_buf = t->rx_buf;
-+ unsigned int len = t->len;
-+ unsigned int bits = t->bits_per_word;
-+ unsigned int bytes_per_word;
-+ unsigned int words;
- int n;
- bool swab;
-
-- bits = t->bits_per_word;
-
-- if (bits <= 8 && t->len > 15 && !(t->len & 3)) {
-+ if (bits <= 8 && len > 15 && !(len & 3)) {
- bits = 32;
- swab = true;
- } else {
-@@ -639,34 +640,34 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- rx_fifo = sh_msiof_spi_read_fifo_8;
- } else if (bits <= 16) {
- bytes_per_word = 2;
-- if ((unsigned long)t->tx_buf & 0x01)
-+ if ((unsigned long)tx_buf & 0x01)
- tx_fifo = sh_msiof_spi_write_fifo_16u;
- else
- tx_fifo = sh_msiof_spi_write_fifo_16;
-
-- if ((unsigned long)t->rx_buf & 0x01)
-+ if ((unsigned long)rx_buf & 0x01)
- rx_fifo = sh_msiof_spi_read_fifo_16u;
- else
- rx_fifo = sh_msiof_spi_read_fifo_16;
- } else if (swab) {
- bytes_per_word = 4;
-- if ((unsigned long)t->tx_buf & 0x03)
-+ if ((unsigned long)tx_buf & 0x03)
- tx_fifo = sh_msiof_spi_write_fifo_s32u;
- else
- tx_fifo = sh_msiof_spi_write_fifo_s32;
-
-- if ((unsigned long)t->rx_buf & 0x03)
-+ if ((unsigned long)rx_buf & 0x03)
- rx_fifo = sh_msiof_spi_read_fifo_s32u;
- else
- rx_fifo = sh_msiof_spi_read_fifo_s32;
- } else {
- bytes_per_word = 4;
-- if ((unsigned long)t->tx_buf & 0x03)
-+ if ((unsigned long)tx_buf & 0x03)
- tx_fifo = sh_msiof_spi_write_fifo_32u;
- else
- tx_fifo = sh_msiof_spi_write_fifo_32;
-
-- if ((unsigned long)t->rx_buf & 0x03)
-+ if ((unsigned long)rx_buf & 0x03)
- rx_fifo = sh_msiof_spi_read_fifo_32u;
- else
- rx_fifo = sh_msiof_spi_read_fifo_32;
-@@ -676,20 +677,18 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- sh_msiof_spi_set_clk_regs(p, clk_get_rate(p->clk), t->speed_hz);
-
- /* transfer in fifo sized chunks */
-- words = t->len / bytes_per_word;
-- bytes_done = 0;
--
-- while (bytes_done < t->len) {
-- void *rx_buf = t->rx_buf ? t->rx_buf + bytes_done : NULL;
-- const void *tx_buf = t->tx_buf ? t->tx_buf + bytes_done : NULL;
-- n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo,
-- tx_buf,
-- rx_buf,
-+ words = len / bytes_per_word;
-+
-+ while (words > 0) {
-+ n = sh_msiof_spi_txrx_once(p, tx_fifo, rx_fifo, tx_buf, rx_buf,
- words, bits);
- if (n < 0)
- return n;
-
-- bytes_done += n * bytes_per_word;
-+ if (tx_buf)
-+ tx_buf += n * bytes_per_word;
-+ if (rx_buf)
-+ rx_buf += n * bytes_per_word;
- words -= n;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0750-spi-sh-msiof-Add-DMA-support.patch b/patches.renesas/0750-spi-sh-msiof-Add-DMA-support.patch
deleted file mode 100644
index 7cfe8c417ba80..0000000000000
--- a/patches.renesas/0750-spi-sh-msiof-Add-DMA-support.patch
+++ /dev/null
@@ -1,533 +0,0 @@
-From 4aa30897cdb6fab241d7c9639ba623dee98568c2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 30 Jun 2014 12:10:24 +0200
-Subject: spi: sh-msiof: Add DMA support
-
-Add DMA support to the MSIOF driver using platform data.
-
-As MSIOF DMA is limited to 32-bit words (requiring byte/wordswapping for
-smaller wordsizes), and the group length is limited to 256 words, DMA is
-performed on two fixed pages, allocated and mapped at driver initialization
-time.
-
-Performance figures (in Mbps) on r8a7791/koelsch at different SPI clock
-frequencies for 1024-byte and 4096-byte transfers:
-
- 1024 bytes 4096 bytes
- - 3.25 MHz: PIO 2.1, DMA 2.6 | PIO 2.8, DMA 3.1
- - 6.5 MHz: PIO 3.2, DMA 4.4 | PIO 5.0, DMA 5.9
- - 13 MHz: PIO 4.2, DMA 6.6 | PIO 8.2, DMA 10.7
- - 26 MHz: PIO 5.9, DMA 10.4 | PIO 12.4, DMA 18.4
-
-Note that DMA is only faster than PIO for transfers that exceed the FIFO
-size (typically 64 words / 256 bytes).
-
-Also note that large transfers (larger than the group length for DMA, or
-larger than the FIFO size for PIO), should use cs-gpio (with the
-appropriate pinmux setup), as the hardware chipselect will be deasserted in
-between chunks.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b0d0ce8b6b91a0f6f99045b6019fc4c824634fb4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 348 ++++++++++++++++++++++++++++++++++++++++++-
- include/linux/spi/sh_msiof.h | 2 +
- 2 files changed, 343 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 824f44e6bd88..9922ed3a4441 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -2,6 +2,7 @@
- * SuperH MSIOF SPI Master Interface
- *
- * Copyright (c) 2009 Magnus Damm
-+ * Copyright (C) 2014 Glider bvba
- *
- * 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
-@@ -13,6 +14,8 @@
- #include <linux/clk.h>
- #include <linux/completion.h>
- #include <linux/delay.h>
-+#include <linux/dma-mapping.h>
-+#include <linux/dmaengine.h>
- #include <linux/err.h>
- #include <linux/gpio.h>
- #include <linux/interrupt.h>
-@@ -23,6 +26,7 @@
- #include <linux/of_device.h>
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
-+#include <linux/sh_dma.h>
-
- #include <linux/spi/sh_msiof.h>
- #include <linux/spi/spi.h>
-@@ -37,6 +41,7 @@ struct sh_msiof_chipdata {
- };
-
- struct sh_msiof_spi_priv {
-+ struct spi_master *master;
- void __iomem *mapbase;
- struct clk *clk;
- struct platform_device *pdev;
-@@ -45,6 +50,10 @@ struct sh_msiof_spi_priv {
- struct completion done;
- int tx_fifo_size;
- int rx_fifo_size;
-+ void *tx_dma_page;
-+ void *rx_dma_page;
-+ dma_addr_t tx_dma_addr;
-+ dma_addr_t rx_dma_addr;
- };
-
- #define TMDR1 0x00 /* Transmit Mode Register 1 */
-@@ -84,6 +93,8 @@ struct sh_msiof_spi_priv {
- #define MDR2_WDLEN1(i) (((i) - 1) << 16) /* Word Count (1-64/256 (SH, A1))) */
- #define MDR2_GRPMASK1 0x00000001 /* Group Output Mask 1 (SH, A1) */
-
-+#define MAX_WDLEN 256U
-+
- /* TSCR and RSCR */
- #define SCR_BRPS_MASK 0x1f00 /* Prescaler Setting (1-32) */
- #define SCR_BRPS(i) (((i) - 1) << 8)
-@@ -282,8 +293,6 @@ static void sh_msiof_spi_set_pin_regs(struct sh_msiof_spi_priv *p,
- * 1 0 11 11 0 0
- * 1 1 11 11 1 1
- */
-- sh_msiof_write(p, FCTR, 0);
--
- tmp = MDR1_SYNCMD_SPI | 1 << MDR1_FLD_SHIFT | MDR1_XXSTP;
- tmp |= !cs_high << MDR1_SYNCAC_SHIFT;
- tmp |= lsb_first << MDR1_BITLSB_SHIFT;
-@@ -319,8 +328,6 @@ static void sh_msiof_spi_set_mode_regs(struct sh_msiof_spi_priv *p,
-
- if (rx_buf)
- sh_msiof_write(p, RMDR2, dr2);
--
-- sh_msiof_write(p, IER, STR_TEOF | STR_REOF);
- }
-
- static void sh_msiof_reset_str(struct sh_msiof_spi_priv *p)
-@@ -563,8 +570,12 @@ static int sh_msiof_spi_txrx_once(struct sh_msiof_spi_priv *p,
- /* the fifo contents need shifting */
- fifo_shift = 32 - bits;
-
-+ /* default FIFO watermarks for PIO */
-+ sh_msiof_write(p, FCTR, 0);
-+
- /* setup msiof transfer mode registers */
- sh_msiof_spi_set_mode_regs(p, tx_buf, rx_buf, bits, words);
-+ sh_msiof_write(p, IER, IER_TEOFE | IER_REOFE);
-
- /* write tx fifo */
- if (tx_buf)
-@@ -609,11 +620,170 @@ stop_ier:
- return ret;
- }
-
-+static void sh_msiof_dma_complete(void *arg)
-+{
-+ struct sh_msiof_spi_priv *p = arg;
-+
-+ sh_msiof_write(p, IER, 0);
-+ complete(&p->done);
-+}
-+
-+static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
-+ void *rx, unsigned int len)
-+{
-+ u32 ier_bits = 0;
-+ struct dma_async_tx_descriptor *desc_tx = NULL, *desc_rx = NULL;
-+ dma_cookie_t cookie;
-+ int ret;
-+
-+ /* 1 stage FIFO watermarks for DMA */
-+ sh_msiof_write(p, FCTR, FCTR_TFWM_1 | FCTR_RFWM_1);
-+
-+ /* setup msiof transfer mode registers (32-bit words) */
-+ sh_msiof_spi_set_mode_regs(p, tx, rx, 32, len / 4);
-+
-+ if (tx) {
-+ ier_bits |= IER_TDREQE | IER_TDMAE;
-+ dma_sync_single_for_device(&p->pdev->dev, p->tx_dma_addr, len,
-+ DMA_TO_DEVICE);
-+ desc_tx = dmaengine_prep_slave_single(p->master->dma_tx,
-+ p->tx_dma_addr, len, DMA_TO_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_tx)
-+ return -EIO;
-+ }
-+
-+ if (rx) {
-+ ier_bits |= IER_RDREQE | IER_RDMAE;
-+ desc_rx = dmaengine_prep_slave_single(p->master->dma_rx,
-+ p->rx_dma_addr, len, DMA_FROM_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_rx)
-+ return -EIO;
-+ }
-+ sh_msiof_write(p, IER, ier_bits);
-+
-+ reinit_completion(&p->done);
-+
-+ if (rx) {
-+ desc_rx->callback = sh_msiof_dma_complete;
-+ desc_rx->callback_param = p;
-+ cookie = dmaengine_submit(desc_rx);
-+ if (dma_submit_error(cookie)) {
-+ ret = cookie;
-+ goto stop_ier;
-+ }
-+ dma_async_issue_pending(p->master->dma_rx);
-+ }
-+
-+ if (tx) {
-+ if (rx) {
-+ /* No callback */
-+ desc_tx->callback = NULL;
-+ } else {
-+ desc_tx->callback = sh_msiof_dma_complete;
-+ desc_tx->callback_param = p;
-+ }
-+ cookie = dmaengine_submit(desc_tx);
-+ if (dma_submit_error(cookie)) {
-+ ret = cookie;
-+ goto stop_rx;
-+ }
-+ dma_async_issue_pending(p->master->dma_tx);
-+ }
-+
-+ ret = sh_msiof_spi_start(p, rx);
-+ if (ret) {
-+ dev_err(&p->pdev->dev, "failed to start hardware\n");
-+ goto stop_tx;
-+ }
-+
-+ /* wait for tx fifo to be emptied / rx fifo to be filled */
-+ ret = wait_for_completion_timeout(&p->done, HZ);
-+ if (!ret) {
-+ dev_err(&p->pdev->dev, "DMA timeout\n");
-+ ret = -ETIMEDOUT;
-+ goto stop_reset;
-+ }
-+
-+ /* clear status bits */
-+ sh_msiof_reset_str(p);
-+
-+ ret = sh_msiof_spi_stop(p, rx);
-+ if (ret) {
-+ dev_err(&p->pdev->dev, "failed to shut down hardware\n");
-+ return ret;
-+ }
-+
-+ if (rx)
-+ dma_sync_single_for_cpu(&p->pdev->dev, p->rx_dma_addr, len,
-+ DMA_FROM_DEVICE);
-+
-+ return 0;
-+
-+stop_reset:
-+ sh_msiof_reset_str(p);
-+ sh_msiof_spi_stop(p, rx);
-+stop_tx:
-+ if (tx)
-+ dmaengine_terminate_all(p->master->dma_tx);
-+stop_rx:
-+ if (rx)
-+ dmaengine_terminate_all(p->master->dma_rx);
-+stop_ier:
-+ sh_msiof_write(p, IER, 0);
-+ return ret;
-+}
-+
-+static void copy_bswap32(u32 *dst, const u32 *src, unsigned int words)
-+{
-+ /* src or dst can be unaligned, but not both */
-+ if ((unsigned long)src & 3) {
-+ while (words--) {
-+ *dst++ = swab32(get_unaligned(src));
-+ src++;
-+ }
-+ } else if ((unsigned long)dst & 3) {
-+ while (words--) {
-+ put_unaligned(swab32(*src++), dst);
-+ dst++;
-+ }
-+ } else {
-+ while (words--)
-+ *dst++ = swab32(*src++);
-+ }
-+}
-+
-+static void copy_wswap32(u32 *dst, const u32 *src, unsigned int words)
-+{
-+ /* src or dst can be unaligned, but not both */
-+ if ((unsigned long)src & 3) {
-+ while (words--) {
-+ *dst++ = swahw32(get_unaligned(src));
-+ src++;
-+ }
-+ } else if ((unsigned long)dst & 3) {
-+ while (words--) {
-+ put_unaligned(swahw32(*src++), dst);
-+ dst++;
-+ }
-+ } else {
-+ while (words--)
-+ *dst++ = swahw32(*src++);
-+ }
-+}
-+
-+static void copy_plain32(u32 *dst, const u32 *src, unsigned int words)
-+{
-+ memcpy(dst, src, words * 4);
-+}
-+
- static int sh_msiof_transfer_one(struct spi_master *master,
- struct spi_device *spi,
- struct spi_transfer *t)
- {
- struct sh_msiof_spi_priv *p = spi_master_get_devdata(master);
-+ void (*copy32)(u32 *, const u32 *, unsigned int);
- void (*tx_fifo)(struct sh_msiof_spi_priv *, const void *, int, int);
- void (*rx_fifo)(struct sh_msiof_spi_priv *, void *, int, int);
- const void *tx_buf = t->tx_buf;
-@@ -624,7 +794,48 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- unsigned int words;
- int n;
- bool swab;
-+ int ret;
-+
-+ /* setup clocks (clock already enabled in chipselect()) */
-+ sh_msiof_spi_set_clk_regs(p, clk_get_rate(p->clk), t->speed_hz);
-+
-+ while (master->dma_tx && len > 15) {
-+ /*
-+ * DMA supports 32-bit words only, hence pack 8-bit and 16-bit
-+ * words, with byte resp. word swapping.
-+ */
-+ unsigned int l = min(len, MAX_WDLEN * 4);
-+
-+ if (bits <= 8) {
-+ if (l & 3)
-+ break;
-+ copy32 = copy_bswap32;
-+ } else if (bits <= 16) {
-+ if (l & 1)
-+ break;
-+ copy32 = copy_wswap32;
-+ } else {
-+ copy32 = copy_plain32;
-+ }
-+
-+ if (tx_buf)
-+ copy32(p->tx_dma_page, tx_buf, l / 4);
-
-+ ret = sh_msiof_dma_once(p, tx_buf, rx_buf, l);
-+ if (ret)
-+ return ret;
-+
-+ if (rx_buf) {
-+ copy32(rx_buf, p->rx_dma_page, l / 4);
-+ rx_buf += l;
-+ }
-+ if (tx_buf)
-+ tx_buf += l;
-+
-+ len -= l;
-+ if (!len)
-+ return 0;
-+ }
-
- if (bits <= 8 && len > 15 && !(len & 3)) {
- bits = 32;
-@@ -673,9 +884,6 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- rx_fifo = sh_msiof_spi_read_fifo_32;
- }
-
-- /* setup clocks (clock already enabled in chipselect()) */
-- sh_msiof_spi_set_clk_regs(p, clk_get_rate(p->clk), t->speed_hz);
--
- /* transfer in fifo sized chunks */
- words = len / bytes_per_word;
-
-@@ -745,6 +953,123 @@ static struct sh_msiof_spi_info *sh_msiof_spi_parse_dt(struct device *dev)
- }
- #endif
-
-+static struct dma_chan *sh_msiof_request_dma_chan(struct device *dev,
-+ enum dma_transfer_direction dir, unsigned int id, dma_addr_t port_addr)
-+{
-+ dma_cap_mask_t mask;
-+ struct dma_chan *chan;
-+ struct dma_slave_config cfg;
-+ int ret;
-+
-+ dma_cap_zero(mask);
-+ dma_cap_set(DMA_SLAVE, mask);
-+
-+ chan = dma_request_channel(mask, shdma_chan_filter,
-+ (void *)(unsigned long)id);
-+ if (!chan) {
-+ dev_warn(dev, "dma_request_channel failed\n");
-+ return NULL;
-+ }
-+
-+ memset(&cfg, 0, sizeof(cfg));
-+ cfg.slave_id = id;
-+ cfg.direction = dir;
-+ if (dir == DMA_MEM_TO_DEV)
-+ cfg.dst_addr = port_addr;
-+ else
-+ cfg.src_addr = port_addr;
-+
-+ ret = dmaengine_slave_config(chan, &cfg);
-+ if (ret) {
-+ dev_warn(dev, "dmaengine_slave_config failed %d\n", ret);
-+ dma_release_channel(chan);
-+ return NULL;
-+ }
-+
-+ return chan;
-+}
-+
-+static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
-+{
-+ struct platform_device *pdev = p->pdev;
-+ struct device *dev = &pdev->dev;
-+ const struct sh_msiof_spi_info *info = dev_get_platdata(dev);
-+ const struct resource *res;
-+ struct spi_master *master;
-+
-+ if (!info || !info->dma_tx_id || !info->dma_rx_id)
-+ return 0; /* The driver assumes no error */
-+
-+ /* The DMA engine uses the second register set, if present */
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
-+ if (!res)
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-+
-+ master = p->master;
-+ master->dma_tx = sh_msiof_request_dma_chan(dev, DMA_MEM_TO_DEV,
-+ info->dma_tx_id,
-+ res->start + TFDR);
-+ if (!master->dma_tx)
-+ return -ENODEV;
-+
-+ master->dma_rx = sh_msiof_request_dma_chan(dev, DMA_DEV_TO_MEM,
-+ info->dma_rx_id,
-+ res->start + RFDR);
-+ if (!master->dma_rx)
-+ goto free_tx_chan;
-+
-+ p->tx_dma_page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
-+ if (!p->tx_dma_page)
-+ goto free_rx_chan;
-+
-+ p->rx_dma_page = (void *)__get_free_page(GFP_KERNEL | GFP_DMA);
-+ if (!p->rx_dma_page)
-+ goto free_tx_page;
-+
-+ p->tx_dma_addr = dma_map_single(dev, p->tx_dma_page, PAGE_SIZE,
-+ DMA_TO_DEVICE);
-+ if (dma_mapping_error(dev, p->tx_dma_addr))
-+ goto free_rx_page;
-+
-+ p->rx_dma_addr = dma_map_single(dev, p->rx_dma_page, PAGE_SIZE,
-+ DMA_FROM_DEVICE);
-+ if (dma_mapping_error(dev, p->rx_dma_addr))
-+ goto unmap_tx_page;
-+
-+ dev_info(dev, "DMA available");
-+ return 0;
-+
-+unmap_tx_page:
-+ dma_unmap_single(dev, p->tx_dma_addr, PAGE_SIZE, DMA_TO_DEVICE);
-+free_rx_page:
-+ free_page((unsigned long)p->rx_dma_page);
-+free_tx_page:
-+ free_page((unsigned long)p->tx_dma_page);
-+free_rx_chan:
-+ dma_release_channel(master->dma_rx);
-+free_tx_chan:
-+ dma_release_channel(master->dma_tx);
-+ master->dma_tx = NULL;
-+ return -ENODEV;
-+}
-+
-+static void sh_msiof_release_dma(struct sh_msiof_spi_priv *p)
-+{
-+ struct spi_master *master = p->master;
-+ struct device *dev;
-+
-+ if (!master->dma_tx)
-+ return;
-+
-+ dev = &p->pdev->dev;
-+ dma_unmap_single(dev, p->rx_dma_addr, PAGE_SIZE, DMA_FROM_DEVICE);
-+ dma_unmap_single(dev, p->tx_dma_addr, PAGE_SIZE, DMA_TO_DEVICE);
-+ free_page((unsigned long)p->rx_dma_page);
-+ free_page((unsigned long)p->tx_dma_page);
-+ dma_release_channel(master->dma_rx);
-+ dma_release_channel(master->dma_tx);
-+}
-+
- static int sh_msiof_spi_probe(struct platform_device *pdev)
- {
- struct resource *r;
-@@ -763,6 +1088,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- p = spi_master_get_devdata(master);
-
- platform_set_drvdata(pdev, p);
-+ p->master = master;
-
- of_id = of_match_device(sh_msiof_match, &pdev->dev);
- if (of_id) {
-@@ -833,6 +1159,10 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- master->auto_runtime_pm = true;
- master->transfer_one = sh_msiof_transfer_one;
-
-+ ret = sh_msiof_request_dma(p);
-+ if (ret < 0)
-+ dev_warn(&pdev->dev, "DMA not available, using PIO\n");
-+
- ret = devm_spi_register_master(&pdev->dev, master);
- if (ret < 0) {
- dev_err(&pdev->dev, "spi_register_master error.\n");
-@@ -842,6 +1172,7 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
- return 0;
-
- err2:
-+ sh_msiof_release_dma(p);
- pm_runtime_disable(&pdev->dev);
- err1:
- spi_master_put(master);
-@@ -850,6 +1181,9 @@ static int sh_msiof_spi_probe(struct platform_device *pdev)
-
- static int sh_msiof_spi_remove(struct platform_device *pdev)
- {
-+ struct sh_msiof_spi_priv *p = platform_get_drvdata(pdev);
-+
-+ sh_msiof_release_dma(p);
- pm_runtime_disable(&pdev->dev);
- return 0;
- }
-diff --git a/include/linux/spi/sh_msiof.h b/include/linux/spi/sh_msiof.h
-index 2e8db3d2d2e5..88a14d81c49e 100644
---- a/include/linux/spi/sh_msiof.h
-+++ b/include/linux/spi/sh_msiof.h
-@@ -5,6 +5,8 @@ struct sh_msiof_spi_info {
- int tx_fifo_override;
- int rx_fifo_override;
- u16 num_chipselect;
-+ unsigned int dma_tx_id;
-+ unsigned int dma_rx_id;
- };
-
- #endif /* __SPI_SH_MSIOF_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0751-spi-sh-msiof-Handle-dmaengine_prep_slave_single-fail.patch b/patches.renesas/0751-spi-sh-msiof-Handle-dmaengine_prep_slave_single-fail.patch
deleted file mode 100644
index 5ccde6ad05e5c..0000000000000
--- a/patches.renesas/0751-spi-sh-msiof-Handle-dmaengine_prep_slave_single-fail.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From aeeaa360e45f79dae3fae23a24b9ea3d3b4d7aa7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 9 Jul 2014 12:26:23 +0200
-Subject: spi: sh-msiof: Handle dmaengine_prep_slave_single() failures
- gracefully
-
-As typically a shmobile SoC has less DMA channels than devices that can use
-DMA, we may want to prioritize access to the DMA channels in the future.
-This means that dmaengine_prep_slave_single() may start failing
-arbitrarily.
-
-Handle dmaengine_prep_slave_single() failures gracefully by falling back to
-PIO. This requires moving DMA-specific configuration of the MSIOF device
-after the call(s) to dmaengine_prep_slave_single().
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 279d2378c9c4f05bbe41b55625b4003871026266)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 23 +++++++++++++++--------
- 1 file changed, 15 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 9922ed3a4441..373de70baf08 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -636,12 +636,6 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- dma_cookie_t cookie;
- int ret;
-
-- /* 1 stage FIFO watermarks for DMA */
-- sh_msiof_write(p, FCTR, FCTR_TFWM_1 | FCTR_RFWM_1);
--
-- /* setup msiof transfer mode registers (32-bit words) */
-- sh_msiof_spi_set_mode_regs(p, tx, rx, 32, len / 4);
--
- if (tx) {
- ier_bits |= IER_TDREQE | IER_TDMAE;
- dma_sync_single_for_device(&p->pdev->dev, p->tx_dma_addr, len,
-@@ -650,7 +644,7 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- p->tx_dma_addr, len, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc_tx)
-- return -EIO;
-+ return -EAGAIN;
- }
-
- if (rx) {
-@@ -659,8 +653,15 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- p->rx_dma_addr, len, DMA_FROM_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc_rx)
-- return -EIO;
-+ return -EAGAIN;
- }
-+
-+ /* 1 stage FIFO watermarks for DMA */
-+ sh_msiof_write(p, FCTR, FCTR_TFWM_1 | FCTR_RFWM_1);
-+
-+ /* setup msiof transfer mode registers (32-bit words) */
-+ sh_msiof_spi_set_mode_regs(p, tx, rx, 32, len / 4);
-+
- sh_msiof_write(p, IER, ier_bits);
-
- reinit_completion(&p->done);
-@@ -822,6 +823,12 @@ static int sh_msiof_transfer_one(struct spi_master *master,
- copy32(p->tx_dma_page, tx_buf, l / 4);
-
- ret = sh_msiof_dma_once(p, tx_buf, rx_buf, l);
-+ if (ret == -EAGAIN) {
-+ pr_warn_once("%s %s: DMA not available, falling back to PIO\n",
-+ dev_driver_string(&p->pdev->dev),
-+ dev_name(&p->pdev->dev));
-+ break;
-+ }
- if (ret)
- return ret;
-
---
-2.1.2
-
diff --git a/patches.renesas/0752-spi-sh-msiof-Use-correct-device-for-DMA-mapping-with.patch b/patches.renesas/0752-spi-sh-msiof-Use-correct-device-for-DMA-mapping-with.patch
deleted file mode 100644
index 57b24b847cabb..0000000000000
--- a/patches.renesas/0752-spi-sh-msiof-Use-correct-device-for-DMA-mapping-with.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From b1f44af2ea1ec518755b47779bf3bec50e75ff1e Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 11 Jul 2014 17:56:22 +0200
-Subject: spi: sh-msiof: Use correct device for DMA mapping with IOMMU
-
-To function correctly in the presence of an IOMMU, the DMA buffers must be
-mapped using the DMA channel's device instead of the MSIOF platform
-device's device.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 5dabcf2f27ded864cf79204c4a3cca1516b66026)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 26 ++++++++++++++++----------
- 1 file changed, 16 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 373de70baf08..2a4354dcd661 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -638,8 +638,8 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
-
- if (tx) {
- ier_bits |= IER_TDREQE | IER_TDMAE;
-- dma_sync_single_for_device(&p->pdev->dev, p->tx_dma_addr, len,
-- DMA_TO_DEVICE);
-+ dma_sync_single_for_device(p->master->dma_tx->device->dev,
-+ p->tx_dma_addr, len, DMA_TO_DEVICE);
- desc_tx = dmaengine_prep_slave_single(p->master->dma_tx,
- p->tx_dma_addr, len, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-@@ -717,7 +717,8 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- }
-
- if (rx)
-- dma_sync_single_for_cpu(&p->pdev->dev, p->rx_dma_addr, len,
-+ dma_sync_single_for_cpu(p->master->dma_rx->device->dev,
-+ p->rx_dma_addr, len,
- DMA_FROM_DEVICE);
-
- return 0;
-@@ -1003,6 +1004,7 @@ static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
- const struct sh_msiof_spi_info *info = dev_get_platdata(dev);
- const struct resource *res;
- struct spi_master *master;
-+ struct device *tx_dev, *rx_dev;
-
- if (!info || !info->dma_tx_id || !info->dma_rx_id)
- return 0; /* The driver assumes no error */
-@@ -1033,21 +1035,23 @@ static int sh_msiof_request_dma(struct sh_msiof_spi_priv *p)
- if (!p->rx_dma_page)
- goto free_tx_page;
-
-- p->tx_dma_addr = dma_map_single(dev, p->tx_dma_page, PAGE_SIZE,
-+ tx_dev = master->dma_tx->device->dev;
-+ p->tx_dma_addr = dma_map_single(tx_dev, p->tx_dma_page, PAGE_SIZE,
- DMA_TO_DEVICE);
-- if (dma_mapping_error(dev, p->tx_dma_addr))
-+ if (dma_mapping_error(tx_dev, p->tx_dma_addr))
- goto free_rx_page;
-
-- p->rx_dma_addr = dma_map_single(dev, p->rx_dma_page, PAGE_SIZE,
-+ rx_dev = master->dma_rx->device->dev;
-+ p->rx_dma_addr = dma_map_single(rx_dev, p->rx_dma_page, PAGE_SIZE,
- DMA_FROM_DEVICE);
-- if (dma_mapping_error(dev, p->rx_dma_addr))
-+ if (dma_mapping_error(rx_dev, p->rx_dma_addr))
- goto unmap_tx_page;
-
- dev_info(dev, "DMA available");
- return 0;
-
- unmap_tx_page:
-- dma_unmap_single(dev, p->tx_dma_addr, PAGE_SIZE, DMA_TO_DEVICE);
-+ dma_unmap_single(tx_dev, p->tx_dma_addr, PAGE_SIZE, DMA_TO_DEVICE);
- free_rx_page:
- free_page((unsigned long)p->rx_dma_page);
- free_tx_page:
-@@ -1069,8 +1073,10 @@ static void sh_msiof_release_dma(struct sh_msiof_spi_priv *p)
- return;
-
- dev = &p->pdev->dev;
-- dma_unmap_single(dev, p->rx_dma_addr, PAGE_SIZE, DMA_FROM_DEVICE);
-- dma_unmap_single(dev, p->tx_dma_addr, PAGE_SIZE, DMA_TO_DEVICE);
-+ dma_unmap_single(master->dma_rx->device->dev, p->rx_dma_addr,
-+ PAGE_SIZE, DMA_FROM_DEVICE);
-+ dma_unmap_single(master->dma_tx->device->dev, p->tx_dma_addr,
-+ PAGE_SIZE, DMA_TO_DEVICE);
- free_page((unsigned long)p->rx_dma_page);
- free_page((unsigned long)p->tx_dma_page);
- dma_release_channel(master->dma_rx);
---
-2.1.2
-
diff --git a/patches.renesas/0753-spi-sh-msiof-Fix-leaking-of-unused-DMA-descriptors.patch b/patches.renesas/0753-spi-sh-msiof-Fix-leaking-of-unused-DMA-descriptors.patch
deleted file mode 100644
index 13418fd0ea850..0000000000000
--- a/patches.renesas/0753-spi-sh-msiof-Fix-leaking-of-unused-DMA-descriptors.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From 140f76322323532c845ce383a60918cf1808e05a Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 6 Aug 2014 14:59:03 +0200
-Subject: spi: sh-msiof: Fix leaking of unused DMA descriptors
-
-If dmaengine_prep_slave_sg() or dmaengine_submit() fail, we may leak
-unused DMA descriptors.
-
-As per Documentation/dmaengine.txt, once a DMA descriptor has been
-obtained, it must be submitted. Hence:
- - First prepare and submit all DMA descriptors,
- - Prepare the SPI controller for DMA,
- - Start DMA by calling dma_async_issue_pending(),
- - Make sure to call dmaengine_terminate_all() on all descriptors that
- haven't completed.
-
-Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 3e81b59208fa4697c6c3b6eefb92892b47f8b1e7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 71 +++++++++++++++++++++++++---------------------
- 1 file changed, 38 insertions(+), 33 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 2a4354dcd661..887c2084130f 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -636,48 +636,38 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- dma_cookie_t cookie;
- int ret;
-
-- if (tx) {
-- ier_bits |= IER_TDREQE | IER_TDMAE;
-- dma_sync_single_for_device(p->master->dma_tx->device->dev,
-- p->tx_dma_addr, len, DMA_TO_DEVICE);
-- desc_tx = dmaengine_prep_slave_single(p->master->dma_tx,
-- p->tx_dma_addr, len, DMA_TO_DEVICE,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_tx)
-- return -EAGAIN;
-- }
--
-+ /* First prepare and submit the DMA request(s), as this may fail */
- if (rx) {
- ier_bits |= IER_RDREQE | IER_RDMAE;
- desc_rx = dmaengine_prep_slave_single(p->master->dma_rx,
- p->rx_dma_addr, len, DMA_FROM_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_rx)
-- return -EAGAIN;
-- }
--
-- /* 1 stage FIFO watermarks for DMA */
-- sh_msiof_write(p, FCTR, FCTR_TFWM_1 | FCTR_RFWM_1);
--
-- /* setup msiof transfer mode registers (32-bit words) */
-- sh_msiof_spi_set_mode_regs(p, tx, rx, 32, len / 4);
--
-- sh_msiof_write(p, IER, ier_bits);
--
-- reinit_completion(&p->done);
-+ if (!desc_rx) {
-+ ret = -EAGAIN;
-+ goto no_dma_rx;
-+ }
-
-- if (rx) {
- desc_rx->callback = sh_msiof_dma_complete;
- desc_rx->callback_param = p;
- cookie = dmaengine_submit(desc_rx);
- if (dma_submit_error(cookie)) {
- ret = cookie;
-- goto stop_ier;
-+ goto no_dma_rx;
- }
-- dma_async_issue_pending(p->master->dma_rx);
- }
-
- if (tx) {
-+ ier_bits |= IER_TDREQE | IER_TDMAE;
-+ dma_sync_single_for_device(p->master->dma_tx->device->dev,
-+ p->tx_dma_addr, len, DMA_TO_DEVICE);
-+ desc_tx = dmaengine_prep_slave_single(p->master->dma_tx,
-+ p->tx_dma_addr, len, DMA_TO_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_tx) {
-+ ret = -EAGAIN;
-+ goto no_dma_tx;
-+ }
-+
- if (rx) {
- /* No callback */
- desc_tx->callback = NULL;
-@@ -688,15 +678,30 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- cookie = dmaengine_submit(desc_tx);
- if (dma_submit_error(cookie)) {
- ret = cookie;
-- goto stop_rx;
-+ goto no_dma_tx;
- }
-- dma_async_issue_pending(p->master->dma_tx);
- }
-
-+ /* 1 stage FIFO watermarks for DMA */
-+ sh_msiof_write(p, FCTR, FCTR_TFWM_1 | FCTR_RFWM_1);
-+
-+ /* setup msiof transfer mode registers (32-bit words) */
-+ sh_msiof_spi_set_mode_regs(p, tx, rx, 32, len / 4);
-+
-+ sh_msiof_write(p, IER, ier_bits);
-+
-+ reinit_completion(&p->done);
-+
-+ /* Now start DMA */
-+ if (tx)
-+ dma_async_issue_pending(p->master->dma_rx);
-+ if (rx)
-+ dma_async_issue_pending(p->master->dma_tx);
-+
- ret = sh_msiof_spi_start(p, rx);
- if (ret) {
- dev_err(&p->pdev->dev, "failed to start hardware\n");
-- goto stop_tx;
-+ goto stop_dma;
- }
-
- /* wait for tx fifo to be emptied / rx fifo to be filled */
-@@ -726,14 +731,14 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- stop_reset:
- sh_msiof_reset_str(p);
- sh_msiof_spi_stop(p, rx);
--stop_tx:
-+stop_dma:
- if (tx)
- dmaengine_terminate_all(p->master->dma_tx);
--stop_rx:
-+no_dma_tx:
- if (rx)
- dmaengine_terminate_all(p->master->dma_rx);
--stop_ier:
- sh_msiof_write(p, IER, 0);
-+no_dma_rx:
- return ret;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0754-spi-sh-msiof-Fix-transmit-only-DMA-transfers.patch b/patches.renesas/0754-spi-sh-msiof-Fix-transmit-only-DMA-transfers.patch
deleted file mode 100644
index f9f5d090270e5..0000000000000
--- a/patches.renesas/0754-spi-sh-msiof-Fix-transmit-only-DMA-transfers.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 33fdf90712aaa97c3f4c8da9b4363da8ef64d4a7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 7 Aug 2014 14:07:43 +0200
-Subject: spi: sh-msiof: Fix transmit-only DMA transfers
-
-Fix tx/rx mixup, which broke transmit-only transfers.
-
-Introduced by commit 4240305f7cbdc7782aa8bc40cc702775d9ac0839
-("spi: sh-msiof: Fix leaking of unused DMA descriptors").
-
-Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit cdcd565fa0925edf9b80c875fcc84a231c75bd1d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-sh-msiof.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/spi/spi-sh-msiof.c b/drivers/spi/spi-sh-msiof.c
-index 887c2084130f..543075b80f16 100644
---- a/drivers/spi/spi-sh-msiof.c
-+++ b/drivers/spi/spi-sh-msiof.c
-@@ -693,9 +693,9 @@ static int sh_msiof_dma_once(struct sh_msiof_spi_priv *p, const void *tx,
- reinit_completion(&p->done);
-
- /* Now start DMA */
-- if (tx)
-- dma_async_issue_pending(p->master->dma_rx);
- if (rx)
-+ dma_async_issue_pending(p->master->dma_rx);
-+ if (tx)
- dma_async_issue_pending(p->master->dma_tx);
-
- ret = sh_msiof_spi_start(p, rx);
---
-2.1.2
-
diff --git a/patches.renesas/0755-mmc-tmio-Configure-DMA-slave-bus-width.patch b/patches.renesas/0755-mmc-tmio-Configure-DMA-slave-bus-width.patch
deleted file mode 100644
index 0ec4780ce155b..0000000000000
--- a/patches.renesas/0755-mmc-tmio-Configure-DMA-slave-bus-width.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From d7006a1ea766a4189721fc58a843d0c56dd136b9 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 16 Jul 2014 00:45:14 +0200
-Subject: mmc: tmio: Configure DMA slave bus width
-
-Even though some implementations support 4-bytes data register access,
-the tmio driver never configures the hardware in such a way and always
-performs 2-bytes accesses. Hardcode the DMA transfer size to 2 bytes.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit 39ab196243e8732ad68928be97129305b29afbbd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/tmio_mmc_dma.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/drivers/mmc/host/tmio_mmc_dma.c b/drivers/mmc/host/tmio_mmc_dma.c
-index 03e7b280cb4c..eb8f1d5c34b1 100644
---- a/drivers/mmc/host/tmio_mmc_dma.c
-+++ b/drivers/mmc/host/tmio_mmc_dma.c
-@@ -294,6 +294,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
- cfg.slave_id = pdata->dma->slave_id_tx;
- cfg.direction = DMA_MEM_TO_DEV;
- cfg.dst_addr = res->start + (CTL_SD_DATA_PORT << host->pdata->bus_shift);
-+ cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
- cfg.src_addr = 0;
- ret = dmaengine_slave_config(host->chan_tx, &cfg);
- if (ret < 0)
-@@ -312,6 +313,7 @@ void tmio_mmc_request_dma(struct tmio_mmc_host *host, struct tmio_mmc_data *pdat
- cfg.slave_id = pdata->dma->slave_id_rx;
- cfg.direction = DMA_DEV_TO_MEM;
- cfg.src_addr = cfg.dst_addr;
-+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_2_BYTES;
- cfg.dst_addr = 0;
- ret = dmaengine_slave_config(host->chan_rx, &cfg);
- if (ret < 0)
---
-2.1.2
-
diff --git a/patches.renesas/0756-mmc-sh_mmcif-Fix-DMA-slave-address-configuration.patch b/patches.renesas/0756-mmc-sh_mmcif-Fix-DMA-slave-address-configuration.patch
deleted file mode 100644
index bdcdda1a50f37..0000000000000
--- a/patches.renesas/0756-mmc-sh_mmcif-Fix-DMA-slave-address-configuration.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 382eec9e2a05a2b00c8845e258bb553ddcac80d9 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 16 Jul 2014 00:45:12 +0200
-Subject: mmc: sh_mmcif: Fix DMA slave address configuration
-
-Commit e5a233cb647d749de2f188477c9a54b94d90477f ("mmc: sh_mmcif:
-Factorize DMA channel request and configuration code") incorrectly
-set the destination address for both slave channels instead of setting
-the source address for the receive channel. Fix that.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit d25006e7e5045e76575e9f58903efc1a860a3ff1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index 0289b4ecccb3..863d21ee4a2f 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -386,7 +386,7 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
- struct sh_mmcif_plat_data *pdata,
- enum dma_transfer_direction direction)
- {
-- struct dma_slave_config cfg;
-+ struct dma_slave_config cfg = { 0, };
- struct dma_chan *chan;
- unsigned int slave_id;
- struct resource *res;
-@@ -417,8 +417,12 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
- /* In the OF case the driver will get the slave ID from the DT */
- cfg.slave_id = slave_id;
- cfg.direction = direction;
-- cfg.dst_addr = res->start + MMCIF_CE_DATA;
-- cfg.src_addr = 0;
-+
-+ if (direction == DMA_DEV_TO_MEM)
-+ cfg.src_addr = res->start + MMCIF_CE_DATA;
-+ else
-+ cfg.dst_addr = res->start + MMCIF_CE_DATA;
-+
- ret = dmaengine_slave_config(chan, &cfg);
- if (ret < 0) {
- dma_release_channel(chan);
---
-2.1.2
-
diff --git a/patches.renesas/0757-mmc-sh_mmcif-Configure-DMA-slave-bus-width.patch b/patches.renesas/0757-mmc-sh_mmcif-Configure-DMA-slave-bus-width.patch
deleted file mode 100644
index 06d36968e821c..0000000000000
--- a/patches.renesas/0757-mmc-sh_mmcif-Configure-DMA-slave-bus-width.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From d7f83c97441a1475d7f9ea42e347b74cc888e857 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 16 Jul 2014 00:45:13 +0200
-Subject: mmc: sh_mmcif: Configure DMA slave bus width
-
-The data register is 4 bytes wide, hardcode the DMA transfer size to
-4 bytes in both directions.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
-(cherry picked from commit e36152aa84cf68bd7f09acffd480cd2b6aa5480d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/mmc/host/sh_mmcif.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/mmc/host/sh_mmcif.c b/drivers/mmc/host/sh_mmcif.c
-index 863d21ee4a2f..d11708c815d7 100644
---- a/drivers/mmc/host/sh_mmcif.c
-+++ b/drivers/mmc/host/sh_mmcif.c
-@@ -418,10 +418,13 @@ sh_mmcif_request_dma_one(struct sh_mmcif_host *host,
- cfg.slave_id = slave_id;
- cfg.direction = direction;
-
-- if (direction == DMA_DEV_TO_MEM)
-+ if (direction == DMA_DEV_TO_MEM) {
- cfg.src_addr = res->start + MMCIF_CE_DATA;
-- else
-+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+ } else {
- cfg.dst_addr = res->start + MMCIF_CE_DATA;
-+ cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+ }
-
- ret = dmaengine_slave_config(chan, &cfg);
- if (ret < 0) {
---
-2.1.2
-
diff --git a/patches.renesas/0758-net-sh_eth-Add-r8a7794-support.patch b/patches.renesas/0758-net-sh_eth-Add-r8a7794-support.patch
deleted file mode 100644
index b346e55add8db..0000000000000
--- a/patches.renesas/0758-net-sh_eth-Add-r8a7794-support.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From b6847f4fc981b68b3ab2d39f5b5a8b4146ce2dfe Mon Sep 17 00:00:00 2001
-From: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
-Date: Fri, 1 Aug 2014 17:03:00 +0200
-Subject: net: sh_eth: Add r8a7794 support
-
-Signed-off-by: Hisashi Nakamura <hisashi.nakamura.ak@renesas.com>
-[uli: added bindings documentation]
-Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-
-(cherry picked from commit 0f76b9d83b2b010b63a094024b3cfd82e20af28d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/net/sh_eth.txt | 1 +
- drivers/net/ethernet/renesas/sh_eth.c | 2 ++
- 2 files changed, 3 insertions(+)
-
-diff --git a/Documentation/devicetree/bindings/net/sh_eth.txt b/Documentation/devicetree/bindings/net/sh_eth.txt
-index e7106b50dbdc..34d4db1a4e25 100644
---- a/Documentation/devicetree/bindings/net/sh_eth.txt
-+++ b/Documentation/devicetree/bindings/net/sh_eth.txt
-@@ -9,6 +9,7 @@ Required properties:
- "renesas,ether-r8a7779" if the device is a part of R8A7779 SoC.
- "renesas,ether-r8a7790" if the device is a part of R8A7790 SoC.
- "renesas,ether-r8a7791" if the device is a part of R8A7791 SoC.
-+ "renesas,ether-r8a7794" if the device is a part of R8A7794 SoC.
- "renesas,ether-r7s72100" if the device is a part of R7S72100 SoC.
- - reg: offset and length of (1) the E-DMAC/feLic register block (required),
- (2) the TSU register block (optional).
-diff --git a/drivers/net/ethernet/renesas/sh_eth.c b/drivers/net/ethernet/renesas/sh_eth.c
-index 26936b91f63f..177d263a1dc4 100644
---- a/drivers/net/ethernet/renesas/sh_eth.c
-+++ b/drivers/net/ethernet/renesas/sh_eth.c
-@@ -2746,6 +2746,7 @@ static const struct of_device_id sh_eth_match_table[] = {
- { .compatible = "renesas,ether-r8a7779", .data = &r8a777x_data },
- { .compatible = "renesas,ether-r8a7790", .data = &r8a779x_data },
- { .compatible = "renesas,ether-r8a7791", .data = &r8a779x_data },
-+ { .compatible = "renesas,ether-r8a7794", .data = &r8a779x_data },
- { .compatible = "renesas,ether-r7s72100", .data = &r7s72100_data },
- { }
- };
-@@ -2972,6 +2973,7 @@ static struct platform_device_id sh_eth_id_table[] = {
- { "r8a777x-ether", (kernel_ulong_t)&r8a777x_data },
- { "r8a7790-ether", (kernel_ulong_t)&r8a779x_data },
- { "r8a7791-ether", (kernel_ulong_t)&r8a779x_data },
-+ { "r8a7794-ether", (kernel_ulong_t)&r8a779x_data },
- { }
- };
- MODULE_DEVICE_TABLE(platform, sh_eth_id_table);
---
-2.1.2
-
diff --git a/patches.renesas/0759-sh-intc-Confine-SH_INTC-to-platforms-that-need-it.patch b/patches.renesas/0759-sh-intc-Confine-SH_INTC-to-platforms-that-need-it.patch
deleted file mode 100644
index ea810ad693207..0000000000000
--- a/patches.renesas/0759-sh-intc-Confine-SH_INTC-to-platforms-that-need-it.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From 77b0acecda2f53a09306d0bb546f4400b1dd4d08 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 20 Aug 2014 15:39:22 +0200
-Subject: sh: intc: Confine SH_INTC to platforms that need it
-
-Currently the sh-intc driver is compiled on all SuperH and
-non-multiplatform SH-Mobile platforms, while it's only used on a limited
-number of platforms:
- - SuperH: SH2(A), SH3(A), SH4(A)(L) (all but SH5)
- - ARM: sh7372, sh73a0
-
-Drop the "default y" on SH_INTC, make all CPU platforms that use it
-select it, and protect all sub-options by "if SH_INTC" to fix this.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 049d28048be595e0a10a58fe1c104b153c386633)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/mach-shmobile/Kconfig
- arch/sh/Kconfig
----
- arch/arm/mach-shmobile/Kconfig | 2 ++
- arch/sh/Kconfig | 3 +++
- drivers/sh/Makefile | 3 +--
- drivers/sh/intc/Kconfig | 6 +++++-
- 4 files changed, 11 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 54c9210461c7..0548968e21a8 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -64,6 +64,7 @@ config ARCH_SH7372
- select ARM_CPU_SUSPEND if PM || CPU_IDLE
- select CPU_V7
- select SH_CLK_CPG
-+ select SH_INTC
- select SYS_SUPPORTS_SH_CMT
- select SYS_SUPPORTS_SH_TMU
-
-@@ -74,6 +75,7 @@ config ARCH_SH73A0
- select CPU_V7
- select I2C
- select SH_CLK_CPG
-+ select SH_INTC
- select RENESAS_INTC_IRQPIN
- select SYS_SUPPORTS_SH_CMT
- select SYS_SUPPORTS_SH_TMU
-diff --git a/arch/sh/Kconfig b/arch/sh/Kconfig
-index b2cdb203e843..8356f395a10a 100644
---- a/arch/sh/Kconfig
-+++ b/arch/sh/Kconfig
-@@ -181,6 +181,7 @@ menu "System type"
- #
- config CPU_SH2
- bool
-+ select SH_INTC
-
- config CPU_SH2A
- bool
-@@ -191,6 +192,7 @@ config CPU_SH3
- bool
- select CPU_HAS_INTEVT
- select CPU_HAS_SR_RB
-+ select SH_INTC
- select SYS_SUPPORTS_TMU
-
- config CPU_SH4
-@@ -198,6 +200,7 @@ config CPU_SH4
- select CPU_HAS_INTEVT
- select CPU_HAS_SR_RB
- select CPU_HAS_FPU if !CPU_SH4AL_DSP
-+ select SH_INTC
- select SYS_SUPPORTS_TMU
- select SYS_SUPPORTS_HUGETLBFS if MMU
-
-diff --git a/drivers/sh/Makefile b/drivers/sh/Makefile
-index 788ed9b59b4e..114203f32843 100644
---- a/drivers/sh/Makefile
-+++ b/drivers/sh/Makefile
-@@ -1,8 +1,7 @@
- #
- # Makefile for the SuperH specific drivers.
- #
--obj-$(CONFIG_SUPERH) += intc/
--obj-$(CONFIG_ARCH_SHMOBILE_LEGACY) += intc/
-+obj-$(CONFIG_SH_INTC) += intc/
- ifneq ($(CONFIG_COMMON_CLK),y)
- obj-$(CONFIG_HAVE_CLK) += clk/
- endif
-diff --git a/drivers/sh/intc/Kconfig b/drivers/sh/intc/Kconfig
-index 60228fae943f..6a1b05ddc8c9 100644
---- a/drivers/sh/intc/Kconfig
-+++ b/drivers/sh/intc/Kconfig
-@@ -1,7 +1,9 @@
- config SH_INTC
-- def_bool y
-+ bool
- select IRQ_DOMAIN
-
-+if SH_INTC
-+
- comment "Interrupt controller options"
-
- config INTC_USERIMASK
-@@ -37,3 +39,5 @@ config INTC_MAPPING_DEBUG
- between system IRQs and the per-controller id tables.
-
- If in doubt, say N.
-+
-+endif
---
-2.1.2
-
diff --git a/patches.renesas/0760-spi-rspi-Handle-dmaengine_prep_slave_sg-failures-gra.patch b/patches.renesas/0760-spi-rspi-Handle-dmaengine_prep_slave_sg-failures-gra.patch
deleted file mode 100644
index 57eef8c4a3a5e..0000000000000
--- a/patches.renesas/0760-spi-rspi-Handle-dmaengine_prep_slave_sg-failures-gra.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 8efccf0ca3ccebdcea5e33bafd88ab1bdbea45f2 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 9 Jul 2014 12:26:22 +0200
-Subject: spi: rspi: Handle dmaengine_prep_slave_sg() failures gracefully
-
-As typically a shmobile SoC has less DMA channels than devices that can use
-DMA, we may want to prioritize access to the DMA channels in the future.
-This means that dmaengine_prep_slave_sg() may start failing arbitrarily.
-
-Handle dmaengine_prep_slave_sg() failures gracefully by falling back to
-PIO.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 85912a88c1ebcad04a5cfec971771195ce8d6691)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 30 ++++++++++++++++++++++--------
- 1 file changed, 22 insertions(+), 8 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index 38fd938d6360..c850dfdfa9e3 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -477,7 +477,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
- tx->sgl, tx->nents, DMA_TO_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc_tx)
-- return -EIO;
-+ goto no_dma;
-
- irq_mask |= SPCR_SPTIE;
- }
-@@ -486,7 +486,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
- rx->sgl, rx->nents, DMA_FROM_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc_rx)
-- return -EIO;
-+ goto no_dma;
-
- irq_mask |= SPCR_SPRIE;
- }
-@@ -540,6 +540,12 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
- enable_irq(rspi->rx_irq);
-
- return ret;
-+
-+no_dma:
-+ pr_warn_once("%s %s: DMA not available, falling back to PIO\n",
-+ dev_driver_string(&rspi->master->dev),
-+ dev_name(&rspi->master->dev));
-+ return -EAGAIN;
- }
-
- static void rspi_receive_init(const struct rspi_data *rspi)
-@@ -593,8 +599,10 @@ static int rspi_common_transfer(struct rspi_data *rspi,
-
- if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer)) {
- /* rx_buf can be NULL on RSPI on SH in TX-only Mode */
-- return rspi_dma_transfer(rspi, &xfer->tx_sg,
-- xfer->rx_buf ? &xfer->rx_sg : NULL);
-+ ret = rspi_dma_transfer(rspi, &xfer->tx_sg,
-+ xfer->rx_buf ? &xfer->rx_sg : NULL);
-+ if (ret != -EAGAIN)
-+ return ret;
- }
-
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, xfer->rx_buf, xfer->len);
-@@ -648,8 +656,11 @@ static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
- {
- int ret;
-
-- if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer))
-- return rspi_dma_transfer(rspi, &xfer->tx_sg, NULL);
-+ if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer)) {
-+ ret = rspi_dma_transfer(rspi, &xfer->tx_sg, NULL);
-+ if (ret != -EAGAIN)
-+ return ret;
-+ }
-
- ret = rspi_pio_transfer(rspi, xfer->tx_buf, NULL, xfer->len);
- if (ret < 0)
-@@ -663,8 +674,11 @@ static int qspi_transfer_out(struct rspi_data *rspi, struct spi_transfer *xfer)
-
- static int qspi_transfer_in(struct rspi_data *rspi, struct spi_transfer *xfer)
- {
-- if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer))
-- return rspi_dma_transfer(rspi, NULL, &xfer->rx_sg);
-+ if (rspi->master->can_dma && __rspi_can_dma(rspi, xfer)) {
-+ int ret = rspi_dma_transfer(rspi, NULL, &xfer->rx_sg);
-+ if (ret != -EAGAIN)
-+ return ret;
-+ }
-
- return rspi_pio_transfer(rspi, NULL, xfer->rx_buf, xfer->len);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0761-spi-rspi-Fix-leaking-of-unused-DMA-descriptors.patch b/patches.renesas/0761-spi-rspi-Fix-leaking-of-unused-DMA-descriptors.patch
deleted file mode 100644
index 12b1b9b8705c1..0000000000000
--- a/patches.renesas/0761-spi-rspi-Fix-leaking-of-unused-DMA-descriptors.patch
+++ /dev/null
@@ -1,163 +0,0 @@
-From e5e819f67b1b345456e5849653fc71f8c0d1142c Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 6 Aug 2014 14:58:58 +0200
-Subject: spi: rspi: Fix leaking of unused DMA descriptors
-
-If dmaengine_prep_slave_sg() or dmaengine_submit() fail, we may leak
-unused DMA descriptors.
-
-As per Documentation/dmaengine.txt, once a DMA descriptor has been
-obtained, it must be submitted. Hence:
- - First prepare and submit all DMA descriptors,
- - Prepare the SPI controller for DMA,
- - Start DMA by calling dma_async_issue_pending(),
- - Make sure to call dmaengine_terminate_all() on all descriptors that
- haven't completed.
-
-Reported-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 3819bc8752367eae0d72fa1c473dc88ea45631a7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/spi/spi-rspi.c | 94 +++++++++++++++++++++++++++++++-------------------
- 1 file changed, 58 insertions(+), 36 deletions(-)
-
-diff --git a/drivers/spi/spi-rspi.c b/drivers/spi/spi-rspi.c
-index c850dfdfa9e3..ad87a98f8f68 100644
---- a/drivers/spi/spi-rspi.c
-+++ b/drivers/spi/spi-rspi.c
-@@ -472,25 +472,52 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
- dma_cookie_t cookie;
- int ret;
-
-- if (tx) {
-- desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx,
-- tx->sgl, tx->nents, DMA_TO_DEVICE,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_tx)
-- goto no_dma;
--
-- irq_mask |= SPCR_SPTIE;
-- }
-+ /* First prepare and submit the DMA request(s), as this may fail */
- if (rx) {
- desc_rx = dmaengine_prep_slave_sg(rspi->master->dma_rx,
- rx->sgl, rx->nents, DMA_FROM_DEVICE,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc_rx)
-- goto no_dma;
-+ if (!desc_rx) {
-+ ret = -EAGAIN;
-+ goto no_dma_rx;
-+ }
-+
-+ desc_rx->callback = rspi_dma_complete;
-+ desc_rx->callback_param = rspi;
-+ cookie = dmaengine_submit(desc_rx);
-+ if (dma_submit_error(cookie)) {
-+ ret = cookie;
-+ goto no_dma_rx;
-+ }
-
- irq_mask |= SPCR_SPRIE;
- }
-
-+ if (tx) {
-+ desc_tx = dmaengine_prep_slave_sg(rspi->master->dma_tx,
-+ tx->sgl, tx->nents, DMA_TO_DEVICE,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-+ if (!desc_tx) {
-+ ret = -EAGAIN;
-+ goto no_dma_tx;
-+ }
-+
-+ if (rx) {
-+ /* No callback */
-+ desc_tx->callback = NULL;
-+ } else {
-+ desc_tx->callback = rspi_dma_complete;
-+ desc_tx->callback_param = rspi;
-+ }
-+ cookie = dmaengine_submit(desc_tx);
-+ if (dma_submit_error(cookie)) {
-+ ret = cookie;
-+ goto no_dma_tx;
-+ }
-+
-+ irq_mask |= SPCR_SPTIE;
-+ }
-+
- /*
- * DMAC needs SPxIE, but if SPxIE is set, the IRQ routine will be
- * called. So, this driver disables the IRQ while DMA transfer.
-@@ -503,34 +530,24 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
- rspi_enable_irq(rspi, irq_mask);
- rspi->dma_callbacked = 0;
-
-- if (rx) {
-- desc_rx->callback = rspi_dma_complete;
-- desc_rx->callback_param = rspi;
-- cookie = dmaengine_submit(desc_rx);
-- if (dma_submit_error(cookie))
-- return cookie;
-+ /* Now start DMA */
-+ if (rx)
- dma_async_issue_pending(rspi->master->dma_rx);
-- }
-- if (tx) {
-- if (rx) {
-- /* No callback */
-- desc_tx->callback = NULL;
-- } else {
-- desc_tx->callback = rspi_dma_complete;
-- desc_tx->callback_param = rspi;
-- }
-- cookie = dmaengine_submit(desc_tx);
-- if (dma_submit_error(cookie))
-- return cookie;
-+ if (tx)
- dma_async_issue_pending(rspi->master->dma_tx);
-- }
-
- ret = wait_event_interruptible_timeout(rspi->wait,
- rspi->dma_callbacked, HZ);
- if (ret > 0 && rspi->dma_callbacked)
- ret = 0;
-- else if (!ret)
-+ else if (!ret) {
-+ dev_err(&rspi->master->dev, "DMA timeout\n");
- ret = -ETIMEDOUT;
-+ if (tx)
-+ dmaengine_terminate_all(rspi->master->dma_tx);
-+ if (rx)
-+ dmaengine_terminate_all(rspi->master->dma_rx);
-+ }
-
- rspi_disable_irq(rspi, irq_mask);
-
-@@ -541,11 +558,16 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
-
- return ret;
-
--no_dma:
-- pr_warn_once("%s %s: DMA not available, falling back to PIO\n",
-- dev_driver_string(&rspi->master->dev),
-- dev_name(&rspi->master->dev));
-- return -EAGAIN;
-+no_dma_tx:
-+ if (rx)
-+ dmaengine_terminate_all(rspi->master->dma_rx);
-+no_dma_rx:
-+ if (ret == -EAGAIN) {
-+ pr_warn_once("%s %s: DMA not available, falling back to PIO\n",
-+ dev_driver_string(&rspi->master->dev),
-+ dev_name(&rspi->master->dev));
-+ }
-+ return ret;
- }
-
- static void rspi_receive_init(const struct rspi_data *rspi)
---
-2.1.2
-
diff --git a/patches.renesas/0762-thermal-rcar-Document-SoC-specific-bindings.patch b/patches.renesas/0762-thermal-rcar-Document-SoC-specific-bindings.patch
deleted file mode 100644
index 0a067daa7fc1b..0000000000000
--- a/patches.renesas/0762-thermal-rcar-Document-SoC-specific-bindings.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From 398f3431f4962d409baf9e4c9b63d7650d680df6 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 9 Jul 2014 14:23:35 +0200
-Subject: thermal: rcar: Document SoC-specific bindings
-
-The documentation only mentioned the generic fallback compatible property.
-Add the missing SoC-specific compatible properties, some of which are
-already in use.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: Zhang Rui <rui.zhang@intel.com>
-Cc: Eduardo Valentin <eduardo.valentin@ti.com>
-Cc: linux-pm@vger.kernel.org
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Zhang Rui <rui.zhang@intel.com>
-(cherry picked from commit fa313103c953fd832b7c4e431c74be55c20b1ce1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/thermal/rcar-thermal.txt | 18 ++++++++++++------
- 1 file changed, 12 insertions(+), 6 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
-index 28ef498a66e5..0ef00be44b01 100644
---- a/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
-+++ b/Documentation/devicetree/bindings/thermal/rcar-thermal.txt
-@@ -1,7 +1,13 @@
- * Renesas R-Car Thermal
-
- Required properties:
--- compatible : "renesas,rcar-thermal"
-+- compatible : "renesas,thermal-<soctype>", "renesas,rcar-thermal"
-+ as fallback.
-+ Examples with soctypes are:
-+ - "renesas,thermal-r8a73a4" (R-Mobile AP6)
-+ - "renesas,thermal-r8a7779" (R-Car H1)
-+ - "renesas,thermal-r8a7790" (R-Car H2)
-+ - "renesas,thermal-r8a7791" (R-Car M2)
- - reg : Address range of the thermal registers.
- The 1st reg will be recognized as common register
- if it has "interrupts".
-@@ -12,18 +18,18 @@ Option properties:
-
- Example (non interrupt support):
-
--thermal@e61f0100 {
-- compatible = "renesas,rcar-thermal";
-- reg = <0xe61f0100 0x38>;
-+thermal@ffc48000 {
-+ compatible = "renesas,thermal-r8a7779", "renesas,rcar-thermal";
-+ reg = <0xffc48000 0x38>;
- };
-
- Example (interrupt support):
-
- thermal@e61f0000 {
-- compatible = "renesas,rcar-thermal";
-+ compatible = "renesas,thermal-r8a73a4", "renesas,rcar-thermal";
- reg = <0xe61f0000 0x14
- 0xe61f0100 0x38
- 0xe61f0200 0x38
- 0xe61f0300 0x38>;
-- interrupts = <0 69 4>;
-+ interrupts = <0 69 IRQ_TYPE_LEVEL_HIGH>;
- };
---
-2.1.2
-
diff --git a/patches.renesas/0763-drm-rcar-du-fix-warnings.patch b/patches.renesas/0763-drm-rcar-du-fix-warnings.patch
deleted file mode 100644
index 363e8d016d338..0000000000000
--- a/patches.renesas/0763-drm-rcar-du-fix-warnings.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 1b46ba2882544f4d6747f0d65a4ce4ad6281ba0d Mon Sep 17 00:00:00 2001
-From: Russell King <rmk+kernel@arm.linux.org.uk>
-Date: Sun, 13 Jul 2014 12:18:58 +0100
-Subject: drm: rcar-du: fix warnings
-
-drivers/gpu/drm/rcar-du/rcar_du_drv.c:190:5: warning: "CONFIG_PM_SLEEP" is not defined [-Wundef]
-
-Always use #ifdef with CONFIG symbols, never just bare #if
-
-Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-Signed-off-by: Dave Airlie <airlied@redhat.com>
-(cherry picked from commit 396d7a24a9b3ddbce3335c57a234227eb7762d14)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
-index 792fd1d20e86..fda64b7b73e8 100644
---- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
-+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
-@@ -187,7 +187,7 @@ static struct drm_driver rcar_du_driver = {
- * Power management
- */
-
--#if CONFIG_PM_SLEEP
-+#ifdef CONFIG_PM_SLEEP
- static int rcar_du_pm_suspend(struct device *dev)
- {
- struct rcar_du_device *rcdu = dev_get_drvdata(dev);
---
-2.1.2
-
diff --git a/patches.renesas/0764-drm-rcar-du-Fix-maximum-frame-buffer-pitch-computati.patch b/patches.renesas/0764-drm-rcar-du-Fix-maximum-frame-buffer-pitch-computati.patch
deleted file mode 100644
index ffa6f9c68bd7c..0000000000000
--- a/patches.renesas/0764-drm-rcar-du-Fix-maximum-frame-buffer-pitch-computati.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From b3d4ace2b7a80e7ca463af9af090fe18fde8ab63 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 28 Jul 2014 20:18:36 +0200
-Subject: drm/rcar-du: Fix maximum frame buffer pitch computation
-
-The maximum pitch constraint for the hardware is expressed in pixels.
-Convert it to bytes to validate frame buffer creation, as frame buffer
-pitches are expressed in bytes.
-
-Reported-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Dave Airlie <airlied@redhat.com>
-(cherry picked from commit 8bed5cc765ffdd61b59f8405d38b377f5a7f0920)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/gpu/drm/rcar-du/rcar_du_kms.c | 13 +++++++++++--
- 1 file changed, 11 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
-index a87edfac111f..76026104d000 100644
---- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
-+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
-@@ -135,7 +135,9 @@ rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
- {
- struct rcar_du_device *rcdu = dev->dev_private;
- const struct rcar_du_format_info *format;
-+ unsigned int max_pitch;
- unsigned int align;
-+ unsigned int bpp;
-
- format = rcar_du_format_info(mode_cmd->pixel_format);
- if (format == NULL) {
-@@ -144,13 +146,20 @@ rcar_du_fb_create(struct drm_device *dev, struct drm_file *file_priv,
- return ERR_PTR(-EINVAL);
- }
-
-+ /*
-+ * The pitch and alignment constraints are expressed in pixels on the
-+ * hardware side and in bytes in the DRM API.
-+ */
-+ bpp = format->planes == 2 ? 1 : format->bpp / 8;
-+ max_pitch = 4096 * bpp;
-+
- if (rcar_du_needs(rcdu, RCAR_DU_QUIRK_ALIGN_128B))
- align = 128;
- else
-- align = 16 * format->bpp / 8;
-+ align = 16 * bpp;
-
- if (mode_cmd->pitches[0] & (align - 1) ||
-- mode_cmd->pitches[0] >= 8192) {
-+ mode_cmd->pitches[0] >= max_pitch) {
- dev_dbg(dev->dev, "invalid pitch value %u\n",
- mode_cmd->pitches[0]);
- return ERR_PTR(-EINVAL);
---
-2.1.2
-
diff --git a/patches.renesas/0765-PCI-rcar-Fix-GPL-v2-license-string-typo.patch b/patches.renesas/0765-PCI-rcar-Fix-GPL-v2-license-string-typo.patch
deleted file mode 100644
index 3592a5f12df70..0000000000000
--- a/patches.renesas/0765-PCI-rcar-Fix-GPL-v2-license-string-typo.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From fa37aa5309283a8d67e4a9c30901dae9846a5151 Mon Sep 17 00:00:00 2001
-From: Bjorn Helgaas <bhelgaas@google.com>
-Date: Tue, 15 Jul 2014 15:06:12 -0600
-Subject: PCI: rcar: Fix GPL v2 license string typo
-
-Per license_is_gpl_compatible(), the MODULE_LICENSE() string for GPL v2 is
-"GPL v2", not "GPLv2". Use "GPL v2" so this module doesn't taint the
-kernel.
-
-Based-on-work-by: Thierry Reding <treding@nvidia.com>
-Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
-(cherry picked from commit 68947eb17503ce2009c603d0d0bb9feb139fb8b8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/pci/host/pcie-rcar.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/pci/host/pcie-rcar.c b/drivers/pci/host/pcie-rcar.c
-index efdea0766b64..0a9e8164e32c 100644
---- a/drivers/pci/host/pcie-rcar.c
-+++ b/drivers/pci/host/pcie-rcar.c
-@@ -991,4 +991,4 @@ module_platform_driver(rcar_pcie_driver);
-
- MODULE_AUTHOR("Phil Edworthy <phil.edworthy@renesas.com>");
- MODULE_DESCRIPTION("Renesas R-Car PCIe driver");
--MODULE_LICENSE("GPLv2");
-+MODULE_LICENSE("GPL v2");
---
-2.1.2
-
diff --git a/patches.renesas/0766-i2c-i2c-rcar-Drop-class-based-scanning-to-improve-bo.patch b/patches.renesas/0766-i2c-i2c-rcar-Drop-class-based-scanning-to-improve-bo.patch
deleted file mode 100644
index ad80a2db59617..0000000000000
--- a/patches.renesas/0766-i2c-i2c-rcar-Drop-class-based-scanning-to-improve-bo.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 24b3150981d548717988c8b3d0dda593468f00ca Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa@the-dreams.de>
-Date: Thu, 10 Jul 2014 13:46:31 +0200
-Subject: i2c: i2c-rcar: Drop class based scanning to improve bootup time
-
-This driver has been flagged to drop class based instantiation. The removal
-improves boot-up time and is unneeded for embedded controllers. Users have been
-warned to switch for some time now, so we can actually do the removal. Keep the
-DEPRECATED flag, so the core can inform users that the behaviour finally
-changed now. After another transition period, this flag can go, too.
-While we are here, remove the indentation for the array setup because
-such things always break after some time.
-
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 929e3aba5114235388793443cbc05882904577b9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index 899405923678..f3c7139dfa25 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -541,13 +541,13 @@ static int rcar_i2c_probe(struct platform_device *pdev)
- irq = platform_get_irq(pdev, 0);
- init_waitqueue_head(&priv->wait);
-
-- adap = &priv->adap;
-- adap->nr = pdev->id;
-- adap->algo = &rcar_i2c_algo;
-- adap->class = I2C_CLASS_HWMON | I2C_CLASS_SPD | I2C_CLASS_DEPRECATED;
-- adap->retries = 3;
-- adap->dev.parent = dev;
-- adap->dev.of_node = dev->of_node;
-+ adap = &priv->adap;
-+ adap->nr = pdev->id;
-+ adap->algo = &rcar_i2c_algo;
-+ adap->class = I2C_CLASS_DEPRECATED;
-+ adap->retries = 3;
-+ adap->dev.parent = dev;
-+ adap->dev.of_node = dev->of_node;
- i2c_set_adapdata(adap, priv);
- strlcpy(adap->name, pdev->name, sizeof(adap->name));
-
---
-2.1.2
-
diff --git a/patches.renesas/0767-media-of-move-graph-helpers-from-drivers-media-v4l2-.patch b/patches.renesas/0767-media-of-move-graph-helpers-from-drivers-media-v4l2-.patch
deleted file mode 100644
index e1ed55a83b5b1..0000000000000
--- a/patches.renesas/0767-media-of-move-graph-helpers-from-drivers-media-v4l2-.patch
+++ /dev/null
@@ -1,570 +0,0 @@
-From 62863563dcb0eb491091d7a8aa85d0bc6e8520d7 Mon Sep 17 00:00:00 2001
-From: Philipp Zabel <p.zabel@pengutronix.de>
-Date: Mon, 10 Feb 2014 22:01:48 +0100
-Subject: [media] of: move graph helpers from drivers/media/v4l2-core to
- drivers/of
-
-This patch moves the parsing helpers used to parse connected graphs
-in the device tree, like the video interface bindings documented in
-Documentation/devicetree/bindings/media/video-interfaces.txt, from
-drivers/media/v4l2-core/v4l2-of.c into drivers/of/base.c.
-
-This allows to reuse the same parser code from outside the V4L2
-framework, most importantly from display drivers.
-The functions v4l2_of_get_next_endpoint, v4l2_of_get_remote_port,
-and v4l2_of_get_remote_port_parent are moved. They are renamed to
-of_graph_get_next_endpoint, of_graph_get_remote_port, and
-of_graph_get_remote_port_parent, respectively.
-Since there are not that many current users yet, switch all of
-them to the new functions right away.
-
-Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
-Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-Acked-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
-(cherry picked from commit fd9fdb78a9bf85b94fb2190c82ff280c8f8375cc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/i2c/adv7343.c | 4
- drivers/media/i2c/mt9p031.c | 4
- drivers/media/i2c/s5k5baf.c | 3
- drivers/media/i2c/tvp514x.c | 3
- drivers/media/i2c/tvp7002.c | 3
- drivers/media/platform/exynos4-is/fimc-is.c | 6 -
- drivers/media/platform/exynos4-is/media-dev.c | 3
- drivers/media/platform/exynos4-is/mipi-csis.c | 3
- drivers/media/v4l2-core/v4l2-of.c | 117 -------------------------
- drivers/of/base.c | 118 ++++++++++++++++++++++++++
- include/linux/of_graph.h | 46 ++++++++++
- include/media/v4l2-of.h | 25 -----
- 12 files changed, 182 insertions(+), 153 deletions(-)
- create mode 100644 include/linux/of_graph.h
-
---- a/drivers/media/i2c/adv7343.c
-+++ b/drivers/media/i2c/adv7343.c
-@@ -26,12 +26,12 @@
- #include <linux/videodev2.h>
- #include <linux/uaccess.h>
- #include <linux/of.h>
-+#include <linux/of_graph.h>
-
- #include <media/adv7343.h>
- #include <media/v4l2-async.h>
- #include <media/v4l2-device.h>
- #include <media/v4l2-ctrls.h>
--#include <media/v4l2-of.h>
-
- #include "adv7343_regs.h"
-
-@@ -410,7 +410,7 @@ adv7343_get_pdata(struct i2c_client *cli
- if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
- return client->dev.platform_data;
-
-- np = v4l2_of_get_next_endpoint(client->dev.of_node, NULL);
-+ np = of_graph_get_next_endpoint(client->dev.of_node, NULL);
- if (!np)
- return NULL;
-
---- a/drivers/media/i2c/mt9p031.c
-+++ b/drivers/media/i2c/mt9p031.c
-@@ -21,6 +21,7 @@
- #include <linux/module.h>
- #include <linux/of.h>
- #include <linux/of_gpio.h>
-+#include <linux/of_graph.h>
- #include <linux/pm.h>
- #include <linux/regulator/consumer.h>
- #include <linux/slab.h>
-@@ -29,7 +30,6 @@
- #include <media/mt9p031.h>
- #include <media/v4l2-ctrls.h>
- #include <media/v4l2-device.h>
--#include <media/v4l2-of.h>
- #include <media/v4l2-subdev.h>
-
- #include "aptina-pll.h"
-@@ -943,7 +943,7 @@ mt9p031_get_pdata(struct i2c_client *cli
- if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
- return client->dev.platform_data;
-
-- np = v4l2_of_get_next_endpoint(client->dev.of_node, NULL);
-+ np = of_graph_get_next_endpoint(client->dev.of_node, NULL);
- if (!np)
- return NULL;
-
---- a/drivers/media/i2c/s5k5baf.c
-+++ b/drivers/media/i2c/s5k5baf.c
-@@ -21,6 +21,7 @@
- #include <linux/media.h>
- #include <linux/module.h>
- #include <linux/of_gpio.h>
-+#include <linux/of_graph.h>
- #include <linux/regulator/consumer.h>
- #include <linux/slab.h>
-
-@@ -1855,7 +1856,7 @@ static int s5k5baf_parse_device_node(str
- if (ret < 0)
- return ret;
-
-- node_ep = v4l2_of_get_next_endpoint(node, NULL);
-+ node_ep = of_graph_get_next_endpoint(node, NULL);
- if (!node_ep) {
- dev_err(dev, "no endpoint defined at node %s\n",
- node->full_name);
---- a/drivers/media/i2c/tvp514x.c
-+++ b/drivers/media/i2c/tvp514x.c
-@@ -36,6 +36,7 @@
- #include <linux/module.h>
- #include <linux/v4l2-mediabus.h>
- #include <linux/of.h>
-+#include <linux/of_graph.h>
-
- #include <media/v4l2-async.h>
- #include <media/v4l2-device.h>
-@@ -1068,7 +1069,7 @@ tvp514x_get_pdata(struct i2c_client *cli
- if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
- return client->dev.platform_data;
-
-- endpoint = v4l2_of_get_next_endpoint(client->dev.of_node, NULL);
-+ endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL);
- if (!endpoint)
- return NULL;
-
---- a/drivers/media/i2c/tvp7002.c
-+++ b/drivers/media/i2c/tvp7002.c
-@@ -30,6 +30,7 @@
- #include <linux/videodev2.h>
- #include <linux/module.h>
- #include <linux/of.h>
-+#include <linux/of_graph.h>
- #include <linux/v4l2-dv-timings.h>
- #include <media/tvp7002.h>
- #include <media/v4l2-async.h>
-@@ -957,7 +958,7 @@ tvp7002_get_pdata(struct i2c_client *cli
- if (!IS_ENABLED(CONFIG_OF) || !client->dev.of_node)
- return client->dev.platform_data;
-
-- endpoint = v4l2_of_get_next_endpoint(client->dev.of_node, NULL);
-+ endpoint = of_graph_get_next_endpoint(client->dev.of_node, NULL);
- if (!endpoint)
- return NULL;
-
---- a/drivers/media/platform/exynos4-is/fimc-is.c
-+++ b/drivers/media/platform/exynos4-is/fimc-is.c
-@@ -24,13 +24,13 @@
- #include <linux/i2c.h>
- #include <linux/of_irq.h>
- #include <linux/of_address.h>
-+#include <linux/of_graph.h>
- #include <linux/of_platform.h>
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
- #include <linux/slab.h>
- #include <linux/types.h>
- #include <linux/videodev2.h>
--#include <media/v4l2-of.h>
- #include <media/videobuf2-dma-contig.h>
-
- #include "media-dev.h"
-@@ -167,10 +167,10 @@ static int fimc_is_parse_sensor_config(s
- u32 tmp = 0;
- int ret;
-
-- np = v4l2_of_get_next_endpoint(np, NULL);
-+ np = of_graph_get_next_endpoint(np, NULL);
- if (!np)
- return -ENXIO;
-- np = v4l2_of_get_remote_port(np);
-+ np = of_graph_get_remote_port(np);
- if (!np)
- return -ENXIO;
-
---- a/drivers/media/platform/exynos4-is/media-dev.c
-+++ b/drivers/media/platform/exynos4-is/media-dev.c
-@@ -20,6 +20,7 @@
- #include <linux/of.h>
- #include <linux/of_platform.h>
- #include <linux/of_device.h>
-+#include <linux/of_graph.h>
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
- #include <linux/types.h>
-@@ -473,7 +474,7 @@ static int fimc_md_parse_port_node(struc
-
- pd->mux_id = (endpoint.port - 1) & 0x1;
-
-- rem = v4l2_of_get_remote_port_parent(ep);
-+ rem = of_graph_get_remote_port_parent(ep);
- of_node_put(ep);
- if (rem == NULL) {
- v4l2_info(&fmd->v4l2_dev, "Remote device at %s not found\n",
---- a/drivers/media/platform/exynos4-is/mipi-csis.c
-+++ b/drivers/media/platform/exynos4-is/mipi-csis.c
-@@ -20,6 +20,7 @@
- #include <linux/memory.h>
- #include <linux/module.h>
- #include <linux/of.h>
-+#include <linux/of_graph.h>
- #include <linux/phy/phy.h>
- #include <linux/platform_data/mipi-csis.h>
- #include <linux/platform_device.h>
-@@ -762,7 +763,7 @@ static int s5pcsis_parse_dt(struct platf
- &state->max_num_lanes))
- return -EINVAL;
-
-- node = v4l2_of_get_next_endpoint(node, NULL);
-+ node = of_graph_get_next_endpoint(node, NULL);
- if (!node) {
- dev_err(&pdev->dev, "No port node at %s\n",
- pdev->dev.of_node->full_name);
---- a/drivers/media/v4l2-core/v4l2-of.c
-+++ b/drivers/media/v4l2-core/v4l2-of.c
-@@ -152,120 +152,3 @@ int v4l2_of_parse_endpoint(const struct
- return 0;
- }
- EXPORT_SYMBOL(v4l2_of_parse_endpoint);
--
--/**
-- * v4l2_of_get_next_endpoint() - get next endpoint node
-- * @parent: pointer to the parent device node
-- * @prev: previous endpoint node, or NULL to get first
-- *
-- * Return: An 'endpoint' node pointer with refcount incremented. Refcount
-- * of the passed @prev node is not decremented, the caller have to use
-- * of_node_put() on it when done.
-- */
--struct device_node *v4l2_of_get_next_endpoint(const struct device_node *parent,
-- struct device_node *prev)
--{
-- struct device_node *endpoint;
-- struct device_node *port = NULL;
--
-- if (!parent)
-- return NULL;
--
-- if (!prev) {
-- struct device_node *node;
-- /*
-- * It's the first call, we have to find a port subnode
-- * within this node or within an optional 'ports' node.
-- */
-- node = of_get_child_by_name(parent, "ports");
-- if (node)
-- parent = node;
--
-- port = of_get_child_by_name(parent, "port");
--
-- if (port) {
-- /* Found a port, get an endpoint. */
-- endpoint = of_get_next_child(port, NULL);
-- of_node_put(port);
-- } else {
-- endpoint = NULL;
-- }
--
-- if (!endpoint)
-- pr_err("%s(): no endpoint nodes specified for %s\n",
-- __func__, parent->full_name);
-- of_node_put(node);
-- } else {
-- port = of_get_parent(prev);
-- if (!port)
-- /* Hm, has someone given us the root node ?... */
-- return NULL;
--
-- /* Avoid dropping prev node refcount to 0. */
-- of_node_get(prev);
-- endpoint = of_get_next_child(port, prev);
-- if (endpoint) {
-- of_node_put(port);
-- return endpoint;
-- }
--
-- /* No more endpoints under this port, try the next one. */
-- do {
-- port = of_get_next_child(parent, port);
-- if (!port)
-- return NULL;
-- } while (of_node_cmp(port->name, "port"));
--
-- /* Pick up the first endpoint in this port. */
-- endpoint = of_get_next_child(port, NULL);
-- of_node_put(port);
-- }
--
-- return endpoint;
--}
--EXPORT_SYMBOL(v4l2_of_get_next_endpoint);
--
--/**
-- * v4l2_of_get_remote_port_parent() - get remote port's parent node
-- * @node: pointer to a local endpoint device_node
-- *
-- * Return: Remote device node associated with remote endpoint node linked
-- * to @node. Use of_node_put() on it when done.
-- */
--struct device_node *v4l2_of_get_remote_port_parent(
-- const struct device_node *node)
--{
-- struct device_node *np;
-- unsigned int depth;
--
-- /* Get remote endpoint node. */
-- np = of_parse_phandle(node, "remote-endpoint", 0);
--
-- /* Walk 3 levels up only if there is 'ports' node. */
-- for (depth = 3; depth && np; depth--) {
-- np = of_get_next_parent(np);
-- if (depth == 2 && of_node_cmp(np->name, "ports"))
-- break;
-- }
-- return np;
--}
--EXPORT_SYMBOL(v4l2_of_get_remote_port_parent);
--
--/**
-- * v4l2_of_get_remote_port() - get remote port node
-- * @node: pointer to a local endpoint device_node
-- *
-- * Return: Remote port node associated with remote endpoint node linked
-- * to @node. Use of_node_put() on it when done.
-- */
--struct device_node *v4l2_of_get_remote_port(const struct device_node *node)
--{
-- struct device_node *np;
--
-- /* Get remote endpoint node. */
-- np = of_parse_phandle(node, "remote-endpoint", 0);
-- if (!np)
-- return NULL;
-- return of_get_next_parent(np);
--}
--EXPORT_SYMBOL(v4l2_of_get_remote_port);
---- a/drivers/of/base.c
-+++ b/drivers/of/base.c
-@@ -21,6 +21,7 @@
- #include <linux/cpu.h>
- #include <linux/module.h>
- #include <linux/of.h>
-+#include <linux/of_graph.h>
- #include <linux/spinlock.h>
- #include <linux/slab.h>
- #include <linux/proc_fs.h>
-@@ -1970,3 +1971,120 @@ struct device_node *of_find_next_cache_n
-
- return NULL;
- }
-+
-+/**
-+ * of_graph_get_next_endpoint() - get next endpoint node
-+ * @parent: pointer to the parent device node
-+ * @prev: previous endpoint node, or NULL to get first
-+ *
-+ * Return: An 'endpoint' node pointer with refcount incremented. Refcount
-+ * of the passed @prev node is not decremented, the caller have to use
-+ * of_node_put() on it when done.
-+ */
-+struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
-+ struct device_node *prev)
-+{
-+ struct device_node *endpoint;
-+ struct device_node *port = NULL;
-+
-+ if (!parent)
-+ return NULL;
-+
-+ if (!prev) {
-+ struct device_node *node;
-+ /*
-+ * It's the first call, we have to find a port subnode
-+ * within this node or within an optional 'ports' node.
-+ */
-+ node = of_get_child_by_name(parent, "ports");
-+ if (node)
-+ parent = node;
-+
-+ port = of_get_child_by_name(parent, "port");
-+
-+ if (port) {
-+ /* Found a port, get an endpoint. */
-+ endpoint = of_get_next_child(port, NULL);
-+ of_node_put(port);
-+ } else {
-+ endpoint = NULL;
-+ }
-+
-+ if (!endpoint)
-+ pr_err("%s(): no endpoint nodes specified for %s\n",
-+ __func__, parent->full_name);
-+ of_node_put(node);
-+ } else {
-+ port = of_get_parent(prev);
-+ if (!port)
-+ /* Hm, has someone given us the root node ?... */
-+ return NULL;
-+
-+ /* Avoid dropping prev node refcount to 0. */
-+ of_node_get(prev);
-+ endpoint = of_get_next_child(port, prev);
-+ if (endpoint) {
-+ of_node_put(port);
-+ return endpoint;
-+ }
-+
-+ /* No more endpoints under this port, try the next one. */
-+ do {
-+ port = of_get_next_child(parent, port);
-+ if (!port)
-+ return NULL;
-+ } while (of_node_cmp(port->name, "port"));
-+
-+ /* Pick up the first endpoint in this port. */
-+ endpoint = of_get_next_child(port, NULL);
-+ of_node_put(port);
-+ }
-+
-+ return endpoint;
-+}
-+EXPORT_SYMBOL(of_graph_get_next_endpoint);
-+
-+/**
-+ * of_graph_get_remote_port_parent() - get remote port's parent node
-+ * @node: pointer to a local endpoint device_node
-+ *
-+ * Return: Remote device node associated with remote endpoint node linked
-+ * to @node. Use of_node_put() on it when done.
-+ */
-+struct device_node *of_graph_get_remote_port_parent(
-+ const struct device_node *node)
-+{
-+ struct device_node *np;
-+ unsigned int depth;
-+
-+ /* Get remote endpoint node. */
-+ np = of_parse_phandle(node, "remote-endpoint", 0);
-+
-+ /* Walk 3 levels up only if there is 'ports' node. */
-+ for (depth = 3; depth && np; depth--) {
-+ np = of_get_next_parent(np);
-+ if (depth == 2 && of_node_cmp(np->name, "ports"))
-+ break;
-+ }
-+ return np;
-+}
-+EXPORT_SYMBOL(of_graph_get_remote_port_parent);
-+
-+/**
-+ * of_graph_get_remote_port() - get remote port node
-+ * @node: pointer to a local endpoint device_node
-+ *
-+ * Return: Remote port node associated with remote endpoint node linked
-+ * to @node. Use of_node_put() on it when done.
-+ */
-+struct device_node *of_graph_get_remote_port(const struct device_node *node)
-+{
-+ struct device_node *np;
-+
-+ /* Get remote endpoint node. */
-+ np = of_parse_phandle(node, "remote-endpoint", 0);
-+ if (!np)
-+ return NULL;
-+ return of_get_next_parent(np);
-+}
-+EXPORT_SYMBOL(of_graph_get_remote_port);
---- /dev/null
-+++ b/include/linux/of_graph.h
-@@ -0,0 +1,46 @@
-+/*
-+ * OF graph binding parsing helpers
-+ *
-+ * Copyright (C) 2012 - 2013 Samsung Electronics Co., Ltd.
-+ * Author: Sylwester Nawrocki <s.nawrocki@samsung.com>
-+ *
-+ * Copyright (C) 2012 Renesas Electronics Corp.
-+ * Author: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-+ *
-+ * This program is free software; you can redistribute it and/or modify
-+ * it under the terms of version 2 of the GNU General Public License as
-+ * published by the Free Software Foundation.
-+ */
-+#ifndef __LINUX_OF_GRAPH_H
-+#define __LINUX_OF_GRAPH_H
-+
-+#ifdef CONFIG_OF
-+struct device_node *of_graph_get_next_endpoint(const struct device_node *parent,
-+ struct device_node *previous);
-+struct device_node *of_graph_get_remote_port_parent(
-+ const struct device_node *node);
-+struct device_node *of_graph_get_remote_port(const struct device_node *node);
-+#else
-+
-+static inline struct device_node *of_graph_get_next_endpoint(
-+ const struct device_node *parent,
-+ struct device_node *previous)
-+{
-+ return NULL;
-+}
-+
-+static inline struct device_node *of_graph_get_remote_port_parent(
-+ const struct device_node *node)
-+{
-+ return NULL;
-+}
-+
-+static inline struct device_node *of_graph_get_remote_port(
-+ const struct device_node *node)
-+{
-+ return NULL;
-+}
-+
-+#endif /* CONFIG_OF */
-+
-+#endif /* __LINUX_OF_GRAPH_H */
---- a/include/media/v4l2-of.h
-+++ b/include/media/v4l2-of.h
-@@ -17,6 +17,7 @@
- #include <linux/list.h>
- #include <linux/types.h>
- #include <linux/errno.h>
-+#include <linux/of_graph.h>
-
- #include <media/v4l2-mediabus.h>
-
-@@ -72,11 +73,6 @@ struct v4l2_of_endpoint {
- #ifdef CONFIG_OF
- int v4l2_of_parse_endpoint(const struct device_node *node,
- struct v4l2_of_endpoint *endpoint);
--struct device_node *v4l2_of_get_next_endpoint(const struct device_node *parent,
-- struct device_node *previous);
--struct device_node *v4l2_of_get_remote_port_parent(
-- const struct device_node *node);
--struct device_node *v4l2_of_get_remote_port(const struct device_node *node);
- #else /* CONFIG_OF */
-
- static inline int v4l2_of_parse_endpoint(const struct device_node *node,
-@@ -85,25 +81,6 @@ static inline int v4l2_of_parse_endpoint
- return -ENOSYS;
- }
-
--static inline struct device_node *v4l2_of_get_next_endpoint(
-- const struct device_node *parent,
-- struct device_node *previous)
--{
-- return NULL;
--}
--
--static inline struct device_node *v4l2_of_get_remote_port_parent(
-- const struct device_node *node)
--{
-- return NULL;
--}
--
--static inline struct device_node *v4l2_of_get_remote_port(
-- const struct device_node *node)
--{
-- return NULL;
--}
--
- #endif /* CONFIG_OF */
-
- #endif /* _V4L2_OF_H */
diff --git a/patches.renesas/0768-media-rcar_vin-copy-flags-from-pdata.patch b/patches.renesas/0768-media-rcar_vin-copy-flags-from-pdata.patch
deleted file mode 100644
index 447900caaf410..0000000000000
--- a/patches.renesas/0768-media-rcar_vin-copy-flags-from-pdata.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 18171de5495b6e5b0e07befc8f3b17a12ce6ef90 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Mon, 14 Apr 2014 07:36:40 -0300
-Subject: [media] rcar_vin: copy flags from pdata
-
-The platform data is a single word, so simply copy
-it into the device's private data structure than
-keeping a copy of the pointer.
-
-This will make changing to device-tree binding
-easier as it is one allocation instead of two.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 25dfa02ce21981ef08d375be987862f96676d8ab)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/soc_camera/rcar_vin.c | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
-index 702dc47062a2..47516dffbf65 100644
---- a/drivers/media/platform/soc_camera/rcar_vin.c
-+++ b/drivers/media/platform/soc_camera/rcar_vin.c
-@@ -126,13 +126,13 @@ struct rcar_vin_priv {
- int sequence;
- /* State of the VIN module in capturing mode */
- enum rcar_vin_state state;
-- struct rcar_vin_platform_data *pdata;
- struct soc_camera_host ici;
- struct list_head capture;
- #define MAX_BUFFER_NUM 3
- struct vb2_buffer *queue_buf[MAX_BUFFER_NUM];
- struct vb2_alloc_ctx *alloc_ctx;
- enum v4l2_field field;
-+ unsigned int pdata_flags;
- unsigned int vb_count;
- unsigned int nr_hw_slots;
- bool request_to_stop;
-@@ -275,12 +275,12 @@ static int rcar_vin_setup(struct rcar_vin_priv *priv)
- break;
- case V4L2_MBUS_FMT_YUYV8_2X8:
- /* BT.656 8bit YCbCr422 or BT.601 8bit YCbCr422 */
-- vnmc |= priv->pdata->flags & RCAR_VIN_BT656 ?
-+ vnmc |= priv->pdata_flags & RCAR_VIN_BT656 ?
- VNMC_INF_YUV8_BT656 : VNMC_INF_YUV8_BT601;
- break;
- case V4L2_MBUS_FMT_YUYV10_2X10:
- /* BT.656 10bit YCbCr422 or BT.601 10bit YCbCr422 */
-- vnmc |= priv->pdata->flags & RCAR_VIN_BT656 ?
-+ vnmc |= priv->pdata_flags & RCAR_VIN_BT656 ?
- VNMC_INF_YUV10_BT656 : VNMC_INF_YUV10_BT601;
- break;
- default:
-@@ -799,7 +799,7 @@ static int rcar_vin_set_bus_param(struct soc_camera_device *icd)
- /* Make choises, based on platform preferences */
- if ((common_flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH) &&
- (common_flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)) {
-- if (priv->pdata->flags & RCAR_VIN_HSYNC_ACTIVE_LOW)
-+ if (priv->pdata_flags & RCAR_VIN_HSYNC_ACTIVE_LOW)
- common_flags &= ~V4L2_MBUS_HSYNC_ACTIVE_HIGH;
- else
- common_flags &= ~V4L2_MBUS_HSYNC_ACTIVE_LOW;
-@@ -807,7 +807,7 @@ static int rcar_vin_set_bus_param(struct soc_camera_device *icd)
-
- if ((common_flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) &&
- (common_flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)) {
-- if (priv->pdata->flags & RCAR_VIN_VSYNC_ACTIVE_LOW)
-+ if (priv->pdata_flags & RCAR_VIN_VSYNC_ACTIVE_LOW)
- common_flags &= ~V4L2_MBUS_VSYNC_ACTIVE_HIGH;
- else
- common_flags &= ~V4L2_MBUS_VSYNC_ACTIVE_LOW;
-@@ -1447,7 +1447,7 @@ static int rcar_vin_probe(struct platform_device *pdev)
- priv->ici.drv_name = dev_name(&pdev->dev);
- priv->ici.ops = &rcar_vin_host_ops;
-
-- priv->pdata = pdata;
-+ priv->pdata_flags = pdata->flags;
- priv->chip = pdev->id_entry->driver_data;
- spin_lock_init(&priv->lock);
- INIT_LIST_HEAD(&priv->capture);
---
-2.1.2
-
diff --git a/patches.renesas/0769-media-rcar_vin-add-devicetree-support.patch b/patches.renesas/0769-media-rcar_vin-add-devicetree-support.patch
deleted file mode 100644
index eca4754a34613..0000000000000
--- a/patches.renesas/0769-media-rcar_vin-add-devicetree-support.patch
+++ /dev/null
@@ -1,242 +0,0 @@
-From 934c68c1324e0db2f19cc6d660609067805f6eba Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Sat, 5 Jul 2014 19:26:22 -0300
-Subject: [media] rcar_vin: add devicetree support
-
-Add support for devicetree probe for the rcar-vin
-driver.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-[g.liakhovetski@gmx.de fix a typo, sort headers alphabetically]
-Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
-
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 47c71bd61b772cd72159dff4aae43734257a485a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/media/rcar_vin.txt | 86 ++++++++++++++++++++++
- drivers/media/platform/soc_camera/rcar_vin.c | 72 ++++++++++++++++--
- 2 files changed, 151 insertions(+), 7 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/media/rcar_vin.txt
-
-diff --git a/Documentation/devicetree/bindings/media/rcar_vin.txt b/Documentation/devicetree/bindings/media/rcar_vin.txt
-new file mode 100644
-index 000000000000..ba61782c2af9
---- /dev/null
-+++ b/Documentation/devicetree/bindings/media/rcar_vin.txt
-@@ -0,0 +1,86 @@
-+Renesas RCar Video Input driver (rcar_vin)
-+------------------------------------------
-+
-+The rcar_vin device provides video input capabilities for the Renesas R-Car
-+family of devices. The current blocks are always slaves and suppot one input
-+channel which can be either RGB, YUYV or BT656.
-+
-+ - compatible: Must be one of the following
-+ - "renesas,vin-r8a7791" for the R8A7791 device
-+ - "renesas,vin-r8a7790" for the R8A7790 device
-+ - "renesas,vin-r8a7779" for the R8A7779 device
-+ - "renesas,vin-r8a7778" for the R8A7778 device
-+ - reg: the register base and size for the device registers
-+ - interrupts: the interrupt for the device
-+ - clocks: Reference to the parent clock
-+
-+Additionally, an alias named vinX will need to be created to specify
-+which video input device this is.
-+
-+The per-board settings:
-+ - port sub-node describing a single endpoint connected to the vin
-+ as described in video-interfaces.txt[1]. Only the first one will
-+ be considered as each vin interface has one input port.
-+
-+ These settings are used to work out video input format and widths
-+ into the system.
-+
-+
-+Device node example
-+-------------------
-+
-+ aliases {
-+ vin0 = &vin0;
-+ };
-+
-+ vin0: vin@0xe6ef0000 {
-+ compatible = "renesas,vin-r8a7790";
-+ clocks = <&mstp8_clks R8A7790_CLK_VIN0>;
-+ reg = <0 0xe6ef0000 0 0x1000>;
-+ interrupts = <0 188 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+Board setup example (vin1 composite video input)
-+------------------------------------------------
-+
-+&i2c2 {
-+ status = "ok";
-+ pinctrl-0 = <&i2c2_pins>;
-+ pinctrl-names = "default";
-+
-+ adv7180@20 {
-+ compatible = "adi,adv7180";
-+ reg = <0x20>;
-+ remote = <&vin1>;
-+
-+ port {
-+ adv7180: endpoint {
-+ bus-width = <8>;
-+ remote-endpoint = <&vin1ep0>;
-+ };
-+ };
-+ };
-+};
-+
-+/* composite video input */
-+&vin1 {
-+ pinctrl-0 = <&vin1_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "ok";
-+
-+ port {
-+ #address-cells = <1>;
-+ #size-cells = <0>;
-+
-+ vin1ep0: endpoint {
-+ remote-endpoint = <&adv7180>;
-+ bus-width = <8>;
-+ };
-+ };
-+};
-+
-+
-+
-+[1] video-interfaces.txt common video media interface
-diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c
-index 47516dffbf65..4ea0fa8be14f 100644
---- a/drivers/media/platform/soc_camera/rcar_vin.c
-+++ b/drivers/media/platform/soc_camera/rcar_vin.c
-@@ -19,6 +19,8 @@
- #include <linux/io.h>
- #include <linux/kernel.h>
- #include <linux/module.h>
-+#include <linux/of.h>
-+#include <linux/of_device.h>
- #include <linux/platform_data/camera-rcar.h>
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
-@@ -31,6 +33,7 @@
- #include <media/v4l2-dev.h>
- #include <media/v4l2-device.h>
- #include <media/v4l2-mediabus.h>
-+#include <media/v4l2-of.h>
- #include <media/v4l2-subdev.h>
- #include <media/videobuf2-dma-contig.h>
-
-@@ -1392,6 +1395,17 @@ static struct soc_camera_host_ops rcar_vin_host_ops = {
- .init_videobuf2 = rcar_vin_init_videobuf2,
- };
-
-+#ifdef CONFIG_OF
-+static struct of_device_id rcar_vin_of_table[] = {
-+ { .compatible = "renesas,vin-r8a7791", .data = (void *)RCAR_GEN2 },
-+ { .compatible = "renesas,vin-r8a7790", .data = (void *)RCAR_GEN2 },
-+ { .compatible = "renesas,vin-r8a7779", .data = (void *)RCAR_H1 },
-+ { .compatible = "renesas,vin-r8a7778", .data = (void *)RCAR_M1 },
-+ { },
-+};
-+MODULE_DEVICE_TABLE(of, rcar_vin_of_table);
-+#endif
-+
- static struct platform_device_id rcar_vin_id_table[] = {
- { "r8a7791-vin", RCAR_GEN2 },
- { "r8a7790-vin", RCAR_GEN2 },
-@@ -1404,15 +1418,52 @@ MODULE_DEVICE_TABLE(platform, rcar_vin_id_table);
-
- static int rcar_vin_probe(struct platform_device *pdev)
- {
-+ const struct of_device_id *match = NULL;
- struct rcar_vin_priv *priv;
- struct resource *mem;
- struct rcar_vin_platform_data *pdata;
-+ unsigned int pdata_flags;
- int irq, ret;
-
-- pdata = pdev->dev.platform_data;
-- if (!pdata || !pdata->flags) {
-- dev_err(&pdev->dev, "platform data not set\n");
-- return -EINVAL;
-+ if (pdev->dev.of_node) {
-+ struct v4l2_of_endpoint ep;
-+ struct device_node *np;
-+
-+ match = of_match_device(of_match_ptr(rcar_vin_of_table),
-+ &pdev->dev);
-+
-+ np = of_graph_get_next_endpoint(pdev->dev.of_node, NULL);
-+ if (!np) {
-+ dev_err(&pdev->dev, "could not find endpoint\n");
-+ return -EINVAL;
-+ }
-+
-+ ret = v4l2_of_parse_endpoint(np, &ep);
-+ if (ret) {
-+ dev_err(&pdev->dev, "could not parse endpoint\n");
-+ return ret;
-+ }
-+
-+ if (ep.bus_type == V4L2_MBUS_BT656)
-+ pdata_flags = RCAR_VIN_BT656;
-+ else {
-+ pdata_flags = 0;
-+ if (ep.bus.parallel.flags & V4L2_MBUS_HSYNC_ACTIVE_LOW)
-+ pdata_flags |= RCAR_VIN_HSYNC_ACTIVE_LOW;
-+ if (ep.bus.parallel.flags & V4L2_MBUS_VSYNC_ACTIVE_LOW)
-+ pdata_flags |= RCAR_VIN_VSYNC_ACTIVE_LOW;
-+ }
-+
-+ of_node_put(np);
-+
-+ dev_dbg(&pdev->dev, "pdata_flags = %08x\n", pdata_flags);
-+ } else {
-+ pdata = pdev->dev.platform_data;
-+ if (!pdata || !pdata->flags) {
-+ dev_err(&pdev->dev, "platform data not set\n");
-+ return -EINVAL;
-+ }
-+ pdata_flags = pdata->flags;
- }
-
- mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-@@ -1443,12 +1494,18 @@ static int rcar_vin_probe(struct platform_device *pdev)
-
- priv->ici.priv = priv;
- priv->ici.v4l2_dev.dev = &pdev->dev;
-- priv->ici.nr = pdev->id;
- priv->ici.drv_name = dev_name(&pdev->dev);
- priv->ici.ops = &rcar_vin_host_ops;
-
-- priv->pdata_flags = pdata->flags;
-- priv->chip = pdev->id_entry->driver_data;
-+ priv->pdata_flags = pdata_flags;
-+ if (!match) {
-+ priv->ici.nr = pdev->id;
-+ priv->chip = pdev->id_entry->driver_data;
-+ } else {
-+ priv->ici.nr = of_alias_get_id(pdev->dev.of_node, "vin");
-+ priv->chip = (enum chip_id)match->data;
-+ };
-+
- spin_lock_init(&priv->lock);
- INIT_LIST_HEAD(&priv->capture);
-
-@@ -1489,6 +1546,7 @@ static struct platform_driver rcar_vin_driver = {
- .driver = {
- .name = DRV_NAME,
- .owner = THIS_MODULE,
-+ .of_match_table = of_match_ptr(rcar_vin_of_table),
- },
- .id_table = rcar_vin_id_table,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0770-media-v4l-vsp1-Fix-routing-cleanup-when-stopping-the.patch b/patches.renesas/0770-media-v4l-vsp1-Fix-routing-cleanup-when-stopping-the.patch
deleted file mode 100644
index 6eea8b3f7b3a7..0000000000000
--- a/patches.renesas/0770-media-v4l-vsp1-Fix-routing-cleanup-when-stopping-the.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From bf63282d61609dba60fcb18af5b593d91491d04a Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 23 Jun 2014 18:40:49 -0300
-Subject: [media] v4l: vsp1: Fix routing cleanup when stopping the stream
-
-Commit d9b45ed3d8b75e8cf38c8cd1563c29217eecba27 ("v4l: vsp1: Support
-multi-input entities") reworked pipeline routing configuration and
-introduced a bug by writing to the entities routing registers without
-first checking whether the entity had a routing register. This results
-in overwriting the value at offset 0 of the device register space when
-stopping the stream.
-
-Fix this by skipping routing register write for entities without a
-routing register.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit aaa48cbb098e13cf9c22066b8c65958a7243fb95)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_video.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index 2fc67b6161f1..dcb11474f5bb 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -479,7 +479,7 @@ static int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
- ret = ret == 0 ? -ETIMEDOUT : 0;
-
- list_for_each_entry(entity, &pipe->entities, list_pipe) {
-- if (entity->route)
-+ if (entity->route && entity->route->reg)
- vsp1_write(entity->vsp1, entity->route->reg,
- VI6_DPR_NODE_UNUSED);
-
---
-2.1.2
-
diff --git a/patches.renesas/0771-media-v4l-vsp1-Release-buffers-at-stream-stop.patch b/patches.renesas/0771-media-v4l-vsp1-Release-buffers-at-stream-stop.patch
deleted file mode 100644
index c6424bb6132a7..0000000000000
--- a/patches.renesas/0771-media-v4l-vsp1-Release-buffers-at-stream-stop.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From e93307678a24edfd51417977b0c203f9de3f306b Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 23 Jun 2014 16:57:22 -0300
-Subject: [media] v4l: vsp1: Release buffers at stream stop
-
-videobuf2 expects no buffer to be owned by the driver when the
-stop_stream queue operation returns. As the vsp1 driver fails to do so,
-a warning is generated at stream top time.
-
-Fix this by releasing all buffers queued on the IRQ queue in the
-stop_stream operation handler and marking them as erroneous.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 9df04e9d9ac6982d16a8a042c8274410ed29fb0e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_video.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -742,6 +742,7 @@ static int vsp1_video_stop_streaming(str
- {
- struct vsp1_video *video = vb2_get_drv_priv(vq);
- struct vsp1_pipeline *pipe = to_vsp1_pipeline(&video->video.entity);
-+ struct vsp1_video_buffer *buffer;
- unsigned long flags;
- int ret;
-
-@@ -759,6 +760,8 @@ static int vsp1_video_stop_streaming(str
-
- /* Remove all buffers from the IRQ queue. */
- spin_lock_irqsave(&video->irqlock, flags);
-+ list_for_each_entry(buffer, &video->irqqueue, queue)
-+ vb2_buffer_done(&buffer->buf, VB2_BUF_STATE_ERROR);
- INIT_LIST_HEAD(&video->irqqueue);
- spin_unlock_irqrestore(&video->irqlock, flags);
-
diff --git a/patches.renesas/0772-media-v4l-vsp1-Fix-pipeline-stop-timeout.patch b/patches.renesas/0772-media-v4l-vsp1-Fix-pipeline-stop-timeout.patch
deleted file mode 100644
index 9ec7951eaf4d9..0000000000000
--- a/patches.renesas/0772-media-v4l-vsp1-Fix-pipeline-stop-timeout.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 2fe92e7967dd33656e9e45001029946c00db9aa8 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 23 Jun 2014 17:15:02 -0300
-Subject: [media] v4l: vsp1: Fix pipeline stop timeout
-
-If the pipeline was already stopped when stopping the stream, no
-frame end interrupt will be generated and the driver will time out
-waiting for the pipeline to stop.
-
-Fix this by setting the pipeline state to STOPPED when the pipeline is
-idle waiting for frames to process, and to STOPPING at stream stop time
-only when the pipeline is currently RUNNING.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 9b3e6e2abd7568f9458e927fc4e5eca1b3cde521)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_video.c | 10 +++++++---
- 1 file changed, 7 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index a0d5ddb21660..5e6f8af2a7f5 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -471,7 +471,8 @@ static int vsp1_pipeline_stop(struct vsp1_pipeline *pipe)
- int ret;
-
- spin_lock_irqsave(&pipe->irqlock, flags);
-- pipe->state = VSP1_PIPELINE_STOPPING;
-+ if (pipe->state == VSP1_PIPELINE_RUNNING)
-+ pipe->state = VSP1_PIPELINE_STOPPING;
- spin_unlock_irqrestore(&pipe->irqlock, flags);
-
- ret = wait_event_timeout(pipe->wq, pipe->state == VSP1_PIPELINE_STOPPED,
-@@ -576,6 +577,7 @@ static void vsp1_video_frame_end(struct vsp1_pipeline *pipe,
-
- void vsp1_pipeline_frame_end(struct vsp1_pipeline *pipe)
- {
-+ enum vsp1_pipeline_state state;
- unsigned long flags;
- unsigned int i;
-
-@@ -591,11 +593,13 @@ void vsp1_pipeline_frame_end(struct vsp1_pipeline *pipe)
-
- spin_lock_irqsave(&pipe->irqlock, flags);
-
-+ state = pipe->state;
-+ pipe->state = VSP1_PIPELINE_STOPPED;
-+
- /* If a stop has been requested, mark the pipeline as stopped and
- * return.
- */
-- if (pipe->state == VSP1_PIPELINE_STOPPING) {
-- pipe->state = VSP1_PIPELINE_STOPPED;
-+ if (state == VSP1_PIPELINE_STOPPING) {
- wake_up(&pipe->wq);
- goto done;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0773-media-v4l-vsp1-Fix-typos.patch b/patches.renesas/0773-media-v4l-vsp1-Fix-typos.patch
deleted file mode 100644
index 62c0006c3ef50..0000000000000
--- a/patches.renesas/0773-media-v4l-vsp1-Fix-typos.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 8fbe97af0edb5a2e4173a42ce44e4cb6b751b7a3 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 12:59:39 -0300
-Subject: [media] v4l: vsp1: Fix typos
-
-Several macros were mistakenly prefixed with VPS1 instead of VSP1. Fix
-them.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 7005a81705d032887b9f4f808e6dce8e57b8980a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1.h | 12 ++++++------
- drivers/media/platform/vsp1/vsp1_drv.c | 6 +++---
- drivers/media/platform/vsp1/vsp1_video.h | 2 +-
- 3 files changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1.h b/drivers/media/platform/vsp1/vsp1.h
-index 6ca2cf20d545..3cfa3939157e 100644
---- a/drivers/media/platform/vsp1/vsp1.h
-+++ b/drivers/media/platform/vsp1/vsp1.h
-@@ -36,9 +36,9 @@ struct vsp1_rwpf;
- struct vsp1_sru;
- struct vsp1_uds;
-
--#define VPS1_MAX_RPF 5
--#define VPS1_MAX_UDS 3
--#define VPS1_MAX_WPF 4
-+#define VSP1_MAX_RPF 5
-+#define VSP1_MAX_UDS 3
-+#define VSP1_MAX_WPF 4
-
- struct vsp1_device {
- struct device *dev;
-@@ -55,10 +55,10 @@ struct vsp1_device {
- struct vsp1_hsit *hst;
- struct vsp1_lif *lif;
- struct vsp1_lut *lut;
-- struct vsp1_rwpf *rpf[VPS1_MAX_RPF];
-+ struct vsp1_rwpf *rpf[VSP1_MAX_RPF];
- struct vsp1_sru *sru;
-- struct vsp1_uds *uds[VPS1_MAX_UDS];
-- struct vsp1_rwpf *wpf[VPS1_MAX_WPF];
-+ struct vsp1_uds *uds[VSP1_MAX_UDS];
-+ struct vsp1_rwpf *wpf[VSP1_MAX_WPF];
-
- struct list_head entities;
-
-diff --git a/drivers/media/platform/vsp1/vsp1_drv.c b/drivers/media/platform/vsp1/vsp1_drv.c
-index c69ee0657f75..0c5e74cdd3d0 100644
---- a/drivers/media/platform/vsp1/vsp1_drv.c
-+++ b/drivers/media/platform/vsp1/vsp1_drv.c
-@@ -440,19 +440,19 @@ static int vsp1_validate_platform_data(struct platform_device *pdev,
- return -EINVAL;
- }
-
-- if (pdata->rpf_count <= 0 || pdata->rpf_count > VPS1_MAX_RPF) {
-+ if (pdata->rpf_count <= 0 || pdata->rpf_count > VSP1_MAX_RPF) {
- dev_err(&pdev->dev, "invalid number of RPF (%u)\n",
- pdata->rpf_count);
- return -EINVAL;
- }
-
-- if (pdata->uds_count <= 0 || pdata->uds_count > VPS1_MAX_UDS) {
-+ if (pdata->uds_count <= 0 || pdata->uds_count > VSP1_MAX_UDS) {
- dev_err(&pdev->dev, "invalid number of UDS (%u)\n",
- pdata->uds_count);
- return -EINVAL;
- }
-
-- if (pdata->wpf_count <= 0 || pdata->wpf_count > VPS1_MAX_WPF) {
-+ if (pdata->wpf_count <= 0 || pdata->wpf_count > VSP1_MAX_WPF) {
- dev_err(&pdev->dev, "invalid number of WPF (%u)\n",
- pdata->wpf_count);
- return -EINVAL;
-diff --git a/drivers/media/platform/vsp1/vsp1_video.h b/drivers/media/platform/vsp1/vsp1_video.h
-index c04d48fa2999..8464cd913760 100644
---- a/drivers/media/platform/vsp1/vsp1_video.h
-+++ b/drivers/media/platform/vsp1/vsp1_video.h
-@@ -73,7 +73,7 @@ struct vsp1_pipeline {
-
- unsigned int num_video;
- unsigned int num_inputs;
-- struct vsp1_rwpf *inputs[VPS1_MAX_RPF];
-+ struct vsp1_rwpf *inputs[VSP1_MAX_RPF];
- struct vsp1_rwpf *output;
- struct vsp1_entity *bru;
- struct vsp1_entity *lif;
---
-2.1.2
-
diff --git a/patches.renesas/0774-media-v4l-vsp1-Cleanup-video-nodes-at-removal-time.patch b/patches.renesas/0774-media-v4l-vsp1-Cleanup-video-nodes-at-removal-time.patch
deleted file mode 100644
index 2acbde6335061..0000000000000
--- a/patches.renesas/0774-media-v4l-vsp1-Cleanup-video-nodes-at-removal-time.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From e2f6c2853ff5168282fb1825ea0e3a6da3169562 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 28 May 2014 12:49:13 -0300
-Subject: [media] v4l: vsp1: Cleanup video nodes at removal time
-
-Video nodes created and initialized in the RPF and WPF init code paths
-are never unregistered, and the related resources (videobuf alloc
-context and media entity) never released.
-
-Fix this by storing a pointer to the vsp1_video object in vsp1_entity
-and calling vsp1_video_cleanup() from vsp1_entity_destroy(). This also
-allows simplifying the init error code paths.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 1499be67a545fb6f41acb5614b8e4732147cec50)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_entity.c | 3 +++
- drivers/media/platform/vsp1/vsp1_entity.h | 3 +++
- drivers/media/platform/vsp1/vsp1_rpf.c | 12 ++++++------
- drivers/media/platform/vsp1/vsp1_wpf.c | 12 ++++++------
- 4 files changed, 18 insertions(+), 12 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
-index 44167834285d..ceac0d7e5643 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.c
-+++ b/drivers/media/platform/vsp1/vsp1_entity.c
-@@ -20,6 +20,7 @@
-
- #include "vsp1.h"
- #include "vsp1_entity.h"
-+#include "vsp1_video.h"
-
- /* -----------------------------------------------------------------------------
- * V4L2 Subdevice Operations
-@@ -185,6 +186,8 @@ int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
-
- void vsp1_entity_destroy(struct vsp1_entity *entity)
- {
-+ if (entity->video)
-+ vsp1_video_cleanup(entity->video);
- if (entity->subdev.ctrl_handler)
- v4l2_ctrl_handler_free(entity->subdev.ctrl_handler);
- media_entity_cleanup(&entity->subdev.entity);
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
-index 7afbd8a7ba66..f0257f68f16a 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.h
-+++ b/drivers/media/platform/vsp1/vsp1_entity.h
-@@ -18,6 +18,7 @@
- #include <media/v4l2-subdev.h>
-
- struct vsp1_device;
-+struct vsp1_video;
-
- enum vsp1_entity_type {
- VSP1_ENTITY_BRU,
-@@ -68,6 +69,8 @@ struct vsp1_entity {
-
- struct v4l2_subdev subdev;
- struct v4l2_mbus_framefmt *formats;
-+
-+ struct vsp1_video *video;
- };
-
- static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev)
-diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
-index c3d98642a4aa..9b3fc70e18f0 100644
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -205,7 +205,9 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index)
-
- ret = vsp1_video_init(video, &rpf->entity);
- if (ret < 0)
-- goto error_video;
-+ goto error;
-+
-+ rpf->entity.video = video;
-
- /* Connect the video device to the RPF. */
- ret = media_entity_create_link(&rpf->video.video.entity, 0,
-@@ -214,13 +216,11 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index)
- MEDIA_LNK_FL_ENABLED |
- MEDIA_LNK_FL_IMMUTABLE);
- if (ret < 0)
-- goto error_link;
-+ goto error;
-
- return rpf;
-
--error_link:
-- vsp1_video_cleanup(video);
--error_video:
-- media_entity_cleanup(&rpf->entity.subdev.entity);
-+error:
-+ vsp1_entity_destroy(&rpf->entity);
- return ERR_PTR(ret);
- }
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index 1294340dcb36..36c479362f8c 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -216,7 +216,9 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index)
-
- ret = vsp1_video_init(video, &wpf->entity);
- if (ret < 0)
-- goto error_video;
-+ goto error;
-+
-+ wpf->entity.video = video;
-
- /* Connect the video device to the WPF. All connections are immutable
- * except for the WPF0 source link if a LIF is present.
-@@ -229,15 +231,13 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index)
- RWPF_PAD_SOURCE,
- &wpf->video.video.entity, 0, flags);
- if (ret < 0)
-- goto error_link;
-+ goto error;
-
- wpf->entity.sink = &wpf->video.video.entity;
-
- return wpf;
-
--error_link:
-- vsp1_video_cleanup(video);
--error_video:
-- media_entity_cleanup(&wpf->entity.subdev.entity);
-+error:
-+ vsp1_entity_destroy(&wpf->entity);
- return ERR_PTR(ret);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0775-media-v4l-vsp1-Propagate-vsp1_device_get-errors-to-t.patch b/patches.renesas/0775-media-v4l-vsp1-Propagate-vsp1_device_get-errors-to-t.patch
deleted file mode 100644
index 0a620e1169774..0000000000000
--- a/patches.renesas/0775-media-v4l-vsp1-Propagate-vsp1_device_get-errors-to-t.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From f8daafd4fae32c108caa34ed7c32c7221289740d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sat, 31 May 2014 08:50:32 -0300
-Subject: [media] v4l: vsp1: Propagate vsp1_device_get errors to the callers
-
-Modify the vsp1_device_get() function to return an error code instead of
-a pointer to the VSP1 device, and use the return value in the callers.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 4c16d6a079a4c9a64d664cc9c30ebae5f0bd0c64)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1.h | 2 +-
- drivers/media/platform/vsp1/vsp1_drv.c | 16 ++++++----------
- drivers/media/platform/vsp1/vsp1_video.c | 4 ++--
- 3 files changed, 9 insertions(+), 13 deletions(-)
-
---- a/drivers/media/platform/vsp1/vsp1.h
-+++ b/drivers/media/platform/vsp1/vsp1.h
-@@ -66,7 +66,7 @@ struct vsp1_device {
- struct media_device media_dev;
- };
-
--struct vsp1_device *vsp1_device_get(struct vsp1_device *vsp1);
-+int vsp1_device_get(struct vsp1_device *vsp1);
- void vsp1_device_put(struct vsp1_device *vsp1);
-
- static inline u32 vsp1_read(struct vsp1_device *vsp1, u32 reg)
---- a/drivers/media/platform/vsp1/vsp1_drv.c
-+++ b/drivers/media/platform/vsp1/vsp1_drv.c
-@@ -345,36 +345,32 @@ static int vsp1_device_init(struct vsp1_
- * Increment the VSP1 reference count and initialize the device if the first
- * reference is taken.
- *
-- * Return a pointer to the VSP1 device or NULL if an error occurred.
-+ * Return 0 on success or a negative error code otherwise.
- */
--struct vsp1_device *vsp1_device_get(struct vsp1_device *vsp1)
-+int vsp1_device_get(struct vsp1_device *vsp1)
- {
-- struct vsp1_device *__vsp1 = vsp1;
-- int ret;
-+ int ret = 0;
-
- mutex_lock(&vsp1->lock);
- if (vsp1->ref_count > 0)
- goto done;
-
- ret = clk_prepare_enable(vsp1->clock);
-- if (ret < 0) {
-- __vsp1 = NULL;
-+ if (ret < 0)
- goto done;
-- }
-
- ret = vsp1_device_init(vsp1);
- if (ret < 0) {
- clk_disable_unprepare(vsp1->clock);
-- __vsp1 = NULL;
- goto done;
- }
-
- done:
-- if (__vsp1)
-+ if (!ret)
- vsp1->ref_count++;
-
- mutex_unlock(&vsp1->lock);
-- return __vsp1;
-+ return ret;
- }
-
- /*
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -957,8 +957,8 @@ static int vsp1_video_open(struct file *
-
- file->private_data = vfh;
-
-- if (!vsp1_device_get(video->vsp1)) {
-- ret = -EBUSY;
-+ ret = vsp1_device_get(video->vsp1);
-+ if (ret < 0) {
- v4l2_fh_del(vfh);
- kfree(vfh);
- }
diff --git a/patches.renesas/0776-media-v4l-vsp1-Setup-control-handler-automatically-a.patch b/patches.renesas/0776-media-v4l-vsp1-Setup-control-handler-automatically-a.patch
deleted file mode 100644
index 7f11c3a8e665d..0000000000000
--- a/patches.renesas/0776-media-v4l-vsp1-Setup-control-handler-automatically-a.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From 51e64f84d5cda37988092bfba75413931f6809d8 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sat, 31 May 2014 10:40:51 -0300
-Subject: [media] v4l: vsp1: Setup control handler automatically at stream on
- time
-
-When setting a control directly on a subdev node the VSP1 driver doesn't
-guarantee that the device is powered on. This leads to crashes when the
-control handlers writes to hardware registers. One easy way to fix this
-is to ensure that the device gets powered on when a subdev node is
-opened. However, this consumes power unnecessarily, as there's no need
-to power the device on when setting formats on the pipeline.
-Furthermore, control handler setup at entity init time suffers from the
-same problem as the device isn't powered on easier.
-
-Fix this by extend the entity base object to setup the control handler
-automatically when starting the stream. Entities must then skip writing
-to registers in the set control handler when not streaming, which can be
-tested with the new vsp1_entity_is_streaming() helper function.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 960de2cff49a4e5f45e6a60175f4298cc34dc526)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_entity.c | 39 +++++++++++++++++++++++++++++++
- drivers/media/platform/vsp1/vsp1_entity.h | 7 ++++++
- 2 files changed, 46 insertions(+)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.c b/drivers/media/platform/vsp1/vsp1_entity.c
-index ceac0d7e5643..79af71d5e270 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.c
-+++ b/drivers/media/platform/vsp1/vsp1_entity.c
-@@ -22,6 +22,41 @@
- #include "vsp1_entity.h"
- #include "vsp1_video.h"
-
-+bool vsp1_entity_is_streaming(struct vsp1_entity *entity)
-+{
-+ bool streaming;
-+
-+ mutex_lock(&entity->lock);
-+ streaming = entity->streaming;
-+ mutex_unlock(&entity->lock);
-+
-+ return streaming;
-+}
-+
-+int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming)
-+{
-+ int ret;
-+
-+ mutex_lock(&entity->lock);
-+ entity->streaming = streaming;
-+ mutex_unlock(&entity->lock);
-+
-+ if (!streaming)
-+ return 0;
-+
-+ if (!entity->subdev.ctrl_handler)
-+ return 0;
-+
-+ ret = v4l2_ctrl_handler_setup(entity->subdev.ctrl_handler);
-+ if (ret < 0) {
-+ mutex_lock(&entity->lock);
-+ entity->streaming = false;
-+ mutex_unlock(&entity->lock);
-+ }
-+
-+ return ret;
-+}
-+
- /* -----------------------------------------------------------------------------
- * V4L2 Subdevice Operations
- */
-@@ -158,6 +193,8 @@ int vsp1_entity_init(struct vsp1_device *vsp1, struct vsp1_entity *entity,
- if (i == ARRAY_SIZE(vsp1_routes))
- return -EINVAL;
-
-+ mutex_init(&entity->lock);
-+
- entity->vsp1 = vsp1;
- entity->source_pad = num_pads - 1;
-
-@@ -191,4 +228,6 @@ void vsp1_entity_destroy(struct vsp1_entity *entity)
- if (entity->subdev.ctrl_handler)
- v4l2_ctrl_handler_free(entity->subdev.ctrl_handler);
- media_entity_cleanup(&entity->subdev.entity);
-+
-+ mutex_destroy(&entity->lock);
- }
-diff --git a/drivers/media/platform/vsp1/vsp1_entity.h b/drivers/media/platform/vsp1/vsp1_entity.h
-index f0257f68f16a..aa20aaa58208 100644
---- a/drivers/media/platform/vsp1/vsp1_entity.h
-+++ b/drivers/media/platform/vsp1/vsp1_entity.h
-@@ -14,6 +14,7 @@
- #define __VSP1_ENTITY_H__
-
- #include <linux/list.h>
-+#include <linux/mutex.h>
-
- #include <media/v4l2-subdev.h>
-
-@@ -71,6 +72,9 @@ struct vsp1_entity {
- struct v4l2_mbus_framefmt *formats;
-
- struct vsp1_video *video;
-+
-+ struct mutex lock; /* Protects the streaming field */
-+ bool streaming;
- };
-
- static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev)
-@@ -92,4 +96,7 @@ vsp1_entity_get_pad_format(struct vsp1_entity *entity,
- void vsp1_entity_init_formats(struct v4l2_subdev *subdev,
- struct v4l2_subdev_fh *fh);
-
-+bool vsp1_entity_is_streaming(struct vsp1_entity *entity);
-+int vsp1_entity_set_streaming(struct vsp1_entity *entity, bool streaming);
-+
- #endif /* __VSP1_ENTITY_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0777-media-v4l-vsp1-sru-Fix-the-intensity-control-default.patch b/patches.renesas/0777-media-v4l-vsp1-sru-Fix-the-intensity-control-default.patch
deleted file mode 100644
index 64ed4ef11e114..0000000000000
--- a/patches.renesas/0777-media-v4l-vsp1-sru-Fix-the-intensity-control-default.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 4c1e78b8096fe5396353349d746ada5afff13722 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 21 May 2014 19:00:05 -0300
-Subject: [media] v4l: vsp1: sru: Fix the intensity control default value
-
-The default value isn't set and defaults to 0, which isn't in the 1-6
-min-max range. Fix it by setting the default value to 1.
-
-This shoud have been caught when checking the control handler error
-field at initialization time, but the check was missing. Add it.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit a1606102dafe6942905e97a88ceea9a60e1a2c7d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_sru.c | 12 +++++++++++-
- 1 file changed, 11 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_sru.c b/drivers/media/platform/vsp1/vsp1_sru.c
-index aa0e04c56f3f..18e127accf25 100644
---- a/drivers/media/platform/vsp1/vsp1_sru.c
-+++ b/drivers/media/platform/vsp1/vsp1_sru.c
-@@ -67,6 +67,7 @@ static const struct v4l2_ctrl_config sru_intensity_control = {
- .type = V4L2_CTRL_TYPE_INTEGER,
- .min = 1,
- .max = 6,
-+ .def = 1,
- .step = 1,
- };
-
-@@ -348,8 +349,17 @@ struct vsp1_sru *vsp1_sru_create(struct vsp1_device *vsp1)
- /* Initialize the control handler. */
- v4l2_ctrl_handler_init(&sru->ctrls, 1);
- v4l2_ctrl_new_custom(&sru->ctrls, &sru_intensity_control, NULL);
-- v4l2_ctrl_handler_setup(&sru->ctrls);
-+
- sru->entity.subdev.ctrl_handler = &sru->ctrls;
-
-+ if (sru->ctrls.error) {
-+ dev_err(vsp1->dev, "sru: failed to initialize controls\n");
-+ ret = sru->ctrls.error;
-+ vsp1_entity_destroy(&sru->entity);
-+ return ERR_PTR(ret);
-+ }
-+
-+ v4l2_ctrl_handler_setup(&sru->ctrls);
-+
- return sru;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0778-media-v4l-vsp1-sru-Make-the-intensity-controllable-d.patch b/patches.renesas/0778-media-v4l-vsp1-sru-Make-the-intensity-controllable-d.patch
deleted file mode 100644
index dca633d015668..0000000000000
--- a/patches.renesas/0778-media-v4l-vsp1-sru-Make-the-intensity-controllable-d.patch
+++ /dev/null
@@ -1,195 +0,0 @@
-From 3697a459a5f6d05a073f312be4ec1bba7a77ce21 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Sat, 31 May 2014 20:30:11 -0300
-Subject: [media] v4l: vsp1: sru: Make the intensity controllable during
- streaming
-
-The control value is currently stored in the SRU structure by the
-control set handler and written to the hardware at stream on time,
-making control set during streaming ineffective. Fix it by writing to
-the registers from within the control set handler.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 58f896d859ce555dd3684f439f8a65bfda437533)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_regs.h | 2 +
- drivers/media/platform/vsp1/vsp1_sru.c | 101 +++++++++++++++++++-------------
- drivers/media/platform/vsp1/vsp1_sru.h | 1 -
- 3 files changed, 61 insertions(+), 43 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_regs.h b/drivers/media/platform/vsp1/vsp1_regs.h
-index 3e74b44286f6..55f163d32d15 100644
---- a/drivers/media/platform/vsp1/vsp1_regs.h
-+++ b/drivers/media/platform/vsp1/vsp1_regs.h
-@@ -336,7 +336,9 @@
- */
-
- #define VI6_SRU_CTRL0 0x2200
-+#define VI6_SRU_CTRL0_PARAM0_MASK (0x1ff << 16)
- #define VI6_SRU_CTRL0_PARAM0_SHIFT 16
-+#define VI6_SRU_CTRL0_PARAM1_MASK (0x1f << 8)
- #define VI6_SRU_CTRL0_PARAM1_SHIFT 8
- #define VI6_SRU_CTRL0_MODE_UPSCALE (4 << 4)
- #define VI6_SRU_CTRL0_PARAM2 (1 << 3)
-diff --git a/drivers/media/platform/vsp1/vsp1_sru.c b/drivers/media/platform/vsp1/vsp1_sru.c
-index 18e127accf25..b7d3c8b9f189 100644
---- a/drivers/media/platform/vsp1/vsp1_sru.c
-+++ b/drivers/media/platform/vsp1/vsp1_sru.c
-@@ -42,39 +42,6 @@ static inline void vsp1_sru_write(struct vsp1_sru *sru, u32 reg, u32 data)
-
- #define V4L2_CID_VSP1_SRU_INTENSITY (V4L2_CID_USER_BASE + 1)
-
--static int sru_s_ctrl(struct v4l2_ctrl *ctrl)
--{
-- struct vsp1_sru *sru =
-- container_of(ctrl->handler, struct vsp1_sru, ctrls);
--
-- switch (ctrl->id) {
-- case V4L2_CID_VSP1_SRU_INTENSITY:
-- sru->intensity = ctrl->val;
-- break;
-- }
--
-- return 0;
--}
--
--static const struct v4l2_ctrl_ops sru_ctrl_ops = {
-- .s_ctrl = sru_s_ctrl,
--};
--
--static const struct v4l2_ctrl_config sru_intensity_control = {
-- .ops = &sru_ctrl_ops,
-- .id = V4L2_CID_VSP1_SRU_INTENSITY,
-- .name = "Intensity",
-- .type = V4L2_CTRL_TYPE_INTEGER,
-- .min = 1,
-- .max = 6,
-- .def = 1,
-- .step = 1,
--};
--
--/* -----------------------------------------------------------------------------
-- * V4L2 Subdevice Core Operations
-- */
--
- struct vsp1_sru_param {
- u32 ctrl0;
- u32 ctrl2;
-@@ -111,22 +78,66 @@ static const struct vsp1_sru_param vsp1_sru_params[] = {
- },
- };
-
-+static int sru_s_ctrl(struct v4l2_ctrl *ctrl)
-+{
-+ struct vsp1_sru *sru =
-+ container_of(ctrl->handler, struct vsp1_sru, ctrls);
-+ const struct vsp1_sru_param *param;
-+ u32 value;
-+
-+ switch (ctrl->id) {
-+ case V4L2_CID_VSP1_SRU_INTENSITY:
-+ param = &vsp1_sru_params[ctrl->val - 1];
-+
-+ value = vsp1_sru_read(sru, VI6_SRU_CTRL0);
-+ value &= ~(VI6_SRU_CTRL0_PARAM0_MASK |
-+ VI6_SRU_CTRL0_PARAM1_MASK);
-+ value |= param->ctrl0;
-+ vsp1_sru_write(sru, VI6_SRU_CTRL0, value);
-+
-+ vsp1_sru_write(sru, VI6_SRU_CTRL2, param->ctrl2);
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+static const struct v4l2_ctrl_ops sru_ctrl_ops = {
-+ .s_ctrl = sru_s_ctrl,
-+};
-+
-+static const struct v4l2_ctrl_config sru_intensity_control = {
-+ .ops = &sru_ctrl_ops,
-+ .id = V4L2_CID_VSP1_SRU_INTENSITY,
-+ .name = "Intensity",
-+ .type = V4L2_CTRL_TYPE_INTEGER,
-+ .min = 1,
-+ .max = 6,
-+ .def = 1,
-+ .step = 1,
-+};
-+
-+/* -----------------------------------------------------------------------------
-+ * V4L2 Subdevice Core Operations
-+ */
-+
- static int sru_s_stream(struct v4l2_subdev *subdev, int enable)
- {
- struct vsp1_sru *sru = to_sru(subdev);
-- const struct vsp1_sru_param *param;
- struct v4l2_mbus_framefmt *input;
- struct v4l2_mbus_framefmt *output;
-- bool upscale;
- u32 ctrl0;
-+ int ret;
-+
-+ ret = vsp1_entity_set_streaming(&sru->entity, enable);
-+ if (ret < 0)
-+ return ret;
-
- if (!enable)
- return 0;
-
- input = &sru->entity.formats[SRU_PAD_SINK];
- output = &sru->entity.formats[SRU_PAD_SOURCE];
-- upscale = input->width != output->width;
-- param = &vsp1_sru_params[sru->intensity];
-
- if (input->code == V4L2_MBUS_FMT_ARGB8888_1X32)
- ctrl0 = VI6_SRU_CTRL0_PARAM2 | VI6_SRU_CTRL0_PARAM3
-@@ -134,10 +145,18 @@ static int sru_s_stream(struct v4l2_subdev *subdev, int enable)
- else
- ctrl0 = VI6_SRU_CTRL0_PARAM3;
-
-- vsp1_sru_write(sru, VI6_SRU_CTRL0, param->ctrl0 | ctrl0 |
-- (upscale ? VI6_SRU_CTRL0_MODE_UPSCALE : 0));
-+ if (input->width != output->width)
-+ ctrl0 |= VI6_SRU_CTRL0_MODE_UPSCALE;
-+
-+ /* Take the control handler lock to ensure that the CTRL0 value won't be
-+ * changed behind our back by a set control operation.
-+ */
-+ mutex_lock(sru->ctrls.lock);
-+ ctrl0 |= vsp1_sru_read(sru, VI6_SRU_CTRL0)
-+ & (VI6_SRU_CTRL0_PARAM0_MASK | VI6_SRU_CTRL0_PARAM1_MASK);
-+ mutex_unlock(sru->ctrls.lock);
-+
- vsp1_sru_write(sru, VI6_SRU_CTRL1, VI6_SRU_CTRL1_PARAM5);
-- vsp1_sru_write(sru, VI6_SRU_CTRL2, param->ctrl2);
-
- return 0;
- }
-@@ -359,7 +378,5 @@ struct vsp1_sru *vsp1_sru_create(struct vsp1_device *vsp1)
- return ERR_PTR(ret);
- }
-
-- v4l2_ctrl_handler_setup(&sru->ctrls);
--
- return sru;
- }
-diff --git a/drivers/media/platform/vsp1/vsp1_sru.h b/drivers/media/platform/vsp1/vsp1_sru.h
-index 381870b74780..b6768bf3dc47 100644
---- a/drivers/media/platform/vsp1/vsp1_sru.h
-+++ b/drivers/media/platform/vsp1/vsp1_sru.h
-@@ -28,7 +28,6 @@ struct vsp1_sru {
- struct vsp1_entity entity;
-
- struct v4l2_ctrl_handler ctrls;
-- unsigned int intensity;
- };
-
- static inline struct vsp1_sru *to_sru(struct v4l2_subdev *subdev)
---
-2.1.2
-
diff --git a/patches.renesas/0779-media-v4l-vsp1-wpf-Simplify-cast-to-pipeline-structu.patch b/patches.renesas/0779-media-v4l-vsp1-wpf-Simplify-cast-to-pipeline-structu.patch
deleted file mode 100644
index 55bd37a0cdd95..0000000000000
--- a/patches.renesas/0779-media-v4l-vsp1-wpf-Simplify-cast-to-pipeline-structu.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From c48ecd0468431136c63521b711089a6fa146aa7b Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 20:35:36 -0300
-Subject: [media] v4l: vsp1: wpf: Simplify cast to pipeline structure
-
-Use the subdev pointer directly to_vsp1_pipeline() macro instead of
-casting from the subdev to the wpf object and back to the subdev.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 5aeb01adbea81e858318072097d98fc44578c7be)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_wpf.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index 36c479362f8c..591f09ca3aff 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -44,9 +44,8 @@ static inline void vsp1_wpf_write(struct vsp1_rwpf *wpf, u32 reg, u32 data)
-
- static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
- {
-+ struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity);
- struct vsp1_rwpf *wpf = to_rwpf(subdev);
-- struct vsp1_pipeline *pipe =
-- to_vsp1_pipeline(&wpf->entity.subdev.entity);
- struct vsp1_device *vsp1 = wpf->entity.vsp1;
- const struct v4l2_rect *crop = &wpf->crop;
- unsigned int i;
---
-2.1.2
-
diff --git a/patches.renesas/0780-media-v4l-vsp1-wpf-Clear-RPF-to-WPF-association-at-s.patch b/patches.renesas/0780-media-v4l-vsp1-wpf-Clear-RPF-to-WPF-association-at-s.patch
deleted file mode 100644
index edc8bc7102e17..0000000000000
--- a/patches.renesas/0780-media-v4l-vsp1-wpf-Clear-RPF-to-WPF-association-at-s.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 83ec3513da89e0c00efff9346c2acf6af6aadb2d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 28 May 2014 13:10:33 -0300
-Subject: [media] v4l: vsp1: wpf: Clear RPF to WPF association at stream off
- time
-
-The VSP1 stores the video pipelines' input (RPF) to output (WPF)
-mappings in a WPF register. An RPF must never be associated with
-multiple WPFs, even if all of those WPFs but one are unused, otherwise
-the hardware won't function properly.
-
-The driver doesn't ensure this correctly as it never clears the
-mappings. An RPF used with one WPF and later with a different WPF will
-lead to malfunction, as it will be associated with two WPFs. Clear the
-mappings at stream off time to fix this.
-
-Reported-by: Damian Hobson-Garcia <dhobsong@igel.co.jp>
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit d6c71e8ceb9fe79aaf9c2f73af5cb2ef93526b0d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_wpf.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index 591f09ca3aff..d33086530778 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -54,6 +54,7 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
-
- if (!enable) {
- vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), 0);
-+ vsp1_wpf_write(wpf, VI6_WPF_SRCRPF, 0);
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0781-media-v4l-vsp1-Switch-to-XRGB-formats.patch b/patches.renesas/0781-media-v4l-vsp1-Switch-to-XRGB-formats.patch
deleted file mode 100644
index 96b7ffad6ef4f..0000000000000
--- a/patches.renesas/0781-media-v4l-vsp1-Switch-to-XRGB-formats.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 540f5f407cedbe0b057478689c63d0da5f81838e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 26 May 2014 19:57:21 -0300
-Subject: [media] v4l: vsp1: Switch to XRGB formats
-
-The driver ignores the alpha component on output video nodes and
-hardcodes the alpha component to 0 on capture video nodes. Make this
-explicit by exposing XRGB formats.
-
-Compatibility with existing userspace applications is handled by
-selecting the XRGB format corresponding to the requested old RGB format.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 56bfef3e72cf4a98d0e8f56129673146733c1366)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_video.c | 26 ++++++++++++++++++++++----
- 1 file changed, 22 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index 062e13d00088..8c286e8a2638 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -51,11 +51,11 @@ static const struct vsp1_format_info vsp1_video_formats[] = {
- VI6_FMT_RGB_332, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
- 1, { 8, 0, 0 }, false, false, 1, 1 },
-- { V4L2_PIX_FMT_RGB444, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ { V4L2_PIX_FMT_XRGB444, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_XRGB_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS,
- 1, { 16, 0, 0 }, false, false, 1, 1 },
-- { V4L2_PIX_FMT_RGB555, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ { V4L2_PIX_FMT_XRGB555, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_XRGB_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS,
- 1, { 16, 0, 0 }, false, false, 1, 1 },
-@@ -71,10 +71,10 @@ static const struct vsp1_format_info vsp1_video_formats[] = {
- VI6_FMT_RGB_888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
- 1, { 24, 0, 0 }, false, false, 1, 1 },
-- { V4L2_PIX_FMT_BGR32, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ { V4L2_PIX_FMT_XBGR32, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
- 1, { 32, 0, 0 }, false, false, 1, 1 },
-- { V4L2_PIX_FMT_RGB32, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ { V4L2_PIX_FMT_XRGB32, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
- 1, { 32, 0, 0 }, false, false, 1, 1 },
-@@ -181,11 +181,29 @@ static int __vsp1_video_try_format(struct vsp1_video *video,
- struct v4l2_pix_format_mplane *pix,
- const struct vsp1_format_info **fmtinfo)
- {
-+ static const u32 xrgb_formats[][2] = {
-+ { V4L2_PIX_FMT_RGB444, V4L2_PIX_FMT_XRGB444 },
-+ { V4L2_PIX_FMT_RGB555, V4L2_PIX_FMT_XRGB555 },
-+ { V4L2_PIX_FMT_BGR32, V4L2_PIX_FMT_XBGR32 },
-+ { V4L2_PIX_FMT_RGB32, V4L2_PIX_FMT_XRGB32 },
-+ };
-+
- const struct vsp1_format_info *info;
- unsigned int width = pix->width;
- unsigned int height = pix->height;
- unsigned int i;
-
-+ /* Backward compatibility: replace deprecated RGB formats by their XRGB
-+ * equivalent. This selects the format older userspace applications want
-+ * while still exposing the new format.
-+ */
-+ for (i = 0; i < ARRAY_SIZE(xrgb_formats); ++i) {
-+ if (xrgb_formats[i][0] == pix->pixelformat) {
-+ pix->pixelformat = xrgb_formats[i][1];
-+ break;
-+ }
-+ }
-+
- /* Retrieve format information and select the default format if the
- * requested format isn't supported.
- */
---
-2.1.2
-
diff --git a/patches.renesas/0782-media-v4l-vsp1-Add-alpha-channel-support-to-the-memo.patch b/patches.renesas/0782-media-v4l-vsp1-Add-alpha-channel-support-to-the-memo.patch
deleted file mode 100644
index e7585241f0fbe..0000000000000
--- a/patches.renesas/0782-media-v4l-vsp1-Add-alpha-channel-support-to-the-memo.patch
+++ /dev/null
@@ -1,182 +0,0 @@
-From f975561360d5c386774563bcaeaf04502c5a4e23 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Mon, 26 May 2014 20:12:53 -0300
-Subject: [media] v4l: vsp1: Add alpha channel support to the memory ports
-
-Support ARGB formats on the RPF side by reading the alpha component from
-memory and on the WPF side by writing it to memory.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 7a52b6dea8e9559428149fbed0cddd587004006e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_rpf.c | 8 ++++--
- drivers/media/platform/vsp1/vsp1_video.c | 49 +++++++++++++++++++++-----------
- drivers/media/platform/vsp1/vsp1_video.h | 2 ++
- drivers/media/platform/vsp1/vsp1_wpf.c | 2 ++
- 4 files changed, 41 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
-index 9b3fc70e18f0..2824f5354f55 100644
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -101,10 +101,12 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable)
- (rpf->location.left << VI6_RPF_LOC_HCOORD_SHIFT) |
- (rpf->location.top << VI6_RPF_LOC_VCOORD_SHIFT));
-
-- /* Disable alpha, mask and color key. Set the alpha channel to a fixed
-- * value of 255.
-+ /* Use the alpha channel (extended to 8 bits) when available or a
-+ * hardcoded 255 value otherwise. Disable color keying.
- */
-- vsp1_rpf_write(rpf, VI6_RPF_ALPH_SEL, VI6_RPF_ALPH_SEL_ASEL_FIXED);
-+ vsp1_rpf_write(rpf, VI6_RPF_ALPH_SEL, VI6_RPF_ALPH_SEL_AEXT_EXT |
-+ (fmtinfo->alpha ? VI6_RPF_ALPH_SEL_ASEL_PACKED
-+ : VI6_RPF_ALPH_SEL_ASEL_FIXED));
- vsp1_rpf_write(rpf, VI6_RPF_VRTCOL_SET,
- 255 << VI6_RPF_VRTCOL_SET_LAYA_SHIFT);
- vsp1_rpf_write(rpf, VI6_RPF_MSK_CTRL, 0);
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index 8c286e8a2638..10f8944f0c13 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -50,70 +50,85 @@ static const struct vsp1_format_info vsp1_video_formats[] = {
- { V4L2_PIX_FMT_RGB332, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_RGB_332, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 8, 0, 0 }, false, false, 1, 1 },
-+ 1, { 8, 0, 0 }, false, false, 1, 1, false },
-+ { V4L2_PIX_FMT_ARGB444, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ VI6_FMT_ARGB_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
-+ VI6_RPF_DSWAP_P_WDS,
-+ 1, { 16, 0, 0 }, false, false, 1, 1, true },
- { V4L2_PIX_FMT_XRGB444, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_XRGB_4444, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS,
-- 1, { 16, 0, 0 }, false, false, 1, 1 },
-+ 1, { 16, 0, 0 }, false, false, 1, 1, true },
-+ { V4L2_PIX_FMT_ARGB555, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ VI6_FMT_ARGB_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
-+ VI6_RPF_DSWAP_P_WDS,
-+ 1, { 16, 0, 0 }, false, false, 1, 1, true },
- { V4L2_PIX_FMT_XRGB555, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_XRGB_1555, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS,
-- 1, { 16, 0, 0 }, false, false, 1, 1 },
-+ 1, { 16, 0, 0 }, false, false, 1, 1, false },
- { V4L2_PIX_FMT_RGB565, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_RGB_565, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS,
-- 1, { 16, 0, 0 }, false, false, 1, 1 },
-+ 1, { 16, 0, 0 }, false, false, 1, 1, false },
- { V4L2_PIX_FMT_BGR24, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_BGR_888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 24, 0, 0 }, false, false, 1, 1 },
-+ 1, { 24, 0, 0 }, false, false, 1, 1, false },
- { V4L2_PIX_FMT_RGB24, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_RGB_888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 24, 0, 0 }, false, false, 1, 1 },
-+ 1, { 24, 0, 0 }, false, false, 1, 1, false },
-+ { V4L2_PIX_FMT_ABGR32, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
-+ 1, { 32, 0, 0 }, false, false, 1, 1, true },
- { V4L2_PIX_FMT_XBGR32, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS,
-- 1, { 32, 0, 0 }, false, false, 1, 1 },
-+ 1, { 32, 0, 0 }, false, false, 1, 1, false },
-+ { V4L2_PIX_FMT_ARGB32, V4L2_MBUS_FMT_ARGB8888_1X32,
-+ VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
-+ VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-+ 1, { 32, 0, 0 }, false, false, 1, 1, true },
- { V4L2_PIX_FMT_XRGB32, V4L2_MBUS_FMT_ARGB8888_1X32,
- VI6_FMT_ARGB_8888, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 32, 0, 0 }, false, false, 1, 1 },
-+ 1, { 32, 0, 0 }, false, false, 1, 1, false },
- { V4L2_PIX_FMT_UYVY, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 16, 0, 0 }, false, false, 2, 1 },
-+ 1, { 16, 0, 0 }, false, false, 2, 1, false },
- { V4L2_PIX_FMT_VYUY, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 16, 0, 0 }, false, true, 2, 1 },
-+ 1, { 16, 0, 0 }, false, true, 2, 1, false },
- { V4L2_PIX_FMT_YUYV, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 16, 0, 0 }, true, false, 2, 1 },
-+ 1, { 16, 0, 0 }, true, false, 2, 1, false },
- { V4L2_PIX_FMT_YVYU, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_YUYV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 1, { 16, 0, 0 }, true, true, 2, 1 },
-+ 1, { 16, 0, 0 }, true, true, 2, 1, false },
- { V4L2_PIX_FMT_NV12M, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_Y_UV_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 2, { 8, 16, 0 }, false, false, 2, 2 },
-+ 2, { 8, 16, 0 }, false, false, 2, 2, false },
- { V4L2_PIX_FMT_NV21M, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_Y_UV_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 2, { 8, 16, 0 }, false, true, 2, 2 },
-+ 2, { 8, 16, 0 }, false, true, 2, 2, false },
- { V4L2_PIX_FMT_NV16M, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_Y_UV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 2, { 8, 16, 0 }, false, false, 2, 1 },
-+ 2, { 8, 16, 0 }, false, false, 2, 1, false },
- { V4L2_PIX_FMT_NV61M, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_Y_UV_422, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 2, { 8, 16, 0 }, false, true, 2, 1 },
-+ 2, { 8, 16, 0 }, false, true, 2, 1, false },
- { V4L2_PIX_FMT_YUV420M, V4L2_MBUS_FMT_AYUV8_1X32,
- VI6_FMT_Y_U_V_420, VI6_RPF_DSWAP_P_LLS | VI6_RPF_DSWAP_P_LWS |
- VI6_RPF_DSWAP_P_WDS | VI6_RPF_DSWAP_P_BTS,
-- 3, { 8, 8, 8 }, false, false, 2, 2 },
-+ 3, { 8, 8, 8 }, false, false, 2, 2, false },
- };
-
- /*
-diff --git a/drivers/media/platform/vsp1/vsp1_video.h b/drivers/media/platform/vsp1/vsp1_video.h
-index 8464cd913760..1c3ec53914b6 100644
---- a/drivers/media/platform/vsp1/vsp1_video.h
-+++ b/drivers/media/platform/vsp1/vsp1_video.h
-@@ -33,6 +33,7 @@ struct vsp1_video;
- * @swap_uv: the U and V components are swapped (V comes before U)
- * @hsub: horizontal subsampling factor
- * @vsub: vertical subsampling factor
-+ * @alpha: has an alpha channel
- */
- struct vsp1_format_info {
- u32 fourcc;
-@@ -45,6 +46,7 @@ struct vsp1_format_info {
- bool swap_uv;
- unsigned int hsub;
- unsigned int vsub;
-+ bool alpha;
- };
-
- enum vsp1_pipeline_state {
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index d33086530778..a2ba10721f1b 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -99,6 +99,8 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
-
- outfmt = fmtinfo->hwfmt << VI6_WPF_OUTFMT_WRFMT_SHIFT;
-
-+ if (fmtinfo->alpha)
-+ outfmt |= VI6_WPF_OUTFMT_PXA;
- if (fmtinfo->swap_yc)
- outfmt |= VI6_WPF_OUTFMT_SPYCS;
- if (fmtinfo->swap_uv)
---
-2.1.2
-
diff --git a/patches.renesas/0783-media-v4l-vsp1-Add-V4L2_CID_ALPHA_COMPONENT-control-.patch b/patches.renesas/0783-media-v4l-vsp1-Add-V4L2_CID_ALPHA_COMPONENT-control-.patch
deleted file mode 100644
index 27a005bcfdb0d..0000000000000
--- a/patches.renesas/0783-media-v4l-vsp1-Add-V4L2_CID_ALPHA_COMPONENT-control-.patch
+++ /dev/null
@@ -1,216 +0,0 @@
-From 7fa2f015c02889f190b18ff459f6cf50e8497891 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 21 May 2014 19:00:05 -0300
-Subject: [media] v4l: vsp1: Add V4L2_CID_ALPHA_COMPONENT control support
-
-The control is used to configure the fixed alpha channel value, when
-reading from memory in the RPF or writing to memory in the WPF.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 7578c204620c8e25ec6e4849cd12098f831a14d0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_rpf.c | 52 ++++++++++++++++++++++++++++---
- drivers/media/platform/vsp1/vsp1_rwpf.h | 2 ++
- drivers/media/platform/vsp1/vsp1_wpf.c | 54 +++++++++++++++++++++++++++++++++
- 3 files changed, 104 insertions(+), 4 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_rpf.c b/drivers/media/platform/vsp1/vsp1_rpf.c
-index 2824f5354f55..576779f2332b 100644
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -39,6 +39,32 @@ static inline void vsp1_rpf_write(struct vsp1_rwpf *rpf, u32 reg, u32 data)
- }
-
- /* -----------------------------------------------------------------------------
-+ * Controls
-+ */
-+
-+static int rpf_s_ctrl(struct v4l2_ctrl *ctrl)
-+{
-+ struct vsp1_rwpf *rpf =
-+ container_of(ctrl->handler, struct vsp1_rwpf, ctrls);
-+
-+ if (!vsp1_entity_is_streaming(&rpf->entity))
-+ return 0;
-+
-+ switch (ctrl->id) {
-+ case V4L2_CID_ALPHA_COMPONENT:
-+ vsp1_rpf_write(rpf, VI6_RPF_VRTCOL_SET,
-+ ctrl->val << VI6_RPF_VRTCOL_SET_LAYA_SHIFT);
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+static const struct v4l2_ctrl_ops rpf_ctrl_ops = {
-+ .s_ctrl = rpf_s_ctrl,
-+};
-+
-+/* -----------------------------------------------------------------------------
- * V4L2 Subdevice Core Operations
- */
-
-@@ -50,6 +76,11 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable)
- const struct v4l2_rect *crop = &rpf->crop;
- u32 pstride;
- u32 infmt;
-+ int ret;
-+
-+ ret = vsp1_entity_set_streaming(&rpf->entity, enable);
-+ if (ret < 0)
-+ return ret;
-
- if (!enable)
- return 0;
-@@ -101,14 +132,13 @@ static int rpf_s_stream(struct v4l2_subdev *subdev, int enable)
- (rpf->location.left << VI6_RPF_LOC_HCOORD_SHIFT) |
- (rpf->location.top << VI6_RPF_LOC_VCOORD_SHIFT));
-
-- /* Use the alpha channel (extended to 8 bits) when available or a
-- * hardcoded 255 value otherwise. Disable color keying.
-+ /* Use the alpha channel (extended to 8 bits) when available or an
-+ * alpha value set through the V4L2_CID_ALPHA_COMPONENT control
-+ * otherwise. Disable color keying.
- */
- vsp1_rpf_write(rpf, VI6_RPF_ALPH_SEL, VI6_RPF_ALPH_SEL_AEXT_EXT |
- (fmtinfo->alpha ? VI6_RPF_ALPH_SEL_ASEL_PACKED
- : VI6_RPF_ALPH_SEL_ASEL_FIXED));
-- vsp1_rpf_write(rpf, VI6_RPF_VRTCOL_SET,
-- 255 << VI6_RPF_VRTCOL_SET_LAYA_SHIFT);
- vsp1_rpf_write(rpf, VI6_RPF_MSK_CTRL, 0);
- vsp1_rpf_write(rpf, VI6_RPF_CKEY_CTRL, 0);
-
-@@ -198,6 +228,20 @@ struct vsp1_rwpf *vsp1_rpf_create(struct vsp1_device *vsp1, unsigned int index)
-
- vsp1_entity_init_formats(subdev, NULL);
-
-+ /* Initialize the control handler. */
-+ v4l2_ctrl_handler_init(&rpf->ctrls, 1);
-+ v4l2_ctrl_new_std(&rpf->ctrls, &rpf_ctrl_ops, V4L2_CID_ALPHA_COMPONENT,
-+ 0, 255, 1, 255);
-+
-+ rpf->entity.subdev.ctrl_handler = &rpf->ctrls;
-+
-+ if (rpf->ctrls.error) {
-+ dev_err(vsp1->dev, "rpf%u: failed to initialize controls\n",
-+ index);
-+ ret = rpf->ctrls.error;
-+ goto error;
-+ }
-+
- /* Initialize the video device. */
- video = &rpf->video;
-
-diff --git a/drivers/media/platform/vsp1/vsp1_rwpf.h b/drivers/media/platform/vsp1/vsp1_rwpf.h
-index b4fb65e58770..28dd9e7b3838 100644
---- a/drivers/media/platform/vsp1/vsp1_rwpf.h
-+++ b/drivers/media/platform/vsp1/vsp1_rwpf.h
-@@ -14,6 +14,7 @@
- #define __VSP1_RWPF_H__
-
- #include <media/media-entity.h>
-+#include <media/v4l2-ctrls.h>
- #include <media/v4l2-subdev.h>
-
- #include "vsp1.h"
-@@ -26,6 +27,7 @@
- struct vsp1_rwpf {
- struct vsp1_entity entity;
- struct vsp1_video video;
-+ struct v4l2_ctrl_handler ctrls;
-
- unsigned int max_width;
- unsigned int max_height;
-diff --git a/drivers/media/platform/vsp1/vsp1_wpf.c b/drivers/media/platform/vsp1/vsp1_wpf.c
-index a2ba10721f1b..6e057762c933 100644
---- a/drivers/media/platform/vsp1/vsp1_wpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_wpf.c
-@@ -39,6 +39,35 @@ static inline void vsp1_wpf_write(struct vsp1_rwpf *wpf, u32 reg, u32 data)
- }
-
- /* -----------------------------------------------------------------------------
-+ * Controls
-+ */
-+
-+static int wpf_s_ctrl(struct v4l2_ctrl *ctrl)
-+{
-+ struct vsp1_rwpf *wpf =
-+ container_of(ctrl->handler, struct vsp1_rwpf, ctrls);
-+ u32 value;
-+
-+ if (!vsp1_entity_is_streaming(&wpf->entity))
-+ return 0;
-+
-+ switch (ctrl->id) {
-+ case V4L2_CID_ALPHA_COMPONENT:
-+ value = vsp1_wpf_read(wpf, VI6_WPF_OUTFMT);
-+ value &= ~VI6_WPF_OUTFMT_PDV_MASK;
-+ value |= ctrl->val << VI6_WPF_OUTFMT_PDV_SHIFT;
-+ vsp1_wpf_write(wpf, VI6_WPF_OUTFMT, value);
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+static const struct v4l2_ctrl_ops wpf_ctrl_ops = {
-+ .s_ctrl = wpf_s_ctrl,
-+};
-+
-+/* -----------------------------------------------------------------------------
- * V4L2 Subdevice Core Operations
- */
-
-@@ -51,6 +80,11 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
- unsigned int i;
- u32 srcrpf = 0;
- u32 outfmt = 0;
-+ int ret;
-+
-+ ret = vsp1_entity_set_streaming(&wpf->entity, enable);
-+ if (ret < 0)
-+ return ret;
-
- if (!enable) {
- vsp1_write(vsp1, VI6_WPF_IRQ_ENB(wpf->entity.index), 0);
-@@ -113,7 +147,13 @@ static int wpf_s_stream(struct v4l2_subdev *subdev, int enable)
- wpf->entity.formats[RWPF_PAD_SOURCE].code)
- outfmt |= VI6_WPF_OUTFMT_CSC;
-
-+ /* Take the control handler lock to ensure that the PDV value won't be
-+ * changed behind our back by a set control operation.
-+ */
-+ mutex_lock(wpf->ctrls.lock);
-+ outfmt |= vsp1_wpf_read(wpf, VI6_WPF_OUTFMT) & VI6_WPF_OUTFMT_PDV_MASK;
- vsp1_wpf_write(wpf, VI6_WPF_OUTFMT, outfmt);
-+ mutex_unlock(wpf->ctrls.lock);
-
- vsp1_write(vsp1, VI6_DPR_WPF_FPORCH(wpf->entity.index),
- VI6_DPR_WPF_FPORCH_FP_WPFN);
-@@ -209,6 +249,20 @@ struct vsp1_rwpf *vsp1_wpf_create(struct vsp1_device *vsp1, unsigned int index)
-
- vsp1_entity_init_formats(subdev, NULL);
-
-+ /* Initialize the control handler. */
-+ v4l2_ctrl_handler_init(&wpf->ctrls, 1);
-+ v4l2_ctrl_new_std(&wpf->ctrls, &wpf_ctrl_ops, V4L2_CID_ALPHA_COMPONENT,
-+ 0, 255, 1, 255);
-+
-+ wpf->entity.subdev.ctrl_handler = &wpf->ctrls;
-+
-+ if (wpf->ctrls.error) {
-+ dev_err(vsp1->dev, "wpf%u: failed to initialize controls\n",
-+ index);
-+ ret = wpf->ctrls.error;
-+ goto error;
-+ }
-+
- /* Initialize the video device. */
- video = &wpf->video;
-
---
-2.1.2
-
diff --git a/patches.renesas/0784-media-v4l-vsp1-bru-Support-premultiplied-alpha-at-th.patch b/patches.renesas/0784-media-v4l-vsp1-bru-Support-premultiplied-alpha-at-th.patch
deleted file mode 100644
index 171df25d9a166..0000000000000
--- a/patches.renesas/0784-media-v4l-vsp1-bru-Support-premultiplied-alpha-at-th.patch
+++ /dev/null
@@ -1,204 +0,0 @@
-From 92f005b4133a37368837ae7d234ecc3b1732f74d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 20:35:36 -0300
-Subject: [media] v4l: vsp1: bru: Support premultiplied alpha at the BRU inputs
-
-Adjust the BRU blending formula to avoid the multiplication by alpha
-when the corresponding input format is premultiplied. As this requires
-access to the RPFs connected to the BRU inputs from the BRU module,
-store pointers to the RPFs in the BRU structure when validating the
-pipeline.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 6418b4d6e1f1d70199a93eeeed948be2229b9c1a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_bru.c | 27 ++++++++++++-------
- drivers/media/platform/vsp1/vsp1_bru.h | 6 ++++-
- drivers/media/platform/vsp1/vsp1_video.c | 45 +++++++++++++++++++-------------
- 3 files changed, 50 insertions(+), 28 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c
-index f80695480060..d8d49fb7f5ff 100644
---- a/drivers/media/platform/vsp1/vsp1_bru.c
-+++ b/drivers/media/platform/vsp1/vsp1_bru.c
-@@ -18,6 +18,7 @@
-
- #include "vsp1.h"
- #include "vsp1_bru.h"
-+#include "vsp1_rwpf.h"
-
- #define BRU_MIN_SIZE 4U
- #define BRU_MAX_SIZE 8190U
-@@ -40,11 +41,6 @@ static inline void vsp1_bru_write(struct vsp1_bru *bru, u32 reg, u32 data)
- * V4L2 Subdevice Core Operations
- */
-
--static bool bru_is_input_enabled(struct vsp1_bru *bru, unsigned int input)
--{
-- return media_entity_remote_pad(&bru->entity.pads[input]) != NULL;
--}
--
- static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- {
- struct vsp1_bru *bru = to_bru(subdev);
-@@ -84,6 +80,7 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- VI6_BRU_ROP_AROP(VI6_ROP_NOP));
-
- for (i = 0; i < 4; ++i) {
-+ bool premultiplied = false;
- u32 ctrl = 0;
-
- /* Configure all Blend/ROP units corresponding to an enabled BRU
-@@ -91,11 +88,15 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- * disabled BRU inputs are used in ROP NOP mode to ignore the
- * SRC input.
- */
-- if (bru_is_input_enabled(bru, i))
-+ if (bru->inputs[i].rpf) {
- ctrl |= VI6_BRU_CTRL_RBC;
-- else
-+
-+ premultiplied = bru->inputs[i].rpf->video.format.flags
-+ & V4L2_PIX_FMT_FLAG_PREMUL_ALPHA;
-+ } else {
- ctrl |= VI6_BRU_CTRL_CROP(VI6_ROP_NOP)
- | VI6_BRU_CTRL_AROP(VI6_ROP_NOP);
-+ }
-
- /* Select the virtual RPF as the Blend/ROP unit A DST input to
- * serve as a background color.
-@@ -117,10 +118,18 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- *
- * DSTc = DSTc * (1 - SRCa) + SRCc * SRCa
- * DSTa = DSTa * (1 - SRCa) + SRCa
-+ *
-+ * when the SRC input isn't premultiplied, and to
-+ *
-+ * DSTc = DSTc * (1 - SRCa) + SRCc
-+ * DSTa = DSTa * (1 - SRCa) + SRCa
-+ *
-+ * otherwise.
- */
- vsp1_bru_write(bru, VI6_BRU_BLD(i),
- VI6_BRU_BLD_CCMDX_255_SRC_A |
-- VI6_BRU_BLD_CCMDY_SRC_A |
-+ (premultiplied ? VI6_BRU_BLD_CCMDY_COEFY :
-+ VI6_BRU_BLD_CCMDY_SRC_A) |
- VI6_BRU_BLD_ACMDX_255_SRC_A |
- VI6_BRU_BLD_ACMDY_COEFY |
- (0xff << VI6_BRU_BLD_COEFY_SHIFT));
-@@ -192,7 +201,7 @@ static struct v4l2_rect *bru_get_compose(struct vsp1_bru *bru,
- case V4L2_SUBDEV_FORMAT_TRY:
- return v4l2_subdev_get_try_crop(fh, pad);
- case V4L2_SUBDEV_FORMAT_ACTIVE:
-- return &bru->compose[pad];
-+ return &bru->inputs[pad].compose;
- default:
- return NULL;
- }
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.h b/drivers/media/platform/vsp1/vsp1_bru.h
-index 37062704dbf6..5b03479c5982 100644
---- a/drivers/media/platform/vsp1/vsp1_bru.h
-+++ b/drivers/media/platform/vsp1/vsp1_bru.h
-@@ -19,6 +19,7 @@
- #include "vsp1_entity.h"
-
- struct vsp1_device;
-+struct vsp1_rwpf;
-
- #define BRU_PAD_SINK(n) (n)
- #define BRU_PAD_SOURCE 4
-@@ -26,7 +27,10 @@ struct vsp1_device;
- struct vsp1_bru {
- struct vsp1_entity entity;
-
-- struct v4l2_rect compose[4];
-+ struct {
-+ struct vsp1_rwpf *rpf;
-+ struct v4l2_rect compose;
-+ } inputs[4];
- };
-
- static inline struct vsp1_bru *to_bru(struct v4l2_subdev *subdev)
-diff --git a/drivers/media/platform/vsp1/vsp1_video.c b/drivers/media/platform/vsp1/vsp1_video.c
-index 10f8944f0c13..2ef03f2f6b64 100644
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -334,7 +334,10 @@ static int vsp1_pipeline_validate_branch(struct vsp1_rwpf *input,
- */
- if (entity->type == VSP1_ENTITY_BRU) {
- struct vsp1_bru *bru = to_bru(&entity->subdev);
-- struct v4l2_rect *rect = &bru->compose[pad->index];
-+ struct v4l2_rect *rect =
-+ &bru->inputs[pad->index].compose;
-+
-+ bru->inputs[pad->index].rpf = input;
-
- input->location.left = rect->left;
- input->location.top = rect->top;
-@@ -373,6 +376,26 @@ static int vsp1_pipeline_validate_branch(struct vsp1_rwpf *input,
- return 0;
- }
-
-+static void __vsp1_pipeline_cleanup(struct vsp1_pipeline *pipe)
-+{
-+ if (pipe->bru) {
-+ struct vsp1_bru *bru = to_bru(&pipe->bru->subdev);
-+ unsigned int i;
-+
-+ for (i = 0; i < ARRAY_SIZE(bru->inputs); ++i)
-+ bru->inputs[i].rpf = NULL;
-+ }
-+
-+ INIT_LIST_HEAD(&pipe->entities);
-+ pipe->state = VSP1_PIPELINE_STOPPED;
-+ pipe->buffers_ready = 0;
-+ pipe->num_video = 0;
-+ pipe->num_inputs = 0;
-+ pipe->output = NULL;
-+ pipe->bru = NULL;
-+ pipe->lif = NULL;
-+}
-+
- static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
- struct vsp1_video *video)
- {
-@@ -437,13 +460,7 @@ static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
- return 0;
-
- error:
-- INIT_LIST_HEAD(&pipe->entities);
-- pipe->buffers_ready = 0;
-- pipe->num_video = 0;
-- pipe->num_inputs = 0;
-- pipe->output = NULL;
-- pipe->bru = NULL;
-- pipe->lif = NULL;
-+ __vsp1_pipeline_cleanup(pipe);
- return ret;
- }
-
-@@ -474,16 +491,8 @@ static void vsp1_pipeline_cleanup(struct vsp1_pipeline *pipe)
- mutex_lock(&pipe->lock);
-
- /* If we're the last user clean up the pipeline. */
-- if (--pipe->use_count == 0) {
-- INIT_LIST_HEAD(&pipe->entities);
-- pipe->state = VSP1_PIPELINE_STOPPED;
-- pipe->buffers_ready = 0;
-- pipe->num_video = 0;
-- pipe->num_inputs = 0;
-- pipe->output = NULL;
-- pipe->bru = NULL;
-- pipe->lif = NULL;
-- }
-+ if (--pipe->use_count == 0)
-+ __vsp1_pipeline_cleanup(pipe);
-
- mutex_unlock(&pipe->lock);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0785-media-v4l-vsp1-bru-Support-non-premultiplied-colors-.patch b/patches.renesas/0785-media-v4l-vsp1-bru-Support-non-premultiplied-colors-.patch
deleted file mode 100644
index 0d58d1af3b3f8..0000000000000
--- a/patches.renesas/0785-media-v4l-vsp1-bru-Support-non-premultiplied-colors-.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From 4061e797495dadd329dcdb5f482034b4d5f1dd76 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 20:35:36 -0300
-Subject: [media] v4l: vsp1: bru: Support non-premultiplied colors at the BRU
- output
-
-The BRU outputs premultiplied colors, enable color data normalization
-when the format configured at the output of the pipeline isn't
-premultiplied.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit 9aca813e1401dcafe1c0a9d3b03795e254571504)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_bru.c | 11 +++++++++--
- 1 file changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c
-index d8d49fb7f5ff..86b32bca408d 100644
---- a/drivers/media/platform/vsp1/vsp1_bru.c
-+++ b/drivers/media/platform/vsp1/vsp1_bru.c
-@@ -43,8 +43,10 @@ static inline void vsp1_bru_write(struct vsp1_bru *bru, u32 reg, u32 data)
-
- static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- {
-+ struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity);
- struct vsp1_bru *bru = to_bru(subdev);
- struct v4l2_mbus_framefmt *format;
-+ unsigned int flags;
- unsigned int i;
-
- if (!enable)
-@@ -58,8 +60,13 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- * to sane default values for now.
- */
-
-- /* Disable both color data normalization and dithering. */
-- vsp1_bru_write(bru, VI6_BRU_INCTRL, 0);
-+ /* Disable dithering and enable color data normalization unless the
-+ * format at the pipeline output is premultiplied.
-+ */
-+ flags = pipe->output ? pipe->output->video.format.flags : 0;
-+ vsp1_bru_write(bru, VI6_BRU_INCTRL,
-+ flags & V4L2_PIX_FMT_FLAG_PREMUL_ALPHA ?
-+ 0 : VI6_BRU_INCTRL_NRM);
-
- /* Set the background position to cover the whole output image and
- * set its color to opaque black.
---
-2.1.2
-
diff --git a/patches.renesas/0786-media-v4l-vsp1-bru-Make-the-background-color-configu.patch b/patches.renesas/0786-media-v4l-vsp1-bru-Make-the-background-color-configu.patch
deleted file mode 100644
index 666bbfa39c451..0000000000000
--- a/patches.renesas/0786-media-v4l-vsp1-bru-Make-the-background-color-configu.patch
+++ /dev/null
@@ -1,127 +0,0 @@
-From 0b326941bcd5ee3b87b82e92b49501274f01699d Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Tue, 27 May 2014 22:46:30 -0300
-Subject: [media] v4l: vsp1: bru: Make the background color configurable
-
-Expose the background color to userspace through the V4L2_CID_BG_COLOR
-control.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit a16e2794592b733d47f372f0cadcd9ff0f349ca9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_bru.c | 51 ++++++++++++++++++++++++++++++----
- drivers/media/platform/vsp1/vsp1_bru.h | 3 ++
- 2 files changed, 49 insertions(+), 5 deletions(-)
-
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.c b/drivers/media/platform/vsp1/vsp1_bru.c
-index 86b32bca408d..a0c1984c733e 100644
---- a/drivers/media/platform/vsp1/vsp1_bru.c
-+++ b/drivers/media/platform/vsp1/vsp1_bru.c
-@@ -38,6 +38,32 @@ static inline void vsp1_bru_write(struct vsp1_bru *bru, u32 reg, u32 data)
- }
-
- /* -----------------------------------------------------------------------------
-+ * Controls
-+ */
-+
-+static int bru_s_ctrl(struct v4l2_ctrl *ctrl)
-+{
-+ struct vsp1_bru *bru =
-+ container_of(ctrl->handler, struct vsp1_bru, ctrls);
-+
-+ if (!vsp1_entity_is_streaming(&bru->entity))
-+ return 0;
-+
-+ switch (ctrl->id) {
-+ case V4L2_CID_BG_COLOR:
-+ vsp1_bru_write(bru, VI6_BRU_VIRRPF_COL, ctrl->val |
-+ (0xff << VI6_BRU_VIRRPF_COL_A_SHIFT));
-+ break;
-+ }
-+
-+ return 0;
-+}
-+
-+static const struct v4l2_ctrl_ops bru_ctrl_ops = {
-+ .s_ctrl = bru_s_ctrl,
-+};
-+
-+/* -----------------------------------------------------------------------------
- * V4L2 Subdevice Core Operations
- */
-
-@@ -48,6 +74,11 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- struct v4l2_mbus_framefmt *format;
- unsigned int flags;
- unsigned int i;
-+ int ret;
-+
-+ ret = vsp1_entity_set_streaming(&bru->entity, enable);
-+ if (ret < 0)
-+ return ret;
-
- if (!enable)
- return 0;
-@@ -68,15 +99,11 @@ static int bru_s_stream(struct v4l2_subdev *subdev, int enable)
- flags & V4L2_PIX_FMT_FLAG_PREMUL_ALPHA ?
- 0 : VI6_BRU_INCTRL_NRM);
-
-- /* Set the background position to cover the whole output image and
-- * set its color to opaque black.
-- */
-+ /* Set the background position to cover the whole output image. */
- vsp1_bru_write(bru, VI6_BRU_VIRRPF_SIZE,
- (format->width << VI6_BRU_VIRRPF_SIZE_HSIZE_SHIFT) |
- (format->height << VI6_BRU_VIRRPF_SIZE_VSIZE_SHIFT));
- vsp1_bru_write(bru, VI6_BRU_VIRRPF_LOC, 0);
-- vsp1_bru_write(bru, VI6_BRU_VIRRPF_COL,
-- 0xff << VI6_BRU_VIRRPF_COL_A_SHIFT);
-
- /* Route BRU input 1 as SRC input to the ROP unit and configure the ROP
- * unit with a NOP operation to make BRU input 1 available as the
-@@ -407,5 +434,19 @@ struct vsp1_bru *vsp1_bru_create(struct vsp1_device *vsp1)
-
- vsp1_entity_init_formats(subdev, NULL);
-
-+ /* Initialize the control handler. */
-+ v4l2_ctrl_handler_init(&bru->ctrls, 1);
-+ v4l2_ctrl_new_std(&bru->ctrls, &bru_ctrl_ops, V4L2_CID_BG_COLOR,
-+ 0, 0xffffff, 1, 0);
-+
-+ bru->entity.subdev.ctrl_handler = &bru->ctrls;
-+
-+ if (bru->ctrls.error) {
-+ dev_err(vsp1->dev, "bru: failed to initialize controls\n");
-+ ret = bru->ctrls.error;
-+ vsp1_entity_destroy(&bru->entity);
-+ return ERR_PTR(ret);
-+ }
-+
- return bru;
- }
-diff --git a/drivers/media/platform/vsp1/vsp1_bru.h b/drivers/media/platform/vsp1/vsp1_bru.h
-index 5b03479c5982..16b1c6554911 100644
---- a/drivers/media/platform/vsp1/vsp1_bru.h
-+++ b/drivers/media/platform/vsp1/vsp1_bru.h
-@@ -14,6 +14,7 @@
- #define __VSP1_BRU_H__
-
- #include <media/media-entity.h>
-+#include <media/v4l2-ctrls.h>
- #include <media/v4l2-subdev.h>
-
- #include "vsp1_entity.h"
-@@ -27,6 +28,8 @@ struct vsp1_rwpf;
- struct vsp1_bru {
- struct vsp1_entity entity;
-
-+ struct v4l2_ctrl_handler ctrls;
-+
- struct {
- struct vsp1_rwpf *rpf;
- struct v4l2_rect compose;
---
-2.1.2
-
diff --git a/patches.renesas/0787-media-v4l-vsp1-uds-Fix-scaling-of-alpha-layer.patch b/patches.renesas/0787-media-v4l-vsp1-uds-Fix-scaling-of-alpha-layer.patch
deleted file mode 100644
index 25a079cf6a1f0..0000000000000
--- a/patches.renesas/0787-media-v4l-vsp1-uds-Fix-scaling-of-alpha-layer.patch
+++ /dev/null
@@ -1,333 +0,0 @@
-From 4c987cfe369674163a8d451e33d34bc0392dc84e Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Fri, 30 May 2014 21:45:48 -0300
-Subject: [media] v4l: vsp1: uds: Fix scaling of alpha layer
-
-Pixel color components can be scaled using either bilinear interpolation
-or a multitap filter. The multitap filter provides better results, but
-can't be selected when the alpha layer need to be scaled down by more
-than 1/2.
-
-Disable alpha scaling when the input has a fixed alpha value, and
-program the UDS to output a fixed alpha value in that case. This ensures
-the multitap filter will be used whenever possible.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-(cherry picked from commit bdc2df62ae38bbab044078f4d25a7a3d9e2379c9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/media/platform/vsp1/vsp1_rpf.c | 4 +
- drivers/media/platform/vsp1/vsp1_uds.c | 63 ++++++++++++++-----------
- drivers/media/platform/vsp1/vsp1_uds.h | 6 +-
- drivers/media/platform/vsp1/vsp1_video.c | 78 +++++++++++++++++++++++++++++--
- drivers/media/platform/vsp1/vsp1_video.h | 6 ++
- 5 files changed, 122 insertions(+), 35 deletions(-)
-
---- a/drivers/media/platform/vsp1/vsp1_rpf.c
-+++ b/drivers/media/platform/vsp1/vsp1_rpf.c
-@@ -46,6 +46,7 @@ static int rpf_s_ctrl(struct v4l2_ctrl *
- {
- struct vsp1_rwpf *rpf =
- container_of(ctrl->handler, struct vsp1_rwpf, ctrls);
-+ struct vsp1_pipeline *pipe;
-
- if (!vsp1_entity_is_streaming(&rpf->entity))
- return 0;
-@@ -54,6 +55,9 @@ static int rpf_s_ctrl(struct v4l2_ctrl *
- case V4L2_CID_ALPHA_COMPONENT:
- vsp1_rpf_write(rpf, VI6_RPF_VRTCOL_SET,
- ctrl->val << VI6_RPF_VRTCOL_SET_LAYA_SHIFT);
-+
-+ pipe = to_vsp1_pipeline(&rpf->entity.subdev.entity);
-+ vsp1_pipeline_propagate_alpha(pipe, &rpf->entity, ctrl->val);
- break;
- }
-
---- a/drivers/media/platform/vsp1/vsp1_uds.c
-+++ b/drivers/media/platform/vsp1/vsp1_uds.c
-@@ -45,6 +45,11 @@ static inline void vsp1_uds_write(struct
- * Scaling Computation
- */
-
-+void vsp1_uds_set_alpha(struct vsp1_uds *uds, unsigned int alpha)
-+{
-+ vsp1_uds_write(uds, VI6_UDS_ALPVAL, alpha << VI6_UDS_ALPVAL_VAL0_SHIFT);
-+}
-+
- /*
- * uds_output_size - Return the output size for an input size and scaling ratio
- * @input: input size in pixels
-@@ -105,49 +110,56 @@ static unsigned int uds_compute_ratio(un
- return (input - 1) * 4096 / (output - 1);
- }
-
--static void uds_compute_ratios(struct vsp1_uds *uds)
--{
-- struct v4l2_mbus_framefmt *input = &uds->entity.formats[UDS_PAD_SINK];
-- struct v4l2_mbus_framefmt *output =
-- &uds->entity.formats[UDS_PAD_SOURCE];
--
-- uds->hscale = uds_compute_ratio(input->width, output->width);
-- uds->vscale = uds_compute_ratio(input->height, output->height);
--
-- dev_dbg(uds->entity.vsp1->dev, "hscale %u vscale %u\n",
-- uds->hscale, uds->vscale);
--}
--
- /* -----------------------------------------------------------------------------
- * V4L2 Subdevice Core Operations
- */
-
- static int uds_s_stream(struct v4l2_subdev *subdev, int enable)
- {
-- const struct v4l2_mbus_framefmt *format;
- struct vsp1_uds *uds = to_uds(subdev);
-+ const struct v4l2_mbus_framefmt *output;
-+ const struct v4l2_mbus_framefmt *input;
-+ unsigned int hscale;
-+ unsigned int vscale;
-+ bool multitap;
-
- if (!enable)
- return 0;
-
-- /* Enable multi-tap scaling. */
-- vsp1_uds_write(uds, VI6_UDS_CTRL, VI6_UDS_CTRL_AON | VI6_UDS_CTRL_BC);
-+ input = &uds->entity.formats[UDS_PAD_SINK];
-+ output = &uds->entity.formats[UDS_PAD_SOURCE];
-+
-+ hscale = uds_compute_ratio(input->width, output->width);
-+ vscale = uds_compute_ratio(input->height, output->height);
-+
-+ dev_dbg(uds->entity.vsp1->dev, "hscale %u vscale %u\n", hscale, vscale);
-+
-+ /* Multi-tap scaling can't be enabled along with alpha scaling when
-+ * scaling down with a factor lower than or equal to 1/2 in either
-+ * direction.
-+ */
-+ if (uds->scale_alpha && (hscale >= 8192 || vscale >= 8192))
-+ multitap = false;
-+ else
-+ multitap = true;
-+
-+ vsp1_uds_write(uds, VI6_UDS_CTRL,
-+ (uds->scale_alpha ? VI6_UDS_CTRL_AON : 0) |
-+ (multitap ? VI6_UDS_CTRL_BC : 0));
-
- vsp1_uds_write(uds, VI6_UDS_PASS_BWIDTH,
-- (uds_passband_width(uds->hscale)
-+ (uds_passband_width(hscale)
- << VI6_UDS_PASS_BWIDTH_H_SHIFT) |
-- (uds_passband_width(uds->vscale)
-+ (uds_passband_width(vscale)
- << VI6_UDS_PASS_BWIDTH_V_SHIFT));
-
- /* Set the scaling ratios and the output size. */
-- format = &uds->entity.formats[UDS_PAD_SOURCE];
--
- vsp1_uds_write(uds, VI6_UDS_SCALE,
-- (uds->hscale << VI6_UDS_SCALE_HFRAC_SHIFT) |
-- (uds->vscale << VI6_UDS_SCALE_VFRAC_SHIFT));
-+ (hscale << VI6_UDS_SCALE_HFRAC_SHIFT) |
-+ (vscale << VI6_UDS_SCALE_VFRAC_SHIFT));
- vsp1_uds_write(uds, VI6_UDS_CLIP_SIZE,
-- (format->width << VI6_UDS_CLIP_SIZE_HSIZE_SHIFT) |
-- (format->height << VI6_UDS_CLIP_SIZE_VSIZE_SHIFT));
-+ (output->width << VI6_UDS_CLIP_SIZE_HSIZE_SHIFT) |
-+ (output->height << VI6_UDS_CLIP_SIZE_VSIZE_SHIFT));
-
- return 0;
- }
-@@ -280,9 +292,6 @@ static int uds_set_format(struct v4l2_su
- uds_try_format(uds, fh, UDS_PAD_SOURCE, format, fmt->which);
- }
-
-- if (fmt->which == V4L2_SUBDEV_FORMAT_ACTIVE)
-- uds_compute_ratios(uds);
--
- return 0;
- }
-
---- a/drivers/media/platform/vsp1/vsp1_uds.h
-+++ b/drivers/media/platform/vsp1/vsp1_uds.h
-@@ -25,9 +25,7 @@ struct vsp1_device;
-
- struct vsp1_uds {
- struct vsp1_entity entity;
--
-- unsigned int hscale;
-- unsigned int vscale;
-+ bool scale_alpha;
- };
-
- static inline struct vsp1_uds *to_uds(struct v4l2_subdev *subdev)
-@@ -37,4 +35,6 @@ static inline struct vsp1_uds *to_uds(st
-
- struct vsp1_uds *vsp1_uds_create(struct vsp1_device *vsp1, unsigned int index);
-
-+void vsp1_uds_set_alpha(struct vsp1_uds *uds, unsigned int alpha);
-+
- #endif /* __VSP1_UDS_H__ */
---- a/drivers/media/platform/vsp1/vsp1_video.c
-+++ b/drivers/media/platform/vsp1/vsp1_video.c
-@@ -31,6 +31,7 @@
- #include "vsp1_bru.h"
- #include "vsp1_entity.h"
- #include "vsp1_rwpf.h"
-+#include "vsp1_uds.h"
- #include "vsp1_video.h"
-
- #define VSP1_VIDEO_DEF_FORMAT V4L2_PIX_FMT_YUYV
-@@ -306,13 +307,14 @@ vsp1_video_format_adjust(struct vsp1_vid
- * Pipeline Management
- */
-
--static int vsp1_pipeline_validate_branch(struct vsp1_rwpf *input,
-+static int vsp1_pipeline_validate_branch(struct vsp1_pipeline *pipe,
-+ struct vsp1_rwpf *input,
- struct vsp1_rwpf *output)
- {
- struct vsp1_entity *entity;
- unsigned int entities = 0;
- struct media_pad *pad;
-- bool uds_found = false;
-+ bool bru_found = false;
-
- input->location.left = 0;
- input->location.top = 0;
-@@ -341,6 +343,8 @@ static int vsp1_pipeline_validate_branch
-
- input->location.left = rect->left;
- input->location.top = rect->top;
-+
-+ bru_found = true;
- }
-
- /* We've reached the WPF, we're done. */
-@@ -355,9 +359,12 @@ static int vsp1_pipeline_validate_branch
-
- /* UDS can't be chained. */
- if (entity->type == VSP1_ENTITY_UDS) {
-- if (uds_found)
-+ if (pipe->uds)
- return -EPIPE;
-- uds_found = true;
-+
-+ pipe->uds = entity;
-+ pipe->uds_input = bru_found ? pipe->bru
-+ : &input->entity;
- }
-
- /* Follow the source link. The link setup operations ensure
-@@ -394,6 +401,7 @@ static void __vsp1_pipeline_cleanup(stru
- pipe->output = NULL;
- pipe->bru = NULL;
- pipe->lif = NULL;
-+ pipe->uds = NULL;
- }
-
- static int vsp1_pipeline_validate(struct vsp1_pipeline *pipe,
-@@ -451,7 +459,7 @@ static int vsp1_pipeline_validate(struct
- * contains no loop and that all branches end at the output WPF.
- */
- for (i = 0; i < pipe->num_inputs; ++i) {
-- ret = vsp1_pipeline_validate_branch(pipe->inputs[i],
-+ ret = vsp1_pipeline_validate_branch(pipe, pipe->inputs[i],
- pipe->output);
- if (ret < 0)
- goto error;
-@@ -654,6 +662,47 @@ done:
- spin_unlock_irqrestore(&pipe->irqlock, flags);
- }
-
-+/*
-+ * Propagate the alpha value through the pipeline.
-+ *
-+ * As the UDS has restricted scaling capabilities when the alpha component needs
-+ * to be scaled, we disable alpha scaling when the UDS input has a fixed alpha
-+ * value. The UDS then outputs a fixed alpha value which needs to be programmed
-+ * from the input RPF alpha.
-+ */
-+void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
-+ struct vsp1_entity *input,
-+ unsigned int alpha)
-+{
-+ struct vsp1_entity *entity;
-+ struct media_pad *pad;
-+
-+ pad = media_entity_remote_pad(&input->pads[RWPF_PAD_SOURCE]);
-+
-+ while (pad) {
-+ if (media_entity_type(pad->entity) != MEDIA_ENT_T_V4L2_SUBDEV)
-+ break;
-+
-+ entity = to_vsp1_entity(media_entity_to_v4l2_subdev(pad->entity));
-+
-+ /* The BRU background color has a fixed alpha value set to 255,
-+ * the output alpha value is thus always equal to 255.
-+ */
-+ if (entity->type == VSP1_ENTITY_BRU)
-+ alpha = 255;
-+
-+ if (entity->type == VSP1_ENTITY_UDS) {
-+ struct vsp1_uds *uds = to_uds(&entity->subdev);
-+
-+ vsp1_uds_set_alpha(uds, alpha);
-+ break;
-+ }
-+
-+ pad = &entity->pads[entity->source_pad];
-+ pad = media_entity_remote_pad(pad);
-+ }
-+}
-+
- /* -----------------------------------------------------------------------------
- * videobuf2 Queue Operations
- */
-@@ -761,6 +810,25 @@ static int vsp1_video_start_streaming(st
-
- mutex_lock(&pipe->lock);
- if (pipe->stream_count == pipe->num_video - 1) {
-+ if (pipe->uds) {
-+ struct vsp1_uds *uds = to_uds(&pipe->uds->subdev);
-+
-+ /* If a BRU is present in the pipeline before the UDS,
-+ * the alpha component doesn't need to be scaled as the
-+ * BRU output alpha value is fixed to 255. Otherwise we
-+ * need to scale the alpha component only when available
-+ * at the input RPF.
-+ */
-+ if (pipe->uds_input->type == VSP1_ENTITY_BRU) {
-+ uds->scale_alpha = false;
-+ } else {
-+ struct vsp1_rwpf *rpf =
-+ to_rwpf(&pipe->uds_input->subdev);
-+
-+ uds->scale_alpha = rpf->video.fmtinfo->alpha;
-+ }
-+ }
-+
- list_for_each_entry(entity, &pipe->entities, list_pipe) {
- vsp1_entity_route_setup(entity);
-
---- a/drivers/media/platform/vsp1/vsp1_video.h
-+++ b/drivers/media/platform/vsp1/vsp1_video.h
-@@ -79,6 +79,8 @@ struct vsp1_pipeline {
- struct vsp1_rwpf *output;
- struct vsp1_entity *bru;
- struct vsp1_entity *lif;
-+ struct vsp1_entity *uds;
-+ struct vsp1_entity *uds_input;
-
- struct list_head entities;
- };
-@@ -143,4 +145,8 @@ void vsp1_video_cleanup(struct vsp1_vide
-
- void vsp1_pipeline_frame_end(struct vsp1_pipeline *pipe);
-
-+void vsp1_pipeline_propagate_alpha(struct vsp1_pipeline *pipe,
-+ struct vsp1_entity *input,
-+ unsigned int alpha);
-+
- #endif /* __VSP1_VIDEO_H__ */
diff --git a/patches.renesas/0788-ASoC-rsnd-fixup-rsnd_gen_dma_addr-for-Gen1.patch b/patches.renesas/0788-ASoC-rsnd-fixup-rsnd_gen_dma_addr-for-Gen1.patch
deleted file mode 100644
index ae524f0cab19c..0000000000000
--- a/patches.renesas/0788-ASoC-rsnd-fixup-rsnd_gen_dma_addr-for-Gen1.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 48b776e49c3c1b8dd1b21747cf83d4b87681e772 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 18 Jun 2014 17:54:43 +0900
-Subject: ASoC: rsnd: fixup rsnd_gen_dma_addr() for Gen1
-
-ad32d0c7b0e993433df152ae747652647eb65a27
-(ASoC: rsnd: add rsnd_gen_dma_addr() for DMAC addr)
-added rsnd_gen_dma_addr() to calculate DMA addr,
-but, it is necessary only for Gen2.
-This patch ignores Gen1 case.
-Kernel will be panic without this patch.
-Special thanks to Simon
-
-Reported-by: Simon Horman <horms@verge.net.au>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Tested-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 64eae986fc1e3a281b00f04b7c9c00b145ec8a57)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 33 +++++++++++++++++++++------------
- 1 file changed, 21 insertions(+), 12 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 1dd2b7d38c2c..0280a11c0899 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -184,7 +184,7 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
- #define RDMA_CMD_O_N(addr, i) (addr ##_reg - 0x004f8000 + (0x400 * i))
- #define RDMA_CMD_O_P(addr, i) (addr ##_reg - 0x001f8000 + (0x400 * i))
-
--void rsnd_gen_dma_addr(struct rsnd_priv *priv,
-+static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
- struct rsnd_dma *dma,
- struct dma_slave_config *cfg,
- int is_play, int slave_id)
-@@ -226,17 +226,6 @@ void rsnd_gen_dma_addr(struct rsnd_priv *priv,
- }
- };
-
-- cfg->slave_id = slave_id;
-- cfg->src_addr = 0;
-- cfg->dst_addr = 0;
-- cfg->direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
--
-- /*
-- * gen1 uses default DMA addr
-- */
-- if (rsnd_is_gen1(priv))
-- return;
--
- /* it shouldn't happen */
- if (use_dvc & !use_src) {
- dev_err(dev, "DVC is selected without SRC\n");
-@@ -250,6 +239,26 @@ void rsnd_gen_dma_addr(struct rsnd_priv *priv,
- id, cfg->src_addr, cfg->dst_addr);
- }
-
-+void rsnd_gen_dma_addr(struct rsnd_priv *priv,
-+ struct rsnd_dma *dma,
-+ struct dma_slave_config *cfg,
-+ int is_play, int slave_id)
-+{
-+ cfg->slave_id = slave_id;
-+ cfg->src_addr = 0;
-+ cfg->dst_addr = 0;
-+ cfg->direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-+
-+ /*
-+ * gen1 uses default DMA addr
-+ */
-+ if (rsnd_is_gen1(priv))
-+ return;
-+
-+ rsnd_gen2_dma_addr(priv, dma, cfg, is_play, slave_id);
-+}
-+
-+
- /*
- * Gen2
- */
---
-2.1.2
-
diff --git a/patches.renesas/0789-ASoC-rsnd-fixup-loop-exit-timing-of-dma-name-search.patch b/patches.renesas/0789-ASoC-rsnd-fixup-loop-exit-timing-of-dma-name-search.patch
deleted file mode 100644
index e196315167883..0000000000000
--- a/patches.renesas/0789-ASoC-rsnd-fixup-loop-exit-timing-of-dma-name-search.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e79b54e966e1a9f61498a00971c011f099a555f4 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 18 Jun 2014 17:55:09 +0900
-Subject: ASoC: rsnd: fixup loop exit timing of dma name search
-
-Current dma name search loop didn't care about SSI index
-This patch fixes it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c08c3b088053cec1465051258844e7934d3e3e37)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 4e86265f625c..ed76901f8202 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -297,7 +297,6 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
- for (i = 1; i < MOD_MAX; i++) {
- if (!src) {
- mod[i] = ssi;
-- break;
- } else if (!dvc) {
- mod[i] = src;
- src = NULL;
-@@ -308,6 +307,9 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
-
- if (mod[i] == this)
- index = i;
-+
-+ if (mod[i] == ssi)
-+ break;
- }
-
- if (is_play) {
---
-2.1.2
-
diff --git a/patches.renesas/0790-ASoC-rcar-Fix-dma-direction-type.patch b/patches.renesas/0790-ASoC-rcar-Fix-dma-direction-type.patch
deleted file mode 100644
index 67c0adb0dd402..0000000000000
--- a/patches.renesas/0790-ASoC-rcar-Fix-dma-direction-type.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From ed18d899e65389a72e255b74e0ae67a5836d916c Mon Sep 17 00:00:00 2001
-From: Lars-Peter Clausen <lars@metafoo.de>
-Date: Thu, 19 Jun 2014 09:40:30 +0200
-Subject: ASoC: rcar: Fix dma direction type
-
-dmaengine_prep_slave_single() expects a enum dma_transfer_direction and not a
-enum dma_data_direction. Since the integer representations of both DMA_TO_DEVICE
-and DMA_MEM_TO_DEV aswell as DMA_FROM_DEVICE and DMA_DEV_TO_MEM have the same
-value the code worked fine even though it was using the wrong type.
-
-Fixes the following warning from sparse:
- sound/soc/sh/rcar/core.c:227:49: warning: mixing different enum types
- sound/soc/sh/rcar/core.c:227:49: int enum dma_data_direction versus
- sound/soc/sh/rcar/core.c:227:49: int enum dma_transfer_direction
-
-Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
-Acked-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit cd7bcc6000165f6215d15e2e32b58a646e5de5ec)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 2 +-
- sound/soc/sh/rcar/rsnd.h | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index ed76901f8202..7f68b33dcbbb 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -365,7 +365,7 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- if (ret < 0)
- goto rsnd_dma_init_err;
-
-- dma->dir = is_play ? DMA_TO_DEVICE : DMA_FROM_DEVICE;
-+ dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
- INIT_WORK(&dma->work, rsnd_dma_do_work);
-
- return 0;
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 39d98af5ee05..067a89e9f25c 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -158,7 +158,7 @@ struct rsnd_dma {
- struct sh_dmae_slave slave;
- struct work_struct work;
- struct dma_chan *chan;
-- enum dma_data_direction dir;
-+ enum dma_transfer_direction dir;
-
- int submit_loop;
- int offset; /* it cares A/B plane */
---
-2.1.2
-
diff --git a/patches.renesas/0791-ASoC-rsnd-SSI-DMA-can-select-BUSIF.patch b/patches.renesas/0791-ASoC-rsnd-SSI-DMA-can-select-BUSIF.patch
deleted file mode 100644
index 96f3da50cd3cc..0000000000000
--- a/patches.renesas/0791-ASoC-rsnd-SSI-DMA-can-select-BUSIF.patch
+++ /dev/null
@@ -1,420 +0,0 @@
-From 80f3b3b5d12b5c26f4f33361b5e5ed0dceb376c5 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:56:23 -0700
-Subject: ASoC: rsnd: SSI + DMA can select BUSIF
-
-Sound data needs to be sent to R-Car sound SSI when playback.
-But, there are 2 interfaces for it.
-1st is SSITDR/SSIRDR which are mapped on SSI.
-2nd is SSIn_BUSIF which are mapped on SSIU.
-
-2nd SSIn_BUSIF is used when DMA transfer,
-and it is always used if sound data came from via SRC.
-But, we can use it when SSI+DMA case too.
-(Current driver is assuming 1st SSITDR/SSIRDR for it)
-
-2nd SSIn_BUSIF can be used as FIFO.
-This is very helpful/useful for SSI+DMA.
-
-But DMA address / DMA ID are not same between 1st/2nd cases.
-This patch care about these settings.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit d9288d0ba12de1b5efb830b9128e4cc6877318fc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/renesas,rsnd.txt | 1 +
- include/sound/rcar_snd.h | 1 +
- sound/soc/sh/rcar/core.c | 22 +++++---
- sound/soc/sh/rcar/gen.c | 64 ++++++++++++++--------
- sound/soc/sh/rcar/rsnd.h | 10 +++-
- sound/soc/sh/rcar/src.c | 37 +++++++++----
- sound/soc/sh/rcar/ssi.c | 33 ++++++++++-
- 7 files changed, 123 insertions(+), 45 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-index 8346cab046cd..41a120c2389d 100644
---- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-@@ -21,6 +21,7 @@ SSI subnode properties:
- - interrupts : Should contain SSI interrupt for PIO transfer
- - shared-pin : if shared clock pin
- - pio-transfer : use PIO transfer mode
-+- no-busif : BUSIF is not ussed when [mem -> SSI] via DMA case
-
- SRC subnode properties:
- no properties at this point
-diff --git a/include/sound/rcar_snd.h b/include/sound/rcar_snd.h
-index f4a706f82cb7..d76412b84b48 100644
---- a/include/sound/rcar_snd.h
-+++ b/include/sound/rcar_snd.h
-@@ -34,6 +34,7 @@
- * B : SSI direction
- */
- #define RSND_SSI_CLK_PIN_SHARE (1 << 31)
-+#define RSND_SSI_NO_BUSIF (1 << 30) /* SSI+DMA without BUSIF */
-
- #define RSND_SSI(_dma_id, _pio_irq, _flags) \
- { .dma_id = _dma_id, .pio_irq = _pio_irq, .flags = _flags }
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 7f68b33dcbbb..8c3707a68603 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -138,6 +138,17 @@ char *rsnd_mod_name(struct rsnd_mod *mod)
- return mod->ops->name;
- }
-
-+char *rsnd_mod_dma_name(struct rsnd_mod *mod)
-+{
-+ if (!mod || !mod->ops)
-+ return "unknown";
-+
-+ if (!mod->ops->dma_name)
-+ return mod->ops->name;
-+
-+ return mod->ops->dma_name(mod);
-+}
-+
- void rsnd_mod_init(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- struct rsnd_mod_ops *ops,
-@@ -261,7 +272,7 @@ static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod)
- {
- if (mod)
- return snprintf(dma_name, DMA_NAME_SIZE / 2, "%s%d",
-- rsnd_mod_name(mod), rsnd_mod_id(mod));
-+ rsnd_mod_dma_name(mod), rsnd_mod_id(mod));
- else
- return snprintf(dma_name, DMA_NAME_SIZE / 2, "mem");
-
-@@ -343,11 +354,8 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- dma_cap_zero(mask);
- dma_cap_set(DMA_SLAVE, mask);
-
-- if (dev->of_node)
-- rsnd_dma_of_name(dma, is_play, dma_name);
-- else
-- snprintf(dma_name, DMA_NAME_SIZE,
-- is_play ? "tx" : "rx");
-+ rsnd_dma_of_name(dma, is_play, dma_name);
-+ rsnd_gen_dma_addr(priv, dma, &cfg, is_play, id);
-
- dev_dbg(dev, "dma name : %s\n", dma_name);
-
-@@ -359,8 +367,6 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- return -EIO;
- }
-
-- rsnd_gen_dma_addr(priv, dma, &cfg, is_play, id);
--
- ret = dmaengine_slave_config(dma->chan, &cfg);
- if (ret < 0)
- goto rsnd_dma_init_err;
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 0280a11c0899..46677af6c748 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -165,15 +165,19 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
- *
- * ex) R-Car H2 case
- * mod / DMAC in / DMAC out / DMAC PP in / DMAC pp out
-- * SSI : 0xec541000 / 0xec241008 / 0xec24100c / 0xec400000 / 0xec400000
-+ * SSI : 0xec541000 / 0xec241008 / 0xec24100c
-+ * SSIU: 0xec541000 / 0xec100000 / 0xec100000 / 0xec400000 / 0xec400000
- * SCU : 0xec500000 / 0xec000000 / 0xec004000 / 0xec300000 / 0xec304000
- * CMD : 0xec500000 / 0xec008000 0xec308000
- */
- #define RDMA_SSI_I_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0x8)
- #define RDMA_SSI_O_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0xc)
-
--#define RDMA_SSI_I_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
--#define RDMA_SSI_O_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
-+#define RDMA_SSIU_I_N(addr, i) (addr ##_reg - 0x00441000 + (0x1000 * i))
-+#define RDMA_SSIU_O_N(addr, i) (addr ##_reg - 0x00441000 + (0x1000 * i))
-+
-+#define RDMA_SSIU_I_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
-+#define RDMA_SSIU_O_P(addr, i) (addr ##_reg - 0x00141000 + (0x1000 * i))
-
- #define RDMA_SRC_I_N(addr, i) (addr ##_reg - 0x00500000 + (0x400 * i))
- #define RDMA_SRC_O_N(addr, i) (addr ##_reg - 0x004fc000 + (0x400 * i))
-@@ -204,26 +208,36 @@ static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
- struct dma_addr {
- dma_addr_t src_addr;
- dma_addr_t dst_addr;
-- } dma_addrs[2][2][3] = {
-- { /* SRC */
-- /* Capture */
-- {{ 0, 0 },
-- { RDMA_SRC_O_N(src, id), 0 },
-- { RDMA_CMD_O_N(src, id), 0 }},
-- /* Playback */
-- {{ 0, 0, },
-- { 0, RDMA_SRC_I_N(src, id) },
-- { 0, RDMA_SRC_I_N(src, id) }}
-- }, { /* SSI */
-- /* Capture */
-- {{ RDMA_SSI_O_N(ssi, id), 0 },
-- { RDMA_SSI_O_P(ssi, id), RDMA_SRC_I_P(src, id) },
-- { RDMA_SSI_O_P(ssi, id), RDMA_SRC_I_P(src, id) }},
-- /* Playback */
-- {{ 0, RDMA_SSI_I_N(ssi, id) },
-- { RDMA_SRC_O_P(src, id), RDMA_SSI_I_P(ssi, id) },
-- { RDMA_CMD_O_P(src, id), RDMA_SSI_I_P(ssi, id) }}
-- }
-+ } dma_addrs[3][2][3] = {
-+ /* SRC */
-+ {{{ 0, 0 },
-+ /* Capture */
-+ { RDMA_SRC_O_N(src, id), 0 },
-+ { RDMA_CMD_O_N(src, id), 0 } },
-+ /* Playback */
-+ {{ 0, 0, },
-+ { 0, RDMA_SRC_I_N(src, id) },
-+ { 0, RDMA_SRC_I_N(src, id) } }
-+ },
-+ /* SSI */
-+ /* Capture */
-+ {{{ RDMA_SSI_O_N(ssi, id), 0 },
-+ { 0, 0 },
-+ { 0, 0 } },
-+ /* Playback */
-+ {{ 0, RDMA_SSI_I_N(ssi, id) },
-+ { 0, 0 },
-+ { 0, 0 } }
-+ },
-+ /* SSIU */
-+ /* Capture */
-+ {{{ RDMA_SSIU_O_N(ssi, id), 0 },
-+ { RDMA_SSIU_O_P(ssi, id), RDMA_SRC_I_P(src, id) },
-+ { RDMA_SSIU_O_P(ssi, id), RDMA_SRC_I_P(src, id) } },
-+ /* Playback */
-+ {{ 0, RDMA_SSIU_I_N(ssi, id) },
-+ { RDMA_SRC_O_P(src, id), RDMA_SSIU_I_P(ssi, id) },
-+ { RDMA_CMD_O_P(src, id), RDMA_SSIU_I_P(ssi, id) } } },
- };
-
- /* it shouldn't happen */
-@@ -232,6 +246,10 @@ static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
- return;
- }
-
-+ /* use SSIU or SSI ? */
-+ if (is_ssi && (0 == strcmp(rsnd_mod_dma_name(mod), "ssiu")))
-+ is_ssi++;
-+
- cfg->src_addr = dma_addrs[is_ssi][is_play][use_src + use_dvc].src_addr;
- cfg->dst_addr = dma_addrs[is_ssi][is_play][use_src + use_dvc].dst_addr;
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 067a89e9f25c..a1466c1570bc 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -185,6 +185,7 @@ enum rsnd_mod_type {
-
- struct rsnd_mod_ops {
- char *name;
-+ char* (*dma_name)(struct rsnd_mod *mod);
- int (*probe)(struct rsnd_mod *mod,
- struct rsnd_dai *rdai);
- int (*remove)(struct rsnd_mod *mod,
-@@ -224,6 +225,7 @@ void rsnd_mod_init(struct rsnd_priv *priv,
- enum rsnd_mod_type type,
- int id);
- char *rsnd_mod_name(struct rsnd_mod *mod);
-+char *rsnd_mod_dma_name(struct rsnd_mod *mod);
-
- /*
- * R-Car sound DAI
-@@ -391,8 +393,12 @@ struct rsnd_mod *rsnd_src_mod_get(struct rsnd_priv *priv, int id);
- unsigned int rsnd_src_get_ssi_rate(struct rsnd_priv *priv,
- struct rsnd_dai_stream *io,
- struct snd_pcm_runtime *runtime);
--int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai);
-+int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ int use_busif);
-+int rsnd_src_ssiu_stop(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ int use_busif);
- int rsnd_src_enable_ssi_irq(struct rsnd_mod *ssi_mod,
- struct rsnd_dai *rdai);
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 200eda019bc7..4d39505c21cf 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -106,18 +106,17 @@ struct rsnd_src {
- /*
- * Gen1/Gen2 common functions
- */
--int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
-- struct rsnd_dai *rdai)
-+int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ int use_busif)
- {
-- struct rsnd_dai_stream *io = rsnd_mod_to_io(ssi_mod);
-- struct rsnd_mod *src_mod = rsnd_io_to_mod_src(io);
- int ssi_id = rsnd_mod_id(ssi_mod);
-
- /*
- * SSI_MODE0
- */
- rsnd_mod_bset(ssi_mod, SSI_MODE0, (1 << ssi_id),
-- src_mod ? 0 : (1 << ssi_id));
-+ !use_busif << ssi_id);
-
- /*
- * SSI_MODE1
-@@ -143,6 +142,29 @@ int rsnd_src_ssi_mode_init(struct rsnd_mod *ssi_mod,
- 0x2 << shift : 0x1 << shift);
- }
-
-+ /*
-+ * DMA settings for SSIU
-+ */
-+ if (use_busif) {
-+ rsnd_mod_write(ssi_mod, SSI_BUSIF_ADINR,
-+ rsnd_get_adinr(ssi_mod));
-+ rsnd_mod_write(ssi_mod, SSI_BUSIF_MODE, 1);
-+ rsnd_mod_write(ssi_mod, SSI_CTRL, 0x1);
-+ }
-+
-+ return 0;
-+}
-+
-+int rsnd_src_ssiu_stop(struct rsnd_mod *ssi_mod,
-+ struct rsnd_dai *rdai,
-+ int use_busif)
-+{
-+ /*
-+ * DMA settings for SSIU
-+ */
-+ if (use_busif)
-+ rsnd_mod_write(ssi_mod, SSI_CTRL, 0);
-+
- return 0;
- }
-
-@@ -467,9 +489,6 @@ static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-- rsnd_mod_write(mod, SSI_BUSIF_ADINR, rsnd_get_adinr(mod));
-- rsnd_mod_write(mod, SSI_BUSIF_MODE, 1);
--
- rsnd_mod_write(mod, SRC_SRCCR, 0x00011110);
-
- rsnd_mod_write(mod, SRC_BSDSR, 0x01800000);
-@@ -554,7 +573,6 @@ static int rsnd_src_start_gen2(struct rsnd_mod *mod,
-
- rsnd_dma_start(rsnd_mod_to_dma(&src->mod));
-
-- rsnd_mod_write(mod, SSI_CTRL, 0x1);
- rsnd_mod_write(mod, SRC_CTRL, val);
-
- return rsnd_src_start(mod, rdai);
-@@ -565,7 +583,6 @@ static int rsnd_src_stop_gen2(struct rsnd_mod *mod,
- {
- struct rsnd_src *src = rsnd_mod_to_src(mod);
-
-- rsnd_mod_write(mod, SSI_CTRL, 0);
- rsnd_mod_write(mod, SRC_CTRL, 0);
-
- rsnd_dma_stop(rsnd_mod_to_dma(&src->mod));
-diff --git a/sound/soc/sh/rcar/ssi.c b/sound/soc/sh/rcar/ssi.c
-index 2df723df5d19..34e84009162b 100644
---- a/sound/soc/sh/rcar/ssi.c
-+++ b/sound/soc/sh/rcar/ssi.c
-@@ -90,6 +90,20 @@ struct rsnd_ssi {
- #define rsnd_ssi_mode_flags(p) ((p)->info->flags)
- #define rsnd_ssi_dai_id(ssi) ((ssi)->info->dai_id)
-
-+static int rsnd_ssi_use_busif(struct rsnd_mod *mod)
-+{
-+ struct rsnd_ssi *ssi = rsnd_mod_to_ssi(mod);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ int use_busif = 0;
-+
-+ if (!(rsnd_ssi_mode_flags(ssi) & RSND_SSI_NO_BUSIF))
-+ use_busif = 1;
-+ if (rsnd_io_to_mod_src(io))
-+ use_busif = 1;
-+
-+ return use_busif;
-+}
-+
- static void rsnd_ssi_status_check(struct rsnd_mod *mod,
- u32 bit)
- {
-@@ -289,8 +303,6 @@ static int rsnd_ssi_init(struct rsnd_mod *mod,
- ssi->cr_own = cr;
- ssi->err = -1; /* ignore 1st error */
-
-- rsnd_src_ssi_mode_init(mod, rdai);
--
- return 0;
- }
-
-@@ -389,6 +401,8 @@ static int rsnd_ssi_pio_start(struct rsnd_mod *mod,
- /* enable PIO IRQ */
- ssi->cr_etc = UIEN | OIEN | DIEN;
-
-+ rsnd_src_ssiu_start(mod, rdai, 0);
-+
- rsnd_src_enable_ssi_irq(mod, rdai);
-
- rsnd_ssi_hw_start(ssi, rdai, io);
-@@ -405,6 +419,8 @@ static int rsnd_ssi_pio_stop(struct rsnd_mod *mod,
-
- rsnd_ssi_hw_stop(ssi, rdai);
-
-+ rsnd_src_ssiu_stop(mod, rdai, 0);
-+
- return 0;
- }
-
-@@ -457,6 +473,8 @@ static int rsnd_ssi_dma_start(struct rsnd_mod *mod,
- /* enable DMA transfer */
- ssi->cr_etc = DMEN;
-
-+ rsnd_src_ssiu_start(mod, rdai, rsnd_ssi_use_busif(mod));
-+
- rsnd_dma_start(dma);
-
- rsnd_ssi_hw_start(ssi, ssi->rdai, io);
-@@ -482,11 +500,19 @@ static int rsnd_ssi_dma_stop(struct rsnd_mod *mod,
-
- rsnd_dma_stop(dma);
-
-+ rsnd_src_ssiu_stop(mod, rdai, 1);
-+
- return 0;
- }
-
-+static char *rsnd_ssi_dma_name(struct rsnd_mod *mod)
-+{
-+ return rsnd_ssi_use_busif(mod) ? "ssiu" : SSI_NAME;
-+}
-+
- static struct rsnd_mod_ops rsnd_ssi_dma_ops = {
- .name = SSI_NAME,
-+ .dma_name = rsnd_ssi_dma_name,
- .probe = rsnd_ssi_dma_probe,
- .remove = rsnd_ssi_dma_remove,
- .init = rsnd_ssi_init,
-@@ -595,6 +621,9 @@ static void rsnd_of_parse_ssi(struct platform_device *pdev,
- */
- ssi_info->dma_id = of_get_property(np, "pio-transfer", NULL) ?
- 0 : 1;
-+
-+ if (of_get_property(np, "no-busif", NULL))
-+ ssi_info->flags |= RSND_SSI_NO_BUSIF;
- }
-
- rsnd_of_parse_ssi_end:
---
-2.1.2
-
diff --git a/patches.renesas/0792-ASoC-rsnd-use-dmaengine_prep_dma_cyclic-instead-of-o.patch b/patches.renesas/0792-ASoC-rsnd-use-dmaengine_prep_dma_cyclic-instead-of-o.patch
deleted file mode 100644
index 96f86c752d940..0000000000000
--- a/patches.renesas/0792-ASoC-rsnd-use-dmaengine_prep_dma_cyclic-instead-of-o.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From 6eea46c7e6699fd008a747e4b78815470f01df21 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:56:41 -0700
-Subject: ASoC: rsnd: use dmaengine_prep_dma_cyclic() instead of original
- method
-
-Current R-Car sound driver is using DMAEngine directly,
-but, ASoC is requesting to use common DMA transfer method,
-like snd_dmaengine_pcm_trigger() or dmaengine_pcm_ops.
-It is difficult to switch at this point, since Renesas
-driver is also supporting PIO transfer.
-This patch uses dmaengine_prep_dma_cyclic() instead
-of dmaengine_prep_slave_single().
-It is used in requested method,
-and is good first step to switch over.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ccd01559ead29b59918458e9b412ff18b88fc6cf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 76 ++++++++++++------------------------------------
- sound/soc/sh/rcar/rsnd.h | 4 ---
- 2 files changed, 18 insertions(+), 62 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 8c3707a68603..5149fe2dae9f 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -164,26 +164,8 @@ void rsnd_mod_init(struct rsnd_priv *priv,
- /*
- * rsnd_dma functions
- */
--static void __rsnd_dma_start(struct rsnd_dma *dma);
--static void rsnd_dma_continue(struct rsnd_dma *dma)
--{
-- /* push next A or B plane */
-- dma->submit_loop = 1;
-- schedule_work(&dma->work);
--}
--
--void rsnd_dma_start(struct rsnd_dma *dma)
--{
-- /* push both A and B plane*/
-- dma->offset = 0;
-- dma->submit_loop = 2;
-- __rsnd_dma_start(dma);
--}
--
- void rsnd_dma_stop(struct rsnd_dma *dma)
- {
-- dma->submit_loop = 0;
-- cancel_work_sync(&dma->work);
- dmaengine_terminate_all(dma->chan);
- }
-
-@@ -191,11 +173,7 @@ static void rsnd_dma_complete(void *data)
- {
- struct rsnd_dma *dma = (struct rsnd_dma *)data;
- struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
-- struct rsnd_priv *priv = rsnd_mod_to_priv(rsnd_dma_to_mod(dma));
- struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-- unsigned long flags;
--
-- rsnd_lock(priv, flags);
-
- /*
- * Renesas sound Gen1 needs 1 DMAC,
-@@ -208,57 +186,40 @@ static void rsnd_dma_complete(void *data)
- * rsnd_dai_pointer_update() will be called twice,
- * ant it will breaks io->byte_pos
- */
-- if (dma->submit_loop)
-- rsnd_dma_continue(dma);
--
-- rsnd_unlock(priv, flags);
-
- rsnd_dai_pointer_update(io, io->byte_per_period);
- }
-
--static void __rsnd_dma_start(struct rsnd_dma *dma)
-+void rsnd_dma_start(struct rsnd_dma *dma)
- {
- struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
- struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-- struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct snd_pcm_substream *substream = io->substream;
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_async_tx_descriptor *desc;
-- dma_addr_t buf;
-- size_t len = io->byte_per_period;
-- int i;
--
-- for (i = 0; i < dma->submit_loop; i++) {
-
-- buf = runtime->dma_addr +
-- rsnd_dai_pointer_offset(io, dma->offset + len);
-- dma->offset = len;
-+ desc = dmaengine_prep_dma_cyclic(dma->chan,
-+ substream->runtime->dma_addr,
-+ snd_pcm_lib_buffer_bytes(substream),
-+ snd_pcm_lib_period_bytes(substream),
-+ dma->dir,
-+ DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-
-- desc = dmaengine_prep_slave_single(
-- dma->chan, buf, len, dma->dir,
-- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
-- if (!desc) {
-- dev_err(dev, "dmaengine_prep_slave_sg() fail\n");
-- return;
-- }
--
-- desc->callback = rsnd_dma_complete;
-- desc->callback_param = dma;
-+ if (!desc) {
-+ dev_err(dev, "dmaengine_prep_slave_sg() fail\n");
-+ return;
-+ }
-
-- if (dmaengine_submit(desc) < 0) {
-- dev_err(dev, "dmaengine_submit() fail\n");
-- return;
-- }
-+ desc->callback = rsnd_dma_complete;
-+ desc->callback_param = dma;
-
-- dma_async_issue_pending(dma->chan);
-+ if (dmaengine_submit(desc) < 0) {
-+ dev_err(dev, "dmaengine_submit() fail\n");
-+ return;
- }
--}
--
--static void rsnd_dma_do_work(struct work_struct *work)
--{
-- struct rsnd_dma *dma = container_of(work, struct rsnd_dma, work);
-
-- __rsnd_dma_start(dma);
-+ dma_async_issue_pending(dma->chan);
- }
-
- int rsnd_dma_available(struct rsnd_dma *dma)
-@@ -372,7 +333,6 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- goto rsnd_dma_init_err;
-
- dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-- INIT_WORK(&dma->work, rsnd_dma_do_work);
-
- return 0;
-
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index a1466c1570bc..60b5e9260600 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -156,12 +156,8 @@ u32 rsnd_get_adinr(struct rsnd_mod *mod);
- */
- struct rsnd_dma {
- struct sh_dmae_slave slave;
-- struct work_struct work;
- struct dma_chan *chan;
- enum dma_transfer_direction dir;
--
-- int submit_loop;
-- int offset; /* it cares A/B plane */
- };
-
- void rsnd_dma_start(struct rsnd_dma *dma);
---
-2.1.2
-
diff --git a/patches.renesas/0793-ASoC-rsnd-enable-DVC-when-capture.patch b/patches.renesas/0793-ASoC-rsnd-enable-DVC-when-capture.patch
deleted file mode 100644
index 3ed21f55898fb..0000000000000
--- a/patches.renesas/0793-ASoC-rsnd-enable-DVC-when-capture.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 2775700aed948d9bf1b01b2875091c4730144200 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:57:04 -0700
-Subject: ASoC: rsnd: enable DVC when capture
-
-Current DVC can be enabled only when playback,
-but, this came from misunderstanding.
-It is not correct.
-
-DVC <-> DMA relationship is...
-
-Playback: MEM -> DMAC -> SRC -> DVC -> DMACp -> SSI
-Capture: SSI -> DMACp -> SRC -> DVC -> DMAC -> MEM
-
-DVC can be used for both Playback/Capture
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 65f459923b7926f6a7f156970d83360bd80cb169)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/dvc.c | 12 ++++--------
- 1 file changed, 4 insertions(+), 8 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
-index ed0007006899..deef310c75dc 100644
---- a/sound/soc/sh/rcar/dvc.c
-+++ b/sound/soc/sh/rcar/dvc.c
-@@ -191,24 +191,20 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
- struct snd_soc_pcm_runtime *rtd)
- {
- struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-- struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-- struct device *dev = rsnd_priv_to_dev(priv);
- struct snd_card *card = rtd->card->snd_card;
- struct snd_kcontrol *kctrl;
- static struct snd_kcontrol_new knew = {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-- .name = "Playback Volume",
- .info = rsnd_dvc_volume_info,
- .get = rsnd_dvc_volume_get,
- .put = rsnd_dvc_volume_put,
- };
- int ret;
-
-- if (!rsnd_dai_is_play(rdai, io)) {
-- dev_err(dev, "DVC%d is connected to Capture DAI\n",
-- rsnd_mod_id(mod));
-- return -EINVAL;
-- }
-+ if (rsnd_dai_is_play(rdai, io))
-+ knew.name = "Playback Volume";
-+ else
-+ knew.name = "Capture Volume";
-
- kctrl = snd_ctl_new1(&knew, mod);
- if (!kctrl)
---
-2.1.2
-
diff --git a/patches.renesas/0794-ASoC-rsnd-DMA-cleanup-for-flexible-SSI-SRC-selection.patch b/patches.renesas/0794-ASoC-rsnd-DMA-cleanup-for-flexible-SSI-SRC-selection.patch
deleted file mode 100644
index 233b2cbb475f5..0000000000000
--- a/patches.renesas/0794-ASoC-rsnd-DMA-cleanup-for-flexible-SSI-SRC-selection.patch
+++ /dev/null
@@ -1,264 +0,0 @@
-From de10782c355f238a13bd8af5d30a80774dc268a3 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:58:26 -0700
-Subject: ASoC: rsnd: DMA cleanup for flexible SSI/SRC selection
-
-Current R-Car sound SSI/SRC/DVC selection has feature limit.
-(It is assuming that SSI/SRC are using same index number)
-
-So that enabling SSI/SRC flexible selection,
-this patch modifies DMA settings.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 37523034851d6a4b1dc951e24bf2f11bc28fe58d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 45 ++++++++++++++++++++----------
- sound/soc/sh/rcar/gen.c | 71 +++++++++++++++++++++---------------------------
- sound/soc/sh/rcar/rsnd.h | 7 ++---
- 3 files changed, 64 insertions(+), 59 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 5149fe2dae9f..4435a31ecdad 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -239,8 +239,21 @@ static int _rsnd_dma_of_name(char *dma_name, struct rsnd_mod *mod)
-
- }
-
--static void rsnd_dma_of_name(struct rsnd_dma *dma,
-- int is_play, char *dma_name)
-+static void rsnd_dma_of_name(struct rsnd_mod *mod_from,
-+ struct rsnd_mod *mod_to,
-+ char *dma_name)
-+{
-+ int index = 0;
-+
-+ index = _rsnd_dma_of_name(dma_name + index, mod_from);
-+ *(dma_name + index++) = '_';
-+ index = _rsnd_dma_of_name(dma_name + index, mod_to);
-+}
-+
-+static void rsnd_dma_of_path(struct rsnd_dma *dma,
-+ int is_play,
-+ struct rsnd_mod **mod_from,
-+ struct rsnd_mod **mod_to)
- {
- struct rsnd_mod *this = rsnd_dma_to_mod(dma);
- struct rsnd_dai_stream *io = rsnd_mod_to_io(this);
-@@ -248,7 +261,6 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
- struct rsnd_mod *src = rsnd_io_to_mod_src(io);
- struct rsnd_mod *dvc = rsnd_io_to_mod_dvc(io);
- struct rsnd_mod *mod[MOD_MAX];
-- struct rsnd_mod *src_mod, *dst_mod;
- int i, index;
-
-
-@@ -285,17 +297,12 @@ static void rsnd_dma_of_name(struct rsnd_dma *dma,
- }
-
- if (is_play) {
-- src_mod = mod[index - 1];
-- dst_mod = mod[index];
-+ *mod_from = mod[index - 1];
-+ *mod_to = mod[index];
- } else {
-- src_mod = mod[index];
-- dst_mod = mod[index - 1];
-+ *mod_from = mod[index];
-+ *mod_to = mod[index - 1];
- }
--
-- index = 0;
-- index = _rsnd_dma_of_name(dma_name + index, src_mod);
-- *(dma_name + index++) = '_';
-- index = _rsnd_dma_of_name(dma_name + index, dst_mod);
- }
-
- int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
-@@ -303,6 +310,8 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- {
- struct device *dev = rsnd_priv_to_dev(priv);
- struct dma_slave_config cfg;
-+ struct rsnd_mod *mod_from;
-+ struct rsnd_mod *mod_to;
- char dma_name[DMA_NAME_SIZE];
- dma_cap_mask_t mask;
- int ret;
-@@ -315,10 +324,16 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- dma_cap_zero(mask);
- dma_cap_set(DMA_SLAVE, mask);
-
-- rsnd_dma_of_name(dma, is_play, dma_name);
-- rsnd_gen_dma_addr(priv, dma, &cfg, is_play, id);
-+ rsnd_dma_of_path(dma, is_play, &mod_from, &mod_to);
-+ rsnd_dma_of_name(mod_from, mod_to, dma_name);
-+
-+ cfg.slave_id = id;
-+ cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-+ cfg.src_addr = rsnd_gen_dma_addr(priv, mod_from, is_play, 1);
-+ cfg.dst_addr = rsnd_gen_dma_addr(priv, mod_to, is_play, 0);
-
-- dev_dbg(dev, "dma name : %s\n", dma_name);
-+ dev_dbg(dev, "dma : %s %pad -> %pad\n",
-+ dma_name, &cfg.src_addr, &cfg.dst_addr);
-
- dma->chan = dma_request_slave_channel_compat(mask, shdma_chan_filter,
- (void *)id, dev,
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 46677af6c748..73ce4c90efda 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -168,7 +168,7 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
- * SSI : 0xec541000 / 0xec241008 / 0xec24100c
- * SSIU: 0xec541000 / 0xec100000 / 0xec100000 / 0xec400000 / 0xec400000
- * SCU : 0xec500000 / 0xec000000 / 0xec004000 / 0xec300000 / 0xec304000
-- * CMD : 0xec500000 / 0xec008000 0xec308000
-+ * CMD : 0xec500000 / / 0xec008000 0xec308000
- */
- #define RDMA_SSI_I_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0x8)
- #define RDMA_SSI_O_N(addr, i) (addr ##_reg - 0x00300000 + (0x40 * i) + 0xc)
-@@ -188,14 +188,13 @@ static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
- #define RDMA_CMD_O_N(addr, i) (addr ##_reg - 0x004f8000 + (0x400 * i))
- #define RDMA_CMD_O_P(addr, i) (addr ##_reg - 0x001f8000 + (0x400 * i))
-
--static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
-- struct rsnd_dma *dma,
-- struct dma_slave_config *cfg,
-- int is_play, int slave_id)
-+static dma_addr_t
-+rsnd_gen2_dma_addr(struct rsnd_priv *priv,
-+ struct rsnd_mod *mod,
-+ int is_play, int is_from)
- {
- struct platform_device *pdev = rsnd_priv_to_pdev(priv);
- struct device *dev = rsnd_priv_to_dev(priv);
-- struct rsnd_mod *mod = rsnd_dma_to_mod(dma);
- struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- dma_addr_t ssi_reg = platform_get_resource(pdev,
- IORESOURCE_MEM, RSND_GEN2_SSI)->start;
-@@ -206,76 +205,68 @@ static void rsnd_gen2_dma_addr(struct rsnd_priv *priv,
- int use_dvc = !!rsnd_io_to_mod_dvc(io);
- int id = rsnd_mod_id(mod);
- struct dma_addr {
-- dma_addr_t src_addr;
-- dma_addr_t dst_addr;
-+ dma_addr_t out_addr;
-+ dma_addr_t in_addr;
- } dma_addrs[3][2][3] = {
- /* SRC */
- {{{ 0, 0 },
- /* Capture */
-- { RDMA_SRC_O_N(src, id), 0 },
-- { RDMA_CMD_O_N(src, id), 0 } },
-+ { RDMA_SRC_O_N(src, id), RDMA_SRC_I_P(src, id) },
-+ { RDMA_CMD_O_N(src, id), RDMA_SRC_I_P(src, id) } },
- /* Playback */
- {{ 0, 0, },
-- { 0, RDMA_SRC_I_N(src, id) },
-- { 0, RDMA_SRC_I_N(src, id) } }
-+ { RDMA_SRC_O_P(src, id), RDMA_SRC_I_N(src, id) },
-+ { RDMA_CMD_O_P(src, id), RDMA_SRC_I_N(src, id) } }
- },
- /* SSI */
- /* Capture */
- {{{ RDMA_SSI_O_N(ssi, id), 0 },
-- { 0, 0 },
-- { 0, 0 } },
-+ { RDMA_SSIU_O_P(ssi, id), 0 },
-+ { RDMA_SSIU_O_P(ssi, id), 0 } },
- /* Playback */
- {{ 0, RDMA_SSI_I_N(ssi, id) },
-- { 0, 0 },
-- { 0, 0 } }
-+ { 0, RDMA_SSIU_I_P(ssi, id) },
-+ { 0, RDMA_SSIU_I_P(ssi, id) } }
- },
- /* SSIU */
- /* Capture */
- {{{ RDMA_SSIU_O_N(ssi, id), 0 },
-- { RDMA_SSIU_O_P(ssi, id), RDMA_SRC_I_P(src, id) },
-- { RDMA_SSIU_O_P(ssi, id), RDMA_SRC_I_P(src, id) } },
-+ { RDMA_SSIU_O_P(ssi, id), 0 },
-+ { RDMA_SSIU_O_P(ssi, id), 0 } },
- /* Playback */
- {{ 0, RDMA_SSIU_I_N(ssi, id) },
-- { RDMA_SRC_O_P(src, id), RDMA_SSIU_I_P(ssi, id) },
-- { RDMA_CMD_O_P(src, id), RDMA_SSIU_I_P(ssi, id) } } },
-+ { 0, RDMA_SSIU_I_P(ssi, id) },
-+ { 0, RDMA_SSIU_I_P(ssi, id) } } },
- };
-
- /* it shouldn't happen */
-- if (use_dvc & !use_src) {
-+ if (use_dvc & !use_src)
- dev_err(dev, "DVC is selected without SRC\n");
-- return;
-- }
-
- /* use SSIU or SSI ? */
- if (is_ssi && (0 == strcmp(rsnd_mod_dma_name(mod), "ssiu")))
- is_ssi++;
-
-- cfg->src_addr = dma_addrs[is_ssi][is_play][use_src + use_dvc].src_addr;
-- cfg->dst_addr = dma_addrs[is_ssi][is_play][use_src + use_dvc].dst_addr;
--
-- dev_dbg(dev, "dma%d addr - src : %x / dst : %x\n",
-- id, cfg->src_addr, cfg->dst_addr);
-+ return (is_from) ?
-+ dma_addrs[is_ssi][is_play][use_src + use_dvc].out_addr :
-+ dma_addrs[is_ssi][is_play][use_src + use_dvc].in_addr;
- }
-
--void rsnd_gen_dma_addr(struct rsnd_priv *priv,
-- struct rsnd_dma *dma,
-- struct dma_slave_config *cfg,
-- int is_play, int slave_id)
-+dma_addr_t rsnd_gen_dma_addr(struct rsnd_priv *priv,
-+ struct rsnd_mod *mod,
-+ int is_play, int is_from)
- {
-- cfg->slave_id = slave_id;
-- cfg->src_addr = 0;
-- cfg->dst_addr = 0;
-- cfg->direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
--
- /*
- * gen1 uses default DMA addr
- */
- if (rsnd_is_gen1(priv))
-- return;
-+ return 0;
-
-- rsnd_gen2_dma_addr(priv, dma, cfg, is_play, slave_id);
--}
-+ if (!mod)
-+ return 0;
-
-+ return rsnd_gen2_dma_addr(priv, mod, is_play, is_from);
-+}
-
- /*
- * Gen2
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 60b5e9260600..425b22ee6fb9 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -279,10 +279,9 @@ int rsnd_gen_probe(struct platform_device *pdev,
- void __iomem *rsnd_gen_reg_get(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- enum rsnd_reg reg);
--void rsnd_gen_dma_addr(struct rsnd_priv *priv,
-- struct rsnd_dma *dma,
-- struct dma_slave_config *cfg,
-- int is_play, int slave_id);
-+dma_addr_t rsnd_gen_dma_addr(struct rsnd_priv *priv,
-+ struct rsnd_mod *mod,
-+ int is_play, int is_from);
-
- #define rsnd_is_gen1(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN1)
- #define rsnd_is_gen2(s) (((s)->info->flags & RSND_GEN_MASK) == RSND_GEN2)
---
-2.1.2
-
diff --git a/patches.renesas/0795-ASoC-rsnd-DMA-start-address-is-properly-used-for-eac.patch b/patches.renesas/0795-ASoC-rsnd-DMA-start-address-is-properly-used-for-eac.patch
deleted file mode 100644
index 1e8963ea3435a..0000000000000
--- a/patches.renesas/0795-ASoC-rsnd-DMA-start-address-is-properly-used-for-eac.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From c317b82b4eb12a09c9affc19245aa9dee66c958d Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:59:02 -0700
-Subject: ASoC: rsnd: DMA start address is properly used for each DMAC
-
-R-Car sound uses Audio DMAC and Audio DMAC peri peri.
-Audio DMAC peri peri transfers data inside circuit.
-
-DMA transfer needs source / destination address,
-and destination address can be set via dmaengine_slave_config().
-The source address can be set when starting DMAEngine.
-Because Audio DMAC peri peri always ignores its value,
-current driver always used same source address for
-Audio DMAC / Audio DMAC peri peri
-(Audio DMAC peri peri source / destination address
-is always fixed value)
-But, This is not good match for DT booting.
-This patch properly uses DMA start address
-for Audio DMAC / Audio DMAC peri peri.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 340371005d399b595f4044fc5e336f4a66ead101)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 2 ++
- sound/soc/sh/rcar/rsnd.h | 1 +
- 2 files changed, 3 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 4435a31ecdad..49d9b31b185c 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -200,6 +200,7 @@ void rsnd_dma_start(struct rsnd_dma *dma)
- struct dma_async_tx_descriptor *desc;
-
- desc = dmaengine_prep_dma_cyclic(dma->chan,
-+ (dma->addr) ? dma->addr :
- substream->runtime->dma_addr,
- snd_pcm_lib_buffer_bytes(substream),
- snd_pcm_lib_period_bytes(substream),
-@@ -347,6 +348,7 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- if (ret < 0)
- goto rsnd_dma_init_err;
-
-+ dma->addr = is_play ? cfg.src_addr : cfg.dst_addr;
- dma->dir = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
-
- return 0;
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 425b22ee6fb9..631b149df08f 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -158,6 +158,7 @@ struct rsnd_dma {
- struct sh_dmae_slave slave;
- struct dma_chan *chan;
- enum dma_transfer_direction dir;
-+ dma_addr_t addr;
- };
-
- void rsnd_dma_start(struct rsnd_dma *dma);
---
-2.1.2
-
diff --git a/patches.renesas/0796-ASoC-rsnd-add-DT-support-to-DVC.patch b/patches.renesas/0796-ASoC-rsnd-add-DT-support-to-DVC.patch
deleted file mode 100644
index 87cc6c3136956..0000000000000
--- a/patches.renesas/0796-ASoC-rsnd-add-DT-support-to-DVC.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 94c7242200393217fa3fe762ae6eadee321b529e Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:59:28 -0700
-Subject: ASoC: rsnd: add DT support to DVC
-
-Now, DVC can use DT
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 34cb6123f90d264d63bdcd3ee0df0d2cb4b36aab)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- .../devicetree/bindings/sound/renesas,rsnd.txt | 8 +++++
- sound/soc/sh/rcar/core.c | 13 ++++++--
- sound/soc/sh/rcar/dvc.c | 38 ++++++++++++++++++++++
- 3 files changed, 57 insertions(+), 2 deletions(-)
-
-diff --git a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-index 41a120c2389d..aa697abf337e 100644
---- a/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-+++ b/Documentation/devicetree/bindings/sound/renesas,rsnd.txt
-@@ -13,6 +13,9 @@ Required properties:
- - rcar_sound,src : Should contain SRC feature.
- The number of SRC subnode should be same as HW.
- see below for detail.
-+- rcar_sound,dvc : Should contain DVC feature.
-+ The number of DVC subnode should be same as HW.
-+ see below for detail.
- - rcar_sound,dai : DAI contents.
- The number of DAI subnode should be same as HW.
- see below for detail.
-@@ -40,6 +43,11 @@ rcar_sound: rcar_sound@0xffd90000 {
- <0 0xec540000 0 0x1000>, /* SSIU */
- <0 0xec541000 0 0x1280>; /* SSI */
-
-+ rcar_sound,dvc {
-+ dvc0: dvc@0 { };
-+ dvc1: dvc@1 { };
-+ };
-+
- rcar_sound,src {
- src0: src@0 { };
- src1: src@1 { };
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 49d9b31b185c..907d4802fd5c 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -286,7 +286,13 @@ static void rsnd_dma_of_path(struct rsnd_dma *dma,
- mod[i] = src;
- src = NULL;
- } else {
-- mod[i] = dvc;
-+ if ((!is_play) && (this == src))
-+ this = dvc;
-+
-+ mod[i] = (is_play) ? src : dvc;
-+ i++;
-+ mod[i] = (is_play) ? dvc : src;
-+ src = NULL;
- dvc = NULL;
- }
-
-@@ -719,12 +725,13 @@ static void rsnd_of_parse_dai(struct platform_device *pdev,
- struct device_node *dai_node, *dai_np;
- struct device_node *ssi_node, *ssi_np;
- struct device_node *src_node, *src_np;
-+ struct device_node *dvc_node, *dvc_np;
- struct device_node *playback, *capture;
- struct rsnd_dai_platform_info *dai_info;
- struct rcar_snd_info *info = rsnd_priv_to_info(priv);
- struct device *dev = &pdev->dev;
- int nr, i;
-- int dai_i, ssi_i, src_i;
-+ int dai_i, ssi_i, src_i, dvc_i;
-
- if (!of_data)
- return;
-@@ -750,6 +757,7 @@ static void rsnd_of_parse_dai(struct platform_device *pdev,
-
- ssi_node = of_get_child_by_name(dev->of_node, "rcar_sound,ssi");
- src_node = of_get_child_by_name(dev->of_node, "rcar_sound,src");
-+ dvc_node = of_get_child_by_name(dev->of_node, "rcar_sound,dvc");
-
- #define mod_parse(name) \
- if (name##_node) { \
-@@ -785,6 +793,7 @@ if (name##_node) { \
-
- mod_parse(ssi);
- mod_parse(src);
-+ mod_parse(dvc);
-
- if (playback)
- of_node_put(playback);
-diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
-index deef310c75dc..9096fb03d001 100644
---- a/sound/soc/sh/rcar/dvc.c
-+++ b/sound/soc/sh/rcar/dvc.c
-@@ -235,6 +235,42 @@ struct rsnd_mod *rsnd_dvc_mod_get(struct rsnd_priv *priv, int id)
- return &((struct rsnd_dvc *)(priv->dvc) + id)->mod;
- }
-
-+static void rsnd_of_parse_dvc(struct platform_device *pdev,
-+ const struct rsnd_of_data *of_data,
-+ struct rsnd_priv *priv)
-+{
-+ struct device_node *node;
-+ struct rsnd_dvc_platform_info *dvc_info;
-+ struct rcar_snd_info *info = rsnd_priv_to_info(priv);
-+ struct device *dev = &pdev->dev;
-+ int nr;
-+
-+ if (!of_data)
-+ return;
-+
-+ node = of_get_child_by_name(dev->of_node, "rcar_sound,dvc");
-+ if (!node)
-+ return;
-+
-+ nr = of_get_child_count(node);
-+ if (!nr)
-+ goto rsnd_of_parse_dvc_end;
-+
-+ dvc_info = devm_kzalloc(dev,
-+ sizeof(struct rsnd_dvc_platform_info) * nr,
-+ GFP_KERNEL);
-+ if (!dvc_info) {
-+ dev_err(dev, "dvc info allocation error\n");
-+ goto rsnd_of_parse_dvc_end;
-+ }
-+
-+ info->dvc_info = dvc_info;
-+ info->dvc_info_nr = nr;
-+
-+rsnd_of_parse_dvc_end:
-+ of_node_put(node);
-+}
-+
- int rsnd_dvc_probe(struct platform_device *pdev,
- const struct rsnd_of_data *of_data,
- struct rsnd_priv *priv)
-@@ -246,6 +282,8 @@ int rsnd_dvc_probe(struct platform_device *pdev,
- char name[RSND_DVC_NAME_SIZE];
- int i, nr;
-
-+ rsnd_of_parse_dvc(pdev, of_data, priv);
-+
- nr = info->dvc_info_nr;
- if (!nr)
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0797-ASoC-rsnd-add-missing-src-dst_addr_width-for-DMAEngi.patch b/patches.renesas/0797-ASoC-rsnd-add-missing-src-dst_addr_width-for-DMAEngi.patch
deleted file mode 100644
index b6c7ffcdcea5c..0000000000000
--- a/patches.renesas/0797-ASoC-rsnd-add-missing-src-dst_addr_width-for-DMAEngi.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From de2e3bdd355dd0fa39908a1438509f8ac9cc6a66 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 16 Jul 2014 23:18:44 -0700
-Subject: ASoC: rsnd: add missing src/dst_addr_width for DMAEngine
-
-Renesas new DMAEngine driver requests src/dst_addr_width
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 2bf865ba30405056e7922b960a1687bb4d5a4999)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index 907d4802fd5c..c48d999a3fce 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -338,6 +338,8 @@ int rsnd_dma_init(struct rsnd_priv *priv, struct rsnd_dma *dma,
- cfg.direction = is_play ? DMA_MEM_TO_DEV : DMA_DEV_TO_MEM;
- cfg.src_addr = rsnd_gen_dma_addr(priv, mod_from, is_play, 1);
- cfg.dst_addr = rsnd_gen_dma_addr(priv, mod_to, is_play, 0);
-+ cfg.src_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-+ cfg.dst_addr_width = DMA_SLAVE_BUSWIDTH_4_BYTES;
-
- dev_dbg(dev, "dma : %s %pad -> %pad\n",
- dma_name, &cfg.src_addr, &cfg.dst_addr);
---
-2.1.2
-
diff --git a/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch b/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch
deleted file mode 100644
index a28e657d4b6c5..0000000000000
--- a/patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From aa1367bf9ff1f8ba67b8ac3f31a70253530873c4 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 24 Jul 2014 01:51:31 -0700
-Subject: ASoC: rsnd: fixup dai remove callback operation
-
-rsnd driver is using SSI/SRC/DVC which are
-using "mod" base operation.
-These "mod" are supporting "probe" and "remove" callbacks.
-
-Current rsnd_probe should call "remove" if "probe" was failed,
-since "probe" might be having DMAEngine handle.
-Some mod's "remove" callback might be called without calling
-"probe", but it is no problem. because "remove" do nothing
-in such case.
-
-So, all mod's "remove" should be called when error case
-of rsnd_probe() and rsnd_remove().
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit d62a3dcd4d75b1713d12697afdbffaf9a9da8f43)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -1042,11 +1042,11 @@ static int rsnd_probe(struct platform_de
- for_each_rsnd_dai(rdai, priv, i) {
- ret = rsnd_dai_call(probe, &rdai->playback, rdai);
- if (ret)
-- return ret;
-+ goto exit_snd_probe;
-
- ret = rsnd_dai_call(probe, &rdai->capture, rdai);
- if (ret)
-- return ret;
-+ goto exit_snd_probe;
- }
-
- /*
-@@ -1074,6 +1074,11 @@ static int rsnd_probe(struct platform_de
-
- exit_snd_soc:
- snd_soc_unregister_platform(dev);
-+exit_snd_probe:
-+ for_each_rsnd_dai(rdai, priv, i) {
-+ rsnd_dai_call(remove, &rdai->playback, rdai);
-+ rsnd_dai_call(remove, &rdai->capture, rdai);
-+ }
-
- return ret;
- }
-@@ -1082,21 +1087,16 @@ static int rsnd_remove(struct platform_d
- {
- struct rsnd_priv *priv = dev_get_drvdata(&pdev->dev);
- struct rsnd_dai *rdai;
-- int ret, i;
-+ int ret = 0, i;
-
- pm_runtime_disable(&pdev->dev);
-
- for_each_rsnd_dai(rdai, priv, i) {
-- ret = rsnd_dai_call(remove, &rdai->playback, rdai);
-- if (ret)
-- return ret;
--
-- ret = rsnd_dai_call(remove, &rdai->capture, rdai);
-- if (ret)
-- return ret;
-+ ret |= rsnd_dai_call(remove, &rdai->playback, rdai);
-+ ret |= rsnd_dai_call(remove, &rdai->capture, rdai);
- }
-
-- return 0;
-+ return ret;
- }
-
- static struct platform_driver rsnd_driver = {
diff --git a/patches.renesas/0799-ASoC-rsnd-use-regmap_mmio-instead-of-original-regmap.patch b/patches.renesas/0799-ASoC-rsnd-use-regmap_mmio-instead-of-original-regmap.patch
deleted file mode 100644
index 730a673bc1feb..0000000000000
--- a/patches.renesas/0799-ASoC-rsnd-use-regmap_mmio-instead-of-original-regmap.patch
+++ /dev/null
@@ -1,566 +0,0 @@
-From 42f1100da913179ba34b2f3d8d96f6d0d5631020 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 29 Jul 2014 00:37:31 -0700
-Subject: ASoC: rsnd: use regmap_mmio instead of original regmap bus
-
-Current rsnd driver is using regmap and regmap_field.
-It used original regmap bus which is
-single regmap instance for multi register mapping.
-This patch modifies it to use regmap_mmio bus,
-and tidyuped probe method
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit b8c637864a6904a9ba8e0df556d5bdf9f26b2c54)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/Kconfig | 2 +-
- sound/soc/sh/rcar/gen.c | 439 +++++++++++++++++++++---------------------------
- 2 files changed, 189 insertions(+), 252 deletions(-)
-
-diff --git a/sound/soc/sh/Kconfig b/sound/soc/sh/Kconfig
-index b43fdf0d08af..80245b6eebd6 100644
---- a/sound/soc/sh/Kconfig
-+++ b/sound/soc/sh/Kconfig
-@@ -37,7 +37,7 @@ config SND_SOC_SH4_SIU
- config SND_SOC_RCAR
- tristate "R-Car series SRU/SCU/SSIU/SSI support"
- select SND_SIMPLE_CARD
-- select REGMAP
-+ select REGMAP_MMIO
- help
- This option enables R-Car SUR/SCU/SSIU/SSI sound support
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 73ce4c90efda..5f9e0722abcf 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -15,63 +15,35 @@ struct rsnd_gen {
-
- struct rsnd_gen_ops *ops;
-
-- struct regmap *regmap;
-+ struct regmap *regmap[RSND_BASE_MAX];
- struct regmap_field *regs[RSND_REG_MAX];
- };
-
- #define rsnd_priv_to_gen(p) ((struct rsnd_gen *)(p)->gen)
-
--#define RSND_REG_SET(gen, id, reg_id, offset, _id_offset, _id_size) \
-- [id] = { \
-- .reg = (unsigned int)gen->base[reg_id] + offset, \
-- .lsb = 0, \
-- .msb = 31, \
-- .id_size = _id_size, \
-- .id_offset = _id_offset, \
-- }
--
--/*
-- * basic function
-- */
--static int rsnd_regmap_write32(void *context, const void *_data, size_t count)
--{
-- struct rsnd_priv *priv = context;
-- struct device *dev = rsnd_priv_to_dev(priv);
-- u32 *data = (u32 *)_data;
-- u32 val = data[1];
-- void __iomem *reg = (void *)data[0];
--
-- iowrite32(val, reg);
--
-- dev_dbg(dev, "w %p : %08x\n", reg, val);
--
-- return 0;
--}
--
--static int rsnd_regmap_read32(void *context,
-- const void *_data, size_t reg_size,
-- void *_val, size_t val_size)
--{
-- struct rsnd_priv *priv = context;
-- struct device *dev = rsnd_priv_to_dev(priv);
-- u32 *data = (u32 *)_data;
-- u32 *val = (u32 *)_val;
-- void __iomem *reg = (void *)data[0];
--
-- *val = ioread32(reg);
--
-- dev_dbg(dev, "r %p : %08x\n", reg, *val);
-+struct rsnd_regmap_field_conf {
-+ int idx;
-+ unsigned int reg_offset;
-+ unsigned int id_offset;
-+};
-
-- return 0;
-+#define RSND_REG_SET(id, offset, _id_offset) \
-+{ \
-+ .idx = id, \
-+ .reg_offset = offset, \
-+ .id_offset = _id_offset, \
- }
-+/* single address mapping */
-+#define RSND_GEN_S_REG(id, offset) \
-+ RSND_REG_SET(RSND_REG_##id, offset, 0)
-
--static struct regmap_bus rsnd_regmap_bus = {
-- .write = rsnd_regmap_write32,
-- .read = rsnd_regmap_read32,
-- .reg_format_endian_default = REGMAP_ENDIAN_NATIVE,
-- .val_format_endian_default = REGMAP_ENDIAN_NATIVE,
--};
-+/* multi address mapping */
-+#define RSND_GEN_M_REG(id, offset, _id_offset) \
-+ RSND_REG_SET(RSND_REG_##id, offset, _id_offset)
-
-+/*
-+ * basic function
-+ */
- static int rsnd_is_accessible_reg(struct rsnd_priv *priv,
- struct rsnd_gen *gen, enum rsnd_reg reg)
- {
-@@ -88,6 +60,7 @@ static int rsnd_is_accessible_reg(struct rsnd_priv *priv,
- u32 rsnd_read(struct rsnd_priv *priv,
- struct rsnd_mod *mod, enum rsnd_reg reg)
- {
-+ struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
- u32 val;
-
-@@ -96,6 +69,8 @@ u32 rsnd_read(struct rsnd_priv *priv,
-
- regmap_fields_read(gen->regs[reg], rsnd_mod_id(mod), &val);
-
-+ dev_dbg(dev, "r %s - 0x%04d : %08x\n", rsnd_mod_name(mod), reg, val);
-+
- return val;
- }
-
-@@ -103,12 +78,15 @@ void rsnd_write(struct rsnd_priv *priv,
- struct rsnd_mod *mod,
- enum rsnd_reg reg, u32 data)
- {
-+ struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
-
- if (!rsnd_is_accessible_reg(priv, gen, reg))
- return;
-
- regmap_fields_write(gen->regs[reg], rsnd_mod_id(mod), data);
-+
-+ dev_dbg(dev, "w %s - 0x%04d : %08x\n", rsnd_mod_name(mod), reg, data);
- }
-
- void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod,
-@@ -123,33 +101,58 @@ void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod,
- mask, data);
- }
-
--static int rsnd_gen_regmap_init(struct rsnd_priv *priv,
-- struct rsnd_gen *gen,
-- struct reg_field *regf)
-+#define rsnd_gen_regmap_init(priv, id_size, reg_id, conf) \
-+ _rsnd_gen_regmap_init(priv, id_size, reg_id, conf, ARRAY_SIZE(conf))
-+static int _rsnd_gen_regmap_init(struct rsnd_priv *priv,
-+ int id_size,
-+ int reg_id,
-+ struct rsnd_regmap_field_conf *conf,
-+ int conf_size)
- {
-- int i;
-+ struct platform_device *pdev = rsnd_priv_to_pdev(priv);
-+ struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
- struct device *dev = rsnd_priv_to_dev(priv);
-+ struct resource *res;
- struct regmap_config regc;
-+ struct regmap_field *regs;
-+ struct regmap *regmap;
-+ struct reg_field regf;
-+ void __iomem *base;
-+ int i;
-
- memset(&regc, 0, sizeof(regc));
- regc.reg_bits = 32;
- regc.val_bits = 32;
-+ regc.reg_stride = 4;
-
-- gen->regmap = devm_regmap_init(dev, &rsnd_regmap_bus, priv, &regc);
-- if (IS_ERR(gen->regmap)) {
-- dev_err(dev, "regmap error %ld\n", PTR_ERR(gen->regmap));
-- return PTR_ERR(gen->regmap);
-- }
-+ res = platform_get_resource(pdev, IORESOURCE_MEM, reg_id);
-+ if (!res)
-+ return -ENODEV;
-+
-+ base = devm_ioremap_resource(dev, res);
-+ if (IS_ERR(base))
-+ return PTR_ERR(base);
-
-- for (i = 0; i < RSND_REG_MAX; i++) {
-- gen->regs[i] = NULL;
-- if (!regf[i].reg)
-- continue;
-+ regmap = devm_regmap_init_mmio(dev, base, &regc);
-+ if (IS_ERR(regmap))
-+ return PTR_ERR(regmap);
-
-- gen->regs[i] = devm_regmap_field_alloc(dev, gen->regmap, regf[i]);
-- if (IS_ERR(gen->regs[i]))
-- return PTR_ERR(gen->regs[i]);
-+ gen->base[reg_id] = base;
-+ gen->regmap[reg_id] = regmap;
-
-+ for (i = 0; i < conf_size; i++) {
-+
-+ regf.reg = conf[i].reg_offset;
-+ regf.id_offset = conf[i].id_offset;
-+ regf.lsb = 0;
-+ regf.msb = 31;
-+ regf.id_size = id_size;
-+
-+ regs = devm_regmap_field_alloc(dev, regmap, regf);
-+ if (IS_ERR(regs))
-+ return PTR_ERR(regs);
-+
-+ gen->regs[conf[i].idx] = regs;
- }
-
- return 0;
-@@ -271,119 +274,85 @@ dma_addr_t rsnd_gen_dma_addr(struct rsnd_priv *priv,
- /*
- * Gen2
- */
--
--/* single address mapping */
--#define RSND_GEN2_S_REG(gen, reg, id, offset) \
-- RSND_REG_SET(gen, RSND_REG_##id, RSND_GEN2_##reg, offset, 0, 10)
--
--/* multi address mapping */
--#define RSND_GEN2_M_REG(gen, reg, id, offset, _id_offset) \
-- RSND_REG_SET(gen, RSND_REG_##id, RSND_GEN2_##reg, offset, _id_offset, 10)
--
--static int rsnd_gen2_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen)
--{
-- struct reg_field regf[RSND_REG_MAX] = {
-- RSND_GEN2_S_REG(gen, SSIU, SSI_MODE0, 0x800),
-- RSND_GEN2_S_REG(gen, SSIU, SSI_MODE1, 0x804),
-- /* FIXME: it needs SSI_MODE2/3 in the future */
-- RSND_GEN2_M_REG(gen, SSIU, SSI_BUSIF_MODE, 0x0, 0x80),
-- RSND_GEN2_M_REG(gen, SSIU, SSI_BUSIF_ADINR,0x4, 0x80),
-- RSND_GEN2_M_REG(gen, SSIU, SSI_CTRL, 0x10, 0x80),
-- RSND_GEN2_M_REG(gen, SSIU, INT_ENABLE, 0x18, 0x80),
--
-- RSND_GEN2_M_REG(gen, SCU, SRC_BUSIF_MODE, 0x0, 0x20),
-- RSND_GEN2_M_REG(gen, SCU, SRC_ROUTE_MODE0,0xc, 0x20),
-- RSND_GEN2_M_REG(gen, SCU, SRC_CTRL, 0x10, 0x20),
-- RSND_GEN2_M_REG(gen, SCU, CMD_ROUTE_SLCT, 0x18c, 0x20),
-- RSND_GEN2_M_REG(gen, SCU, CMD_CTRL, 0x190, 0x20),
-- RSND_GEN2_M_REG(gen, SCU, SRC_SWRSR, 0x200, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_SRCIR, 0x204, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_ADINR, 0x214, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_IFSCR, 0x21c, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_IFSVR, 0x220, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_SRCCR, 0x224, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_BSDSR, 0x22c, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, SRC_BSISR, 0x238, 0x40),
-- RSND_GEN2_M_REG(gen, SCU, DVC_SWRSR, 0xe00, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_DVUIR, 0xe04, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_ADINR, 0xe08, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_DVUCR, 0xe10, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_ZCMCR, 0xe14, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_VOL0R, 0xe28, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_VOL1R, 0xe2c, 0x100),
-- RSND_GEN2_M_REG(gen, SCU, DVC_DVUER, 0xe48, 0x100),
--
-- RSND_GEN2_S_REG(gen, ADG, BRRA, 0x00),
-- RSND_GEN2_S_REG(gen, ADG, BRRB, 0x04),
-- RSND_GEN2_S_REG(gen, ADG, SSICKR, 0x08),
-- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL0, 0x0c),
-- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL1, 0x10),
-- RSND_GEN2_S_REG(gen, ADG, AUDIO_CLK_SEL2, 0x14),
-- RSND_GEN2_S_REG(gen, ADG, DIV_EN, 0x30),
-- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL0, 0x34),
-- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL1, 0x38),
-- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL2, 0x3c),
-- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL3, 0x40),
-- RSND_GEN2_S_REG(gen, ADG, SRCIN_TIMSEL4, 0x44),
-- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL0, 0x48),
-- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL1, 0x4c),
-- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL2, 0x50),
-- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL3, 0x54),
-- RSND_GEN2_S_REG(gen, ADG, SRCOUT_TIMSEL4, 0x58),
-- RSND_GEN2_S_REG(gen, ADG, CMDOUT_TIMSEL, 0x5c),
--
-- RSND_GEN2_M_REG(gen, SSI, SSICR, 0x00, 0x40),
-- RSND_GEN2_M_REG(gen, SSI, SSISR, 0x04, 0x40),
-- RSND_GEN2_M_REG(gen, SSI, SSITDR, 0x08, 0x40),
-- RSND_GEN2_M_REG(gen, SSI, SSIRDR, 0x0c, 0x40),
-- RSND_GEN2_M_REG(gen, SSI, SSIWSR, 0x20, 0x40),
-- };
--
-- return rsnd_gen_regmap_init(priv, gen, regf);
--}
--
- static int rsnd_gen2_probe(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
-- struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
-- struct resource *scu_res;
-- struct resource *adg_res;
-- struct resource *ssiu_res;
-- struct resource *ssi_res;
-- int ret;
--
-- /*
-- * map address
-- */
-- scu_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN2_SCU);
-- adg_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN2_ADG);
-- ssiu_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN2_SSIU);
-- ssi_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN2_SSI);
--
-- gen->base[RSND_GEN2_SCU] = devm_ioremap_resource(dev, scu_res);
-- gen->base[RSND_GEN2_ADG] = devm_ioremap_resource(dev, adg_res);
-- gen->base[RSND_GEN2_SSIU] = devm_ioremap_resource(dev, ssiu_res);
-- gen->base[RSND_GEN2_SSI] = devm_ioremap_resource(dev, ssi_res);
-- if (IS_ERR(gen->base[RSND_GEN2_SCU]) ||
-- IS_ERR(gen->base[RSND_GEN2_ADG]) ||
-- IS_ERR(gen->base[RSND_GEN2_SSIU]) ||
-- IS_ERR(gen->base[RSND_GEN2_SSI]))
-- return -ENODEV;
--
-- ret = rsnd_gen2_regmap_init(priv, gen);
-- if (ret < 0)
-- return ret;
--
-- dev_dbg(dev, "Gen2 device probed\n");
-- dev_dbg(dev, "SCU : %pap => %p\n", &scu_res->start,
-- gen->base[RSND_GEN2_SCU]);
-- dev_dbg(dev, "ADG : %pap => %p\n", &adg_res->start,
-- gen->base[RSND_GEN2_ADG]);
-- dev_dbg(dev, "SSIU : %pap => %p\n", &ssiu_res->start,
-- gen->base[RSND_GEN2_SSIU]);
-- dev_dbg(dev, "SSI : %pap => %p\n", &ssi_res->start,
-- gen->base[RSND_GEN2_SSI]);
-+ struct rsnd_regmap_field_conf conf_ssiu[] = {
-+ RSND_GEN_S_REG(SSI_MODE0, 0x800),
-+ RSND_GEN_S_REG(SSI_MODE1, 0x804),
-+ /* FIXME: it needs SSI_MODE2/3 in the future */
-+ RSND_GEN_M_REG(SSI_BUSIF_MODE, 0x0, 0x80),
-+ RSND_GEN_M_REG(SSI_BUSIF_ADINR, 0x4, 0x80),
-+ RSND_GEN_M_REG(SSI_CTRL, 0x10, 0x80),
-+ RSND_GEN_M_REG(INT_ENABLE, 0x18, 0x80),
-+ };
-+ struct rsnd_regmap_field_conf conf_scu[] = {
-+ RSND_GEN_M_REG(SRC_BUSIF_MODE, 0x0, 0x20),
-+ RSND_GEN_M_REG(SRC_ROUTE_MODE0, 0xc, 0x20),
-+ RSND_GEN_M_REG(SRC_CTRL, 0x10, 0x20),
-+ RSND_GEN_M_REG(CMD_ROUTE_SLCT, 0x18c, 0x20),
-+ RSND_GEN_M_REG(CMD_CTRL, 0x190, 0x20),
-+ RSND_GEN_M_REG(SRC_SWRSR, 0x200, 0x40),
-+ RSND_GEN_M_REG(SRC_SRCIR, 0x204, 0x40),
-+ RSND_GEN_M_REG(SRC_ADINR, 0x214, 0x40),
-+ RSND_GEN_M_REG(SRC_IFSCR, 0x21c, 0x40),
-+ RSND_GEN_M_REG(SRC_IFSVR, 0x220, 0x40),
-+ RSND_GEN_M_REG(SRC_SRCCR, 0x224, 0x40),
-+ RSND_GEN_M_REG(SRC_BSDSR, 0x22c, 0x40),
-+ RSND_GEN_M_REG(SRC_BSISR, 0x238, 0x40),
-+ RSND_GEN_M_REG(DVC_SWRSR, 0xe00, 0x100),
-+ RSND_GEN_M_REG(DVC_DVUIR, 0xe04, 0x100),
-+ RSND_GEN_M_REG(DVC_ADINR, 0xe08, 0x100),
-+ RSND_GEN_M_REG(DVC_DVUCR, 0xe10, 0x100),
-+ RSND_GEN_M_REG(DVC_ZCMCR, 0xe14, 0x100),
-+ RSND_GEN_M_REG(DVC_VOL0R, 0xe28, 0x100),
-+ RSND_GEN_M_REG(DVC_VOL1R, 0xe2c, 0x100),
-+ RSND_GEN_M_REG(DVC_DVUER, 0xe48, 0x100),
-+ };
-+ struct rsnd_regmap_field_conf conf_adg[] = {
-+ RSND_GEN_S_REG(BRRA, 0x00),
-+ RSND_GEN_S_REG(BRRB, 0x04),
-+ RSND_GEN_S_REG(SSICKR, 0x08),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL0, 0x0c),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL1, 0x10),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL2, 0x14),
-+ RSND_GEN_S_REG(DIV_EN, 0x30),
-+ RSND_GEN_S_REG(SRCIN_TIMSEL0, 0x34),
-+ RSND_GEN_S_REG(SRCIN_TIMSEL1, 0x38),
-+ RSND_GEN_S_REG(SRCIN_TIMSEL2, 0x3c),
-+ RSND_GEN_S_REG(SRCIN_TIMSEL3, 0x40),
-+ RSND_GEN_S_REG(SRCIN_TIMSEL4, 0x44),
-+ RSND_GEN_S_REG(SRCOUT_TIMSEL0, 0x48),
-+ RSND_GEN_S_REG(SRCOUT_TIMSEL1, 0x4c),
-+ RSND_GEN_S_REG(SRCOUT_TIMSEL2, 0x50),
-+ RSND_GEN_S_REG(SRCOUT_TIMSEL3, 0x54),
-+ RSND_GEN_S_REG(SRCOUT_TIMSEL4, 0x58),
-+ RSND_GEN_S_REG(CMDOUT_TIMSEL, 0x5c),
-+ };
-+ struct rsnd_regmap_field_conf conf_ssi[] = {
-+ RSND_GEN_M_REG(SSICR, 0x00, 0x40),
-+ RSND_GEN_M_REG(SSISR, 0x04, 0x40),
-+ RSND_GEN_M_REG(SSITDR, 0x08, 0x40),
-+ RSND_GEN_M_REG(SSIRDR, 0x0c, 0x40),
-+ RSND_GEN_M_REG(SSIWSR, 0x20, 0x40),
-+ };
-+ int ret_ssiu;
-+ int ret_scu;
-+ int ret_adg;
-+ int ret_ssi;
-+
-+ ret_ssiu = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_SSIU, conf_ssiu);
-+ ret_scu = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_SCU, conf_scu);
-+ ret_adg = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_ADG, conf_adg);
-+ ret_ssi = rsnd_gen_regmap_init(priv, 10, RSND_GEN2_SSI, conf_ssi);
-+ if (ret_ssiu < 0 ||
-+ ret_scu < 0 ||
-+ ret_adg < 0 ||
-+ ret_ssi < 0)
-+ return ret_ssiu | ret_scu | ret_adg | ret_ssi;
-+
-+ dev_dbg(dev, "Gen2 is probed\n");
-
- return 0;
- }
-@@ -392,92 +361,60 @@ static int rsnd_gen2_probe(struct platform_device *pdev,
- * Gen1
- */
-
--/* single address mapping */
--#define RSND_GEN1_S_REG(gen, reg, id, offset) \
-- RSND_REG_SET(gen, RSND_REG_##id, RSND_GEN1_##reg, offset, 0, 9)
--
--/* multi address mapping */
--#define RSND_GEN1_M_REG(gen, reg, id, offset, _id_offset) \
-- RSND_REG_SET(gen, RSND_REG_##id, RSND_GEN1_##reg, offset, _id_offset, 9)
--
--static int rsnd_gen1_regmap_init(struct rsnd_priv *priv, struct rsnd_gen *gen)
--{
-- struct reg_field regf[RSND_REG_MAX] = {
-- RSND_GEN1_S_REG(gen, SRU, SRC_ROUTE_SEL, 0x00),
-- RSND_GEN1_S_REG(gen, SRU, SRC_TMG_SEL0, 0x08),
-- RSND_GEN1_S_REG(gen, SRU, SRC_TMG_SEL1, 0x0c),
-- RSND_GEN1_S_REG(gen, SRU, SRC_TMG_SEL2, 0x10),
-- RSND_GEN1_S_REG(gen, SRU, SRC_ROUTE_CTRL, 0xc0),
-- RSND_GEN1_S_REG(gen, SRU, SSI_MODE0, 0xD0),
-- RSND_GEN1_S_REG(gen, SRU, SSI_MODE1, 0xD4),
-- RSND_GEN1_M_REG(gen, SRU, SRC_BUSIF_MODE, 0x20, 0x4),
-- RSND_GEN1_M_REG(gen, SRU, SRC_ROUTE_MODE0,0x50, 0x8),
-- RSND_GEN1_M_REG(gen, SRU, SRC_SWRSR, 0x200, 0x40),
-- RSND_GEN1_M_REG(gen, SRU, SRC_SRCIR, 0x204, 0x40),
-- RSND_GEN1_M_REG(gen, SRU, SRC_ADINR, 0x214, 0x40),
-- RSND_GEN1_M_REG(gen, SRU, SRC_IFSCR, 0x21c, 0x40),
-- RSND_GEN1_M_REG(gen, SRU, SRC_IFSVR, 0x220, 0x40),
-- RSND_GEN1_M_REG(gen, SRU, SRC_SRCCR, 0x224, 0x40),
-- RSND_GEN1_M_REG(gen, SRU, SRC_MNFSR, 0x228, 0x40),
--
-- RSND_GEN1_S_REG(gen, ADG, BRRA, 0x00),
-- RSND_GEN1_S_REG(gen, ADG, BRRB, 0x04),
-- RSND_GEN1_S_REG(gen, ADG, SSICKR, 0x08),
-- RSND_GEN1_S_REG(gen, ADG, AUDIO_CLK_SEL0, 0x0c),
-- RSND_GEN1_S_REG(gen, ADG, AUDIO_CLK_SEL1, 0x10),
-- RSND_GEN1_S_REG(gen, ADG, AUDIO_CLK_SEL3, 0x18),
-- RSND_GEN1_S_REG(gen, ADG, AUDIO_CLK_SEL4, 0x1c),
-- RSND_GEN1_S_REG(gen, ADG, AUDIO_CLK_SEL5, 0x20),
--
-- RSND_GEN1_M_REG(gen, SSI, SSICR, 0x00, 0x40),
-- RSND_GEN1_M_REG(gen, SSI, SSISR, 0x04, 0x40),
-- RSND_GEN1_M_REG(gen, SSI, SSITDR, 0x08, 0x40),
-- RSND_GEN1_M_REG(gen, SSI, SSIRDR, 0x0c, 0x40),
-- RSND_GEN1_M_REG(gen, SSI, SSIWSR, 0x20, 0x40),
-- };
--
-- return rsnd_gen_regmap_init(priv, gen, regf);
--}
--
- static int rsnd_gen1_probe(struct platform_device *pdev,
- struct rsnd_priv *priv)
- {
- struct device *dev = rsnd_priv_to_dev(priv);
-- struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
-- struct resource *sru_res;
-- struct resource *adg_res;
-- struct resource *ssi_res;
-- int ret;
--
-- /*
-- * map address
-- */
-- sru_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_SRU);
-- adg_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_ADG);
-- ssi_res = platform_get_resource(pdev, IORESOURCE_MEM, RSND_GEN1_SSI);
--
-- gen->base[RSND_GEN1_SRU] = devm_ioremap_resource(dev, sru_res);
-- gen->base[RSND_GEN1_ADG] = devm_ioremap_resource(dev, adg_res);
-- gen->base[RSND_GEN1_SSI] = devm_ioremap_resource(dev, ssi_res);
-- if (IS_ERR(gen->base[RSND_GEN1_SRU]) ||
-- IS_ERR(gen->base[RSND_GEN1_ADG]) ||
-- IS_ERR(gen->base[RSND_GEN1_SSI]))
-- return -ENODEV;
-+ struct rsnd_regmap_field_conf conf_sru[] = {
-+ RSND_GEN_S_REG(SRC_ROUTE_SEL, 0x00),
-+ RSND_GEN_S_REG(SRC_TMG_SEL0, 0x08),
-+ RSND_GEN_S_REG(SRC_TMG_SEL1, 0x0c),
-+ RSND_GEN_S_REG(SRC_TMG_SEL2, 0x10),
-+ RSND_GEN_S_REG(SRC_ROUTE_CTRL, 0xc0),
-+ RSND_GEN_S_REG(SSI_MODE0, 0xD0),
-+ RSND_GEN_S_REG(SSI_MODE1, 0xD4),
-+ RSND_GEN_M_REG(SRC_BUSIF_MODE, 0x20, 0x4),
-+ RSND_GEN_M_REG(SRC_ROUTE_MODE0, 0x50, 0x8),
-+ RSND_GEN_M_REG(SRC_SWRSR, 0x200, 0x40),
-+ RSND_GEN_M_REG(SRC_SRCIR, 0x204, 0x40),
-+ RSND_GEN_M_REG(SRC_ADINR, 0x214, 0x40),
-+ RSND_GEN_M_REG(SRC_IFSCR, 0x21c, 0x40),
-+ RSND_GEN_M_REG(SRC_IFSVR, 0x220, 0x40),
-+ RSND_GEN_M_REG(SRC_SRCCR, 0x224, 0x40),
-+ RSND_GEN_M_REG(SRC_MNFSR, 0x228, 0x40),
-+ };
-+ struct rsnd_regmap_field_conf conf_adg[] = {
-+ RSND_GEN_S_REG(BRRA, 0x00),
-+ RSND_GEN_S_REG(BRRB, 0x04),
-+ RSND_GEN_S_REG(SSICKR, 0x08),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL0, 0x0c),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL1, 0x10),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL3, 0x18),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL4, 0x1c),
-+ RSND_GEN_S_REG(AUDIO_CLK_SEL5, 0x20),
-+ };
-+ struct rsnd_regmap_field_conf conf_ssi[] = {
-+ RSND_GEN_M_REG(SSICR, 0x00, 0x40),
-+ RSND_GEN_M_REG(SSISR, 0x04, 0x40),
-+ RSND_GEN_M_REG(SSITDR, 0x08, 0x40),
-+ RSND_GEN_M_REG(SSIRDR, 0x0c, 0x40),
-+ RSND_GEN_M_REG(SSIWSR, 0x20, 0x40),
-+ };
-+ int ret_sru;
-+ int ret_adg;
-+ int ret_ssi;
-
-- ret = rsnd_gen1_regmap_init(priv, gen);
-- if (ret < 0)
-- return ret;
-+ ret_sru = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_SRU, conf_sru);
-+ ret_adg = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_ADG, conf_adg);
-+ ret_ssi = rsnd_gen_regmap_init(priv, 9, RSND_GEN1_SSI, conf_ssi);
-+ if (ret_sru < 0 ||
-+ ret_adg < 0 ||
-+ ret_ssi < 0)
-+ return ret_sru | ret_adg | ret_ssi;
-
-- dev_dbg(dev, "Gen1 device probed\n");
-- dev_dbg(dev, "SRU : %pap => %p\n", &sru_res->start,
-- gen->base[RSND_GEN1_SRU]);
-- dev_dbg(dev, "ADG : %pap => %p\n", &adg_res->start,
-- gen->base[RSND_GEN1_ADG]);
-- dev_dbg(dev, "SSI : %pap => %p\n", &ssi_res->start,
-- gen->base[RSND_GEN1_SSI]);
-+ dev_dbg(dev, "Gen1 is probed\n");
-
- return 0;
--
- }
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0800-ASoC-rsnd-care-detail-of-SRC_BSDSR.patch b/patches.renesas/0800-ASoC-rsnd-care-detail-of-SRC_BSDSR.patch
deleted file mode 100644
index f1a1988d6bd3b..0000000000000
--- a/patches.renesas/0800-ASoC-rsnd-care-detail-of-SRC_BSDSR.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 9415fe2ed03e4cd9d5095eefebd5db791f257651 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 30 Jul 2014 23:52:04 -0700
-Subject: ASoC: rsnd: care detail of SRC_BSDSR
-
-Driver should care more detail of SRC_BSDSR settings.
-The sound includes noise without this patch
-if it used SRC.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 054cd7f4b986a941b56372b743602f7df6569c98)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/src.c | 32 +++++++++++++++++++++++++++++++-
- 1 file changed, 31 insertions(+), 1 deletion(-)
-
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 4d39505c21cf..1ef811a26bd7 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -483,15 +483,45 @@ static struct rsnd_mod_ops rsnd_src_gen1_ops = {
- static int rsnd_src_set_convert_rate_gen2(struct rsnd_mod *mod,
- struct rsnd_dai *rdai)
- {
-+ struct rsnd_priv *priv = rsnd_mod_to_priv(mod);
-+ struct device *dev = rsnd_priv_to_dev(priv);
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
-+ struct rsnd_src *src = rsnd_mod_to_src(mod);
-+ uint ratio;
- int ret;
-
-+ /* 6 - 1/6 are very enough ratio for SRC_BSDSR */
-+ if (!rsnd_src_convert_rate(src))
-+ ratio = 0;
-+ else if (rsnd_src_convert_rate(src) > runtime->rate)
-+ ratio = 100 * rsnd_src_convert_rate(src) / runtime->rate;
-+ else
-+ ratio = 100 * runtime->rate / rsnd_src_convert_rate(src);
-+
-+ if (ratio > 600) {
-+ dev_err(dev, "FSO/FSI ratio error\n");
-+ return -EINVAL;
-+ }
-+
- ret = rsnd_src_set_convert_rate(mod, rdai);
- if (ret < 0)
- return ret;
-
- rsnd_mod_write(mod, SRC_SRCCR, 0x00011110);
-
-- rsnd_mod_write(mod, SRC_BSDSR, 0x01800000);
-+ switch (rsnd_mod_id(mod)) {
-+ case 5:
-+ case 6:
-+ case 7:
-+ case 8:
-+ rsnd_mod_write(mod, SRC_BSDSR, 0x02400000);
-+ break;
-+ default:
-+ rsnd_mod_write(mod, SRC_BSDSR, 0x01800000);
-+ break;
-+ }
-+
- rsnd_mod_write(mod, SRC_BSISR, 0x00100060);
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0801-ASoC-rsnd-care-audio-local-bus-data-format-consisten.patch b/patches.renesas/0801-ASoC-rsnd-care-audio-local-bus-data-format-consisten.patch
deleted file mode 100644
index b8639fa4dfb62..0000000000000
--- a/patches.renesas/0801-ASoC-rsnd-care-audio-local-bus-data-format-consisten.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From de42f72714d1b91e061159079898c31c74679ca9 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 30 Jul 2014 23:52:26 -0700
-Subject: ASoC: rsnd: care audio local bus data format consistency
-
-R-Car sound uses Audio Local Bus which uses Lch/Rch format.
-This bus is used if driver uses BUSIF.
-But sound data is written as Rch/Lch format in register.
-This means Rch <-> Lch will be inverted.
-SSIU :: BUSIF_DALIGN is used to controlling data format.
-
-Reported-by: Jun Watanabe <jun.watanabe.ue@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 1cc7195929501b96fccce42646f1ad0ffe2598a6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 1 +
- sound/soc/sh/rcar/rsnd.h | 2 ++
- sound/soc/sh/rcar/src.c | 19 +++++++++++++++++++
- 3 files changed, 22 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 5f9e0722abcf..5db055750991 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -284,6 +284,7 @@ static int rsnd_gen2_probe(struct platform_device *pdev,
- /* FIXME: it needs SSI_MODE2/3 in the future */
- RSND_GEN_M_REG(SSI_BUSIF_MODE, 0x0, 0x80),
- RSND_GEN_M_REG(SSI_BUSIF_ADINR, 0x4, 0x80),
-+ RSND_GEN_M_REG(BUSIF_DALIGN, 0x8, 0x80),
- RSND_GEN_M_REG(SSI_CTRL, 0x10, 0x80),
- RSND_GEN_M_REG(INT_ENABLE, 0x18, 0x80),
- };
-diff --git a/sound/soc/sh/rcar/rsnd.h b/sound/soc/sh/rcar/rsnd.h
-index 631b149df08f..d119adf97c9c 100644
---- a/sound/soc/sh/rcar/rsnd.h
-+++ b/sound/soc/sh/rcar/rsnd.h
-@@ -90,6 +90,7 @@ enum rsnd_reg {
- RSND_REG_SHARE19,
- RSND_REG_SHARE20,
- RSND_REG_SHARE21,
-+ RSND_REG_SHARE22,
-
- RSND_REG_MAX,
- };
-@@ -127,6 +128,7 @@ enum rsnd_reg {
- #define RSND_REG_AUDIO_CLK_SEL2 RSND_REG_SHARE19
- #define RSND_REG_CMD_CTRL RSND_REG_SHARE20
- #define RSND_REG_CMDOUT_TIMSEL RSND_REG_SHARE21
-+#define RSND_REG_BUSIF_DALIGN RSND_REG_SHARE22
-
- struct rsnd_of_data;
- struct rsnd_priv;
-diff --git a/sound/soc/sh/rcar/src.c b/sound/soc/sh/rcar/src.c
-index 1ef811a26bd7..9183e0145503 100644
---- a/sound/soc/sh/rcar/src.c
-+++ b/sound/soc/sh/rcar/src.c
-@@ -110,6 +110,8 @@ int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod,
- struct rsnd_dai *rdai,
- int use_busif)
- {
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(ssi_mod);
-+ struct snd_pcm_runtime *runtime = rsnd_io_to_runtime(io);
- int ssi_id = rsnd_mod_id(ssi_mod);
-
- /*
-@@ -146,10 +148,27 @@ int rsnd_src_ssiu_start(struct rsnd_mod *ssi_mod,
- * DMA settings for SSIU
- */
- if (use_busif) {
-+ u32 val = 0x76543210;
-+ u32 mask = ~0;
-+
- rsnd_mod_write(ssi_mod, SSI_BUSIF_ADINR,
- rsnd_get_adinr(ssi_mod));
- rsnd_mod_write(ssi_mod, SSI_BUSIF_MODE, 1);
- rsnd_mod_write(ssi_mod, SSI_CTRL, 0x1);
-+
-+ mask <<= runtime->channels * 4;
-+ val = val & mask;
-+
-+ switch (runtime->sample_bits) {
-+ case 16:
-+ val |= 0x67452301 & ~mask;
-+ break;
-+ case 32:
-+ val |= 0x76543210 & ~mask;
-+ break;
-+ }
-+ rsnd_mod_write(ssi_mod, BUSIF_DALIGN, val);
-+
- }
-
- return 0;
---
-2.1.2
-
diff --git a/patches.renesas/0802-ASoC-rsnd-add-missing-dev_dbg-in-rsnd_bset.patch b/patches.renesas/0802-ASoC-rsnd-add-missing-dev_dbg-in-rsnd_bset.patch
deleted file mode 100644
index 21fe99b7281b3..0000000000000
--- a/patches.renesas/0802-ASoC-rsnd-add-missing-dev_dbg-in-rsnd_bset.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From ea63bc79e423c9b497c19f310785995cd7cdb530 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 30 Jul 2014 23:52:50 -0700
-Subject: ASoC: rsnd: add missing dev_dbg() in rsnd_bset()
-
-b8c637864a6904a9ba8e0df556d5bdf9f26b2c54
-(ASoC: rsnd: use regmap_mmio instead of original regmap bus)
-used regmap_mmio and modified dev_dbg() for rsnd_read/write().
-But rsnd_bset() is missing it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 4f8f86aa41232cc4595136f18013324482fdf749)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 5db055750991..3fdf3be7b99a 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -92,6 +92,7 @@ void rsnd_write(struct rsnd_priv *priv,
- void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod,
- enum rsnd_reg reg, u32 mask, u32 data)
- {
-+ struct device *dev = rsnd_priv_to_dev(priv);
- struct rsnd_gen *gen = rsnd_priv_to_gen(priv);
-
- if (!rsnd_is_accessible_reg(priv, gen, reg))
-@@ -99,6 +100,9 @@ void rsnd_bset(struct rsnd_priv *priv, struct rsnd_mod *mod,
-
- regmap_fields_update_bits(gen->regs[reg], rsnd_mod_id(mod),
- mask, data);
-+
-+ dev_dbg(dev, "b %s - 0x%04d : %08x/%08x\n",
-+ rsnd_mod_name(mod), reg, data, mask);
- }
-
- #define rsnd_gen_regmap_init(priv, id_size, reg_id, conf) \
---
-2.1.2
-
diff --git a/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch b/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch
deleted file mode 100644
index d27c113e20147..0000000000000
--- a/patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 3d14d6ad95c0a1de443f66fd3bc24c24e18d065e Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 30 Jul 2014 23:53:03 -0700
-Subject: ASoC: rsnd: fixup pcm_new callback method
-
-bff58ea4f43d9b4a9fd6fb05fabc8f50f68131f5
-(ASoC: rsnd: add DVC support) added DVC support,
-and it added pcm_new callback feature for it.
-Then it called all DAI's pcm_new callback, and it was wrong.
-This patch fixup it and call correct callback.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 7c63f3c02f5a998621758239abed43c5bd454b70)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 20 +++++++++-----------
- 1 file changed, 9 insertions(+), 11 deletions(-)
-
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -943,19 +943,17 @@ static struct snd_pcm_ops rsnd_pcm_ops =
-
- static int rsnd_pcm_new(struct snd_soc_pcm_runtime *rtd)
- {
-- struct rsnd_priv *priv = snd_soc_dai_get_drvdata(rtd->cpu_dai);
-- struct rsnd_dai *rdai;
-- int i, ret;
-+ struct snd_soc_dai *dai = rtd->cpu_dai;
-+ struct rsnd_dai *rdai = rsnd_dai_to_rdai(dai);
-+ int ret;
-
-- for_each_rsnd_dai(rdai, priv, i) {
-- ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd);
-- if (ret)
-- return ret;
-+ ret = rsnd_dai_call(pcm_new, &rdai->playback, rdai, rtd);
-+ if (ret)
-+ return ret;
-
-- ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd);
-- if (ret)
-- return ret;
-- }
-+ ret = rsnd_dai_call(pcm_new, &rdai->capture, rdai, rtd);
-+ if (ret)
-+ return ret;
-
- return snd_pcm_lib_preallocate_pages_for_all(
- rtd->pcm,
diff --git a/patches.renesas/0804-ASoC-rsnd-fixup-SND_SOC_DAIFMT_xB_xF-behavior.patch b/patches.renesas/0804-ASoC-rsnd-fixup-SND_SOC_DAIFMT_xB_xF-behavior.patch
deleted file mode 100644
index 43a2067b4a57e..0000000000000
--- a/patches.renesas/0804-ASoC-rsnd-fixup-SND_SOC_DAIFMT_xB_xF-behavior.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From 45a398dcadf51ee28cfe4dae8890d0fac70dc597 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Thu, 31 Jul 2014 18:08:18 -0700
-Subject: ASoC: rsnd: fixup SND_SOC_DAIFMT_xB_xF behavior
-
-In current R-Car rsnd driver,
-the SND_SOC_DAIFMT_xB_xF flags are used to HW default behavior,
-but, it should be used to specific format.
-The waveforms of LEFT_J/RIGHT_J format with
-SND_SOC_DAIFMT_NB_NF flag will be
-started from "falling edge" without this patch.
-But, it should be started from "rising edge".
-
-Reported-by: Jun Watanabe <jun.watanabe.ue@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 1a7889ca8aba333d7c74fad543d692c31bc7f280)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/core.c | 43 ++++++++++++++++++++++---------------------
- 1 file changed, 22 insertions(+), 21 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/core.c b/sound/soc/sh/rcar/core.c
-index d7c669790dd4..19f78963e8b9 100644
---- a/sound/soc/sh/rcar/core.c
-+++ b/sound/soc/sh/rcar/core.c
-@@ -624,40 +624,41 @@ static int rsnd_soc_dai_set_fmt(struct snd_soc_dai *dai, unsigned int fmt)
- return -EINVAL;
- }
-
-- /* set clock inversion */
-- switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
-- case SND_SOC_DAIFMT_NB_IF:
-- rdai->bit_clk_inv = 0;
-- rdai->frm_clk_inv = 1;
-- break;
-- case SND_SOC_DAIFMT_IB_NF:
-- rdai->bit_clk_inv = 1;
-- rdai->frm_clk_inv = 0;
-- break;
-- case SND_SOC_DAIFMT_IB_IF:
-- rdai->bit_clk_inv = 1;
-- rdai->frm_clk_inv = 1;
-- break;
-- case SND_SOC_DAIFMT_NB_NF:
-- default:
-- rdai->bit_clk_inv = 0;
-- rdai->frm_clk_inv = 0;
-- break;
-- }
--
- /* set format */
- switch (fmt & SND_SOC_DAIFMT_FORMAT_MASK) {
- case SND_SOC_DAIFMT_I2S:
- rdai->sys_delay = 0;
- rdai->data_alignment = 0;
-+ rdai->frm_clk_inv = 0;
- break;
- case SND_SOC_DAIFMT_LEFT_J:
- rdai->sys_delay = 1;
- rdai->data_alignment = 0;
-+ rdai->frm_clk_inv = 1;
- break;
- case SND_SOC_DAIFMT_RIGHT_J:
- rdai->sys_delay = 1;
- rdai->data_alignment = 1;
-+ rdai->frm_clk_inv = 1;
-+ break;
-+ }
-+
-+ /* set clock inversion */
-+ switch (fmt & SND_SOC_DAIFMT_INV_MASK) {
-+ case SND_SOC_DAIFMT_NB_IF:
-+ rdai->bit_clk_inv = rdai->bit_clk_inv;
-+ rdai->frm_clk_inv = !rdai->frm_clk_inv;
-+ break;
-+ case SND_SOC_DAIFMT_IB_NF:
-+ rdai->bit_clk_inv = !rdai->bit_clk_inv;
-+ rdai->frm_clk_inv = rdai->frm_clk_inv;
-+ break;
-+ case SND_SOC_DAIFMT_IB_IF:
-+ rdai->bit_clk_inv = !rdai->bit_clk_inv;
-+ rdai->frm_clk_inv = !rdai->frm_clk_inv;
-+ break;
-+ case SND_SOC_DAIFMT_NB_NF:
-+ default:
- break;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0805-ASoC-rsnd-tidyup-DVC-control-method.patch b/patches.renesas/0805-ASoC-rsnd-tidyup-DVC-control-method.patch
deleted file mode 100644
index 484f53eda0a98..0000000000000
--- a/patches.renesas/0805-ASoC-rsnd-tidyup-DVC-control-method.patch
+++ /dev/null
@@ -1,135 +0,0 @@
-From 298d5d55e2eae2b5e3a2fcca22a8d9e9eaca7a01 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Fri, 1 Aug 2014 03:10:47 -0700
-Subject: ASoC: rsnd: tidyup DVC control method
-
-DVC can use Volume and Mute control,
-and these control methods doesn't have much difference.
-This patch cleanup current method,
-and it will be used for Mute control.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 486b09c750e58777976ad74a37de7b4252630332)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/dvc.c | 59 ++++++++++++++++++++++++++++---------------------
- 1 file changed, 34 insertions(+), 25 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
-index 9096fb03d001..12a0a2068d34 100644
---- a/sound/soc/sh/rcar/dvc.c
-+++ b/sound/soc/sh/rcar/dvc.c
-@@ -20,7 +20,7 @@ struct rsnd_dvc {
- struct rsnd_dvc_platform_info *info; /* rcar_snd.h */
- struct rsnd_mod mod;
- struct clk *clk;
-- long volume[RSND_DVC_VOLUME_NUM];
-+ u8 volume[RSND_DVC_VOLUME_NUM];
- };
-
- #define rsnd_mod_to_dvc(_mod) \
-@@ -151,12 +151,11 @@ static int rsnd_dvc_volume_info(struct snd_kcontrol *kctrl,
- static int rsnd_dvc_volume_get(struct snd_kcontrol *kctrl,
- struct snd_ctl_elem_value *ucontrol)
- {
-- struct rsnd_mod *mod = snd_kcontrol_chip(kctrl);
-- struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ u8 *val = (u8 *)kctrl->private_value;
- int i;
-
- for (i = 0; i < RSND_DVC_VOLUME_NUM; i++)
-- ucontrol->value.integer.value[i] = dvc->volume[i];
-+ ucontrol->value.integer.value[i] = val[i];
-
- return 0;
- }
-@@ -165,47 +164,38 @@ static int rsnd_dvc_volume_put(struct snd_kcontrol *kctrl,
- struct snd_ctl_elem_value *ucontrol)
- {
- struct rsnd_mod *mod = snd_kcontrol_chip(kctrl);
-- struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ u8 *val = (u8 *)kctrl->private_value;
- int i, change = 0;
-
- for (i = 0; i < RSND_DVC_VOLUME_NUM; i++) {
-- if (ucontrol->value.integer.value[i] < 0 ||
-- ucontrol->value.integer.value[i] > RSND_DVC_VOLUME_MAX)
-- return -EINVAL;
--
-- change |= (ucontrol->value.integer.value[i] != dvc->volume[i]);
-+ change |= (ucontrol->value.integer.value[i] != val[i]);
-+ val[i] = ucontrol->value.integer.value[i];
- }
-
-- if (change) {
-- for (i = 0; i < RSND_DVC_VOLUME_NUM; i++)
-- dvc->volume[i] = ucontrol->value.integer.value[i];
--
-+ if (change)
- rsnd_dvc_volume_update(mod);
-- }
-
- return change;
- }
-
--static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
-- struct rsnd_dai *rdai,
-- struct snd_soc_pcm_runtime *rtd)
-+static int __rsnd_dvc_pcm_new(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct snd_soc_pcm_runtime *rtd,
-+ const unsigned char *name,
-+ u8 *private)
- {
-- struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
- struct snd_card *card = rtd->card->snd_card;
- struct snd_kcontrol *kctrl;
-- static struct snd_kcontrol_new knew = {
-+ struct snd_kcontrol_new knew = {
- .iface = SNDRV_CTL_ELEM_IFACE_MIXER,
-+ .name = name,
- .info = rsnd_dvc_volume_info,
- .get = rsnd_dvc_volume_get,
- .put = rsnd_dvc_volume_put,
-+ .private_value = (unsigned long)private,
- };
- int ret;
-
-- if (rsnd_dai_is_play(rdai, io))
-- knew.name = "Playback Volume";
-- else
-- knew.name = "Capture Volume";
--
- kctrl = snd_ctl_new1(&knew, mod);
- if (!kctrl)
- return -ENOMEM;
-@@ -217,6 +207,25 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
- return 0;
- }
-
-+static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
-+ struct rsnd_dai *rdai,
-+ struct snd_soc_pcm_runtime *rtd)
-+{
-+ struct rsnd_dai_stream *io = rsnd_mod_to_io(mod);
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ int ret;
-+
-+ /* Volume */
-+ ret = __rsnd_dvc_pcm_new(mod, rdai, rtd,
-+ rsnd_dai_is_play(rdai, io) ?
-+ "DVC Out Playback Volume" : "DVC In Capture Volume",
-+ dvc->volume);
-+ if (ret < 0)
-+ return ret;
-+
-+ return 0;
-+}
-+
- static struct rsnd_mod_ops rsnd_dvc_ops = {
- .name = DVC_NAME,
- .probe = rsnd_dvc_probe_gen2,
---
-2.1.2
-
diff --git a/patches.renesas/0806-ASoC-rsnd-enable-Mute-control-on-DVC.patch b/patches.renesas/0806-ASoC-rsnd-enable-Mute-control-on-DVC.patch
deleted file mode 100644
index 71a1468138022..0000000000000
--- a/patches.renesas/0806-ASoC-rsnd-enable-Mute-control-on-DVC.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From f2dbfbc0ae3f37895504e88f4678ccc4e16a4504 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Fri, 1 Aug 2014 03:10:55 -0700
-Subject: ASoC: rsnd: enable Mute control on DVC
-
-DVC can control Mute.
-This patch supports it.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit cd2b65741e72da64508957cd1cde85116102d8dd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/dvc.c | 34 +++++++++++++++++++++++++++++-----
- 1 file changed, 29 insertions(+), 5 deletions(-)
-
-diff --git a/sound/soc/sh/rcar/dvc.c b/sound/soc/sh/rcar/dvc.c
-index 12a0a2068d34..3f443930c2b1 100644
---- a/sound/soc/sh/rcar/dvc.c
-+++ b/sound/soc/sh/rcar/dvc.c
-@@ -21,6 +21,7 @@ struct rsnd_dvc {
- struct rsnd_mod mod;
- struct clk *clk;
- u8 volume[RSND_DVC_VOLUME_NUM];
-+ u8 mute[RSND_DVC_VOLUME_NUM];
- };
-
- #define rsnd_mod_to_dvc(_mod) \
-@@ -37,13 +38,18 @@ static void rsnd_dvc_volume_update(struct rsnd_mod *mod)
- struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
- u32 max = (0x00800000 - 1);
- u32 vol[RSND_DVC_VOLUME_NUM];
-+ u32 mute = 0;
- int i;
-
-- for (i = 0; i < RSND_DVC_VOLUME_NUM; i++)
-+ for (i = 0; i < RSND_DVC_VOLUME_NUM; i++) {
- vol[i] = max / RSND_DVC_VOLUME_MAX * dvc->volume[i];
-+ mute |= (!!dvc->mute[i]) << i;
-+ }
-
- rsnd_mod_write(mod, DVC_VOL0R, vol[0]);
- rsnd_mod_write(mod, DVC_VOL1R, vol[1]);
-+
-+ rsnd_mod_write(mod, DVC_ZCMCR, mute);
- }
-
- static int rsnd_dvc_probe_gen2(struct rsnd_mod *mod,
-@@ -96,8 +102,8 @@ static int rsnd_dvc_init(struct rsnd_mod *dvc_mod,
-
- rsnd_mod_write(dvc_mod, DVC_ADINR, rsnd_get_adinr(dvc_mod));
-
-- /* enable Volume */
-- rsnd_mod_write(dvc_mod, DVC_DVUCR, 0x100);
-+ /* enable Volume / Mute */
-+ rsnd_mod_write(dvc_mod, DVC_DVUCR, 0x101);
-
- /* ch0/ch1 Volume */
- rsnd_dvc_volume_update(dvc_mod);
-@@ -140,10 +146,20 @@ static int rsnd_dvc_stop(struct rsnd_mod *mod,
- static int rsnd_dvc_volume_info(struct snd_kcontrol *kctrl,
- struct snd_ctl_elem_info *uinfo)
- {
-- uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
-+ struct rsnd_mod *mod = snd_kcontrol_chip(kctrl);
-+ struct rsnd_dvc *dvc = rsnd_mod_to_dvc(mod);
-+ u8 *val = (u8 *)kctrl->private_value;
-+
- uinfo->count = RSND_DVC_VOLUME_NUM;
- uinfo->value.integer.min = 0;
-- uinfo->value.integer.max = RSND_DVC_VOLUME_MAX;
-+
-+ if (val == dvc->volume) {
-+ uinfo->type = SNDRV_CTL_ELEM_TYPE_INTEGER;
-+ uinfo->value.integer.max = RSND_DVC_VOLUME_MAX;
-+ } else {
-+ uinfo->type = SNDRV_CTL_ELEM_TYPE_BOOLEAN;
-+ uinfo->value.integer.max = 1;
-+ }
-
- return 0;
- }
-@@ -223,6 +239,14 @@ static int rsnd_dvc_pcm_new(struct rsnd_mod *mod,
- if (ret < 0)
- return ret;
-
-+ /* Mute */
-+ ret = __rsnd_dvc_pcm_new(mod, rdai, rtd,
-+ rsnd_dai_is_play(rdai, io) ?
-+ "DVC Out Mute Switch" : "DVC In Mute Switch",
-+ dvc->mute);
-+ if (ret < 0)
-+ return ret;
-+
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0807-ARM-shmobile-armadillo800eva-reference-dts-Add-match.patch b/patches.renesas/0807-ARM-shmobile-armadillo800eva-reference-dts-Add-match.patch
deleted file mode 100644
index b87bac50c3a89..0000000000000
--- a/patches.renesas/0807-ARM-shmobile-armadillo800eva-reference-dts-Add-match.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 4289dafc39771144cf6ff5d40808ca42e1d7f591 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:51:19 +0200
-Subject: ARM: shmobile: armadillo800eva reference dts: Add matching LED labels
-
-And make the node name numbering match the label numbering.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Cc: devicetree@vger.kernel.org
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0ba06992e8919128d0547066247de9e54a8bb992)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 12 ++++++++----
- 1 file changed, 8 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index 486007d7ffe4..f6ef73ff49e8 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -104,17 +104,21 @@
-
- leds {
- compatible = "gpio-leds";
-- led1 {
-+ led3 {
- gpios = <&pfc 102 GPIO_ACTIVE_HIGH>;
-+ label = "LED3";
- };
-- led2 {
-+ led4 {
- gpios = <&pfc 111 GPIO_ACTIVE_HIGH>;
-+ label = "LED4";
- };
-- led3 {
-+ led5 {
- gpios = <&pfc 110 GPIO_ACTIVE_HIGH>;
-+ label = "LED5";
- };
-- led4 {
-+ led6 {
- gpios = <&pfc 177 GPIO_ACTIVE_HIGH>;
-+ label = "LED6";
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0808-ARM-shmobile-marzen-Remove-early_printk-from-command.patch b/patches.renesas/0808-ARM-shmobile-marzen-Remove-early_printk-from-command.patch
deleted file mode 100644
index 97d3b42bedffc..0000000000000
--- a/patches.renesas/0808-ARM-shmobile-marzen-Remove-early_printk-from-command.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 57699751bba17af267b253a3746a62d039b7c5a9 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:39:31 +0900
-Subject: ARM: shmobile: marzen: Remove early_printk from command line
-
-As early printk support is not enabled in the kernel in the
-shmobile defconfig it does not make much sense to provide for
-it in the default command line.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7432695daeebffa39bae94d8f15ffe96ede3e581)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
-index a7af2c2371f2..ee2338838b3f 100644
---- a/arch/arm/boot/dts/r8a7779-marzen.dts
-+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
-@@ -17,7 +17,7 @@
- compatible = "renesas,marzen", "renesas,r8a7779";
-
- chosen {
-- bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on";
-+ bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on";
- };
-
- memory {
---
-2.1.2
-
diff --git a/patches.renesas/0809-ARM-shmobile-armadillo800eva-defconfig-Enable-REGULA.patch b/patches.renesas/0809-ARM-shmobile-armadillo800eva-defconfig-Enable-REGULA.patch
deleted file mode 100644
index ca98599fa1a0e..0000000000000
--- a/patches.renesas/0809-ARM-shmobile-armadillo800eva-defconfig-Enable-REGULA.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From c81134b4da032c0c33e7425b5f06f8da1a6af9d8 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:51:22 +0200
-Subject: ARM: shmobile: armadillo800eva defconfig: Enable REGULATOR_GPIO and
- LEDS_GPIO
-
-Enable missing options for devices in platform data and/or DT:
- - REGULATOR_GPIO
- - LEDS_GPIO (and its dependencies)
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 65b590adb672cbe91624f9bd7a80d5ef8919db48)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/armadillo800eva_defconfig | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/configs/armadillo800eva_defconfig b/arch/arm/configs/armadillo800eva_defconfig
-index 065adddeee3e..d9675c68a399 100644
---- a/arch/arm/configs/armadillo800eva_defconfig
-+++ b/arch/arm/configs/armadillo800eva_defconfig
-@@ -96,6 +96,7 @@ CONFIG_I2C_GPIO=y
- CONFIG_I2C_SH_MOBILE=y
- # CONFIG_HWMON is not set
- CONFIG_REGULATOR=y
-+CONFIG_REGULATOR_GPIO=y
- CONFIG_MEDIA_SUPPORT=y
- CONFIG_VIDEO_DEV=y
- CONFIG_MEDIA_CAMERA_SUPPORT=y
-@@ -127,6 +128,9 @@ CONFIG_USB_ETH=m
- CONFIG_MMC=y
- CONFIG_MMC_SDHI=y
- CONFIG_MMC_SH_MMCIF=y
-+CONFIG_NEW_LEDS=y
-+CONFIG_LEDS_CLASS=y
-+CONFIG_LEDS_GPIO=y
- CONFIG_RTC_CLASS=y
- CONFIG_RTC_DRV_S35390A=y
- CONFIG_DMADEVICES=y
---
-2.1.2
-
diff --git a/patches.renesas/0810-ARM-shmobile-marzen-Add-to-shmobile-defconfig.patch b/patches.renesas/0810-ARM-shmobile-marzen-Add-to-shmobile-defconfig.patch
deleted file mode 100644
index 900d450bd3637..0000000000000
--- a/patches.renesas/0810-ARM-shmobile-marzen-Add-to-shmobile-defconfig.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 61e6d754f609affaa934e69be6a43230c4dd576b Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms@verge.net.au>
-Date: Fri, 16 May 2014 09:04:13 +0900
-Subject: ARM: shmobile: marzen: Add to shmobile defconfig
-
-Add marzen to shmobile defconfig now that it supports multiplatform
-Also enable SH_HSPI which is used by marzen.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b2bfcdc2f28b045cf01f63d0949f7eb9bd597405)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 6d6437cbbc52..8cde033b08a7 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -10,10 +10,12 @@ CONFIG_PERF_EVENTS=y
- CONFIG_SLAB=y
- CONFIG_ARCH_SHMOBILE_MULTI=y
- CONFIG_ARCH_EMEV2=y
-+CONFIG_ARCH_R8A7779=y
- CONFIG_ARCH_R8A7790=y
- CONFIG_ARCH_R8A7791=y
- CONFIG_MACH_KOELSCH=y
- CONFIG_MACH_LAGER=y
-+CONFIG_MACH_MARZEN=y
- # CONFIG_SWP_EMULATE is not set
- CONFIG_CPU_BPREDICT_DISABLE=y
- CONFIG_PL310_ERRATA_588369=y
-@@ -82,6 +84,7 @@ CONFIG_I2C_RCAR=y
- CONFIG_SPI=y
- CONFIG_SPI_RSPI=y
- CONFIG_SPI_SH_MSIOF=y
-+CONFIG_SPI_SH_HSPI=y
- CONFIG_GPIO_EM=y
- CONFIG_GPIO_RCAR=y
- # CONFIG_HWMON is not set
-@@ -109,12 +112,14 @@ CONFIG_SND=y
- CONFIG_SND_SOC=y
- CONFIG_SND_SOC_RCAR=y
- CONFIG_USB=y
--CONFIG_USB_RCAR_GEN2_PHY=y
- CONFIG_USB_EHCI_HCD=y
- CONFIG_USB_OHCI_HCD=y
- CONFIG_USB_RENESAS_USBHS=y
-+CONFIG_USB_RCAR_PHY=y
-+CONFIG_USB_RCAR_GEN2_PHY=y
- CONFIG_USB_GADGET=y
- CONFIG_USB_RENESAS_USBHS_UDC=y
-+CONFIG_USB_ETH=y
- CONFIG_MMC=y
- CONFIG_MMC_SDHI=y
- CONFIG_MMC_SH_MMCIF=y
---
-2.1.2
-
diff --git a/patches.renesas/0811-ARM-shmobile-Enable-PM_RUNTIME-in-defconfig.patch b/patches.renesas/0811-ARM-shmobile-Enable-PM_RUNTIME-in-defconfig.patch
deleted file mode 100644
index 1a37d2801bbe1..0000000000000
--- a/patches.renesas/0811-ARM-shmobile-Enable-PM_RUNTIME-in-defconfig.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 65793cc0d1b43fd004da2c0ba34e9c9e099e65ff Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 16 May 2014 09:04:42 +0900
-Subject: ARM: shmobile: Enable PM_RUNTIME in defconfig
-
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6e2776388a85e6b41e8cc816ece318d944fc3388)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 8cde033b08a7..94d7736cbf9e 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -35,6 +35,7 @@ CONFIG_KEXEC=y
- CONFIG_VFP=y
- CONFIG_NEON=y
- # CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
-+CONFIG_PM_RUNTIME=y
- CONFIG_NET=y
- CONFIG_PACKET=y
- CONFIG_UNIX=y
---
-2.1.2
-
diff --git a/patches.renesas/0812-ARM-shmobile-Enable-CPUFREQ-configuration.patch b/patches.renesas/0812-ARM-shmobile-Enable-CPUFREQ-configuration.patch
deleted file mode 100644
index 64e9beec6749b..0000000000000
--- a/patches.renesas/0812-ARM-shmobile-Enable-CPUFREQ-configuration.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 627ccfbbff6f45cda64ee5b981051a46e15d17b9 Mon Sep 17 00:00:00 2001
-From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Date: Tue, 3 Jun 2014 21:03:34 +0900
-Subject: ARM: shmobile: Enable CPUFREQ configuration
-
-This changes of configuration is multiplatform build only for r8a7790/r8a7791.
-
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 468c570ed078f0326745bfe85868adb925659502)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 94d7736cbf9e..c4b72aa48e67 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -147,3 +147,16 @@ CONFIG_NLS_ISO8859_1=y
- # CONFIG_ENABLE_WARN_DEPRECATED is not set
- # CONFIG_ENABLE_MUST_CHECK is not set
- # CONFIG_ARM_UNWIND is not set
-+CONFIG_CPU_FREQ=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
-+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_CPU_THERMAL=y
-+CONFIG_GENERIC_CPUFREQ_CPU0=y
-+CONFIG_REGULATOR_DA9210=y
---
-2.1.2
-
diff --git a/patches.renesas/0813-ARM-shmobile-add-cpufreq-cpu0-driver-for-common-SH-M.patch b/patches.renesas/0813-ARM-shmobile-add-cpufreq-cpu0-driver-for-common-SH-M.patch
deleted file mode 100644
index 36d87188bc0a2..0000000000000
--- a/patches.renesas/0813-ARM-shmobile-add-cpufreq-cpu0-driver-for-common-SH-M.patch
+++ /dev/null
@@ -1,98 +0,0 @@
-From 29ba2a1cfe5146594f3829a70a1a278b4c3702dd Mon Sep 17 00:00:00 2001
-From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Date: Tue, 3 Jun 2014 21:02:45 +0900
-Subject: ARM: shmobile: add cpufreq-cpu0 driver for common SH-Mobile
-
-I add a new file(cpufreq.c) for the following reasons.
-- Registration of platform_device must be unified in SH-Mobile.
-- We can't create a node of cpufreq drivers into device tree.
- (Because cpufreq driver is virtual device.)
-
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 06e32c91dbce3c24ccbe84e3af2a35199662bca0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 1 +
- arch/arm/mach-shmobile/cpufreq.c | 31 ++++++++++++++++++++++++++++
- arch/arm/mach-shmobile/include/mach/common.h | 7 +++++++
- 3 files changed, 39 insertions(+)
- create mode 100644 arch/arm/mach-shmobile/cpufreq.c
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 38d5fe825e93..1b966da2c81c 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -48,6 +48,7 @@ obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
- # PM objects
- obj-$(CONFIG_SUSPEND) += suspend.o
- obj-$(CONFIG_CPU_IDLE) += cpuidle.o
-+obj-$(CONFIG_CPU_FREQ) += cpufreq.o
- obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
- obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
- obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
-diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c
-new file mode 100644
-index 000000000000..e2c868fc41cf
---- /dev/null
-+++ b/arch/arm/mach-shmobile/cpufreq.c
-@@ -0,0 +1,31 @@
-+/*
-+ * CPUFreq support code for SH-Mobile ARM
-+ *
-+ * Copyright (C) 2014 Gaku Inami
-+ *
-+ * 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/of.h>
-+#include <linux/of_device.h>
-+#include <linux/platform_device.h>
-+
-+int __init shmobile_cpufreq_init(void)
-+{
-+ struct device_node *np;
-+
-+ np = of_cpu_device_node_get(0);
-+ if (np == NULL) {
-+ pr_err("failed to find cpu0 node\n");
-+ return 0;
-+ }
-+
-+ if (of_get_property(np, "operating-points", NULL))
-+ platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
-+
-+ of_node_put(np);
-+
-+ return 0;
-+}
-diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/include/mach/common.h
-index f7a360edcc35..921a18ef4dfe 100644
---- a/arch/arm/mach-shmobile/include/mach/common.h
-+++ b/arch/arm/mach-shmobile/include/mach/common.h
-@@ -45,12 +45,19 @@ int shmobile_cpuidle_init(void);
- static inline int shmobile_cpuidle_init(void) { return 0; }
- #endif
-
-+#ifdef CONFIG_CPU_FREQ
-+int shmobile_cpufreq_init(void);
-+#else
-+static inline int shmobile_cpufreq_init(void) { return 0; }
-+#endif
-+
- extern void __iomem *shmobile_scu_base;
-
- static inline void __init shmobile_init_late(void)
- {
- shmobile_suspend_init();
- shmobile_cpuidle_init();
-+ shmobile_cpufreq_init();
- }
-
- #endif /* __ARCH_MACH_COMMON_H */
---
-2.1.2
-
diff --git a/patches.renesas/0814-ARM-shmobile-Fix-device-node-reference-leakage-in-sh.patch b/patches.renesas/0814-ARM-shmobile-Fix-device-node-reference-leakage-in-sh.patch
deleted file mode 100644
index 31348dab9e046..0000000000000
--- a/patches.renesas/0814-ARM-shmobile-Fix-device-node-reference-leakage-in-sh.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From 90a80327ee82b46f8eeb7d1dff04f8f04dfc9721 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 21 May 2014 15:31:05 +0200
-Subject: ARM: shmobile: Fix device node reference leakage in
- shmobile_init_delay
-
-The of_find_compatible_node() function returns a new reference to the
-found node. Instead of just adding of_node_put() calls, simplify the
-code by moving the CPU identification logic inside the loop over cpu
-nodes, in order to lower complexity from O(n) to O(1) by replacing
-of_find_compatible_node() calls with of_device_is_compatible().
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit edc8fb1d6ebdfc4efa009073586d3567c3368475)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/timer.c | 50 ++++++++++++++++++++++++------------------
- 1 file changed, 29 insertions(+), 21 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/timer.c b/arch/arm/mach-shmobile/timer.c
-index 68bc0b82226d..942efdc82a62 100644
---- a/arch/arm/mach-shmobile/timer.c
-+++ b/arch/arm/mach-shmobile/timer.c
-@@ -59,29 +59,37 @@ void __init shmobile_setup_delay(unsigned int max_cpu_core_mhz,
-
- void __init shmobile_init_delay(void)
- {
-- struct device_node *np, *parent;
-- u32 max_freq, freq;
--
-- max_freq = 0;
--
-- parent = of_find_node_by_path("/cpus");
-- if (parent) {
-- for_each_child_of_node(parent, np) {
-- if (!of_property_read_u32(np, "clock-frequency", &freq))
-- max_freq = max(max_freq, freq);
-- }
-- of_node_put(parent);
-- }
-+ struct device_node *np, *cpus;
-+ bool is_a8_a9 = false;
-+ bool is_a15 = false;
-+ u32 max_freq = 0;
-+
-+ cpus = of_find_node_by_path("/cpus");
-+ if (!cpus)
-+ return;
-+
-+ for_each_child_of_node(cpus, np) {
-+ u32 freq;
-+
-+ if (!of_property_read_u32(np, "clock-frequency", &freq))
-+ max_freq = max(max_freq, freq);
-
-- if (max_freq) {
-- if (of_find_compatible_node(NULL, NULL, "arm,cortex-a8"))
-- shmobile_setup_delay_hz(max_freq, 1, 3);
-- else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a9"))
-- shmobile_setup_delay_hz(max_freq, 1, 3);
-- else if (of_find_compatible_node(NULL, NULL, "arm,cortex-a15"))
-- if (!IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
-- shmobile_setup_delay_hz(max_freq, 2, 4);
-+ if (of_device_is_compatible(np, "arm,cortex-a8") ||
-+ of_device_is_compatible(np, "arm,cortex-a9"))
-+ is_a8_a9 = true;
-+ else if (of_device_is_compatible(np, "arm,cortex-a15"))
-+ is_a15 = true;
- }
-+
-+ of_node_put(cpus);
-+
-+ if (!max_freq)
-+ return;
-+
-+ if (is_a8_a9)
-+ shmobile_setup_delay_hz(max_freq, 1, 3);
-+ else if (is_a15 && !IS_ENABLED(CONFIG_ARM_ARCH_TIMER))
-+ shmobile_setup_delay_hz(max_freq, 2, 4);
- }
-
- static void __init shmobile_late_time_init(void)
---
-2.1.2
-
diff --git a/patches.renesas/0815-ARM-shmobile-Move-intc.h-cleanup-sh_intc.h-usage.patch b/patches.renesas/0815-ARM-shmobile-Move-intc.h-cleanup-sh_intc.h-usage.patch
deleted file mode 100644
index 8f414234b66cf..0000000000000
--- a/patches.renesas/0815-ARM-shmobile-Move-intc.h-cleanup-sh_intc.h-usage.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 698e13fe676095028712e2774e0d02b8a5a80271 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:05 +0900
-Subject: ARM: shmobile: Move intc.h, cleanup sh_intc.h usage
-
-Change location of intc.h so it can be used as #include "intc.h"
-instead of the old style #include <mach/intc.h>. Also clean up
-some code to get rid of redundant #include <linux/sh_intc.h>.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6200e2c1847b2282db13877b2398a5bee9e42254)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-mackerel.c | 1 -
- arch/arm/mach-shmobile/intc-sh7372.c | 3 +--
- arch/arm/mach-shmobile/intc-sh73a0.c | 3 +--
- arch/arm/mach-shmobile/{include/mach => }/intc.h | 0
- arch/arm/mach-shmobile/setup-sh7372.c | 1 -
- arch/arm/mach-shmobile/setup-sh73a0.c | 1 -
- 6 files changed, 2 insertions(+), 7 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/intc.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 0ff4d8e45cf7..0864a63291d9 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -47,7 +47,6 @@
- #include <linux/regulator/fixed.h>
- #include <linux/regulator/machine.h>
- #include <linux/smsc911x.h>
--#include <linux/sh_intc.h>
- #include <linux/tca6416_keypad.h>
- #include <linux/usb/renesas_usbhs.h>
- #include <linux/dma-mapping.h>
-diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
-index a91caad7db7c..bd021238c77b 100644
---- a/arch/arm/mach-shmobile/intc-sh7372.c
-+++ b/arch/arm/mach-shmobile/intc-sh7372.c
-@@ -22,11 +22,10 @@
- #include <linux/module.h>
- #include <linux/irq.h>
- #include <linux/io.h>
--#include <linux/sh_intc.h>
--#include <mach/intc.h>
- #include <mach/irqs.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "intc.h"
-
- enum {
- UNUSED_INTCA = 0,
-diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
-index 19a26f4579b3..facb70e6a0b0 100644
---- a/arch/arm/mach-shmobile/intc-sh73a0.c
-+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
-@@ -22,14 +22,13 @@
- #include <linux/module.h>
- #include <linux/irq.h>
- #include <linux/io.h>
--#include <linux/sh_intc.h>
- #include <linux/irqchip.h>
- #include <linux/irqchip/arm-gic.h>
--#include <mach/intc.h>
- #include <mach/irqs.h>
- #include <mach/sh73a0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "intc.h"
-
- enum {
- UNUSED = 0,
-diff --git a/arch/arm/mach-shmobile/include/mach/intc.h b/arch/arm/mach-shmobile/intc.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/intc.h
-rename to arch/arm/mach-shmobile/intc.h
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 2a8b9f2a2f54..3b23ced2eb55 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -29,7 +29,6 @@
- #include <linux/io.h>
- #include <linux/serial_sci.h>
- #include <linux/sh_dma.h>
--#include <linux/sh_intc.h>
- #include <linux/sh_timer.h>
- #include <linux/pm_domain.h>
- #include <linux/dma-mapping.h>
-diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
-index ad00724a2269..a758d2adca31 100644
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -29,7 +29,6 @@
- #include <linux/io.h>
- #include <linux/serial_sci.h>
- #include <linux/sh_dma.h>
--#include <linux/sh_intc.h>
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
- #include <linux/platform_data/irq-renesas-intc-irqpin.h>
---
-2.1.2
-
diff --git a/patches.renesas/0816-ARM-shmobile-Move-dma-register.h.patch b/patches.renesas/0816-ARM-shmobile-Move-dma-register.h.patch
deleted file mode 100644
index aaa65627e213c..0000000000000
--- a/patches.renesas/0816-ARM-shmobile-Move-dma-register.h.patch
+++ /dev/null
@@ -1,123 +0,0 @@
-From c98a0bd5cecc1637ebc100a3b9fc1106aa6358b4 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:13 +0900
-Subject: ARM: shmobile: Move dma-register.h
-
-Change location of dma-register.h so it can be used as #include
-"dma-register.h" instead of the old style #include <mach/dma-register.h>.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 74ac0de8b7ee41246b8d6aae1df0618a64451435)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/{include/mach => }/dma-register.h | 0
- arch/arm/mach-shmobile/setup-r8a73a4.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/setup-sh7372.c | 2 +-
- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
- 6 files changed, 5 insertions(+), 5 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/dma-register.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/dma-register.h b/arch/arm/mach-shmobile/dma-register.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/dma-register.h
-rename to arch/arm/mach-shmobile/dma-register.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
-index 9333770cfac2..985739e1885d 100644
---- a/arch/arm/mach-shmobile/setup-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
-@@ -25,10 +25,10 @@
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
--#include <mach/dma-register.h>
- #include <mach/irqs.h>
- #include <mach/r8a73a4.h>
- #include <asm/mach/arch.h>
-+#include "dma-register.h"
-
- static const struct resource pfc_resources[] = {
- DEFINE_RES_MEM(0xe6050000, 0x9000),
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 35dec233301e..7cf4bbd90aa8 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -31,7 +31,6 @@
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
--#include <mach/dma-register.h>
- #include <mach/r8a7740.h>
- #include <mach/pm-rmobile.h>
- #include <mach/common.h>
-@@ -40,6 +39,7 @@
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+#include "dma-register.h"
-
- static struct map_desc r8a7740_io_desc[] __initdata = {
- /*
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 6bd08b127fa4..3eed62673bf4 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -27,10 +27,10 @@
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
--#include <mach/dma-register.h>
- #include <mach/irqs.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
-+#include "dma-register.h"
-
- /* Audio-DMAC */
- #define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 3b23ced2eb55..062929b303f7 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -33,7 +33,6 @@
- #include <linux/pm_domain.h>
- #include <linux/dma-mapping.h>
- #include <linux/platform_data/sh_ipmmu.h>
--#include <mach/dma-register.h>
- #include <mach/irqs.h>
- #include <mach/sh7372.h>
- #include <mach/common.h>
-@@ -41,6 +40,7 @@
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+#include "dma-register.h"
-
- static struct map_desc sh7372_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
-diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
-index a758d2adca31..370d55c400e8 100644
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -32,7 +32,6 @@
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
- #include <linux/platform_data/irq-renesas-intc-irqpin.h>
--#include <mach/dma-register.h>
- #include <mach/irqs.h>
- #include <mach/sh73a0.h>
- #include <mach/common.h>
-@@ -40,6 +39,7 @@
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+#include "dma-register.h"
-
- static struct map_desc sh73a0_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
---
-2.1.2
-
diff --git a/patches.renesas/0817-ARM-shmobile-Move-clock.h.patch b/patches.renesas/0817-ARM-shmobile-Move-clock.h.patch
deleted file mode 100644
index e437ca93cc73a..0000000000000
--- a/patches.renesas/0817-ARM-shmobile-Move-clock.h.patch
+++ /dev/null
@@ -1,229 +0,0 @@
-From 90c46084d324d1468ff19ab5fd93a3903abb05d3 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:21 +0900
-Subject: ARM: shmobile: Move clock.h
-
-Change location of clock.h so it can be used as #include "clock.h"
-instead of the old style #include <mach/clock.h>.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ad6ffa0b59dc2c81474d7642fa2188e25cce99d6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai-reference.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a73a4.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7778.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/clock-sh7372.c | 2 +-
- arch/arm/mach-shmobile/clock-sh73a0.c | 2 +-
- arch/arm/mach-shmobile/clock.c | 4 ++--
- arch/arm/mach-shmobile/{include/mach => }/clock.h | 0
- 13 files changed, 13 insertions(+), 13 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/clock.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index 2ff6ad6e608e..c3535858eff8 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -20,11 +20,11 @@
-
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
--#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/r7s72100.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "clock.h"
-
- /*
- * This is a really crude hack to provide clkdev support to platform
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index d322a162b4b0..4a6dd63f75a8 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -23,12 +23,12 @@
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7791.h>
- #include <asm/mach/arch.h>
-+#include "clock.h"
-
- /* DU */
- static struct rcar_du_encoder_data koelsch_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 749832e3f33c..1d198b029c07 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -22,12 +22,12 @@
- #include <linux/init.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
-+#include "clock.h"
-
- /* DU */
- static struct rcar_du_encoder_data lager_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
-index b5bc22c6a858..857b142e4af9 100644
---- a/arch/arm/mach-shmobile/clock-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
-@@ -22,8 +22,8 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
-+#include "clock.h"
-
- #define CPG_BASE 0xe6150000
- #define CPG_LEN 0x270
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index 50931e3c97c7..6986527da6f0 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -22,9 +22,9 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/r8a7740.h>
-+#include "clock.h"
-
- /*
- * | MDx | XTAL1/EXTAL1 | System | EXTALR |
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 13f8f3ab8840..017fa503c2b8 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -39,8 +39,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
-+#include "clock.h"
-
- #define MSTPCR0 IOMEM(0xffc80030)
- #define MSTPCR1 IOMEM(0xffc80034)
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index a13298bd37a8..eb7b13187057 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -23,8 +23,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
-+#include "clock.h"
-
- /*
- * MD1 = 1 MD1 = 0
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 296a057109e4..8c6244609cbe 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -22,9 +22,9 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/r8a7790.h>
-+#include "clock.h"
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index e2fdfcc14436..20cad4a4d741 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -23,9 +23,9 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
- #include <mach/rcar-gen2.h>
-+#include "clock.h"
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
-index d16d9ca7f79e..b19bc7e50a9a 100644
---- a/arch/arm/mach-shmobile/clock-sh7372.c
-+++ b/arch/arm/mach-shmobile/clock-sh7372.c
-@@ -21,8 +21,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
- #include <mach/common.h>
-+#include "clock.h"
-
- /* SH7372 registers */
- #define FRQCRA IOMEM(0xe6150000)
-diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
-index 0d9cd1fe0212..3956b95ef99b 100644
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -22,8 +22,8 @@
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
- #include <asm/processor.h>
--#include <mach/clock.h>
- #include <mach/common.h>
-+#include "clock.h"
-
- #define FRQCRA IOMEM(0xe6150000)
- #define FRQCRB IOMEM(0xe6150004)
-diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
-index e7232a0373b9..2a58a782e203 100644
---- a/arch/arm/mach-shmobile/clock.c
-+++ b/arch/arm/mach-shmobile/clock.c
-@@ -25,7 +25,7 @@
- #ifdef CONFIG_COMMON_CLK
- #include <linux/clk.h>
- #include <linux/clkdev.h>
--#include <mach/clock.h>
-+#include "clock.h"
-
- void __init shmobile_clk_workaround(const struct clk_name *clks,
- int nr_clks, bool enable)
-@@ -49,8 +49,8 @@ void __init shmobile_clk_workaround(const struct clk_name *clks,
- #else /* CONFIG_COMMON_CLK */
- #include <linux/sh_clk.h>
- #include <linux/export.h>
--#include <mach/clock.h>
- #include <mach/common.h>
-+#include "clock.h"
-
- unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk)
- {
-diff --git a/arch/arm/mach-shmobile/include/mach/clock.h b/arch/arm/mach-shmobile/clock.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/clock.h
-rename to arch/arm/mach-shmobile/clock.h
---
-2.1.2
-
diff --git a/patches.renesas/0818-ARM-shmobile-Move-most-of-irqs.h-keep-some-for-pinct.patch b/patches.renesas/0818-ARM-shmobile-Move-most-of-irqs.h-keep-some-for-pinct.patch
deleted file mode 100644
index 669841be3b497..0000000000000
--- a/patches.renesas/0818-ARM-shmobile-Move-most-of-irqs.h-keep-some-for-pinct.patch
+++ /dev/null
@@ -1,511 +0,0 @@
-From 37c3b5e09e707377ca6fe2c849cb45d3b3199660 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:29 +0900
-Subject: ARM: shmobile: Move most of irqs.h, keep some for pinctl
-
-Move most of irqs.h so it can be used as #include "irqs.h"
-instead of the old style #include <mach/irqs.h>.
-
-Legacy code in drivers/pinctrl needs more work to get rid
-of the "mach" portion of the include path, so some part
-is left in the original location.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-[horms+renesas@verge.net.au: Do not add trailing blank line to irqs.h]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit b6bab1263c61e39cfc3427f54baff6f683f54298)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-ape6evm.c | 2 +-
- arch/arm/mach-shmobile/board-armadillo800eva.c | 3 +--
- arch/arm/mach-shmobile/board-bockw.c | 2 +-
- arch/arm/mach-shmobile/board-genmai.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch.c | 2 +-
- arch/arm/mach-shmobile/board-kzm9g.c | 2 +-
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- arch/arm/mach-shmobile/board-lager.c | 2 +-
- arch/arm/mach-shmobile/board-mackerel.c | 5 +----
- arch/arm/mach-shmobile/board-marzen-reference.c | 2 +-
- arch/arm/mach-shmobile/board-marzen.c | 2 +-
- arch/arm/mach-shmobile/include/mach/irqs.h | 16 +---------------
- arch/arm/mach-shmobile/intc-sh7372.c | 2 +-
- arch/arm/mach-shmobile/intc-sh73a0.c | 2 +-
- arch/arm/mach-shmobile/irqs.h | 21 +++++++++++++++++++++
- arch/arm/mach-shmobile/setup-r7s72100.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a73a4.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7778.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/setup-sh7372.c | 2 +-
- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
- 25 files changed, 45 insertions(+), 42 deletions(-)
- create mode 100644 arch/arm/mach-shmobile/irqs.h
-
-diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
-index fe071a9130b7..48ec1449bd02 100644
---- a/arch/arm/mach-shmobile/board-ape6evm.c
-+++ b/arch/arm/mach-shmobile/board-ape6evm.c
-@@ -34,10 +34,10 @@
- #include <linux/sh_clk.h>
- #include <linux/smsc911x.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a73a4.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "irqs.h"
-
- /* LEDS */
- static struct gpio_led ape6evm_leds[] = {
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 5b2aee4eac0c..79fd9c9b3707 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -46,7 +46,6 @@
- #include <linux/i2c-gpio.h>
- #include <linux/reboot.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a7740.h>
- #include <media/mt9t112.h>
- #include <media/sh_mobile_ceu.h>
-@@ -61,7 +60,7 @@
- #include <video/sh_mobile_hdmi.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
--
-+#include "irqs.h"
- #include "sh-gpio.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index f444be2f241e..22252fb31ec5 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -36,11 +36,11 @@
- #include <linux/usb/renesas_usbhs.h>
- #include <media/soc_camera.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a7778.h>
- #include <asm/mach/arch.h>
- #include <sound/rcar_snd.h>
- #include <sound/simple_card.h>
-+#include "irqs.h"
-
- #define FPGA 0x18200000
- #define IRQ0MR 0x30
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index c94201ee8596..5ce1025a662b 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -26,10 +26,10 @@
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r7s72100.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "irqs.h"
-
- /* Ether */
- static const struct sh_eth_plat_data ether_pdata __initconst = {
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 4a6dd63f75a8..fc174e199cb3 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -24,11 +24,11 @@
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7791.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
-+#include "irqs.h"
-
- /* DU */
- static struct rcar_du_encoder_data koelsch_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index c6c68892caa3..52665adf0b41 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -46,11 +46,11 @@
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a7791.h>
- #include <mach/rcar-gen2.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "irqs.h"
-
- /* DU */
- static struct rcar_du_encoder_data koelsch_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
-index 03dc3ac84502..1719b63e5bc5 100644
---- a/arch/arm/mach-shmobile/board-kzm9g.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g.c
-@@ -43,13 +43,13 @@
- #include <linux/videodev2.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
--#include <mach/irqs.h>
- #include <mach/sh73a0.h>
- #include <mach/common.h>
- #include <asm/hardware/cache-l2x0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <video/sh_mobile_lcdc.h>
-+#include "irqs.h"
-
- /*
- * external GPIO
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 1d198b029c07..31cf06d2629b 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -23,11 +23,11 @@
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
-+#include "irqs.h"
-
- /* DU */
- static struct rcar_du_encoder_data lager_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index f8b1e05463cc..8f6d4e626273 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -46,7 +46,6 @@
- #include <linux/usb/phy.h>
- #include <linux/usb/renesas_usbhs.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a7790.h>
- #include <media/soc_camera.h>
- #include <asm/mach-types.h>
-@@ -58,6 +57,7 @@
- #include <linux/spi/spi.h>
- #include <sound/rcar_snd.h>
- #include <sound/simple_card.h>
-+#include "irqs.h"
-
- /*
- * SSI-AK4643
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 0864a63291d9..92fbc4752733 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -57,14 +57,11 @@
- #include <media/soc_camera_platform.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
--
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/sh7372.h>
--
- #include <asm/mach/arch.h>
- #include <asm/mach-types.h>
--
-+#include "irqs.h"
- #include "sh-gpio.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 2773936bf7dc..08eb1c08e0d0 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -21,9 +21,9 @@
-
- #include <mach/r8a7779.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <asm/irq.h>
- #include <asm/mach/arch.h>
-+#include "irqs.h"
-
- static void __init marzen_init(void)
- {
-diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
-index d832a4477b4b..a9529bad4d60 100644
---- a/arch/arm/mach-shmobile/board-marzen.c
-+++ b/arch/arm/mach-shmobile/board-marzen.c
-@@ -44,10 +44,10 @@
- #include <media/soc_camera.h>
- #include <mach/r8a7779.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/traps.h>
-+#include "irqs.h"
-
- /* Fixed 3.3V regulator to be used by SDHI0 */
- static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
-diff --git a/arch/arm/mach-shmobile/include/mach/irqs.h b/arch/arm/mach-shmobile/include/mach/irqs.h
-index d241bfd6926d..5aee83f079e2 100644
---- a/arch/arm/mach-shmobile/include/mach/irqs.h
-+++ b/arch/arm/mach-shmobile/include/mach/irqs.h
-@@ -1,24 +1,10 @@
- #ifndef __ASM_MACH_IRQS_H
- #define __ASM_MACH_IRQS_H
-
--#include <linux/sh_intc.h>
--
--/* GIC */
--#define gic_spi(nr) ((nr) + 32)
--#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
--
--/* INTCS */
--#define INTCS_VECT_BASE 0x3400
--#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
--#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
-+/* Stuck here until drivers/pinctl/sh-pfc gets rid of legacy code */
-
- /* External IRQ pins */
- #define IRQPIN_BASE 2000
- #define irq_pin(nr) ((nr) + IRQPIN_BASE)
-
--/* GPIO IRQ */
--#define _GPIO_IRQ_BASE 2500
--#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
--#define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y)
--
- #endif /* __ASM_MACH_IRQS_H */
-diff --git a/arch/arm/mach-shmobile/intc-sh7372.c b/arch/arm/mach-shmobile/intc-sh7372.c
-index bd021238c77b..e2af00b1bd9d 100644
---- a/arch/arm/mach-shmobile/intc-sh7372.c
-+++ b/arch/arm/mach-shmobile/intc-sh7372.c
-@@ -22,10 +22,10 @@
- #include <linux/module.h>
- #include <linux/irq.h>
- #include <linux/io.h>
--#include <mach/irqs.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include "intc.h"
-+#include "irqs.h"
-
- enum {
- UNUSED_INTCA = 0,
-diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
-index facb70e6a0b0..1a8f9a7af983 100644
---- a/arch/arm/mach-shmobile/intc-sh73a0.c
-+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
-@@ -24,11 +24,11 @@
- #include <linux/io.h>
- #include <linux/irqchip.h>
- #include <linux/irqchip/arm-gic.h>
--#include <mach/irqs.h>
- #include <mach/sh73a0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include "intc.h"
-+#include "irqs.h"
-
- enum {
- UNUSED = 0,
-diff --git a/arch/arm/mach-shmobile/irqs.h b/arch/arm/mach-shmobile/irqs.h
-new file mode 100644
-index 000000000000..4ff2d2aa94f0
---- /dev/null
-+++ b/arch/arm/mach-shmobile/irqs.h
-@@ -0,0 +1,21 @@
-+#ifndef __SHMOBILE_IRQS_H
-+#define __SHMOBILE_IRQS_H
-+
-+#include <linux/sh_intc.h>
-+#include <mach/irqs.h>
-+
-+/* GIC */
-+#define gic_spi(nr) ((nr) + 32)
-+#define gic_iid(nr) (nr) /* ICCIAR / interrupt ID */
-+
-+/* INTCS */
-+#define INTCS_VECT_BASE 0x3400
-+#define INTCS_VECT(n, vect) INTC_VECT((n), INTCS_VECT_BASE + (vect))
-+#define intcs_evt2irq(evt) evt2irq(INTCS_VECT_BASE + (evt))
-+
-+/* GPIO IRQ */
-+#define _GPIO_IRQ_BASE 2500
-+#define GPIO_IRQ_BASE(x) (_GPIO_IRQ_BASE + (32 * x))
-+#define GPIO_IRQ(x, y) (_GPIO_IRQ_BASE + (32 * x) + y)
-+
-+#endif /* __SHMOBILE_IRQS_H */
-diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
-index 412e179429cd..a185f691b917 100644
---- a/arch/arm/mach-shmobile/setup-r7s72100.c
-+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
-@@ -23,9 +23,9 @@
- #include <linux/of_platform.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r7s72100.h>
- #include <asm/mach/arch.h>
-+#include "irqs.h"
-
- static struct resource mtu2_resources[] __initdata = {
- DEFINE_RES_MEM(0xfcff0000, 0x400),
-diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
-index 985739e1885d..7efa77d74d69 100644
---- a/arch/arm/mach-shmobile/setup-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
-@@ -25,10 +25,10 @@
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a73a4.h>
- #include <asm/mach/arch.h>
- #include "dma-register.h"
-+#include "irqs.h"
-
- static const struct resource pfc_resources[] = {
- DEFINE_RES_MEM(0xe6050000, 0x9000),
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 7cf4bbd90aa8..e87c642f047d 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -34,12 +34,12 @@
- #include <mach/r8a7740.h>
- #include <mach/pm-rmobile.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <asm/mach-types.h>
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- #include "dma-register.h"
-+#include "irqs.h"
-
- static struct map_desc r8a7740_io_desc[] __initdata = {
- /*
-diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
-index 8c02e24f2483..5859267c822a 100644
---- a/arch/arm/mach-shmobile/setup-r8a7778.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
-@@ -37,11 +37,11 @@
- #include <linux/usb/ehci_pdriver.h>
- #include <linux/usb/ohci_pdriver.h>
- #include <linux/dma-mapping.h>
--#include <mach/irqs.h>
- #include <mach/r8a7778.h>
- #include <mach/common.h>
- #include <asm/mach/arch.h>
- #include <asm/hardware/cache-l2x0.h>
-+#include "irqs.h"
-
- /* SCIF */
- #define R8A7778_SCIF(index, baseaddr, irq) \
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index d197b5adc886..ce1ee935b738 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -40,7 +40,6 @@
- #include <linux/usb/ehci_pdriver.h>
- #include <linux/usb/ohci_pdriver.h>
- #include <linux/pm_runtime.h>
--#include <mach/irqs.h>
- #include <mach/r8a7779.h>
- #include <mach/common.h>
- #include <asm/mach-types.h>
-@@ -48,6 +47,7 @@
- #include <asm/mach/time.h>
- #include <asm/mach/map.h>
- #include <asm/hardware/cache-l2x0.h>
-+#include "irqs.h"
-
- static struct map_desc r8a7779_io_desc[] __initdata = {
- /* 2M entity map for 0xf0000000 (MPCORE) */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 3eed62673bf4..925327d48bc1 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -27,10 +27,10 @@
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
- #include "dma-register.h"
-+#include "irqs.h"
-
- /* Audio-DMAC */
- #define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 04a96ddb3224..8055cff2d953 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -27,10 +27,10 @@
- #include <linux/serial_sci.h>
- #include <linux/sh_timer.h>
- #include <mach/common.h>
--#include <mach/irqs.h>
- #include <mach/r8a7791.h>
- #include <mach/rcar-gen2.h>
- #include <asm/mach/arch.h>
-+#include "irqs.h"
-
- static const struct resource pfc_resources[] __initconst = {
- DEFINE_RES_MEM(0xe6060000, 0x250),
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 062929b303f7..0fab666fdf64 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -33,7 +33,6 @@
- #include <linux/pm_domain.h>
- #include <linux/dma-mapping.h>
- #include <linux/platform_data/sh_ipmmu.h>
--#include <mach/irqs.h>
- #include <mach/sh7372.h>
- #include <mach/common.h>
- #include <asm/mach/map.h>
-@@ -41,6 +40,7 @@
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- #include "dma-register.h"
-+#include "irqs.h"
-
- static struct map_desc sh7372_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
-diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
-index 370d55c400e8..bb5100205866 100644
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -32,7 +32,6 @@
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
- #include <linux/platform_data/irq-renesas-intc-irqpin.h>
--#include <mach/irqs.h>
- #include <mach/sh73a0.h>
- #include <mach/common.h>
- #include <asm/mach-types.h>
-@@ -40,6 +39,7 @@
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- #include "dma-register.h"
-+#include "irqs.h"
-
- static struct map_desc sh73a0_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
---
-2.1.2
-
diff --git a/patches.renesas/0819-ARM-shmobile-Move-common.h.patch b/patches.renesas/0819-ARM-shmobile-Move-common.h.patch
deleted file mode 100644
index f850aada32509..0000000000000
--- a/patches.renesas/0819-ARM-shmobile-Move-common.h.patch
+++ /dev/null
@@ -1,868 +0,0 @@
-From 45095c37b0bd39644c563fbfd89fd46f9878defd Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:37 +0900
-Subject: ARM: shmobile: Move common.h
-
-Change location for common.h so it can be used as #include "common.h"
-instead of the old style #include <mach/common.h>.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fd44aa5e570d1d8c7d361dcbf94c2b8cd25cfe92)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-ape6evm-reference.c | 2 +-
- arch/arm/mach-shmobile/board-ape6evm.c | 2 +-
- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 2 +-
- arch/arm/mach-shmobile/board-armadillo800eva.c | 2 +-
- arch/arm/mach-shmobile/board-bockw-reference.c | 2 +-
- arch/arm/mach-shmobile/board-bockw.c | 2 +-
- arch/arm/mach-shmobile/board-genmai-reference.c | 2 +-
- arch/arm/mach-shmobile/board-genmai.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch.c | 2 +-
- arch/arm/mach-shmobile/board-kzm9g-reference.c | 2 +-
- arch/arm/mach-shmobile/board-kzm9g.c | 2 +-
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- arch/arm/mach-shmobile/board-lager.c | 2 +-
- arch/arm/mach-shmobile/board-mackerel.c | 2 +-
- arch/arm/mach-shmobile/board-marzen-reference.c | 2 +-
- arch/arm/mach-shmobile/board-marzen.c | 2 +-
- arch/arm/mach-shmobile/clock-r7s72100.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a73a4.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7778.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/clock-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/clock-sh7372.c | 2 +-
- arch/arm/mach-shmobile/clock-sh73a0.c | 2 +-
- arch/arm/mach-shmobile/clock.c | 2 +-
- arch/arm/mach-shmobile/{include/mach => }/common.h | 0
- arch/arm/mach-shmobile/console.c | 2 +-
- arch/arm/mach-shmobile/platsmp-apmu.c | 2 +-
- arch/arm/mach-shmobile/platsmp-scu.c | 2 +-
- arch/arm/mach-shmobile/platsmp.c | 2 +-
- arch/arm/mach-shmobile/pm-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/pm-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/pm-sh7372.c | 2 +-
- arch/arm/mach-shmobile/pm-sh73a0.c | 2 +-
- arch/arm/mach-shmobile/setup-emev2.c | 2 +-
- arch/arm/mach-shmobile/setup-r7s72100.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a73a4.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7778.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
- arch/arm/mach-shmobile/setup-sh7372.c | 2 +-
- arch/arm/mach-shmobile/setup-sh73a0.c | 2 +-
- arch/arm/mach-shmobile/smp-emev2.c | 2 +-
- arch/arm/mach-shmobile/smp-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/smp-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/smp-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/smp-sh73a0.c | 2 +-
- 52 files changed, 51 insertions(+), 51 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/common.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c
-index 3276afcf3cc9..76e4ff14be68 100644
---- a/arch/arm/mach-shmobile/board-ape6evm-reference.c
-+++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c
-@@ -24,10 +24,10 @@
- #include <linux/pinctrl/machine.h>
- #include <linux/platform_device.h>
- #include <linux/sh_clk.h>
--#include <mach/common.h>
- #include <mach/r8a73a4.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
-
- static void __init ape6evm_add_standard_devices(void)
- {
-diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
-index 48ec1449bd02..8f8da25310e7 100644
---- a/arch/arm/mach-shmobile/board-ape6evm.c
-+++ b/arch/arm/mach-shmobile/board-ape6evm.c
-@@ -33,10 +33,10 @@
- #include <linux/regulator/machine.h>
- #include <linux/sh_clk.h>
- #include <linux/smsc911x.h>
--#include <mach/common.h>
- #include <mach/r8a73a4.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "irqs.h"
-
- /* LEDS */
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-index 57d246eb8813..6b7c975e8ee2 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-@@ -24,10 +24,10 @@
- #include <linux/kernel.h>
- #include <linux/gpio.h>
- #include <linux/io.h>
--#include <mach/common.h>
- #include <mach/r8a7740.h>
- #include <asm/mach/arch.h>
- #include <asm/hardware/cache-l2x0.h>
-+#include "common.h"
-
- /*
- * CON1 Camera Module
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 79fd9c9b3707..93d92b4409bd 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -45,7 +45,6 @@
- #include <linux/mmc/sh_mobile_sdhi.h>
- #include <linux/i2c-gpio.h>
- #include <linux/reboot.h>
--#include <mach/common.h>
- #include <mach/r8a7740.h>
- #include <media/mt9t112.h>
- #include <media/sh_mobile_ceu.h>
-@@ -60,6 +59,7 @@
- #include <video/sh_mobile_hdmi.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
-+#include "common.h"
- #include "irqs.h"
- #include "sh-gpio.h"
-
-diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
-index 027373f8de82..91ff3a27ccc7 100644
---- a/arch/arm/mach-shmobile/board-bockw-reference.c
-+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
-@@ -19,9 +19,9 @@
- */
-
- #include <linux/of_platform.h>
--#include <mach/common.h>
- #include <mach/r8a7778.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
-
- /*
- * see board-bock.c for checking detail of dip-switch
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index 22252fb31ec5..8cb057f95c44 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -35,11 +35,11 @@
- #include <linux/spi/flash.h>
- #include <linux/usb/renesas_usbhs.h>
- #include <media/soc_camera.h>
--#include <mach/common.h>
- #include <mach/r8a7778.h>
- #include <asm/mach/arch.h>
- #include <sound/rcar_snd.h>
- #include <sound/simple_card.h>
-+#include "common.h"
- #include "irqs.h"
-
- #define FPGA 0x18200000
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index c3535858eff8..d341ef09ec37 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -20,11 +20,11 @@
-
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
--#include <mach/common.h>
- #include <mach/r7s72100.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
-+#include "common.h"
-
- /*
- * This is a really crude hack to provide clkdev support to platform
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index 5ce1025a662b..f0a8eca7d10d 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -25,10 +25,10 @@
- #include <linux/sh_eth.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
--#include <mach/common.h>
- #include <mach/r7s72100.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "irqs.h"
-
- /* Ether */
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index fc174e199cb3..10fd0858c98c 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -23,11 +23,11 @@
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/common.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7791.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
-+#include "common.h"
- #include "irqs.h"
-
- /* DU */
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 52665adf0b41..1d8b6e6bebdb 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -45,11 +45,11 @@
- #include <linux/spi/flash.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
--#include <mach/common.h>
- #include <mach/r8a7791.h>
- #include <mach/rcar-gen2.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "irqs.h"
-
- /* DU */
-diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
-index 598e32488410..f7b2d0708311 100644
---- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
-@@ -26,10 +26,10 @@
- #include <linux/input.h>
- #include <linux/of_platform.h>
- #include <mach/sh73a0.h>
--#include <mach/common.h>
- #include <asm/hardware/cache-l2x0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
-
- static void __init kzm_init(void)
- {
-diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
-index 1719b63e5bc5..638859ee247f 100644
---- a/arch/arm/mach-shmobile/board-kzm9g.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g.c
-@@ -44,11 +44,11 @@
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
- #include <mach/sh73a0.h>
--#include <mach/common.h>
- #include <asm/hardware/cache-l2x0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <video/sh_mobile_lcdc.h>
-+#include "common.h"
- #include "irqs.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 31cf06d2629b..6e1a2618a8d1 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -22,11 +22,11 @@
- #include <linux/init.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/common.h>
- #include <mach/rcar-gen2.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
-+#include "common.h"
- #include "irqs.h"
-
- /* DU */
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 8f6d4e626273..f0249ca237eb 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -45,7 +45,6 @@
- #include <linux/sh_eth.h>
- #include <linux/usb/phy.h>
- #include <linux/usb/renesas_usbhs.h>
--#include <mach/common.h>
- #include <mach/r8a7790.h>
- #include <media/soc_camera.h>
- #include <asm/mach-types.h>
-@@ -57,6 +56,7 @@
- #include <linux/spi/spi.h>
- #include <sound/rcar_snd.h>
- #include <sound/simple_card.h>
-+#include "common.h"
- #include "irqs.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 92fbc4752733..3558ff0f834a 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -57,10 +57,10 @@
- #include <media/soc_camera_platform.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
--#include <mach/common.h>
- #include <mach/sh7372.h>
- #include <asm/mach/arch.h>
- #include <asm/mach-types.h>
-+#include "common.h"
- #include "irqs.h"
- #include "sh-gpio.h"
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 08eb1c08e0d0..94bd57203ff5 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -20,9 +20,9 @@
- */
-
- #include <mach/r8a7779.h>
--#include <mach/common.h>
- #include <asm/irq.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "irqs.h"
-
- static void __init marzen_init(void)
-diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
-index a9529bad4d60..fe445ef49fb9 100644
---- a/arch/arm/mach-shmobile/board-marzen.c
-+++ b/arch/arm/mach-shmobile/board-marzen.c
-@@ -43,10 +43,10 @@
- #include <linux/mfd/tmio.h>
- #include <media/soc_camera.h>
- #include <mach/r8a7779.h>
--#include <mach/common.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/traps.h>
-+#include "common.h"
- #include "irqs.h"
-
- /* Fixed 3.3V regulator to be used by SDHI0 */
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index df187484de5d..457dab0f8fc9 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -19,8 +19,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include <mach/r7s72100.h>
-+#include "common.h"
-
- /* Frequency Control Registers */
- #define FRQCR 0xfcfe0010
-diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
-index 857b142e4af9..0f431498229b 100644
---- a/arch/arm/mach-shmobile/clock-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
-@@ -22,7 +22,7 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
-+#include "common.h"
- #include "clock.h"
-
- #define CPG_BASE 0xe6150000
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index 6986527da6f0..ffefec53b058 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -22,9 +22,9 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include <mach/r8a7740.h>
- #include "clock.h"
-+#include "common.h"
-
- /*
- * | MDx | XTAL1/EXTAL1 | System | EXTALR |
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 017fa503c2b8..16bbc94a1520 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -39,8 +39,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include "clock.h"
-+#include "common.h"
-
- #define MSTPCR0 IOMEM(0xffc80030)
- #define MSTPCR1 IOMEM(0xffc80034)
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index eb7b13187057..d81539a26dbd 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -23,8 +23,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include "clock.h"
-+#include "common.h"
-
- /*
- * MD1 = 1 MD1 = 0
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 8c6244609cbe..b6781a0ea747 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -22,9 +22,9 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include <mach/r8a7790.h>
- #include "clock.h"
-+#include "common.h"
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 20cad4a4d741..494aaf69461a 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -23,9 +23,9 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include <mach/rcar-gen2.h>
- #include "clock.h"
-+#include "common.h"
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-diff --git a/arch/arm/mach-shmobile/clock-sh7372.c b/arch/arm/mach-shmobile/clock-sh7372.c
-index b19bc7e50a9a..7071676145c4 100644
---- a/arch/arm/mach-shmobile/clock-sh7372.c
-+++ b/arch/arm/mach-shmobile/clock-sh7372.c
-@@ -21,8 +21,8 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/common.h>
- #include "clock.h"
-+#include "common.h"
-
- /* SH7372 registers */
- #define FRQCRA IOMEM(0xe6150000)
-diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
-index 3956b95ef99b..37f48383e05a 100644
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -22,8 +22,8 @@
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
- #include <asm/processor.h>
--#include <mach/common.h>
- #include "clock.h"
-+#include "common.h"
-
- #define FRQCRA IOMEM(0xe6150000)
- #define FRQCRB IOMEM(0xe6150004)
-diff --git a/arch/arm/mach-shmobile/clock.c b/arch/arm/mach-shmobile/clock.c
-index 2a58a782e203..806f94038cc4 100644
---- a/arch/arm/mach-shmobile/clock.c
-+++ b/arch/arm/mach-shmobile/clock.c
-@@ -49,8 +49,8 @@ void __init shmobile_clk_workaround(const struct clk_name *clks,
- #else /* CONFIG_COMMON_CLK */
- #include <linux/sh_clk.h>
- #include <linux/export.h>
--#include <mach/common.h>
- #include "clock.h"
-+#include "common.h"
-
- unsigned long shmobile_fixed_ratio_clk_recalc(struct clk *clk)
- {
-diff --git a/arch/arm/mach-shmobile/include/mach/common.h b/arch/arm/mach-shmobile/common.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/common.h
-rename to arch/arm/mach-shmobile/common.h
-diff --git a/arch/arm/mach-shmobile/console.c b/arch/arm/mach-shmobile/console.c
-index 9411a5bf4fd6..f2e79f2376e1 100644
---- a/arch/arm/mach-shmobile/console.c
-+++ b/arch/arm/mach-shmobile/console.c
-@@ -19,8 +19,8 @@
- #include <linux/kernel.h>
- #include <linux/init.h>
- #include <linux/platform_device.h>
--#include <mach/common.h>
- #include <asm/mach/map.h>
-+#include "common.h"
-
- void __init shmobile_setup_console(void)
- {
-diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index 8cb641c00fdb..fe648f5d8f06 100644
---- a/arch/arm/mach-shmobile/platsmp-apmu.c
-+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
-@@ -16,7 +16,7 @@
- #include <asm/cacheflush.h>
- #include <asm/cp15.h>
- #include <asm/smp_plat.h>
--#include <mach/common.h>
-+#include "common.h"
-
- static struct {
- void __iomem *iomem;
-diff --git a/arch/arm/mach-shmobile/platsmp-scu.c b/arch/arm/mach-shmobile/platsmp-scu.c
-index 673ad6e80869..64663110ab6c 100644
---- a/arch/arm/mach-shmobile/platsmp-scu.c
-+++ b/arch/arm/mach-shmobile/platsmp-scu.c
-@@ -15,7 +15,7 @@
- #include <asm/cacheflush.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_scu.h>
--#include <mach/common.h>
-+#include "common.h"
-
- static int shmobile_smp_scu_notifier_call(struct notifier_block *nfb,
- unsigned long action, void *hcpu)
-diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c
-index 9ebc246b8d7d..3923e09e966d 100644
---- a/arch/arm/mach-shmobile/platsmp.c
-+++ b/arch/arm/mach-shmobile/platsmp.c
-@@ -13,7 +13,7 @@
- #include <linux/init.h>
- #include <asm/cacheflush.h>
- #include <asm/smp_plat.h>
--#include <mach/common.h>
-+#include "common.h"
-
- extern unsigned long shmobile_smp_fn[];
- extern unsigned long shmobile_smp_arg[];
-diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
-index 40b87aa1d448..a8a0d0506f13 100644
---- a/arch/arm/mach-shmobile/pm-r8a7740.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
-@@ -11,7 +11,7 @@
- #include <linux/console.h>
- #include <linux/suspend.h>
- #include <mach/pm-rmobile.h>
--#include <mach/common.h>
-+#include "common.h"
-
- #ifdef CONFIG_PM
- static int r8a7740_pd_a4s_suspend(void)
-diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c
-index d6fe189b2df6..2b79bacd9dcb 100644
---- a/arch/arm/mach-shmobile/pm-r8a7779.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7779.c
-@@ -19,9 +19,9 @@
- #include <linux/interrupt.h>
- #include <linux/console.h>
- #include <asm/io.h>
--#include <mach/common.h>
- #include <mach/pm-rcar.h>
- #include <mach/r8a7779.h>
-+#include "common.h"
-
- /* SYSC */
- #define SYSCIER 0x0c
-diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
-index 0de75fd394b9..0b1b4deca03e 100644
---- a/arch/arm/mach-shmobile/pm-sh7372.c
-+++ b/arch/arm/mach-shmobile/pm-sh7372.c
-@@ -25,9 +25,9 @@
- #include <asm/io.h>
- #include <asm/tlbflush.h>
- #include <asm/suspend.h>
--#include <mach/common.h>
- #include <mach/sh7372.h>
- #include <mach/pm-rmobile.h>
-+#include "common.h"
-
- /* DBG */
- #define DBGREG1 IOMEM(0xe6100020)
-diff --git a/arch/arm/mach-shmobile/pm-sh73a0.c b/arch/arm/mach-shmobile/pm-sh73a0.c
-index 99086e98fbbc..a7e466817965 100644
---- a/arch/arm/mach-shmobile/pm-sh73a0.c
-+++ b/arch/arm/mach-shmobile/pm-sh73a0.c
-@@ -9,7 +9,7 @@
- */
-
- #include <linux/suspend.h>
--#include <mach/common.h>
-+#include "common.h"
-
- #ifdef CONFIG_SUSPEND
- static int sh73a0_enter_suspend(suspend_state_t suspend_state)
-diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
-index d953ff6e78a2..6e4ffa74dad4 100644
---- a/arch/arm/mach-shmobile/setup-emev2.c
-+++ b/arch/arm/mach-shmobile/setup-emev2.c
-@@ -20,10 +20,10 @@
- #include <linux/kernel.h>
- #include <linux/init.h>
- #include <linux/of_platform.h>
--#include <mach/common.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/map.h>
-+#include "common.h"
-
- static struct map_desc emev2_io_desc[] __initdata = {
- #ifdef CONFIG_SMP
-diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
-index a185f691b917..17a74d355c5d 100644
---- a/arch/arm/mach-shmobile/setup-r7s72100.c
-+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
-@@ -22,9 +22,9 @@
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/sh_timer.h>
--#include <mach/common.h>
- #include <mach/r7s72100.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "irqs.h"
-
- static struct resource mtu2_resources[] __initdata = {
-diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
-index 7efa77d74d69..da94d9b9292e 100644
---- a/arch/arm/mach-shmobile/setup-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
-@@ -24,9 +24,9 @@
- #include <linux/serial_sci.h>
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
--#include <mach/common.h>
- #include <mach/r8a73a4.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index e87c642f047d..d86a128206b3 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -33,11 +33,11 @@
- #include <linux/platform_data/sh_ipmmu.h>
- #include <mach/r8a7740.h>
- #include <mach/pm-rmobile.h>
--#include <mach/common.h>
- #include <asm/mach-types.h>
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+#include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
-index 5859267c822a..b7deec3c3d8d 100644
---- a/arch/arm/mach-shmobile/setup-r8a7778.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
-@@ -38,9 +38,9 @@
- #include <linux/usb/ohci_pdriver.h>
- #include <linux/dma-mapping.h>
- #include <mach/r8a7778.h>
--#include <mach/common.h>
- #include <asm/mach/arch.h>
- #include <asm/hardware/cache-l2x0.h>
-+#include "common.h"
- #include "irqs.h"
-
- /* SCIF */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index ce1ee935b738..e2bd28de39d0 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -41,12 +41,12 @@
- #include <linux/usb/ohci_pdriver.h>
- #include <linux/pm_runtime.h>
- #include <mach/r8a7779.h>
--#include <mach/common.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- #include <asm/mach/map.h>
- #include <asm/hardware/cache-l2x0.h>
-+#include "common.h"
- #include "irqs.h"
-
- static struct map_desc r8a7779_io_desc[] __initdata = {
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 925327d48bc1..7bbe5c05d2a5 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -26,9 +26,9 @@
- #include <linux/serial_sci.h>
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
--#include <mach/common.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 8055cff2d953..6d8c61f42895 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -26,10 +26,10 @@
- #include <linux/platform_data/irq-renesas-irqc.h>
- #include <linux/serial_sci.h>
- #include <linux/sh_timer.h>
--#include <mach/common.h>
- #include <mach/r8a7791.h>
- #include <mach/rcar-gen2.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
- #include "irqs.h"
-
- static const struct resource pfc_resources[] __initconst = {
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index 542c5a47173f..1c41227bb770 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -22,9 +22,9 @@
- #include <linux/clocksource.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
--#include <mach/common.h>
- #include <mach/rcar-gen2.h>
- #include <asm/mach/arch.h>
-+#include "common.h"
-
- #define MODEMR 0xe6160060
-
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 0fab666fdf64..8da836a373fe 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -34,11 +34,11 @@
- #include <linux/dma-mapping.h>
- #include <linux/platform_data/sh_ipmmu.h>
- #include <mach/sh7372.h>
--#include <mach/common.h>
- #include <asm/mach/map.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+#include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-
-diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
-index bb5100205866..b30bbee6dc65 100644
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -33,11 +33,11 @@
- #include <linux/platform_data/sh_ipmmu.h>
- #include <linux/platform_data/irq-renesas-intc-irqpin.h>
- #include <mach/sh73a0.h>
--#include <mach/common.h>
- #include <asm/mach-types.h>
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+#include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-
-diff --git a/arch/arm/mach-shmobile/smp-emev2.c b/arch/arm/mach-shmobile/smp-emev2.c
-index 2dfd748da7f3..6ff1df1df9a7 100644
---- a/arch/arm/mach-shmobile/smp-emev2.c
-+++ b/arch/arm/mach-shmobile/smp-emev2.c
-@@ -23,9 +23,9 @@
- #include <linux/spinlock.h>
- #include <linux/io.h>
- #include <linux/delay.h>
--#include <mach/common.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_scu.h>
-+#include "common.h"
-
- #define EMEV2_SCU_BASE 0x1e000000
- #define EMEV2_SMU_BASE 0xe0110000
-diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
-index e7a3201473d0..e063cd29c30f 100644
---- a/arch/arm/mach-shmobile/smp-r8a7779.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
-@@ -23,13 +23,13 @@
- #include <linux/spinlock.h>
- #include <linux/io.h>
- #include <linux/delay.h>
--#include <mach/common.h>
- #include <mach/pm-rcar.h>
- #include <mach/r8a7779.h>
- #include <asm/cacheflush.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_scu.h>
- #include <asm/smp_twd.h>
-+#include "common.h"
-
- #define AVECR IOMEM(0xfe700040)
- #define R8A7779_SCU_BASE 0xf0000000
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index 591052799e8f..fea53d57fd1e 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -18,9 +18,9 @@
- #include <linux/smp.h>
- #include <linux/io.h>
- #include <asm/smp_plat.h>
--#include <mach/common.h>
- #include <mach/pm-rcar.h>
- #include <mach/r8a7790.h>
-+#include "common.h"
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index ec979529f30f..bf88c66b3c18 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -18,9 +18,9 @@
- #include <linux/smp.h>
- #include <linux/io.h>
- #include <asm/smp_plat.h>
--#include <mach/common.h>
- #include <mach/r8a7791.h>
- #include <mach/rcar-gen2.h>
-+#include "common.h"
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
-diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
-index 13ba36a6831f..bf4aff99ed1c 100644
---- a/arch/arm/mach-shmobile/smp-sh73a0.c
-+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
-@@ -22,10 +22,10 @@
- #include <linux/smp.h>
- #include <linux/io.h>
- #include <linux/delay.h>
--#include <mach/common.h>
- #include <mach/sh73a0.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_twd.h>
-+#include "common.h"
-
- #define WUPCR IOMEM(0xe6151010)
- #define SRESCR IOMEM(0xe6151018)
---
-2.1.2
-
diff --git a/patches.renesas/0820-ARM-shmobile-Move-pm-rmobile.h-cleanup-sh73xx.h.patch b/patches.renesas/0820-ARM-shmobile-Move-pm-rmobile.h-cleanup-sh73xx.h.patch
deleted file mode 100644
index ff571a5c60535..0000000000000
--- a/patches.renesas/0820-ARM-shmobile-Move-pm-rmobile.h-cleanup-sh73xx.h.patch
+++ /dev/null
@@ -1,169 +0,0 @@
-From 6b3f8f431e744032334ca44993cfb3b4e2b10c3e Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:45 +0900
-Subject: ARM: shmobile: Move pm-rmobile.h, cleanup sh73xx.h
-
-Change location of pm-rmobile.h so it can be used as #include "pm-rmobile.h"
-instead of the old style #include <mach/pm-rmobile.h>. Also clean up
-the sh7372 and sh73a0 header files to get rid of unused include files.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6b8b0cb477b3e77721982effae3415f3c5f58fee)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 1 +
- arch/arm/mach-shmobile/board-mackerel.c | 2 ++
- arch/arm/mach-shmobile/include/mach/r8a7740.h | 2 --
- arch/arm/mach-shmobile/include/mach/sh7372.h | 4 ----
- arch/arm/mach-shmobile/pm-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/pm-rmobile.c | 2 +-
- arch/arm/mach-shmobile/{include/mach => }/pm-rmobile.h | 0
- arch/arm/mach-shmobile/pm-sh7372.c | 2 +-
- arch/arm/mach-shmobile/setup-r8a7740.c | 2 +-
- arch/arm/mach-shmobile/setup-sh7372.c | 1 +
- 10 files changed, 8 insertions(+), 10 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/pm-rmobile.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 93d92b4409bd..284877ae9c83 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -61,6 +61,7 @@
- #include <sound/simple_card.h>
- #include "common.h"
- #include "irqs.h"
-+#include "pm-rmobile.h"
- #include "sh-gpio.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 3558ff0f834a..0ece865cbc4d 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -47,6 +47,7 @@
- #include <linux/regulator/fixed.h>
- #include <linux/regulator/machine.h>
- #include <linux/smsc911x.h>
-+#include <linux/sh_clk.h>
- #include <linux/tca6416_keypad.h>
- #include <linux/usb/renesas_usbhs.h>
- #include <linux/dma-mapping.h>
-@@ -62,6 +63,7 @@
- #include <asm/mach-types.h>
- #include "common.h"
- #include "irqs.h"
-+#include "pm-rmobile.h"
- #include "sh-gpio.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/include/mach/r8a7740.h
-index 5e3c9ec06303..1d1a5fd78b6b 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7740.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7740.h
-@@ -19,8 +19,6 @@
- #ifndef __ASM_R8A7740_H__
- #define __ASM_R8A7740_H__
-
--#include <mach/pm-rmobile.h>
--
- /*
- * MD_CKx pin
- */
-diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/include/mach/sh7372.h
-index 854a9f0ca040..4ad960d5075b 100644
---- a/arch/arm/mach-shmobile/include/mach/sh7372.h
-+++ b/arch/arm/mach-shmobile/include/mach/sh7372.h
-@@ -11,10 +11,6 @@
- #ifndef __ASM_SH7372_H__
- #define __ASM_SH7372_H__
-
--#include <linux/sh_clk.h>
--#include <linux/pm_domain.h>
--#include <mach/pm-rmobile.h>
--
- /* DMA slave IDs */
- enum {
- SHDMA_SLAVE_INVALID,
-diff --git a/arch/arm/mach-shmobile/pm-r8a7740.c b/arch/arm/mach-shmobile/pm-r8a7740.c
-index a8a0d0506f13..a0d44d537fa0 100644
---- a/arch/arm/mach-shmobile/pm-r8a7740.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7740.c
-@@ -10,8 +10,8 @@
- */
- #include <linux/console.h>
- #include <linux/suspend.h>
--#include <mach/pm-rmobile.h>
- #include "common.h"
-+#include "pm-rmobile.h"
-
- #ifdef CONFIG_PM
- static int r8a7740_pd_a4s_suspend(void)
-diff --git a/arch/arm/mach-shmobile/pm-rmobile.c b/arch/arm/mach-shmobile/pm-rmobile.c
-index f710235aff2f..ebdd16e94a84 100644
---- a/arch/arm/mach-shmobile/pm-rmobile.c
-+++ b/arch/arm/mach-shmobile/pm-rmobile.c
-@@ -17,7 +17,7 @@
- #include <linux/pm.h>
- #include <linux/pm_clock.h>
- #include <asm/io.h>
--#include <mach/pm-rmobile.h>
-+#include "pm-rmobile.h"
-
- /* SYSC */
- #define SPDCR IOMEM(0xe6180008)
-diff --git a/arch/arm/mach-shmobile/include/mach/pm-rmobile.h b/arch/arm/mach-shmobile/pm-rmobile.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/pm-rmobile.h
-rename to arch/arm/mach-shmobile/pm-rmobile.h
-diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
-index 0b1b4deca03e..7ef9a0126780 100644
---- a/arch/arm/mach-shmobile/pm-sh7372.c
-+++ b/arch/arm/mach-shmobile/pm-sh7372.c
-@@ -26,8 +26,8 @@
- #include <asm/tlbflush.h>
- #include <asm/suspend.h>
- #include <mach/sh7372.h>
--#include <mach/pm-rmobile.h>
- #include "common.h"
-+#include "pm-rmobile.h"
-
- /* DBG */
- #define DBGREG1 IOMEM(0xe6100020)
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index d86a128206b3..10170b3560c2 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -32,7 +32,6 @@
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
- #include <mach/r8a7740.h>
--#include <mach/pm-rmobile.h>
- #include <asm/mach-types.h>
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
-@@ -40,6 +39,7 @@
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-+#include "pm-rmobile.h"
-
- static struct map_desc r8a7740_io_desc[] __initdata = {
- /*
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 8da836a373fe..5571f867c611 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -41,6 +41,7 @@
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-+#include "pm-rmobile.h"
-
- static struct map_desc sh7372_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
---
-2.1.2
-
diff --git a/patches.renesas/0821-ARM-shmobile-Move-pm-rcar.h-cleanup-r8a7779-case.patch b/patches.renesas/0821-ARM-shmobile-Move-pm-rcar.h-cleanup-r8a7779-case.patch
deleted file mode 100644
index 982d1145746a1..0000000000000
--- a/patches.renesas/0821-ARM-shmobile-Move-pm-rcar.h-cleanup-r8a7779-case.patch
+++ /dev/null
@@ -1,162 +0,0 @@
-From 3fdc0633f47ef455eb0beb1051c94c910860f4e3 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:47:53 +0900
-Subject: ARM: shmobile: Move pm-rcar.h, cleanup r8a7779 case
-
-Change location of pm-rcar.h so it can be used as #include "pm-rcar.h"
-instead of the old style #include <mach/pm-rcar.h>. Also clean up
-the r8a7779 case to move some unused header file cruft into a C
-file.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 585c09df3738d4f72cee36eb0b975351fd9a339a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r8a7779.h | 12 ------------
- arch/arm/mach-shmobile/pm-r8a7779.c | 13 ++++++++++++-
- arch/arm/mach-shmobile/pm-r8a7790.c | 2 +-
- arch/arm/mach-shmobile/pm-rcar.c | 2 +-
- arch/arm/mach-shmobile/{include/mach => }/pm-rcar.h | 0
- arch/arm/mach-shmobile/smp-r8a7779.c | 2 +-
- arch/arm/mach-shmobile/smp-r8a7790.c | 2 +-
- 7 files changed, 16 insertions(+), 17 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/pm-rcar.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-index 88eeceaf1088..def10a29e09a 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-@@ -2,8 +2,6 @@
- #define __ASM_R8A7779_H__
-
- #include <linux/sh_clk.h>
--#include <linux/pm_domain.h>
--#include <mach/pm-rcar.h>
-
- /* HPB-DMA slave IDs */
- enum {
-@@ -12,16 +10,6 @@ enum {
- HPBDMA_SLAVE_SDHI0_RX,
- };
-
--struct r8a7779_pm_domain {
-- struct generic_pm_domain genpd;
-- struct rcar_sysc_ch ch;
--};
--
--static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
--{
-- return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
--}
--
- extern void r8a7779_init_delay(void);
- extern void r8a7779_init_irq_extpin(int irlm);
- extern void r8a7779_init_irq_extpin_dt(int irlm);
-diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c
-index 2b79bacd9dcb..f0f36cb5ffe7 100644
---- a/arch/arm/mach-shmobile/pm-r8a7779.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7779.c
-@@ -13,20 +13,31 @@
- #include <linux/suspend.h>
- #include <linux/err.h>
- #include <linux/pm_clock.h>
-+#include <linux/pm_domain.h>
- #include <linux/platform_device.h>
- #include <linux/delay.h>
- #include <linux/irq.h>
- #include <linux/interrupt.h>
- #include <linux/console.h>
- #include <asm/io.h>
--#include <mach/pm-rcar.h>
- #include <mach/r8a7779.h>
- #include "common.h"
-+#include "pm-rcar.h"
-
- /* SYSC */
- #define SYSCIER 0x0c
- #define SYSCIMR 0x10
-
-+struct r8a7779_pm_domain {
-+ struct generic_pm_domain genpd;
-+ struct rcar_sysc_ch ch;
-+};
-+
-+static inline struct rcar_sysc_ch *to_r8a7779_ch(struct generic_pm_domain *d)
-+{
-+ return &container_of(d, struct r8a7779_pm_domain, genpd)->ch;
-+}
-+
- #if defined(CONFIG_PM) || defined(CONFIG_SMP)
-
- static void __init r8a7779_sysc_init(void)
-diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
-index fc82839e2c2a..0f1090d851e7 100644
---- a/arch/arm/mach-shmobile/pm-r8a7790.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
-@@ -12,8 +12,8 @@
-
- #include <linux/kernel.h>
- #include <asm/io.h>
--#include <mach/pm-rcar.h>
- #include <mach/r8a7790.h>
-+#include "pm-rcar.h"
-
- /* SYSC */
- #define SYSCIER 0x0c
-diff --git a/arch/arm/mach-shmobile/pm-rcar.c b/arch/arm/mach-shmobile/pm-rcar.c
-index 1f465a12d1b1..34b8a5674f85 100644
---- a/arch/arm/mach-shmobile/pm-rcar.c
-+++ b/arch/arm/mach-shmobile/pm-rcar.c
-@@ -13,7 +13,7 @@
- #include <linux/mm.h>
- #include <linux/spinlock.h>
- #include <asm/io.h>
--#include <mach/pm-rcar.h>
-+#include "pm-rcar.h"
-
- /* SYSC */
- #define SYSCSR 0x00
-diff --git a/arch/arm/mach-shmobile/include/mach/pm-rcar.h b/arch/arm/mach-shmobile/pm-rcar.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/pm-rcar.h
-rename to arch/arm/mach-shmobile/pm-rcar.h
-diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
-index e063cd29c30f..c230fc0c3fef 100644
---- a/arch/arm/mach-shmobile/smp-r8a7779.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
-@@ -23,13 +23,13 @@
- #include <linux/spinlock.h>
- #include <linux/io.h>
- #include <linux/delay.h>
--#include <mach/pm-rcar.h>
- #include <mach/r8a7779.h>
- #include <asm/cacheflush.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_scu.h>
- #include <asm/smp_twd.h>
- #include "common.h"
-+#include "pm-rcar.h"
-
- #define AVECR IOMEM(0xfe700040)
- #define R8A7779_SCU_BASE 0xf0000000
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index fea53d57fd1e..a8ace58c3dd2 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -18,9 +18,9 @@
- #include <linux/smp.h>
- #include <linux/io.h>
- #include <asm/smp_plat.h>
--#include <mach/pm-rcar.h>
- #include <mach/r8a7790.h>
- #include "common.h"
-+#include "pm-rcar.h"
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
---
-2.1.2
-
diff --git a/patches.renesas/0822-ARM-shmobile-Move-rcar-gen2.h-cleanup-r8a7790-case.patch b/patches.renesas/0822-ARM-shmobile-Move-rcar-gen2.h-cleanup-r8a7790-case.patch
deleted file mode 100644
index 9d10966b71aba..0000000000000
--- a/patches.renesas/0822-ARM-shmobile-Move-rcar-gen2.h-cleanup-r8a7790-case.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-From 389e02175b51170c3ec635b163cb39c61c9b87b2 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 17 Jun 2014 16:48:01 +0900
-Subject: ARM: shmobile: Move rcar-gen2.h, cleanup r8a7790 case
-
-Change location of rcar-gen2.h so it can be used as #include "rcar-gen2.h"
-instead of the old style #include <mach/rcar-gen2.h>. Also clean up
-the r8a7790 case to follow the same style as r8a7791.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 62872989bdbf1245d7239b9f4c05a8ee7c775ed5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 2 +-
- arch/arm/mach-shmobile/board-koelsch.c | 2 +-
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- arch/arm/mach-shmobile/board-lager.c | 1 +
- arch/arm/mach-shmobile/clock-r8a7790.c | 1 +
- arch/arm/mach-shmobile/clock-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/include/mach/r8a7790.h | 2 --
- arch/arm/mach-shmobile/{include/mach => }/rcar-gen2.h | 0
- arch/arm/mach-shmobile/setup-r8a7790.c | 1 +
- arch/arm/mach-shmobile/setup-r8a7791.c | 2 +-
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
- arch/arm/mach-shmobile/smp-r8a7791.c | 2 +-
- 12 files changed, 10 insertions(+), 9 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/rcar-gen2.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 10fd0858c98c..1d3f67d4ccd6 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -23,12 +23,12 @@
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/rcar-gen2.h>
- #include <mach/r8a7791.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
- #include "common.h"
- #include "irqs.h"
-+#include "rcar-gen2.h"
-
- /* DU */
- static struct rcar_du_encoder_data koelsch_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 1d8b6e6bebdb..0d44e7eb6508 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -46,11 +46,11 @@
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
- #include <mach/r8a7791.h>
--#include <mach/rcar-gen2.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include "common.h"
- #include "irqs.h"
-+#include "rcar-gen2.h"
-
- /* DU */
- static struct rcar_du_encoder_data koelsch_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 6e1a2618a8d1..4f0af91ebc81 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -22,12 +22,12 @@
- #include <linux/init.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/rcar-gen2.h>
- #include <mach/r8a7790.h>
- #include <asm/mach/arch.h>
- #include "clock.h"
- #include "common.h"
- #include "irqs.h"
-+#include "rcar-gen2.h"
-
- /* DU */
- static struct rcar_du_encoder_data lager_du_encoders[] = {
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index f0249ca237eb..83bbb5c48863 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -58,6 +58,7 @@
- #include <sound/simple_card.h>
- #include "common.h"
- #include "irqs.h"
-+#include "rcar-gen2.h"
-
- /*
- * SSI-AK4643
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index b6781a0ea747..ca980669806f 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -25,6 +25,7 @@
- #include <mach/r8a7790.h>
- #include "clock.h"
- #include "common.h"
-+#include "rcar-gen2.h"
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 494aaf69461a..10e193d707f5 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -23,9 +23,9 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/rcar-gen2.h>
- #include "clock.h"
- #include "common.h"
-+#include "rcar-gen2.h"
-
- /*
- * MD EXTAL PLL0 PLL1 PLL3
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-index 0b95babe84ba..d7555440fc7b 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-@@ -1,8 +1,6 @@
- #ifndef __ASM_R8A7790_H__
- #define __ASM_R8A7790_H__
-
--#include <mach/rcar-gen2.h>
--
- /* DMA slave IDs */
- enum {
- RCAR_DMA_SLAVE_INVALID,
-diff --git a/arch/arm/mach-shmobile/include/mach/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/rcar-gen2.h
-rename to arch/arm/mach-shmobile/rcar-gen2.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 7bbe5c05d2a5..4212c8de987a 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -31,6 +31,7 @@
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-+#include "rcar-gen2.h"
-
- /* Audio-DMAC */
- #define AUDIO_DMAC_SLAVE(_id, _addr, t, r) \
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 6d8c61f42895..f554cda4a96a 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -27,10 +27,10 @@
- #include <linux/serial_sci.h>
- #include <linux/sh_timer.h>
- #include <mach/r8a7791.h>
--#include <mach/rcar-gen2.h>
- #include <asm/mach/arch.h>
- #include "common.h"
- #include "irqs.h"
-+#include "rcar-gen2.h"
-
- static const struct resource pfc_resources[] __initconst = {
- DEFINE_RES_MEM(0xe6060000, 0x250),
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index 1c41227bb770..fdc714ebc4cd 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -22,9 +22,9 @@
- #include <linux/clocksource.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
--#include <mach/rcar-gen2.h>
- #include <asm/mach/arch.h>
- #include "common.h"
-+#include "rcar-gen2.h"
-
- #define MODEMR 0xe6160060
-
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index bf88c66b3c18..2648d68650e4 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -19,8 +19,8 @@
- #include <linux/io.h>
- #include <asm/smp_plat.h>
- #include <mach/r8a7791.h>
--#include <mach/rcar-gen2.h>
- #include "common.h"
-+#include "rcar-gen2.h"
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
---
-2.1.2
-
diff --git a/patches.renesas/0823-ARM-shmobile-Update-EMEV2-DTS-to-include-CPU-frequen.patch b/patches.renesas/0823-ARM-shmobile-Update-EMEV2-DTS-to-include-CPU-frequen.patch
deleted file mode 100644
index 4f590c11192ba..0000000000000
--- a/patches.renesas/0823-ARM-shmobile-Update-EMEV2-DTS-to-include-CPU-frequen.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From eae46be0d5018cc62755b67efe8f541a37c619a0 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 5 Jun 2014 14:31:56 +0900
-Subject: ARM: shmobile: Update EMEV2 DTS to include CPU frequency
-
-Add CPU Frequency information to the EMEV2 DTS file. This
-will allow us to use the shared C code to on EMEV2 which
-reads out the clock frequency from DT and calculates the
-delay settings from there.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 11f1ca10b668995a031aade5c2728f0a251aaec7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/emev2.dtsi | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/boot/dts/emev2.dtsi b/arch/arm/boot/dts/emev2.dtsi
-index e37985fa10e2..00eeed3721b6 100644
---- a/arch/arm/boot/dts/emev2.dtsi
-+++ b/arch/arm/boot/dts/emev2.dtsi
-@@ -31,11 +31,13 @@
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <0>;
-+ clock-frequency = <533000000>;
- };
- cpu@1 {
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <1>;
-+ clock-frequency = <533000000>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0824-ARM-shmobile-Use-shmobile_init_delay-on-EMEV2.patch b/patches.renesas/0824-ARM-shmobile-Use-shmobile_init_delay-on-EMEV2.patch
deleted file mode 100644
index c7f40194f6502..0000000000000
--- a/patches.renesas/0824-ARM-shmobile-Use-shmobile_init_delay-on-EMEV2.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From fd3454443b7e542cae6e8d1c23f6a466b57ed5eb Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 5 Jun 2014 14:32:04 +0900
-Subject: ARM: shmobile: Use shmobile_init_delay() on EMEV2
-
-Adjust EMEV2 to use shmobile_init_delay() together with
-CPU Frequency settings from the DTS.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ef9026e6879da358376b58fc63fe7a82f07404ad)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-emev2.c | 7 +------
- 1 file changed, 1 insertion(+), 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
-index 6e4ffa74dad4..e10d34e24817 100644
---- a/arch/arm/mach-shmobile/setup-emev2.c
-+++ b/arch/arm/mach-shmobile/setup-emev2.c
-@@ -42,11 +42,6 @@ static void __init emev2_map_io(void)
- iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
- }
-
--static void __init emev2_init_delay(void)
--{
-- shmobile_setup_delay(533, 1, 3); /* Cortex-A9 @ 533MHz */
--}
--
- static void __init emev2_add_standard_devices_dt(void)
- {
- of_clk_init(NULL);
-@@ -63,7 +58,7 @@ extern struct smp_operations emev2_smp_ops;
- DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
- .smp = smp_ops(emev2_smp_ops),
- .map_io = emev2_map_io,
-- .init_early = emev2_init_delay,
-+ .init_early = shmobile_init_delay,
- .init_machine = emev2_add_standard_devices_dt,
- .init_late = shmobile_init_late,
- .dt_compat = emev2_boards_compat_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0825-ARM-shmobile-r8a7779-Add-clocks.patch b/patches.renesas/0825-ARM-shmobile-r8a7779-Add-clocks.patch
deleted file mode 100644
index 504a997d1fc19..0000000000000
--- a/patches.renesas/0825-ARM-shmobile-r8a7779-Add-clocks.patch
+++ /dev/null
@@ -1,180 +0,0 @@
-From 94d9cf31aaa444284affca1dd57647945972fc3d Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:31:57 +0900
-Subject: ARM: shmobile: r8a7779: Add clocks
-
-Declare all core and MSTP clocks currently used by r8a7779-based boards.
-
-Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoCs.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1e8515384bfa5efa5803a38c5ba7fecd6514c527)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 144 +++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 144 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index b517c8e6b420..5a62970f9a12 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -11,6 +11,7 @@
-
- /include/ "skeleton.dtsi"
-
-+#include <dt-bindings/clock/r8a7779-clock.h>
- #include <dt-bindings/interrupt-controller/irq.h>
-
- / {
-@@ -265,4 +266,147 @@
- #size-cells = <0>;
- status = "disabled";
- };
-+
-+ clocks {
-+ #address-cells = <2>;
-+ #size-cells = <2>;
-+ ranges;
-+
-+ /* External root clock */
-+ extal_clk: extal_clk {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ /* This value must be overriden by the board. */
-+ clock-frequency = <0>;
-+ clock-output-names = "extal";
-+ };
-+
-+ /* Special CPG clocks */
-+ cpg_clocks: cpg_clocks@0xe6150000 {
-+ compatible = "renesas,r8a7779-cpg-clocks";
-+ reg = <0 0xffc80000 0 0x30>;
-+ clocks = <&extal_clk>;
-+ #clock-cells = <1>;
-+ clock-output-names = "plla", "z", "zs", "s",
-+ "s1", "p", "b", "out";
-+ };
-+
-+ /* Fixed factor clocks */
-+ i_clk: i_clk {
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R8A7779_CLK_PLLA>;
-+ #clock-cells = <0>;
-+ clock-div = <2>;
-+ clock-mult = <1>;
-+ clock-output-names = "i";
-+ };
-+ s3_clk: s3_clk {
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R8A7779_CLK_PLLA>;
-+ #clock-cells = <0>;
-+ clock-div = <8>;
-+ clock-mult = <1>;
-+ clock-output-names = "s3";
-+ };
-+ s4_clk: s4_clk {
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R8A7779_CLK_PLLA>;
-+ #clock-cells = <0>;
-+ clock-div = <16>;
-+ clock-mult = <1>;
-+ clock-output-names = "s4";
-+ };
-+ g_clk: g_clk {
-+ compatible = "fixed-factor-clock";
-+ clocks = <&cpg_clocks R8A7779_CLK_PLLA>;
-+ #clock-cells = <0>;
-+ clock-div = <24>;
-+ clock-mult = <1>;
-+ clock-output-names = "g";
-+ };
-+
-+ /* Gate clocks */
-+ mstp0_clks: mstp0_clks {
-+ compatible = "renesas,r8a7779-mstp-clocks",
-+ "renesas,cpg-mstp-clocks";
-+ reg = <0 0xffc80030 0 4>;
-+ clocks = <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_S1>,
-+ <&cpg_clocks R8A7779_CLK_S1>,
-+ <&cpg_clocks R8A7779_CLK_S1>,
-+ <&cpg_clocks R8A7779_CLK_S1>,
-+ <&cpg_clocks R8A7779_CLK_S1>,
-+ <&cpg_clocks R8A7779_CLK_S1>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>;
-+ #clock-cells = <1>;
-+ renesas,clock-indices = <
-+ R8A7779_CLK_HSPI R8A7779_CLK_TMU2
-+ R8A7779_CLK_TMU1 R8A7779_CLK_TMU0
-+ R8A7779_CLK_HSCIF1 R8A7779_CLK_HSCIF0
-+ R8A7779_CLK_SCIF5 R8A7779_CLK_SCIF4
-+ R8A7779_CLK_SCIF3 R8A7779_CLK_SCIF2
-+ R8A7779_CLK_SCIF1 R8A7779_CLK_SCIF0
-+ R8A7779_CLK_I2C3 R8A7779_CLK_I2C2
-+ R8A7779_CLK_I2C1 R8A7779_CLK_I2C0
-+ >;
-+ clock-output-names =
-+ "hspi", "tmu2", "tmu1", "tmu0", "hscif1",
-+ "hscif0", "scif5", "scif4", "scif3", "scif2",
-+ "scif1", "scif0", "i2c3", "i2c2", "i2c1",
-+ "i2c0";
-+ };
-+ mstp1_clks: mstp1_clks {
-+ compatible = "renesas,r8a7779-mstp-clocks",
-+ "renesas,cpg-mstp-clocks";
-+ reg = <0 0xffc80034 0 4>, <0 0xffc80044 0 4>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_S>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_P>,
-+ <&cpg_clocks R8A7779_CLK_S>;
-+ #clock-cells = <1>;
-+ renesas,clock-indices = <
-+ R8A7779_CLK_USB01 R8A7779_CLK_USB2
-+ R8A7779_CLK_DU R8A7779_CLK_VIN2
-+ R8A7779_CLK_VIN1 R8A7779_CLK_VIN0
-+ R8A7779_CLK_ETHER R8A7779_CLK_SATA
-+ R8A7779_CLK_PCIE R8A7779_CLK_VIN3
-+ >;
-+ clock-output-names =
-+ "usb01", "usb2",
-+ "du", "vin2",
-+ "vin1", "vin0",
-+ "ether", "sata",
-+ "pcie", "vin3";
-+ };
-+ mstp3_clks: mstp3_clks {
-+ compatible = "renesas,r8a7779-mstp-clocks",
-+ "renesas,cpg-mstp-clocks";
-+ reg = <0 0xffc8003c 0 4>;
-+ clocks = <&s4_clk>, <&s4_clk>, <&s4_clk>, <&s4_clk>,
-+ <&s4_clk>, <&s4_clk>;
-+ #clock-cells = <1>;
-+ renesas,clock-indices = <
-+ R8A7779_CLK_SDHI3 R8A7779_CLK_SDHI2
-+ R8A7779_CLK_SDHI1 R8A7779_CLK_SDHI0
-+ R8A7779_CLK_MMC1 R8A7779_CLK_MMC0
-+ >;
-+ clock-output-names =
-+ "sdhi3", "sdhi2", "sdhi1", "sdhi0",
-+ "mmc1", "mmc0";
-+ };
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0826-ARM-shmobile-Sync-Marzen-DTS-with-Marzen-reference-D.patch b/patches.renesas/0826-ARM-shmobile-Sync-Marzen-DTS-with-Marzen-reference-D.patch
deleted file mode 100644
index 7603c67dc6abe..0000000000000
--- a/patches.renesas/0826-ARM-shmobile-Sync-Marzen-DTS-with-Marzen-reference-D.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From f5186c90ab624a8c0bb75f6689ffab19299f7ee8 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:31:58 +0900
-Subject: ARM: shmobile: Sync Marzen DTS with Marzen reference DTS
-
-Copy the device nodes from Marzen reference into the Marzen device tree
-file. This will allow us to use a single DTS file regardless of kernel
-configuration. In case of legacy C board code the device nodes may or
-may not be used, but in the multiplatform case all the DT device nodes
-will be used.
-
-Based on a similar change for the Lager board by Laurent Pinchart.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bedd672409d68c98e717ac79f58b0ba155879275)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen.dts | 94 ++++++++++++++++++++++++++++++++++++
- 1 file changed, 94 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
-index ee2338838b3f..cf90d2db64b7 100644
---- a/arch/arm/boot/dts/r8a7779-marzen.dts
-+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
-@@ -11,6 +11,8 @@
-
- /dts-v1/;
- #include "r8a7779.dtsi"
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/interrupt-controller/irq.h>
-
- / {
- model = "marzen";
-@@ -24,4 +26,96 @@
- device_type = "memory";
- reg = <0x60000000 0x40000000>;
- };
-+
-+ fixedregulator3v3: fixedregulator@0 {
-+ compatible = "regulator-fixed";
-+ regulator-name = "fixed-3.3V";
-+ regulator-min-microvolt = <3300000>;
-+ regulator-max-microvolt = <3300000>;
-+ regulator-boot-on;
-+ regulator-always-on;
-+ };
-+
-+ lan0@18000000 {
-+ compatible = "smsc,lan9220", "smsc,lan9115";
-+ reg = <0x18000000 0x100>;
-+ pinctrl-0 = <&lan0_pins>;
-+ pinctrl-names = "default";
-+
-+ phy-mode = "mii";
-+ interrupt-parent = <&irqpin0>;
-+ interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
-+ smsc,irq-push-pull;
-+ reg-io-width = <4>;
-+ vddvario-supply = <&fixedregulator3v3>;
-+ vdd33a-supply = <&fixedregulator3v3>;
-+ };
-+
-+ leds {
-+ compatible = "gpio-leds";
-+ led2 {
-+ gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
-+ };
-+ led3 {
-+ gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
-+ };
-+ led4 {
-+ gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
-+ };
-+ };
-+};
-+
-+&irqpin0 {
-+ status = "okay";
-+};
-+
-+&pfc {
-+ pinctrl-0 = <&scif2_pins &scif4_pins>;
-+ pinctrl-names = "default";
-+
-+ lan0_pins: lan0 {
-+ intc {
-+ renesas,groups = "intc_irq1_b";
-+ renesas,function = "intc";
-+ };
-+ lbsc {
-+ renesas,groups = "lbsc_ex_cs0";
-+ renesas,function = "lbsc";
-+ };
-+ };
-+
-+ scif2_pins: serial2 {
-+ renesas,groups = "scif2_data_c";
-+ renesas,function = "scif2";
-+ };
-+
-+ scif4_pins: serial4 {
-+ renesas,groups = "scif4_data";
-+ renesas,function = "scif4";
-+ };
-+
-+ sdhi0_pins: sd0 {
-+ renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd";
-+ renesas,function = "sdhi0";
-+ };
-+
-+ hspi0_pins: hspi0 {
-+ renesas,groups = "hspi0";
-+ renesas,function = "hspi0";
-+ };
-+};
-+
-+&sdhi0 {
-+ pinctrl-0 = <&sdhi0_pins>;
-+ pinctrl-names = "default";
-+
-+ vmmc-supply = <&fixedregulator3v3>;
-+ bus-width = <4>;
-+ status = "okay";
-+};
-+
-+&hspi0 {
-+ pinctrl-0 = <&hspi0_pins>;
-+ pinctrl-names = "default";
-+ status = "okay";
- };
---
-2.1.2
-
diff --git a/patches.renesas/0827-ARM-shmobile-marzen-Specify-external-clock-frequency.patch b/patches.renesas/0827-ARM-shmobile-marzen-Specify-external-clock-frequency.patch
deleted file mode 100644
index 09369a5440d08..0000000000000
--- a/patches.renesas/0827-ARM-shmobile-marzen-Specify-external-clock-frequency.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 191635b7c38969d43cc04d7c9ee9c0199a1e61b1 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:31:59 +0900
-Subject: ARM: shmobile: marzen: Specify external clock frequency in DT
-
-The external crystal frequency is 31.25 on the Marzen board.
-Specify it in the device tree.
-
-Based on work for the Lager board by Laurent Pinchart.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 954e42cf541b3cbb8dd07ba29f5974f91cb8c248)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
-index cf90d2db64b7..321290828eee 100644
---- a/arch/arm/boot/dts/r8a7779-marzen.dts
-+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
-@@ -69,6 +69,10 @@
- status = "okay";
- };
-
-+&extal_clk {
-+ clock-frequency = <31250000>;
-+};
-+
- &pfc {
- pinctrl-0 = <&scif2_pins &scif4_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0828-ARM-shmobile-r8a7779-Reference-clocks.patch b/patches.renesas/0828-ARM-shmobile-r8a7779-Reference-clocks.patch
deleted file mode 100644
index 5a15b41c5f0d1..0000000000000
--- a/patches.renesas/0828-ARM-shmobile-r8a7779-Reference-clocks.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 05736a67166e1f8449a2f56ab12a5cb3be4112c1 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:00 +0900
-Subject: ARM: shmobile: r8a7779: Reference clocks
-
-Reference clocks using a "clocks" property in all nodes corresponding to
-devices that require a clock.
-
-Based on work by Laurent Pinchart for the r8a7790 and r8a7791 SoC.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3325cbe8ab74731c88e70d172ffef74cbca13f18)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 12 ++++++++++++
- 1 file changed, 12 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index 5a62970f9a12..bdaaadcfa1f1 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -158,6 +158,7 @@
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc70000 0x1000>;
- interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7779_CLK_I2C0>;
- status = "disabled";
- };
-
-@@ -167,6 +168,7 @@
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc71000 0x1000>;
- interrupts = <0 82 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7779_CLK_I2C1>;
- status = "disabled";
- };
-
-@@ -176,6 +178,7 @@
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc72000 0x1000>;
- interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7779_CLK_I2C2>;
- status = "disabled";
- };
-
-@@ -185,6 +188,7 @@
- compatible = "renesas,i2c-r8a7779";
- reg = <0xffc73000 0x1000>;
- interrupts = <0 81 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp0_clks R8A7779_CLK_I2C3>;
- status = "disabled";
- };
-
-@@ -202,12 +206,14 @@
- compatible = "renesas,rcar-sata";
- reg = <0xfc600000 0x2000>;
- interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp1_clks R8A7779_CLK_SATA>;
- };
-
- sdhi0: sd@ffe4c000 {
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4c000 0x100>;
- interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7779_CLK_SDHI0>;
- cap-sd-highspeed;
- cap-sdio-irq;
- status = "disabled";
-@@ -217,6 +223,7 @@
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4d000 0x100>;
- interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7779_CLK_SDHI1>;
- cap-sd-highspeed;
- cap-sdio-irq;
- status = "disabled";
-@@ -226,6 +233,7 @@
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4e000 0x100>;
- interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7779_CLK_SDHI2>;
- cap-sd-highspeed;
- cap-sdio-irq;
- status = "disabled";
-@@ -235,6 +243,7 @@
- compatible = "renesas,sdhi-r8a7779";
- reg = <0xffe4f000 0x100>;
- interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7779_CLK_SDHI3>;
- cap-sd-highspeed;
- cap-sdio-irq;
- status = "disabled";
-@@ -246,6 +255,7 @@
- interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-+ clocks = <&mstp0_clks R8A7779_CLK_HSPI>;
- status = "disabled";
- };
-
-@@ -255,6 +265,7 @@
- interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-+ clocks = <&mstp0_clks R8A7779_CLK_HSPI>;
- status = "disabled";
- };
-
-@@ -264,6 +275,7 @@
- interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
- #address-cells = <1>;
- #size-cells = <0>;
-+ clocks = <&mstp0_clks R8A7779_CLK_HSPI>;
- status = "disabled";
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0829-ARM-shmobile-r8a7791-SYSC-setup-code.patch b/patches.renesas/0829-ARM-shmobile-r8a7791-SYSC-setup-code.patch
deleted file mode 100644
index a179aa44385eb..0000000000000
--- a/patches.renesas/0829-ARM-shmobile-r8a7791-SYSC-setup-code.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 384497a7052cdb37230877edd93230dcae176ca7 Mon Sep 17 00:00:00 2001
-From: keita kobayashi <keita.kobayashi.ym@renesas.com>
-Date: Fri, 30 May 2014 14:18:48 +0900
-Subject: ARM: shmobile: r8a7791 SYSC setup code
-
-Add r8a7791 SYSC power management support.
-
-Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-[horms+renesas@verge.net.au: rebased]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 5f6108bb9643949bf5ec0bc9f5cbde588c542c7f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 1 +
- arch/arm/mach-shmobile/include/mach/r8a7791.h | 1 +
- arch/arm/mach-shmobile/pm-r8a7791.c | 47 +++++++++++++++++++++++++++
- arch/arm/mach-shmobile/smp-r8a7791.c | 2 ++
- 4 files changed, 51 insertions(+)
- create mode 100644 arch/arm/mach-shmobile/pm-r8a7791.c
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 1b966da2c81c..efe4dd295f39 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -54,6 +54,7 @@ obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
- obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
- obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
- obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o
-+obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o
-
- # Board objects
- ifdef CONFIG_ARCH_SHMOBILE_MULTI
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/include/mach/r8a7791.h
-index 664274cc4b64..86eae7bceb6f 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7791.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7791.h
-@@ -5,6 +5,7 @@ void r8a7791_add_standard_devices(void);
- void r8a7791_add_dt_devices(void);
- void r8a7791_clock_init(void);
- void r8a7791_pinmux_init(void);
-+void r8a7791_pm_init(void);
- extern struct smp_operations r8a7791_smp_ops;
-
- #endif /* __ASM_R8A7791_H__ */
-diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
-new file mode 100644
-index 000000000000..15190875d507
---- /dev/null
-+++ b/arch/arm/mach-shmobile/pm-r8a7791.c
-@@ -0,0 +1,47 @@
-+/*
-+ * r8a7791 Power management support
-+ *
-+ * Copyright (C) 2014 Renesas Electronics Corporation
-+ * Copyright (C) 2011 Renesas Solutions Corp.
-+ * Copyright (C) 2011 Magnus Damm
-+ *
-+ * 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 <asm/io.h>
-+#include <linux/kernel.h>
-+#include <mach/r8a7791.h>
-+#include "pm-rcar.h"
-+
-+/* SYSC */
-+#define SYSCIER 0x0c
-+#define SYSCIMR 0x10
-+
-+#if defined(CONFIG_SMP)
-+
-+static void __init r8a7791_sysc_init(void)
-+{
-+ void __iomem *base = rcar_sysc_init(0xe6180000);
-+
-+ /* enable all interrupt sources, but do not use interrupt handler */
-+ iowrite32(0x0131000e, base + SYSCIER);
-+ iowrite32(0, base + SYSCIMR);
-+}
-+
-+#else /* CONFIG_SMP */
-+
-+static inline void r8a7791_sysc_init(void) {}
-+
-+#endif /* CONFIG_SMP */
-+
-+void __init r8a7791_pm_init(void)
-+{
-+ static int once;
-+
-+ if (once++)
-+ return;
-+
-+ r8a7791_sysc_init();
-+}
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index 2648d68650e4..17720860f0dd 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -50,6 +50,8 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
- writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
- p + CA15RESCNT);
- iounmap(p);
-+
-+ r8a7791_pm_init();
- }
-
- static int r8a7791_smp_boot_secondary(unsigned int cpu,
---
-2.1.2
-
diff --git a/patches.renesas/0830-ARM-shmobile-APMU-Add-Core-Standby-state-for-Suspend.patch b/patches.renesas/0830-ARM-shmobile-APMU-Add-Core-Standby-state-for-Suspend.patch
deleted file mode 100644
index ec920418bd2ef..0000000000000
--- a/patches.renesas/0830-ARM-shmobile-APMU-Add-Core-Standby-state-for-Suspend.patch
+++ /dev/null
@@ -1,142 +0,0 @@
-From 4af0f4878a58c3cc1e672dcede3f4db23278ca28 Mon Sep 17 00:00:00 2001
-From: keita kobayashi <keita.kobayashi.ym@renesas.com>
-Date: Thu, 29 May 2014 16:24:27 +0900
-Subject: ARM: shmobile: APMU: Add Core-Standby-state for Suspend to RAM
-
-This patch add Core-Standby-state for Suspend to RAM.
-
-Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-[horms+renesas@verge.net.au: rebase]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit d6d757c9a4e06e118fa5158fa74e03c514d862d2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/common.h | 2 ++
- arch/arm/mach-shmobile/platsmp-apmu.c | 60 ++++++++++++++++++++++++++++++++---
- 2 files changed, 58 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
-index 921a18ef4dfe..ab5a9b2886cf 100644
---- a/arch/arm/mach-shmobile/common.h
-+++ b/arch/arm/mach-shmobile/common.h
-@@ -35,8 +35,10 @@ extern void shmobile_cpuidle_set_driver(struct cpuidle_driver *drv);
-
- #ifdef CONFIG_SUSPEND
- int shmobile_suspend_init(void);
-+void shmobile_smp_apmu_suspend_init(void);
- #else
- static inline int shmobile_suspend_init(void) { return 0; }
-+static inline void shmobile_smp_apmu_suspend_init(void) { return 0; }
- #endif
-
- #ifdef CONFIG_CPU_IDLE
-diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index fe648f5d8f06..590e35c22a60 100644
---- a/arch/arm/mach-shmobile/platsmp-apmu.c
-+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
-@@ -7,15 +7,19 @@
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-+#include <linux/cpu_pm.h>
- #include <linux/delay.h>
- #include <linux/init.h>
- #include <linux/io.h>
- #include <linux/ioport.h>
- #include <linux/of_address.h>
- #include <linux/smp.h>
-+#include <linux/suspend.h>
- #include <asm/cacheflush.h>
- #include <asm/cp15.h>
-+#include <asm/proc-fns.h>
- #include <asm/smp_plat.h>
-+#include <asm/suspend.h>
- #include "common.h"
-
- static struct {
-@@ -141,7 +145,7 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
- return apmu_wrap(cpu, apmu_power_on);
- }
-
--#ifdef CONFIG_HOTPLUG_CPU
-+#if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND)
- /* nicked from arch/arm/mach-exynos/hotplug.c */
- static inline void cpu_enter_lowpower_a15(void)
- {
-@@ -172,16 +176,40 @@ static inline void cpu_enter_lowpower_a15(void)
- dsb();
- }
-
--void shmobile_smp_apmu_cpu_die(unsigned int cpu)
-+void shmobile_smp_apmu_cpu_shutdown(unsigned int cpu)
- {
-- /* For this particular CPU deregister boot vector */
-- shmobile_smp_hook(cpu, 0, 0);
-
- /* Select next sleep mode using the APMU */
- apmu_wrap(cpu, apmu_power_off);
-
- /* Do ARM specific CPU shutdown */
- cpu_enter_lowpower_a15();
-+}
-+
-+static inline void cpu_leave_lowpower(void)
-+{
-+ unsigned int v;
-+
-+ asm volatile("mrc p15, 0, %0, c1, c0, 0\n"
-+ " orr %0, %0, %1\n"
-+ " mcr p15, 0, %0, c1, c0, 0\n"
-+ " mrc p15, 0, %0, c1, c0, 1\n"
-+ " orr %0, %0, %2\n"
-+ " mcr p15, 0, %0, c1, c0, 1\n"
-+ : "=&r" (v)
-+ : "Ir" (CR_C), "Ir" (0x40)
-+ : "cc");
-+}
-+#endif
-+
-+#if defined(CONFIG_HOTPLUG_CPU)
-+void shmobile_smp_apmu_cpu_die(unsigned int cpu)
-+{
-+ /* For this particular CPU deregister boot vector */
-+ shmobile_smp_hook(cpu, 0, 0);
-+
-+ /* Shutdown CPU core */
-+ shmobile_smp_apmu_cpu_shutdown(cpu);
-
- /* jump to shared mach-shmobile sleep / reset code */
- shmobile_smp_sleep();
-@@ -192,3 +220,27 @@ int shmobile_smp_apmu_cpu_kill(unsigned int cpu)
- return apmu_wrap(cpu, apmu_power_off_poll);
- }
- #endif
-+
-+#if defined(CONFIG_SUSPEND)
-+static int shmobile_smp_apmu_do_suspend(unsigned long cpu)
-+{
-+ shmobile_smp_hook(cpu, virt_to_phys(cpu_resume), 0);
-+ shmobile_smp_apmu_cpu_shutdown(cpu);
-+ cpu_do_idle(); /* WFI selects Core Standby */
-+ return 1;
-+}
-+
-+static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
-+{
-+ cpu_suspend(smp_processor_id(), shmobile_smp_apmu_do_suspend);
-+ cpu_leave_lowpower();
-+ return 0;
-+}
-+
-+void shmobile_smp_apmu_suspend_init(void)
-+{
-+ shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
-+}
-+#else
-+void shmobile_smp_apmu_suspend_init(void) {}
-+#endif
---
-2.1.2
-
diff --git a/patches.renesas/0831-ARM-shmobile-r8a7790-Support-Core-Standby-for-Suspen.patch b/patches.renesas/0831-ARM-shmobile-r8a7790-Support-Core-Standby-for-Suspen.patch
deleted file mode 100644
index 77806856d0ed0..0000000000000
--- a/patches.renesas/0831-ARM-shmobile-r8a7790-Support-Core-Standby-for-Suspen.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From c75bc5a9537116fde544e7692f59612eaac209a4 Mon Sep 17 00:00:00 2001
-From: keita kobayashi <keita.kobayashi.ym@renesas.com>
-Date: Thu, 29 May 2014 16:24:39 +0900
-Subject: ARM: shmobile: r8a7790: Support Core-Standby for Suspend to RAM
-
-Add r8a7790 Core-Standby state for Suspend to RAM support.
-
-Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ce508d1b13d1008db570ac58e775ce36bd9c5112)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/smp-r8a7790.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index a8ace58c3dd2..7590e2b6e2fa 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -69,6 +69,7 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
-
- /* turn on power to SCU */
- r8a7790_pm_init();
-+ shmobile_smp_apmu_suspend_init();
- rcar_sysc_power_up(&r8a7790_ca15_scu);
- rcar_sysc_power_up(&r8a7790_ca7_scu);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0832-ARM-shmobile-r8a7791-Support-Core-Standby-for-Suspen.patch b/patches.renesas/0832-ARM-shmobile-r8a7791-Support-Core-Standby-for-Suspen.patch
deleted file mode 100644
index bcb366dd88916..0000000000000
--- a/patches.renesas/0832-ARM-shmobile-r8a7791-Support-Core-Standby-for-Suspen.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From b2dd9428ee44290b4cd75c1612b6f0794541c78b Mon Sep 17 00:00:00 2001
-From: keita kobayashi <keita.kobayashi.ym@renesas.com>
-Date: Thu, 29 May 2014 16:24:52 +0900
-Subject: ARM: shmobile: r8a7791: Support Core-Standby for Suspend to RAM
-
-Add r8a7791 Core-Standby state for Suspend to RAM support.
-
-Signed-off-by: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7f6234013a835476f1503be2c9287f1fe3497457)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/smp-r8a7791.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index 17720860f0dd..c6543b6ec759 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -52,6 +52,7 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
- iounmap(p);
-
- r8a7791_pm_init();
-+ shmobile_smp_apmu_suspend_init();
- }
-
- static int r8a7791_smp_boot_secondary(unsigned int cpu,
---
-2.1.2
-
diff --git a/patches.renesas/0833-ARM-shmobile-Mark-all-SoCs-in-shmobile-as-CPUFreq-ca.patch b/patches.renesas/0833-ARM-shmobile-Mark-all-SoCs-in-shmobile-as-CPUFreq-ca.patch
deleted file mode 100644
index b22fdca73e901..0000000000000
--- a/patches.renesas/0833-ARM-shmobile-Mark-all-SoCs-in-shmobile-as-CPUFreq-ca.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From dfcd5d6733a1aa91b5bacb49ee4751398bda65f4 Mon Sep 17 00:00:00 2001
-From: Benoit Cousson <bcousson@baylibre.com>
-Date: Thu, 5 Jun 2014 12:49:44 +0900
-Subject: ARM: shmobile: Mark all SoCs in shmobile as CPUFreq, capable
-
-Mark all SoCs in shmobile as CPUFreq capable
-on multiplatform build only.
-
-Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
-[gaku.inami.xw@bp.renesas.com: Move the definition of cpufreq capable]
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 6596e97e054647fecb016ecb7e1935aa2b7db954)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Kconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 0548968e21a8..22363ac76de4 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -12,6 +12,8 @@ config ARCH_SHMOBILE_MULTI
- select NO_IOPORT_MAP
- select PINCTRL
- select ARCH_REQUIRE_GPIOLIB
-+ select ARCH_HAS_CPUFREQ
-+ select ARCH_HAS_OPP
-
- if ARCH_SHMOBILE_MULTI
-
---
-2.1.2
-
diff --git a/patches.renesas/0834-ARM-shmobile-Use-shmobile_init_late-on-r8a7790-DT-on.patch b/patches.renesas/0834-ARM-shmobile-Use-shmobile_init_late-on-r8a7790-DT-on.patch
deleted file mode 100644
index bae4aebd4ebbc..0000000000000
--- a/patches.renesas/0834-ARM-shmobile-Use-shmobile_init_late-on-r8a7790-DT-on.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 08f6616db3ff10e538240ef4af845d2d3bc38865 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 15:13:47 +0900
-Subject: ARM: shmobile: Use shmobile_init_late() on r8a7790 DT-only
-
-Tie in shmobile_init_late for the DT-only r8a7790 SoC
-Multiplatform support code. This will make sure that
-Suspend-to-RAM, CPUIdle and CPUFreq get initialized.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7d95b9ddfb933f94354fa2ff9b1bfccdd6c54653)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7790.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 4212c8de987a..516b4e4a3ddd 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -326,6 +326,7 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
- .smp = smp_ops(r8a7790_smp_ops),
- .init_early = r8a7790_init_early,
- .init_time = rcar_gen2_timer_init,
-+ .init_late = shmobile_init_late,
- .dt_compat = r8a7790_boards_compat_dt,
- MACHINE_END
- #endif /* CONFIG_USE_OF */
---
-2.1.2
-
diff --git a/patches.renesas/0835-ARM-shmobile-Use-shmobile_init_late-on-r8a7791-DT-on.patch b/patches.renesas/0835-ARM-shmobile-Use-shmobile_init_late-on-r8a7791-DT-on.patch
deleted file mode 100644
index 9f0b7fc774c87..0000000000000
--- a/patches.renesas/0835-ARM-shmobile-Use-shmobile_init_late-on-r8a7791-DT-on.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 615bf84e0c324a4b446d5a9d4ae4f0b9501fa4ba Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 15:15:23 +0900
-Subject: ARM: shmobile: Use shmobile_init_late() on r8a7791 DT-only
-
-Tie in shmobile_init_late for the DT-only r8a7791 SoC
-Multiplatform support code. This will make sure that
-Suspend-to-RAM, CPUIdle and CPUFreq get initialized.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3d65226bc925f4749c2b2ab0ea3f4d274e194688)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7791.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index f554cda4a96a..9e16b1daba59 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -217,6 +217,7 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
- .smp = smp_ops(r8a7791_smp_ops),
- .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
-+ .init_late = shmobile_init_late,
- .dt_compat = r8a7791_boards_compat_dt,
- MACHINE_END
- #endif /* CONFIG_USE_OF */
---
-2.1.2
-
diff --git a/patches.renesas/0836-ARM-shmobile-Add-shared-R-Car-Gen2-CMA-reservation-c.patch b/patches.renesas/0836-ARM-shmobile-Add-shared-R-Car-Gen2-CMA-reservation-c.patch
deleted file mode 100644
index fa89da9c07fb4..0000000000000
--- a/patches.renesas/0836-ARM-shmobile-Add-shared-R-Car-Gen2-CMA-reservation-c.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 6d7262fa88d692c7ceede3206628203118d4f36d Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Mon, 9 Jun 2014 21:38:45 +0900
-Subject: ARM: shmobile: Add shared R-Car Gen2 CMA reservation code
-
-Add R-Car Gen2 CMA memory reservation code that can be
-shared between multiple SoCs and boards. At this point
-r8a7790 and r8a7791 are supported.
-
-The top 256MiB of the legacy 32-bit physical memory space
-is assigned to a separate CMA area that may be assigned
-to various devices later on.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-[horms+renesas@verge.net.au: rebased]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit f8e819352d12f1b7d109d846e9bf1c07e006469a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/rcar-gen2.h | 1 +
- arch/arm/mach-shmobile/setup-r8a7790.c | 1 +
- arch/arm/mach-shmobile/setup-r8a7791.c | 1 +
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 3 +++
- 4 files changed, 6 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/rcar-gen2.h b/arch/arm/mach-shmobile/rcar-gen2.h
-index 43f606eb2d82..ce53cb5f53a1 100644
---- a/arch/arm/mach-shmobile/rcar-gen2.h
-+++ b/arch/arm/mach-shmobile/rcar-gen2.h
-@@ -4,5 +4,6 @@
- void rcar_gen2_timer_init(void);
- #define MD(nr) BIT(nr)
- u32 rcar_gen2_read_mode_pins(void);
-+void rcar_gen2_reserve(void);
-
- #endif /* __ASM_RCAR_GEN2_H__ */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 516b4e4a3ddd..e1907686ace4 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -327,6 +327,7 @@ DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
- .init_early = r8a7790_init_early,
- .init_time = rcar_gen2_timer_init,
- .init_late = shmobile_init_late,
-+ .reserve = rcar_gen2_reserve,
- .dt_compat = r8a7790_boards_compat_dt,
- MACHINE_END
- #endif /* CONFIG_USE_OF */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 9e16b1daba59..7e970d005f7f 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -218,6 +218,7 @@ DT_MACHINE_START(R8A7791_DT, "Generic R8A7791 (Flattened Device Tree)")
- .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .init_late = shmobile_init_late,
-+ .reserve = rcar_gen2_reserve,
- .dt_compat = r8a7791_boards_compat_dt,
- MACHINE_END
- #endif /* CONFIG_USE_OF */
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index fdc714ebc4cd..544b9bf28840 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -20,8 +20,11 @@
-
- #include <linux/clk/shmobile.h>
- #include <linux/clocksource.h>
-+#include <linux/device.h>
-+#include <linux/dma-contiguous.h>
- #include <linux/io.h>
- #include <linux/kernel.h>
-+#include <linux/of_fdt.h>
- #include <asm/mach/arch.h>
- #include "common.h"
- #include "rcar-gen2.h"
---
-2.1.2
-
diff --git a/patches.renesas/0837-ARM-shmobile-rcar-gen2-Update-for-of_get_flat_dt_pro.patch b/patches.renesas/0837-ARM-shmobile-rcar-gen2-Update-for-of_get_flat_dt_pro.patch
deleted file mode 100644
index c72f6db7c399f..0000000000000
--- a/patches.renesas/0837-ARM-shmobile-rcar-gen2-Update-for-of_get_flat_dt_pro.patch
+++ /dev/null
@@ -1,128 +0,0 @@
-From cee921bc239954da8203beb129483cbcca72acf5 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 12 Jun 2014 10:42:22 +0200
-Subject: ARM: shmobile: rcar-gen2: Update for of_get_flat_dt_prop() update
-
-Commit 9d0c4dfedd96ee54fc075b16d02f82499c8cc3a6 ("of/fdt: update
-of_get_flat_dt_prop in prep for libfdt") changed the function prototypes
-of of_get_flat_dt_prop():
- - The return type was made const,
- - The last parameter was changed from "unsigned long *" to "int *".
-and dt_mem_next_cell():
- - The second parameter was made const.
-
-This causes the following compiler warnings:
-
-arch/arm/mach-shmobile/setup-rcar-gen2.c: In function 'rcar_gen2_scan_mem':
-arch/arm/mach-shmobile/setup-rcar-gen2.c:125:15: warning: initialization discards 'const' qualifier from pointer target type [enabled by default]
-arch/arm/mach-shmobile/setup-rcar-gen2.c:142:2: warning: passing argument 3 of 'of_get_flat_dt_prop' from incompatible pointer type [enabled by default]
-include/linux/of_fdt.h:53:20: note: expected 'int *' but argument is of type 'long unsigned int *'
-arch/arm/mach-shmobile/setup-rcar-gen2.c:142:6: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
-arch/arm/mach-shmobile/setup-rcar-gen2.c:144:3: warning: passing argument 3 of 'of_get_flat_dt_prop' from incompatible pointer type [enabled by default]
-include/linux/of_fdt.h:53:20: note: expected 'int *' but argument is of type 'long unsigned int *'
-arch/arm/mach-shmobile/setup-rcar-gen2.c:144:7: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]
-arch/arm/mach-shmobile/setup-rcar-gen2.c:152:3: warning: passing argument 2 of 'dt_mem_next_cell' from incompatible pointer type [enabled by default]
-include/linux/of_fdt.h:69:12: note: expected 'const __be32 **' but argument is of type '__be32 **'
-arch/arm/mach-shmobile/setup-rcar-gen2.c:153:3: warning: passing argument 2 of 'dt_mem_next_cell' from incompatible pointer type [enabled by default]
-include/linux/of_fdt.h:69:12: note: expected 'const __be32 **' but argument is of type '__be32 **'
-
-Update the variable types in rcar_gen2_scan_mem() to fix this.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-[horms+renesas@verge.net.au: rebased]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 83850b04ae7744f51681533fb7afb645e66ce8fe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 76 ++++++++++++++++++++++++++++++++
- 1 file changed, 76 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index 544b9bf28840..b0626f89d7a6 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -113,3 +113,79 @@ void __init rcar_gen2_timer_init(void)
- #endif
- clocksource_of_init();
- }
-+
-+struct memory_reserve_config {
-+ u64 reserved;
-+ u64 base, size;
-+};
-+
-+static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname,
-+ int depth, void *data)
-+{
-+ const char *type = of_get_flat_dt_prop(node, "device_type", NULL);
-+ const __be32 *reg, *endp;
-+ int l;
-+ struct memory_reserve_config *mrc = data;
-+ u64 lpae_start = (u64)1 << 32;
-+
-+ /* We are scanning "memory" nodes only */
-+ if (type == NULL) {
-+ /*
-+ * The longtrail doesn't have a device_type on the
-+ * /memory node, so look for the node called /memory@0.
-+ */
-+ if (depth != 1 || strcmp(uname, "memory@0") != 0)
-+ return 0;
-+ } else if (strcmp(type, "memory") != 0)
-+ return 0;
-+
-+ reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l);
-+ if (reg == NULL)
-+ reg = of_get_flat_dt_prop(node, "reg", &l);
-+ if (reg == NULL)
-+ return 0;
-+
-+ endp = reg + (l / sizeof(__be32));
-+ while ((endp - reg) >= (dt_root_addr_cells + dt_root_size_cells)) {
-+ u64 base, size;
-+
-+ base = dt_mem_next_cell(dt_root_addr_cells, &reg);
-+ size = dt_mem_next_cell(dt_root_size_cells, &reg);
-+
-+ if (base >= lpae_start)
-+ continue;
-+
-+ if ((base + size) >= lpae_start)
-+ size = lpae_start - base;
-+
-+ if (size < mrc->reserved)
-+ continue;
-+
-+ if (base < mrc->base)
-+ continue;
-+
-+ /* keep the area at top near the 32-bit legacy limit */
-+ mrc->base = base + size - mrc->reserved;
-+ mrc->size = mrc->reserved;
-+ }
-+
-+ return 0;
-+}
-+
-+struct cma *rcar_gen2_dma_contiguous;
-+
-+void __init rcar_gen2_reserve(void)
-+{
-+ struct memory_reserve_config mrc;
-+
-+ /* reserve 256 MiB at the top of the physical legacy 32-bit space */
-+ memset(&mrc, 0, sizeof(mrc));
-+ mrc.reserved = SZ_256M;
-+
-+ of_scan_flat_dt(rcar_gen2_scan_mem, &mrc);
-+#ifdef CONFIG_DMA_CMA
-+ if (mrc.size)
-+ dma_contiguous_reserve_area(mrc.size, mrc.base, 0,
-+ &rcar_gen2_dma_contiguous);
-+#endif
-+}
---
-2.1.2
-
diff --git a/patches.renesas/0838-ARM-shmobile-rcar-gen2-Use-1ULL-instead-of-u64-1.patch b/patches.renesas/0838-ARM-shmobile-rcar-gen2-Use-1ULL-instead-of-u64-1.patch
deleted file mode 100644
index 17bfbd77b9618..0000000000000
--- a/patches.renesas/0838-ARM-shmobile-rcar-gen2-Use-1ULL-instead-of-u64-1.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 31729185fe686bd7f6ef4b57aad9962383f50207 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 12 Jun 2014 10:42:23 +0200
-Subject: ARM: shmobile: rcar-gen2: Use "1ULL" instead of "(u64)1"
-
-Casts are evil
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b69f47c00f2eff19b532cf0142d81b993e587bf0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index b0626f89d7a6..51d572306e1a 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -126,7 +126,7 @@ static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname,
- const __be32 *reg, *endp;
- int l;
- struct memory_reserve_config *mrc = data;
-- u64 lpae_start = (u64)1 << 32;
-+ u64 lpae_start = 1ULL << 32;
-
- /* We are scanning "memory" nodes only */
- if (type == NULL) {
---
-2.1.2
-
diff --git a/patches.renesas/0839-ARM-shmobile-rcar-gen2-Remove-useless-copied-section.patch b/patches.renesas/0839-ARM-shmobile-rcar-gen2-Remove-useless-copied-section.patch
deleted file mode 100644
index 56ba5860998db..0000000000000
--- a/patches.renesas/0839-ARM-shmobile-rcar-gen2-Remove-useless-copied-section.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From e980b51433330a52c55613862aa6a8282fdd1a76 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Thu, 12 Jun 2014 10:42:24 +0200
-Subject: ARM: shmobile: rcar-gen2: Remove useless copied section for LongTrail
-
-Open Firmware in the CHRP LongTrail does not support plugging in ARM CPUs
-in its PPC 603e/604e-compatible CPU socket ;-)
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ea2a0d581a3e742c2fb2bc520c8c8887fe1dafa6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-rcar-gen2.c | 9 +--------
- 1 file changed, 1 insertion(+), 8 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-rcar-gen2.c b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-index 51d572306e1a..73fb2a659d9f 100644
---- a/arch/arm/mach-shmobile/setup-rcar-gen2.c
-+++ b/arch/arm/mach-shmobile/setup-rcar-gen2.c
-@@ -129,14 +129,7 @@ static int __init rcar_gen2_scan_mem(unsigned long node, const char *uname,
- u64 lpae_start = 1ULL << 32;
-
- /* We are scanning "memory" nodes only */
-- if (type == NULL) {
-- /*
-- * The longtrail doesn't have a device_type on the
-- * /memory node, so look for the node called /memory@0.
-- */
-- if (depth != 1 || strcmp(uname, "memory@0") != 0)
-- return 0;
-- } else if (strcmp(type, "memory") != 0)
-+ if (type == NULL || strcmp(type, "memory"))
- return 0;
-
- reg = of_get_flat_dt_prop(node, "linux,usable-memory", &l);
---
-2.1.2
-
diff --git a/patches.renesas/0840-ARM-shmobile-rcar-gen2-correct-return-value-of-shmob.patch b/patches.renesas/0840-ARM-shmobile-rcar-gen2-correct-return-value-of-shmob.patch
deleted file mode 100644
index 698bb5f3dd56a..0000000000000
--- a/patches.renesas/0840-ARM-shmobile-rcar-gen2-correct-return-value-of-shmob.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 608ee0ea805144d1580c44dea3d9c47320bf33f7 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 16 Jun 2014 20:21:13 +0900
-Subject: ARM: shmobile: rcar-gen2: correct return value of
- shmobile_smp_apmu_suspend_init
-
-The dummy shmobile_smp_apmu_suspend_init() function provided when
-CPU_IDLE is not set should not return a value as per the signature
-of the function.
-
-This problem appears to have been introduced by
-867ba81f728f1daa ("ARM: shmobile: APMU: Add Core-Standby-state for Suspend
-to RAM").
-
-Cc: Keita Kobayashi <keita.kobayashi.ym@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ecdaca48629bd99609fdc612685363330967dce2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/common.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/common.h b/arch/arm/mach-shmobile/common.h
-index ab5a9b2886cf..98056081f0da 100644
---- a/arch/arm/mach-shmobile/common.h
-+++ b/arch/arm/mach-shmobile/common.h
-@@ -38,7 +38,7 @@ int shmobile_suspend_init(void);
- void shmobile_smp_apmu_suspend_init(void);
- #else
- static inline int shmobile_suspend_init(void) { return 0; }
--static inline void shmobile_smp_apmu_suspend_init(void) { return 0; }
-+static inline void shmobile_smp_apmu_suspend_init(void) { }
- #endif
-
- #ifdef CONFIG_CPU_IDLE
---
-2.1.2
-
diff --git a/patches.renesas/0841-ARM-shmobile-koelsch-reference-Remove-workarounds-fo.patch b/patches.renesas/0841-ARM-shmobile-koelsch-reference-Remove-workarounds-fo.patch
deleted file mode 100644
index cfda6be885887..0000000000000
--- a/patches.renesas/0841-ARM-shmobile-koelsch-reference-Remove-workarounds-fo.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 5f3bcd088d380992d099ca66f871fc210b2533c7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:47:45 +0200
-Subject: ARM: shmobile: koelsch-reference: Remove workarounds for core clock
- issues
-
-Now the core clock issues have been fixed by commit
-3c90c55dcde745bed81f6447f24ba96bda43d984 ("drivers: sh: compile
-drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI"), revert the following
-3 commits:
- - 4dcb4c80380dfa482874b931e308fd382597feab ("ARM: shmobile: Add Koelsch
- clock workarounds for SDHI"),
- - 8e4f394b20a0fe474dd88204d76978191566decf ("ARM: shmobile:
- koelsch-reference: Annotate clk_enables as __initconst"),
- - 3d75d9ea74fee6f5a4bdcbbdf2d577661d047eef ("ARM: shmobile:
- koelsch-reference: Work around core clock issues").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d37e9b0b20dd7670946ad6034b4aa93b7e7048aa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 15 ---------------
- 1 file changed, 15 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 1d3f67d4ccd6..28e3c45c8b90 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -92,24 +92,9 @@ static const struct clk_name clk_names[] __initconst = {
- { "lvds0", "lvds.0", "rcar-du-r8a7791" },
- };
-
--/*
-- * This is a really crude hack to work around core platform clock issues
-- */
--static const struct clk_name clk_enables[] __initconst = {
-- { "ether", NULL, "ee700000.ethernet" },
-- { "i2c2", NULL, "e6530000.i2c" },
-- { "msiof0", NULL, "e6e20000.spi" },
-- { "qspi_mod", NULL, "e6b10000.spi" },
-- { "sdhi0", NULL, "ee100000.sd" },
-- { "sdhi1", NULL, "ee140000.sd" },
-- { "sdhi2", NULL, "ee160000.sd" },
-- { "thermal", NULL, "e61f0000.thermal" },
--};
--
- static void __init koelsch_add_standard_devices(void)
- {
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
-- shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
- r8a7791_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0842-ARM-shmobile-lager-reference-Remove-workarounds-for-.patch b/patches.renesas/0842-ARM-shmobile-lager-reference-Remove-workarounds-for-.patch
deleted file mode 100644
index 668212959535e..0000000000000
--- a/patches.renesas/0842-ARM-shmobile-lager-reference-Remove-workarounds-for-.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 499b36a56ebb5a81fdf56498f1e1992ab2c197ae Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:47:46 +0200
-Subject: ARM: shmobile: lager-reference: Remove workarounds for core clock
- issues
-
-Now the core clock issues have been fixed by commit
-3c90c55dcde745bed81f6447f24ba96bda43d984 ("drivers: sh: compile
-drivers/sh/pm_runtime.c if ARCH_SHMOBILE_MULTI"), revert the following
-2 commits:
- - f98b55d730492e664fb2649bd7054fec0fe81acd ("ARM: shmobile: Add Lager
- clock workarounds for SDHI and MMCIF"),
- - aa5de826afe747c353162bbc116c63ab5335f91c ("ARM: shmobile:
- lager-reference: Work around core clock issues").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f47b9e1ec3a1d694f07fcc0d5ba0c2582acce099)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 14 --------------
- 1 file changed, 14 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 4f0af91ebc81..9e0624e1b2f0 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -98,23 +98,9 @@ static const struct clk_name clk_names[] __initconst = {
- { "lvds1", "lvds.1", "rcar-du-r8a7790" },
- };
-
--/*
-- * This is a really crude hack to work around core platform clock issues
-- */
--static const struct clk_name clk_enables[] __initconst = {
-- { "ether", NULL, "ee700000.ethernet" },
-- { "msiof1", NULL, "e6e10000.spi" },
-- { "mmcif1", NULL, "ee220000.mmc" },
-- { "qspi_mod", NULL, "e6b10000.spi" },
-- { "sdhi0", NULL, "ee100000.sd" },
-- { "sdhi2", NULL, "ee140000.sd" },
-- { "thermal", NULL, "e61f0000.thermal" },
--};
--
- static void __init lager_add_standard_devices(void)
- {
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
-- shmobile_clk_workaround(clk_enables, ARRAY_SIZE(clk_enables), true);
- r8a7790_add_dt_devices();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
-
---
-2.1.2
-
diff --git a/patches.renesas/0843-ARM-shmobile-armadillo800eva-legacy-Add-LED-support.patch b/patches.renesas/0843-ARM-shmobile-armadillo800eva-legacy-Add-LED-support.patch
deleted file mode 100644
index ce25124b66322..0000000000000
--- a/patches.renesas/0843-ARM-shmobile-armadillo800eva-legacy-Add-LED-support.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-From 7ea1d62f37d17950a6d43600f90abe267c99b5bd Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:51:21 +0200
-Subject: ARM: shmobile: armadillo800eva legacy: Add LED support
-
-Cfr. r8a7740-armadillo800eva-reference.dts
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 111bcc1360235ad1cdab4bc27f5ccca943ca8af5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 35 ++++++++++++++++++++++++++
- 1 file changed, 35 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 284877ae9c83..90a0b2b15545 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -578,6 +578,40 @@ static struct platform_device hdmi_lcdc_device = {
- },
- };
-
-+/* LEDS */
-+static struct gpio_led gpio_leds[] = {
-+ {
-+ .name = "LED3",
-+ .gpio = 102,
-+ .default_state = LEDS_GPIO_DEFSTATE_ON,
-+ }, {
-+ .name = "LED4",
-+ .gpio = 111,
-+ .default_state = LEDS_GPIO_DEFSTATE_ON,
-+ }, {
-+ .name = "LED5",
-+ .gpio = 110,
-+ .default_state = LEDS_GPIO_DEFSTATE_ON,
-+ }, {
-+ .name = "LED6",
-+ .gpio = 177,
-+ .default_state = LEDS_GPIO_DEFSTATE_ON,
-+ },
-+};
-+
-+static struct gpio_led_platform_data leds_gpio_info = {
-+ .leds = gpio_leds,
-+ .num_leds = ARRAY_SIZE(gpio_leds),
-+};
-+
-+static struct platform_device leds_gpio_device = {
-+ .name = "leds-gpio",
-+ .id = -1,
-+ .dev = {
-+ .platform_data = &leds_gpio_info,
-+ },
-+};
-+
- /* GPIO KEY */
- #define GPIO_KEY(c, g, d, ...) \
- { .code = c, .gpio = g, .desc = d, .active_low = 1, __VA_ARGS__ }
-@@ -1069,6 +1103,7 @@ static struct platform_device *eva_devices[] __initdata = {
- &lcdc0_device,
- &pwm_device,
- &pwm_backlight_device,
-+ &leds_gpio_device,
- &gpio_keys_device,
- &sh_eth_device,
- &vcc_sdhi0,
---
-2.1.2
-
diff --git a/patches.renesas/0844-ARM-shmobile-armadillo800eva-reference-Spelling-s-ED.patch b/patches.renesas/0844-ARM-shmobile-armadillo800eva-reference-Spelling-s-ED.patch
deleted file mode 100644
index 7b6ed4e7e51df..0000000000000
--- a/patches.renesas/0844-ARM-shmobile-armadillo800eva-reference-Spelling-s-ED.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 38c3c0449374678e6723fb12152dae2f8651b620 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Wed, 14 May 2014 16:51:20 +0200
-Subject: ARM: shmobile: armadillo800eva reference: Spelling s/ED/LED/
-
-And add missing spaces before opening parentheses
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8a0d1a2fcfd019adf9893076f6c65a9a05712853)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-index 6b7c975e8ee2..10b13c7ac214 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-@@ -53,11 +53,11 @@
- * CON22 Serial
- * CON23 LAN
- * CON24 USB3
-- * LED1 Camera LED(Yellow)
-+ * LED1 Camera LED (Yellow)
- * LED2 Power LED (Green)
-- * ED3-LED6 User LED(Yellow)
-- * LED7 LAN link LED(Green)
-- * LED8 LAN activity LED(Yellow)
-+ * LED3-LED6 User LED (Yellow)
-+ * LED7 LAN link LED (Green)
-+ * LED8 LAN activity LED (Yellow)
- */
-
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0845-ARM-shmobile-Enable-R-Car-Gen2-CMA-code-in-board-fil.patch b/patches.renesas/0845-ARM-shmobile-Enable-R-Car-Gen2-CMA-code-in-board-fil.patch
deleted file mode 100644
index fcd29e62d00fd..0000000000000
--- a/patches.renesas/0845-ARM-shmobile-Enable-R-Car-Gen2-CMA-code-in-board-fil.patch
+++ /dev/null
@@ -1,67 +0,0 @@
-From cd21f828583eb9dbcf48d5ee47d483292506b469 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Mon, 9 Jun 2014 21:38:53 +0900
-Subject: ARM: shmobile: Enable R-Car Gen2 CMA code in board files
-
-Hook in the R-Car Gen2 CMA reservation code in the board
-files for Lager and Koelsch. Both the DT-reference code
-and the legacy code is modified.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5f65c5bd58bf027eb2bacc2294a98e7aea81c630)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 1 +
- arch/arm/mach-shmobile/board-koelsch.c | 1 +
- arch/arm/mach-shmobile/board-lager-reference.c | 1 +
- arch/arm/mach-shmobile/board-lager.c | 1 +
- 4 files changed, 4 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 28e3c45c8b90..5e0375fdc6f7 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -113,5 +113,6 @@ DT_MACHINE_START(KOELSCH_DT, "koelsch")
- .init_time = rcar_gen2_timer_init,
- .init_machine = koelsch_add_standard_devices,
- .init_late = shmobile_init_late,
-+ .reserve = rcar_gen2_reserve,
- .dt_compat = koelsch_boards_compat_dt,
- MACHINE_END
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index 0d44e7eb6508..db4b8a311c75 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -526,5 +526,6 @@ DT_MACHINE_START(KOELSCH_DT, "koelsch")
- .init_time = rcar_gen2_timer_init,
- .init_machine = koelsch_init,
- .init_late = shmobile_init_late,
-+ .reserve = rcar_gen2_reserve,
- .dt_compat = koelsch_boards_compat_dt,
- MACHINE_END
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index 9e0624e1b2f0..c5e656e3bae3 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -119,5 +119,6 @@ DT_MACHINE_START(LAGER_DT, "lager")
- .init_time = rcar_gen2_timer_init,
- .init_machine = lager_add_standard_devices,
- .init_late = shmobile_init_late,
-+ .reserve = rcar_gen2_reserve,
- .dt_compat = lager_boards_compat_dt,
- MACHINE_END
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 83bbb5c48863..a51d202cddcf 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -891,5 +891,6 @@ DT_MACHINE_START(LAGER_DT, "lager")
- .init_time = rcar_gen2_timer_init,
- .init_machine = lager_init,
- .init_late = shmobile_init_late,
-+ .reserve = rcar_gen2_reserve,
- .dt_compat = lager_boards_compat_dt,
- MACHINE_END
---
-2.1.2
-
diff --git a/patches.renesas/0846-ARM-shmobile-Get-rid-of-redundant-EMEV2-mach-callbac.patch b/patches.renesas/0846-ARM-shmobile-Get-rid-of-redundant-EMEV2-mach-callbac.patch
deleted file mode 100644
index 92bfa10f58d5c..0000000000000
--- a/patches.renesas/0846-ARM-shmobile-Get-rid-of-redundant-EMEV2-mach-callbac.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From cff58ff6eca1c62e9b8e8695f18f63f21c5b6318 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Thu, 5 Jun 2014 14:32:12 +0900
-Subject: ARM: shmobile: Get rid of redundant EMEV2 mach callbacks
-
-Update the EMEV2 specific SoC callbacks to get rid
-of the calls to of_clk_init() and of_platform_populate().
-Those calls are by default executed by the functions in
-the shared ARM code in case the SoC specific mach
-callbacks are NULL.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit af164ca33dcb3c1e6a2e723f24542d1278a8bef8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-emev2.c | 10 +---------
- 1 file changed, 1 insertion(+), 9 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-emev2.c b/arch/arm/mach-shmobile/setup-emev2.c
-index e10d34e24817..b06a9e8f59a5 100644
---- a/arch/arm/mach-shmobile/setup-emev2.c
-+++ b/arch/arm/mach-shmobile/setup-emev2.c
-@@ -16,10 +16,9 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
--#include <linux/clk-provider.h>
- #include <linux/kernel.h>
- #include <linux/init.h>
--#include <linux/of_platform.h>
-+#include <linux/mm.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/map.h>
-@@ -42,12 +41,6 @@ static void __init emev2_map_io(void)
- iotable_init(emev2_io_desc, ARRAY_SIZE(emev2_io_desc));
- }
-
--static void __init emev2_add_standard_devices_dt(void)
--{
-- of_clk_init(NULL);
-- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
--}
--
- static const char *emev2_boards_compat_dt[] __initconst = {
- "renesas,emev2",
- NULL,
-@@ -59,7 +52,6 @@ DT_MACHINE_START(EMEV2_DT, "Generic Emma Mobile EV2 (Flattened Device Tree)")
- .smp = smp_ops(emev2_smp_ops),
- .map_io = emev2_map_io,
- .init_early = shmobile_init_delay,
-- .init_machine = emev2_add_standard_devices_dt,
- .init_late = shmobile_init_late,
- .dt_compat = emev2_boards_compat_dt,
- MACHINE_END
---
-2.1.2
-
diff --git a/patches.renesas/0847-ARM-shmobile-Update-r7s72100-DTS-to-include-CPU-freq.patch b/patches.renesas/0847-ARM-shmobile-Update-r7s72100-DTS-to-include-CPU-freq.patch
deleted file mode 100644
index 0c8ed5d8ea140..0000000000000
--- a/patches.renesas/0847-ARM-shmobile-Update-r7s72100-DTS-to-include-CPU-freq.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From b2da2ec10ec4f52c9155af6be665a479ace64811 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 14:28:49 +0900
-Subject: ARM: shmobile: Update r7s72100 DTS to include CPU frequency
-
-Add CPU Frequency information to the r7s72100 DTS file. This
-will allow us to use the shared C code on r7s72100 and Genmai
-which reads out the clock frequency from DT and calculates the
-delay settings from there.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 005407fdf1c65a06fc0a9c588408f57e2eacef7c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100.dtsi | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100.dtsi b/arch/arm/boot/dts/r7s72100.dtsi
-index f50fbc8f3bd9..bdee22541189 100644
---- a/arch/arm/boot/dts/r7s72100.dtsi
-+++ b/arch/arm/boot/dts/r7s72100.dtsi
-@@ -144,6 +144,7 @@
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <0>;
-+ clock-frequency = <400000000>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0848-ARM-shmobile-Use-shmobile_init_delay-on-Genmai-board.patch b/patches.renesas/0848-ARM-shmobile-Use-shmobile_init_delay-on-Genmai-board.patch
deleted file mode 100644
index f0674f510a03d..0000000000000
--- a/patches.renesas/0848-ARM-shmobile-Use-shmobile_init_delay-on-Genmai-board.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From bb131925fb4a0087833052e9bca91f0e143cf75a Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 14:28:56 +0900
-Subject: ARM: shmobile: Use shmobile_init_delay() on Genmai boards
-
-Adjust Genmai board support to use shmobile_init_delay() together
-with r7s72100 CPU Frequency settings from the DTS.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4387ac5282616ff14edc733aca79fe046ddb45f5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai-reference.c | 2 +-
- arch/arm/mach-shmobile/board-genmai.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index d341ef09ec37..c06dc5c12d1e 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -47,7 +47,7 @@ static const char * const genmai_boards_compat_dt[] __initconst = {
- };
-
- DT_MACHINE_START(GENMAI_DT, "genmai")
-- .init_early = r7s72100_init_early,
-+ .init_early = shmobile_init_delay,
- .init_machine = genmai_add_standard_devices,
- .dt_compat = genmai_boards_compat_dt,
- MACHINE_END
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index f0a8eca7d10d..a0994f36b348 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -154,7 +154,7 @@ static const char * const genmai_boards_compat_dt[] __initconst = {
- };
-
- DT_MACHINE_START(GENMAI_DT, "genmai")
-- .init_early = r7s72100_init_early,
-+ .init_early = shmobile_init_delay,
- .init_machine = genmai_add_standard_devices,
- .dt_compat = genmai_boards_compat_dt,
- MACHINE_END
---
-2.1.2
-
diff --git a/patches.renesas/0849-ARM-shmobile-Use-shmobile_init_delay-on-r7s72100.patch b/patches.renesas/0849-ARM-shmobile-Use-shmobile_init_delay-on-r7s72100.patch
deleted file mode 100644
index 426b135622aa8..0000000000000
--- a/patches.renesas/0849-ARM-shmobile-Use-shmobile_init_delay-on-r7s72100.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 19ed160c9c3354ff6361e754ca37786aae6b7578 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 14:29:04 +0900
-Subject: ARM: shmobile: Use shmobile_init_delay() on r7s72100
-
-Adjust the r7s72100 SoC support code to use shmobile_init_delay()
-together with CPU Frequency settings from the DTS. Get rid of the
-C code version.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b42a6f7e8f22552aad0d8e595cd83f36316e312b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r7s72100.h | 1 -
- arch/arm/mach-shmobile/setup-r7s72100.c | 7 +------
- 2 files changed, 1 insertion(+), 7 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r7s72100.h b/arch/arm/mach-shmobile/include/mach/r7s72100.h
-index 5f34b20ecd4a..efb723c88dd0 100644
---- a/arch/arm/mach-shmobile/include/mach/r7s72100.h
-+++ b/arch/arm/mach-shmobile/include/mach/r7s72100.h
-@@ -3,6 +3,5 @@
-
- void r7s72100_add_dt_devices(void);
- void r7s72100_clock_init(void);
--void r7s72100_init_early(void);
-
- #endif /* __ASM_R7S72100_H__ */
-diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
-index 17a74d355c5d..a55d68d89e6e 100644
---- a/arch/arm/mach-shmobile/setup-r7s72100.c
-+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
-@@ -43,11 +43,6 @@ void __init r7s72100_add_dt_devices(void)
- r7s72100_register_mtu2();
- }
-
--void __init r7s72100_init_early(void)
--{
-- shmobile_setup_delay(400, 1, 3); /* Cortex-A9 @ 400MHz */
--}
--
- #ifdef CONFIG_USE_OF
- static const char *r7s72100_boards_compat_dt[] __initdata = {
- "renesas,r7s72100",
-@@ -55,7 +50,7 @@ static const char *r7s72100_boards_compat_dt[] __initdata = {
- };
-
- DT_MACHINE_START(R7S72100_DT, "Generic R7S72100 (Flattened Device Tree)")
-- .init_early = r7s72100_init_early,
-+ .init_early = shmobile_init_delay,
- .dt_compat = r7s72100_boards_compat_dt,
- MACHINE_END
- #endif /* CONFIG_USE_OF */
---
-2.1.2
-
diff --git a/patches.renesas/0850-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-in-common-.patch b/patches.renesas/0850-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-in-common-.patch
deleted file mode 100644
index a6c242553b7df..0000000000000
--- a/patches.renesas/0850-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-in-common-.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From f0b01256d5ab0d14ae57d49c9cb868adff513bb4 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 20 May 2014 08:37:24 +0900
-Subject: ARM: shmobile: Use r8a7790 DT CPU Frequency in common case
-
-Convert the common C-code-less r8a7790 DT board support
-to use shmobile_init_delay() to be able to migrate away
-from per-SoC delay setup functions.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ed06ecbcc66f6224a908c8abfe940b00540f0aa8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7790.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index e1907686ace4..4bfa8539d72a 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -324,7 +324,7 @@ static const char * const r8a7790_boards_compat_dt[] __initconst = {
-
- DT_MACHINE_START(R8A7790_DT, "Generic R8A7790 (Flattened Device Tree)")
- .smp = smp_ops(r8a7790_smp_ops),
-- .init_early = r8a7790_init_early,
-+ .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .init_late = shmobile_init_late,
- .reserve = rcar_gen2_reserve,
---
-2.1.2
-
diff --git a/patches.renesas/0851-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-for-Lager.patch b/patches.renesas/0851-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-for-Lager.patch
deleted file mode 100644
index 640da5073da64..0000000000000
--- a/patches.renesas/0851-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-for-Lager.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From ab6fb627a7ffd11c0bfa7f015824fc4871153488 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 20 May 2014 08:37:33 +0900
-Subject: ARM: shmobile: Use r8a7790 DT CPU Frequency for Lager
-
-Convert the Lager board support to use shmobile_init_delay()
-to be able to migrate away from per-SoC delay setup functions.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a5d626813fc13f80b6ab80de1fe303ce5cdd8c54)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 2 +-
- arch/arm/mach-shmobile/board-lager.c | 2 +-
- 2 files changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index c5e656e3bae3..c2175c8e1ce7 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -115,7 +115,7 @@ static const char *lager_boards_compat_dt[] __initdata = {
-
- DT_MACHINE_START(LAGER_DT, "lager")
- .smp = smp_ops(r8a7790_smp_ops),
-- .init_early = r8a7790_init_early,
-+ .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .init_machine = lager_add_standard_devices,
- .init_late = shmobile_init_late,
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index a51d202cddcf..6fb08dbc953c 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -887,7 +887,7 @@ static const char * const lager_boards_compat_dt[] __initconst = {
-
- DT_MACHINE_START(LAGER_DT, "lager")
- .smp = smp_ops(r8a7790_smp_ops),
-- .init_early = r8a7790_init_early,
-+ .init_early = shmobile_init_delay,
- .init_time = rcar_gen2_timer_init,
- .init_machine = lager_init,
- .init_late = shmobile_init_late,
---
-2.1.2
-
diff --git a/patches.renesas/0852-ARM-shmobile-Remove-unused-r8a7790_init_early.patch b/patches.renesas/0852-ARM-shmobile-Remove-unused-r8a7790_init_early.patch
deleted file mode 100644
index dbd33846d3ddb..0000000000000
--- a/patches.renesas/0852-ARM-shmobile-Remove-unused-r8a7790_init_early.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 6e2f0eea8d7e70131f6d1b76f705b5eec5574aaf Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Tue, 20 May 2014 08:37:42 +0900
-Subject: ARM: shmobile: Remove unused r8a7790_init_early()
-
-Remove the now unused r8a7790_init_early() function.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d83fa4c9c27c4d8612e39e99506b5420fa05b58b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r8a7790.h | 1 -
- arch/arm/mach-shmobile/setup-r8a7790.c | 7 -------
- 2 files changed, 8 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-index d7555440fc7b..459827f1369b 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7790.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7790.h
-@@ -31,7 +31,6 @@ void r8a7790_add_dt_devices(void);
- void r8a7790_clock_init(void);
- void r8a7790_pinmux_init(void);
- void r8a7790_pm_init(void);
--void r8a7790_init_early(void);
- extern struct smp_operations r8a7790_smp_ops;
-
- #endif /* __ASM_R8A7790_H__ */
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index 4bfa8539d72a..a34229d5da41 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -308,13 +308,6 @@ void __init r8a7790_add_standard_devices(void)
- r8a7790_register_audio_dmac(1);
- }
-
--void __init r8a7790_init_early(void)
--{
--#ifndef CONFIG_ARM_ARCH_TIMER
-- shmobile_setup_delay(1300, 2, 4); /* Cortex-A15 @ 1300MHz */
--#endif
--}
--
- #ifdef CONFIG_USE_OF
-
- static const char * const r8a7790_boards_compat_dt[] __initconst = {
---
-2.1.2
-
diff --git a/patches.renesas/0853-ARM-shmobile-r8a7779-Add-helper-to-read-mode-pins.patch b/patches.renesas/0853-ARM-shmobile-r8a7779-Add-helper-to-read-mode-pins.patch
deleted file mode 100644
index 8a11c9d7f7ca4..0000000000000
--- a/patches.renesas/0853-ARM-shmobile-r8a7779-Add-helper-to-read-mode-pins.patch
+++ /dev/null
@@ -1,100 +0,0 @@
-From 7ee34ef34d077800db82b8999237b02f11213ff2 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:01 +0900
-Subject: ARM: shmobile: r8a7779: Add helper to read mode pins
-
-Add and use helper to read mode pins.
-This will be re-used when moving marzen-reference to
-the common clock framework.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3e05f24aa95bb043f1103b41392b61ce83d2675e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7779.c | 11 ++---------
- arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 +
- arch/arm/mach-shmobile/setup-r8a7779.c | 18 ++++++++++++++++++
- 3 files changed, 21 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index d81539a26dbd..5dd66a21f036 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -23,6 +23,7 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
-+#include <mach/r8a7779.h>
- #include "clock.h"
- #include "common.h"
-
-@@ -52,9 +53,6 @@
- #define MSTPCR3 IOMEM(0xffc8003c)
- #define MSTPSR1 IOMEM(0xffc80044)
-
--#define MODEMR 0xffcc0020
--
--
- /* ioremap() through clock mapping mandatory to avoid
- * collision with ARM coherent DMA virtual memory range.
- */
-@@ -207,14 +205,9 @@ static struct clk_lookup lookups[] = {
-
- void __init r8a7779_clock_init(void)
- {
-- void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
-- u32 mode;
-+ u32 mode = r8a7779_read_mode_pins();
- int k, ret = 0;
-
-- BUG_ON(!modemr);
-- mode = ioread32(modemr);
-- iounmap(modemr);
--
- if (mode & MD(1)) {
- plla_clk.rate = 1500000000;
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-index def10a29e09a..5ef0bad6334d 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-@@ -20,6 +20,7 @@ extern void r8a7779_add_early_devices(void);
- extern void r8a7779_add_standard_devices(void);
- extern void r8a7779_add_standard_devices_dt(void);
- extern void r8a7779_init_late(void);
-+extern u32 r8a7779_read_mode_pins(void);
- extern void r8a7779_clock_init(void);
- extern void r8a7779_pinmux_init(void);
- extern void r8a7779_pm_init(void);
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index e2bd28de39d0..c00e42254822 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -762,6 +762,24 @@ void __init r8a7779_add_standard_devices_dt(void)
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
-
-+#define MODEMR 0xffcc0020
-+
-+u32 __init r8a7779_read_mode_pins(void)
-+{
-+ static u32 mode;
-+ static bool mode_valid;
-+
-+ if (!mode_valid) {
-+ void __iomem *modemr = ioremap_nocache(MODEMR, PAGE_SIZE);
-+ BUG_ON(!modemr);
-+ mode = ioread32(modemr);
-+ iounmap(modemr);
-+ mode_valid = true;
-+ }
-+
-+ return mode;
-+}
-+
- static const char *r8a7779_compat_dt[] __initdata = {
- "renesas,r8a7779",
- NULL,
---
-2.1.2
-
diff --git a/patches.renesas/0854-ARM-shmobile-r8a7779-Move-r8a7779_earlytimer_init-to.patch b/patches.renesas/0854-ARM-shmobile-r8a7779-Move-r8a7779_earlytimer_init-to.patch
deleted file mode 100644
index 75397263dc0f3..0000000000000
--- a/patches.renesas/0854-ARM-shmobile-r8a7779-Move-r8a7779_earlytimer_init-to.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c6f5dc176e1e5a83c82ff37156d8c77fb7f8c825 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:02 +0900
-Subject: ARM: shmobile: r8a7779: Move r8a7779_earlytimer_init to
- clock-r8a7779.c
-
-r8a7779_earlytimer_init() calls r8a7779_clock_init() and
-r8a7779_clock_init() is defined in clock-r8a7779.c.
-
-If both CONFIG_COMMON_CLK and CONFIG_ARCH_R8A7779 are enabled,
-as will be the case when marzen-reference moves to use
-the common clock framework, then setup-r8a7779.c is compiled
-but clock-r8a7779.c is not.
-
-As r8a7779_earlytimer_init() is not used by marzen-reference
-simply move it to clock-r8a7779.c.
-
-[horms+renesas@verge.net.au: rebase]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit f48039a3da40f0c193122c83ad582913f2daf29d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7779.c | 11 +++++++++++
- arch/arm/mach-shmobile/setup-r8a7779.c | 10 ----------
- 2 files changed, 11 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index 5dd66a21f036..e690927f3505 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -23,6 +23,7 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
-+#include <linux/sh_timer.h>
- #include <mach/r8a7779.h>
- #include "clock.h"
- #include "common.h"
-@@ -261,3 +262,13 @@ void __init r8a7779_clock_init(void)
- else
- panic("failed to setup r8a7779 clocks\n");
- }
-+
-+/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
-+void __init __weak r8a7779_register_twd(void) { }
-+
-+void __init r8a7779_earlytimer_init(void)
-+{
-+ r8a7779_clock_init();
-+ r8a7779_register_twd();
-+ shmobile_earlytimer_init();
-+}
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index c00e42254822..8f93628a4d9b 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -674,16 +674,6 @@ void __init r8a7779_add_standard_devices(void)
- r8a7779_register_hpb_dmae();
- }
-
--/* do nothing for !CONFIG_SMP or !CONFIG_HAVE_TWD */
--void __init __weak r8a7779_register_twd(void) { }
--
--void __init r8a7779_earlytimer_init(void)
--{
-- r8a7779_clock_init();
-- r8a7779_register_twd();
-- shmobile_earlytimer_init();
--}
--
- void __init r8a7779_add_early_devices(void)
- {
- early_platform_add_devices(r8a7779_devices_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0855-ARM-shmobile-marzen-reference-Move-clock-and-OF-devi.patch b/patches.renesas/0855-ARM-shmobile-marzen-reference-Move-clock-and-OF-devi.patch
deleted file mode 100644
index 3880b5527134e..0000000000000
--- a/patches.renesas/0855-ARM-shmobile-marzen-reference-Move-clock-and-OF-devi.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From bb0f8f41ba066eb9d6d153b94370f802f7d78e13 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:03 +0900
-Subject: ARM: shmobile: marzen-reference: Move clock and OF device
- initialisation into board code
-
-Move the clock initialisation and OF device population from
-SoC to board code. This is in keeping with the pattern used by Lager.
-And the clock portion is part of decoupling clock initialisation
-from SoC code in preparation for moving to the common clock framework.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f8fba0ce6628109bac9d33f65b637a87a2f3be24)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 3 +++
- arch/arm/mach-shmobile/setup-r8a7779.c | 4 ----
- 2 files changed, 3 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 94bd57203ff5..46ed17a50183 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -19,6 +19,7 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-+#include <linux/of_platform.h>
- #include <mach/r8a7779.h>
- #include <asm/irq.h>
- #include <asm/mach/arch.h>
-@@ -27,7 +28,9 @@
-
- static void __init marzen_init(void)
- {
-+ r8a7779_clock_init();
- r8a7779_add_standard_devices_dt();
-+ of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
- }
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index 8f93628a4d9b..188f0df510be 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -744,12 +744,8 @@ void __init r8a7779_init_delay(void)
-
- void __init r8a7779_add_standard_devices_dt(void)
- {
-- /* clocks are setup late during boot in the case of DT */
-- r8a7779_clock_init();
--
- platform_add_devices(r8a7779_devices_dt,
- ARRAY_SIZE(r8a7779_devices_dt));
-- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- }
-
- #define MODEMR 0xffcc0020
---
-2.1.2
-
diff --git a/patches.renesas/0856-ARM-shmobile-r8a7779-Initial-multiplatform-support.patch b/patches.renesas/0856-ARM-shmobile-r8a7779-Initial-multiplatform-support.patch
deleted file mode 100644
index f99680a15f3d8..0000000000000
--- a/patches.renesas/0856-ARM-shmobile-r8a7779-Initial-multiplatform-support.patch
+++ /dev/null
@@ -1,113 +0,0 @@
-From 6cb8a1cbf9dc53ec864d3cad359e5a1068699746 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:05 +0900
-Subject: ARM: shmobile: r8a7779: Initial multiplatform support
-
-Add Marzen and r8a7779 to CONFIG_SHMOBILE_MULTI. At this
-point CCF is not yet supported so you cannot run this code
-yet. For CCF support to happen several different components
-are needed, and this is one simple portion that moves us
-forward. Other patches need to build on top of this one.
-
-Marzen board support exists in 3 flavours:
-1) SHMOBILE_MULTI, MACH_MARZEN - board-marzen-reference.c (CCF + DT)
-2) SHMOBILE, MACH_MARZEN_REFERENCE - board-marzen-reference.c (DT)
-3) SHMOBILE, MACH_MARZEN - board-marzen.c (legacy C code)
-
-When CCF is done then 2) will be removed. When 1) includes same features
-as 3) then 3) will be removed.
-
-Based on work for the Koelsch and r8a7791 by Magnus Damm.
-
-Cc: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5016c81bf92eb01741fc71ce7fb8380183a6f66a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/Makefile | 3 ++-
- arch/arm/mach-shmobile/Kconfig | 10 ++++++++++
- arch/arm/mach-shmobile/Makefile | 1 +
- arch/arm/mach-shmobile/board-marzen-reference.c | 5 +++++
- 4 files changed, 18 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 6ec1b220c4c4..290dabcb63fe 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -262,7 +262,8 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
- r7s72100-genmai.dtb \
- r8a7791-henninger.dtb \
- r8a7791-koelsch.dtb \
-- r8a7790-lager.dtb
-+ r8a7790-lager.dtb \
-+ r8a7779-marzen-reference.dtb
- dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
- socfpga_cyclone5_socdk.dtb \
- socfpga_cyclone5_sockit.dtb \
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index 22363ac76de4..d9ed05172a04 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -27,6 +27,11 @@ config ARCH_R7S72100
- bool "RZ/A1H (R7S72100)"
- select SYS_SUPPORTS_SH_MTU2
-
-+config ARCH_R8A7779
-+ bool "R-Car H1 (R8A77790)"
-+ select RENESAS_INTC_IRQPIN
-+ select SYS_SUPPORTS_SH_TMU
-+
- config ARCH_R8A7790
- bool "R-Car H2 (R8A77900)"
- select RENESAS_IRQC
-@@ -53,6 +58,11 @@ config MACH_LAGER
- depends on ARCH_R8A7790
- select MICREL_PHY if SH_ETH
-
-+config MACH_MARZEN
-+ bool "MARZEN board"
-+ depends on ARCH_R8A7779
-+ select REGULATOR_FIXED_VOLTAGE if REGULATOR
-+
- comment "Renesas ARM SoCs System Configuration"
- endif
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index efe4dd295f39..2bc1a45d0d00 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -61,6 +61,7 @@ ifdef CONFIG_ARCH_SHMOBILE_MULTI
- obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o
- obj-$(CONFIG_MACH_KOELSCH) += board-koelsch-reference.o
- obj-$(CONFIG_MACH_LAGER) += board-lager-reference.o
-+obj-$(CONFIG_MACH_MARZEN) += board-marzen-reference.o
- else
- obj-$(CONFIG_MACH_APE6EVM) += board-ape6evm.o
- obj-$(CONFIG_MACH_APE6EVM_REFERENCE) += board-ape6evm-reference.o
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 46ed17a50183..d90843b22027 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -19,6 +19,7 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-+#include <linux/clk-provider.h>
- #include <linux/of_platform.h>
- #include <mach/r8a7779.h>
- #include <asm/irq.h>
-@@ -28,7 +29,11 @@
-
- static void __init marzen_init(void)
- {
-+#ifdef CONFIG_COMMON_CLK
-+ of_clk_init(NULL);
-+#else
- r8a7779_clock_init();
-+#endif
- r8a7779_add_standard_devices_dt();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
---
-2.1.2
-
diff --git a/patches.renesas/0857-ARM-shmobile-marzen-reference-Initialize-CPG-device.patch b/patches.renesas/0857-ARM-shmobile-marzen-reference-Initialize-CPG-device.patch
deleted file mode 100644
index a23858b7ad35b..0000000000000
--- a/patches.renesas/0857-ARM-shmobile-marzen-reference-Initialize-CPG-device.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 1d8d223d3e02ead31b54d34f0022af1266ab2e05 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:06 +0900
-Subject: ARM: shmobile: marzen-reference: Initialize CPG device
-
-On multiplatform kernels clocks are handled by the CCF CPG driver. It
-must be explicitly initialized by a call to r8a7779_clocks_init() with
-the value of the boot mode pins.
-
-Based on similar work for the Koelsch board by Laurent Pinchart.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a92fbd077bbfbe98e4dee84081d84c44ae99538b)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 16 ++++++++++++----
- 1 file changed, 12 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index d90843b22027..f642819009ad 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -19,7 +19,8 @@
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
--#include <linux/clk-provider.h>
-+#include <linux/clk/shmobile.h>
-+#include <linux/clocksource.h>
- #include <linux/of_platform.h>
- #include <mach/r8a7779.h>
- #include <asm/irq.h>
-@@ -27,11 +28,17 @@
- #include "common.h"
- #include "irqs.h"
-
--static void __init marzen_init(void)
-+static void __init marzen_init_timer(void)
- {
- #ifdef CONFIG_COMMON_CLK
-- of_clk_init(NULL);
--#else
-+ r8a7779_clocks_init(r8a7779_read_mode_pins());
-+#endif
-+ clocksource_of_init();
-+}
-+
-+static void __init marzen_init(void)
-+{
-+#ifndef CONFIG_COMMON_CLK
- r8a7779_clock_init();
- #endif
- r8a7779_add_standard_devices_dt();
-@@ -48,6 +55,7 @@ DT_MACHINE_START(MARZEN, "marzen")
- .smp = smp_ops(r8a7779_smp_ops),
- .map_io = r8a7779_map_io,
- .init_early = r8a7779_init_delay,
-+ .init_time = marzen_init_timer,
- .nr_irqs = NR_IRQS_LEGACY,
- .init_irq = r8a7779_init_irq_dt,
- .init_machine = marzen_init,
---
-2.1.2
-
diff --git a/patches.renesas/0858-ARM-shmobile-marzen-reference-Instantiate-clkdevs-fo.patch b/patches.renesas/0858-ARM-shmobile-marzen-reference-Instantiate-clkdevs-fo.patch
deleted file mode 100644
index ada0f0a7e4867..0000000000000
--- a/patches.renesas/0858-ARM-shmobile-marzen-reference-Instantiate-clkdevs-fo.patch
+++ /dev/null
@@ -1,69 +0,0 @@
-From 9981c110bf2fe60e58a640425e07d4c3dfa545a4 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:07 +0900
-Subject: ARM: shmobile: marzen-reference: Instantiate clkdevs for SCIF and TMU
-
-Now that the common clock framework is supported, the clock lookup
-entries in clock-r8a7779.c are not registered anymore. Devices must
-instead reference their clocks in the device tree. However, SCIF and CMT
-devices are still instantiated through platform code, and thus need a
-clock lookup entry.
-
-Retrieve the SCIF and CMT clock entries by name and register clkdevs for
-the corresponding devices. This will be removed when the SCIF and CMT
-devices will be instantiated from the device tree.
-
-Based on work for the Koelsch board by Laurent Pinchart.
-
-Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2b2084e8d4ae9265a3240722cb8adce06c0f393f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 21 ++++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index f642819009ad..3017040c68be 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -25,6 +25,7 @@
- #include <mach/r8a7779.h>
- #include <asm/irq.h>
- #include <asm/mach/arch.h>
-+#include "clock.h"
- #include "common.h"
- #include "irqs.h"
-
-@@ -36,9 +37,27 @@ static void __init marzen_init_timer(void)
- clocksource_of_init();
- }
-
-+#ifdef CONFIG_COMMON_CLK
-+/*
-+ * This is a really crude hack to provide clkdev support to platform
-+ * devices until they get moved to DT.
-+ */
-+static const struct clk_name clk_names[] __initconst = {
-+ { "scif0", NULL, "sh-sci.0" },
-+ { "scif1", NULL, "sh-sci.1" },
-+ { "scif2", NULL, "sh-sci.2" },
-+ { "scif3", NULL, "sh-sci.3" },
-+ { "scif4", NULL, "sh-sci.4" },
-+ { "scif5", NULL, "sh-sci.5" },
-+ { "tmu0", "fck", "sh-tmu.0" },
-+};
-+#endif
-+
- static void __init marzen_init(void)
- {
--#ifndef CONFIG_COMMON_CLK
-+#ifdef CONFIG_COMMON_CLK
-+ shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
-+#else
- r8a7779_clock_init();
- #endif
- r8a7779_add_standard_devices_dt();
---
-2.1.2
-
diff --git a/patches.renesas/0859-ARM-shmobile-Remove-non-multiplatform-Marzen-referen.patch b/patches.renesas/0859-ARM-shmobile-Remove-non-multiplatform-Marzen-referen.patch
deleted file mode 100644
index 5d47e72113551..0000000000000
--- a/patches.renesas/0859-ARM-shmobile-Remove-non-multiplatform-Marzen-referen.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From ee14349c8c70e38205911f671501ee5dd7cd0737 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:09 +0900
-Subject: ARM: shmobile: Remove non-multiplatform Marzen reference support
-
-Now that r8a7779 has CCF support remove the legacy Marzen reference
-Kconfig bits CONFIG_MACH_MARZEN_REFERENCE for the non-multiplatform
-case.
-
-Starting from this commit Marzen board support is always enabled via
-CONFIG_MACH_MARZEN, and CONFIG_ARCH_MULTIPLATFORM is used to select
-between board-marzen.c and board-marzen-reference.c
-
-The file board-marzen-reference.c can no longer be used together with
-the legacy sh-clk clock framework, instead CCF is used.
-
-Based on work for the Koelsch board by Laurent Pinchart.
-
-Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1ece7f7bb014485b13faf9504b238ff891a9088a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/Makefile | 1 -
- arch/arm/mach-shmobile/Kconfig | 13 -------------
- arch/arm/mach-shmobile/Makefile | 1 -
- arch/arm/mach-shmobile/Makefile.boot | 1 -
- 4 files changed, 16 deletions(-)
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 290dabcb63fe..776b3aa1d1a7 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -250,7 +250,6 @@ dtb-$(CONFIG_ARCH_SHMOBILE_LEGACY) += r7s72100-genmai.dtb \
- r8a7778-bockw-reference.dtb \
- r8a7740-armadillo800eva-reference.dtb \
- r8a7779-marzen.dtb \
-- r8a7779-marzen-reference.dtb \
- r8a7791-koelsch.dtb \
- r8a7790-lager.dtb \
- sh73a0-kzm9g.dtb \
-diff --git a/arch/arm/mach-shmobile/Kconfig b/arch/arm/mach-shmobile/Kconfig
-index d9ed05172a04..3e2380130769 100644
---- a/arch/arm/mach-shmobile/Kconfig
-+++ b/arch/arm/mach-shmobile/Kconfig
-@@ -249,19 +249,6 @@ config MACH_MARZEN
- select REGULATOR_FIXED_VOLTAGE if REGULATOR
- select USE_OF
-
--config MACH_MARZEN_REFERENCE
-- bool "MARZEN board - Reference Device Tree Implementation"
-- depends on ARCH_R8A7779
-- select ARCH_REQUIRE_GPIOLIB
-- select REGULATOR_FIXED_VOLTAGE if REGULATOR
-- select USE_OF
-- ---help---
-- Use reference implementation of Marzen board support
-- which makes use of device tree at the expense
-- of not supporting a number of devices.
--
-- This is intended to aid developers
--
- config MACH_LAGER
- bool "Lager board"
- depends on ARCH_R8A7790
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 2bc1a45d0d00..ccb056327fd4 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -70,7 +70,6 @@ obj-$(CONFIG_MACH_BOCKW) += board-bockw.o
- obj-$(CONFIG_MACH_BOCKW_REFERENCE) += board-bockw-reference.o
- obj-$(CONFIG_MACH_GENMAI) += board-genmai.o
- obj-$(CONFIG_MACH_MARZEN) += board-marzen.o
--obj-$(CONFIG_MACH_MARZEN_REFERENCE) += board-marzen-reference.o
- obj-$(CONFIG_MACH_LAGER) += board-lager.o
- obj-$(CONFIG_MACH_ARMADILLO800EVA) += board-armadillo800eva.o
- obj-$(CONFIG_MACH_ARMADILLO800EVA_REFERENCE) += board-armadillo800eva-reference.o
-diff --git a/arch/arm/mach-shmobile/Makefile.boot b/arch/arm/mach-shmobile/Makefile.boot
-index 918fccffa1b6..ebf97d4bcfd8 100644
---- a/arch/arm/mach-shmobile/Makefile.boot
-+++ b/arch/arm/mach-shmobile/Makefile.boot
-@@ -13,7 +13,6 @@ loadaddr-$(CONFIG_MACH_KZM9G_REFERENCE) += 0x41008000
- loadaddr-$(CONFIG_MACH_LAGER) += 0x40008000
- loadaddr-$(CONFIG_MACH_MACKEREL) += 0x40008000
- loadaddr-$(CONFIG_MACH_MARZEN) += 0x60008000
--loadaddr-$(CONFIG_MACH_MARZEN_REFERENCE) += 0x60008000
-
- __ZRELADDR := $(sort $(loadaddr-y))
- zreladdr-y += $(__ZRELADDR)
---
-2.1.2
-
diff --git a/patches.renesas/0860-ARM-shmobile-Let-Marzen-multiplatform-boot-with-Marz.patch b/patches.renesas/0860-ARM-shmobile-Let-Marzen-multiplatform-boot-with-Marz.patch
deleted file mode 100644
index 35faeaa27523c..0000000000000
--- a/patches.renesas/0860-ARM-shmobile-Let-Marzen-multiplatform-boot-with-Marz.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 9922329b887ce499f2fceb82907570257e2de572 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:10 +0900
-Subject: ARM: shmobile: Let Marzen multiplatform boot with Marzen DTB
-
-Let the multiplatform Marzen support boot with the legacy DTS for
-Marzen as well as the Marzen reference DTS.
-
-Based on work for the Koelsch board by Laurent Pinchart.
-
-Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 04d3e8a0b150f1931d48ed9168672a971fc4c761)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/Makefile | 2 +-
- arch/arm/mach-shmobile/board-marzen-reference.c | 1 +
- 2 files changed, 2 insertions(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
-index 776b3aa1d1a7..29cc71e9d81b 100644
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -262,7 +262,7 @@ dtb-$(CONFIG_ARCH_SHMOBILE_MULTI) += emev2-kzm9d.dtb \
- r8a7791-henninger.dtb \
- r8a7791-koelsch.dtb \
- r8a7790-lager.dtb \
-- r8a7779-marzen-reference.dtb
-+ r8a7779-marzen.dtb
- dtb-$(CONFIG_ARCH_SOCFPGA) += socfpga_arria5_socdk.dtb \
- socfpga_cyclone5_socdk.dtb \
- socfpga_cyclone5_sockit.dtb \
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 3017040c68be..46936ff2627e 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -66,6 +66,7 @@ static void __init marzen_init(void)
- }
-
- static const char *marzen_boards_compat_dt[] __initdata = {
-+ "renesas,marzen",
- "renesas,marzen-reference",
- NULL,
- };
---
-2.1.2
-
diff --git a/patches.renesas/0861-ARM-shmobile-Remove-Marzen-reference-DTS.patch b/patches.renesas/0861-ARM-shmobile-Remove-Marzen-reference-DTS.patch
deleted file mode 100644
index 88f30eba63832..0000000000000
--- a/patches.renesas/0861-ARM-shmobile-Remove-Marzen-reference-DTS.patch
+++ /dev/null
@@ -1,150 +0,0 @@
-From bcc6ee375d8127d307c8a6de53f33dc10e3ad3c0 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:11 +0900
-Subject: ARM: shmobile: Remove Marzen reference DTS
-
-Now that the DTS file r8a7779-marzen.dts can be used with
-board-marzen.c and board-marzen-reference.c, proceed with removing
-r8a7779-marzen-reference.dts.
-
-Based on work for the Koelsch board by Laurent Pinchart.
-
-Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 47ad265dd443802ead3d7e1aa3ef60ff1a8da952)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen-reference.dts | 121 -------------------------
- 1 file changed, 121 deletions(-)
- delete mode 100644 arch/arm/boot/dts/r8a7779-marzen-reference.dts
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen-reference.dts b/arch/arm/boot/dts/r8a7779-marzen-reference.dts
-deleted file mode 100644
-index b27c6373ff4d..000000000000
---- a/arch/arm/boot/dts/r8a7779-marzen-reference.dts
-+++ /dev/null
-@@ -1,121 +0,0 @@
--/*
-- * Reference Device Tree Source for the Marzen board
-- *
-- * Copyright (C) 2013 Renesas Solutions Corp.
-- * Copyright (C) 2013 Simon Horman
-- *
-- * This file is licensed under the terms of the GNU General Public License
-- * version 2. This program is licensed "as is" without any warranty of any
-- * kind, whether express or implied.
-- */
--
--/dts-v1/;
--#include "r8a7779.dtsi"
--#include <dt-bindings/gpio/gpio.h>
--#include <dt-bindings/interrupt-controller/irq.h>
--
--/ {
-- model = "marzen";
-- compatible = "renesas,marzen-reference", "renesas,r8a7779";
--
-- chosen {
-- bootargs = "console=ttySC2,115200 earlyprintk=sh-sci.2,115200 ignore_loglevel root=/dev/nfs ip=on rw";
-- };
--
-- memory {
-- device_type = "memory";
-- reg = <0x60000000 0x40000000>;
-- };
--
-- fixedregulator3v3: fixedregulator@0 {
-- compatible = "regulator-fixed";
-- regulator-name = "fixed-3.3V";
-- regulator-min-microvolt = <3300000>;
-- regulator-max-microvolt = <3300000>;
-- regulator-boot-on;
-- regulator-always-on;
-- };
--
-- lan0@18000000 {
-- compatible = "smsc,lan9220", "smsc,lan9115";
-- reg = <0x18000000 0x100>;
-- pinctrl-0 = <&lan0_pins>;
-- pinctrl-names = "default";
--
-- phy-mode = "mii";
-- interrupt-parent = <&irqpin0>;
-- interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
-- smsc,irq-push-pull;
-- reg-io-width = <4>;
-- vddvario-supply = <&fixedregulator3v3>;
-- vdd33a-supply = <&fixedregulator3v3>;
-- };
--
-- leds {
-- compatible = "gpio-leds";
-- led2 {
-- gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
-- };
-- led3 {
-- gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
-- };
-- led4 {
-- gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
-- };
-- };
--};
--
--&irqpin0 {
-- status = "okay";
--};
--
--&pfc {
-- pinctrl-0 = <&scif2_pins &scif4_pins>;
-- pinctrl-names = "default";
--
-- lan0_pins: lan0 {
-- intc {
-- renesas,groups = "intc_irq1_b";
-- renesas,function = "intc";
-- };
-- lbsc {
-- renesas,groups = "lbsc_ex_cs0";
-- renesas,function = "lbsc";
-- };
-- };
--
-- scif2_pins: serial2 {
-- renesas,groups = "scif2_data_c";
-- renesas,function = "scif2";
-- };
--
-- scif4_pins: serial4 {
-- renesas,groups = "scif4_data";
-- renesas,function = "scif4";
-- };
--
-- sdhi0_pins: sd0 {
-- renesas,groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd";
-- renesas,function = "sdhi0";
-- };
--
-- hspi0_pins: hspi0 {
-- renesas,groups = "hspi0";
-- renesas,function = "hspi0";
-- };
--};
--
--&sdhi0 {
-- pinctrl-0 = <&sdhi0_pins>;
-- pinctrl-names = "default";
--
-- vmmc-supply = <&fixedregulator3v3>;
-- bus-width = <4>;
-- status = "okay";
--};
--
--&hspi0 {
-- pinctrl-0 = <&hspi0_pins>;
-- pinctrl-names = "default";
-- status = "okay";
--};
---
-2.1.2
-
diff --git a/patches.renesas/0862-ARM-shmobile-marzen-reference-Remove-legacy-clock-su.patch b/patches.renesas/0862-ARM-shmobile-marzen-reference-Remove-legacy-clock-su.patch
deleted file mode 100644
index 9da7decec97ec..0000000000000
--- a/patches.renesas/0862-ARM-shmobile-marzen-reference-Remove-legacy-clock-su.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From b5df1d2a11d27776f061bcbd22a8da97f3222c1c Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:32:12 +0900
-Subject: ARM: shmobile: marzen-reference: Remove legacy clock support
-
-Marzen DT reference is now only built for multiplatform
-which means that CCF comes with the package. Remove unused legacy
-code ifdefs to clean up the code.
-
-Based on similar work for the Koelsch board by Magnus Damm.
-
-Cc: Magnus Damm <damm@opensource.se>
-Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit f0b78f8b63fe92242232b7a3e4aa951983ee1f45)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 8 --------
- 1 file changed, 8 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 46936ff2627e..1b63686e0160 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -31,13 +31,10 @@
-
- static void __init marzen_init_timer(void)
- {
--#ifdef CONFIG_COMMON_CLK
- r8a7779_clocks_init(r8a7779_read_mode_pins());
--#endif
- clocksource_of_init();
- }
-
--#ifdef CONFIG_COMMON_CLK
- /*
- * This is a really crude hack to provide clkdev support to platform
- * devices until they get moved to DT.
-@@ -51,15 +48,10 @@ static const struct clk_name clk_names[] __initconst = {
- { "scif5", NULL, "sh-sci.5" },
- { "tmu0", "fck", "sh-tmu.0" },
- };
--#endif
-
- static void __init marzen_init(void)
- {
--#ifdef CONFIG_COMMON_CLK
- shmobile_clk_workaround(clk_names, ARRAY_SIZE(clk_names), false);
--#else
-- r8a7779_clock_init();
--#endif
- r8a7779_add_standard_devices_dt();
- of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
- r8a7779_init_irq_extpin_dt(1); /* IRQ1 as individual interrupt */
---
-2.1.2
-
diff --git a/patches.renesas/0863-ARM-shmobile-r8a7779-Add-Maximum-CPU-Frequency-to-DT.patch b/patches.renesas/0863-ARM-shmobile-r8a7779-Add-Maximum-CPU-Frequency-to-DT.patch
deleted file mode 100644
index 1e418742fc013..0000000000000
--- a/patches.renesas/0863-ARM-shmobile-r8a7779-Add-Maximum-CPU-Frequency-to-DT.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 14fc4e182d5ceaaae6ccf9d169f006d31a59d223 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 16 May 2014 13:42:58 +0900
-Subject: ARM: shmobile: r8a7779: Add Maximum CPU Frequency to DTS
-
-Add 1GHz to the r8a7779 DTS to describe the maximum CPU frequency.
-
-Based on work by Magnus dam for the r8a7740 SoC.
-
-Cc: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6b060f93fe7dedbeb067feacbc8c4780c59f5df4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index bdaaadcfa1f1..038c16a18373 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -26,21 +26,25 @@
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <0>;
-+ clock-frequency = <1000000000>;
- };
- cpu@1 {
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <1>;
-+ clock-frequency = <1000000000>;
- };
- cpu@2 {
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <2>;
-+ clock-frequency = <1000000000>;
- };
- cpu@3 {
- device_type = "cpu";
- compatible = "arm,cortex-a9";
- reg = <3>;
-+ clock-frequency = <1000000000>;
- };
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0864-ARM-shmobile-r8a7779-Use-DT-CPU-Frequency-in-common-.patch b/patches.renesas/0864-ARM-shmobile-r8a7779-Use-DT-CPU-Frequency-in-common-.patch
deleted file mode 100644
index e4dbf3d01b600..0000000000000
--- a/patches.renesas/0864-ARM-shmobile-r8a7779-Use-DT-CPU-Frequency-in-common-.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From f946e872a566e7a7dc6e25590b8ea98342d41bc5 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 16 May 2014 13:42:59 +0900
-Subject: ARM: shmobile: r8a7779: Use DT CPU Frequency in common case
-
-Convert the common C-code-less r8a7779 DT board support
-to use shmobile_init_delay() to be able to migrate away
-from per-SoC delay setup functions.
-
-Based on work by Magnus dam for the r8a7740 SoC.
-
-Cc: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0157b62674aa3db1fc574bb65e6b0e30bb0683d7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/setup-r8a7779.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index 188f0df510be..a03bfec15d96 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -773,7 +773,7 @@ static const char *r8a7779_compat_dt[] __initdata = {
-
- DT_MACHINE_START(R8A7779_DT, "Generic R8A7779 (Flattened Device Tree)")
- .map_io = r8a7779_map_io,
-- .init_early = r8a7779_init_delay,
-+ .init_early = shmobile_init_delay,
- .nr_irqs = NR_IRQS_LEGACY,
- .init_irq = r8a7779_init_irq_dt,
- .init_machine = r8a7779_add_standard_devices_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0865-ARM-shmobile-marzen-reference-Use-DT-CPU-Frequency.patch b/patches.renesas/0865-ARM-shmobile-marzen-reference-Use-DT-CPU-Frequency.patch
deleted file mode 100644
index a283de919b84c..0000000000000
--- a/patches.renesas/0865-ARM-shmobile-marzen-reference-Use-DT-CPU-Frequency.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 63503da0431c7ad7b75f3684254eb4d55ff8e1a9 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 16 May 2014 13:43:00 +0900
-Subject: ARM: shmobile: marzen-reference: Use DT CPU Frequency
-
-Convert the Marzen DT reference board support to use shmobile_init_delay()
-to be able to migrate away from per-SoC delay setup functions.
-
-Based on work for the Armadillo800 EVA board by Magnus Damm.
-
-Cc: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 17ed9efd8afdd8c38f19ff72f08e71c1fd2376e3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 1b63686e0160..bb2df32f597a 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -66,7 +66,7 @@ static const char *marzen_boards_compat_dt[] __initdata = {
- DT_MACHINE_START(MARZEN, "marzen")
- .smp = smp_ops(r8a7779_smp_ops),
- .map_io = r8a7779_map_io,
-- .init_early = r8a7779_init_delay,
-+ .init_early = shmobile_init_delay,
- .init_time = marzen_init_timer,
- .nr_irqs = NR_IRQS_LEGACY,
- .init_irq = r8a7779_init_irq_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0866-ARM-shmobile-r8a7779-Remove-unused-r8a7779_init_dela.patch b/patches.renesas/0866-ARM-shmobile-r8a7779-Remove-unused-r8a7779_init_dela.patch
deleted file mode 100644
index 140b3b1adb1cf..0000000000000
--- a/patches.renesas/0866-ARM-shmobile-r8a7779-Remove-unused-r8a7779_init_dela.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 0f8adf43ba5d4cafb23900f08eb1d3a11a3361b6 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 16 May 2014 13:43:01 +0900
-Subject: ARM: shmobile: r8a7779: Remove unused r8a7779_init_delay()
-
-Remove the now unused r8a7779_init_delay() function.
-
-Based on work for the r8a7740 SoC by Magnus Damm.
-
-Cc: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit daab540e3a2afeb8c087a67dfaee5aa50a29e844)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/include/mach/r8a7779.h | 1 -
- arch/arm/mach-shmobile/setup-r8a7779.c | 5 -----
- 2 files changed, 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-index 5ef0bad6334d..5415c719dc19 100644
---- a/arch/arm/mach-shmobile/include/mach/r8a7779.h
-+++ b/arch/arm/mach-shmobile/include/mach/r8a7779.h
-@@ -10,7 +10,6 @@ enum {
- HPBDMA_SLAVE_SDHI0_RX,
- };
-
--extern void r8a7779_init_delay(void);
- extern void r8a7779_init_irq_extpin(int irlm);
- extern void r8a7779_init_irq_extpin_dt(int irlm);
- extern void r8a7779_init_irq_dt(void);
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index a03bfec15d96..c10ded91f477 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -737,11 +737,6 @@ void __init r8a7779_init_irq_dt(void)
- __raw_writel(0x003fee3f, INT2SMSKCR4);
- }
-
--void __init r8a7779_init_delay(void)
--{
-- shmobile_setup_delay(1000, 2, 4); /* Cortex-A9 @ 1000MHz */
--}
--
- void __init r8a7779_add_standard_devices_dt(void)
- {
- platform_add_devices(r8a7779_devices_dt,
---
-2.1.2
-
diff --git a/patches.renesas/0867-ARM-shmobile-r8a7779-dtsi-Update-unit-addresses-for-.patch b/patches.renesas/0867-ARM-shmobile-r8a7779-dtsi-Update-unit-addresses-for-.patch
deleted file mode 100644
index adb0265fdde2a..0000000000000
--- a/patches.renesas/0867-ARM-shmobile-r8a7779-dtsi-Update-unit-addresses-for-.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 8f42f4ffe61723135abb6b9c9d1d9b1dc9013de1 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 23 May 2014 09:46:20 +0200
-Subject: ARM: shmobile: r8a7779 dtsi: Update unit-addresses for clocks
-
- - Correct the unit-address for the "cpg_clocks" node,
- - Add missing unit-addresses for the "mstp*_clks" nodes,
- - Rename "cpg_clocks" and "mstp*_clks" nodes to the more generic
- "clocks".
-
-Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2909b8746d6f5534aa7714d2df110b3633a59556)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index 038c16a18373..27bf2274ff08 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -298,7 +298,7 @@
- };
-
- /* Special CPG clocks */
-- cpg_clocks: cpg_clocks@0xe6150000 {
-+ cpg_clocks: clocks@ffc80000 {
- compatible = "renesas,r8a7779-cpg-clocks";
- reg = <0 0xffc80000 0 0x30>;
- clocks = <&extal_clk>;
-@@ -342,7 +342,7 @@
- };
-
- /* Gate clocks */
-- mstp0_clks: mstp0_clks {
-+ mstp0_clks: clocks@ffc80030 {
- compatible = "renesas,r8a7779-mstp-clocks",
- "renesas,cpg-mstp-clocks";
- reg = <0 0xffc80030 0 4>;
-@@ -379,7 +379,7 @@
- "scif1", "scif0", "i2c3", "i2c2", "i2c1",
- "i2c0";
- };
-- mstp1_clks: mstp1_clks {
-+ mstp1_clks: clocks@ffc80034 {
- compatible = "renesas,r8a7779-mstp-clocks",
- "renesas,cpg-mstp-clocks";
- reg = <0 0xffc80034 0 4>, <0 0xffc80044 0 4>;
-@@ -408,7 +408,7 @@
- "ether", "sata",
- "pcie", "vin3";
- };
-- mstp3_clks: mstp3_clks {
-+ mstp3_clks: clocks@ffc8003c {
- compatible = "renesas,r8a7779-mstp-clocks",
- "renesas,cpg-mstp-clocks";
- reg = <0 0xffc8003c 0 4>;
---
-2.1.2
-
diff --git a/patches.renesas/0868-ARM-shmobile-r8a7779-dtsi-Correct-address-cells-size.patch b/patches.renesas/0868-ARM-shmobile-r8a7779-dtsi-Correct-address-cells-size.patch
deleted file mode 100644
index d45daf4553726..0000000000000
--- a/patches.renesas/0868-ARM-shmobile-r8a7779-dtsi-Correct-address-cells-size.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From ff1ccb59257af159744db0d96cf4a84cc78aa156 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 23 May 2014 09:46:19 +0200
-Subject: ARM: shmobile: r8a7779 dtsi: Correct #address-cells/#size-cells for
- clocks
-
-Warning (ranges_format): /clocks has empty "ranges" property but its #address-cells (2) differs from / (1)
-Warning (ranges_format): /clocks has empty "ranges" property but its #size-cells (2) differs from / (1)
-
-As r8a7779 doesn't support LPAE, change #address-cells and #size-cells from
-"<2>" to "<1>", and update the affected "reg" properties to fix this.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5cc8afcbc47c5f33732fb1a4b37a35841e7494e8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index 27bf2274ff08..61d08f42456c 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -284,8 +284,8 @@
- };
-
- clocks {
-- #address-cells = <2>;
-- #size-cells = <2>;
-+ #address-cells = <1>;
-+ #size-cells = <1>;
- ranges;
-
- /* External root clock */
-@@ -300,7 +300,7 @@
- /* Special CPG clocks */
- cpg_clocks: clocks@ffc80000 {
- compatible = "renesas,r8a7779-cpg-clocks";
-- reg = <0 0xffc80000 0 0x30>;
-+ reg = <0xffc80000 0x30>;
- clocks = <&extal_clk>;
- #clock-cells = <1>;
- clock-output-names = "plla", "z", "zs", "s",
-@@ -345,7 +345,7 @@
- mstp0_clks: clocks@ffc80030 {
- compatible = "renesas,r8a7779-mstp-clocks",
- "renesas,cpg-mstp-clocks";
-- reg = <0 0xffc80030 0 4>;
-+ reg = <0xffc80030 4>;
- clocks = <&cpg_clocks R8A7779_CLK_S>,
- <&cpg_clocks R8A7779_CLK_P>,
- <&cpg_clocks R8A7779_CLK_P>,
-@@ -382,7 +382,7 @@
- mstp1_clks: clocks@ffc80034 {
- compatible = "renesas,r8a7779-mstp-clocks",
- "renesas,cpg-mstp-clocks";
-- reg = <0 0xffc80034 0 4>, <0 0xffc80044 0 4>;
-+ reg = <0xffc80034 4>, <0xffc80044 4>;
- clocks = <&cpg_clocks R8A7779_CLK_P>,
- <&cpg_clocks R8A7779_CLK_P>,
- <&cpg_clocks R8A7779_CLK_S>,
-@@ -411,7 +411,7 @@
- mstp3_clks: clocks@ffc8003c {
- compatible = "renesas,r8a7779-mstp-clocks",
- "renesas,cpg-mstp-clocks";
-- reg = <0 0xffc8003c 0 4>;
-+ reg = <0xffc8003c 4>;
- clocks = <&s4_clk>, <&s4_clk>, <&s4_clk>, <&s4_clk>,
- <&s4_clk>, <&s4_clk>;
- #clock-cells = <1>;
---
-2.1.2
-
diff --git a/patches.renesas/0869-ARM-shmobile-r8a7779-Add-scif-nodes-to-dtsi.patch b/patches.renesas/0869-ARM-shmobile-r8a7779-Add-scif-nodes-to-dtsi.patch
deleted file mode 100644
index 38cec613ff444..0000000000000
--- a/patches.renesas/0869-ARM-shmobile-r8a7779-Add-scif-nodes-to-dtsi.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From ccb5d46d4f7294f184037e9009019c44a6bfb060 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:39:30 +0900
-Subject: ARM: shmobile: r8a7779: Add scif nodes to dtsi
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fd953b89f44e541bc584a65ba046d1b4cf77840f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 60 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index 61d08f42456c..94e2fc836492 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -196,6 +196,66 @@
- status = "disabled";
- };
-
-+ scif0: serial@ffe40000 {
-+ compatible = "renesas,scif-r8a7779", "renesas,scif";
-+ reg = <0xffe40000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 88 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif1: serial@ffe41000 {
-+ compatible = "renesas,scif-r8a7779", "renesas,scif";
-+ reg = <0xffe41000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 89 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif2: serial@ffe42000 {
-+ compatible = "renesas,scif-r8a7779", "renesas,scif";
-+ reg = <0xffe42000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 90 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif3: serial@ffe43000 {
-+ compatible = "renesas,scif-r8a7779", "renesas,scif";
-+ reg = <0xffe43000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 91 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif4: serial@ffe44000 {
-+ compatible = "renesas,scif-r8a7779", "renesas,scif";
-+ reg = <0xffe44000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 92 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
-+ scif5: serial@ffe45000 {
-+ compatible = "renesas,scif-r8a7779", "renesas,scif";
-+ reg = <0xffe45000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 93 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&cpg_clocks R8A7779_CLK_P>;
-+ clock-names = "sci_ick";
-+ status = "disabled";
-+ };
-+
- pfc: pfc@fffc0000 {
- compatible = "renesas,pfc-r8a7779";
- reg = <0xfffc0000 0x23c>;
---
-2.1.2
-
diff --git a/patches.renesas/0870-ARM-shmobile-marzen-Initialise-SCIF-devices-using-DT.patch b/patches.renesas/0870-ARM-shmobile-marzen-Initialise-SCIF-devices-using-DT.patch
deleted file mode 100644
index 1458b865b6746..0000000000000
--- a/patches.renesas/0870-ARM-shmobile-marzen-Initialise-SCIF-devices-using-DT.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From fbb241e6e911c6a1c65d4c4d720b72983c3255d1 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:39:32 +0900
-Subject: ARM: shmobile: marzen: Initialise SCIF devices using DT
-
-Initialise SCIF devices using DT when booting marzen
-using multiplatform.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 6d4abd79c80742629477479b01077bb92eccdd53)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen.dts | 22 +++++++++++++++++++---
- arch/arm/mach-shmobile/setup-r8a7779.c | 8 ++++----
- 2 files changed, 23 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
-index 321290828eee..20b176807848 100644
---- a/arch/arm/boot/dts/r8a7779-marzen.dts
-+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
-@@ -18,6 +18,11 @@
- model = "marzen";
- compatible = "renesas,marzen", "renesas,r8a7779";
-
-+ aliases {
-+ serial2 = &scif2;
-+ serial4 = &scif4;
-+ };
-+
- chosen {
- bootargs = "console=ttySC2,115200 ignore_loglevel root=/dev/nfs ip=on";
- };
-@@ -74,9 +79,6 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scif2_pins &scif4_pins>;
-- pinctrl-names = "default";
--
- lan0_pins: lan0 {
- intc {
- renesas,groups = "intc_irq1_b";
-@@ -109,6 +111,20 @@
- };
- };
-
-+&scif2 {
-+ pinctrl-0 = <&scif2_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
-+&scif4 {
-+ pinctrl-0 = <&scif4_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
- &sdhi0 {
- pinctrl-0 = <&sdhi0_pins>;
- pinctrl-names = "default";
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index c10ded91f477..219050ec9640 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -640,16 +640,16 @@ static void __init r8a7779_register_hpb_dmae(void)
- }
-
- static struct platform_device *r8a7779_devices_dt[] __initdata = {
-+ &tmu0_device,
-+};
-+
-+static struct platform_device *r8a7779_standard_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &scif2_device,
- &scif3_device,
- &scif4_device,
- &scif5_device,
-- &tmu0_device,
--};
--
--static struct platform_device *r8a7779_standard_devices[] __initdata = {
- &i2c0_device,
- &i2c1_device,
- &i2c2_device,
---
-2.1.2
-
diff --git a/patches.renesas/0871-ARM-shmobile-marzen-Do-not-use-workaround-for-scif-d.patch b/patches.renesas/0871-ARM-shmobile-marzen-Do-not-use-workaround-for-scif-d.patch
deleted file mode 100644
index 56aab96072508..0000000000000
--- a/patches.renesas/0871-ARM-shmobile-marzen-Do-not-use-workaround-for-scif-d.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 087395ac5cb06d30a3b28ced0c2ac969790ca89a Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 15 May 2014 20:39:33 +0900
-Subject: ARM: shmobile: marzen: Do not use workaround for scif devices
-
-Now that SCIF devices are initialised using DT it should
-not be necessary to use the work around to provide clocks any more.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c1a0f9932b66b2298163c31f8ac3f2844476e1c2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 6 ------
- 1 file changed, 6 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index bb2df32f597a..0a000b74ac6d 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -40,12 +40,6 @@ static void __init marzen_init_timer(void)
- * devices until they get moved to DT.
- */
- static const struct clk_name clk_names[] __initconst = {
-- { "scif0", NULL, "sh-sci.0" },
-- { "scif1", NULL, "sh-sci.1" },
-- { "scif2", NULL, "sh-sci.2" },
-- { "scif3", NULL, "sh-sci.3" },
-- { "scif4", NULL, "sh-sci.4" },
-- { "scif5", NULL, "sh-sci.5" },
- { "tmu0", "fck", "sh-tmu.0" },
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0872-ARM-shmobile-r8a7790-add-USB3.0-clocks-to-device-tre.patch b/patches.renesas/0872-ARM-shmobile-r8a7790-add-USB3.0-clocks-to-device-tre.patch
deleted file mode 100644
index 76b0b820ed698..0000000000000
--- a/patches.renesas/0872-ARM-shmobile-r8a7790-add-USB3.0-clocks-to-device-tre.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 7866364853766b255612e976a4dab7d9610e5e94 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Tue, 3 Jun 2014 15:54:19 +0900
-Subject: ARM: shmobile: r8a7790: add USB3.0 clocks to device tree
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 35b5da7b0abfda695924bef011995031f4f3dcfe)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 7ff29601f962..e2c7d6df5be4 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -754,17 +754,17 @@
- reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
- clocks = <&hp_clk>, <&cp_clk>, <&mmc1_clk>, <&sd3_clk>,
- <&sd2_clk>, <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, <&mmc0_clk>,
-- <&hp_clk>, <&hp_clk>, <&rclk_clk>;
-+ <&hp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7790_CLK_IIC2 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
- R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 R8A7790_CLK_MMCIF0
-- R8A7790_CLK_IIC0 R8A7790_CLK_IIC1 R8A7790_CLK_CMT1
-+ R8A7790_CLK_IIC0 R8A7790_CLK_IIC1 R8A7790_CLK_SSUSB R8A7790_CLK_CMT1
- >;
- clock-output-names =
- "iic2", "tpu0", "mmcif1", "sdhi3",
- "sdhi2", "sdhi1", "sdhi0", "mmcif0",
-- "iic0", "iic1", "cmt1";
-+ "iic0", "iic1", "ssusb", "cmt1";
- };
- mstp5_clks: mstp5_clks@e6150144 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0873-ARM-shmobile-r8a7791-add-USB3.0-clocks-to-device-tre.patch b/patches.renesas/0873-ARM-shmobile-r8a7791-add-USB3.0-clocks-to-device-tre.patch
deleted file mode 100644
index 9b6c9525ec8a8..0000000000000
--- a/patches.renesas/0873-ARM-shmobile-r8a7791-add-USB3.0-clocks-to-device-tre.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 7214ffa85b9b8a19c0dcbfc93229fd47f2be055d Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Tue, 3 Jun 2014 15:57:05 +0900
-Subject: ARM: shmobile: r8a7791: add USB3.0 clocks to device tree
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 308f306283894a0d3eeee7d1030289e4e668d49d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 79f68acfd5d4..48056baa8dd8 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -758,15 +758,15 @@
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
- clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7791_CLK_SD0>,
-- <&mmc0_clk>, <&hp_clk>, <&hp_clk>, <&rclk_clk>;
-+ <&mmc0_clk>, <&hp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1 R8A7791_CLK_SDHI0
-- R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_IIC1 R8A7791_CLK_CMT1
-+ R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_IIC1 R8A7791_CLK_SSUSB R8A7791_CLK_CMT1
- >;
- clock-output-names =
- "tpu0", "sdhi2", "sdhi1", "sdhi0",
-- "mmcif0", "i2c7", "i2c8", "cmt1";
-+ "mmcif0", "i2c7", "i2c8", "ssusb", "cmt1";
- };
- mstp5_clks: mstp5_clks@e6150144 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0874-ARM-shmobile-r8a7791-dtsi-add-SYS-DMAC-clocks.patch b/patches.renesas/0874-ARM-shmobile-r8a7791-dtsi-add-SYS-DMAC-clocks.patch
deleted file mode 100644
index 23688d56510f3..0000000000000
--- a/patches.renesas/0874-ARM-shmobile-r8a7791-dtsi-add-SYS-DMAC-clocks.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 8267816a7d7c1aaa631fcc58aacf8364cfb76b2e Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 2 Jun 2014 15:42:07 +0200
-Subject: ARM: shmobile: r8a7791 dtsi: add SYS-DMAC clocks
-
-Add clocks for the SYS-DMAC0 and SYS-DMAC1 hardware blocks.
-
-Cfr. the r8a7790 version by Ben Dooks.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4e074bc8114f0ba8a2e0a69fb459564814c9e966)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 48056baa8dd8..15dc67e94f28 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -743,16 +743,19 @@
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe6150138 0 4>, <0 0xe6150040 0 4>;
- clocks = <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>, <&mp_clk>,
-- <&mp_clk>, <&mp_clk>, <&mp_clk>;
-+ <&mp_clk>, <&mp_clk>, <&mp_clk>,
-+ <&zs_clk>, <&zs_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7791_CLK_SCIFA2 R8A7791_CLK_SCIFA1 R8A7791_CLK_SCIFA0
- R8A7791_CLK_MSIOF2 R8A7791_CLK_SCIFB0 R8A7791_CLK_SCIFB1
- R8A7791_CLK_MSIOF1 R8A7791_CLK_SCIFB2
-+ R8A7791_CLK_SYS_DMAC1 R8A7791_CLK_SYS_DMAC0
- >;
- clock-output-names =
- "scifa2", "scifa1", "scifa0", "msiof2", "scifb0",
-- "scifb1", "msiof1", "scifb2";
-+ "scifb1", "msiof1", "scifb2",
-+ "sys-dmac1", "sys-dmac0";
- };
- mstp3_clks: mstp3_clks@e615013c {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
---
-2.1.2
-
diff --git a/patches.renesas/0875-ARM-shmobile-lager-Add-VDD-MPU-regulator-for-DVFS.patch b/patches.renesas/0875-ARM-shmobile-lager-Add-VDD-MPU-regulator-for-DVFS.patch
deleted file mode 100644
index 64cfd701ce68e..0000000000000
--- a/patches.renesas/0875-ARM-shmobile-lager-Add-VDD-MPU-regulator-for-DVFS.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 6c39b8a9c8f47d552fa6ae9ad28aef66459df22b Mon Sep 17 00:00:00 2001
-From: Benoit Cousson <bcousson@baylibre.com>
-Date: Tue, 3 Jun 2014 21:02:12 +0900
-Subject: ARM: shmobile: lager: Add VDD MPU regulator for DVFS
-
-The CA15 cluster is capable of voltage scaling. Add the regulator
-in the i2c3 node, to allow the generic CPUFreq driver to use it.
-
-Enable the i2c3 pin mux and the device node as well since the
-da9210 is connected to that bus.
-
-Note: In R-CAR Gen2, each frequency is using the same voltage,
-and DVS control is not used. Therefore, this patch set the
-voltage(Vmin/Vmax) to 1000mv.
-
-Signed-off-by: Benoit Cousson <bcousson@baylibre.com>
-[gaku.inami.xw@bp.renesas.com: Changes Vmin for disabling DVS]
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 05f72e03b7553958609d1475c79491f90e6b50d3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 9becef78c797..8428204d9512 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -204,6 +204,11 @@
- "msiof1_tx";
- renesas,function = "msiof1";
- };
-+
-+ i2c3_pins: i2c3 {
-+ renesas,groups = "i2c3";
-+ renesas,function = "i2c3";
-+ };
- };
-
- &ether {
-@@ -317,3 +322,19 @@
- cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>;
- status = "okay";
- };
-+
-+&i2c3 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&i2c3_pins>;
-+ status = "okay";
-+
-+ vdd_dvfs: regulator@68 {
-+ compatible = "diasemi,da9210";
-+ reg = <0x68>;
-+
-+ regulator-min-microvolt = <1000000>;
-+ regulator-max-microvolt = <1000000>;
-+ regulator-boot-on;
-+ regulator-always-on;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0876-ARM-shmobile-r8a7790-lager-dts-Add-DVFS-parameters-i.patch b/patches.renesas/0876-ARM-shmobile-r8a7790-lager-dts-Add-DVFS-parameters-i.patch
deleted file mode 100644
index c8a042044cfdc..0000000000000
--- a/patches.renesas/0876-ARM-shmobile-r8a7790-lager-dts-Add-DVFS-parameters-i.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From 271f89812cd7d4f735f2bbb931a7884a30ca4bd1 Mon Sep 17 00:00:00 2001
-From: Benoit Cousson <bcousson@baylibre.com>
-Date: Tue, 3 Jun 2014 21:02:24 +0900
-Subject: ARM: shmobile: r8a7790/lager dts: Add DVFS parameters into cpu0 node
- for r8a7790
-
-Add needed information inside CPU0 for the generic cpufreq-cpu0 driver.
-
-- voltage-tolerance = 1%
- It reflects the tolerance for the CPU voltage defined inside the OPP
- table. Due to the lack of proper OPP definition, use an arbitrary safe
- value.
-- clock-latency = 300 us
- Approximate worst-case latency to do a full DVFS transition for every
- OPPs. Due to the lack of HW information, use an arbitrary safe value.
- Note: The term transition-latency will be more accurate to define this
- value since the clock transition latency is not the only parameter that
- will define the overall DVFS transition.
-- operating-points = < kHz - uV >
- List of 6 operating points. All of them are using the same voltage
- since the valid Vmin voltage is not documented in the HW spec.
-- clocks
- phandle to the CPU clock source. This clock source is used for all the
- 4 CortexA15 located inside the same cluster.
-
-Signed-off-by: Benoit Cousson <bcousson+renesas@baylibre.com>
-[gaku.inami.xw@bp.renesas.com: Change the setting of OPPs for ES2.0]
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit b989e1386385466761f703b8a91e00468bb5ca2a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 4 ++++
- arch/arm/boot/dts/r8a7790.dtsi | 11 +++++++++++
- 2 files changed, 15 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 8428204d9512..b9cbeda87530 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -338,3 +338,7 @@
- regulator-always-on;
- };
- };
-+
-+&cpu0 {
-+ cpu0-supply = <&vdd_dvfs>;
-+};
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index e2c7d6df5be4..e990d3c4fe62 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -44,6 +44,17 @@
- compatible = "arm,cortex-a15";
- reg = <0>;
- clock-frequency = <1300000000>;
-+ voltage-tolerance = <1>; /* 1% */
-+ clocks = <&cpg_clocks R8A7790_CLK_Z>;
-+ clock-latency = <300000>; /* 300 us */
-+
-+ /* kHz - uV - OPPs unknown yet */
-+ operating-points = <1400000 1000000>,
-+ <1225000 1000000>,
-+ <1050000 1000000>,
-+ < 875000 1000000>,
-+ < 700000 1000000>,
-+ < 350000 1000000>;
- };
-
- cpu1: cpu@1 {
---
-2.1.2
-
diff --git a/patches.renesas/0877-ARM-shmobile-koelsch-dts-Add-VDD-MPU-regulator-for-D.patch b/patches.renesas/0877-ARM-shmobile-koelsch-dts-Add-VDD-MPU-regulator-for-D.patch
deleted file mode 100644
index 2452ed5d1d8ee..0000000000000
--- a/patches.renesas/0877-ARM-shmobile-koelsch-dts-Add-VDD-MPU-regulator-for-D.patch
+++ /dev/null
@@ -1,63 +0,0 @@
-From 953a3a3b6d767a422a0acafcdd26a9b8e0b19dce Mon Sep 17 00:00:00 2001
-From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Date: Tue, 3 Jun 2014 21:02:59 +0900
-Subject: ARM: shmobile: koelsch dts: Add VDD MPU regulator for DVFS
-
-The CA15 cluster is capable of voltage scaling. Add the regulator
-in the i2c6 node, to allow the generic CPUFreq driver to use it.
-
-Enable the i2c6 pin mux and the device node as well since the
-da9210 is connected to that bus.
-
-Note: In R-CAR Gen2, each frequency is using the same voltage,
-and DVS control is not used. Therefore, this patch set the
-voltage(Vmin/Vmax) to 1000mv.
-
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1d41f36a68c0f4e9b01d563ce33bab5201858b54)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 21 +++++++++++++++++++++
- 1 file changed, 21 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 05d44f9b202f..95331d73042d 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -293,6 +293,11 @@
- "msiof0_tx";
- renesas,function = "msiof0";
- };
-+
-+ i2c6_pins: i2c6 {
-+ renesas,groups = "i2c6";
-+ renesas,function = "i2c6";
-+ };
- };
-
- &ether {
-@@ -408,3 +413,19 @@
- spi-cpha;
- };
- };
-+
-+&i2c6 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&i2c6_pins>;
-+ status = "okay";
-+
-+ vdd_dvfs: regulator@68 {
-+ compatible = "diasemi,da9210";
-+ reg = <0x68>;
-+
-+ regulator-min-microvolt = <1000000>;
-+ regulator-max-microvolt = <1000000>;
-+ regulator-boot-on;
-+ regulator-always-on;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0878-ARM-shmobile-r8a7791-koelsch-dts-Add-DVFS-parameters.patch b/patches.renesas/0878-ARM-shmobile-r8a7791-koelsch-dts-Add-DVFS-parameters.patch
deleted file mode 100644
index 22e0f1f247be1..0000000000000
--- a/patches.renesas/0878-ARM-shmobile-r8a7791-koelsch-dts-Add-DVFS-parameters.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From f77fae69a8b387ef34ea8371674b1f92ac55013b Mon Sep 17 00:00:00 2001
-From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Date: Tue, 3 Jun 2014 21:03:10 +0900
-Subject: ARM: shmobile: r8a7791/koelsch dts: Add DVFS parameters into cpu0
- node for r8a7791
-
-Add needed information inside CPU0 for the generic cpufreq-cpu0 driver.
-
-- voltage-tolerance = 1%
- It reflects the tolerance for the CPU voltage defined inside the OPP
- table. Due to the lack of proper OPP definition, use an arbitrary safe
- value.
-- clock-latency = 300 us
- Approximate worst-case latency to do a full DVFS transition for every
- OPPs. Due to the lack of HW information, use an arbitrary safe value.
- Note: The term transition-latency will be more accurate to define this
- value since the clock transition latency is not the only parameter that
- will define the overall DVFS transition.
-- operating-points = < kHz - uV >
- List of 6 operating points. All of them are using the same voltage
- since DVS is not supported in R-CAR Gen2.
-- clocks
- phandle to the CPU clock source. This clock source is used for all the
- 2 CortexA15 located inside the same cluster.
-
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Magnus Damm <damm@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a57004eca542428a444025847098b2af4e52a81c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 4 ++++
- arch/arm/boot/dts/r8a7791.dtsi | 11 +++++++++++
- 2 files changed, 15 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 95331d73042d..b2e661613dda 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -429,3 +429,7 @@
- regulator-always-on;
- };
- };
-+
-+&cpu0 {
-+ cpu0-supply = <&vdd_dvfs>;
-+};
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 15dc67e94f28..76150f1a82db 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -45,6 +45,17 @@
- compatible = "arm,cortex-a15";
- reg = <0>;
- clock-frequency = <1500000000>;
-+ voltage-tolerance = <1>; /* 1% */
-+ clocks = <&cpg_clocks R8A7791_CLK_Z>;
-+ clock-latency = <300000>; /* 300 us */
-+
-+ /* kHz - uV - OPPs unknown yet */
-+ operating-points = <1500000 1000000>,
-+ <1312500 1000000>,
-+ <1125000 1000000>,
-+ < 937500 1000000>,
-+ < 750000 1000000>,
-+ < 375000 1000000>;
- };
-
- cpu1: cpu@1 {
---
-2.1.2
-
diff --git a/patches.renesas/0879-ARM-shmobile-lager-enable-i2c-devices.patch b/patches.renesas/0879-ARM-shmobile-lager-enable-i2c-devices.patch
deleted file mode 100644
index 9cd0572404579..0000000000000
--- a/patches.renesas/0879-ARM-shmobile-lager-enable-i2c-devices.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From b1a63d9861ae058ce5629facadf25a6342ebc528 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 12 Feb 2014 17:04:33 +0000
-Subject: ARM: shmobile: lager: enable i2c devices
-
-Add i2c0, i2c1, i2c2 and i2c3 nodes to the Lager reference device tree as
-these busses all have devices on them that can be probed even if they
-are no drivers yet.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-[horms+renesas@verge.net.au: Added shmobile to title]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit e489c2a9bc82713167d9f721ca764f4b0d37e543)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 16 ++++++++++++++++
- 1 file changed, 16 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index b9cbeda87530..7840b60596b0 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -342,3 +342,19 @@
- &cpu0 {
- cpu0-supply = <&vdd_dvfs>;
- };
-+
-+&i2c0 {
-+ status = "ok";
-+};
-+
-+&i2c1 {
-+ status = "ok";
-+};
-+
-+&i2c2 {
-+ status = "ok";
-+};
-+
-+&i2c3 {
-+ status = "ok";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0880-ARM-shmobile-lager-add-i2c1-i2c2-pins.patch b/patches.renesas/0880-ARM-shmobile-lager-add-i2c1-i2c2-pins.patch
deleted file mode 100644
index 5ac2b7662799a..0000000000000
--- a/patches.renesas/0880-ARM-shmobile-lager-add-i2c1-i2c2-pins.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From b11b8f456e720206a1e8eaf8753eddf2cc970cfc Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Wed, 12 Feb 2014 17:04:34 +0000
-Subject: ARM: shmobile: lager: add i2c1, i2c2 pins
-
-Add pinctrl definitions for i2c1 and i2c2 busses on the Lager board
-to ensure these are setup correctly at initialisation time. The i2c0
-and i2c3 busses are connected to single function pins.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-[horms+renesas@verge.net.au: Added shmobile to patch title]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit e1a2c4eb132018ce5b988c9ff5ba7a01e5494af5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 14 ++++++++++++++
- 1 file changed, 14 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 7840b60596b0..c72372484548 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -144,6 +144,16 @@
- states = <3300000 1
- 1800000 0>;
- };
-+
-+ i2c1_pins: i2c1 {
-+ renesas,groups = "i2c1";
-+ renesas,function = "i2c1";
-+ };
-+
-+ i2c2_pins: i2c2 {
-+ renesas,groups = "i2c2";
-+ renesas,function = "i2c2";
-+ };
- };
-
- &extal_clk {
-@@ -349,10 +359,14 @@
-
- &i2c1 {
- status = "ok";
-+ pinctrl-0 = <&i2c1_pins>;
-+ pinctrl-names = "default";
- };
-
- &i2c2 {
- status = "ok";
-+ pinctrl-0 = <&i2c2_pins>;
-+ pinctrl-names = "default";
- };
-
- &i2c3 {
---
-2.1.2
-
diff --git a/patches.renesas/0881-ARM-shmobile-lager-Move-i2c-12-_pins-nodes-to-pfc-no.patch b/patches.renesas/0881-ARM-shmobile-lager-Move-i2c-12-_pins-nodes-to-pfc-no.patch
deleted file mode 100644
index 4c53b11bdcc2b..0000000000000
--- a/patches.renesas/0881-ARM-shmobile-lager-Move-i2c-12-_pins-nodes-to-pfc-no.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 58710ff548ad5c07b53bbfee0115d998c92adfb4 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Fri, 6 Jun 2014 16:11:00 +0900
-Subject: ARM: shmobile: lager: Move i2c[12]_pins nodes to pfc node
-
-Due to an error when resolving conflicts df40f256b18300e1 ("ARM: shmobile:
-lager: add i2c1, i2c2 pins") added the i2c[12]_pins nodes to the wrong
-node.
-
-This patch moves them to their correct location in the pfc node.
-
-Cc: Ben Dooks <ben.dooks@codethink.co.uk>
-Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d90bf60ceaf453b59c8cd5dbfa59538e27255706)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 20 ++++++++++----------
- 1 file changed, 10 insertions(+), 10 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index c72372484548..85a5107c9396 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -144,16 +144,6 @@
- states = <3300000 1
- 1800000 0>;
- };
--
-- i2c1_pins: i2c1 {
-- renesas,groups = "i2c1";
-- renesas,function = "i2c1";
-- };
--
-- i2c2_pins: i2c2 {
-- renesas,groups = "i2c2";
-- renesas,function = "i2c2";
-- };
- };
-
- &extal_clk {
-@@ -215,6 +205,16 @@
- renesas,function = "msiof1";
- };
-
-+ i2c1_pins: i2c1 {
-+ renesas,groups = "i2c1";
-+ renesas,function = "i2c1";
-+ };
-+
-+ i2c2_pins: i2c2 {
-+ renesas,groups = "i2c2";
-+ renesas,function = "i2c2";
-+ };
-+
- i2c3_pins: i2c3 {
- renesas,groups = "i2c3";
- renesas,function = "i2c3";
---
-2.1.2
-
diff --git a/patches.renesas/0882-ARM-shmobile-Lager-memory-map-update.patch b/patches.renesas/0882-ARM-shmobile-Lager-memory-map-update.patch
deleted file mode 100644
index d2707f63ee95b..0000000000000
--- a/patches.renesas/0882-ARM-shmobile-Lager-memory-map-update.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From ebb9dad7ea2f0b119c90116c96a40b2ee1dd37a2 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 15:40:26 +0900
-Subject: ARM: shmobile: Lager memory map update
-
-Update the Lager DTS to make use of the new unified legacy
-memory map where the legacy window on Lager and Koelsch
-have the same size.
-
-With this change in place the code gets aligned with the
-documentation.
-
-After update the Lager board has the following map:
-Bank0: 1GiB RAM (Legacy 32-bit: 0x40000000->0x7fffffff)
-Bank1: 3GiB RAM (LPAE area: 0x140000000->0x1ffffffff)
-
-Before the update the old map looked like this:
-Bank0: 2GiB RAM (Legacy 32-bit: 0x40000000->0xbfffffff)
-Bank1: 2GiB RAM (LPAE area: 0x180000000->0x1ffffffff)
-
-Tested with and without LPAE on r8a7790 Lager.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7b16c61a86ce41edd5c42a87f22a0a146968b62f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 85a5107c9396..295a60e0c60e 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -29,12 +29,12 @@
-
- memory@40000000 {
- device_type = "memory";
-- reg = <0 0x40000000 0 0x80000000>;
-+ reg = <0 0x40000000 0 0x40000000>;
- };
-
- memory@180000000 {
- device_type = "memory";
-- reg = <1 0x80000000 0 0x80000000>;
-+ reg = <1 0x40000000 0 0xc0000000>;
- };
-
- lbsc {
---
-2.1.2
-
diff --git a/patches.renesas/0883-ARM-shmobile-lager-Remove-duplicate-i2c3-nodes.patch b/patches.renesas/0883-ARM-shmobile-lager-Remove-duplicate-i2c3-nodes.patch
deleted file mode 100644
index 7cdd2bcfbae8a..0000000000000
--- a/patches.renesas/0883-ARM-shmobile-lager-Remove-duplicate-i2c3-nodes.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From dd5545b283f5e04f64057b3e4e470b8a524be73b Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 9 Jun 2014 11:09:44 +0900
-Subject: ARM: shmobile: lager: Remove duplicate i2c3 nodes
-
-Due to an error when merging df40f256b18300e1 ("ARM: shmobile:
-lager: add i2c1, i2c2 pins") a duplicate i2c3 node.
-
-This patch moves the duplicate and moves to old node to
-be closer to the other new i2c nodes.
-
-Cc: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit aca4ec446c646d8794fdbf617d187423a227305d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 32 ++++++++++++++------------------
- 1 file changed, 14 insertions(+), 18 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 295a60e0c60e..850dff8aedb9 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -333,22 +333,6 @@
- status = "okay";
- };
-
--&i2c3 {
-- pinctrl-names = "default";
-- pinctrl-0 = <&i2c3_pins>;
-- status = "okay";
--
-- vdd_dvfs: regulator@68 {
-- compatible = "diasemi,da9210";
-- reg = <0x68>;
--
-- regulator-min-microvolt = <1000000>;
-- regulator-max-microvolt = <1000000>;
-- regulator-boot-on;
-- regulator-always-on;
-- };
--};
--
- &cpu0 {
- cpu0-supply = <&vdd_dvfs>;
- };
-@@ -369,6 +353,18 @@
- pinctrl-names = "default";
- };
-
--&i2c3 {
-- status = "ok";
-+&i2c3 {
-+ pinctrl-names = "default";
-+ pinctrl-0 = <&i2c3_pins>;
-+ status = "okay";
-+
-+ vdd_dvfs: regulator@68 {
-+ compatible = "diasemi,da9210";
-+ reg = <0x68>;
-+
-+ regulator-min-microvolt = <1000000>;
-+ regulator-max-microvolt = <1000000>;
-+ regulator-boot-on;
-+ regulator-always-on;
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0884-ARM-shmobile-koelsch-Remove-duplicate-i2c6-nodes.patch b/patches.renesas/0884-ARM-shmobile-koelsch-Remove-duplicate-i2c6-nodes.patch
deleted file mode 100644
index 6c7a5cc4d4c84..0000000000000
--- a/patches.renesas/0884-ARM-shmobile-koelsch-Remove-duplicate-i2c6-nodes.patch
+++ /dev/null
@@ -1,78 +0,0 @@
-From 468f6529187cc6aebdfc765cae46988ce599434e Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 9 Jun 2014 17:50:28 +0900
-Subject: ARM: shmobile: koelsch: Remove duplicate i2c6 nodes
-
-A second i2c6 node was a added by
-05e234a187058ee ("ARM: shmobile: koelsch dts: Add VDD MPU regulator for
-DVFS"). Merge this into the existing node.
-
-Also shuffle i2c nodes so they are all together.
-
-Cc: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 897dfdbc14603d764637dea92696fef4fc66ea3e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 34 +++++++++++++++-------------------
- 1 file changed, 15 insertions(+), 19 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index b2e661613dda..b0cfbd48e299 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -215,25 +215,6 @@
- clock-frequency = <20000000>;
- };
-
--&i2c2 {
-- pinctrl-0 = <&i2c2_pins>;
-- pinctrl-names = "default";
--
-- status = "okay";
-- clock-frequency = <400000>;
--
-- eeprom@50 {
-- compatible = "renesas,24c02";
-- reg = <0x50>;
-- pagesize = <16>;
-- };
--};
--
--&i2c6 {
-- status = "okay";
-- clock-frequency = <100000>;
--};
--
- &pfc {
- pinctrl-0 = <&du_pins>;
- pinctrl-names = "default";
-@@ -414,10 +395,25 @@
- };
- };
-
-+&i2c2 {
-+ pinctrl-0 = <&i2c2_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+ clock-frequency = <400000>;
-+
-+ eeprom@50 {
-+ compatible = "renesas,24c02";
-+ reg = <0x50>;
-+ pagesize = <16>;
-+ };
-+};
-+
- &i2c6 {
- pinctrl-names = "default";
- pinctrl-0 = <&i2c6_pins>;
- status = "okay";
-+ clock-frequency = <100000>;
-
- vdd_dvfs: regulator@68 {
- compatible = "diasemi,da9210";
---
-2.1.2
-
diff --git a/patches.renesas/0885-ARM-shmobile-henninger-add-I2C2-DT-support.patch b/patches.renesas/0885-ARM-shmobile-henninger-add-I2C2-DT-support.patch
deleted file mode 100644
index d2a02d506e825..0000000000000
--- a/patches.renesas/0885-ARM-shmobile-henninger-add-I2C2-DT-support.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From eda1d9af2bd8d1e4220be16b4605b96b03b0a06c Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Wed, 11 Jun 2014 02:45:21 +0400
-Subject: ARM: shmobile: henninger: add I2C2 DT support
-
-Define the Henninger board dependent part of the I2C2 device node.
-
-Based on the Koelsch I2C2 device tree patch by Wolfram Sang.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 29a647c396a054b087b124372ffb261f40ee9856)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 13 +++++++++++++
- 1 file changed, 13 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index cc6d992e8db2..c0c58ce7746e 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -110,6 +110,11 @@
- renesas,function = "sdhi2";
- };
-
-+ i2c2_pins: i2c2 {
-+ renesas,groups = "i2c2";
-+ renesas,function = "i2c2";
-+ };
-+
- qspi_pins: spi0 {
- renesas,groups = "qspi_ctrl", "qspi_data4";
- renesas,function = "qspi";
-@@ -170,6 +175,14 @@
- status = "okay";
- };
-
-+&i2c2 {
-+ pinctrl-0 = <&i2c2_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+ clock-frequency = <400000>;
-+};
-+
- &qspi {
- pinctrl-0 = <&qspi_pins>;
- pinctrl-names = "default";
---
-2.1.2
-
diff --git a/patches.renesas/0886-ARM-shmobile-r8a7790-add-MSTP10-support-on-DTSI.patch b/patches.renesas/0886-ARM-shmobile-r8a7790-add-MSTP10-support-on-DTSI.patch
deleted file mode 100644
index 78f5b79af8336..0000000000000
--- a/patches.renesas/0886-ARM-shmobile-r8a7790-add-MSTP10-support-on-DTSI.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 8141a04d1e78325976cd0e110f767df1020a74ad Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 10 Jun 2014 23:53:27 -0700
-Subject: ARM: shmobile: r8a7790: add MSTP10 support on DTSI
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bcde37225438687231bb9510c07e60dcb8db1988)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 33 +++++++++++++++++++++++++++++++
- include/dt-bindings/clock/r8a7790-clock.h | 26 ++++++++++++++++++++++++
- 2 files changed, 59 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index e990d3c4fe62..0f83bd778a3d 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -835,6 +835,39 @@
- "rcan1", "rcan0", "qspi_mod", "iic3",
- "i2c3", "i2c2", "i2c1", "i2c0";
- };
-+ mstp10_clks: mstp10_clks@e6150998 {
-+ compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
-+ reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
-+ clocks = <&p_clk>,
-+ <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-+ <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-+ <&p_clk>,
-+ <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7790_CLK_SCU_ALL>, <&mstp10_clks R8A7790_CLK_SCU_ALL>;
-+
-+ #clock-cells = <1>;
-+ clock-indices = <
-+ R8A7790_CLK_SSI_ALL
-+ R8A7790_CLK_SSI9 R8A7790_CLK_SSI8 R8A7790_CLK_SSI7 R8A7790_CLK_SSI6 R8A7790_CLK_SSI5
-+ R8A7790_CLK_SSI4 R8A7790_CLK_SSI3 R8A7790_CLK_SSI2 R8A7790_CLK_SSI1 R8A7790_CLK_SSI0
-+ R8A7790_CLK_SCU_ALL
-+ R8A7790_CLK_SCU_DVC1 R8A7790_CLK_SCU_DVC0
-+ R8A7790_CLK_SCU_SRC9 R8A7790_CLK_SCU_SRC8 R8A7790_CLK_SCU_SRC7 R8A7790_CLK_SCU_SRC6 R8A7790_CLK_SCU_SRC5
-+ R8A7790_CLK_SCU_SRC4 R8A7790_CLK_SCU_SRC3 R8A7790_CLK_SCU_SRC2 R8A7790_CLK_SCU_SRC1 R8A7790_CLK_SCU_SRC0
-+ >;
-+ clock-output-names =
-+ "ssi-all",
-+ "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
-+ "ssi4", "ssi3", "ssi2", "ssi1", "ssi0",
-+ "scu-all",
-+ "scu-dvc1", "scu-dvc0",
-+ "scu-src9", "scu-src8", "scu-src7", "scu-src6", "scu-src5",
-+ "scu-src4", "scu-src3", "scu-src2", "scu-src1", "scu-src0";
-+ };
- };
-
- qspi: spi@e6b10000 {
-diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
-index 1118f7a4bca6..a16df68ac97d 100644
---- a/include/dt-bindings/clock/r8a7790-clock.h
-+++ b/include/dt-bindings/clock/r8a7790-clock.h
-@@ -107,4 +107,30 @@
- #define R8A7790_CLK_I2C1 30
- #define R8A7790_CLK_I2C0 31
-
-+/* MSTP10 */
-+#define R8A7790_CLK_SSI_ALL 5
-+#define R8A7790_CLK_SSI9 6
-+#define R8A7790_CLK_SSI8 7
-+#define R8A7790_CLK_SSI7 8
-+#define R8A7790_CLK_SSI6 9
-+#define R8A7790_CLK_SSI5 10
-+#define R8A7790_CLK_SSI4 11
-+#define R8A7790_CLK_SSI3 12
-+#define R8A7790_CLK_SSI2 13
-+#define R8A7790_CLK_SSI1 14
-+#define R8A7790_CLK_SSI0 15
-+#define R8A7790_CLK_SCU_ALL 17
-+#define R8A7790_CLK_SCU_DVC1 18
-+#define R8A7790_CLK_SCU_DVC0 19
-+#define R8A7790_CLK_SCU_SRC9 22
-+#define R8A7790_CLK_SCU_SRC8 23
-+#define R8A7790_CLK_SCU_SRC7 24
-+#define R8A7790_CLK_SCU_SRC6 25
-+#define R8A7790_CLK_SCU_SRC5 26
-+#define R8A7790_CLK_SCU_SRC4 27
-+#define R8A7790_CLK_SCU_SRC3 28
-+#define R8A7790_CLK_SCU_SRC2 29
-+#define R8A7790_CLK_SCU_SRC1 30
-+#define R8A7790_CLK_SCU_SRC0 31
-+
- #endif /* __DT_BINDINGS_CLOCK_R8A7790_H__ */
---
-2.1.2
-
diff --git a/patches.renesas/0887-ARM-shmobile-r8a7790-add-R-Car-sound-support-on-DTSI.patch b/patches.renesas/0887-ARM-shmobile-r8a7790-add-R-Car-sound-support-on-DTSI.patch
deleted file mode 100644
index 8e5feccf50305..0000000000000
--- a/patches.renesas/0887-ARM-shmobile-r8a7790-add-R-Car-sound-support-on-DTSI.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 88e60285385948593de549a38c33d5cc0553d9e8 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 10 Jun 2014 23:53:54 -0700
-Subject: ARM: shmobile: r8a7790: add R-Car sound support on DTSI
-
-This patch support PIO transfer only at this point
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7df2fd572b9f159657a145f3fdd700d3e00760d9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 56 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 56 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 0f83bd778a3d..29907c9d8e5b 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -920,4 +920,60 @@
- #size-cells = <0>;
- status = "disabled";
- };
-+
-+ rcar_sound: rcar_sound@0xec500000 {
-+ #sound-dai-cells = <1>;
-+ compatible = "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2", "renesas,rcar_sound";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xec500000 0 0x1000>, /* SCU */
-+ <0 0xec5a0000 0 0x100>, /* ADG */
-+ <0 0xec540000 0 0x1000>, /* SSIU */
-+ <0 0xec541000 0 0x1280>; /* SSI */
-+ clocks = <&mstp10_clks R8A7790_CLK_SSI_ALL>,
-+ <&mstp10_clks R8A7790_CLK_SSI9>, <&mstp10_clks R8A7790_CLK_SSI8>,
-+ <&mstp10_clks R8A7790_CLK_SSI7>, <&mstp10_clks R8A7790_CLK_SSI6>,
-+ <&mstp10_clks R8A7790_CLK_SSI5>, <&mstp10_clks R8A7790_CLK_SSI4>,
-+ <&mstp10_clks R8A7790_CLK_SSI3>, <&mstp10_clks R8A7790_CLK_SSI2>,
-+ <&mstp10_clks R8A7790_CLK_SSI1>, <&mstp10_clks R8A7790_CLK_SSI0>,
-+ <&mstp10_clks R8A7790_CLK_SCU_SRC9>, <&mstp10_clks R8A7790_CLK_SCU_SRC8>,
-+ <&mstp10_clks R8A7790_CLK_SCU_SRC7>, <&mstp10_clks R8A7790_CLK_SCU_SRC6>,
-+ <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
-+ <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
-+ <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
-+ <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
-+ clock-names = "ssi-all",
-+ "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
-+ "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
-+ "src.9", "src.8", "src.7", "src.6", "src.5",
-+ "src.4", "src.3", "src.2", "src.1", "src.0",
-+ "clk_a", "clk_b", "clk_c", "clk_i";
-+
-+ status = "disabled";
-+
-+ rcar_sound,src {
-+ src0: src@0 { };
-+ src1: src@1 { };
-+ src2: src@2 { };
-+ src3: src@3 { };
-+ src4: src@4 { };
-+ src5: src@5 { };
-+ src6: src@6 { };
-+ src7: src@7 { };
-+ src8: src@8 { };
-+ src9: src@9 { };
-+ };
-+
-+ rcar_sound,ssi {
-+ ssi0: ssi@0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi1: ssi@1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi2: ssi@2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi3: ssi@3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi4: ssi@4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi5: ssi@5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi6: ssi@6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi7: ssi@7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi8: ssi@8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; };
-+ };
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0888-ARM-shmobile-r8a7791-add-audio-clock-on-DTSI.patch b/patches.renesas/0888-ARM-shmobile-r8a7791-add-audio-clock-on-DTSI.patch
deleted file mode 100644
index 18a612368739c..0000000000000
--- a/patches.renesas/0888-ARM-shmobile-r8a7791-add-audio-clock-on-DTSI.patch
+++ /dev/null
@@ -1,52 +0,0 @@
-From dd634c7f4d345e737f0706500fde1bcb699159b5 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 11 Jun 2014 21:44:04 -0700
-Subject: ARM: shmobile: r8a7791: add audio clock on DTSI
-
-audio_clk_a/b/c are required from sound driver
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0d3dbde84a45977cdd7d85115cd5ea1b4ede312e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 23 +++++++++++++++++++++++
- 1 file changed, 23 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 76150f1a82db..37a4ea7a1b06 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -532,6 +532,29 @@
- clock-output-names = "extal";
- };
-
-+ /*
-+ * The external audio clocks are configured as 0 Hz fixed frequency clocks by
-+ * default. Boards that provide audio clocks should override them.
-+ */
-+ audio_clk_a: audio_clk_a {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <0>;
-+ clock-output-names = "audio_clk_a";
-+ };
-+ audio_clk_b: audio_clk_b {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <0>;
-+ clock-output-names = "audio_clk_b";
-+ };
-+ audio_clk_c: audio_clk_c {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <0>;
-+ clock-output-names = "audio_clk_c";
-+ };
-+
- /* Special CPG clocks */
- cpg_clocks: cpg_clocks@e6150000 {
- compatible = "renesas,r8a7791-cpg-clocks",
---
-2.1.2
-
diff --git a/patches.renesas/0889-ARM-shmobile-r8a7791-add-MSTP10-support-on-DTSI.patch b/patches.renesas/0889-ARM-shmobile-r8a7791-add-MSTP10-support-on-DTSI.patch
deleted file mode 100644
index 50ba807745392..0000000000000
--- a/patches.renesas/0889-ARM-shmobile-r8a7791-add-MSTP10-support-on-DTSI.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From 4cc85e3f308373e235c347257dc1fa10da031e65 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 11 Jun 2014 21:44:16 -0700
-Subject: ARM: shmobile: r8a7791: add MSTP10 support on DTSI
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ee9141522dcf13f861ed3cef6490c6cbfaafefb9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 33 +++++++++++++++++++++++++++++++
- include/dt-bindings/clock/r8a7791-clock.h | 26 ++++++++++++++++++++++++
- 2 files changed, 59 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 37a4ea7a1b06..93b10cbdead8 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -865,6 +865,39 @@
- "rcan1", "rcan0", "qspi_mod", "i2c5", "i2c6", "i2c4", "i2c3", "i2c2",
- "i2c1", "i2c0";
- };
-+ mstp10_clks: mstp10_clks@e6150998 {
-+ compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
-+ reg = <0 0xe6150998 0 4>, <0 0xe61509a8 0 4>;
-+ clocks = <&p_clk>,
-+ <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-+ <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>, <&p_clk>,
-+ <&p_clk>,
-+ <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>,
-+ <&mstp10_clks R8A7791_CLK_SCU_ALL>, <&mstp10_clks R8A7791_CLK_SCU_ALL>;
-+
-+ #clock-cells = <1>;
-+ clock-indices = <
-+ R8A7791_CLK_SSI_ALL
-+ R8A7791_CLK_SSI9 R8A7791_CLK_SSI8 R8A7791_CLK_SSI7 R8A7791_CLK_SSI6 R8A7791_CLK_SSI5
-+ R8A7791_CLK_SSI4 R8A7791_CLK_SSI3 R8A7791_CLK_SSI2 R8A7791_CLK_SSI1 R8A7791_CLK_SSI0
-+ R8A7791_CLK_SCU_ALL
-+ R8A7791_CLK_SCU_DVC1 R8A7791_CLK_SCU_DVC0
-+ R8A7791_CLK_SCU_SRC9 R8A7791_CLK_SCU_SRC8 R8A7791_CLK_SCU_SRC7 R8A7791_CLK_SCU_SRC6 R8A7791_CLK_SCU_SRC5
-+ R8A7791_CLK_SCU_SRC4 R8A7791_CLK_SCU_SRC3 R8A7791_CLK_SCU_SRC2 R8A7791_CLK_SCU_SRC1 R8A7791_CLK_SCU_SRC0
-+ >;
-+ clock-output-names =
-+ "ssi-all",
-+ "ssi9", "ssi8", "ssi7", "ssi6", "ssi5",
-+ "ssi4", "ssi3", "ssi2", "ssi1", "ssi0",
-+ "scu-all",
-+ "scu-dvc1", "scu-dvc0",
-+ "scu-src9", "scu-src8", "scu-src7", "scu-src6", "scu-src5",
-+ "scu-src4", "scu-src3", "scu-src2", "scu-src1", "scu-src0";
-+ };
- mstp11_clks: mstp11_clks@e615099c {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe615099c 0 4>, <0 0xe61509ac 0 4>;
-diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
-index b050d18437ce..0410bea2ad1d 100644
---- a/include/dt-bindings/clock/r8a7791-clock.h
-+++ b/include/dt-bindings/clock/r8a7791-clock.h
-@@ -107,6 +107,32 @@
- #define R8A7791_CLK_I2C1 30
- #define R8A7791_CLK_I2C0 31
-
-+/* MSTP10 */
-+#define R8A7791_CLK_SSI_ALL 5
-+#define R8A7791_CLK_SSI9 6
-+#define R8A7791_CLK_SSI8 7
-+#define R8A7791_CLK_SSI7 8
-+#define R8A7791_CLK_SSI6 9
-+#define R8A7791_CLK_SSI5 10
-+#define R8A7791_CLK_SSI4 11
-+#define R8A7791_CLK_SSI3 12
-+#define R8A7791_CLK_SSI2 13
-+#define R8A7791_CLK_SSI1 14
-+#define R8A7791_CLK_SSI0 15
-+#define R8A7791_CLK_SCU_ALL 17
-+#define R8A7791_CLK_SCU_DVC1 18
-+#define R8A7791_CLK_SCU_DVC0 19
-+#define R8A7791_CLK_SCU_SRC9 22
-+#define R8A7791_CLK_SCU_SRC8 23
-+#define R8A7791_CLK_SCU_SRC7 24
-+#define R8A7791_CLK_SCU_SRC6 25
-+#define R8A7791_CLK_SCU_SRC5 26
-+#define R8A7791_CLK_SCU_SRC4 27
-+#define R8A7791_CLK_SCU_SRC3 28
-+#define R8A7791_CLK_SCU_SRC2 29
-+#define R8A7791_CLK_SCU_SRC1 30
-+#define R8A7791_CLK_SCU_SRC0 31
-+
- /* MSTP11 */
- #define R8A7791_CLK_SCIFA3 6
- #define R8A7791_CLK_SCIFA4 7
---
-2.1.2
-
diff --git a/patches.renesas/0890-ARM-shmobile-r8a7790-Add-PCIEC-clock-device-tree-nod.patch b/patches.renesas/0890-ARM-shmobile-r8a7790-Add-PCIEC-clock-device-tree-nod.patch
deleted file mode 100644
index 08db5b2a23cdf..0000000000000
--- a/patches.renesas/0890-ARM-shmobile-r8a7790-Add-PCIEC-clock-device-tree-nod.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 3dcc6bf490d9fcd9c8aa5aa3401bd55c0c4c7f4d Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:15 +0100
-Subject: ARM: shmobile: r8a7790: Add PCIEC clock device tree node
-
-This patch adds the device tree clock node for the PCIe Controller
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ecafea8cd261833d7bb857aad76cf2e721821e88)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 6 +++---
- include/dt-bindings/clock/r8a7790-clock.h | 1 +
- 2 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 29907c9d8e5b..9df57122e9c0 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -765,17 +765,17 @@
- reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
- clocks = <&hp_clk>, <&cp_clk>, <&mmc1_clk>, <&sd3_clk>,
- <&sd2_clk>, <&cpg_clocks R8A7790_CLK_SD1>, <&cpg_clocks R8A7790_CLK_SD0>, <&mmc0_clk>,
-- <&hp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
-+ <&hp_clk>, <&mp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7790_CLK_IIC2 R8A7790_CLK_TPU0 R8A7790_CLK_MMCIF1 R8A7790_CLK_SDHI3
- R8A7790_CLK_SDHI2 R8A7790_CLK_SDHI1 R8A7790_CLK_SDHI0 R8A7790_CLK_MMCIF0
-- R8A7790_CLK_IIC0 R8A7790_CLK_IIC1 R8A7790_CLK_SSUSB R8A7790_CLK_CMT1
-+ R8A7790_CLK_IIC0 R8A7790_CLK_PCIEC R8A7790_CLK_IIC1 R8A7790_CLK_SSUSB R8A7790_CLK_CMT1
- >;
- clock-output-names =
- "iic2", "tpu0", "mmcif1", "sdhi3",
- "sdhi2", "sdhi1", "sdhi0", "mmcif0",
-- "iic0", "iic1", "ssusb", "cmt1";
-+ "iic0", "pciec", "iic1", "ssusb", "cmt1";
- };
- mstp5_clks: mstp5_clks@e6150144 {
- compatible = "renesas,r8a7790-mstp-clocks", "renesas,cpg-mstp-clocks";
-diff --git a/include/dt-bindings/clock/r8a7790-clock.h b/include/dt-bindings/clock/r8a7790-clock.h
-index a16df68ac97d..f929a79e6998 100644
---- a/include/dt-bindings/clock/r8a7790-clock.h
-+++ b/include/dt-bindings/clock/r8a7790-clock.h
-@@ -59,6 +59,7 @@
- #define R8A7790_CLK_SDHI0 14
- #define R8A7790_CLK_MMCIF0 15
- #define R8A7790_CLK_IIC0 18
-+#define R8A7790_CLK_PCIEC 19
- #define R8A7790_CLK_IIC1 23
- #define R8A7790_CLK_SSUSB 28
- #define R8A7790_CLK_CMT1 29
---
-2.1.2
-
diff --git a/patches.renesas/0891-ARM-shmobile-r8a7790-Add-default-PCIe-bus-clock.patch b/patches.renesas/0891-ARM-shmobile-r8a7790-Add-default-PCIe-bus-clock.patch
deleted file mode 100644
index ab13c534e05b4..0000000000000
--- a/patches.renesas/0891-ARM-shmobile-r8a7790-Add-default-PCIe-bus-clock.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From cf7cda3b85cb2f6af13bc4160e2a4e2bb45640f4 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:16 +0100
-Subject: ARM: shmobile: r8a7790: Add default PCIe bus clock
-
-This patch adds a default PCIe bus clock node.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 51d17918077215cd93d78a2b13a3b57090eb1f3d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 9df57122e9c0..2c55c4b8295f 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -487,6 +487,15 @@
- clock-output-names = "extal";
- };
-
-+ /* External PCIe clock - can be overridden by the board */
-+ pcie_bus_clk: pcie_bus_clk {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <100000000>;
-+ clock-output-names = "pcie_bus";
-+ status = "disabled";
-+ };
-+
- /*
- * The external audio clocks are configured as 0 Hz fixed frequency clocks by
- * default. Boards that provide audio clocks should override them.
---
-2.1.2
-
diff --git a/patches.renesas/0892-ARM-shmobile-r8a7790-Add-PCIe-Controller-device-node.patch b/patches.renesas/0892-ARM-shmobile-r8a7790-Add-PCIe-Controller-device-node.patch
deleted file mode 100644
index 69e873856f5ef..0000000000000
--- a/patches.renesas/0892-ARM-shmobile-r8a7790-Add-PCIe-Controller-device-node.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 5f2821871db515f4020e78493244f8ffd13c22fe Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:17 +0100
-Subject: ARM: shmobile: r8a7790: Add PCIe Controller device node
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-[horms+renesas@verge.net.au: resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 745329d280c8c73f00724745693658f3d4113ea8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 2c55c4b8295f..994330e81a52 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -930,6 +930,31 @@
- status = "disabled";
- };
-
-+ pciec: pcie@fe000000 {
-+ compatible = "renesas,pcie-r8a7790";
-+ reg = <0 0xfe000000 0 0x80000>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ bus-range = <0x00 0xff>;
-+ device_type = "pci";
-+ ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-+ 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-+ 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-+ 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
-+ /* Map all possible DDR as inbound ranges */
-+ dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
-+ 0x43000000 1 0x80000000 1 0x80000000 0 0x80000000>;
-+ interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 117 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 118 IRQ_TYPE_LEVEL_HIGH>;
-+ #interrupt-cells = <1>;
-+ interrupt-map-mask = <0 0 0 0>;
-+ interrupt-map = <0 0 0 0 &gic 0 116 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7790_CLK_PCIEC>, <&pcie_bus_clk>;
-+ clock-names = "pcie", "pcie_bus";
-+ status = "disabled";
-+ };
-+
- rcar_sound: rcar_sound@0xec500000 {
- #sound-dai-cells = <1>;
- compatible = "renesas,rcar_sound-r8a7790", "renesas,rcar_sound-gen2", "renesas,rcar_sound";
---
-2.1.2
-
diff --git a/patches.renesas/0893-ARM-shmobile-r8a7791-Add-PCIEC-clock-device-tree-nod.patch b/patches.renesas/0893-ARM-shmobile-r8a7791-Add-PCIEC-clock-device-tree-nod.patch
deleted file mode 100644
index 323fb41a71a52..0000000000000
--- a/patches.renesas/0893-ARM-shmobile-r8a7791-Add-PCIEC-clock-device-tree-nod.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 99ddf2f0841dbdbdbf835b98574c82bfede4bfaa Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:18 +0100
-Subject: ARM: shmobile: r8a7791: Add PCIEC clock device tree node
-
-This patch adds the device tree clock node for the PCIe Controller
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4bfb37675b5343798f5260adad92a67444a9fd47)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 7 ++++---
- include/dt-bindings/clock/r8a7791-clock.h | 1 +
- 2 files changed, 5 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 93b10cbdead8..d1b8c4740c72 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -795,15 +795,16 @@
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
- reg = <0 0xe615013c 0 4>, <0 0xe6150048 0 4>;
- clocks = <&cp_clk>, <&sd2_clk>, <&sd1_clk>, <&cpg_clocks R8A7791_CLK_SD0>,
-- <&mmc0_clk>, <&hp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
-+ <&mmc0_clk>, <&hp_clk>, <&mp_clk>, <&hp_clk>, <&mp_clk>, <&rclk_clk>;
- #clock-cells = <1>;
- renesas,clock-indices = <
- R8A7791_CLK_TPU0 R8A7791_CLK_SDHI2 R8A7791_CLK_SDHI1 R8A7791_CLK_SDHI0
-- R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_IIC1 R8A7791_CLK_SSUSB R8A7791_CLK_CMT1
-+ R8A7791_CLK_MMCIF0 R8A7791_CLK_IIC0 R8A7791_CLK_PCIEC R8A7791_CLK_IIC1
-+ R8A7791_CLK_SSUSB R8A7791_CLK_CMT1
- >;
- clock-output-names =
- "tpu0", "sdhi2", "sdhi1", "sdhi0",
-- "mmcif0", "i2c7", "i2c8", "ssusb", "cmt1";
-+ "mmcif0", "i2c7", "pciec", "i2c8", "ssusb", "cmt1";
- };
- mstp5_clks: mstp5_clks@e6150144 {
- compatible = "renesas,r8a7791-mstp-clocks", "renesas,cpg-mstp-clocks";
-diff --git a/include/dt-bindings/clock/r8a7791-clock.h b/include/dt-bindings/clock/r8a7791-clock.h
-index 0410bea2ad1d..f0d4d1049162 100644
---- a/include/dt-bindings/clock/r8a7791-clock.h
-+++ b/include/dt-bindings/clock/r8a7791-clock.h
-@@ -53,6 +53,7 @@
- #define R8A7791_CLK_SDHI0 14
- #define R8A7791_CLK_MMCIF0 15
- #define R8A7791_CLK_IIC0 18
-+#define R8A7791_CLK_PCIEC 19
- #define R8A7791_CLK_IIC1 23
- #define R8A7791_CLK_SSUSB 28
- #define R8A7791_CLK_CMT1 29
---
-2.1.2
-
diff --git a/patches.renesas/0894-ARM-shmobile-r8a7791-Add-default-PCIe-bus-clock.patch b/patches.renesas/0894-ARM-shmobile-r8a7791-Add-default-PCIe-bus-clock.patch
deleted file mode 100644
index b04184728f689..0000000000000
--- a/patches.renesas/0894-ARM-shmobile-r8a7791-Add-default-PCIe-bus-clock.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From b3afe4f781baae681f4d520203cb80f2bd579177 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:19 +0100
-Subject: ARM: shmobile: r8a7791: Add default PCIe bus clock
-
-This patch adds a default PCIe bus clock node.
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-[horms+renesas@verge.net.au: resolved conflict]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 66c405e72bf332e59ab29461e33a4e94cb8bdd7a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index d1b8c4740c72..7c676b9786e1 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -555,6 +555,15 @@
- clock-output-names = "audio_clk_c";
- };
-
-+ /* External PCIe clock - can be overridden by the board */
-+ pcie_bus_clk: pcie_bus_clk {
-+ compatible = "fixed-clock";
-+ #clock-cells = <0>;
-+ clock-frequency = <100000000>;
-+ clock-output-names = "pcie_bus";
-+ status = "disabled";
-+ };
-+
- /* Special CPG clocks */
- cpg_clocks: cpg_clocks@e6150000 {
- compatible = "renesas,r8a7791-cpg-clocks",
---
-2.1.2
-
diff --git a/patches.renesas/0895-ARM-shmobile-r8a7791-Add-PCIe-Controller-device-node.patch b/patches.renesas/0895-ARM-shmobile-r8a7791-Add-PCIe-Controller-device-node.patch
deleted file mode 100644
index 318cfab22c80d..0000000000000
--- a/patches.renesas/0895-ARM-shmobile-r8a7791-Add-PCIe-Controller-device-node.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From 542c36a7b373d235a60c6394d307eb3364283959 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:20 +0100
-Subject: ARM: shmobile: r8a7791: Add PCIe Controller device node
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 811cdfae502137a21b91326ed6912a94d3dc7723)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 25 +++++++++++++++++++++++++
- 1 file changed, 25 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 7c676b9786e1..ddaebf346525 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -960,4 +960,29 @@
- #size-cells = <0>;
- status = "disabled";
- };
-+
-+ pciec: pcie@fe000000 {
-+ compatible = "renesas,pcie-r8a7791";
-+ reg = <0 0xfe000000 0 0x80000>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ bus-range = <0x00 0xff>;
-+ device_type = "pci";
-+ ranges = <0x01000000 0 0x00000000 0 0xfe100000 0 0x00100000
-+ 0x02000000 0 0xfe200000 0 0xfe200000 0 0x00200000
-+ 0x02000000 0 0x30000000 0 0x30000000 0 0x08000000
-+ 0x42000000 0 0x38000000 0 0x38000000 0 0x08000000>;
-+ /* Map all possible DDR as inbound ranges */
-+ dma-ranges = <0x42000000 0 0x40000000 0 0x40000000 0 0x80000000
-+ 0x43000000 2 0x00000000 2 0x00000000 1 0x00000000>;
-+ interrupts = <0 116 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 117 IRQ_TYPE_LEVEL_HIGH>,
-+ <0 118 IRQ_TYPE_LEVEL_HIGH>;
-+ #interrupt-cells = <1>;
-+ interrupt-map-mask = <0 0 0 0>;
-+ interrupt-map = <0 0 0 0 &gic 0 116 IRQ_TYPE_LEVEL_HIGH>;
-+ clocks = <&mstp3_clks R8A7791_CLK_PCIEC>, <&pcie_bus_clk>;
-+ clock-names = "pcie", "pcie_bus";
-+ status = "disabled";
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0896-ARM-shmobile-koelsch-Enable-PCIe-Controller-PCIe-bus.patch b/patches.renesas/0896-ARM-shmobile-koelsch-Enable-PCIe-Controller-PCIe-bus.patch
deleted file mode 100644
index a88ff6be0510d..0000000000000
--- a/patches.renesas/0896-ARM-shmobile-koelsch-Enable-PCIe-Controller-PCIe-bus.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From fec1a1b1d0f74f842b568f72bc939aab31428197 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:21 +0100
-Subject: ARM: shmobile: koelsch: Enable PCIe Controller & PCIe bus clock
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 998d7d64e1aeede4e03b6c67adb78fe55a278db7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index b0cfbd48e299..5dac67395525 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -426,6 +426,14 @@
- };
- };
-
-+&pcie_bus_clk {
-+ status = "okay";
-+};
-+
-+&pciec {
-+ status = "okay";
-+};
-+
- &cpu0 {
- cpu0-supply = <&vdd_dvfs>;
- };
---
-2.1.2
-
diff --git a/patches.renesas/0897-ARM-shmobile-henninger-Enable-PCIe-Controller-PCIe-b.patch b/patches.renesas/0897-ARM-shmobile-henninger-Enable-PCIe-Controller-PCIe-b.patch
deleted file mode 100644
index cedf4cffc5489..0000000000000
--- a/patches.renesas/0897-ARM-shmobile-henninger-Enable-PCIe-Controller-PCIe-b.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 2f214d8426321f32cfefb54687d0acbca711c554 Mon Sep 17 00:00:00 2001
-From: Phil Edworthy <phil.edworthy@renesas.com>
-Date: Fri, 13 Jun 2014 10:37:22 +0100
-Subject: ARM: shmobile: henninger: Enable PCIe Controller & PCIe bus clock
-
-Signed-off-by: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 485f3ce67c11ce086c322b2622db01d7e7c59a84)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index c0c58ce7746e..bc48bccfff54 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -230,3 +230,11 @@
- spi-cpha;
- };
- };
-+
-+&pcie_bus_clk {
-+ status = "okay";
-+};
-+
-+&pciec {
-+ status = "okay";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0898-ARM-shmobile-r8a7791-add-R-Car-sound-support-on-DTSI.patch b/patches.renesas/0898-ARM-shmobile-r8a7791-add-R-Car-sound-support-on-DTSI.patch
deleted file mode 100644
index f3d4303a2902a..0000000000000
--- a/patches.renesas/0898-ARM-shmobile-r8a7791-add-R-Car-sound-support-on-DTSI.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From e3be437a9703c9ecd2132ed8abb56cd84f53d585 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 11 Jun 2014 21:44:26 -0700
-Subject: ARM: shmobile: r8a7791: add R-Car sound support on DTSI
-
-This patch support PIO transfer only at this point
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 09abd1fd11f98d6abde9c23244234170e7e36c2f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 56 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 56 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index ddaebf346525..40bff5aaf986 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -985,4 +985,60 @@
- clock-names = "pcie", "pcie_bus";
- status = "disabled";
- };
-+
-+ rcar_sound: rcar_sound@0xec500000 {
-+ #sound-dai-cells = <1>;
-+ compatible = "renesas,rcar_sound-r8a7791", "renesas,rcar_sound-gen2", "renesas,rcar_sound";
-+ interrupt-parent = <&gic>;
-+ reg = <0 0xec500000 0 0x1000>, /* SCU */
-+ <0 0xec5a0000 0 0x100>, /* ADG */
-+ <0 0xec540000 0 0x1000>, /* SSIU */
-+ <0 0xec541000 0 0x1280>; /* SSI */
-+ clocks = <&mstp10_clks R8A7791_CLK_SSI_ALL>,
-+ <&mstp10_clks R8A7791_CLK_SSI9>, <&mstp10_clks R8A7791_CLK_SSI8>,
-+ <&mstp10_clks R8A7791_CLK_SSI7>, <&mstp10_clks R8A7791_CLK_SSI6>,
-+ <&mstp10_clks R8A7791_CLK_SSI5>, <&mstp10_clks R8A7791_CLK_SSI4>,
-+ <&mstp10_clks R8A7791_CLK_SSI3>, <&mstp10_clks R8A7791_CLK_SSI2>,
-+ <&mstp10_clks R8A7791_CLK_SSI1>, <&mstp10_clks R8A7791_CLK_SSI0>,
-+ <&mstp10_clks R8A7791_CLK_SCU_SRC9>, <&mstp10_clks R8A7791_CLK_SCU_SRC8>,
-+ <&mstp10_clks R8A7791_CLK_SCU_SRC7>, <&mstp10_clks R8A7791_CLK_SCU_SRC6>,
-+ <&mstp10_clks R8A7791_CLK_SCU_SRC5>, <&mstp10_clks R8A7791_CLK_SCU_SRC4>,
-+ <&mstp10_clks R8A7791_CLK_SCU_SRC3>, <&mstp10_clks R8A7791_CLK_SCU_SRC2>,
-+ <&mstp10_clks R8A7791_CLK_SCU_SRC1>, <&mstp10_clks R8A7791_CLK_SCU_SRC0>,
-+ <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
-+ clock-names = "ssi-all",
-+ "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
-+ "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
-+ "src.9", "src.8", "src.7", "src.6", "src.5",
-+ "src.4", "src.3", "src.2", "src.1", "src.0",
-+ "clk_a", "clk_b", "clk_c", "clk_i";
-+
-+ status = "disabled";
-+
-+ rcar_sound,src {
-+ src0: src@0 { };
-+ src1: src@1 { };
-+ src2: src@2 { };
-+ src3: src@3 { };
-+ src4: src@4 { };
-+ src5: src@5 { };
-+ src6: src@6 { };
-+ src7: src@7 { };
-+ src8: src@8 { };
-+ src9: src@9 { };
-+ };
-+
-+ rcar_sound,ssi {
-+ ssi0: ssi@0 { interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi1: ssi@1 { interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi2: ssi@2 { interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi3: ssi@3 { interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi4: ssi@4 { interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi5: ssi@5 { interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi6: ssi@6 { interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi7: ssi@7 { interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi8: ssi@8 { interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>; };
-+ ssi9: ssi@9 { interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>; };
-+ };
-+ };
- };
---
-2.1.2
-
diff --git a/patches.renesas/0899-ARM-shmobile-Enable-genmai-board-in-multiplatform-de.patch b/patches.renesas/0899-ARM-shmobile-Enable-genmai-board-in-multiplatform-de.patch
deleted file mode 100644
index e0b8364d4b57c..0000000000000
--- a/patches.renesas/0899-ARM-shmobile-Enable-genmai-board-in-multiplatform-de.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 21426f50ec857ca58e6b011e6a0cf201f481c577 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 16 Jun 2014 19:49:43 +0900
-Subject: ARM: shmobile: Enable genmai board in multiplatform defconfig
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c61010050d3baa3e1a3964bec7e62437d21107c6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index c4b72aa48e67..5f05e98eb762 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -10,9 +10,11 @@ CONFIG_PERF_EVENTS=y
- CONFIG_SLAB=y
- CONFIG_ARCH_SHMOBILE_MULTI=y
- CONFIG_ARCH_EMEV2=y
-+CONFIG_ARCH_R7S72100=y
- CONFIG_ARCH_R8A7779=y
- CONFIG_ARCH_R8A7790=y
- CONFIG_ARCH_R8A7791=y
-+CONFIG_MACH_GENMAI=y
- CONFIG_MACH_KOELSCH=y
- CONFIG_MACH_LAGER=y
- CONFIG_MACH_MARZEN=y
---
-2.1.2
-
diff --git a/patches.renesas/0900-ARM-shmobile-Move-r7s72100.h.patch b/patches.renesas/0900-ARM-shmobile-Move-r7s72100.h.patch
deleted file mode 100644
index 3d6114068121a..0000000000000
--- a/patches.renesas/0900-ARM-shmobile-Move-r7s72100.h.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From e63631c58b14ce2d1b481b88b511164ec3fb568d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:01 +0200
-Subject: ARM: shmobile: Move r7s72100.h
-
-Change location of r7s72100.h so it can be included using "r7s72100.h"
-instead of the old style <mach/r7s72100.h>.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 96bd090066e2150f3970b32f35895de2ab631c95)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-genmai-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-genmai.c | 4 +++-
- arch/arm/mach-shmobile/clock-r7s72100.c | 3 ++-
- arch/arm/mach-shmobile/{include/mach => }/r7s72100.h | 0
- arch/arm/mach-shmobile/setup-r7s72100.c | 4 +++-
- 5 files changed, 11 insertions(+), 4 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r7s72100.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-genmai-reference.c b/arch/arm/mach-shmobile/board-genmai-reference.c
-index c06dc5c12d1e..e5448f7b868a 100644
---- a/arch/arm/mach-shmobile/board-genmai-reference.c
-+++ b/arch/arm/mach-shmobile/board-genmai-reference.c
-@@ -20,11 +20,13 @@
-
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
--#include <mach/r7s72100.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "clock.h"
- #include "common.h"
-+#include "r7s72100.h"
-
- /*
- * This is a really crude hack to provide clkdev support to platform
-diff --git a/arch/arm/mach-shmobile/board-genmai.c b/arch/arm/mach-shmobile/board-genmai.c
-index a0994f36b348..e2a3ba4871c3 100644
---- a/arch/arm/mach-shmobile/board-genmai.c
-+++ b/arch/arm/mach-shmobile/board-genmai.c
-@@ -25,11 +25,13 @@
- #include <linux/sh_eth.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
--#include <mach/r7s72100.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r7s72100.h"
-
- /* Ether */
- static const struct sh_eth_plat_data ether_pdata __initconst = {
-diff --git a/arch/arm/mach-shmobile/clock-r7s72100.c b/arch/arm/mach-shmobile/clock-r7s72100.c
-index 457dab0f8fc9..3eb2ec401e0c 100644
---- a/arch/arm/mach-shmobile/clock-r7s72100.c
-+++ b/arch/arm/mach-shmobile/clock-r7s72100.c
-@@ -19,8 +19,9 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/r7s72100.h>
-+
- #include "common.h"
-+#include "r7s72100.h"
-
- /* Frequency Control Registers */
- #define FRQCR 0xfcfe0010
-diff --git a/arch/arm/mach-shmobile/include/mach/r7s72100.h b/arch/arm/mach-shmobile/r7s72100.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r7s72100.h
-rename to arch/arm/mach-shmobile/r7s72100.h
-diff --git a/arch/arm/mach-shmobile/setup-r7s72100.c b/arch/arm/mach-shmobile/setup-r7s72100.c
-index a55d68d89e6e..4a98b232d316 100644
---- a/arch/arm/mach-shmobile/setup-r7s72100.c
-+++ b/arch/arm/mach-shmobile/setup-r7s72100.c
-@@ -22,10 +22,12 @@
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/sh_timer.h>
--#include <mach/r7s72100.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r7s72100.h"
-
- static struct resource mtu2_resources[] __initdata = {
- DEFINE_RES_MEM(0xfcff0000, 0x400),
---
-2.1.2
-
diff --git a/patches.renesas/0901-ARM-shmobile-Move-r8a73a4.h.patch b/patches.renesas/0901-ARM-shmobile-Move-r8a73a4.h.patch
deleted file mode 100644
index 4128a821a7493..0000000000000
--- a/patches.renesas/0901-ARM-shmobile-Move-r8a73a4.h.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From 864a98221a7182b7ddc5e0ac3e93c7da23f921ef Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:02 +0200
-Subject: ARM: shmobile: Move r8a73a4.h
-
-Change location of r8a73a4.h so it can be included as "r8a73a4.h"
-instead of the old style <mach/r8a73a4.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fac49568b0d19e039e216ca6d13bc534ebf12c34)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-ape6evm-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-ape6evm.c | 4 +++-
- arch/arm/mach-shmobile/{include/mach => }/r8a73a4.h | 0
- arch/arm/mach-shmobile/setup-r8a73a4.c | 4 +++-
- 4 files changed, 9 insertions(+), 3 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r8a73a4.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-ape6evm-reference.c b/arch/arm/mach-shmobile/board-ape6evm-reference.c
-index 76e4ff14be68..2f7723e5fe91 100644
---- a/arch/arm/mach-shmobile/board-ape6evm-reference.c
-+++ b/arch/arm/mach-shmobile/board-ape6evm-reference.c
-@@ -24,10 +24,12 @@
- #include <linux/pinctrl/machine.h>
- #include <linux/platform_device.h>
- #include <linux/sh_clk.h>
--#include <mach/r8a73a4.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "common.h"
-+#include "r8a73a4.h"
-
- static void __init ape6evm_add_standard_devices(void)
- {
-diff --git a/arch/arm/mach-shmobile/board-ape6evm.c b/arch/arm/mach-shmobile/board-ape6evm.c
-index 8f8da25310e7..485567876d39 100644
---- a/arch/arm/mach-shmobile/board-ape6evm.c
-+++ b/arch/arm/mach-shmobile/board-ape6evm.c
-@@ -33,11 +33,13 @@
- #include <linux/regulator/machine.h>
- #include <linux/sh_clk.h>
- #include <linux/smsc911x.h>
--#include <mach/r8a73a4.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a73a4.h"
-
- /* LEDS */
- static struct gpio_led ape6evm_leds[] = {
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a73a4.h b/arch/arm/mach-shmobile/r8a73a4.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r8a73a4.h
-rename to arch/arm/mach-shmobile/r8a73a4.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
-index da94d9b9292e..f470b3cc0b7b 100644
---- a/arch/arm/mach-shmobile/setup-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
-@@ -24,11 +24,13 @@
- #include <linux/serial_sci.h>
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
--#include <mach/r8a73a4.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-+#include "r8a73a4.h"
-
- static const struct resource pfc_resources[] = {
- DEFINE_RES_MEM(0xe6050000, 0x9000),
---
-2.1.2
-
diff --git a/patches.renesas/0902-ARM-shmobile-Move-r8a7740.h.patch b/patches.renesas/0902-ARM-shmobile-Move-r8a7740.h.patch
deleted file mode 100644
index f338d752d2849..0000000000000
--- a/patches.renesas/0902-ARM-shmobile-Move-r8a7740.h.patch
+++ /dev/null
@@ -1,110 +0,0 @@
-From 494e282d75b656692e8793d9bd334e85416f6840 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:03 +0200
-Subject: ARM: shmobile: Move r8a7740.h
-
-Change location of r8a7740.h so it can be included as "r8a7740.h"
-instead of the old style <mach/r8a7740.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9e38b84b456ab7b2abd28257eec5caee4fb1f5ea)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-armadillo800eva.c | 4 +++-
- arch/arm/mach-shmobile/clock-r8a7740.c | 3 ++-
- arch/arm/mach-shmobile/{include/mach => }/r8a7740.h | 0
- arch/arm/mach-shmobile/setup-r8a7740.c | 4 +++-
- 5 files changed, 11 insertions(+), 4 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r8a7740.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-index 10b13c7ac214..36fab42f4a93 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva-reference.c
-@@ -24,10 +24,12 @@
- #include <linux/kernel.h>
- #include <linux/gpio.h>
- #include <linux/io.h>
--#include <mach/r8a7740.h>
-+
- #include <asm/mach/arch.h>
- #include <asm/hardware/cache-l2x0.h>
-+
- #include "common.h"
-+#include "r8a7740.h"
-
- /*
- * CON1 Camera Module
-diff --git a/arch/arm/mach-shmobile/board-armadillo800eva.c b/arch/arm/mach-shmobile/board-armadillo800eva.c
-index 90a0b2b15545..4612a18c797f 100644
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -45,7 +45,7 @@
- #include <linux/mmc/sh_mobile_sdhi.h>
- #include <linux/i2c-gpio.h>
- #include <linux/reboot.h>
--#include <mach/r8a7740.h>
-+
- #include <media/mt9t112.h>
- #include <media/sh_mobile_ceu.h>
- #include <media/soc_camera.h>
-@@ -59,9 +59,11 @@
- #include <video/sh_mobile_hdmi.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
-+
- #include "common.h"
- #include "irqs.h"
- #include "pm-rmobile.h"
-+#include "r8a7740.h"
- #include "sh-gpio.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index ffefec53b058..789091cfa37a 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -22,9 +22,10 @@
- #include <linux/io.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/r8a7740.h>
-+
- #include "clock.h"
- #include "common.h"
-+#include "r8a7740.h"
-
- /*
- * | MDx | XTAL1/EXTAL1 | System | EXTALR |
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7740.h b/arch/arm/mach-shmobile/r8a7740.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r8a7740.h
-rename to arch/arm/mach-shmobile/r8a7740.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 10170b3560c2..348af358a239 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -31,15 +31,17 @@
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
--#include <mach/r8a7740.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
- #include "pm-rmobile.h"
-+#include "r8a7740.h"
-
- static struct map_desc r8a7740_io_desc[] __initdata = {
- /*
---
-2.1.2
-
diff --git a/patches.renesas/0903-ARM-shmobile-Move-r8a7778.h.patch b/patches.renesas/0903-ARM-shmobile-Move-r8a7778.h.patch
deleted file mode 100644
index 6b70c8999175b..0000000000000
--- a/patches.renesas/0903-ARM-shmobile-Move-r8a7778.h.patch
+++ /dev/null
@@ -1,84 +0,0 @@
-From 0b9e140ee3e254ac081ec30c5273244a3947180e Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:04 +0200
-Subject: ARM: shmobile: Move r8a7778.h
-
-Change location of r8a7778.h so it can be included as "r8a7778.h"
-instead of the old style <mach/r8a7778.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 02c94f38bf3bcdaaceb1f3486b4dbee1ab550793)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-bockw-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-bockw.c | 4 +++-
- arch/arm/mach-shmobile/{include/mach => }/r8a7778.h | 0
- arch/arm/mach-shmobile/setup-r8a7778.c | 4 +++-
- 4 files changed, 9 insertions(+), 3 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r8a7778.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-bockw-reference.c b/arch/arm/mach-shmobile/board-bockw-reference.c
-index 91ff3a27ccc7..ba840cd333b9 100644
---- a/arch/arm/mach-shmobile/board-bockw-reference.c
-+++ b/arch/arm/mach-shmobile/board-bockw-reference.c
-@@ -19,9 +19,11 @@
- */
-
- #include <linux/of_platform.h>
--#include <mach/r8a7778.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "common.h"
-+#include "r8a7778.h"
-
- /*
- * see board-bock.c for checking detail of dip-switch
-diff --git a/arch/arm/mach-shmobile/board-bockw.c b/arch/arm/mach-shmobile/board-bockw.c
-index 8cb057f95c44..b4e4789017bc 100644
---- a/arch/arm/mach-shmobile/board-bockw.c
-+++ b/arch/arm/mach-shmobile/board-bockw.c
-@@ -34,13 +34,15 @@
- #include <linux/spi/spi.h>
- #include <linux/spi/flash.h>
- #include <linux/usb/renesas_usbhs.h>
-+
- #include <media/soc_camera.h>
--#include <mach/r8a7778.h>
- #include <asm/mach/arch.h>
- #include <sound/rcar_snd.h>
- #include <sound/simple_card.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7778.h"
-
- #define FPGA 0x18200000
- #define IRQ0MR 0x30
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7778.h b/arch/arm/mach-shmobile/r8a7778.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r8a7778.h
-rename to arch/arm/mach-shmobile/r8a7778.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
-index b7deec3c3d8d..13512e97cd05 100644
---- a/arch/arm/mach-shmobile/setup-r8a7778.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
-@@ -37,11 +37,13 @@
- #include <linux/usb/ehci_pdriver.h>
- #include <linux/usb/ohci_pdriver.h>
- #include <linux/dma-mapping.h>
--#include <mach/r8a7778.h>
-+
- #include <asm/mach/arch.h>
- #include <asm/hardware/cache-l2x0.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7778.h"
-
- /* SCIF */
- #define R8A7778_SCIF(index, baseaddr, irq) \
---
-2.1.2
-
diff --git a/patches.renesas/0904-ARM-shmobile-Move-r8a7790.h.patch b/patches.renesas/0904-ARM-shmobile-Move-r8a7790.h.patch
deleted file mode 100644
index 8a148e2599319..0000000000000
--- a/patches.renesas/0904-ARM-shmobile-Move-r8a7790.h.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 871c85e01bcef18253f9038f8e1fe8d78353c7f7 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:06 +0200
-Subject: ARM: shmobile: Move r8a7790.h
-
-Change location of r8a7790.h so it can be included as "r8a7790.h"
-instead of the old style <mach/r8a7790.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fccae89318fda71012f96042dd971a6f9bf0904e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-lager-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-lager.c | 14 ++++++++------
- arch/arm/mach-shmobile/clock-r8a7790.c | 3 ++-
- arch/arm/mach-shmobile/pm-r8a7790.c | 4 +++-
- arch/arm/mach-shmobile/{include/mach => }/r8a7790.h | 0
- arch/arm/mach-shmobile/setup-r8a7790.c | 4 +++-
- arch/arm/mach-shmobile/smp-r8a7790.c | 4 +++-
- 7 files changed, 22 insertions(+), 11 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r8a7790.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-lager-reference.c b/arch/arm/mach-shmobile/board-lager-reference.c
-index c2175c8e1ce7..41c808e56005 100644
---- a/arch/arm/mach-shmobile/board-lager-reference.c
-+++ b/arch/arm/mach-shmobile/board-lager-reference.c
-@@ -22,11 +22,13 @@
- #include <linux/init.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/r8a7790.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "clock.h"
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7790.h"
- #include "rcar-gen2.h"
-
- /* DU */
-diff --git a/arch/arm/mach-shmobile/board-lager.c b/arch/arm/mach-shmobile/board-lager.c
-index 6fb08dbc953c..b8b2b44970ce 100644
---- a/arch/arm/mach-shmobile/board-lager.c
-+++ b/arch/arm/mach-shmobile/board-lager.c
-@@ -31,6 +31,8 @@
- #include <linux/mmc/host.h>
- #include <linux/mmc/sh_mmcif.h>
- #include <linux/mmc/sh_mobile_sdhi.h>
-+#include <linux/mtd/partitions.h>
-+#include <linux/mtd/mtd.h>
- #include <linux/pinctrl/machine.h>
- #include <linux/platform_data/camera-rcar.h>
- #include <linux/platform_data/gpio-rcar.h>
-@@ -43,21 +45,21 @@
- #include <linux/regulator/gpio-regulator.h>
- #include <linux/regulator/machine.h>
- #include <linux/sh_eth.h>
-+#include <linux/spi/flash.h>
-+#include <linux/spi/rspi.h>
-+#include <linux/spi/spi.h>
- #include <linux/usb/phy.h>
- #include <linux/usb/renesas_usbhs.h>
--#include <mach/r8a7790.h>
-+
- #include <media/soc_camera.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
--#include <linux/mtd/partitions.h>
--#include <linux/mtd/mtd.h>
--#include <linux/spi/flash.h>
--#include <linux/spi/rspi.h>
--#include <linux/spi/spi.h>
- #include <sound/rcar_snd.h>
- #include <sound/simple_card.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7790.h"
- #include "rcar-gen2.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index ca980669806f..17435c1aa2fe 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -22,9 +22,10 @@
- #include <linux/kernel.h>
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
--#include <mach/r8a7790.h>
-+
- #include "clock.h"
- #include "common.h"
-+#include "r8a7790.h"
- #include "rcar-gen2.h"
-
- /*
-diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
-index 0f1090d851e7..8845433a00b3 100644
---- a/arch/arm/mach-shmobile/pm-r8a7790.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
-@@ -11,9 +11,11 @@
- */
-
- #include <linux/kernel.h>
-+
- #include <asm/io.h>
--#include <mach/r8a7790.h>
-+
- #include "pm-rcar.h"
-+#include "r8a7790.h"
-
- /* SYSC */
- #define SYSCIER 0x0c
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7790.h b/arch/arm/mach-shmobile/r8a7790.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r8a7790.h
-rename to arch/arm/mach-shmobile/r8a7790.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a7790.c b/arch/arm/mach-shmobile/setup-r8a7790.c
-index a34229d5da41..c37d82d38617 100644
---- a/arch/arm/mach-shmobile/setup-r8a7790.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7790.c
-@@ -26,11 +26,13 @@
- #include <linux/serial_sci.h>
- #include <linux/sh_dma.h>
- #include <linux/sh_timer.h>
--#include <mach/r8a7790.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-+#include "r8a7790.h"
- #include "rcar-gen2.h"
-
- /* Audio-DMAC */
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index 7590e2b6e2fa..ad66beab2ea6 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -17,10 +17,12 @@
- #include <linux/init.h>
- #include <linux/smp.h>
- #include <linux/io.h>
-+
- #include <asm/smp_plat.h>
--#include <mach/r8a7790.h>
-+
- #include "common.h"
- #include "pm-rcar.h"
-+#include "r8a7790.h"
-
- #define RST 0xe6160000
- #define CA15BAR 0x0020
---
-2.1.2
-
diff --git a/patches.renesas/0905-ARM-shmobile-Move-sh73a0.h.patch b/patches.renesas/0905-ARM-shmobile-Move-sh73a0.h.patch
deleted file mode 100644
index e5e07a35357b4..0000000000000
--- a/patches.renesas/0905-ARM-shmobile-Move-sh73a0.h.patch
+++ /dev/null
@@ -1,130 +0,0 @@
-From 117b1e84d51d2305ccaa25fc19fdbe638cf0149d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:09 +0200
-Subject: ARM: shmobile: Move sh73a0.h
-
-Change location of sh73a0.h so it can be included as "sh73a0.h"
-instead of the old style <mach/sh73a0.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ded59d6dfc47683d1b810c069ed637e1e60e75fd)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-kzm9g-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-kzm9g.c | 4 +++-
- arch/arm/mach-shmobile/intc-sh73a0.c | 4 +++-
- arch/arm/mach-shmobile/setup-sh73a0.c | 4 +++-
- arch/arm/mach-shmobile/{include/mach => }/sh73a0.h | 0
- arch/arm/mach-shmobile/smp-sh73a0.c | 4 +++-
- 6 files changed, 15 insertions(+), 5 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/sh73a0.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-kzm9g-reference.c b/arch/arm/mach-shmobile/board-kzm9g-reference.c
-index f7b2d0708311..95307cd0ebc4 100644
---- a/arch/arm/mach-shmobile/board-kzm9g-reference.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g-reference.c
-@@ -25,11 +25,13 @@
- #include <linux/irq.h>
- #include <linux/input.h>
- #include <linux/of_platform.h>
--#include <mach/sh73a0.h>
-+
- #include <asm/hardware/cache-l2x0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "common.h"
-+#include "sh73a0.h"
-
- static void __init kzm_init(void)
- {
-diff --git a/arch/arm/mach-shmobile/board-kzm9g.c b/arch/arm/mach-shmobile/board-kzm9g.c
-index 638859ee247f..dc529f9f58d7 100644
---- a/arch/arm/mach-shmobile/board-kzm9g.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g.c
-@@ -41,15 +41,17 @@
- #include <linux/usb/r8a66597.h>
- #include <linux/usb/renesas_usbhs.h>
- #include <linux/videodev2.h>
-+
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
--#include <mach/sh73a0.h>
- #include <asm/hardware/cache-l2x0.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <video/sh_mobile_lcdc.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "sh73a0.h"
-
- /*
- * external GPIO
-diff --git a/arch/arm/mach-shmobile/intc-sh73a0.c b/arch/arm/mach-shmobile/intc-sh73a0.c
-index 1a8f9a7af983..44457a94897b 100644
---- a/arch/arm/mach-shmobile/intc-sh73a0.c
-+++ b/arch/arm/mach-shmobile/intc-sh73a0.c
-@@ -24,11 +24,13 @@
- #include <linux/io.h>
- #include <linux/irqchip.h>
- #include <linux/irqchip/arm-gic.h>
--#include <mach/sh73a0.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "intc.h"
- #include "irqs.h"
-+#include "sh73a0.h"
-
- enum {
- UNUSED = 0,
-diff --git a/arch/arm/mach-shmobile/setup-sh73a0.c b/arch/arm/mach-shmobile/setup-sh73a0.c
-index b30bbee6dc65..224882151667 100644
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -32,14 +32,16 @@
- #include <linux/sh_timer.h>
- #include <linux/platform_data/sh_ipmmu.h>
- #include <linux/platform_data/irq-renesas-intc-irqpin.h>
--#include <mach/sh73a0.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/map.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
-+#include "sh73a0.h"
-
- static struct map_desc sh73a0_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
-diff --git a/arch/arm/mach-shmobile/include/mach/sh73a0.h b/arch/arm/mach-shmobile/sh73a0.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/sh73a0.h
-rename to arch/arm/mach-shmobile/sh73a0.h
-diff --git a/arch/arm/mach-shmobile/smp-sh73a0.c b/arch/arm/mach-shmobile/smp-sh73a0.c
-index bf4aff99ed1c..22d8f87b23e9 100644
---- a/arch/arm/mach-shmobile/smp-sh73a0.c
-+++ b/arch/arm/mach-shmobile/smp-sh73a0.c
-@@ -22,10 +22,12 @@
- #include <linux/smp.h>
- #include <linux/io.h>
- #include <linux/delay.h>
--#include <mach/sh73a0.h>
-+
- #include <asm/smp_plat.h>
- #include <asm/smp_twd.h>
-+
- #include "common.h"
-+#include "sh73a0.h"
-
- #define WUPCR IOMEM(0xe6151010)
- #define SRESCR IOMEM(0xe6151018)
---
-2.1.2
-
diff --git a/patches.renesas/0906-ARM-shmobile-Move-sh7372.h.patch b/patches.renesas/0906-ARM-shmobile-Move-sh7372.h.patch
deleted file mode 100644
index ca2083feba742..0000000000000
--- a/patches.renesas/0906-ARM-shmobile-Move-sh7372.h.patch
+++ /dev/null
@@ -1,99 +0,0 @@
-From e08d59239682b2d0bf7413129477a6f8164d4140 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:08 +0200
-Subject: ARM: shmobile: Move sh7372.h
-
-Change location of sh7372.h so it can be included as "sh7372.h"
-instead of the old style <mach/sh7372.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 113522ee3034427472bcb4b8665833719809b31a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-mackerel.c | 4 +++-
- arch/arm/mach-shmobile/pm-sh7372.c | 4 +++-
- arch/arm/mach-shmobile/setup-sh7372.c | 4 +++-
- arch/arm/mach-shmobile/{include/mach => }/sh7372.h | 0
- 4 files changed, 9 insertions(+), 3 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/sh7372.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-mackerel.c b/arch/arm/mach-shmobile/board-mackerel.c
-index 0ece865cbc4d..304b76f3bf4a 100644
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -51,6 +51,7 @@
- #include <linux/tca6416_keypad.h>
- #include <linux/usb/renesas_usbhs.h>
- #include <linux/dma-mapping.h>
-+
- #include <video/sh_mobile_hdmi.h>
- #include <video/sh_mobile_lcdc.h>
- #include <media/sh_mobile_ceu.h>
-@@ -58,13 +59,14 @@
- #include <media/soc_camera_platform.h>
- #include <sound/sh_fsi.h>
- #include <sound/simple_card.h>
--#include <mach/sh7372.h>
- #include <asm/mach/arch.h>
- #include <asm/mach-types.h>
-+
- #include "common.h"
- #include "irqs.h"
- #include "pm-rmobile.h"
- #include "sh-gpio.h"
-+#include "sh7372.h"
-
- /*
- * Address Interface BusWidth note
-diff --git a/arch/arm/mach-shmobile/pm-sh7372.c b/arch/arm/mach-shmobile/pm-sh7372.c
-index 7ef9a0126780..7e5c2676c489 100644
---- a/arch/arm/mach-shmobile/pm-sh7372.c
-+++ b/arch/arm/mach-shmobile/pm-sh7372.c
-@@ -21,13 +21,15 @@
- #include <linux/irq.h>
- #include <linux/bitrev.h>
- #include <linux/console.h>
-+
- #include <asm/cpuidle.h>
- #include <asm/io.h>
- #include <asm/tlbflush.h>
- #include <asm/suspend.h>
--#include <mach/sh7372.h>
-+
- #include "common.h"
- #include "pm-rmobile.h"
-+#include "sh7372.h"
-
- /* DBG */
- #define DBGREG1 IOMEM(0xe6100020)
-diff --git a/arch/arm/mach-shmobile/setup-sh7372.c b/arch/arm/mach-shmobile/setup-sh7372.c
-index 5571f867c611..9cdfcdfd38fc 100644
---- a/arch/arm/mach-shmobile/setup-sh7372.c
-+++ b/arch/arm/mach-shmobile/setup-sh7372.c
-@@ -33,15 +33,17 @@
- #include <linux/pm_domain.h>
- #include <linux/dma-mapping.h>
- #include <linux/platform_data/sh_ipmmu.h>
--#include <mach/sh7372.h>
-+
- #include <asm/mach/map.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
-+
- #include "common.h"
- #include "dma-register.h"
- #include "irqs.h"
- #include "pm-rmobile.h"
-+#include "sh7372.h"
-
- static struct map_desc sh7372_io_desc[] __initdata = {
- /* create a 1:1 entity map for 0xe6xxxxxx
-diff --git a/arch/arm/mach-shmobile/include/mach/sh7372.h b/arch/arm/mach-shmobile/sh7372.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/sh7372.h
-rename to arch/arm/mach-shmobile/sh7372.h
---
-2.1.2
-
diff --git a/patches.renesas/0907-ARM-shmobile-Move-r8a7779.h.patch b/patches.renesas/0907-ARM-shmobile-Move-r8a7779.h.patch
deleted file mode 100644
index 3e7216b35a4ac..0000000000000
--- a/patches.renesas/0907-ARM-shmobile-Move-r8a7779.h.patch
+++ /dev/null
@@ -1,148 +0,0 @@
-From dc723ee54d05e0bb8e0f7e021b6b4a2b515bd5fe Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:05 +0200
-Subject: ARM: shmobile: Move r8a7779.h
-
-Change location of r8a7779.h so it can be included as "r8a7779.h"
-instead of the old style <mach/r8a7779.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 1b55353c9214788b0d0797a5fd4585af1557a12c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-marzen-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-marzen.c | 4 +++-
- arch/arm/mach-shmobile/clock-r8a7779.c | 3 ++-
- arch/arm/mach-shmobile/pm-r8a7779.c | 4 +++-
- arch/arm/mach-shmobile/{include/mach => }/r8a7779.h | 0
- arch/arm/mach-shmobile/setup-r8a7779.c | 4 +++-
- arch/arm/mach-shmobile/smp-r8a7779.c | 4 +++-
- 7 files changed, 17 insertions(+), 6 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r8a7779.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-marzen-reference.c b/arch/arm/mach-shmobile/board-marzen-reference.c
-index 0a000b74ac6d..21b3e1ca2261 100644
---- a/arch/arm/mach-shmobile/board-marzen-reference.c
-+++ b/arch/arm/mach-shmobile/board-marzen-reference.c
-@@ -22,12 +22,14 @@
- #include <linux/clk/shmobile.h>
- #include <linux/clocksource.h>
- #include <linux/of_platform.h>
--#include <mach/r8a7779.h>
-+
- #include <asm/irq.h>
- #include <asm/mach/arch.h>
-+
- #include "clock.h"
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7779.h"
-
- static void __init marzen_init_timer(void)
- {
-diff --git a/arch/arm/mach-shmobile/board-marzen.c b/arch/arm/mach-shmobile/board-marzen.c
-index fe445ef49fb9..25a1037e289d 100644
---- a/arch/arm/mach-shmobile/board-marzen.c
-+++ b/arch/arm/mach-shmobile/board-marzen.c
-@@ -41,13 +41,15 @@
- #include <linux/mmc/host.h>
- #include <linux/mmc/sh_mobile_sdhi.h>
- #include <linux/mfd/tmio.h>
-+
- #include <media/soc_camera.h>
--#include <mach/r8a7779.h>
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/traps.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7779.h"
-
- /* Fixed 3.3V regulator to be used by SDHI0 */
- static struct regulator_consumer_supply fixed3v3_power_consumers[] = {
-diff --git a/arch/arm/mach-shmobile/clock-r8a7779.c b/arch/arm/mach-shmobile/clock-r8a7779.c
-index e690927f3505..c51f9db3f66f 100644
---- a/arch/arm/mach-shmobile/clock-r8a7779.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7779.c
-@@ -24,9 +24,10 @@
- #include <linux/sh_clk.h>
- #include <linux/clkdev.h>
- #include <linux/sh_timer.h>
--#include <mach/r8a7779.h>
-+
- #include "clock.h"
- #include "common.h"
-+#include "r8a7779.h"
-
- /*
- * MD1 = 1 MD1 = 0
-diff --git a/arch/arm/mach-shmobile/pm-r8a7779.c b/arch/arm/mach-shmobile/pm-r8a7779.c
-index f0f36cb5ffe7..69f70b7f7fb2 100644
---- a/arch/arm/mach-shmobile/pm-r8a7779.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7779.c
-@@ -19,10 +19,12 @@
- #include <linux/irq.h>
- #include <linux/interrupt.h>
- #include <linux/console.h>
-+
- #include <asm/io.h>
--#include <mach/r8a7779.h>
-+
- #include "common.h"
- #include "pm-rcar.h"
-+#include "r8a7779.h"
-
- /* SYSC */
- #define SYSCIER 0x0c
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7779.h b/arch/arm/mach-shmobile/r8a7779.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r8a7779.h
-rename to arch/arm/mach-shmobile/r8a7779.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a7779.c b/arch/arm/mach-shmobile/setup-r8a7779.c
-index 219050ec9640..5845df36985c 100644
---- a/arch/arm/mach-shmobile/setup-r8a7779.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7779.c
-@@ -40,14 +40,16 @@
- #include <linux/usb/ehci_pdriver.h>
- #include <linux/usb/ohci_pdriver.h>
- #include <linux/pm_runtime.h>
--#include <mach/r8a7779.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
- #include <asm/mach/time.h>
- #include <asm/mach/map.h>
- #include <asm/hardware/cache-l2x0.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7779.h"
-
- static struct map_desc r8a7779_io_desc[] __initdata = {
- /* 2M entity map for 0xf0000000 (MPCORE) */
-diff --git a/arch/arm/mach-shmobile/smp-r8a7779.c b/arch/arm/mach-shmobile/smp-r8a7779.c
-index c230fc0c3fef..3100e355c3fd 100644
---- a/arch/arm/mach-shmobile/smp-r8a7779.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7779.c
-@@ -23,13 +23,15 @@
- #include <linux/spinlock.h>
- #include <linux/io.h>
- #include <linux/delay.h>
--#include <mach/r8a7779.h>
-+
- #include <asm/cacheflush.h>
- #include <asm/smp_plat.h>
- #include <asm/smp_scu.h>
- #include <asm/smp_twd.h>
-+
- #include "common.h"
- #include "pm-rcar.h"
-+#include "r8a7779.h"
-
- #define AVECR IOMEM(0xfe700040)
- #define R8A7779_SCU_BASE 0xf0000000
---
-2.1.2
-
diff --git a/patches.renesas/0908-ARM-shmobile-Move-r8a7791.h.patch b/patches.renesas/0908-ARM-shmobile-Move-r8a7791.h.patch
deleted file mode 100644
index 3321db7a64a92..0000000000000
--- a/patches.renesas/0908-ARM-shmobile-Move-r8a7791.h.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 7648ae5665df6ef67c7d391c4af67527a7c5bb70 Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 20 Jun 2014 18:53:07 +0200
-Subject: ARM: shmobile: Move r8a7791.h
-
-Change location of r8a7791.h so it can be included as "r8a7791.h"
-instead of the old style <mach/r8a7791.h>
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5201b5a792e95e3ecebe74cd3553413a67da09db)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-koelsch-reference.c | 4 +++-
- arch/arm/mach-shmobile/board-koelsch.c | 4 +++-
- arch/arm/mach-shmobile/pm-r8a7791.c | 6 ++++--
- arch/arm/mach-shmobile/{include/mach => }/r8a7791.h | 0
- arch/arm/mach-shmobile/setup-r8a7791.c | 4 +++-
- arch/arm/mach-shmobile/smp-r8a7791.c | 4 +++-
- 6 files changed, 16 insertions(+), 6 deletions(-)
- rename arch/arm/mach-shmobile/{include/mach => }/r8a7791.h (100%)
-
-diff --git a/arch/arm/mach-shmobile/board-koelsch-reference.c b/arch/arm/mach-shmobile/board-koelsch-reference.c
-index 5e0375fdc6f7..3ff88c138896 100644
---- a/arch/arm/mach-shmobile/board-koelsch-reference.c
-+++ b/arch/arm/mach-shmobile/board-koelsch-reference.c
-@@ -23,11 +23,13 @@
- #include <linux/kernel.h>
- #include <linux/of_platform.h>
- #include <linux/platform_data/rcar-du.h>
--#include <mach/r8a7791.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "clock.h"
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7791.h"
- #include "rcar-gen2.h"
-
- /* DU */
-diff --git a/arch/arm/mach-shmobile/board-koelsch.c b/arch/arm/mach-shmobile/board-koelsch.c
-index db4b8a311c75..2cd3194a2d47 100644
---- a/arch/arm/mach-shmobile/board-koelsch.c
-+++ b/arch/arm/mach-shmobile/board-koelsch.c
-@@ -45,11 +45,13 @@
- #include <linux/spi/flash.h>
- #include <linux/spi/rspi.h>
- #include <linux/spi/spi.h>
--#include <mach/r8a7791.h>
-+
- #include <asm/mach-types.h>
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7791.h"
- #include "rcar-gen2.h"
-
- /* DU */
-diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
-index 15190875d507..b7e6513fb38a 100644
---- a/arch/arm/mach-shmobile/pm-r8a7791.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7791.c
-@@ -10,10 +10,12 @@
- * for more details.
- */
-
--#include <asm/io.h>
- #include <linux/kernel.h>
--#include <mach/r8a7791.h>
-+
-+#include <asm/io.h>
-+
- #include "pm-rcar.h"
-+#include "r8a7791.h"
-
- /* SYSC */
- #define SYSCIER 0x0c
-diff --git a/arch/arm/mach-shmobile/include/mach/r8a7791.h b/arch/arm/mach-shmobile/r8a7791.h
-similarity index 100%
-rename from arch/arm/mach-shmobile/include/mach/r8a7791.h
-rename to arch/arm/mach-shmobile/r8a7791.h
-diff --git a/arch/arm/mach-shmobile/setup-r8a7791.c b/arch/arm/mach-shmobile/setup-r8a7791.c
-index 7e970d005f7f..8823324ac5a9 100644
---- a/arch/arm/mach-shmobile/setup-r8a7791.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7791.c
-@@ -26,10 +26,12 @@
- #include <linux/platform_data/irq-renesas-irqc.h>
- #include <linux/serial_sci.h>
- #include <linux/sh_timer.h>
--#include <mach/r8a7791.h>
-+
- #include <asm/mach/arch.h>
-+
- #include "common.h"
- #include "irqs.h"
-+#include "r8a7791.h"
- #include "rcar-gen2.h"
-
- static const struct resource pfc_resources[] __initconst = {
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index c6543b6ec759..248255524127 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -17,9 +17,11 @@
- #include <linux/init.h>
- #include <linux/smp.h>
- #include <linux/io.h>
-+
- #include <asm/smp_plat.h>
--#include <mach/r8a7791.h>
-+
- #include "common.h"
-+#include "r8a7791.h"
- #include "rcar-gen2.h"
-
- #define RST 0xe6160000
---
-2.1.2
-
diff --git a/patches.renesas/0909-ARM-shmobile-Allow-use-of-boot-code-for-non-SMP-case.patch b/patches.renesas/0909-ARM-shmobile-Allow-use-of-boot-code-for-non-SMP-case.patch
deleted file mode 100644
index 47d6a61310709..0000000000000
--- a/patches.renesas/0909-ARM-shmobile-Allow-use-of-boot-code-for-non-SMP-case.patch
+++ /dev/null
@@ -1,105 +0,0 @@
-From 1cf00a253464485b091b1cb7a53235189bbebfb0 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:20:10 +0900
-Subject: ARM: shmobile: Allow use of boot code for non-SMP case
-
-Allow build of platsmp.c and headsmp.S even though
-SMP is disabled in the kernel configuration. With
-this in place it is possible to share the reset
-vector setup code with power management code that
-needs to be built even though SMP is disabled.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8b438bcb9009609a15e5480ab1947acff6fb9005)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 11 +++++++----
- arch/arm/mach-shmobile/headsmp.S | 13 ++++++++-----
- 2 files changed, 15 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index ccb056327fd4..cf83a1ab8122 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -34,17 +34,17 @@ obj-$(CONFIG_ARCH_R8A7791) += clock-r8a7791.o
- obj-$(CONFIG_ARCH_R7S72100) += clock-r7s72100.o
- endif
-
-+# CPU reset vector handling objects
-+cpu-y := platsmp.o headsmp.o
-+
- # SMP objects
--smp-y := platsmp.o headsmp.o
-+smp-y := $(cpu-y)
- smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o
- smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o
- smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o
- smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o
- smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
-
--# IRQ objects
--obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
--
- # PM objects
- obj-$(CONFIG_SUSPEND) += suspend.o
- obj-$(CONFIG_CPU_IDLE) += cpuidle.o
-@@ -56,6 +56,9 @@ obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
- obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o
- obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o
-
-+# IRQ objects
-+obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
-+
- # Board objects
- ifdef CONFIG_ARCH_SHMOBILE_MULTI
- obj-$(CONFIG_MACH_GENMAI) += board-genmai-reference.o
-diff --git a/arch/arm/mach-shmobile/headsmp.S b/arch/arm/mach-shmobile/headsmp.S
-index e5be5c88644b..faf82144a262 100644
---- a/arch/arm/mach-shmobile/headsmp.S
-+++ b/arch/arm/mach-shmobile/headsmp.S
-@@ -10,14 +10,17 @@
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
--#include <linux/linkage.h>
- #include <linux/init.h>
-+#include <linux/linkage.h>
-+#include <linux/threads.h>
- #include <asm/memory.h>
-
-+#ifdef CONFIG_SMP
- ENTRY(shmobile_invalidate_start)
- bl v7_invalidate_l1
- b secondary_startup
- ENDPROC(shmobile_invalidate_start)
-+#endif
-
- /*
- * Reset vector for secondary CPUs.
-@@ -68,7 +71,7 @@ shmobile_smp_boot_find_mpidr:
-
- shmobile_smp_boot_next:
- add r1, r1, #1
-- cmp r1, #CONFIG_NR_CPUS
-+ cmp r1, #NR_CPUS
- blo shmobile_smp_boot_find_mpidr
-
- b shmobile_smp_sleep
-@@ -85,10 +88,10 @@ ENDPROC(shmobile_smp_sleep)
-
- .globl shmobile_smp_mpidr
- shmobile_smp_mpidr:
--1: .space CONFIG_NR_CPUS * 4
-+1: .space NR_CPUS * 4
- .globl shmobile_smp_fn
- shmobile_smp_fn:
--2: .space CONFIG_NR_CPUS * 4
-+2: .space NR_CPUS * 4
- .globl shmobile_smp_arg
- shmobile_smp_arg:
--3: .space CONFIG_NR_CPUS * 4
-+3: .space NR_CPUS * 4
---
-2.1.2
-
diff --git a/patches.renesas/0910-ARM-shmobile-Adjust-APMU-code-to-build-for-non-SMP.patch b/patches.renesas/0910-ARM-shmobile-Adjust-APMU-code-to-build-for-non-SMP.patch
deleted file mode 100644
index 229739d2ba51a..0000000000000
--- a/patches.renesas/0910-ARM-shmobile-Adjust-APMU-code-to-build-for-non-SMP.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 04de1be8208bd83e6bc91afa59388eeedee85d2b Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:20:18 +0900
-Subject: ARM: shmobile: Adjust APMU code to build for non-SMP
-
-Adjust the APMU code to allow build when CONFIG_SMP=n.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 784500be40a0eabcee1e48c70927aea9c9accb1e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/platsmp-apmu.c | 11 +++++++----
- 1 file changed, 7 insertions(+), 4 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index 590e35c22a60..ce07eb9f5cd5 100644
---- a/arch/arm/mach-shmobile/platsmp-apmu.c
-+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
-@@ -15,6 +15,7 @@
- #include <linux/of_address.h>
- #include <linux/smp.h>
- #include <linux/suspend.h>
-+#include <linux/threads.h>
- #include <asm/cacheflush.h>
- #include <asm/cp15.h>
- #include <asm/proc-fns.h>
-@@ -25,13 +26,13 @@
- static struct {
- void __iomem *iomem;
- int bit;
--} apmu_cpus[CONFIG_NR_CPUS];
-+} apmu_cpus[NR_CPUS];
-
- #define WUPCR_OFFS 0x10
- #define PSTR_OFFS 0x40
- #define CPUNCR_OFFS(n) (0x100 + (0x10 * (n)))
-
--static int apmu_power_on(void __iomem *p, int bit)
-+static int __maybe_unused apmu_power_on(void __iomem *p, int bit)
- {
- /* request power on */
- writel_relaxed(BIT(bit), p + WUPCR_OFFS);
-@@ -50,7 +51,7 @@ static int apmu_power_off(void __iomem *p, int bit)
- return 0;
- }
-
--static int apmu_power_off_poll(void __iomem *p, int bit)
-+static int __maybe_unused apmu_power_off_poll(void __iomem *p, int bit)
- {
- int k;
-
-@@ -73,7 +74,7 @@ static int apmu_wrap(int cpu, int (*fn)(void __iomem *p, int cpu))
-
- static void apmu_init_cpu(struct resource *res, int cpu, int bit)
- {
-- if (apmu_cpus[cpu].iomem)
-+ if ((cpu >= ARRAY_SIZE(apmu_cpus)) || apmu_cpus[cpu].iomem)
- return;
-
- apmu_cpus[cpu].iomem = ioremap_nocache(res->start, resource_size(res));
-@@ -137,6 +138,7 @@ void __init shmobile_smp_apmu_prepare_cpus(unsigned int max_cpus)
- apmu_parse_cfg(apmu_init_cpu);
- }
-
-+#ifdef CONFIG_SMP
- int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
- {
- /* For this particular CPU register boot vector */
-@@ -144,6 +146,7 @@ int shmobile_smp_apmu_boot_secondary(unsigned int cpu, struct task_struct *idle)
-
- return apmu_wrap(cpu, apmu_power_on);
- }
-+#endif
-
- #if defined(CONFIG_HOTPLUG_CPU) || defined(CONFIG_SUSPEND)
- /* nicked from arch/arm/mach-exynos/hotplug.c */
---
-2.1.2
-
diff --git a/patches.renesas/0911-ARM-shmobile-Use-__init-for-APMU-suspend-init-functi.patch b/patches.renesas/0911-ARM-shmobile-Use-__init-for-APMU-suspend-init-functi.patch
deleted file mode 100644
index e60bc14fa2729..0000000000000
--- a/patches.renesas/0911-ARM-shmobile-Use-__init-for-APMU-suspend-init-functi.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 2435bbce72967585675268303fcda8cb5d24f82a Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:20:46 +0900
-Subject: ARM: shmobile: Use __init for APMU suspend init function
-
-The function shmobile_smp_apmu_suspend_init() should
-be put into the init section to not trigger section
-mismatch warnings.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0d77c9aa7a13a9fcfc93836188474f43394ea657)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/platsmp-apmu.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index ce07eb9f5cd5..a05b16d88257 100644
---- a/arch/arm/mach-shmobile/platsmp-apmu.c
-+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
-@@ -240,7 +240,7 @@ static int shmobile_smp_apmu_enter_suspend(suspend_state_t state)
- return 0;
- }
-
--void shmobile_smp_apmu_suspend_init(void)
-+void __init shmobile_smp_apmu_suspend_init(void)
- {
- shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0912-ARM-shmobile-Move-r8a7790-reset-code-to-pm-r8a7790.c.patch b/patches.renesas/0912-ARM-shmobile-Move-r8a7790-reset-code-to-pm-r8a7790.c.patch
deleted file mode 100644
index ad746364b2e78..0000000000000
--- a/patches.renesas/0912-ARM-shmobile-Move-r8a7790-reset-code-to-pm-r8a7790.c.patch
+++ /dev/null
@@ -1,141 +0,0 @@
-From 6ab094d6494ec27c7361acb9b49b206b3bbfa796 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:20:54 +0900
-Subject: ARM: shmobile: Move r8a7790 reset code to pm-r8a7790.c
-
-Move r8a7790 specific reset vector setup code from the
-SMP glue code to PM code. This makes the code one step
-closer to allow PM operations such as Suspend-to-RAM
-in the case when SMP is disabled in the kernel config.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-[horms+renesas@verge.net.au: updated for recent #include changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 07ce9dfaf477e0d16d40faea251898d5a38d8051)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-Conflicts:
- arch/arm/mach-shmobile/pm-r8a7790.c
----
- arch/arm/mach-shmobile/pm-r8a7790.c | 40 ++++++++++++++++++++++++++++++++++--
- arch/arm/mach-shmobile/smp-r8a7790.c | 30 ---------------------------
- 2 files changed, 38 insertions(+), 32 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
-index 8845433a00b3..c6efade323d6 100644
---- a/arch/arm/mach-shmobile/pm-r8a7790.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
-@@ -12,11 +12,23 @@
-
- #include <linux/kernel.h>
-
-+#include <linux/smp.h>
- #include <asm/io.h>
-
-+#include "common.h"
- #include "pm-rcar.h"
- #include "r8a7790.h"
-
-+/* RST */
-+#define RST 0xe6160000
-+#define CA15BAR 0x0020
-+#define CA7BAR 0x0030
-+#define CA15RESCNT 0x0040
-+#define CA7RESCNT 0x0044
-+
-+/* On-chip RAM */
-+#define MERAM 0xe8080000
-+
- /* SYSC */
- #define SYSCIER 0x0c
- #define SYSCIMR 0x10
-@@ -40,8 +52,32 @@ static inline void r8a7790_sysc_init(void) {}
-
- void __init r8a7790_pm_init(void)
- {
-+ void __iomem *p;
-+ u32 bar;
- static int once;
-
-- if (!once++)
-- r8a7790_sysc_init();
-+ if (once++)
-+ return;
-+
-+ /* MERAM for jump stub, because BAR requires 256KB aligned address */
-+ p = ioremap_nocache(MERAM, shmobile_boot_size);
-+ memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
-+ iounmap(p);
-+
-+ /* setup reset vectors */
-+ p = ioremap_nocache(RST, 0x63);
-+ bar = (MERAM >> 8) & 0xfffffc00;
-+ writel_relaxed(bar, p + CA15BAR);
-+ writel_relaxed(bar, p + CA7BAR);
-+ writel_relaxed(bar | 0x10, p + CA15BAR);
-+ writel_relaxed(bar | 0x10, p + CA7BAR);
-+
-+ /* de-assert reset for all CPUs */
-+ writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
-+ p + CA15RESCNT);
-+ writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000,
-+ p + CA7RESCNT);
-+ iounmap(p);
-+
-+ r8a7790_sysc_init();
- }
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index ad66beab2ea6..8a2e7d5af930 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -24,13 +24,6 @@
- #include "pm-rcar.h"
- #include "r8a7790.h"
-
--#define RST 0xe6160000
--#define CA15BAR 0x0020
--#define CA7BAR 0x0030
--#define CA15RESCNT 0x0040
--#define CA7RESCNT 0x0044
--#define MERAM 0xe8080000
--
- static struct rcar_sysc_ch r8a7790_ca15_scu = {
- .chan_offs = 0x180, /* PWRSR5 .. PWRER5 */
- .isr_bit = 12, /* CA15-SCU */
-@@ -43,32 +36,9 @@ static struct rcar_sysc_ch r8a7790_ca7_scu = {
-
- static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
- {
-- void __iomem *p;
-- u32 bar;
--
- /* let APMU code install data related to shmobile_boot_vector */
- shmobile_smp_apmu_prepare_cpus(max_cpus);
-
-- /* MERAM for jump stub, because BAR requires 256KB aligned address */
-- p = ioremap_nocache(MERAM, shmobile_boot_size);
-- memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
-- iounmap(p);
--
-- /* setup reset vectors */
-- p = ioremap_nocache(RST, 0x63);
-- bar = (MERAM >> 8) & 0xfffffc00;
-- writel_relaxed(bar, p + CA15BAR);
-- writel_relaxed(bar, p + CA7BAR);
-- writel_relaxed(bar | 0x10, p + CA15BAR);
-- writel_relaxed(bar | 0x10, p + CA7BAR);
--
-- /* enable clocks to all CPUs */
-- writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
-- p + CA15RESCNT);
-- writel_relaxed((readl_relaxed(p + CA7RESCNT) & ~0x0f) | 0x5a5a0000,
-- p + CA7RESCNT);
-- iounmap(p);
--
- /* turn on power to SCU */
- r8a7790_pm_init();
- shmobile_smp_apmu_suspend_init();
---
-2.1.2
-
diff --git a/patches.renesas/0913-ARM-shmobile-Allow-r8a7790-to-build-non-SMP-APMU-cod.patch b/patches.renesas/0913-ARM-shmobile-Allow-r8a7790-to-build-non-SMP-APMU-cod.patch
deleted file mode 100644
index b8d5f2ca3cf2e..0000000000000
--- a/patches.renesas/0913-ARM-shmobile-Allow-r8a7790-to-build-non-SMP-APMU-cod.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From fd7c4acb635eaf46bacf811a489f18867a706918 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:21:03 +0900
-Subject: ARM: shmobile: Allow r8a7790 to build non-SMP APMU code
-
-Build the APMU for r8a7790 even though SMP is
-disabled in the kernel config. Also initialize
-Suspend-to-RAM from pm-r8a7790.c to in the future
-cover both UP and SMP use cases of the APMU.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 06f2c5dcc24b026872bfc9b50b47c384638d2111)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 5 +++--
- arch/arm/mach-shmobile/pm-r8a7790.c | 1 +
- arch/arm/mach-shmobile/smp-r8a7790.c | 1 -
- 3 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index cf83a1ab8122..59f63b7b52be 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -36,12 +36,13 @@ endif
-
- # CPU reset vector handling objects
- cpu-y := platsmp.o headsmp.o
-+cpu-$(CONFIG_ARCH_R8A7790) += platsmp-apmu.o
-
- # SMP objects
- smp-y := $(cpu-y)
- smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o
- smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o
--smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o platsmp-apmu.o
-+smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o
- smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o
- smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
-
-@@ -53,7 +54,7 @@ obj-$(CONFIG_ARCH_SH7372) += pm-sh7372.o sleep-sh7372.o pm-rmobile.o
- obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
- obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
- obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
--obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o
-+obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o $(cpu-y)
- obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o
-
- # IRQ objects
-diff --git a/arch/arm/mach-shmobile/pm-r8a7790.c b/arch/arm/mach-shmobile/pm-r8a7790.c
-index c6efade323d6..f7912d1bf3f4 100644
---- a/arch/arm/mach-shmobile/pm-r8a7790.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7790.c
-@@ -80,4 +80,5 @@ void __init r8a7790_pm_init(void)
- iounmap(p);
-
- r8a7790_sysc_init();
-+ shmobile_smp_apmu_suspend_init();
- }
-diff --git a/arch/arm/mach-shmobile/smp-r8a7790.c b/arch/arm/mach-shmobile/smp-r8a7790.c
-index 8a2e7d5af930..2311694636e1 100644
---- a/arch/arm/mach-shmobile/smp-r8a7790.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7790.c
-@@ -41,7 +41,6 @@ static void __init r8a7790_smp_prepare_cpus(unsigned int max_cpus)
-
- /* turn on power to SCU */
- r8a7790_pm_init();
-- shmobile_smp_apmu_suspend_init();
- rcar_sysc_power_up(&r8a7790_ca15_scu);
- rcar_sysc_power_up(&r8a7790_ca7_scu);
- }
---
-2.1.2
-
diff --git a/patches.renesas/0914-ARM-shmobile-Move-r8a7791-reset-code-to-pm-r8a7791.c.patch b/patches.renesas/0914-ARM-shmobile-Move-r8a7791-reset-code-to-pm-r8a7791.c.patch
deleted file mode 100644
index 7a1c5e4a87df5..0000000000000
--- a/patches.renesas/0914-ARM-shmobile-Move-r8a7791-reset-code-to-pm-r8a7791.c.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 13876e9abf6aac6626936285685fdfbd7cbdc836 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:21:11 +0900
-Subject: ARM: shmobile: Move r8a7791 reset code to pm-r8a7791.c
-
-Move r8a7791 specific reset vector setup code from the
-SMP glue code to PM code. This makes the code one step
-closer to allow PM operations such as Suspend-to-RAM
-in the case when SMP is disabled in the kernel config.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-[horms+renesas@verge.net.au: updated for recent header file changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 8e26118d44c4877fa52dc8117692f3cc9af3c769)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/pm-r8a7791.c | 27 +++++++++++++++++++++++++--
- arch/arm/mach-shmobile/smp-r8a7791.c | 24 ------------------------
- 2 files changed, 25 insertions(+), 26 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
-index b7e6513fb38a..c44304c3c6df 100644
---- a/arch/arm/mach-shmobile/pm-r8a7791.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7791.c
-@@ -11,12 +11,17 @@
- */
-
- #include <linux/kernel.h>
--
-+#include <linux/smp.h>
- #include <asm/io.h>
--
-+#include "common.h"
- #include "pm-rcar.h"
- #include "r8a7791.h"
-
-+#define RST 0xe6160000
-+#define CA15BAR 0x0020
-+#define CA15RESCNT 0x0040
-+#define RAM 0xe6300000
-+
- /* SYSC */
- #define SYSCIER 0x0c
- #define SYSCIMR 0x10
-@@ -40,10 +45,28 @@ static inline void r8a7791_sysc_init(void) {}
-
- void __init r8a7791_pm_init(void)
- {
-+ void __iomem *p;
-+ u32 bar;
- static int once;
-
- if (once++)
- return;
-
-+ /* RAM for jump stub, because BAR requires 256KB aligned address */
-+ p = ioremap_nocache(RAM, shmobile_boot_size);
-+ memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
-+ iounmap(p);
-+
-+ /* setup reset vectors */
-+ p = ioremap_nocache(RST, 0x63);
-+ bar = (RAM >> 8) & 0xfffffc00;
-+ writel_relaxed(bar, p + CA15BAR);
-+ writel_relaxed(bar | 0x10, p + CA15BAR);
-+
-+ /* enable clocks to all CPUs */
-+ writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
-+ p + CA15RESCNT);
-+ iounmap(p);
-+
- r8a7791_sysc_init();
- }
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index 248255524127..df086aa79630 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -24,35 +24,11 @@
- #include "r8a7791.h"
- #include "rcar-gen2.h"
-
--#define RST 0xe6160000
--#define CA15BAR 0x0020
--#define CA15RESCNT 0x0040
--#define RAM 0xe6300000
--
- static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
- {
-- void __iomem *p;
-- u32 bar;
--
- /* let APMU code install data related to shmobile_boot_vector */
- shmobile_smp_apmu_prepare_cpus(max_cpus);
-
-- /* RAM for jump stub, because BAR requires 256KB aligned address */
-- p = ioremap_nocache(RAM, shmobile_boot_size);
-- memcpy_toio(p, shmobile_boot_vector, shmobile_boot_size);
-- iounmap(p);
--
-- /* setup reset vectors */
-- p = ioremap_nocache(RST, 0x63);
-- bar = (RAM >> 8) & 0xfffffc00;
-- writel_relaxed(bar, p + CA15BAR);
-- writel_relaxed(bar | 0x10, p + CA15BAR);
--
-- /* enable clocks to all CPUs */
-- writel_relaxed((readl_relaxed(p + CA15RESCNT) & ~0x0f) | 0xa5a50000,
-- p + CA15RESCNT);
-- iounmap(p);
--
- r8a7791_pm_init();
- shmobile_smp_apmu_suspend_init();
- }
---
-2.1.2
-
diff --git a/patches.renesas/0915-ARM-shmobile-Allow-r8a7791-to-build-non-SMP-APMU-cod.patch b/patches.renesas/0915-ARM-shmobile-Allow-r8a7791-to-build-non-SMP-APMU-cod.patch
deleted file mode 100644
index 7d3031421ed5c..0000000000000
--- a/patches.renesas/0915-ARM-shmobile-Allow-r8a7791-to-build-non-SMP-APMU-cod.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From 3e7b6a202d3d95e2dc0b12c2b6aba20bd93a8db3 Mon Sep 17 00:00:00 2001
-From: Magnus Damm <damm+renesas@opensource.se>
-Date: Fri, 6 Jun 2014 16:21:19 +0900
-Subject: ARM: shmobile: Allow r8a7791 to build non-SMP APMU code
-
-Build the APMU for r8a7791 even though SMP is
-disabled in the kernel config. Also initialize
-Suspend-to-RAM from pm-r8a7791.c to in the future
-cover both UP and SMP use cases of the APMU.
-
-Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit bfe4cfa8ae21628267f2b879b4396ee17ea4fd3a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/Makefile | 5 +++--
- arch/arm/mach-shmobile/pm-r8a7791.c | 1 +
- arch/arm/mach-shmobile/smp-r8a7791.c | 1 -
- 3 files changed, 4 insertions(+), 3 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/Makefile b/arch/arm/mach-shmobile/Makefile
-index 59f63b7b52be..fe3878a1a69a 100644
---- a/arch/arm/mach-shmobile/Makefile
-+++ b/arch/arm/mach-shmobile/Makefile
-@@ -37,13 +37,14 @@ endif
- # CPU reset vector handling objects
- cpu-y := platsmp.o headsmp.o
- cpu-$(CONFIG_ARCH_R8A7790) += platsmp-apmu.o
-+cpu-$(CONFIG_ARCH_R8A7791) += platsmp-apmu.o
-
- # SMP objects
- smp-y := $(cpu-y)
- smp-$(CONFIG_ARCH_SH73A0) += smp-sh73a0.o headsmp-scu.o platsmp-scu.o
- smp-$(CONFIG_ARCH_R8A7779) += smp-r8a7779.o headsmp-scu.o platsmp-scu.o
- smp-$(CONFIG_ARCH_R8A7790) += smp-r8a7790.o
--smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o platsmp-apmu.o
-+smp-$(CONFIG_ARCH_R8A7791) += smp-r8a7791.o
- smp-$(CONFIG_ARCH_EMEV2) += smp-emev2.o headsmp-scu.o platsmp-scu.o
-
- # PM objects
-@@ -55,7 +56,7 @@ obj-$(CONFIG_ARCH_SH73A0) += pm-sh73a0.o
- obj-$(CONFIG_ARCH_R8A7740) += pm-r8a7740.o pm-rmobile.o
- obj-$(CONFIG_ARCH_R8A7779) += pm-r8a7779.o pm-rcar.o
- obj-$(CONFIG_ARCH_R8A7790) += pm-r8a7790.o pm-rcar.o $(cpu-y)
--obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o
-+obj-$(CONFIG_ARCH_R8A7791) += pm-r8a7791.o pm-rcar.o $(cpu-y)
-
- # IRQ objects
- obj-$(CONFIG_ARCH_SH7372) += entry-intc.o
-diff --git a/arch/arm/mach-shmobile/pm-r8a7791.c b/arch/arm/mach-shmobile/pm-r8a7791.c
-index c44304c3c6df..25f107bb3657 100644
---- a/arch/arm/mach-shmobile/pm-r8a7791.c
-+++ b/arch/arm/mach-shmobile/pm-r8a7791.c
-@@ -69,4 +69,5 @@ void __init r8a7791_pm_init(void)
- iounmap(p);
-
- r8a7791_sysc_init();
-+ shmobile_smp_apmu_suspend_init();
- }
-diff --git a/arch/arm/mach-shmobile/smp-r8a7791.c b/arch/arm/mach-shmobile/smp-r8a7791.c
-index df086aa79630..f743386166fb 100644
---- a/arch/arm/mach-shmobile/smp-r8a7791.c
-+++ b/arch/arm/mach-shmobile/smp-r8a7791.c
-@@ -30,7 +30,6 @@ static void __init r8a7791_smp_prepare_cpus(unsigned int max_cpus)
- shmobile_smp_apmu_prepare_cpus(max_cpus);
-
- r8a7791_pm_init();
-- shmobile_smp_apmu_suspend_init();
- }
-
- static int r8a7791_smp_boot_secondary(unsigned int cpu,
---
-2.1.2
-
diff --git a/patches.renesas/0916-ARM-shmobile-r8a7790-add-internal-PCI-bridge-nodes.patch b/patches.renesas/0916-ARM-shmobile-r8a7790-add-internal-PCI-bridge-nodes.patch
deleted file mode 100644
index 03f42b1001c16..0000000000000
--- a/patches.renesas/0916-ARM-shmobile-r8a7790-add-internal-PCI-bridge-nodes.patch
+++ /dev/null
@@ -1,95 +0,0 @@
-From 5586c7e4bbdc487020c8ceb76af37ab1f0e9d144 Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Tue, 24 Jun 2014 21:59:54 +0400
-Subject: ARM: shmobile: r8a7790: add internal PCI bridge nodes
-
-Add device nodes for the R8A7790 internal PCI bridge devices.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
-[Sergei: added several properties to the PCI bridge nodes]
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit ff4f3eb8b3386208944fe60b85e6cba4d338198e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 60 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 60 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 994330e81a52..373d9a21c912 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -930,6 +930,66 @@
- status = "disabled";
- };
-
-+ pci0: pci@ee090000 {
-+ compatible = "renesas,pci-r8a7790";
-+ device_type = "pci";
-+ clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
-+ reg = <0 0xee090000 0 0xc00>,
-+ <0 0xee080000 0 0x1100>;
-+ interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+
-+ bus-range = <0 0>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ #interrupt-cells = <1>;
-+ ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-+ interrupt-map-mask = <0xff00 0 0 0x7>;
-+ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-+ 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+
-+ pci1: pci@ee0b0000 {
-+ compatible = "renesas,pci-r8a7790";
-+ device_type = "pci";
-+ clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
-+ reg = <0 0xee0b0000 0 0xc00>,
-+ <0 0xee0a0000 0 0x1100>;
-+ interrupts = <0 112 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+
-+ bus-range = <1 1>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ #interrupt-cells = <1>;
-+ ranges = <0x02000000 0 0xee0a0000 0 0xee0a0000 0 0x00010000>;
-+ interrupt-map-mask = <0xff00 0 0 0x7>;
-+ interrupt-map = <0x0000 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
-+ 0x0800 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 112 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+
-+ pci2: pci@ee0d0000 {
-+ compatible = "renesas,pci-r8a7790";
-+ device_type = "pci";
-+ clocks = <&mstp7_clks R8A7790_CLK_EHCI>;
-+ reg = <0 0xee0d0000 0 0xc00>,
-+ <0 0xee0c0000 0 0x1100>;
-+ interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+
-+ bus-range = <2 2>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ #interrupt-cells = <1>;
-+ ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-+ interrupt-map-mask = <0xff00 0 0 0x7>;
-+ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-+ 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+
- pciec: pcie@fe000000 {
- compatible = "renesas,pcie-r8a7790";
- reg = <0 0xfe000000 0 0x80000>;
---
-2.1.2
-
diff --git a/patches.renesas/0917-ARM-shmobile-lager-enable-internal-PCI.patch b/patches.renesas/0917-ARM-shmobile-lager-enable-internal-PCI.patch
deleted file mode 100644
index 31a1d093039ba..0000000000000
--- a/patches.renesas/0917-ARM-shmobile-lager-enable-internal-PCI.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 90cce61d85c8b50d09861de3f80ea4cfa577f81d Mon Sep 17 00:00:00 2001
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-Date: Tue, 24 Jun 2014 22:02:21 +0400
-Subject: ARM: shmobile: lager: enable internal PCI
-
-Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to
-them.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Reviewed-by: Ian Molton <ian.molton@codethink.co.uk>
-[Sergei: enabled PCI0]
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit d8584660676e00157735abcb34b09d690d96ee16)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 850dff8aedb9..17ff3f9e31ee 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -219,6 +219,21 @@
- renesas,groups = "i2c3";
- renesas,function = "i2c3";
- };
-+
-+ usb0_pins: usb0 {
-+ renesas,groups = "usb0";
-+ renesas,function = "usb0";
-+ };
-+
-+ usb1_pins: usb1 {
-+ renesas,groups = "usb1";
-+ renesas,function = "usb1";
-+ };
-+
-+ usb2_pins: usb2 {
-+ renesas,groups = "usb2";
-+ renesas,function = "usb2";
-+ };
- };
-
- &ether {
-@@ -368,3 +383,21 @@
- regulator-always-on;
- };
- };
-+
-+&pci0 {
-+ status = "okay";
-+ pinctrl-0 = <&usb0_pins>;
-+ pinctrl-names = "default";
-+};
-+
-+&pci1 {
-+ status = "okay";
-+ pinctrl-0 = <&usb1_pins>;
-+ pinctrl-names = "default";
-+};
-+
-+&pci2 {
-+ status = "okay";
-+ pinctrl-0 = <&usb2_pins>;
-+ pinctrl-names = "default";
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0918-ARM-shmobile-r8a7790-add-DVC-support-for-sound-node-.patch b/patches.renesas/0918-ARM-shmobile-r8a7790-add-DVC-support-for-sound-node-.patch
deleted file mode 100644
index caacb7ed2fdf2..0000000000000
--- a/patches.renesas/0918-ARM-shmobile-r8a7790-add-DVC-support-for-sound-node-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From fb923aeebc26ddb7aba937d4d4cb06eaae97ff41 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 25 Jun 2014 17:52:17 -0700
-Subject: ARM: shmobile: r8a7790: add DVC support for sound node on DTSI
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 334d69a23b177a4ed38e654912444dc48ac46765)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index 373d9a21c912..bdcb7f08fcc5 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -1034,16 +1034,23 @@
- <&mstp10_clks R8A7790_CLK_SCU_SRC5>, <&mstp10_clks R8A7790_CLK_SCU_SRC4>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC3>, <&mstp10_clks R8A7790_CLK_SCU_SRC2>,
- <&mstp10_clks R8A7790_CLK_SCU_SRC1>, <&mstp10_clks R8A7790_CLK_SCU_SRC0>,
-+ <&mstp10_clks R8A7790_CLK_SCU_DVC0>, <&mstp10_clks R8A7790_CLK_SCU_DVC1>,
- <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
- clock-names = "ssi-all",
- "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
- "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
- "src.9", "src.8", "src.7", "src.6", "src.5",
- "src.4", "src.3", "src.2", "src.1", "src.0",
-+ "dvc.0", "dvc.1",
- "clk_a", "clk_b", "clk_c", "clk_i";
-
- status = "disabled";
-
-+ rcar_sound,dvc {
-+ dvc0: dvc@0 { };
-+ dvc1: dvc@1 { };
-+ };
-+
- rcar_sound,src {
- src0: src@0 { };
- src1: src@1 { };
---
-2.1.2
-
diff --git a/patches.renesas/0919-ARM-shmobile-r8a7791-add-DVC-support-for-sound-node-.patch b/patches.renesas/0919-ARM-shmobile-r8a7791-add-DVC-support-for-sound-node-.patch
deleted file mode 100644
index a783646f665c0..0000000000000
--- a/patches.renesas/0919-ARM-shmobile-r8a7791-add-DVC-support-for-sound-node-.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From b0b4db9f236a0010e06f3afbd9860fcc399a3f23 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Wed, 25 Jun 2014 17:52:33 -0700
-Subject: ARM: shmobile: r8a7791: add DVC support for sound node on DTSI
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 150c8ad40808189423002ea9fc6a858a3a59e6dc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 7 +++++++
- 1 file changed, 7 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 40bff5aaf986..67262f6a7168 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -1005,16 +1005,23 @@
- <&mstp10_clks R8A7791_CLK_SCU_SRC5>, <&mstp10_clks R8A7791_CLK_SCU_SRC4>,
- <&mstp10_clks R8A7791_CLK_SCU_SRC3>, <&mstp10_clks R8A7791_CLK_SCU_SRC2>,
- <&mstp10_clks R8A7791_CLK_SCU_SRC1>, <&mstp10_clks R8A7791_CLK_SCU_SRC0>,
-+ <&mstp10_clks R8A7791_CLK_SCU_DVC0>, <&mstp10_clks R8A7791_CLK_SCU_DVC1>,
- <&audio_clk_a>, <&audio_clk_b>, <&audio_clk_c>, <&m2_clk>;
- clock-names = "ssi-all",
- "ssi.9", "ssi.8", "ssi.7", "ssi.6", "ssi.5",
- "ssi.4", "ssi.3", "ssi.2", "ssi.1", "ssi.0",
- "src.9", "src.8", "src.7", "src.6", "src.5",
- "src.4", "src.3", "src.2", "src.1", "src.0",
-+ "dvc.0", "dvc.1",
- "clk_a", "clk_b", "clk_c", "clk_i";
-
- status = "disabled";
-
-+ rcar_sound,dvc {
-+ dvc0: dvc@0 { };
-+ dvc1: dvc@1 { };
-+ };
-+
- rcar_sound,src {
- src0: src@0 { };
- src1: src@1 { };
---
-2.1.2
-
diff --git a/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch b/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch
deleted file mode 100644
index 82bf222f36d57..0000000000000
--- a/patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From e4f78b53d46ae1b7d680a535c57face76d34b370 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Sun, 22 Jun 2014 17:55:18 -0700
-Subject: ASoC: fsi: use SNDRV_DMA_TYPE_DEV for sound buffer
-
-Current fsi driver is using SNDRV_DMA_TYPE_CONTINUOUS
-for snd_pcm_lib_preallocate_pages_for_all().
-But, it came from original dma-sh7760.c,
-and no longer needed.
-This patch exchange its parameter, and removed
-original dma mapping and un-needed
-dma_sync_single_xxx() from driver.
-
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit ffb83e8cb14cace1b08ceb56695b580c808d8a41)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/board-armadillo800eva.c | 4 ++
- arch/arm/mach-shmobile/board-kzm9g.c | 2 +
- arch/arm/mach-shmobile/board-mackerel.c | 4 ++
- arch/sh/boards/mach-ecovec24/setup.c | 2 +
- sound/soc/sh/fsi.c | 42 ++-----------------------
- 5 files changed, 17 insertions(+), 37 deletions(-)
-
---- a/arch/arm/mach-shmobile/board-armadillo800eva.c
-+++ b/arch/arm/mach-shmobile/board-armadillo800eva.c
-@@ -1034,6 +1034,8 @@ static struct platform_device fsi_wm8978
- .id = 0,
- .dev = {
- .platform_data = &fsi_wm8978_info,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .dma_mask = &fsi_wm8978_device.dev.coherent_dma_mask,
- },
- };
-
-@@ -1057,6 +1059,8 @@ static struct platform_device fsi_hdmi_d
- .id = 1,
- .dev = {
- .platform_data = &fsi2_hdmi_info,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .dma_mask = &fsi_hdmi_device.dev.coherent_dma_mask,
- },
- };
-
---- a/arch/arm/mach-shmobile/board-kzm9g.c
-+++ b/arch/arm/mach-shmobile/board-kzm9g.c
-@@ -605,6 +605,8 @@ static struct platform_device fsi_ak4648
- .name = "asoc-simple-card",
- .dev = {
- .platform_data = &fsi2_ak4648_info,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .dma_mask = &fsi_ak4648_device.dev.coherent_dma_mask,
- },
- };
-
---- a/arch/arm/mach-shmobile/board-mackerel.c
-+++ b/arch/arm/mach-shmobile/board-mackerel.c
-@@ -523,6 +523,8 @@ static struct platform_device fsi_hdmi_d
- .id = 1,
- .dev = {
- .platform_data = &fsi2_hdmi_info,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .dma_mask = &fsi_hdmi_device.dev.coherent_dma_mask,
- },
- };
-
-@@ -919,6 +921,8 @@ static struct platform_device fsi_ak4643
- .name = "asoc-simple-card",
- .dev = {
- .platform_data = &fsi2_ak4643_info,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .dma_mask = &fsi_ak4643_device.dev.coherent_dma_mask,
- },
- };
-
---- a/arch/sh/boards/mach-ecovec24/setup.c
-+++ b/arch/sh/boards/mach-ecovec24/setup.c
-@@ -874,6 +874,8 @@ static struct platform_device fsi_da7210
- .name = "asoc-simple-card",
- .dev = {
- .platform_data = &fsi_da7210_info,
-+ .coherent_dma_mask = DMA_BIT_MASK(32),
-+ .dma_mask = &fsi_da7210_device.dev.coherent_dma_mask,
- },
- };
-
---- a/sound/soc/sh/fsi.c
-+++ b/sound/soc/sh/fsi.c
-@@ -233,7 +233,6 @@ struct fsi_stream {
- */
- struct dma_chan *chan;
- struct work_struct work;
-- dma_addr_t dma;
- int dma_id;
- int loop_cnt;
- int additional_pos;
-@@ -1279,11 +1278,6 @@ static irqreturn_t fsi_interrupt(int irq
- */
- static int fsi_dma_init(struct fsi_priv *fsi, struct fsi_stream *io)
- {
-- struct snd_pcm_runtime *runtime = io->substream->runtime;
-- struct snd_soc_dai *dai = fsi_get_dai(io->substream);
-- enum dma_data_direction dir = fsi_stream_is_play(fsi, io) ?
-- DMA_TO_DEVICE : DMA_FROM_DEVICE;
--
- /*
- * 24bit data : 24bit bus / package in back
- * 16bit data : 16bit bus / stream mode
-@@ -1293,19 +1287,7 @@ static int fsi_dma_init(struct fsi_priv
-
- io->loop_cnt = 2; /* push 1st, 2nd period first, then 3rd, 4th... */
- io->additional_pos = 0;
-- io->dma = dma_map_single(dai->dev, runtime->dma_area,
-- snd_pcm_lib_buffer_bytes(io->substream), dir);
-- return 0;
--}
--
--static int fsi_dma_quit(struct fsi_priv *fsi, struct fsi_stream *io)
--{
-- struct snd_soc_dai *dai = fsi_get_dai(io->substream);
-- enum dma_data_direction dir = fsi_stream_is_play(fsi, io) ?
-- DMA_TO_DEVICE : DMA_FROM_DEVICE;
-
-- dma_unmap_single(dai->dev, io->dma,
-- snd_pcm_lib_buffer_bytes(io->substream), dir);
- return 0;
- }
-
-@@ -1317,7 +1299,8 @@ static dma_addr_t fsi_dma_get_area(struc
- if (period >= runtime->periods)
- period = 0;
-
-- return io->dma + samples_to_bytes(runtime, period * io->period_samples);
-+ return runtime->dma_addr +
-+ samples_to_bytes(runtime, period * io->period_samples);
- }
-
- static void fsi_dma_complete(void *data)
-@@ -1325,12 +1308,6 @@ static void fsi_dma_complete(void *data)
- struct fsi_stream *io = (struct fsi_stream *)data;
- struct fsi_priv *fsi = fsi_stream_to_priv(io);
- struct snd_pcm_runtime *runtime = io->substream->runtime;
-- struct snd_soc_dai *dai = fsi_get_dai(io->substream);
-- enum dma_data_direction dir = fsi_stream_is_play(fsi, io) ?
-- DMA_TO_DEVICE : DMA_FROM_DEVICE;
--
-- dma_sync_single_for_cpu(dai->dev, fsi_dma_get_area(io, 0),
-- samples_to_bytes(runtime, io->period_samples), dir);
-
- io->buff_sample_pos += io->period_samples;
- io->period_pos++;
-@@ -1369,8 +1346,6 @@ static void fsi_dma_do_work(struct work_
- for (i = 0; i < io->loop_cnt; i++) {
- buf = fsi_dma_get_area(io, io->additional_pos);
-
-- dma_sync_single_for_device(dai->dev, buf, len, dir);
--
- desc = dmaengine_prep_slave_single(io->chan, buf, len, dir,
- DMA_PREP_INTERRUPT | DMA_CTRL_ACK);
- if (!desc) {
-@@ -1495,7 +1470,6 @@ static int fsi_dma_remove(struct fsi_pri
-
- static struct fsi_stream_handler fsi_dma_push_handler = {
- .init = fsi_dma_init,
-- .quit = fsi_dma_quit,
- .probe = fsi_dma_probe,
- .transfer = fsi_dma_transfer,
- .remove = fsi_dma_remove,
-@@ -1849,16 +1823,10 @@ static void fsi_pcm_free(struct snd_pcm
-
- static int fsi_pcm_new(struct snd_soc_pcm_runtime *rtd)
- {
-- struct snd_pcm *pcm = rtd->pcm;
--
-- /*
-- * dont use SNDRV_DMA_TYPE_DEV, since it will oops the SH kernel
-- * in MMAP mode (i.e. aplay -M)
-- */
- return snd_pcm_lib_preallocate_pages_for_all(
-- pcm,
-- SNDRV_DMA_TYPE_CONTINUOUS,
-- snd_dma_continuous_data(GFP_KERNEL),
-+ rtd->pcm,
-+ SNDRV_DMA_TYPE_DEV,
-+ rtd->card->snd_card->dev,
- PREALLOC_BUFFER, PREALLOC_BUFFER_MAX);
- }
-
diff --git a/patches.renesas/0921-ARM-shmobile-r8a7790-Fix-whitespace-errors-in-pci-no.patch b/patches.renesas/0921-ARM-shmobile-r8a7790-Fix-whitespace-errors-in-pci-no.patch
deleted file mode 100644
index b5e64e596077c..0000000000000
--- a/patches.renesas/0921-ARM-shmobile-r8a7790-Fix-whitespace-errors-in-pci-no.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 3a9245366e78d817959fa22ddfe2c83943b10e0d Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Mon, 30 Jun 2014 11:49:53 +0200
-Subject: ARM: shmobile: r8a7790: Fix whitespace errors in pci nodes
-
-Remove spaces in between tabs.
-
-Introduced by commit ff4f3eb8b3386208944fe60b85e6cba4d338198e ("ARM:
-shmobile: r8a7790: add internal PCI bridge nodes").
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 517ec80a3321e01fd07eeb6098c3d7b455fcca68)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790.dtsi | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790.dtsi b/arch/arm/boot/dts/r8a7790.dtsi
-index bdcb7f08fcc5..d9ddecbb859c 100644
---- a/arch/arm/boot/dts/r8a7790.dtsi
-+++ b/arch/arm/boot/dts/r8a7790.dtsi
-@@ -946,8 +946,8 @@
- ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
- interrupt-map-mask = <0xff00 0 0 0x7>;
- interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-- 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-- 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
-+ 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
- };
-
- pci1: pci@ee0b0000 {
-@@ -966,8 +966,8 @@
- ranges = <0x02000000 0 0xee0a0000 0 0xee0a0000 0 0x00010000>;
- interrupt-map-mask = <0xff00 0 0 0x7>;
- interrupt-map = <0x0000 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
-- 0x0800 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
-- 0x1000 0 0 2 &gic 0 112 IRQ_TYPE_LEVEL_HIGH>;
-+ 0x0800 0 0 1 &gic 0 112 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 112 IRQ_TYPE_LEVEL_HIGH>;
- };
-
- pci2: pci@ee0d0000 {
-@@ -986,8 +986,8 @@
- ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
- interrupt-map-mask = <0xff00 0 0 0x7>;
- interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-- 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-- 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
-+ 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
- };
-
- pciec: pcie@fe000000 {
---
-2.1.2
-
diff --git a/patches.renesas/0922-ARM-shmobile-genmai-reference-dts-Add-RSPI-node.patch b/patches.renesas/0922-ARM-shmobile-genmai-reference-dts-Add-RSPI-node.patch
deleted file mode 100644
index 1720ff8bd2185..0000000000000
--- a/patches.renesas/0922-ARM-shmobile-genmai-reference-dts-Add-RSPI-node.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From a3386ab700f5d259a47710b0b33d5024d709c9ad Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert@linux-m68k.org>
-Date: Thu, 3 Jul 2014 14:02:45 +0200
-Subject: ARM: shmobile: genmai reference dts: Add RSPI node
-
-Add SPI device for RSPI on Genmai.
-
-On this board, only rspi4 is in use. Its bus contains a single device
-(a wm8978 audio codec), for which no bindings are defined yet.
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ae6b61840bfa36d4f1d89703a312ce29a52c3a76)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r7s72100-genmai.dts | 10 ++++++++++
- 1 file changed, 10 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r7s72100-genmai.dts b/arch/arm/boot/dts/r7s72100-genmai.dts
-index 56849b55e1c2..20705467f4c9 100644
---- a/arch/arm/boot/dts/r7s72100-genmai.dts
-+++ b/arch/arm/boot/dts/r7s72100-genmai.dts
-@@ -57,3 +57,13 @@
- &scif2 {
- status = "okay";
- };
-+
-+&spi4 {
-+ status = "okay";
-+
-+ codec: codec@0 {
-+ compatible = "wlf,wm8978";
-+ reg = <0>;
-+ spi-max-frequency = <5000000>;
-+ };
-+};
---
-2.1.2
-
diff --git a/patches.renesas/0923-ARM-shmobile-fix-shmobile_smp_apmu_suspend_init-buil.patch b/patches.renesas/0923-ARM-shmobile-fix-shmobile_smp_apmu_suspend_init-buil.patch
deleted file mode 100644
index e96378c9442b2..0000000000000
--- a/patches.renesas/0923-ARM-shmobile-fix-shmobile_smp_apmu_suspend_init-buil.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 9292daebe095ed43e635403bfc0098793710a9b3 Mon Sep 17 00:00:00 2001
-From: Arnd Bergmann <arnd@arndb.de>
-Date: Thu, 3 Jul 2014 16:08:30 +0200
-Subject: ARM: shmobile: fix shmobile_smp_apmu_suspend_init build failure for
- !SUSPEND
-
-Patch d6d757c9a4e ("ARM: shmobile: APMU: Add Core-Standby-state for
-Suspend to RAM") added both an inline wrapper for shmobile_smp_apmu_suspend_init
-and an empty function in arch/arm/mach-shmobile/platsmp-apmu.c. We get a
-build failure when both are present, so this patch removes the one in the .c
-file and keeps the inline version.
-
-Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d358c99838f3cf63ad7536124be4318cc84b11fa)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/platsmp-apmu.c | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/platsmp-apmu.c b/arch/arm/mach-shmobile/platsmp-apmu.c
-index a05b16d88257..2c06810d3a70 100644
---- a/arch/arm/mach-shmobile/platsmp-apmu.c
-+++ b/arch/arm/mach-shmobile/platsmp-apmu.c
-@@ -244,6 +244,4 @@ void __init shmobile_smp_apmu_suspend_init(void)
- {
- shmobile_suspend_ops.enter = shmobile_smp_apmu_enter_suspend;
- }
--#else
--void shmobile_smp_apmu_suspend_init(void) {}
- #endif
---
-2.1.2
-
diff --git a/patches.renesas/0924-ARM-shmobile-r8a7791-add-internal-PCI-bridge-nodes.patch b/patches.renesas/0924-ARM-shmobile-r8a7791-add-internal-PCI-bridge-nodes.patch
deleted file mode 100644
index d78e23bd51aab..0000000000000
--- a/patches.renesas/0924-ARM-shmobile-r8a7791-add-internal-PCI-bridge-nodes.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From 2f128c09de44ae4f0b68599ebda540a088f3a9cb Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 24 Jun 2014 22:10:05 +0400
-Subject: ARM: shmobile: r8a7791: add internal PCI bridge nodes
-
-Add device nodes for the R8A7791 internal PCI bridge devices.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-[horms+renesas@verge.net.au: minor witespace changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit aace0809e9bbbfe1570a298a3284d9802fbf2d1a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791.dtsi | 40 ++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 40 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791.dtsi b/arch/arm/boot/dts/r8a7791.dtsi
-index 67262f6a7168..0d82a4b3c650 100644
---- a/arch/arm/boot/dts/r8a7791.dtsi
-+++ b/arch/arm/boot/dts/r8a7791.dtsi
-@@ -961,6 +961,46 @@
- status = "disabled";
- };
-
-+ pci0: pci@ee090000 {
-+ compatible = "renesas,pci-r8a7791";
-+ device_type = "pci";
-+ clocks = <&mstp7_clks R8A7791_CLK_EHCI>;
-+ reg = <0 0xee090000 0 0xc00>,
-+ <0 0xee080000 0 0x1100>;
-+ interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+
-+ bus-range = <0 0>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ #interrupt-cells = <1>;
-+ ranges = <0x02000000 0 0xee080000 0 0xee080000 0 0x00010000>;
-+ interrupt-map-mask = <0xff00 0 0 0x7>;
-+ interrupt-map = <0x0000 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-+ 0x0800 0 0 1 &gic 0 108 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 108 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+
-+ pci1: pci@ee0d0000 {
-+ compatible = "renesas,pci-r8a7791";
-+ device_type = "pci";
-+ clocks = <&mstp7_clks R8A7791_CLK_EHCI>;
-+ reg = <0 0xee0d0000 0 0xc00>,
-+ <0 0xee0c0000 0 0x1100>;
-+ interrupts = <0 113 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+
-+ bus-range = <1 1>;
-+ #address-cells = <3>;
-+ #size-cells = <2>;
-+ #interrupt-cells = <1>;
-+ ranges = <0x02000000 0 0xee0c0000 0 0xee0c0000 0 0x00010000>;
-+ interrupt-map-mask = <0xff00 0 0 0x7>;
-+ interrupt-map = <0x0000 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-+ 0x0800 0 0 1 &gic 0 113 IRQ_TYPE_LEVEL_HIGH
-+ 0x1000 0 0 2 &gic 0 113 IRQ_TYPE_LEVEL_HIGH>;
-+ };
-+
- pciec: pcie@fe000000 {
- compatible = "renesas,pcie-r8a7791";
- reg = <0 0xfe000000 0 0x80000>;
---
-2.1.2
-
diff --git a/patches.renesas/0925-ARM-shmobile-koelsch-enable-internal-PCI.patch b/patches.renesas/0925-ARM-shmobile-koelsch-enable-internal-PCI.patch
deleted file mode 100644
index 5193676334406..0000000000000
--- a/patches.renesas/0925-ARM-shmobile-koelsch-enable-internal-PCI.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 11a6ecdc6afd5cc3dd5ab6d77e1955d8523c30c6 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 24 Jun 2014 22:11:44 +0400
-Subject: ARM: shmobile: koelsch: enable internal PCI
-
-Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to
-them.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-[horms+renesas@verge.net.au: minor witespace changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 7540aeb0dd2c830ed490e7227d51bc3050ac798c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 5dac67395525..23486c081a69 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -279,6 +279,16 @@
- renesas,groups = "i2c6";
- renesas,function = "i2c6";
- };
-+
-+ usb0_pins: usb0 {
-+ renesas,groups = "usb0";
-+ renesas,function = "usb0";
-+ };
-+
-+ usb1_pins: usb1 {
-+ renesas,groups = "usb1";
-+ renesas,function = "usb1";
-+ };
- };
-
- &ether {
-@@ -426,6 +436,18 @@
- };
- };
-
-+&pci0 {
-+ status = "okay";
-+ pinctrl-0 = <&usb0_pins>;
-+ pinctrl-names = "default";
-+};
-+
-+&pci1 {
-+ status = "okay";
-+ pinctrl-0 = <&usb1_pins>;
-+ pinctrl-names = "default";
-+};
-+
- &pcie_bus_clk {
- status = "okay";
- };
---
-2.1.2
-
diff --git a/patches.renesas/0926-ARM-shmobile-henninger-enable-internal-PCI.patch b/patches.renesas/0926-ARM-shmobile-henninger-enable-internal-PCI.patch
deleted file mode 100644
index b5d76ec835fea..0000000000000
--- a/patches.renesas/0926-ARM-shmobile-henninger-enable-internal-PCI.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From c8abd6ba05a91aacfb7e6051368f0000d8b24c59 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 24 Jun 2014 22:13:38 +0400
-Subject: ARM: shmobile: henninger: enable internal PCI
-
-Enable internal AHB-PCI bridges for the USB EHCI/OHCI controllers attached to
-them.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Arnd Bergmann <arnd@arndb.de>
-[horms+renesas@verge.net.au: minor witespace changes]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 83ccfa8d0c6a734720ed8cd23b97256ffcae156a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index bc48bccfff54..cfd1fa68d674 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -125,6 +125,16 @@
- "msiof0_tx";
- renesas,function = "msiof0";
- };
-+
-+ usb0_pins: usb0 {
-+ renesas,groups = "usb0";
-+ renesas,function = "usb0";
-+ };
-+
-+ usb1_pins: usb1 {
-+ renesas,groups = "usb1";
-+ renesas,function = "usb1";
-+ };
- };
-
- &scif0 {
-@@ -231,6 +241,18 @@
- };
- };
-
-+&pci0 {
-+ status = "okay";
-+ pinctrl-0 = <&usb0_pins>;
-+ pinctrl-names = "default";
-+};
-+
-+&pci1 {
-+ status = "okay";
-+ pinctrl-0 = <&usb1_pins>;
-+ pinctrl-names = "default";
-+};
-+
- &pcie_bus_clk {
- status = "okay";
- };
---
-2.1.2
-
diff --git a/patches.renesas/0927-ARM-shmobile-henninger-Consistently-use-tabs-for-ind.patch b/patches.renesas/0927-ARM-shmobile-henninger-Consistently-use-tabs-for-ind.patch
deleted file mode 100644
index cd9689ef22520..0000000000000
--- a/patches.renesas/0927-ARM-shmobile-henninger-Consistently-use-tabs-for-ind.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From e1f7952f30f26045ea26993bdb690ccf36e855af Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 08:47:36 +0200
-Subject: ARM: shmobile: henninger: Consistently use tabs for indentation
-
-Unify white space usage by consistently using tabs for indentation.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit eb0f12e24f357f1663b4da8c571214d5a11eb011)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-henninger.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-henninger.dts b/arch/arm/boot/dts/r8a7791-henninger.dts
-index cfd1fa68d674..3a2ef0a2a137 100644
---- a/arch/arm/boot/dts/r8a7791-henninger.dts
-+++ b/arch/arm/boot/dts/r8a7791-henninger.dts
-@@ -161,7 +161,7 @@
- };
-
- &sata0 {
-- status = "okay";
-+ status = "okay";
- };
-
- &sdhi0 {
---
-2.1.2
-
diff --git a/patches.renesas/0928-ARM-shmobile-r8a7779-Consistently-use-tabs-for-inden.patch b/patches.renesas/0928-ARM-shmobile-r8a7779-Consistently-use-tabs-for-inden.patch
deleted file mode 100644
index f1122e9184eaf..0000000000000
--- a/patches.renesas/0928-ARM-shmobile-r8a7779-Consistently-use-tabs-for-inden.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From 9a90a720ad1c8a84a2bf2fd6ab495c87263a8ad1 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 08:47:38 +0200
-Subject: ARM: shmobile: r8a7779: Consistently use tabs for indentation
-
-Unify white space usage by consistently using tabs for indentation.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit cc703a59c0f8769456a7eb0d53a8d709e5c19387)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779.dtsi | 14 +++++++-------
- 1 file changed, 7 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779.dtsi b/arch/arm/boot/dts/r8a7779.dtsi
-index 94e2fc836492..58d0d952d60e 100644
---- a/arch/arm/boot/dts/r8a7779.dtsi
-+++ b/arch/arm/boot/dts/r8a7779.dtsi
-@@ -54,13 +54,13 @@
- spi2 = &hspi2;
- };
-
-- gic: interrupt-controller@f0001000 {
-- compatible = "arm,cortex-a9-gic";
-- #interrupt-cells = <3>;
-- interrupt-controller;
-- reg = <0xf0001000 0x1000>,
-- <0xf0000100 0x100>;
-- };
-+ gic: interrupt-controller@f0001000 {
-+ compatible = "arm,cortex-a9-gic";
-+ #interrupt-cells = <3>;
-+ interrupt-controller;
-+ reg = <0xf0001000 0x1000>,
-+ <0xf0000100 0x100>;
-+ };
-
- gpio0: gpio@ffc40000 {
- compatible = "renesas,gpio-r8a7779", "renesas,gpio-rcar";
---
-2.1.2
-
diff --git a/patches.renesas/0929-ARM-shmobile-armadillo800eva-reference-Remove-early_.patch b/patches.renesas/0929-ARM-shmobile-armadillo800eva-reference-Remove-early_.patch
deleted file mode 100644
index ba783d37b19a6..0000000000000
--- a/patches.renesas/0929-ARM-shmobile-armadillo800eva-reference-Remove-early_.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From f52a73276b94532fcd3350873d86ee043f8d5b15 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 08:50:08 +0200
-Subject: ARM: shmobile: armadillo800eva-reference: Remove early_printk from
- command line
-
-As early printk is not supported when devices are initialised
-using DT, so remove it from the command line.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit b2386fa51696ffcae82f27ebbdc667b037be5048)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index f6ef73ff49e8..ba2e1806b3ad 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -20,7 +20,7 @@
- compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740";
-
- chosen {
-- bootargs = "console=tty0 console=ttySC1,115200 earlyprintk=sh-sci.1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
-+ bootargs = "console=tty0 console=ttySC1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
- };
-
- memory {
---
-2.1.2
-
diff --git a/patches.renesas/0930-ARM-shmobile-kzm9g-reference-Remove-early_printk-fro.patch b/patches.renesas/0930-ARM-shmobile-kzm9g-reference-Remove-early_printk-fro.patch
deleted file mode 100644
index 5e6566bb5889d..0000000000000
--- a/patches.renesas/0930-ARM-shmobile-kzm9g-reference-Remove-early_printk-fro.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 78f213bb90362cf0208b9f5d938d8f3f9a4699d7 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 08:50:09 +0200
-Subject: ARM: shmobile: kzm9g-reference: Remove early_printk from command line
-
-As early printk is not supported when devices are initialised
-using DT, so remove it from the command line.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0b7324706ea24489a0ddcbd9d472e232520aad80)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-index a99171c8a782..838f93e44452 100644
---- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-@@ -35,7 +35,7 @@
- };
-
- chosen {
-- bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel earlyprintk=sh-sci.4,115200 rw";
-+ bootargs = "console=tty0 console=ttySC4,115200 root=/dev/nfs ip=dhcp ignore_loglevel rw";
- };
-
- memory {
---
-2.1.2
-
diff --git a/patches.renesas/0931-ARM-shmobile-marzen-Consistently-use-tabs-for-indent.patch b/patches.renesas/0931-ARM-shmobile-marzen-Consistently-use-tabs-for-indent.patch
deleted file mode 100644
index 88fb58c690ce6..0000000000000
--- a/patches.renesas/0931-ARM-shmobile-marzen-Consistently-use-tabs-for-indent.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 1f8b6fec6752d619b0ad2e856c34cd6b11d88c80 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 08:47:37 +0200
-Subject: ARM: shmobile: marzen: Consistently use tabs for indentation
-
-Unify white space usage by consistently using tabs for indentation.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 08af64097d4c5cb17f9df4dadf80ed5f508db743)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7779-marzen.dts | 12 ++++++------
- 1 file changed, 6 insertions(+), 6 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7779-marzen.dts b/arch/arm/boot/dts/r8a7779-marzen.dts
-index 20b176807848..5745555df943 100644
---- a/arch/arm/boot/dts/r8a7779-marzen.dts
-+++ b/arch/arm/boot/dts/r8a7779-marzen.dts
-@@ -112,17 +112,17 @@
- };
-
- &scif2 {
-- pinctrl-0 = <&scif2_pins>;
-- pinctrl-names = "default";
-+ pinctrl-0 = <&scif2_pins>;
-+ pinctrl-names = "default";
-
-- status = "okay";
-+ status = "okay";
- };
-
- &scif4 {
-- pinctrl-0 = <&scif4_pins>;
-- pinctrl-names = "default";
-+ pinctrl-0 = <&scif4_pins>;
-+ pinctrl-names = "default";
-
-- status = "okay";
-+ status = "okay";
- };
-
- &sdhi0 {
---
-2.1.2
-
diff --git a/patches.renesas/0932-ARM-shmobile-Enable-R-Car-Gen-2-PCIe-in-shmobile_def.patch b/patches.renesas/0932-ARM-shmobile-Enable-R-Car-Gen-2-PCIe-in-shmobile_def.patch
deleted file mode 100644
index a91ca5f853cfe..0000000000000
--- a/patches.renesas/0932-ARM-shmobile-Enable-R-Car-Gen-2-PCIe-in-shmobile_def.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From ad64652956b97714da3a49ba49ed620c0d8afdca Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 15:23:52 +0200
-Subject: ARM: shmobile: Enable R-Car Gen 2 PCIe in shmobile_defconfig
-
-The R-Car Gen 2 PCIe driver provides PCIe host support for
-Renesas R-Car Gen2 platforms. To increase hardware support enable
-the driver in the shmobile_defconfig multiplatform configuration.
-
-Cc: Phil Edworthy <phil.edworthy@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 8cbf869a0a278c4d39e50daa4f4101b394a72a93)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 5f05e98eb762..6bc85a5539f1 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -24,6 +24,7 @@ CONFIG_PL310_ERRATA_588369=y
- CONFIG_ARM_ERRATA_754322=y
- CONFIG_PCI=y
- CONFIG_PCI_RCAR_GEN2=y
-+CONFIG_PCI_RCAR_GEN2_PCIE=y
- CONFIG_SMP=y
- CONFIG_SCHED_MC=y
- CONFIG_HAVE_ARM_ARCH_TIMER=y
---
-2.1.2
-
diff --git a/patches.renesas/0933-ARM-shmobile-Remove-opps-table-check-for-cpufreq.patch b/patches.renesas/0933-ARM-shmobile-Remove-opps-table-check-for-cpufreq.patch
deleted file mode 100644
index e85c0c9ab1456..0000000000000
--- a/patches.renesas/0933-ARM-shmobile-Remove-opps-table-check-for-cpufreq.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-From d447907240076223f05d916a6a9f8f656cafa96a Mon Sep 17 00:00:00 2001
-From: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Date: Wed, 25 Jun 2014 16:58:40 +0900
-Subject: ARM: shmobile: Remove opps table check for cpufreq
-
-This patch is based on feedback from Viresh Kumar.
-Since cpufreq-cpu0 driver has already check opp table, there is no
-need to same check in mach-shmobile.
-
-Signed-off-by: Gaku Inami <gaku.inami.xw@bp.renesas.com>
-Acked-by: Viresh Kumar <viresh.kumar@linaro.org>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit e423d12cbcb9576785e891617888f627f1f57bf4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/cpufreq.c | 16 +---------------
- 1 file changed, 1 insertion(+), 15 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/cpufreq.c b/arch/arm/mach-shmobile/cpufreq.c
-index e2c868fc41cf..8a24b2be46ae 100644
---- a/arch/arm/mach-shmobile/cpufreq.c
-+++ b/arch/arm/mach-shmobile/cpufreq.c
-@@ -8,24 +8,10 @@
- * for more details.
- */
-
--#include <linux/of.h>
--#include <linux/of_device.h>
- #include <linux/platform_device.h>
-
- int __init shmobile_cpufreq_init(void)
- {
-- struct device_node *np;
--
-- np = of_cpu_device_node_get(0);
-- if (np == NULL) {
-- pr_err("failed to find cpu0 node\n");
-- return 0;
-- }
--
-- if (of_get_property(np, "operating-points", NULL))
-- platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
--
-- of_node_put(np);
--
-+ platform_device_register_simple("cpufreq-cpu0", -1, NULL, 0);
- return 0;
- }
---
-2.1.2
-
diff --git a/patches.renesas/0934-ARM-shmobile-Lager-Correct-I2C-bus-for-VDD-MPU-regul.patch b/patches.renesas/0934-ARM-shmobile-Lager-Correct-I2C-bus-for-VDD-MPU-regul.patch
deleted file mode 100644
index 3924298a78831..0000000000000
--- a/patches.renesas/0934-ARM-shmobile-Lager-Correct-I2C-bus-for-VDD-MPU-regul.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From ef562cd6ef336960f50160b9a60b9e4b6ed160e6 Mon Sep 17 00:00:00 2001
-From: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
-Date: Fri, 4 Jul 2014 09:19:51 +0900
-Subject: ARM: shmobile: Lager: Correct I2C bus for VDD MPU regulator
-
-I2C bus for VDD MPU regulator is IIC3, not I2C3.
-
-Signed-off-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
-Reviewed-by: Wolfram Sang <wsa@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5179ffd099446e65a1e094b9cb17cc7edab45583)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index 17ff3f9e31ee..d949ff04f2ec 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -215,9 +215,9 @@
- renesas,function = "i2c2";
- };
-
-- i2c3_pins: i2c3 {
-- renesas,groups = "i2c3";
-- renesas,function = "i2c3";
-+ iic3_pins: iic3 {
-+ renesas,groups = "iic3";
-+ renesas,function = "iic3";
- };
-
- usb0_pins: usb0 {
-@@ -368,9 +368,9 @@
- pinctrl-names = "default";
- };
-
--&i2c3 {
-+&iic3 {
- pinctrl-names = "default";
-- pinctrl-0 = <&i2c3_pins>;
-+ pinctrl-0 = <&iic3_pins>;
- status = "okay";
-
- vdd_dvfs: regulator@68 {
---
-2.1.2
-
diff --git a/patches.renesas/0935-ARM-shmobile-r8a7790-lager-use-iic-cores-instead-of-.patch b/patches.renesas/0935-ARM-shmobile-r8a7790-lager-use-iic-cores-instead-of-.patch
deleted file mode 100644
index 957978270ff9b..0000000000000
--- a/patches.renesas/0935-ARM-shmobile-r8a7790-lager-use-iic-cores-instead-of-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From a4fe4729b89a8d2515359c5ec99b2a77df82217c Mon Sep 17 00:00:00 2001
-From: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Date: Thu, 10 Jul 2014 12:50:56 +0200
-Subject: ARM: shmobile: r8a7790: lager: use iic cores instead of i2c
-
-On Lager board, i2c and iic cores can be interchanged since they can be
-muxed to the same wires. Commit e489c2a9bc82713167d9f721ca764f4b0d37e543
-("ARM: shmobile: lager: enable i2c devices") activated the i2c cores,
-yet the iic cores should be default since they have the more interesting
-features for generic use cases, i.e. SMBUS_QUICK and DMA (yet to be
-supported).
-
-Reported-by: Khiem Nguyen <khiem.nguyen.xt@renesas.com>
-Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit cb9a2b12e0cb524022c9a81d8ed29f2453ec240d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7790-lager.dts | 22 +++++++++++-----------
- 1 file changed, 11 insertions(+), 11 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
-index d949ff04f2ec..2bff0a756053 100644
---- a/arch/arm/boot/dts/r8a7790-lager.dts
-+++ b/arch/arm/boot/dts/r8a7790-lager.dts
-@@ -205,14 +205,14 @@
- renesas,function = "msiof1";
- };
-
-- i2c1_pins: i2c1 {
-- renesas,groups = "i2c1";
-- renesas,function = "i2c1";
-+ iic1_pins: iic1 {
-+ renesas,groups = "iic1";
-+ renesas,function = "iic1";
- };
-
-- i2c2_pins: i2c2 {
-- renesas,groups = "i2c2";
-- renesas,function = "i2c2";
-+ iic2_pins: iic2 {
-+ renesas,groups = "iic2";
-+ renesas,function = "iic2";
- };
-
- iic3_pins: iic3 {
-@@ -352,19 +352,19 @@
- cpu0-supply = <&vdd_dvfs>;
- };
-
--&i2c0 {
-+&iic0 {
- status = "ok";
- };
-
--&i2c1 {
-+&iic1 {
- status = "ok";
-- pinctrl-0 = <&i2c1_pins>;
-+ pinctrl-0 = <&iic1_pins>;
- pinctrl-names = "default";
- };
-
--&i2c2 {
-+&iic2 {
- status = "ok";
-- pinctrl-0 = <&i2c2_pins>;
-+ pinctrl-0 = <&iic2_pins>;
- pinctrl-names = "default";
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0936-ARM-shmobile-r8a7778-add-SCI-clock-support-for-DT.patch b/patches.renesas/0936-ARM-shmobile-r8a7778-add-SCI-clock-support-for-DT.patch
deleted file mode 100644
index bfa25d277072b..0000000000000
--- a/patches.renesas/0936-ARM-shmobile-r8a7778-add-SCI-clock-support-for-DT.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 04ab62b356376c58d97c3f8889fa7b5fa07c5cfd Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:26 +0200
-Subject: ARM: shmobile: r8a7778: add SCI clock support for DT
-
-This will be used when initialising SCI devices using DT
-until common clock framework support is added.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 7a0c99478dca80f862912be02bf8ec240a9098d1)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7778.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 16bbc94a1520..95579073cfce 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -202,11 +202,17 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("i2c-rcar.3", &mstp_clks[MSTP027]), /* I2C3 */
- CLKDEV_DEV_ID("ffc73000.i2c", &mstp_clks[MSTP027]), /* I2C3 */
- CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP026]), /* SCIF0 */
-+ CLKDEV_DEV_ID("ffe40000.serial", &mstp_clks[MSTP026]), /* SCIF0 */
- CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP025]), /* SCIF1 */
-+ CLKDEV_DEV_ID("ffe41000.serial", &mstp_clks[MSTP025]), /* SCIF1 */
- CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP024]), /* SCIF2 */
-+ CLKDEV_DEV_ID("ffe42000.serial", &mstp_clks[MSTP024]), /* SCIF2 */
- CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP023]), /* SCIF3 */
-+ CLKDEV_DEV_ID("ffe43000.serial", &mstp_clks[MSTP023]), /* SCIF3 */
- CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP022]), /* SCIF4 */
-+ CLKDEV_DEV_ID("ffe44000.serial", &mstp_clks[MSTP022]), /* SCIF4 */
- CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP021]), /* SCIF6 */
-+ CLKDEV_DEV_ID("ffe45000.serial", &mstp_clks[MSTP021]), /* SCIF5 */
- CLKDEV_DEV_ID("sh-hspi.0", &mstp_clks[MSTP007]), /* HSPI0 */
- CLKDEV_DEV_ID("fffc7000.spi", &mstp_clks[MSTP007]), /* HSPI0 */
- CLKDEV_DEV_ID("sh-hspi.1", &mstp_clks[MSTP007]), /* HSPI1 */
---
-2.1.2
-
diff --git a/patches.renesas/0937-ARM-shmobile-r8a73a4-add-SCI-clock-support-for-DT.patch b/patches.renesas/0937-ARM-shmobile-r8a73a4-add-SCI-clock-support-for-DT.patch
deleted file mode 100644
index 2ffd92ba1350e..0000000000000
--- a/patches.renesas/0937-ARM-shmobile-r8a73a4-add-SCI-clock-support-for-DT.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 731e2ea3b16162a739a081d44d45b4fcef6a783f Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:32 +0200
-Subject: ARM: shmobile: r8a73a4: add SCI clock support for DT
-
-This will be used when initialising SCI devices using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9947efaac0545fd833b0ff5147578aba79d297bc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a73a4.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
-index 0f431498229b..49d139748aa6 100644
---- a/arch/arm/mach-shmobile/clock-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
-@@ -574,11 +574,17 @@ static struct clk_lookup lookups[] = {
-
- /* MSTP */
- CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
-+ CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]),
- CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
-+ CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]),
- CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP206]),
-+ CLKDEV_DEV_ID("e6c20000.serial", &mstp_clks[MSTP206]),
- CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP207]),
-+ CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP207]),
- CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP216]),
-+ CLKDEV_DEV_ID("e6ce0000.serial", &mstp_clks[MSTP216]),
- CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP217]),
-+ CLKDEV_DEV_ID("e6cf0000.serial", &mstp_clks[MSTP217]),
- CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
- CLKDEV_DEV_ID("e6700020.dma-controller", &mstp_clks[MSTP218]),
- CLKDEV_DEV_ID("rcar_thermal", &mstp_clks[MSTP522]),
---
-2.1.2
-
diff --git a/patches.renesas/0938-ARM-shmobile-r8a7740-correct-SCI-clock-support-for-D.patch b/patches.renesas/0938-ARM-shmobile-r8a7740-correct-SCI-clock-support-for-D.patch
deleted file mode 100644
index 5c9cebfd799e6..0000000000000
--- a/patches.renesas/0938-ARM-shmobile-r8a7740-correct-SCI-clock-support-for-D.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 1a2d90ab2a0fe1b100f60c9b690e7fba2b92a172 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:40 +0200
-Subject: ARM: shmobile: r8a7740: correct SCI clock support for DT
-
-When initialising SCI devices their names will be .serial
-not .sci.
-
-This will be used when initialising SCI devices using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit d1ec90f2875471df2c954f7cbd45b2389ff86aa2)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7740.c | 18 +++++++++---------
- 1 file changed, 9 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index 789091cfa37a..a60c324df64e 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -556,27 +556,27 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh_mobile_ceu.1", &mstp_clks[MSTP128]),
-
- CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]),
-- CLKDEV_DEV_ID("e6c80000.sci", &mstp_clks[MSTP200]),
-+ CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]),
- CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]),
-- CLKDEV_DEV_ID("e6c70000.sci", &mstp_clks[MSTP201]),
-+ CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]),
- CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]),
-- CLKDEV_DEV_ID("e6c60000.sci", &mstp_clks[MSTP202]),
-+ CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]),
- CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]),
-- CLKDEV_DEV_ID("e6c50000.sci", &mstp_clks[MSTP203]),
-+ CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]),
- CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]),
-- CLKDEV_DEV_ID("e6c40000.sci", &mstp_clks[MSTP204]),
-+ CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]),
- CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]),
-- CLKDEV_DEV_ID("e6c30000.sci", &mstp_clks[MSTP206]),
-+ CLKDEV_DEV_ID("e6c30000.serial", &mstp_clks[MSTP206]),
- CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]),
-- CLKDEV_DEV_ID("e6cb0000.sci", &mstp_clks[MSTP207]),
-+ CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]),
- CLKDEV_DEV_ID("sh-dma-engine.3", &mstp_clks[MSTP214]),
- CLKDEV_DEV_ID("sh-dma-engine.2", &mstp_clks[MSTP216]),
- CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]),
- CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]),
- CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP222]),
-- CLKDEV_DEV_ID("e6cd0000.sci", &mstp_clks[MSTP222]),
-+ CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP222]),
- CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP230]),
-- CLKDEV_DEV_ID("e6cc0000.sci", &mstp_clks[MSTP230]),
-+ CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP230]),
-
- CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]),
- CLKDEV_DEV_ID("fe1f0000.sound", &mstp_clks[MSTP328]),
---
-2.1.2
-
diff --git a/patches.renesas/0939-ARM-shmobile-sh73a0-add-SCI-clock-support-for-DT.patch b/patches.renesas/0939-ARM-shmobile-sh73a0-add-SCI-clock-support-for-DT.patch
deleted file mode 100644
index 412aa2cde7710..0000000000000
--- a/patches.renesas/0939-ARM-shmobile-sh73a0-add-SCI-clock-support-for-DT.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From 8f7af940c2c902ff63348773a3c5b4c1f5742a12 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:50 +0200
-Subject: ARM: shmobile: sh73a0: add SCI clock support for DT
-
-This will be used when initialising SCI devices using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ff4ce48e1f163d945c037c1c90ce12950961d91d)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh73a0.c | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
-index 37f48383e05a..9433a4e2c88e 100644
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -638,16 +638,25 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e6820000.i2c", &mstp_clks[MSTP116]), /* I2C0 */
- CLKDEV_DEV_ID("sh_mobile_lcdc_fb.0", &mstp_clks[MSTP100]), /* LCDC0 */
- CLKDEV_DEV_ID("sh-sci.7", &mstp_clks[MSTP219]), /* SCIFA7 */
-+ CLKDEV_DEV_ID("e6cd0000.serial", &mstp_clks[MSTP219]), /* SCIFA7 */
- CLKDEV_DEV_ID("sh-dma-engine.0", &mstp_clks[MSTP218]), /* SY-DMAC */
- CLKDEV_DEV_ID("sh-dma-engine.1", &mstp_clks[MSTP217]), /* MP-DMAC */
- CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
-+ CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */
- CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
-+ CLKDEV_DEV_ID("0xe6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */
- CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
-+ CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */
- CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
-+ CLKDEV_DEV_ID("e6c50000.serial", &mstp_clks[MSTP203]), /* SCIFA1 */
- CLKDEV_DEV_ID("sh-sci.2", &mstp_clks[MSTP202]), /* SCIFA2 */
-+ CLKDEV_DEV_ID("e6c60000.serial", &mstp_clks[MSTP202]), /* SCIFA2 */
- CLKDEV_DEV_ID("sh-sci.3", &mstp_clks[MSTP201]), /* SCIFA3 */
-+ CLKDEV_DEV_ID("e6c70000.serial", &mstp_clks[MSTP201]), /* SCIFA3 */
- CLKDEV_DEV_ID("sh-sci.4", &mstp_clks[MSTP200]), /* SCIFA4 */
-+ CLKDEV_DEV_ID("e6c80000.serial", &mstp_clks[MSTP200]), /* SCIFA4 */
- CLKDEV_DEV_ID("sh-sci.6", &mstp_clks[MSTP331]), /* SCIFA6 */
-+ CLKDEV_DEV_ID("e6cc0000.serial", &mstp_clks[MSTP331]), /* SCIFA6 */
- CLKDEV_DEV_ID("sh_fsi2", &mstp_clks[MSTP328]), /* FSI */
- CLKDEV_DEV_ID("ec230000.sound", &mstp_clks[MSTP328]), /* FSI */
- CLKDEV_DEV_ID("sh_irda.0", &mstp_clks[MSTP325]), /* IrDA */
---
-2.1.2
-
diff --git a/patches.renesas/0940-ARM-shmobile-r8a7778-Add-SCIF-nodes.patch b/patches.renesas/0940-ARM-shmobile-r8a7778-Add-SCIF-nodes.patch
deleted file mode 100644
index b6591e9113794..0000000000000
--- a/patches.renesas/0940-ARM-shmobile-r8a7778-Add-SCIF-nodes.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 65d26ed10c1ba232317151b33cd8aa82f70947fe Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:27 +0200
-Subject: ARM: shmobile: r8a7778: Add SCIF nodes
-
-This describes all of the SCIF hardware of the r8a7778.
-Each node is disabled and may be enabled as necessary
-by board DTS files.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 9930dc8ee1f59271a54ed4b4922c9c944625a8d6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7778.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 42 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7778.dtsi b/arch/arm/boot/dts/r8a7778.dtsi
-index 3af0a2187493..ecfdf4b01b5a 100644
---- a/arch/arm/boot/dts/r8a7778.dtsi
-+++ b/arch/arm/boot/dts/r8a7778.dtsi
-@@ -156,6 +156,48 @@
- status = "disabled";
- };
-
-+ scif0: serial@ffe40000 {
-+ compatible = "renesas,scif-r8a7778", "renesas,scif";
-+ reg = <0xffe40000 0x100>;
-+ interrupts = <0 70 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scif1: serial@ffe41000 {
-+ compatible = "renesas,scif-r8a7778", "renesas,scif";
-+ reg = <0xffe41000 0x100>;
-+ interrupts = <0 71 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scif2: serial@ffe42000 {
-+ compatible = "renesas,scif-r8a7778", "renesas,scif";
-+ reg = <0xffe42000 0x100>;
-+ interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scif3: serial@ffe43000 {
-+ compatible = "renesas,scif-r8a7778", "renesas,scif";
-+ reg = <0xffe43000 0x100>;
-+ interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scif4: serial@ffe44000 {
-+ compatible = "renesas,scif-r8a7778", "renesas,scif";
-+ reg = <0xffe44000 0x100>;
-+ interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scif5: serial@ffe45000 {
-+ compatible = "renesas,scif-r8a7778", "renesas,scif";
-+ reg = <0xffe45000 0x100>;
-+ interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
- mmcif: mmc@ffe4e000 {
- compatible = "renesas,sh-mmcif";
- reg = <0xffe4e000 0x100>;
---
-2.1.2
-
diff --git a/patches.renesas/0941-ARM-shmobile-bockw-reference-Initialise-SCIF-device-.patch b/patches.renesas/0941-ARM-shmobile-bockw-reference-Initialise-SCIF-device-.patch
deleted file mode 100644
index 91d5a6be9a50e..0000000000000
--- a/patches.renesas/0941-ARM-shmobile-bockw-reference-Initialise-SCIF-device-.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 18893e720f51fa234c10faefee1f62aba4c9289e Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:28 +0200
-Subject: ARM: shmobile: bockw-reference: Initialise SCIF device using DT
-
-Initialise SCIF device using DT when booting bockw
-using DT reference.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 5be97ca4a4f6e11c4a839ec3c08dea25589dfeb4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7778-bockw-reference.dts | 14 +++++++++++---
- arch/arm/mach-shmobile/setup-r8a7778.c | 12 ++++++------
- 2 files changed, 17 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7778-bockw-reference.dts b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-index f76f6ec01e19..3342c74c5de8 100644
---- a/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-+++ b/arch/arm/boot/dts/r8a7778-bockw-reference.dts
-@@ -23,6 +23,10 @@
- model = "bockw";
- compatible = "renesas,bockw-reference", "renesas,r8a7778";
-
-+ aliases {
-+ serial0 = &scif0;
-+ };
-+
- chosen {
- bootargs = "console=ttySC0,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
- };
-@@ -70,9 +74,6 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scif0_pins>;
-- pinctrl-names = "default";
--
- scif0_pins: serial0 {
- renesas,groups = "scif0_data_a", "scif0_ctrl";
- renesas,function = "scif0";
-@@ -124,3 +125,10 @@
- };
- };
- };
-+
-+&scif0 {
-+ pinctrl-0 = <&scif0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-diff --git a/arch/arm/mach-shmobile/setup-r8a7778.c b/arch/arm/mach-shmobile/setup-r8a7778.c
-index 13512e97cd05..8d832640202e 100644
---- a/arch/arm/mach-shmobile/setup-r8a7778.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7778.c
-@@ -294,12 +294,6 @@ void __init r8a7778_add_dt_devices(void)
- }
- #endif
-
-- r8a7778_register_scif(0);
-- r8a7778_register_scif(1);
-- r8a7778_register_scif(2);
-- r8a7778_register_scif(3);
-- r8a7778_register_scif(4);
-- r8a7778_register_scif(5);
- r8a7778_register_tmu(0);
- }
-
-@@ -508,6 +502,12 @@ static void __init r8a7778_register_hpb_dmae(void)
- void __init r8a7778_add_standard_devices(void)
- {
- r8a7778_add_dt_devices();
-+ r8a7778_register_scif(0);
-+ r8a7778_register_scif(1);
-+ r8a7778_register_scif(2);
-+ r8a7778_register_scif(3);
-+ r8a7778_register_scif(4);
-+ r8a7778_register_scif(5);
- r8a7778_register_i2c(0);
- r8a7778_register_i2c(1);
- r8a7778_register_i2c(2);
---
-2.1.2
-
diff --git a/patches.renesas/0942-ARM-shmobile-r8a73a4-Add-SCIF-nodes.patch b/patches.renesas/0942-ARM-shmobile-r8a73a4-Add-SCIF-nodes.patch
deleted file mode 100644
index aca04036ea381..0000000000000
--- a/patches.renesas/0942-ARM-shmobile-r8a73a4-Add-SCIF-nodes.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-From e7e76773c1cf4962f6eed2fd9e8311de229d0772 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:33 +0200
-Subject: ARM: shmobile: r8a73a4: Add SCIF nodes
-
-This describes all of the SCIF hardware of the r8a73a4.
-Each node is disabled and may be enabled as necessary
-by board DTS files.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 94f1a03db6988c64601dc84eaf6c8ef1b956d9e7)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a73a4.dtsi | 42 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 42 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a73a4.dtsi b/arch/arm/boot/dts/r8a73a4.dtsi
-index 82c5ac825386..d8ec5058c351 100644
---- a/arch/arm/boot/dts/r8a73a4.dtsi
-+++ b/arch/arm/boot/dts/r8a73a4.dtsi
-@@ -252,6 +252,48 @@
- status = "disabled";
- };
-
-+ scifa0: serial@e6c40000 {
-+ compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
-+ reg = <0 0xe6c40000 0 0x100>;
-+ interrupts = <0 144 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa1: serial@e6c50000 {
-+ compatible = "renesas,scifa-r8a73a4", "renesas,scifa";
-+ reg = <0 0xe6c50000 0 0x100>;
-+ interrupts = <0 145 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifb2: serial@e6c20000 {
-+ compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
-+ reg = <0 0xe6c20000 0 0x100>;
-+ interrupts = <0 148 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifb3: serial@e6c30000 {
-+ compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
-+ reg = <0 0xe6c30000 0 0x100>;
-+ interrupts = <0 149 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifb4: serial@e6ce0000 {
-+ compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
-+ reg = <0 0xe6ce0000 0 0x100>;
-+ interrupts = <0 150 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifb5: serial@e6cf0000 {
-+ compatible = "renesas,scifb-r8a73a4", "renesas,scifb";
-+ reg = <0 0xe6cf0000 0 0x100>;
-+ interrupts = <0 151 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
- mmcif0: mmc@ee200000 {
- compatible = "renesas,sh-mmcif";
- reg = <0 0xee200000 0 0x80>;
---
-2.1.2
-
diff --git a/patches.renesas/0943-ARM-shmobile-ape6evm-reference-Initialise-SCIF-devic.patch b/patches.renesas/0943-ARM-shmobile-ape6evm-reference-Initialise-SCIF-devic.patch
deleted file mode 100644
index 7d76f766cc087..0000000000000
--- a/patches.renesas/0943-ARM-shmobile-ape6evm-reference-Initialise-SCIF-devic.patch
+++ /dev/null
@@ -1,88 +0,0 @@
-From c4f2c70af4d2630926e6f599cee1b933d412467a Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:34 +0200
-Subject: ARM: shmobile: ape6evm-reference: Initialise SCIF device using DT
-
-Initialise SCIF device using DT when booting ape6evm
-using DT reference.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 27bc82353a3f214a383d7f3b1ccaefdb70d6c94f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts | 14 +++++++++++---
- arch/arm/mach-shmobile/setup-r8a73a4.c | 12 ++++++------
- 2 files changed, 17 insertions(+), 9 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
-index 70b1fff8f4a3..a860f32bca27 100644
---- a/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
-+++ b/arch/arm/boot/dts/r8a73a4-ape6evm-reference.dts
-@@ -16,6 +16,10 @@
- model = "APE6EVM";
- compatible = "renesas,ape6evm-reference", "renesas,r8a73a4";
-
-+ aliases {
-+ serial0 = &scifa0;
-+ };
-+
- chosen {
- bootargs = "console=ttySC0,115200 ignore_loglevel rw";
- };
-@@ -90,9 +94,6 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scifa0_pins>;
-- pinctrl-names = "default";
--
- scifa0_pins: serial0 {
- renesas,groups = "scifa0_data";
- renesas,function = "scifa0";
-@@ -123,6 +124,13 @@
- status = "okay";
- };
-
-+&scifa0 {
-+ pinctrl-0 = <&scifa0_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
- &sdhi0 {
- vmmc-supply = <&vcc_sdhi0>;
- bus-width = <4>;
-diff --git a/arch/arm/mach-shmobile/setup-r8a73a4.c b/arch/arm/mach-shmobile/setup-r8a73a4.c
-index f470b3cc0b7b..2e1ec5e52b66 100644
---- a/arch/arm/mach-shmobile/setup-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/setup-r8a73a4.c
-@@ -189,12 +189,6 @@ static struct resource cmt1_resources[] = {
-
- void __init r8a73a4_add_dt_devices(void)
- {
-- r8a73a4_register_scif(0);
-- r8a73a4_register_scif(1);
-- r8a73a4_register_scif(2);
-- r8a73a4_register_scif(3);
-- r8a73a4_register_scif(4);
-- r8a73a4_register_scif(5);
- r8a7790_register_cmt(1);
- }
-
-@@ -289,6 +283,12 @@ static struct resource dma_resources[] = {
- void __init r8a73a4_add_standard_devices(void)
- {
- r8a73a4_add_dt_devices();
-+ r8a73a4_register_scif(0);
-+ r8a73a4_register_scif(1);
-+ r8a73a4_register_scif(2);
-+ r8a73a4_register_scif(3);
-+ r8a73a4_register_scif(4);
-+ r8a73a4_register_scif(5);
- r8a73a4_register_irqc(0);
- r8a73a4_register_irqc(1);
- r8a73a4_register_thermal();
---
-2.1.2
-
diff --git a/patches.renesas/0944-ARM-shmobile-r8a7740-Add-SCIF-nodes.patch b/patches.renesas/0944-ARM-shmobile-r8a7740-Add-SCIF-nodes.patch
deleted file mode 100644
index 585aeefa617e2..0000000000000
--- a/patches.renesas/0944-ARM-shmobile-r8a7740-Add-SCIF-nodes.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From d73089e4fbc63e71554d8fa880122d8b7650314f Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:41 +0200
-Subject: ARM: shmobile: r8a7740: Add SCIF nodes
-
-This describes all of the SCIF hardware of the r8a7740.
-Each node is disabled and may be enabled as necessary
-by board DTS files.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit fa12355b24a430729f34c349473b9c0a3d125679)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740.dtsi | 63 ++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 63 insertions(+)
-
-diff --git a/arch/arm/boot/dts/r8a7740.dtsi b/arch/arm/boot/dts/r8a7740.dtsi
-index 55d29f4d2ed6..bda18fb3d9e5 100644
---- a/arch/arm/boot/dts/r8a7740.dtsi
-+++ b/arch/arm/boot/dts/r8a7740.dtsi
-@@ -156,6 +156,69 @@
- status = "disabled";
- };
-
-+ scifa0: serial@e6c40000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6c40000 0x100>;
-+ interrupts = <0 100 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa1: serial@e6c50000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6c50000 0x100>;
-+ interrupts = <0 101 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa2: serial@e6c60000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6c60000 0x100>;
-+ interrupts = <0 102 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa3: serial@e6c70000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6c70000 0x100>;
-+ interrupts = <0 103 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa4: serial@e6c80000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6c80000 0x100>;
-+ interrupts = <0 104 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa5: serial@e6cb0000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6cb0000 0x100>;
-+ interrupts = <0 105 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa6: serial@e6cc0000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6cc0000 0x100>;
-+ interrupts = <0 106 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa7: serial@e6cd0000 {
-+ compatible = "renesas,scifa-r8a7740", "renesas,scifa";
-+ reg = <0xe6cd0000 0x100>;
-+ interrupts = <0 107 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifb8: serial@e6c30000 {
-+ compatible = "renesas,scifb-r8a7740", "renesas,scifb";
-+ reg = <0xe6c30000 0x100>;
-+ interrupts = <0 108 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
- pfc: pfc@e6050000 {
- compatible = "renesas,pfc-r8a7740";
- reg = <0xe6050000 0x8000>,
---
-2.1.2
-
diff --git a/patches.renesas/0945-ARM-shmobile-armadillo800eva-reference-Initialise-SC.patch b/patches.renesas/0945-ARM-shmobile-armadillo800eva-reference-Initialise-SC.patch
deleted file mode 100644
index a3b9fb3586035..0000000000000
--- a/patches.renesas/0945-ARM-shmobile-armadillo800eva-reference-Initialise-SC.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 897abc538754f1141514e4a8a81036ef3c0fdcfa Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:42 +0200
-Subject: ARM: shmobile: armadillo800eva-reference: Initialise SCIF device
- using DT
-
-Initialise SCIF device using DT when booting armadillo800eva
-using DT reference.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit c4fac6f2f92331fa5788811357f8b8c3352e5ad8)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts | 14 +++++++++++---
- arch/arm/mach-shmobile/setup-r8a7740.c | 8 ++++----
- 2 files changed, 15 insertions(+), 7 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-index ba2e1806b3ad..ee9e7d5c97a9 100644
---- a/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-+++ b/arch/arm/boot/dts/r8a7740-armadillo800eva-reference.dts
-@@ -19,6 +19,10 @@
- model = "armadillo 800 eva reference";
- compatible = "renesas,armadillo800eva-reference", "renesas,r8a7740";
-
-+ aliases {
-+ serial1 = &scifa1;
-+ };
-+
- chosen {
- bootargs = "console=tty0 console=ttySC1,115200 ignore_loglevel root=/dev/nfs ip=dhcp rw";
- };
-@@ -202,9 +206,6 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scifa1_pins>;
-- pinctrl-names = "default";
--
- ether_pins: ether {
- renesas,groups = "gether_mii", "gether_int";
- renesas,function = "gether";
-@@ -256,6 +257,13 @@
- status = "okay";
- };
-
-+&scifa1 {
-+ pinctrl-0 = <&scifa1_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
- &sdhi0 {
- pinctrl-0 = <&sdhi0_pins>;
- pinctrl-names = "default";
-diff --git a/arch/arm/mach-shmobile/setup-r8a7740.c b/arch/arm/mach-shmobile/setup-r8a7740.c
-index 348af358a239..3d5eacaba3e6 100644
---- a/arch/arm/mach-shmobile/setup-r8a7740.c
-+++ b/arch/arm/mach-shmobile/setup-r8a7740.c
-@@ -312,6 +312,10 @@ static struct platform_device ipmmu_device = {
- };
-
- static struct platform_device *r8a7740_devices_dt[] __initdata = {
-+ &cmt1_device,
-+};
-+
-+static struct platform_device *r8a7740_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &scif2_device,
-@@ -321,10 +325,6 @@ static struct platform_device *r8a7740_devices_dt[] __initdata = {
- &scif6_device,
- &scif7_device,
- &scif8_device,
-- &cmt1_device,
--};
--
--static struct platform_device *r8a7740_early_devices[] __initdata = {
- &irqpin0_device,
- &irqpin1_device,
- &irqpin2_device,
---
-2.1.2
-
diff --git a/patches.renesas/0946-ARM-shmobile-sh73a0-Add-SCIF-nodes.patch b/patches.renesas/0946-ARM-shmobile-sh73a0-Add-SCIF-nodes.patch
deleted file mode 100644
index cd13451da90ce..0000000000000
--- a/patches.renesas/0946-ARM-shmobile-sh73a0-Add-SCIF-nodes.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 722f599a781e8223bbd77a226904696d09c332ee Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:51 +0200
-Subject: ARM: shmobile: sh73a0: Add SCIF nodes
-
-This describes all of the SCIF hardware of the sh73a0.
-Each node is disabled and may be enabled as necessary
-by board DTS files.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2131421b85c9f25082a2b0ec371c7ad0c47cc943)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/sh73a0.dtsi | 72 +++++++++++++++++++++++++++++++++++++++++++
- 1 file changed, 72 insertions(+)
-
-diff --git a/arch/arm/boot/dts/sh73a0.dtsi b/arch/arm/boot/dts/sh73a0.dtsi
-index 5ecf552e1c00..910b79079d5a 100644
---- a/arch/arm/boot/dts/sh73a0.dtsi
-+++ b/arch/arm/boot/dts/sh73a0.dtsi
-@@ -235,6 +235,78 @@
- status = "disabled";
- };
-
-+ scifa0: serial@e6c40000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6c40000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 72 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa1: serial@e6c50000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6c50000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 73 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa2: serial@e6c60000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6c60000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 74 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa3: serial@e6c70000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6c70000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 75 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa4: serial@e6c80000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6c80000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 78 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa5: serial@e6cb0000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6cb0000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 79 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa6: serial@e6cc0000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6cc0000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 156 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifa7: serial@e6cd0000 {
-+ compatible = "renesas,scifa-sh73a0", "renesas,scifa";
-+ reg = <0xe6cd0000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 143 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
-+ scifb8: serial@e6c30000 {
-+ compatible = "renesas,scifb-sh73a0", "renesas,scifb";
-+ reg = <0xe6c30000 0x100>;
-+ interrupt-parent = <&gic>;
-+ interrupts = <0 80 IRQ_TYPE_LEVEL_HIGH>;
-+ status = "disabled";
-+ };
-+
- pfc: pfc@e6050000 {
- compatible = "renesas,pfc-sh73a0";
- reg = <0xe6050000 0x8000>,
---
-2.1.2
-
diff --git a/patches.renesas/0947-ARM-shmobile-kzm9g-reference-Initialise-SCIF-device-.patch b/patches.renesas/0947-ARM-shmobile-kzm9g-reference-Initialise-SCIF-device-.patch
deleted file mode 100644
index d560de2b64025..0000000000000
--- a/patches.renesas/0947-ARM-shmobile-kzm9g-reference-Initialise-SCIF-device-.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From c57b5958aeae76519e698eee1fcdcf9e4c790259 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:52 +0200
-Subject: ARM: shmobile: kzm9g-reference: Initialise SCIF device using DT
-
-Initialise SCIF device using DT when booting armadillo800eva
-using DT reference.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 700ce7c2bb2a4963472d95eba1436d6b0945918e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/sh73a0-kzm9g-reference.dts | 14 +++++++++++---
- arch/arm/mach-shmobile/setup-sh73a0.c | 8 ++++----
- 2 files changed, 15 insertions(+), 7 deletions(-)
-
---- a/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-+++ b/arch/arm/boot/dts/sh73a0-kzm9g-reference.dts
-@@ -21,6 +21,10 @@
- model = "KZM-A9-GT";
- compatible = "renesas,kzm9g-reference", "renesas,sh73a0";
-
-+ aliases {
-+ serial4 = &scifa4;
-+ };
-+
- cpus {
- cpu@0 {
- cpu0-supply = <&vdd_dvfs>;
-@@ -276,9 +280,6 @@
- };
-
- &pfc {
-- pinctrl-0 = <&scifa4_pins>;
-- pinctrl-names = "default";
--
- i2c3_pins: i2c3 {
- renesas,groups = "i2c3_1";
- renesas,function = "i2c3";
-@@ -318,6 +319,13 @@
- };
- };
-
-+&scifa4 {
-+ pinctrl-0 = <&scifa4_pins>;
-+ pinctrl-names = "default";
-+
-+ status = "okay";
-+};
-+
- &sdhi0 {
- pinctrl-0 = <&sdhi0_pins>;
- pinctrl-names = "default";
---- a/arch/arm/mach-shmobile/setup-sh73a0.c
-+++ b/arch/arm/mach-shmobile/setup-sh73a0.c
-@@ -700,6 +700,10 @@ static struct platform_device irqpin3_de
- };
-
- static struct platform_device *sh73a0_devices_dt[] __initdata = {
-+ &cmt1_device,
-+};
-+
-+static struct platform_device *sh73a0_early_devices[] __initdata = {
- &scif0_device,
- &scif1_device,
- &scif2_device,
-@@ -709,10 +713,6 @@ static struct platform_device *sh73a0_de
- &scif6_device,
- &scif7_device,
- &scif8_device,
-- &cmt1_device,
--};
--
--static struct platform_device *sh73a0_early_devices[] __initdata = {
- &tmu0_device,
- &ipmmu_device,
- };
diff --git a/patches.renesas/0948-ARM-shmobile-r8a7778-add-TMU-clock-support-for-DT.patch b/patches.renesas/0948-ARM-shmobile-r8a7778-add-TMU-clock-support-for-DT.patch
deleted file mode 100644
index bab0ef46a7e92..0000000000000
--- a/patches.renesas/0948-ARM-shmobile-r8a7778-add-TMU-clock-support-for-DT.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From 4cfd5ece5f6600e492ab0f6308fdf0f37838ed64 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:29 +0200
-Subject: ARM: shmobile: r8a7778: add TMU clock support for DT
-
-This will be used when initialising TMU devices using DT
-until common clock framework support is added.
-
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 0985f38d1379291c8701572e761c809f0d5f6476)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7778.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7778.c b/arch/arm/mach-shmobile/clock-r8a7778.c
-index 95579073cfce..67980a08a601 100644
---- a/arch/arm/mach-shmobile/clock-r8a7778.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7778.c
-@@ -244,7 +244,9 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("src.7", "rcar_sound", &mstp_clks[MSTP524]),
- CLKDEV_ICK_ID("src.8", "rcar_sound", &mstp_clks[MSTP523]),
- CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP016]),
-+ CLKDEV_ICK_ID("fck", "ffd80000.timer", &mstp_clks[MSTP016]),
- CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP015]),
-+ CLKDEV_ICK_ID("fck", "ffd81000.timer", &mstp_clks[MSTP015]),
- };
-
- void __init r8a7778_clock_init(void)
---
-2.1.2
-
diff --git a/patches.renesas/0949-ARM-shmobile-r8a7740-add-TMU-clock-support-for-DT.patch b/patches.renesas/0949-ARM-shmobile-r8a7740-add-TMU-clock-support-for-DT.patch
deleted file mode 100644
index 750cafbc5a64e..0000000000000
--- a/patches.renesas/0949-ARM-shmobile-r8a7740-add-TMU-clock-support-for-DT.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 78ccb5f24322e9ee1aed19432fa593170da2c8f1 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:43 +0200
-Subject: ARM: shmobile: r8a7740: add TMU clock support for DT
-
-This will be used when initialising TMU devices using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit ef9cb75ca70c8d31b2493d1fd6cbf8b3dd1dec95)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7740.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index a60c324df64e..b4ecbd697140 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -599,7 +599,9 @@ static struct clk_lookup lookups[] = {
-
- /* ICK */
- CLKDEV_ICK_ID("fck", "sh-tmu.1", &mstp_clks[MSTP111]),
-+ CLKDEV_ICK_ID("fck", "fff90000.timer", &mstp_clks[MSTP111]),
- CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]),
-+ CLKDEV_ICK_ID("fck", "fff80000.timer", &mstp_clks[MSTP125]),
- CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]),
- CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]),
- CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]),
---
-2.1.2
-
diff --git a/patches.renesas/0950-ARM-shmobile-r8a73a4-add-CMT1-clock-support-for-DT.patch b/patches.renesas/0950-ARM-shmobile-r8a73a4-add-CMT1-clock-support-for-DT.patch
deleted file mode 100644
index 055661a4b3e80..0000000000000
--- a/patches.renesas/0950-ARM-shmobile-r8a73a4-add-CMT1-clock-support-for-DT.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 9a077784f332c5529741979f1d4424fb86c13421 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:35 +0200
-Subject: ARM: shmobile: r8a73a4: add CMT1 clock support for DT
-
-This will be used when initialising CMT1 device using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit aad64dc31954dbbb84cd8fcfaf1bc028f3bc2616)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a73a4.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a73a4.c b/arch/arm/mach-shmobile/clock-r8a73a4.c
-index 49d139748aa6..c2330ea1802c 100644
---- a/arch/arm/mach-shmobile/clock-r8a73a4.c
-+++ b/arch/arm/mach-shmobile/clock-r8a73a4.c
-@@ -604,6 +604,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("e6500000.i2c", &mstp_clks[MSTP318]),
- CLKDEV_DEV_ID("e6510000.i2c", &mstp_clks[MSTP323]),
- CLKDEV_ICK_ID("fck", "sh-cmt-48-gen2.1", &mstp_clks[MSTP329]),
-+ CLKDEV_ICK_ID("fck", "e6130000.timer", &mstp_clks[MSTP329]),
- CLKDEV_DEV_ID("e60b0000.i2c", &mstp_clks[MSTP409]),
- CLKDEV_DEV_ID("e6540000.i2c", &mstp_clks[MSTP410]),
- CLKDEV_DEV_ID("e6530000.i2c", &mstp_clks[MSTP411]),
---
-2.1.2
-
diff --git a/patches.renesas/0951-ARM-shmobile-r8a7740-add-CMT1-clock-support-for-DT.patch b/patches.renesas/0951-ARM-shmobile-r8a7740-add-CMT1-clock-support-for-DT.patch
deleted file mode 100644
index f5473a35b05b5..0000000000000
--- a/patches.renesas/0951-ARM-shmobile-r8a7740-add-CMT1-clock-support-for-DT.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 13b829387674568717c605b28670ba0543cdfaa8 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:46 +0200
-Subject: ARM: shmobile: r8a7740: add CMT1 clock support for DT
-
-This will be used when initialising CMT1 device using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2e11179da78a56c2a44fc3fe097f2af8dc18f9d6)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7740.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7740.c b/arch/arm/mach-shmobile/clock-r8a7740.c
-index b4ecbd697140..0794f0426e70 100644
---- a/arch/arm/mach-shmobile/clock-r8a7740.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7740.c
-@@ -603,6 +603,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]),
- CLKDEV_ICK_ID("fck", "fff80000.timer", &mstp_clks[MSTP125]),
- CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]),
-+ CLKDEV_ICK_ID("fck", "e6138000.timer", &mstp_clks[MSTP329]),
- CLKDEV_ICK_ID("host", "renesas_usbhs", &mstp_clks[MSTP416]),
- CLKDEV_ICK_ID("func", "renesas_usbhs", &mstp_clks[MSTP407]),
- CLKDEV_ICK_ID("phy", "renesas_usbhs", &mstp_clks[MSTP406]),
---
-2.1.2
-
diff --git a/patches.renesas/0952-ARM-shmobile-sh73a0-add-CMT1-clock-support-for-DT.patch b/patches.renesas/0952-ARM-shmobile-sh73a0-add-CMT1-clock-support-for-DT.patch
deleted file mode 100644
index e88d9ee4c388c..0000000000000
--- a/patches.renesas/0952-ARM-shmobile-sh73a0-add-CMT1-clock-support-for-DT.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From e5826d6e3b7becf646c53f52d02b0771e835591c Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Mon, 7 Jul 2014 09:54:53 +0200
-Subject: ARM: shmobile: sh73a0: add CMT1 clock support for DT
-
-This will be used when initialising CMT1 device using DT
-until common clock framework support is added.
-
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit a0f7e7496d56ac2da7c684e2035815318c17973a)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh73a0.c | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
-index 9433a4e2c88e..d8c4048b9e33 100644
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -690,6 +690,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.0", &dsi0phy_clk),
- CLKDEV_ICK_ID("dsiphy_clk", "sh-mipi-dsi.1", &dsi1phy_clk),
- CLKDEV_ICK_ID("fck", "sh-cmt-48.1", &mstp_clks[MSTP329]), /* CMT1 */
-+ CLKDEV_ICK_ID("fck", "e6138000.timer", &mstp_clks[MSTP329]), /* CMT1 */
- CLKDEV_ICK_ID("fck", "sh-tmu.0", &mstp_clks[MSTP125]), /* TMU0 */
- };
-
---
-2.1.2
-
diff --git a/patches.renesas/0953-ARM-shmobile-genmai-remove-defconfig.patch b/patches.renesas/0953-ARM-shmobile-genmai-remove-defconfig.patch
deleted file mode 100644
index 4fd97229befb1..0000000000000
--- a/patches.renesas/0953-ARM-shmobile-genmai-remove-defconfig.patch
+++ /dev/null
@@ -1,149 +0,0 @@
-From 09a59ddf51852d6bf7945e0d45858e9e96dcc121 Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Tue, 15 Jul 2014 16:29:24 +0900
-Subject: ARM: shmobile: genmai: remove defconfig
-
-The genmai board code is scheduled for removal and once
-that occurs the defconfig will be of no use. Remove it.
-
-Acked-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
-Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 3ed27bd90d6d0c8b4d686a2468b6d50cc1ef74e4)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/genmai_defconfig | 122 --------------------------------------
- 1 file changed, 122 deletions(-)
- delete mode 100644 arch/arm/configs/genmai_defconfig
-
-diff --git a/arch/arm/configs/genmai_defconfig b/arch/arm/configs/genmai_defconfig
-deleted file mode 100644
-index d238fafb6762..000000000000
---- a/arch/arm/configs/genmai_defconfig
-+++ /dev/null
-@@ -1,122 +0,0 @@
--CONFIG_SYSVIPC=y
--CONFIG_NO_HZ=y
--CONFIG_IKCONFIG=y
--CONFIG_IKCONFIG_PROC=y
--CONFIG_LOG_BUF_SHIFT=16
--CONFIG_CC_OPTIMIZE_FOR_SIZE=y
--CONFIG_SYSCTL_SYSCALL=y
--CONFIG_EMBEDDED=y
--CONFIG_PERF_EVENTS=y
--CONFIG_SLAB=y
--# CONFIG_LBDAF is not set
--# CONFIG_BLK_DEV_BSG is not set
--# CONFIG_IOSCHED_DEADLINE is not set
--# CONFIG_IOSCHED_CFQ is not set
--CONFIG_ARCH_SHMOBILE_LEGACY=y
--CONFIG_ARCH_R7S72100=y
--CONFIG_MACH_GENMAI=y
--# CONFIG_SH_TIMER_CMT is not set
--# CONFIG_SH_TIMER_MTU2 is not set
--# CONFIG_SH_TIMER_TMU is not set
--# CONFIG_EM_TIMER_STI is not set
--CONFIG_ARM_ERRATA_430973=y
--CONFIG_ARM_ERRATA_458693=y
--CONFIG_ARM_ERRATA_460075=y
--CONFIG_ARM_ERRATA_743622=y
--CONFIG_ARM_ERRATA_754322=y
--CONFIG_AEABI=y
--# CONFIG_OABI_COMPAT is not set
--CONFIG_FORCE_MAX_ZONEORDER=13
--CONFIG_ZBOOT_ROM_TEXT=0x0
--CONFIG_ZBOOT_ROM_BSS=0x0
--CONFIG_ARM_APPENDED_DTB=y
--CONFIG_KEXEC=y
--CONFIG_AUTO_ZRELADDR=y
--CONFIG_VFP=y
--CONFIG_NEON=y
--# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
--CONFIG_PM_RUNTIME=y
--CONFIG_NET=y
--CONFIG_PACKET=y
--CONFIG_UNIX=y
--CONFIG_INET=y
--CONFIG_IP_PNP=y
--CONFIG_IP_PNP_DHCP=y
--# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
--# CONFIG_INET_XFRM_MODE_TUNNEL is not set
--# CONFIG_INET_XFRM_MODE_BEET is not set
--# CONFIG_INET_LRO is not set
--# CONFIG_INET_DIAG is not set
--# CONFIG_IPV6 is not set
--# CONFIG_WIRELESS is not set
--CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
--CONFIG_DEVTMPFS=y
--CONFIG_DEVTMPFS_MOUNT=y
--CONFIG_EEPROM_AT24=y
--CONFIG_NETDEVICES=y
--# CONFIG_NET_CORE is not set
--# CONFIG_NET_VENDOR_ARC is not set
--# CONFIG_NET_CADENCE is not set
--# CONFIG_NET_VENDOR_BROADCOM is not set
--# CONFIG_NET_VENDOR_CIRRUS is not set
--# CONFIG_NET_VENDOR_FARADAY is not set
--# CONFIG_NET_VENDOR_INTEL is not set
--# CONFIG_NET_VENDOR_MARVELL is not set
--# CONFIG_NET_VENDOR_MICREL is not set
--# CONFIG_NET_VENDOR_NATSEMI is not set
--CONFIG_SH_ETH=y
--# CONFIG_NET_VENDOR_SEEQ is not set
--# CONFIG_NET_VENDOR_SMSC is not set
--# CONFIG_NET_VENDOR_STMICRO is not set
--# CONFIG_NET_VENDOR_VIA is not set
--# CONFIG_NET_VENDOR_WIZNET is not set
--# CONFIG_WLAN is not set
--# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
--CONFIG_INPUT_EVDEV=y
--# CONFIG_KEYBOARD_ATKBD is not set
--# CONFIG_INPUT_MOUSE is not set
--# CONFIG_SERIO is not set
--# CONFIG_LEGACY_PTYS is not set
--CONFIG_SERIAL_SH_SCI=y
--CONFIG_SERIAL_SH_SCI_NR_UARTS=10
--CONFIG_SERIAL_SH_SCI_CONSOLE=y
--# CONFIG_HW_RANDOM is not set
--CONFIG_I2C_CHARDEV=y
--CONFIG_I2C_RIIC=y
--CONFIG_SPI=y
--CONFIG_SPI_RSPI=y
--# CONFIG_HWMON is not set
--CONFIG_THERMAL=y
--CONFIG_RCAR_THERMAL=y
--CONFIG_REGULATOR=y
--CONFIG_REGULATOR_FIXED_VOLTAGE=y
--CONFIG_DRM=y
--CONFIG_DRM_RCAR_DU=y
--# CONFIG_USB_SUPPORT is not set
--CONFIG_MMC=y
--CONFIG_MMC_SDHI=y
--CONFIG_MMC_SH_MMCIF=y
--CONFIG_NEW_LEDS=y
--CONFIG_LEDS_CLASS=y
--CONFIG_RTC_CLASS=y
--CONFIG_DMADEVICES=y
--CONFIG_SH_DMAE=y
--# CONFIG_IOMMU_SUPPORT is not set
--# CONFIG_DNOTIFY is not set
--CONFIG_MSDOS_FS=y
--CONFIG_VFAT_FS=y
--CONFIG_TMPFS=y
--CONFIG_CONFIGFS_FS=y
--# CONFIG_MISC_FILESYSTEMS is not set
--CONFIG_NFS_FS=y
--CONFIG_NFS_V3_ACL=y
--CONFIG_NFS_V4=y
--CONFIG_NFS_V4_1=y
--CONFIG_ROOT_NFS=y
--CONFIG_NLS_CODEPAGE_437=y
--CONFIG_NLS_ISO8859_1=y
--# CONFIG_ENABLE_WARN_DEPRECATED is not set
--# CONFIG_ENABLE_MUST_CHECK is not set
--# CONFIG_ARM_UNWIND is not set
--# CONFIG_CRYPTO_ANSI_CPRNG is not set
--# CONFIG_CRYPTO_HW is not set
---
-2.1.2
-
diff --git a/patches.renesas/0954-ARM-shmobile-sh73a0-Remove-spurious-0x-from-SCIFB-cl.patch b/patches.renesas/0954-ARM-shmobile-sh73a0-Remove-spurious-0x-from-SCIFB-cl.patch
deleted file mode 100644
index 6c410883a5293..0000000000000
--- a/patches.renesas/0954-ARM-shmobile-sh73a0-Remove-spurious-0x-from-SCIFB-cl.patch
+++ /dev/null
@@ -1,36 +0,0 @@
-From 635ca7a7f107f869ba40bc4cf507a9efec9f905f Mon Sep 17 00:00:00 2001
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Wed, 16 Jul 2014 09:11:21 +0900
-Subject: ARM: shmobile: sh73a0: Remove spurious 0x from SCIFB clock name
-
-A stray '0x' crept into a0f7e7496d56ac2d ("ARM: shmobile: sh73a0: add CMT1
-clock support for DT"). This patch removes it.
-
-This change should not have any run-time affect at this time as
-the clock in question is used by a SCIF device that is not enabled by
-default.
-
-Reported-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 2c3758b01aa6f11382d2b018614b5d48ecf30350)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-sh73a0.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-sh73a0.c b/arch/arm/mach-shmobile/clock-sh73a0.c
-index d8c4048b9e33..02a6f45a0b9e 100644
---- a/arch/arm/mach-shmobile/clock-sh73a0.c
-+++ b/arch/arm/mach-shmobile/clock-sh73a0.c
-@@ -644,7 +644,7 @@ static struct clk_lookup lookups[] = {
- CLKDEV_DEV_ID("sh-sci.5", &mstp_clks[MSTP207]), /* SCIFA5 */
- CLKDEV_DEV_ID("e6cb0000.serial", &mstp_clks[MSTP207]), /* SCIFA5 */
- CLKDEV_DEV_ID("sh-sci.8", &mstp_clks[MSTP206]), /* SCIFB */
-- CLKDEV_DEV_ID("0xe6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */
-+ CLKDEV_DEV_ID("e6c3000.serial", &mstp_clks[MSTP206]), /* SCIFB */
- CLKDEV_DEV_ID("sh-sci.0", &mstp_clks[MSTP204]), /* SCIFA0 */
- CLKDEV_DEV_ID("e6c40000.serial", &mstp_clks[MSTP204]), /* SCIFA0 */
- CLKDEV_DEV_ID("sh-sci.1", &mstp_clks[MSTP203]), /* SCIFA1 */
---
-2.1.2
-
diff --git a/patches.renesas/0955-ARM-shmobile-defconfig-Remove-MACH_GENMAI.patch b/patches.renesas/0955-ARM-shmobile-defconfig-Remove-MACH_GENMAI.patch
deleted file mode 100644
index c633181615602..0000000000000
--- a/patches.renesas/0955-ARM-shmobile-defconfig-Remove-MACH_GENMAI.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-From fa4798501222356ef9b8983f6ee4d87839d78442 Mon Sep 17 00:00:00 2001
-From: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-Date: Wed, 16 Jul 2014 14:02:56 +0200
-Subject: ARM: shmobile: defconfig: Remove MACH_GENMAI
-
-The CONFIG_MACH_GENMAI is scheduled for removal so remove it from
-shmobile_defconfig.
-
-Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
-[horms+renesas@verge.net.au: revised changelog for updated commit order]
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-
-(cherry picked from commit 92db2b7af591d3c3212183a34856b4cb190b6999)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/configs/shmobile_defconfig | 1 -
- 1 file changed, 1 deletion(-)
-
-diff --git a/arch/arm/configs/shmobile_defconfig b/arch/arm/configs/shmobile_defconfig
-index 6bc85a5539f1..3b136144cc83 100644
---- a/arch/arm/configs/shmobile_defconfig
-+++ b/arch/arm/configs/shmobile_defconfig
-@@ -14,7 +14,6 @@ CONFIG_ARCH_R7S72100=y
- CONFIG_ARCH_R8A7779=y
- CONFIG_ARCH_R8A7790=y
- CONFIG_ARCH_R8A7791=y
--CONFIG_MACH_GENMAI=y
- CONFIG_MACH_KOELSCH=y
- CONFIG_MACH_LAGER=y
- CONFIG_MACH_MARZEN=y
---
-2.1.2
-
diff --git a/patches.renesas/0956-ARM-shmobile-r8a7790-add-missing-0x0100-for-SDCKCR.patch b/patches.renesas/0956-ARM-shmobile-r8a7790-add-missing-0x0100-for-SDCKCR.patch
deleted file mode 100644
index d0279ad0bd5c9..0000000000000
--- a/patches.renesas/0956-ARM-shmobile-r8a7790-add-missing-0x0100-for-SDCKCR.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From dfc99117fd2af4fa1f1d71b5e55d21ae2540da65 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 5 Aug 2014 18:24:30 -0700
-Subject: ARM: shmobile: r8a7790: add missing 0x0100 for SDCKCR
-
-9f13ee6f83c52065112d3e396e42e3780911ef53
-(ARM: shmobile: r8a7790: add div4 clocks)
-added r8a7790 DIV4 clock support.
-
-But, it is missing
-"0x0100: x 1/8" division ratio.
-This patch fixes hidden bug.
-It is based on R-Car H2 v0.7, R-Car M2 v0.9.
-
-Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 4fb12fe9c34928c1d2bed817e144aec3f44540e9)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7790.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7790.c b/arch/arm/mach-shmobile/clock-r8a7790.c
-index 17435c1aa2fe..126ddafad526 100644
---- a/arch/arm/mach-shmobile/clock-r8a7790.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7790.c
-@@ -183,8 +183,8 @@ enum {
-
- static struct clk div4_clks[DIV4_NR] = {
- [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT),
-- [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT),
-- [DIV4_SD1] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 0, 0x1de0, CLK_ENABLE_ON_INIT),
-+ [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1df0, CLK_ENABLE_ON_INIT),
-+ [DIV4_SD1] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 0, 0x1df0, CLK_ENABLE_ON_INIT),
- };
-
- /* DIV6 clocks */
---
-2.1.2
-
diff --git a/patches.renesas/0957-ARM-shmobile-r8a7791-add-missing-0x0100-for-SDCKCR.patch b/patches.renesas/0957-ARM-shmobile-r8a7791-add-missing-0x0100-for-SDCKCR.patch
deleted file mode 100644
index 61bbffa30a5a5..0000000000000
--- a/patches.renesas/0957-ARM-shmobile-r8a7791-add-missing-0x0100-for-SDCKCR.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From b05c7db5986acbf91f534b95a8cc83a7a8e48323 Mon Sep 17 00:00:00 2001
-From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Date: Tue, 5 Aug 2014 18:24:51 -0700
-Subject: ARM: shmobile: r8a7791: add missing 0x0100 for SDCKCR
-
-4bfb358b1d6cdeff8c6a13677f01ed78e9696b98
-(ARM: shmobile: Add r8a7791 legacy SDHI clocks)
-added r8a7791 SDHI clock support.
-
-But, it is missing
-"0x0100: x 1/8" division ratio.
-This patch fixes hidden bug.
-It is based on R-Car H2 v0.7, R-Car M2 v0.9.
-
-Reported-by: Yusuke Goda <yusuke.goda.sx@renesas.com>
-Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-(cherry picked from commit 58b80ad6472c0fa12926dfa1f9103d3a326bdf18)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/mach-shmobile/clock-r8a7791.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/arch/arm/mach-shmobile/clock-r8a7791.c b/arch/arm/mach-shmobile/clock-r8a7791.c
-index 10e193d707f5..453b23129cfa 100644
---- a/arch/arm/mach-shmobile/clock-r8a7791.c
-+++ b/arch/arm/mach-shmobile/clock-r8a7791.c
-@@ -152,7 +152,7 @@ enum {
-
- static struct clk div4_clks[DIV4_NR] = {
- [DIV4_SDH] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 8, 0x0dff, CLK_ENABLE_ON_INIT),
-- [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1de0, CLK_ENABLE_ON_INIT),
-+ [DIV4_SD0] = SH_CLK_DIV4(&pll1_clk, SDCKCR, 4, 0x1df0, CLK_ENABLE_ON_INIT),
- };
-
- /* DIV6 clocks */
---
-2.1.2
-
diff --git a/patches.renesas/0958-ARM-shmobile-koelsch-Remove-non-existent-i2c6-pinmux.patch b/patches.renesas/0958-ARM-shmobile-koelsch-Remove-non-existent-i2c6-pinmux.patch
deleted file mode 100644
index 79fc614e53c36..0000000000000
--- a/patches.renesas/0958-ARM-shmobile-koelsch-Remove-non-existent-i2c6-pinmux.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 2cd602a6cbe6839909eaf4576da861033a27656b Mon Sep 17 00:00:00 2001
-From: Geert Uytterhoeven <geert+renesas@glider.be>
-Date: Fri, 15 Aug 2014 07:19:10 +0900
-Subject: ARM: shmobile: koelsch: Remove non-existent i2c6 pinmux
-
-On r8a7791, i2c6 (aka iic3) doesn't need pinmux, but the koelsch dts
-refers to non-existent pinmux configuration data:
-
-pinmux core: sh-pfc does not support function i2c6
-sh-pfc e6060000.pfc: invalid function i2c6 in map table
-
-Remove it to fix this.
-
-Fixes: commit 1d41f36a68c0f4e9b01d563ce33bab5201858b54 ("ARM: shmobile:
- koelsch dts: Add VDD MPU regulator for DVFS")
-
-Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: Olof Johansson <olof@lixom.net>
-(cherry picked from commit 12266db732ff3845eaa9ba9354c4938249787aaf)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- arch/arm/boot/dts/r8a7791-koelsch.dts | 7 -------
- 1 file changed, 7 deletions(-)
-
-diff --git a/arch/arm/boot/dts/r8a7791-koelsch.dts b/arch/arm/boot/dts/r8a7791-koelsch.dts
-index 23486c081a69..be59014474b2 100644
---- a/arch/arm/boot/dts/r8a7791-koelsch.dts
-+++ b/arch/arm/boot/dts/r8a7791-koelsch.dts
-@@ -275,11 +275,6 @@
- renesas,function = "msiof0";
- };
-
-- i2c6_pins: i2c6 {
-- renesas,groups = "i2c6";
-- renesas,function = "i2c6";
-- };
--
- usb0_pins: usb0 {
- renesas,groups = "usb0";
- renesas,function = "usb0";
-@@ -420,8 +415,6 @@
- };
-
- &i2c6 {
-- pinctrl-names = "default";
-- pinctrl-0 = <&i2c6_pins>;
- status = "okay";
- clock-frequency = <100000>;
-
---
-2.1.2
-
diff --git a/patches.renesas/0960-xhci-Platform-Add-en-dis-able_usb3_lpm_timeout.patch b/patches.renesas/0960-xhci-Platform-Add-en-dis-able_usb3_lpm_timeout.patch
deleted file mode 100644
index c3a5cde5277cd..0000000000000
--- a/patches.renesas/0960-xhci-Platform-Add-en-dis-able_usb3_lpm_timeout.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From d3215f95d1320acc7b848a1bb41e111c260c7f08 Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <pratyush.anand@st.com>
-Date: Fri, 4 Jul 2014 17:01:24 +0300
-Subject: xhci: Platform: Add (en/dis)able_usb3_lpm_timeout
-
-To use auto U0-U1/U2 transition by xhci platform device add
-(en/dis)able_usb3_lpm_timeout function to the xhci_plat_xhci_driver struct.
-
-Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
-Tested-by: Aymen Bouattay <aymen.bouattay@st.com>
-Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 94ef3d50426240a5402688e8d43a079df5ae21be)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/xhci-plat.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index ea9e4a210c58..15a65b6ab760 100644
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -90,6 +90,9 @@ static const struct hc_driver xhci_plat_xhci_driver = {
- .hub_status_data = xhci_hub_status_data,
- .bus_suspend = xhci_bus_suspend,
- .bus_resume = xhci_bus_resume,
-+
-+ .enable_usb3_lpm_timeout = xhci_enable_usb3_lpm_timeout,
-+ .disable_usb3_lpm_timeout = xhci_disable_usb3_lpm_timeout,
- };
-
- static int xhci_plat_probe(struct platform_device *pdev)
---
-2.1.2
-
diff --git a/patches.renesas/0961-xhci-Platform-Set-xhci-lpm-support-quirk-based-on-pl.patch b/patches.renesas/0961-xhci-Platform-Set-xhci-lpm-support-quirk-based-on-pl.patch
deleted file mode 100644
index 7ff8dcca4d25c..0000000000000
--- a/patches.renesas/0961-xhci-Platform-Set-xhci-lpm-support-quirk-based-on-pl.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From 4ef80e75dc148ee391f19e23c0c8fd38d2cb53aa Mon Sep 17 00:00:00 2001
-From: Pratyush Anand <pratyush.anand@st.com>
-Date: Fri, 4 Jul 2014 17:01:25 +0300
-Subject: xhci: Platform: Set xhci lpm support quirk based on platform data
-
-If an xhci platform supports USB3 LPM capability then enable
-XHCI_LPM_SUPPORT quirk flag.
-
-Signed-off-by: Pratyush Anand <pratyush.anand@st.com>
-Signed-off-by: Mathias Nyman <mathias.nyman@linux.intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 20f6fdd01c2c0de9cc1109083222edded24c5350)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/usb/usb-xhci.txt | 3 ++-
- drivers/usb/host/xhci-plat.c | 6 +++++
- include/linux/usb/xhci_pdriver.h | 27 ++++++++++++++++++++++
- 3 files changed, 35 insertions(+), 1 deletion(-)
- create mode 100644 include/linux/usb/xhci_pdriver.h
-
-diff --git a/Documentation/devicetree/bindings/usb/usb-xhci.txt b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-index 5a79377c6a96..86f67f0886bc 100644
---- a/Documentation/devicetree/bindings/usb/usb-xhci.txt
-+++ b/Documentation/devicetree/bindings/usb/usb-xhci.txt
-@@ -9,8 +9,9 @@ Required properties:
- register set for the device.
- - interrupts: one XHCI interrupt should be described here.
-
--Optional property:
-+Optional properties:
- - clocks: reference to a clock
-+ - usb3-lpm-capable: determines if platform is USB3 LPM capable
-
- Example:
- usb@f0931000 {
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index 15a65b6ab760..e41e4b476ee3 100644
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -17,6 +17,7 @@
- #include <linux/of.h>
- #include <linux/platform_device.h>
- #include <linux/slab.h>
-+#include <linux/usb/xhci_pdriver.h>
-
- #include "xhci.h"
- #include "xhci-mvebu.h"
-@@ -97,6 +98,8 @@ static const struct hc_driver xhci_plat_xhci_driver = {
-
- static int xhci_plat_probe(struct platform_device *pdev)
- {
-+ struct device_node *node = pdev->dev.of_node;
-+ struct usb_xhci_pdata *pdata = dev_get_platdata(&pdev->dev);
- const struct hc_driver *driver;
- struct xhci_hcd *xhci;
- struct resource *res;
-@@ -185,6 +188,9 @@ static int xhci_plat_probe(struct platform_device *pdev)
- goto dealloc_usb2_hcd;
- }
-
-+ if ((node && of_property_read_bool(node, "usb3-lpm-capable")) ||
-+ (pdata && pdata->usb3_lpm_capable))
-+ xhci->quirks |= XHCI_LPM_SUPPORT;
- /*
- * Set the xHCI pointer before xhci_plat_setup() (aka hcd_driver.reset)
- * is called by usb_add_hcd().
-diff --git a/include/linux/usb/xhci_pdriver.h b/include/linux/usb/xhci_pdriver.h
-new file mode 100644
-index 000000000000..376654b5b0f7
---- /dev/null
-+++ b/include/linux/usb/xhci_pdriver.h
-@@ -0,0 +1,27 @@
-+/*
-+ * 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.
-+ *
-+ */
-+
-+#ifndef __USB_CORE_XHCI_PDRIVER_H
-+#define __USB_CORE_XHCI_PDRIVER_H
-+
-+/**
-+ * struct usb_xhci_pdata - platform_data for generic xhci platform driver
-+ *
-+ * @usb3_lpm_capable: determines if this xhci platform supports USB3
-+ * LPM capability
-+ *
-+ */
-+struct usb_xhci_pdata {
-+ unsigned usb3_lpm_capable:1;
-+};
-+
-+#endif /* __USB_CORE_XHCI_PDRIVER_H */
---
-2.1.2
-
diff --git a/patches.renesas/0962-usb-host-xhci-plat-use-devm_functions.patch b/patches.renesas/0962-usb-host-xhci-plat-use-devm_functions.patch
deleted file mode 100644
index 56551fcdd0d58..0000000000000
--- a/patches.renesas/0962-usb-host-xhci-plat-use-devm_functions.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-From d80fa6bee8ef019c02e7389e1ca88604938990b1 Mon Sep 17 00:00:00 2001
-From: Himangi Saraogi <himangi774@gmail.com>
-Date: Fri, 20 Jun 2014 23:11:23 +0530
-Subject: usb: host: xhci-plat: use devm_functions
-
-This patch introduces the use of managed interface devm_ioremap_resource
-for ioremap_nocache and request_mem_region and removes the corresponding
-free functions in the probe and remove functions.
-
-Signed-off-by: Himangi Saraogi <himangi774@gmail.com>
-Acked-by: Julia Lawall <julia.lawall@lip6.fr>
-Reviewed-by: Felipe Balbi <balbi@ti.com>
-Acked-by: Felipe Balbi <balbi@ti.com>
-Cc: Mathias Nyman <mathias.nyman@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit fd666348c51f6ab66410c98a149e0418b9a258f0)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/xhci-plat.c | 24 ++++--------------------
- 1 file changed, 4 insertions(+), 20 deletions(-)
-
-diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c
-index e41e4b476ee3..5cb5de1ee766 100644
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -146,20 +146,12 @@ static int xhci_plat_probe(struct platform_device *pdev)
- hcd->rsrc_start = res->start;
- hcd->rsrc_len = resource_size(res);
-
-- if (!request_mem_region(hcd->rsrc_start, hcd->rsrc_len,
-- driver->description)) {
-- dev_dbg(&pdev->dev, "controller already in use\n");
-- ret = -EBUSY;
-+ hcd->regs = devm_ioremap_resource(&pdev->dev, res);
-+ if (IS_ERR(hcd->regs)) {
-+ ret = PTR_ERR(hcd->regs);
- goto put_hcd;
- }
-
-- hcd->regs = ioremap_nocache(hcd->rsrc_start, hcd->rsrc_len);
-- if (!hcd->regs) {
-- dev_dbg(&pdev->dev, "error mapping memory\n");
-- ret = -EFAULT;
-- goto release_mem_region;
-- }
--
- /*
- * Not all platforms have a clk so it is not an error if the
- * clock does not exists.
-@@ -168,7 +160,7 @@ static int xhci_plat_probe(struct platform_device *pdev)
- if (!IS_ERR(clk)) {
- ret = clk_prepare_enable(clk);
- if (ret)
-- goto unmap_registers;
-+ goto put_hcd;
- }
-
- ret = usb_add_hcd(hcd, irq, IRQF_SHARED);
-@@ -213,12 +205,6 @@ disable_clk:
- if (!IS_ERR(clk))
- clk_disable_unprepare(clk);
-
--unmap_registers:
-- iounmap(hcd->regs);
--
--release_mem_region:
-- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
--
- put_hcd:
- usb_put_hcd(hcd);
-
-@@ -237,8 +223,6 @@ static int xhci_plat_remove(struct platform_device *dev)
- usb_remove_hcd(hcd);
- if (!IS_ERR(clk))
- clk_disable_unprepare(clk);
-- iounmap(hcd->regs);
-- release_mem_region(hcd->rsrc_start, hcd->rsrc_len);
- usb_put_hcd(hcd);
- kfree(xhci);
-
---
-2.1.2
-
diff --git a/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch b/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch
deleted file mode 100644
index 42db72c723466..0000000000000
--- a/patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch
+++ /dev/null
@@ -1,283 +0,0 @@
-From bf05fe928085a2060fc4e1d7d4bee75d500388d8 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Wed, 9 Jul 2014 10:08:52 +0900
-Subject: usb: host: xhci-plat: add support for the R-Car H2 and M2 xHCI
- controllers
-
-The R-Car H2 and M2 SoCs come with an xHCI controller that requires
-some specific initializations related to the firmware downloading and
-some specific registers. This patch adds the support for this special
-configuration as an xHCI quirk executed during probe and start.
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Cc: "mathias.nyman@intel.com" <mathias.nyman@intel.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-(cherry picked from commit 4ac8918f3a737c21d81e250e4194c12ea2b7eb04)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/host/Kconfig | 8 ++
- drivers/usb/host/Makefile | 3
- drivers/usb/host/xhci-plat.c | 19 +++++
- drivers/usb/host/xhci-rcar.c | 148 +++++++++++++++++++++++++++++++++++++++++++
- drivers/usb/host/xhci-rcar.h | 27 +++++++
- 5 files changed, 205 insertions(+)
- create mode 100644 drivers/usb/host/xhci-rcar.c
- create mode 100644 drivers/usb/host/xhci-rcar.h
-
---- a/drivers/usb/host/Kconfig
-+++ b/drivers/usb/host/Kconfig
-@@ -37,6 +37,14 @@ config USB_XHCI_MVEBU
- Say 'Y' to enable the support for the xHCI host controller
- found in Marvell Armada 375/38x ARM SOCs.
-
-+config USB_XHCI_RCAR
-+ tristate "xHCI support for Renesas R-Car SoCs"
-+ select USB_XHCI_PLATFORM
-+ depends on ARCH_SHMOBILE || COMPILE_TEST
-+ ---help---
-+ Say 'Y' to enable the support for the xHCI host controller
-+ found in Renesas R-Car ARM SoCs.
-+
- endif # USB_XHCI_HCD
-
- config USB_EHCI_HCD
---- a/drivers/usb/host/Makefile
-+++ b/drivers/usb/host/Makefile
-@@ -22,6 +22,9 @@ ifneq ($(CONFIG_USB_XHCI_PLATFORM), )
- ifneq ($(CONFIG_USB_XHCI_MVEBU), )
- xhci-hcd-y += xhci-mvebu.o
- endif
-+ifneq ($(CONFIG_USB_XHCI_RCAR), )
-+ xhci-hcd-y += xhci-rcar.o
-+endif
- endif
-
- obj-$(CONFIG_USB_WHCI_HCD) += whci/
---- a/drivers/usb/host/xhci-plat.c
-+++ b/drivers/usb/host/xhci-plat.c
-@@ -21,6 +21,7 @@
-
- #include "xhci.h"
- #include "xhci-mvebu.h"
-+#include "xhci-rcar.h"
-
- static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)
- {
-@@ -35,11 +36,27 @@ static void xhci_plat_quirks(struct devi
- /* called during probe() after chip reset completes */
- static int xhci_plat_setup(struct usb_hcd *hcd)
- {
-+ struct device_node *of_node = hcd->self.controller->of_node;
-+ int ret;
-+
-+ if (of_device_is_compatible(of_node, "renesas,xhci-r8a7790") ||
-+ of_device_is_compatible(of_node, "renesas,xhci-r8a7791")) {
-+ ret = xhci_rcar_init_quirk(hcd);
-+ if (ret)
-+ return ret;
-+ }
-+
- return xhci_gen_setup(hcd, xhci_plat_quirks);
- }
-
- static int xhci_plat_start(struct usb_hcd *hcd)
- {
-+ struct device_node *of_node = hcd->self.controller->of_node;
-+
-+ if (of_device_is_compatible(of_node, "renesas,xhci-r8a7790") ||
-+ of_device_is_compatible(of_node, "renesas,xhci-r8a7791"))
-+ xhci_rcar_start(hcd);
-+
- return xhci_run(hcd);
- }
-
-@@ -268,6 +285,8 @@ static const struct of_device_id usb_xhc
- { .compatible = "xhci-platform" },
- { .compatible = "marvell,armada-375-xhci"},
- { .compatible = "marvell,armada-380-xhci"},
-+ { .compatible = "renesas,xhci-r8a7790"},
-+ { .compatible = "renesas,xhci-r8a7791"},
- { },
- };
- MODULE_DEVICE_TABLE(of, usb_xhci_of_match);
---- /dev/null
-+++ b/drivers/usb/host/xhci-rcar.c
-@@ -0,0 +1,148 @@
-+/*
-+ * xHCI host controller driver for R-Car SoCs
-+ *
-+ * Copyright (C) 2014 Renesas Electronics Corporation
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ */
-+
-+#include <linux/firmware.h>
-+#include <linux/module.h>
-+#include <linux/platform_device.h>
-+#include <linux/usb/phy.h>
-+
-+#include "xhci.h"
-+#include "xhci-rcar.h"
-+
-+#define FIRMWARE_NAME "r8a779x_usb3_v1.dlmem"
-+MODULE_FIRMWARE(FIRMWARE_NAME);
-+
-+/*** Register Offset ***/
-+#define RCAR_USB3_INT_ENA 0x224 /* Interrupt Enable */
-+#define RCAR_USB3_DL_CTRL 0x250 /* FW Download Control & Status */
-+#define RCAR_USB3_FW_DATA0 0x258 /* FW Data0 */
-+
-+#define RCAR_USB3_LCLK 0xa44 /* LCLK Select */
-+#define RCAR_USB3_CONF1 0xa48 /* USB3.0 Configuration1 */
-+#define RCAR_USB3_CONF2 0xa5c /* USB3.0 Configuration2 */
-+#define RCAR_USB3_CONF3 0xaa8 /* USB3.0 Configuration3 */
-+#define RCAR_USB3_RX_POL 0xab0 /* USB3.0 RX Polarity */
-+#define RCAR_USB3_TX_POL 0xab8 /* USB3.0 TX Polarity */
-+
-+/*** Register Settings ***/
-+/* Interrupt Enable */
-+#define RCAR_USB3_INT_XHC_ENA 0x00000001
-+#define RCAR_USB3_INT_PME_ENA 0x00000002
-+#define RCAR_USB3_INT_HSE_ENA 0x00000004
-+#define RCAR_USB3_INT_ENA_VAL (RCAR_USB3_INT_XHC_ENA | \
-+ RCAR_USB3_INT_PME_ENA | RCAR_USB3_INT_HSE_ENA)
-+
-+/* FW Download Control & Status */
-+#define RCAR_USB3_DL_CTRL_ENABLE 0x00000001
-+#define RCAR_USB3_DL_CTRL_FW_SUCCESS 0x00000010
-+#define RCAR_USB3_DL_CTRL_FW_SET_DATA0 0x00000100
-+
-+/* LCLK Select */
-+#define RCAR_USB3_LCLK_ENA_VAL 0x01030001
-+
-+/* USB3.0 Configuration */
-+#define RCAR_USB3_CONF1_VAL 0x00030204
-+#define RCAR_USB3_CONF2_VAL 0x00030300
-+#define RCAR_USB3_CONF3_VAL 0x13802007
-+
-+/* USB3.0 Polarity */
-+#define RCAR_USB3_RX_POL_VAL BIT(21)
-+#define RCAR_USB3_TX_POL_VAL BIT(4)
-+
-+void xhci_rcar_start(struct usb_hcd *hcd)
-+{
-+ u32 temp;
-+
-+ if (hcd->regs != NULL) {
-+ /* Interrupt Enable */
-+ temp = readl(hcd->regs + RCAR_USB3_INT_ENA);
-+ temp |= RCAR_USB3_INT_ENA_VAL;
-+ writel(temp, hcd->regs + RCAR_USB3_INT_ENA);
-+ /* LCLK Select */
-+ writel(RCAR_USB3_LCLK_ENA_VAL, hcd->regs + RCAR_USB3_LCLK);
-+ /* USB3.0 Configuration */
-+ writel(RCAR_USB3_CONF1_VAL, hcd->regs + RCAR_USB3_CONF1);
-+ writel(RCAR_USB3_CONF2_VAL, hcd->regs + RCAR_USB3_CONF2);
-+ writel(RCAR_USB3_CONF3_VAL, hcd->regs + RCAR_USB3_CONF3);
-+ /* USB3.0 Polarity */
-+ writel(RCAR_USB3_RX_POL_VAL, hcd->regs + RCAR_USB3_RX_POL);
-+ writel(RCAR_USB3_TX_POL_VAL, hcd->regs + RCAR_USB3_TX_POL);
-+ }
-+}
-+
-+static int xhci_rcar_download_firmware(struct device *dev, void __iomem *regs)
-+{
-+ const struct firmware *fw;
-+ int retval, index, j, time;
-+ int timeout = 10000;
-+ u32 data, val, temp;
-+
-+ /* request R-Car USB3.0 firmware */
-+ retval = request_firmware(&fw, FIRMWARE_NAME, dev);
-+ if (retval)
-+ return retval;
-+
-+ /* download R-Car USB3.0 firmware */
-+ temp = readl(regs + RCAR_USB3_DL_CTRL);
-+ temp |= RCAR_USB3_DL_CTRL_ENABLE;
-+ writel(temp, regs + RCAR_USB3_DL_CTRL);
-+
-+ for (index = 0; index < fw->size; index += 4) {
-+ /* to avoid reading beyond the end of the buffer */
-+ for (data = 0, j = 3; j >= 0; j--) {
-+ if ((j + index) < fw->size)
-+ data |= fw->data[index + j] << (8 * j);
-+ }
-+ writel(data, regs + RCAR_USB3_FW_DATA0);
-+ temp = readl(regs + RCAR_USB3_DL_CTRL);
-+ temp |= RCAR_USB3_DL_CTRL_FW_SET_DATA0;
-+ writel(temp, regs + RCAR_USB3_DL_CTRL);
-+
-+ for (time = 0; time < timeout; time++) {
-+ val = readl(regs + RCAR_USB3_DL_CTRL);
-+ if ((val & RCAR_USB3_DL_CTRL_FW_SET_DATA0) == 0)
-+ break;
-+ udelay(1);
-+ }
-+ if (time == timeout) {
-+ retval = -ETIMEDOUT;
-+ break;
-+ }
-+ }
-+
-+ temp = readl(regs + RCAR_USB3_DL_CTRL);
-+ temp &= ~RCAR_USB3_DL_CTRL_ENABLE;
-+ writel(temp, regs + RCAR_USB3_DL_CTRL);
-+
-+ for (time = 0; time < timeout; time++) {
-+ val = readl(regs + RCAR_USB3_DL_CTRL);
-+ if (val & RCAR_USB3_DL_CTRL_FW_SUCCESS) {
-+ retval = 0;
-+ break;
-+ }
-+ udelay(1);
-+ }
-+ if (time == timeout)
-+ retval = -ETIMEDOUT;
-+
-+ release_firmware(fw);
-+
-+ return retval;
-+}
-+
-+/* This function needs to initialize a "phy" of usb before */
-+int xhci_rcar_init_quirk(struct usb_hcd *hcd)
-+{
-+ /* If hcd->regs is NULL, we don't just call the following function */
-+ if (!hcd->regs)
-+ return 0;
-+
-+ return xhci_rcar_download_firmware(hcd->self.controller, hcd->regs);
-+}
---- /dev/null
-+++ b/drivers/usb/host/xhci-rcar.h
-@@ -0,0 +1,27 @@
-+/*
-+ * drivers/usb/host/xhci-rcar.h
-+ *
-+ * Copyright (C) 2014 Renesas Electronics Corporation
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License
-+ * version 2 as published by the Free Software Foundation.
-+ */
-+
-+#ifndef _XHCI_RCAR_H
-+#define _XHCI_RCAR_H
-+
-+#if IS_ENABLED(CONFIG_USB_XHCI_RCAR)
-+void xhci_rcar_start(struct usb_hcd *hcd);
-+int xhci_rcar_init_quirk(struct usb_hcd *hcd);
-+#else
-+static inline void xhci_rcar_start(struct usb_hcd *hcd)
-+{
-+}
-+
-+static inline int xhci_rcar_init_quirk(struct usb_hcd *hcd)
-+{
-+ return 0;
-+}
-+#endif
-+#endif /* _XHCI_RCAR_H */
diff --git a/patches.renesas/0964-ASoC-ak4642-Make-of_device_id-array-const.patch b/patches.renesas/0964-ASoC-ak4642-Make-of_device_id-array-const.patch
deleted file mode 100644
index 6cc7ef17fa553..0000000000000
--- a/patches.renesas/0964-ASoC-ak4642-Make-of_device_id-array-const.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 1e5decb227801c9d2cdf77b51c5e3e134ac22d33 Mon Sep 17 00:00:00 2001
-From: Kiran Padwal <kiran.padwal21@gmail.com>
-Date: Mon, 28 Jul 2014 11:41:04 +0530
-Subject: ASoC: ak4642: Make of_device_id array const
-
-Make of_device_id array const, because all OF functions handle it as const
-
-Signed-off-by: Kiran Padwal <kiran.padwal21@gmail.com>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit 27204ca8b981160c3b65cdc226c9070f76cbbd36)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/codecs/ak4642.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
-index 647be66078ec..7d862597bac8 100644
---- a/sound/soc/codecs/ak4642.c
-+++ b/sound/soc/codecs/ak4642.c
-@@ -555,7 +555,7 @@ static const struct ak4642_drvdata ak4648_drvdata = {
- .extended_frequencies = 1,
- };
-
--static struct of_device_id ak4642_of_match[];
-+static const struct of_device_id ak4642_of_match[];
- static int ak4642_i2c_probe(struct i2c_client *i2c,
- const struct i2c_device_id *id)
- {
-@@ -601,7 +601,7 @@ static int ak4642_i2c_remove(struct i2c_client *client)
- return 0;
- }
-
--static struct of_device_id ak4642_of_match[] = {
-+static const struct of_device_id ak4642_of_match[] = {
- { .compatible = "asahi-kasei,ak4642", .data = &ak4642_drvdata},
- { .compatible = "asahi-kasei,ak4643", .data = &ak4643_drvdata},
- { .compatible = "asahi-kasei,ak4648", .data = &ak4648_drvdata},
---
-2.1.2
-
diff --git a/patches.renesas/0965-i2c-rcar-fix-MNR-interrupt-handling.patch b/patches.renesas/0965-i2c-rcar-fix-MNR-interrupt-handling.patch
deleted file mode 100644
index 21ea077b8f09b..0000000000000
--- a/patches.renesas/0965-i2c-rcar-fix-MNR-interrupt-handling.patch
+++ /dev/null
@@ -1,65 +0,0 @@
-From 331fb731824c9a0b18238f0cbf98dc0daac640a3 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Tue, 2 Sep 2014 01:15:26 +0400
-Subject: i2c: rcar: fix MNR interrupt handling
-
-Sometimes the MNR and MST interrupts happen simultaneously (stop automatically
-follows NACK, according to the manuals) and in such case the ID_NACK flag isn't
-set since the MST interrupt handling precedes MNR and all interrupts are cleared
-and disabled then, so that MNR interrupt is never noticed -- this causes NACK'ed
-transfers to be falsely reported as successful. Exchanging MNR and MST handlers
-fixes this issue, however the MNR bit somehow gets set again even after being
-explicitly cleared, so I decided to completely suppress handling of all disabled
-interrupts (which is a good thing anyway)...
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Cc: stable@vger.kernel.org
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit dd318b0df27c582ac0d72a346fd6e693700be23c)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 15 +++++++++------
- 1 file changed, 9 insertions(+), 6 deletions(-)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index f3c7139dfa25..dc32f5fa75d0 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -367,18 +367,15 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
-
- msr = rcar_i2c_read(priv, ICMSR);
-
-+ /* Only handle interrupts that are currently enabled */
-+ msr &= rcar_i2c_read(priv, ICMIER);
-+
- /* Arbitration lost */
- if (msr & MAL) {
- rcar_i2c_flags_set(priv, (ID_DONE | ID_ARBLOST));
- goto out;
- }
-
-- /* Stop */
-- if (msr & MST) {
-- rcar_i2c_flags_set(priv, ID_DONE);
-- goto out;
-- }
--
- /* Nack */
- if (msr & MNR) {
- /* go to stop phase */
-@@ -388,6 +385,12 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- goto out;
- }
-
-+ /* Stop */
-+ if (msr & MST) {
-+ rcar_i2c_flags_set(priv, ID_DONE);
-+ goto out;
-+ }
-+
- if (rcar_i2c_is_recv(priv))
- rcar_i2c_flags_set(priv, rcar_i2c_irq_recv(priv, msr));
- else
---
-2.1.2
-
diff --git a/patches.renesas/0966-Revert-i2c-rcar-remove-spinlock.patch b/patches.renesas/0966-Revert-i2c-rcar-remove-spinlock.patch
deleted file mode 100644
index 88cf2bfc2dc8f..0000000000000
--- a/patches.renesas/0966-Revert-i2c-rcar-remove-spinlock.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-From 4107f0d4d0f717e760954a046cc5a7b008e99151 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sun, 24 Aug 2014 00:44:09 +0400
-Subject: Revert "i2c: rcar: remove spinlock"
-
-This reverts commit 150b8be3cda54412ad7b54f5392b513b25c0aaa7.
-
-The I2C core's per-adapter locks can't protect from IRQs, so the driver still
-needs a spinlock to protect the register accesses.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Cc: stable@vger.kernel.org # 3.16+
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 91bfe2989af02e709ca01ccf518c4fbda3efc70f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 22 ++++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
-diff --git a/drivers/i2c/busses/i2c-rcar.c b/drivers/i2c/busses/i2c-rcar.c
-index dc32f5fa75d0..1cc146cfc1f3 100644
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -34,6 +34,7 @@
- #include <linux/platform_device.h>
- #include <linux/pm_runtime.h>
- #include <linux/slab.h>
-+#include <linux/spinlock.h>
-
- /* register offsets */
- #define ICSCR 0x00 /* slave ctrl */
-@@ -95,6 +96,7 @@ struct rcar_i2c_priv {
- struct i2c_msg *msg;
- struct clk *clk;
-
-+ spinlock_t lock;
- wait_queue_head_t wait;
-
- int pos;
-@@ -365,6 +367,9 @@ static irqreturn_t rcar_i2c_irq(int irq, void *ptr)
- struct rcar_i2c_priv *priv = ptr;
- u32 msr;
-
-+ /*-------------- spin lock -----------------*/
-+ spin_lock(&priv->lock);
-+
- msr = rcar_i2c_read(priv, ICMSR);
-
- /* Only handle interrupts that are currently enabled */
-@@ -403,6 +408,9 @@ out:
- wake_up(&priv->wait);
- }
-
-+ spin_unlock(&priv->lock);
-+ /*-------------- spin unlock -----------------*/
-+
- return IRQ_HANDLED;
- }
-
-@@ -412,14 +420,21 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- {
- struct rcar_i2c_priv *priv = i2c_get_adapdata(adap);
- struct device *dev = rcar_i2c_priv_to_dev(priv);
-+ unsigned long flags;
- int i, ret, timeout;
-
- pm_runtime_get_sync(dev);
-
-+ /*-------------- spin lock -----------------*/
-+ spin_lock_irqsave(&priv->lock, flags);
-+
- rcar_i2c_init(priv);
- /* start clock */
- rcar_i2c_write(priv, ICCCR, priv->icccr);
-
-+ spin_unlock_irqrestore(&priv->lock, flags);
-+ /*-------------- spin unlock -----------------*/
-+
- ret = rcar_i2c_bus_barrier(priv);
- if (ret < 0)
- goto out;
-@@ -431,6 +446,9 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
- break;
- }
-
-+ /*-------------- spin lock -----------------*/
-+ spin_lock_irqsave(&priv->lock, flags);
-+
- /* init each data */
- priv->msg = &msgs[i];
- priv->pos = 0;
-@@ -440,6 +458,9 @@ static int rcar_i2c_master_xfer(struct i2c_adapter *adap,
-
- ret = rcar_i2c_prepare_msg(priv);
-
-+ spin_unlock_irqrestore(&priv->lock, flags);
-+ /*-------------- spin unlock -----------------*/
-+
- if (ret < 0)
- break;
-
-@@ -543,6 +564,7 @@ static int rcar_i2c_probe(struct platform_device *pdev)
-
- irq = platform_get_irq(pdev, 0);
- init_waitqueue_head(&priv->wait);
-+ spin_lock_init(&priv->lock);
-
- adap = &priv->adap;
- adap->nr = pdev->id;
---
-2.1.2
-
diff --git a/patches.renesas/0967-ASoC-rcar-Use-instead-of-for-boolean-expressions.patch b/patches.renesas/0967-ASoC-rcar-Use-instead-of-for-boolean-expressions.patch
deleted file mode 100644
index 8555179394e69..0000000000000
--- a/patches.renesas/0967-ASoC-rcar-Use-instead-of-for-boolean-expressions.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 459435b1ce52be8b55bb41f803f1f26a9554d183 Mon Sep 17 00:00:00 2001
-From: Lars-Peter Clausen <lars@metafoo.de>
-Date: Sun, 17 Aug 2014 16:18:19 +0200
-Subject: ASoC: rcar: Use && instead of & for boolean expressions
-
-Sparse spits out the following warning:
- sound/soc/sh/rcar/gen.c:250:21: warning: dubious: x & !y
-
-It does this because sometimes mixing boolean and bit-wise logic has not the
-intended result. In this case we are fine, but replacing the bit-wise '&' with
-the boolean '&&' silences the sparse warning. The generated code for both cases
-is the same.
-
-Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
-Signed-off-by: Mark Brown <broonie@linaro.org>
-(cherry picked from commit c8e6e960733f4a5835265c15429fced4d2f1595e)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- sound/soc/sh/rcar/gen.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/sound/soc/sh/rcar/gen.c b/sound/soc/sh/rcar/gen.c
-index 3fdf3be7b99a..f95e7ab135e8 100644
---- a/sound/soc/sh/rcar/gen.c
-+++ b/sound/soc/sh/rcar/gen.c
-@@ -247,7 +247,7 @@ rsnd_gen2_dma_addr(struct rsnd_priv *priv,
- };
-
- /* it shouldn't happen */
-- if (use_dvc & !use_src)
-+ if (use_dvc && !use_src)
- dev_err(dev, "DVC is selected without SRC\n");
-
- /* use SSIU or SSI ? */
---
-2.1.2
-
diff --git a/patches.renesas/0968-net-sh_eth-fix-driver-dependencies.patch b/patches.renesas/0968-net-sh_eth-fix-driver-dependencies.patch
deleted file mode 100644
index 499204ce5b364..0000000000000
--- a/patches.renesas/0968-net-sh_eth-fix-driver-dependencies.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-From 61a1abccbe56888695310f39a2d8f77fa76aff01 Mon Sep 17 00:00:00 2001
-From: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-Date: Mon, 1 Sep 2014 16:25:35 +0200
-Subject: net: sh_eth: fix driver dependencies
-
-Renesas SuperH Ethernet support should be available only on
-Renesas ARM SoCs and SuperH architecture.
-
-Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
-Acked-by: Kyungmin Park <kyungmin.park@samsung.com>
-Cc: Simon Horman <horms@verge.net.au>
-Cc: Magnus Damm <magnus.damm@gmail.com>
-Acked-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Geert Uytterhoeven <geert+renesas@glider.be>
-Acked-by: Simon Horman <horms+renesas@verge.net.au>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit f6ec9c335b502d8011971d07508589d212cb3c93)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/ethernet/renesas/Kconfig | 1 +
- 1 file changed, 1 insertion(+)
-
-diff --git a/drivers/net/ethernet/renesas/Kconfig b/drivers/net/ethernet/renesas/Kconfig
-index 9e757c792d84..196e98a2d93b 100644
---- a/drivers/net/ethernet/renesas/Kconfig
-+++ b/drivers/net/ethernet/renesas/Kconfig
-@@ -5,6 +5,7 @@
- config SH_ETH
- tristate "Renesas SuperH Ethernet support"
- depends on HAS_DMA
-+ depends on ARCH_SHMOBILE || SUPERH || COMPILE_TEST
- select CRC32
- select MII
- select MDIO_BITBANG
---
-2.1.2
-
diff --git a/patches.renesas/0969-usb-renesas_usbhs-fix-the-behavior-of-some-usbhs_pkt.patch b/patches.renesas/0969-usb-renesas_usbhs-fix-the-behavior-of-some-usbhs_pkt.patch
deleted file mode 100644
index 5e24b564502cb..0000000000000
--- a/patches.renesas/0969-usb-renesas_usbhs-fix-the-behavior-of-some-usbhs_pkt.patch
+++ /dev/null
@@ -1,185 +0,0 @@
-From d20f9492d163be389b2f60911d2894696c54b755 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Fri, 22 Aug 2014 20:13:50 +0900
-Subject: usb: renesas_usbhs: fix the behavior of some usbhs_pkt_handle
-
-Some gadget drivers will call usb_ep_queue() more than once before
-the first queue doesn't finish. However, this driver didn't handle
-it correctly. So, this patch fixes the behavior of some
-usbhs_pkt_handle using the "running" flag. Otherwise, the oops below
-happens if we use g_ncm driver and when the "iperf -u -c host -b 200M"
-is running.
-
-Unable to handle kernel NULL pointer dereference at virtual address 00000000
-pgd = c0004000
-[00000000] *pgd=00000000
-Internal error: Oops: 80000007 [#1] SMP ARM
-Modules linked in: usb_f_ncm g_ncm libcomposite u_ether
-CPU: 0 PID: 0 Comm: swapper/0 Tainted: G W 3.17.0-rc1-00008-g8b2be8a-dirty #20
-task: c051c7e0 ti: c0512000 task.ti: c0512000
-PC is at 0x0
-LR is at usbhsf_pkt_handler+0xa8/0x114
-pc : [<00000000>] lr : [<c0278fb4>] psr: 60000193
-sp : c0513ce8 ip : c0513c58 fp : c0513d24
-r10: 00000001 r9 : 00000193 r8 : eebec4a0
-r7 : eebec410 r6 : eebe0c6c r5 : 00000000 r4 : ee4a2774
-r3 : 00000000 r2 : ee251e00 r1 : c0513cf4 r0 : ee4a2774
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit 8355b2b3082d302091506703d2e4e239f7deed7f)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/fifo.c | 25 ++++++++++++++++++++++++-
- drivers/usb/renesas_usbhs/pipe.c | 13 +++++++++++++
- drivers/usb/renesas_usbhs/pipe.h | 4 ++++
- 3 files changed, 41 insertions(+), 1 deletion(-)
-
-diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
-index 4fd36530bfa3..3efece3c72a3 100644
---- a/drivers/usb/renesas_usbhs/fifo.c
-+++ b/drivers/usb/renesas_usbhs/fifo.c
-@@ -544,6 +544,7 @@ static int usbhsf_pio_try_push(struct usbhs_pkt *pkt, int *is_done)
- usbhsf_send_terminator(pipe, fifo);
-
- usbhsf_tx_irq_ctrl(pipe, !*is_done);
-+ usbhs_pipe_running(pipe, !*is_done);
- usbhs_pipe_enable(pipe);
-
- dev_dbg(dev, " send %d (%d/ %d/ %d/ %d)\n",
-@@ -570,12 +571,21 @@ usbhs_fifo_write_busy:
- * retry in interrupt
- */
- usbhsf_tx_irq_ctrl(pipe, 1);
-+ usbhs_pipe_running(pipe, 1);
-
- return ret;
- }
-
-+static int usbhsf_pio_prepare_push(struct usbhs_pkt *pkt, int *is_done)
-+{
-+ if (usbhs_pipe_is_running(pkt->pipe))
-+ return 0;
-+
-+ return usbhsf_pio_try_push(pkt, is_done);
-+}
-+
- struct usbhs_pkt_handle usbhs_fifo_pio_push_handler = {
-- .prepare = usbhsf_pio_try_push,
-+ .prepare = usbhsf_pio_prepare_push,
- .try_run = usbhsf_pio_try_push,
- };
-
-@@ -589,6 +599,9 @@ static int usbhsf_prepare_pop(struct usbhs_pkt *pkt, int *is_done)
- if (usbhs_pipe_is_busy(pipe))
- return 0;
-
-+ if (usbhs_pipe_is_running(pipe))
-+ return 0;
-+
- /*
- * pipe enable to prepare packet receive
- */
-@@ -597,6 +610,7 @@ static int usbhsf_prepare_pop(struct usbhs_pkt *pkt, int *is_done)
-
- usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->length);
- usbhs_pipe_enable(pipe);
-+ usbhs_pipe_running(pipe, 1);
- usbhsf_rx_irq_ctrl(pipe, 1);
-
- return 0;
-@@ -642,6 +656,7 @@ static int usbhsf_pio_try_pop(struct usbhs_pkt *pkt, int *is_done)
- (total_len < maxp)) { /* short packet */
- *is_done = 1;
- usbhsf_rx_irq_ctrl(pipe, 0);
-+ usbhs_pipe_running(pipe, 0);
- usbhs_pipe_disable(pipe); /* disable pipe first */
- }
-
-@@ -805,6 +820,7 @@ static void xfer_work(struct work_struct *work)
- dev_dbg(dev, " %s %d (%d/ %d)\n",
- fifo->name, usbhs_pipe_number(pipe), pkt->length, pkt->zero);
-
-+ usbhs_pipe_running(pipe, 1);
- usbhs_pipe_set_trans_count_if_bulk(pipe, pkt->trans);
- usbhs_pipe_enable(pipe);
- usbhsf_dma_start(pipe, fifo);
-@@ -836,6 +852,10 @@ static int usbhsf_dma_prepare_push(struct usbhs_pkt *pkt, int *is_done)
- if ((uintptr_t)(pkt->buf + pkt->actual) & 0x7) /* 8byte alignment */
- goto usbhsf_pio_prepare_push;
-
-+ /* return at this time if the pipe is running */
-+ if (usbhs_pipe_is_running(pipe))
-+ return 0;
-+
- /* get enable DMA fifo */
- fifo = usbhsf_get_dma_fifo(priv, pkt);
- if (!fifo)
-@@ -873,6 +893,7 @@ static int usbhsf_dma_push_done(struct usbhs_pkt *pkt, int *is_done)
- pkt->actual = pkt->trans;
-
- *is_done = !pkt->zero; /* send zero packet ? */
-+ usbhs_pipe_running(pipe, !*is_done);
-
- usbhsf_dma_stop(pipe, pipe->fifo);
- usbhsf_dma_unmap(pkt);
-@@ -972,8 +993,10 @@ static int usbhsf_dma_pop_done(struct usbhs_pkt *pkt, int *is_done)
- if ((pkt->actual == pkt->length) || /* receive all data */
- (pkt->trans < maxp)) { /* short packet */
- *is_done = 1;
-+ usbhs_pipe_running(pipe, 0);
- } else {
- /* re-enable */
-+ usbhs_pipe_running(pipe, 0);
- usbhsf_prepare_pop(pkt, is_done);
- }
-
-diff --git a/drivers/usb/renesas_usbhs/pipe.c b/drivers/usb/renesas_usbhs/pipe.c
-index 75fbcf6b102e..040bcefcb040 100644
---- a/drivers/usb/renesas_usbhs/pipe.c
-+++ b/drivers/usb/renesas_usbhs/pipe.c
-@@ -578,6 +578,19 @@ int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe)
- return usbhsp_flags_has(pipe, IS_DIR_HOST);
- }
-
-+int usbhs_pipe_is_running(struct usbhs_pipe *pipe)
-+{
-+ return usbhsp_flags_has(pipe, IS_RUNNING);
-+}
-+
-+void usbhs_pipe_running(struct usbhs_pipe *pipe, int running)
-+{
-+ if (running)
-+ usbhsp_flags_set(pipe, IS_RUNNING);
-+ else
-+ usbhsp_flags_clr(pipe, IS_RUNNING);
-+}
-+
- void usbhs_pipe_data_sequence(struct usbhs_pipe *pipe, int sequence)
- {
- u16 mask = (SQCLR | SQSET);
-diff --git a/drivers/usb/renesas_usbhs/pipe.h b/drivers/usb/renesas_usbhs/pipe.h
-index 406f36d050e4..d24a05972370 100644
---- a/drivers/usb/renesas_usbhs/pipe.h
-+++ b/drivers/usb/renesas_usbhs/pipe.h
-@@ -36,6 +36,7 @@ struct usbhs_pipe {
- #define USBHS_PIPE_FLAGS_IS_USED (1 << 0)
- #define USBHS_PIPE_FLAGS_IS_DIR_IN (1 << 1)
- #define USBHS_PIPE_FLAGS_IS_DIR_HOST (1 << 2)
-+#define USBHS_PIPE_FLAGS_IS_RUNNING (1 << 3)
-
- struct usbhs_pkt_handle *handler;
-
-@@ -80,6 +81,9 @@ int usbhs_pipe_probe(struct usbhs_priv *priv);
- void usbhs_pipe_remove(struct usbhs_priv *priv);
- int usbhs_pipe_is_dir_in(struct usbhs_pipe *pipe);
- int usbhs_pipe_is_dir_host(struct usbhs_pipe *pipe);
-+int usbhs_pipe_is_running(struct usbhs_pipe *pipe);
-+void usbhs_pipe_running(struct usbhs_pipe *pipe, int running);
-+
- void usbhs_pipe_init(struct usbhs_priv *priv,
- int (*dma_map_ctrl)(struct usbhs_pkt *pkt, int map));
- int usbhs_pipe_get_maxpacket(struct usbhs_pipe *pipe);
---
-2.1.2
-
diff --git a/patches.renesas/0970-usb-renesas_usbhs-protect-mod-irq_-bemp-brdy-sts-by-.patch b/patches.renesas/0970-usb-renesas_usbhs-protect-mod-irq_-bemp-brdy-sts-by-.patch
deleted file mode 100644
index 9df8800309469..0000000000000
--- a/patches.renesas/0970-usb-renesas_usbhs-protect-mod-irq_-bemp-brdy-sts-by-.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From b6b190101fc647207746da0f0ddfcc8d9fbd7895 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Fri, 22 Aug 2014 20:14:00 +0900
-Subject: usb: renesas_usbhs: protect mod->irq_{bemp,brdy}sts by spin lock
-
-This patch protects the mod->irq_bempsts and mod->irq_brdysts by
-spin lock in the usbhs_status_get_each_irq() because other functions
-will write them during spin lock. Otherwise, the driver will clears
-the BRDYSTS and/or BEMPSTS wrongly, and then, the transaction will not
-finish.
-Also since the driver should use the INTSTS0 and BRDYSTS and BEMPSTS
-as the same timing, the patch protects them.
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit c4d8199ba1a7aa390b06db23f4532e2c1875aefb)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/mod.c | 5 +++++
- 1 file changed, 5 insertions(+)
-
-diff --git a/drivers/usb/renesas_usbhs/mod.c b/drivers/usb/renesas_usbhs/mod.c
-index 6a030b931a3b..9a705b15b3a1 100644
---- a/drivers/usb/renesas_usbhs/mod.c
-+++ b/drivers/usb/renesas_usbhs/mod.c
-@@ -213,7 +213,10 @@ static int usbhs_status_get_each_irq(struct usbhs_priv *priv,
- {
- struct usbhs_mod *mod = usbhs_mod_get_current(priv);
- u16 intenb0, intenb1;
-+ unsigned long flags;
-
-+ /******************** spin lock ********************/
-+ usbhs_lock(priv, flags);
- state->intsts0 = usbhs_read(priv, INTSTS0);
- state->intsts1 = usbhs_read(priv, INTSTS1);
-
-@@ -229,6 +232,8 @@ static int usbhs_status_get_each_irq(struct usbhs_priv *priv,
- state->bempsts &= mod->irq_bempsts;
- state->brdysts &= mod->irq_brdysts;
- }
-+ usbhs_unlock(priv, flags);
-+ /******************** spin unlock ******************/
-
- /*
- * Check whether the irq enable registers and the irq status are set
---
-2.1.2
-
diff --git a/patches.renesas/0971-usb-renesas_usbhs-fix-the-condition-of-is_done-in-us.patch b/patches.renesas/0971-usb-renesas_usbhs-fix-the-condition-of-is_done-in-us.patch
deleted file mode 100644
index e841e834b01c7..0000000000000
--- a/patches.renesas/0971-usb-renesas_usbhs-fix-the-condition-of-is_done-in-us.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From 8c1efbc74942c8584c0e9343993f401869c45538 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Fri, 22 Aug 2014 20:14:10 +0900
-Subject: usb: renesas_usbhs: fix the condition of is_done in
- usbhsf_dma_push_done
-
-This patch fixes the condition of is_done in usbhsf_dma_push_done().
-This function will be called after a transmission finished by DMAC.
-So, the function should check if the transmission packet is short packet
-or not. Also the function should call try_run to send the zero packet
-by the pio handler if the "*is_done" is not set. Otherwize, the
-transaction will not finish if a gadget driver sets the "zero" flag
-in a transmission.
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit c0ed8b23b257a84d103764cdbd490ee5e2749da3)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/fifo.c | 17 +++++++++++++++--
- 1 file changed, 15 insertions(+), 2 deletions(-)
-
-diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
-index 3efece3c72a3..1564829951c0 100644
---- a/drivers/usb/renesas_usbhs/fifo.c
-+++ b/drivers/usb/renesas_usbhs/fifo.c
-@@ -889,16 +889,29 @@ usbhsf_pio_prepare_push:
- static int usbhsf_dma_push_done(struct usbhs_pkt *pkt, int *is_done)
- {
- struct usbhs_pipe *pipe = pkt->pipe;
-+ int is_short = pkt->trans % usbhs_pipe_get_maxpacket(pipe);
-
-- pkt->actual = pkt->trans;
-+ pkt->actual += pkt->trans;
-+
-+ if (pkt->actual < pkt->length)
-+ *is_done = 0; /* there are remainder data */
-+ else if (is_short)
-+ *is_done = 1; /* short packet */
-+ else
-+ *is_done = !pkt->zero; /* send zero packet? */
-
-- *is_done = !pkt->zero; /* send zero packet ? */
- usbhs_pipe_running(pipe, !*is_done);
-
- usbhsf_dma_stop(pipe, pipe->fifo);
- usbhsf_dma_unmap(pkt);
- usbhsf_fifo_unselect(pipe, pipe->fifo);
-
-+ if (!*is_done) {
-+ /* change handler to PIO */
-+ pkt->handler = &usbhs_fifo_pio_push_handler;
-+ return pkt->handler->try_run(pkt, is_done);
-+ }
-+
- return 0;
- }
-
---
-2.1.2
-
diff --git a/patches.renesas/0972-usb-renesas_usbhs-fix-the-usb_pkt_pop.patch b/patches.renesas/0972-usb-renesas_usbhs-fix-the-usb_pkt_pop.patch
deleted file mode 100644
index b5eff178068c0..0000000000000
--- a/patches.renesas/0972-usb-renesas_usbhs-fix-the-usb_pkt_pop.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From aa377e5fad872713d3cd5f9c334c012481381535 Mon Sep 17 00:00:00 2001
-From: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Date: Fri, 22 Aug 2014 20:14:28 +0900
-Subject: usb: renesas_usbhs: fix the usb_pkt_pop()
-
-This patch fixes the usb_pkt_pop(). If a gadget driver calls
-usb_ep_dequeue(), this driver will call the usb_pkt_pop().
-So, the usb_pkt_pop() should cancel the transaction.
-
-Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
-Signed-off-by: Felipe Balbi <balbi@ti.com>
-(cherry picked from commit 2743e7f90dc08282d027dbc2f6486f5cb85aa493)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/usb/renesas_usbhs/fifo.c | 30 +++++++++++++++++++++++++++---
- 1 file changed, 27 insertions(+), 3 deletions(-)
-
-diff --git a/drivers/usb/renesas_usbhs/fifo.c b/drivers/usb/renesas_usbhs/fifo.c
-index 1564829951c0..b0c97a3f1bfe 100644
---- a/drivers/usb/renesas_usbhs/fifo.c
-+++ b/drivers/usb/renesas_usbhs/fifo.c
-@@ -108,19 +108,45 @@ static struct usbhs_pkt *__usbhsf_pkt_get(struct usbhs_pipe *pipe)
- return list_first_entry(&pipe->list, struct usbhs_pkt, node);
- }
-
-+static void usbhsf_fifo_clear(struct usbhs_pipe *pipe,
-+ struct usbhs_fifo *fifo);
-+static void usbhsf_fifo_unselect(struct usbhs_pipe *pipe,
-+ struct usbhs_fifo *fifo);
-+static struct dma_chan *usbhsf_dma_chan_get(struct usbhs_fifo *fifo,
-+ struct usbhs_pkt *pkt);
-+#define usbhsf_dma_map(p) __usbhsf_dma_map_ctrl(p, 1)
-+#define usbhsf_dma_unmap(p) __usbhsf_dma_map_ctrl(p, 0)
-+static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map);
- struct usbhs_pkt *usbhs_pkt_pop(struct usbhs_pipe *pipe, struct usbhs_pkt *pkt)
- {
- struct usbhs_priv *priv = usbhs_pipe_to_priv(pipe);
-+ struct usbhs_fifo *fifo = usbhs_pipe_to_fifo(pipe);
- unsigned long flags;
-
- /******************** spin lock ********************/
- usbhs_lock(priv, flags);
-
-+ usbhs_pipe_disable(pipe);
-+
- if (!pkt)
- pkt = __usbhsf_pkt_get(pipe);
-
-- if (pkt)
-+ if (pkt) {
-+ struct dma_chan *chan = NULL;
-+
-+ if (fifo)
-+ chan = usbhsf_dma_chan_get(fifo, pkt);
-+ if (chan) {
-+ dmaengine_terminate_all(chan);
-+ usbhsf_fifo_clear(pipe, fifo);
-+ usbhsf_dma_unmap(pkt);
-+ }
-+
- __usbhsf_pkt_del(pkt);
-+ }
-+
-+ if (fifo)
-+ usbhsf_fifo_unselect(pipe, fifo);
-
- usbhs_unlock(priv, flags);
- /******************** spin unlock ******************/
-@@ -778,8 +804,6 @@ static void __usbhsf_dma_ctrl(struct usbhs_pipe *pipe,
- usbhs_bset(priv, fifo->sel, DREQE, dreqe);
- }
-
--#define usbhsf_dma_map(p) __usbhsf_dma_map_ctrl(p, 1)
--#define usbhsf_dma_unmap(p) __usbhsf_dma_map_ctrl(p, 0)
- static int __usbhsf_dma_map_ctrl(struct usbhs_pkt *pkt, int map)
- {
- struct usbhs_pipe *pipe = pkt->pipe;
---
-2.1.2
-
diff --git a/patches.renesas/0973-i2c-rcar-fix-RCAR_IRQ_ACK_-RECV-SEND.patch b/patches.renesas/0973-i2c-rcar-fix-RCAR_IRQ_ACK_-RECV-SEND.patch
deleted file mode 100644
index 52b39d452a34b..0000000000000
--- a/patches.renesas/0973-i2c-rcar-fix-RCAR_IRQ_ACK_-RECV-SEND.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From efafa3809db75d58e5d8ee96956e7415bda90472 Mon Sep 17 00:00:00 2001
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Date: Sat, 6 Sep 2014 03:34:32 +0400
-Subject: i2c: rcar: fix RCAR_IRQ_ACK_{RECV|SEND}
-
-Bits 8-31 of all registers reflect the value of bits 0-7 on reads and should be
-0 on writes, according to the manuals. RCAR_IRQ_ACK_{RECV|SEND} macros have all
-1's in bits 8-31, thus going against the manuals, so fix them.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Cc: stable@vger.kernel.org
-Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
-(cherry picked from commit 938916fbb8e8cb67eacb784f4eda17e2950c16c5)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/i2c/busses/i2c-rcar.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/i2c/busses/i2c-rcar.c
-+++ b/drivers/i2c/busses/i2c-rcar.c
-@@ -76,8 +76,8 @@
- #define RCAR_IRQ_RECV (MNR | MAL | MST | MAT | MDR)
- #define RCAR_IRQ_STOP (MST)
-
--#define RCAR_IRQ_ACK_SEND (~(MAT | MDE))
--#define RCAR_IRQ_ACK_RECV (~(MAT | MDR))
-+#define RCAR_IRQ_ACK_SEND (~(MAT | MDE) & 0xFF)
-+#define RCAR_IRQ_ACK_RECV (~(MAT | MDR) & 0xFF)
-
- #define ID_LAST_MSG (1 << 0)
- #define ID_IOERROR (1 << 1)
diff --git a/patches.renesas/micrel-fix-masking-off-led-bits.patch b/patches.renesas/micrel-fix-masking-off-led-bits.patch
deleted file mode 100644
index fa8f48e538340..0000000000000
--- a/patches.renesas/micrel-fix-masking-off-led-bits.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From horms@vergenet.net Wed Dec 10 18:29:26 2014
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 11 Dec 2014 11:29:12 +0900
-Subject: [PATCH ltsi-3.14 2/2] micrel: fix masking off LED bits
-To: ltsi-dev@lists.linuxfoundation.org
-Cc: Greg KH <gregkh@linuxfoundation.org>, Magnus Damm <magnus.damm@gmail.com>, yoshihiro shimoda <yoshihiro.shimoda.uh@renesas.com>
-Message-ID: <1418264952-27886-3-git-send-email-horms+renesas@verge.net.au>
-
-
-From: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-
-Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
-obvious mistake when masking off the LED mode bits: forgot to do a logical NOT
-to the mask with which it ANDs the register value, so that unrelated bits are
-cleared instead.
-
-Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
-Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
-Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 28bdc499d647124fa5844453d35e6f5d1b3810dc)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- drivers/net/phy/micrel.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/net/phy/micrel.c
-+++ b/drivers/net/phy/micrel.c
-@@ -167,7 +167,7 @@ static int kszphy_setup_led(struct phy_d
- if (temp < 0)
- return temp;
-
-- temp &= 3 << shift;
-+ temp &= ~(3 << shift);
- temp |= val << shift;
- rc = phy_write(phydev, reg, temp);
-
diff --git a/patches.renesas/phy-micrel-add-of-configuration-for-led-mode.patch b/patches.renesas/phy-micrel-add-of-configuration-for-led-mode.patch
deleted file mode 100644
index 5bb6f83ef90d1..0000000000000
--- a/patches.renesas/phy-micrel-add-of-configuration-for-led-mode.patch
+++ /dev/null
@@ -1,143 +0,0 @@
-From horms@vergenet.net Wed Dec 10 18:29:25 2014
-From: Simon Horman <horms+renesas@verge.net.au>
-Date: Thu, 11 Dec 2014 11:29:11 +0900
-Subject: [PATCH ltsi-3.14 1/2] phy: micrel: add of configuration for LED mode
-To: ltsi-dev@lists.linuxfoundation.org
-Cc: Greg KH <gregkh@linuxfoundation.org>, Magnus Damm <magnus.damm@gmail.com>, yoshihiro shimoda <yoshihiro.shimoda.uh@renesas.com>
-Message-ID: <1418264952-27886-2-git-send-email-horms+renesas@verge.net.au>
-
-
-From: Ben Dooks <ben.dooks@codethink.co.uk>
-
-Add support for the led-mode property for the following PHYs
-which have a single LED mode configuration value.
-
-KSZ8001 and KSZ8041 which both use register 0x1e bits 15,14 and
-KSZ8021, KSZ8031 and KSZ8051 which use register 0x1f bits 5,4
-to control the LED configuration.
-
-Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-(cherry picked from commit 20d8435a1cffa04992f1db6b199a5f0ccec2ff06)
-Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
----
- Documentation/devicetree/bindings/net/micrel.txt | 18 ++++++++
- drivers/net/phy/micrel.c | 49 +++++++++++++++++++++--
- 2 files changed, 63 insertions(+), 4 deletions(-)
- create mode 100644 Documentation/devicetree/bindings/net/micrel.txt
-
---- /dev/null
-+++ b/Documentation/devicetree/bindings/net/micrel.txt
-@@ -0,0 +1,18 @@
-+Micrel PHY properties.
-+
-+These properties cover the base properties Micrel PHYs.
-+
-+Optional properties:
-+
-+ - micrel,led-mode : LED mode value to set for PHYs with configurable LEDs.
-+
-+ Configure the LED mode with single value. The list of PHYs and
-+ the bits that are currently supported:
-+
-+ KSZ8001: register 0x1e, bits 15..14
-+ KSZ8041: register 0x1e, bits 15..14
-+ KSZ8021: register 0x1f, bits 5..4
-+ KSZ8031: register 0x1f, bits 5..4
-+ KSZ8051: register 0x1f, bits 5..4
-+
-+ See the respective PHY datasheet for the mode values.
---- a/drivers/net/phy/micrel.c
-+++ b/drivers/net/phy/micrel.c
-@@ -148,15 +148,52 @@ static int ks8737_config_intr(struct phy
- return rc < 0 ? rc : 0;
- }
-
-+static int kszphy_setup_led(struct phy_device *phydev,
-+ unsigned int reg, unsigned int shift)
-+{
-+
-+ struct device *dev = &phydev->dev;
-+ struct device_node *of_node = dev->of_node;
-+ int rc, temp;
-+ u32 val;
-+
-+ if (!of_node && dev->parent->of_node)
-+ of_node = dev->parent->of_node;
-+
-+ if (of_property_read_u32(of_node, "micrel,led-mode", &val))
-+ return 0;
-+
-+ temp = phy_read(phydev, reg);
-+ if (temp < 0)
-+ return temp;
-+
-+ temp &= 3 << shift;
-+ temp |= val << shift;
-+ rc = phy_write(phydev, reg, temp);
-+
-+ return rc < 0 ? rc : 0;
-+}
-+
- static int kszphy_config_init(struct phy_device *phydev)
- {
- return 0;
- }
-
-+static int kszphy_config_init_led8041(struct phy_device *phydev)
-+{
-+ /* single led control, register 0x1e bits 15..14 */
-+ return kszphy_setup_led(phydev, 0x1e, 14);
-+}
-+
- static int ksz8021_config_init(struct phy_device *phydev)
- {
-- int rc;
- const u16 val = KSZPHY_OMSO_B_CAST_OFF | KSZPHY_OMSO_RMII_OVERRIDE;
-+ int rc;
-+
-+ rc = kszphy_setup_led(phydev, 0x1f, 4);
-+ if (rc)
-+ dev_err(&phydev->dev, "failed to set led mode\n");
-+
- phy_write(phydev, MII_KSZPHY_OMSO, val);
- rc = ksz_config_flags(phydev);
- return rc < 0 ? rc : 0;
-@@ -166,6 +203,10 @@ static int ks8051_config_init(struct phy
- {
- int rc;
-
-+ rc = kszphy_setup_led(phydev, 0x1f, 4);
-+ if (rc)
-+ dev_err(&phydev->dev, "failed to set led mode\n");
-+
- rc = ksz_config_flags(phydev);
- return rc < 0 ? rc : 0;
- }
-@@ -327,7 +368,7 @@ static struct phy_driver ksphy_driver[]
- .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause
- | SUPPORTED_Asym_Pause),
- .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
-- .config_init = kszphy_config_init,
-+ .config_init = kszphy_config_init_led8041,
- .config_aneg = genphy_config_aneg,
- .read_status = genphy_read_status,
- .ack_interrupt = kszphy_ack_interrupt,
-@@ -342,7 +383,7 @@ static struct phy_driver ksphy_driver[]
- .features = PHY_BASIC_FEATURES |
- SUPPORTED_Pause | SUPPORTED_Asym_Pause,
- .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
-- .config_init = kszphy_config_init,
-+ .config_init = kszphy_config_init_led8041,
- .config_aneg = genphy_config_aneg,
- .read_status = genphy_read_status,
- .ack_interrupt = kszphy_ack_interrupt,
-@@ -371,7 +412,7 @@ static struct phy_driver ksphy_driver[]
- .phy_id_mask = 0x00ffffff,
- .features = (PHY_BASIC_FEATURES | SUPPORTED_Pause),
- .flags = PHY_HAS_MAGICANEG | PHY_HAS_INTERRUPT,
-- .config_init = kszphy_config_init,
-+ .config_init = kszphy_config_init_led8041,
- .config_aneg = genphy_config_aneg,
- .read_status = genphy_read_status,
- .ack_interrupt = kszphy_ack_interrupt,
diff --git a/series b/series
index f5ba9c64c105f..78cd418ce773a 100644
--- a/series
+++ b/series
@@ -24,1021 +24,15 @@ patches.ltsi/ltsi-makefile-addition.patch
# https://github.com/ktap/ktap.git
# repo.
#
-patches.ktap/ktap-0.4.patch
+#patches.ktap/ktap-0.4.patch
#############################################################################
# Renesas patches
#
-patches.renesas/0001-media-v4l-vsp1-Update-copyright-notice.patch
-patches.renesas/0002-ARM-shmobile-wait-for-MSTP-clock-status-to-toggle-wh.patch
-patches.renesas/0003-clk-shmobile-div6-use-proper-description-in-kernel-d.patch
-patches.renesas/0004-clk-shmobile-add-CPG-driver-for-rz-platforms.patch
-patches.renesas/0005-clk-shmobile-rcar-gen2-fix-lb-sd0-sd1-sdh-clock-pare.patch
-patches.renesas/0006-clk-shmobile-fix-setting-paretn-clock-rate.patch
-patches.renesas/0007-clk-shmobile-clk-mstp-change-to-using-clock-indices.patch
-patches.renesas/0008-gpio-rcar-Add-helper-variable-dev-pdev-dev.patch
-patches.renesas/0009-mtd-m25p80-Add-dual-read-support.patch
-patches.renesas/0010-mtd-m25p80-Enable-Dual-SPI-read-transfers-for-s25fl2.patch
-patches.renesas/0011-mtd-delete-non-required-instances-of-include-linux-i.patch
-patches.renesas/0012-mtd-m25p80-Use-positive-logic-to-check-JEDEC-ID.patch
-patches.renesas/0013-mtd-m25p80-add-support-for-the-Spansion-s25fl008k-ch.patch
-patches.renesas/0014-mtd-m25p80-add-Macronix-mx66l1g55g-1Gbit-SPI-flash.patch
-patches.renesas/0015-pinctrl-Quiet-logging-about-missing-DT-nodes-when-no.patch
-patches.renesas/0016-drm-rcar-du-Handle-encoder-initialization-failures.patch
-patches.renesas/0017-ASoC-rsnd-tidyup-register-naming-of-BUSIF_MODE.patch
-patches.renesas/0018-ASoC-rsnd-cleanup-debug-information-method.patch
-patches.renesas/0019-ASoC-rsnd-remove-meaningless-rsnd_ssi_non.patch
-patches.renesas/0020-ASoC-rsnd-control-SCU-ops-in-probe-timing.patch
-patches.renesas/0021-ASoC-rsnd-add-rsnd_scu_init-and-separate-init-start.patch
-patches.renesas/0022-ASoC-rsnd-remove-meaningless-function-parameter.patch
-patches.renesas/0023-ASoC-rsnd-merge-rsnd_scu_start-stop-and-rsnd_scu_tra.patch
-patches.renesas/0024-ASoC-rsnd-rsnd_dai_is_clk_master-can-be-shared.patch
-patches.renesas/0025-ASoC-rsnd-remove-pin-sync-option.patch
-patches.renesas/0026-ASoC-rsnd-SSI_MODE0-1-settings-goes-to-scu.c.patch
-patches.renesas/0027-ASoC-rsnd-remove-ssiu-from-ssi.c.patch
-patches.renesas/0028-ASoC-rsnd-rename-rsnd_scu_convert_rate_ctrl.patch
-patches.renesas/0029-ASoC-rsnd-explain-SRC-bypass-mode-settings-in-commen.patch
-patches.renesas/0030-ASoC-rsnd-remove-duplicate-priv-from-rsnd_dma.patch
-patches.renesas/0031-ASoC-rsnd-non-0-is-error-on-probe.patch
-patches.renesas/0032-ASoC-rsnd-fixup-Gen2-module-naming.patch
-patches.renesas/0033-ASoC-rsnd-don-t-use-schedule_work-when-rsnd_dma_star.patch
-patches.renesas/0034-ASoC-rsnd-SCU-should-be-called-before-SSI.patch
-patches.renesas/0035-ASoC-rsnd-clarify-scu.c-area.patch
-patches.renesas/0036-ASoC-rsnd-Merge-macros-in-scu.c.patch
-patches.renesas/0037-ASoC-rsnd-rsnd_scu_hpbif_is_enable-become-macro.patch
-patches.renesas/0038-ASoC-rsnd-merge-SRC-clock-timing-setting.patch
-patches.renesas/0039-ASoC-rsnd-add-rsnd_ssi_is_play.patch
-patches.renesas/0040-ASoC-rsnd-extracts-Gen1-Gen2-common-parts.patch
-patches.renesas/0041-ASoC-rsnd-remove-SSI-dependent-DMAEngine-callback.patch
-patches.renesas/0042-ASoC-rsnd-rsnd_ssi_probe-goes-forwarder-than-rsnd_sc.patch
-patches.renesas/0043-ASoC-rsnd-add-Gen2-SRC-and-DMAEngine-support.patch
-patches.renesas/0044-ASoC-rsnd-use-device-dependency-clock.patch
-patches.renesas/0045-ASoC-rsnd-tidyup-original-for_each_rsnd_xxx-macro.patch
-patches.renesas/0046-ASoC-rsnd-set-DIV_EN-register-on-rsnd_adg_set_conver.patch
-patches.renesas/0047-ASoC-rsnd-print-error-if-there-is-SRC-settings-misma.patch
-patches.renesas/0048-ASoC-rsnd-move-priv-member-settings-to-upper-side.patch
-patches.renesas/0049-ASoC-rsnd-move-rsnd_mod_call-macro.patch
-patches.renesas/0050-ASoC-rsnd-remove-verbose-function-parameter.patch
-patches.renesas/0051-ASoC-rsnd-remove-verbose-debug-message-from-scu-ssi.patch
-patches.renesas/0052-ASoC-rsnd-unify-rdai-naming.patch
-patches.renesas/0053-ASoC-rsnd-tidyup-RSND_SSI_xxx-flags.patch
-patches.renesas/0054-ASoC-rsnd-run-rsnd_path_init-when-probe-timing.patch
-patches.renesas/0055-ASoC-rsnd-use-mod-array-instead-of-list-on-rdai.patch
-patches.renesas/0056-ASoC-rsnd-get-ssi-scu-from-rsnd_dai_stream.patch
-patches.renesas/0057-ASoC-rsnd-use-devm_clk_get-instead-of-clk_get.patch
-patches.renesas/0058-ASoC-rsnd-use-function-pointer-for-each-probe.patch
-patches.renesas/0059-ASoC-rsnd-remove-unused-SSI_CONTROL.patch
-patches.renesas/0060-ASoC-rsnd-modify-rsnd_adg_ssi_ws_timing_gen2-paramet.patch
-patches.renesas/0061-ASoC-rsnd-share-reg_field-and-reduce-memory.patch
-patches.renesas/0062-ASoC-rsnd-add-struct-rsnd_dai_platform_info.patch
-patches.renesas/0063-ASoC-rsnd-Get-correct-SCU-ID.patch
-patches.renesas/0064-ASoC-rsnd-add-rsnd_scu_enable_ssi_irq.patch
-patches.renesas/0065-ASoC-rsnd-call-rsnd_scu_ssi_mode_init-from-SSI.patch
-patches.renesas/0066-ASoC-rsnd-add-probe-remove-callback-on-rsnd_mod_ops.patch
-patches.renesas/0067-ASoC-rsnd-use-mod-probe-method-on-SCU.patch
-patches.renesas/0068-ASoC-rsnd-use-mod-probe-method-on-SSI.patch
-patches.renesas/0069-ASoC-rsnd-nothing-to-do-on-rsnd_dai_remove.patch
-patches.renesas/0070-ASoC-rsnd-remove-all-rsnd_xxx_remove.patch
-patches.renesas/0071-ASoC-rsnd-rename-scu-to-src.patch
-patches.renesas/0072-ASoC-rcar-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
-patches.renesas/0073-ASoC-rsnd-add-DeviceTree-support.patch
-patches.renesas/0074-ASoC-rcar-bugfix-it-cares-about-the-non-src-case.patch
-patches.renesas/0075-ASoC-rsnd-fix-clock-prepare-unprepare.patch
-patches.renesas/0076-ASoC-rsnd-call-rsnd_dai_pointer_update-from-outside-.patch
-patches.renesas/0077-thermal-rcar-thermal-fix-same-mask-applied-twice.patch
-patches.renesas/0078-thermal-rcar-thermal-update-thermal-zone-only-when-t.patch
-patches.renesas/0079-spi-rspi-Remove-unused-mesg-parameter-from-send-rece.patch
-patches.renesas/0080-spi-rspi-Use-core-message-handling.patch
-patches.renesas/0081-spi-rspi-Abstract-8-16-bit-Data-Register-access.patch
-patches.renesas/0082-spi-rspi-Add-rspi_data_-out-in-out_in-helpers.patch
-patches.renesas/0083-spi-rspi-Abstract-transfer_one-for-RSPI-and-QSPI.patch
-patches.renesas/0084-spi-rspi-Merge-rspi_send_pio-and-rspi_receive_pio.patch
-patches.renesas/0085-spi-rspi-Merge-qspi_send_pio-and-qspi_receive_pio.patch
-patches.renesas/0086-spi-rspi-Add-support-for-more-than-one-interrupt.patch
-patches.renesas/0087-spi-rspi-Add-support-for-RSPI-on-RZ-A1H.patch
-patches.renesas/0088-spi-rspi-Add-support-for-loopback-mode.patch
-patches.renesas/0089-spi-rspi-Convert-to-clk_prepare_enable-disable_unpre.patch
-patches.renesas/0090-spi-rspi-Use-NULL-as-the-clock-ID.patch
-patches.renesas/0091-spi-rspi-Add-DT-support.patch
-patches.renesas/0092-spi-rspi-Add-support-for-Quad-and-Dual-SPI-Transfers.patch
-patches.renesas/0093-spi-rspi-fix-build-error-when-CONFIG_OF-is-not-set.patch
-patches.renesas/0094-spi-rspi-Only-enable-interrupts-when-there-s-a-need-.patch
-patches.renesas/0095-spi-rspi-Remove-empty-rspi_cleanup.patch
-patches.renesas/0096-spi-rspi-Fix-loopback-mode-for-Dual-Quad-SPI-Transfe.patch
-patches.renesas/0097-spi-rspi-Add-runtime-PM-support-using-spi-core-auto_.patch
-patches.renesas/0098-sh-intc-Enable-driver-compilation-with-COMPILE_TEST.patch
-patches.renesas/0099-drivers-sh-compile-drivers-sh-pm_runtime.c-if-ARCH_S.patch
-patches.renesas/0100-sh_eth-use-ETH_ZLEN-instead-of-home-grown-define.patch
-patches.renesas/0101-sh_eth-add-device-tree-support.patch
-patches.renesas/0102-sh_eth-update-OF-PHY-registeration.patch
-patches.renesas/0103-sh_eth-exit-probe-with-unknown-register-layout.patch
-patches.renesas/0104-sh_eth-convert-pr_-to-netdev_-calls.patch
-patches.renesas/0105-sh_eth-convert-dev_-to-netdev_-calls.patch
-patches.renesas/0106-sh_eth-fold-netif_msg_-and-netdev_-calls-into-netif_.patch
-patches.renesas/0107-sh_eth-Use-the-platform-device-for-memory-allocation.patch
-patches.renesas/0108-sh_eth-Use-the-platform-device-as-the-MDIO-bus-paren.patch
-patches.renesas/0109-sh_eth-Simplify-MDIO-bus-initialization-and-release.patch
-patches.renesas/0110-sh_eth-Register-MDIO-bus-before-registering-the-netw.patch
-patches.renesas/0111-sh_eth-Remove-goto-statements-that-jump-straight-to-.patch
-patches.renesas/0112-sh_eth-ensure-pm_runtime-cannot-suspend-the-device-d.patch
-patches.renesas/0113-mmc-sh_mobile_sdhi-Use-modern-PM-macros-to-define-pm.patch
-patches.renesas/0114-mmc-tmio_mmc-Convert-from-legacy-to-modern-PM-ops.patch
-patches.renesas/0115-mmc-tmio-Adapt-to-proper-PM-configs-for-exported-fun.patch
-patches.renesas/0116-mmc-sdhi-tidyup-sh_mobile_sdhi_of_match-position.patch
-patches.renesas/0117-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7778.patch
-patches.renesas/0118-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7779.patch
-patches.renesas/0119-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7790.patch
-patches.renesas/0120-mmc-sdhi-update-sh_mobile_sdhi_of_data-for-r8a7791.patch
-patches.renesas/0121-pinctrl-sh-pfc-r8a7791-Add-QSPI-pin-groups.patch
-patches.renesas/0122-pinctrl-sh-pfc-r8a7790-Break-out-USB0-OVC-VBUS.patch
-patches.renesas/0123-pinctrl-sh-pfc-r8a7790-Add-QSPI-pin-groups.patch
-patches.renesas/0124-pinctrl-pfc-r8a7791-add-mux-data-for-IIC-B-cores.patch
-patches.renesas/0125-pinctrl-sh-pfc-r8a7790-Add-alternative-MSIOF-pin-gro.patch
-patches.renesas/0126-pinctrl-sh-pfc-r8a7791-Add-alternative-MSIOF-pin-gro.patch
-patches.renesas/0127-sh-pfc-r8a7790-Fix-definition-of-IPSR5.patch
-patches.renesas/0128-sh-pfc-r8a7791-Fix-definition-of-MOD_SEL3.patch
-patches.renesas/0129-serial-sh-sci-Fix-cast-warning.patch
-patches.renesas/0130-serial-sh-sci-Fix-compatible-string-in-DT-bindings-e.patch
-patches.renesas/0131-serial-sh-sci-Add-missing-call-to-uart_remove_one_po.patch
-patches.renesas/0132-serial-sh-sci-Replace-printk-by-pr_.patch
-patches.renesas/0133-serial-sh-sci-Remove-useless-casts.patch
-patches.renesas/0134-serial-sh-sci-Add-more-register-documentation.patch
-patches.renesas/0135-serial-sh-sci-Replace-hardcoded-3-by-UART_PM_STATE_O.patch
-patches.renesas/0136-serial-sh-sci-Neaten-dev_-level-uses.patch
-patches.renesas/0137-cpufreq-remove-unused-notifier-CPUFREQ_-SUSPENDCHANG.patch
-patches.renesas/0138-media-media-soc_camera-rcar_vin-Add-support-for-10-b.patch
-patches.renesas/0139-i2c-add-deprecation-warning-for-class-based-instanti.patch
-patches.renesas/0140-i2c-rcar-add-compatible-entry-for-r8a7791.patch
-patches.renesas/0141-i2c-i2c-rcar-deprecate-class-based-instantiation.patch
-patches.renesas/0142-regulator-da9210-Remove-redundant-error-message.patch
-patches.renesas/0143-spi-Provide-core-support-for-DMA-mapping-transfers.patch
-patches.renesas/0144-spi-Provide-core-support-for-full-duplex-devices.patch
-patches.renesas/0145-spi-core-Ignore-unsupported-spi-tr-x-bus-width-prope.patch
-patches.renesas/0146-spi-Make-core-DMA-mapping-functions-generate-scatter.patch
-patches.renesas/0147-regulator-core-Allow-regulator_set_voltage-for-fixed.patch
-patches.renesas/0148-DMA-shdma-Fix-warnings-due-to-improper-casts-and-pri.patch
-patches.renesas/0149-shdma-add-R-Car-Audio-DMAC-peri-peri-driver.patch
-patches.renesas/0150-of-add-functions-to-count-number-of-elements-in-a-pr.patch
-patches.renesas/0151-ASoC-add-snd_soc_of_parse_audio_simple_widgets-for-D.patch
-patches.renesas/0152-ASoC-core-add-TDM-slot-parsing-from-DT-supports.patch
-patches.renesas/0153-clocksource-Add-Kconfig-entries-for-CMT-MTU2-TMU-and.patch
-patches.renesas/0154-clocksource-CMT-MTU2-TMU-and-STI-should-depend-on-GE.patch
-patches.renesas/0155-regulator-gpio-regulator-Remove-unneeded-OOM-error-m.patch
-patches.renesas/0156-regulator-gpio-add-gpios-status-for-DT.patch
-patches.renesas/0157-regulator-gpio-Document-regulator-type-property.patch
-patches.renesas/0158-regulator-gpio-print-warning-if-gpios-gpios-states-m.patch
-patches.renesas/0159-regulator-gpio-explain-detail-of-gpios-states.patch
-patches.renesas/0160-regulator-gpio-regulator-do-not-open-code-counting-a.patch
-patches.renesas/0161-regulator-gpio-regulator-fix-forgotten-gpios-states-.patch
-patches.renesas/0162-ASoC-simple-card-simplify-code.patch
-patches.renesas/0163-ASoC-simple-card-simplify-code.patch
-patches.renesas/0164-ASoC-simple-card-simplify-code.patch
-patches.renesas/0165-ASoC-simple-card-simplify-code.patch
-patches.renesas/0166-ASoC-simple-card-simplify-code.patch
-patches.renesas/0167-ASoC-simple-card-simplify-code.patch
-patches.renesas/0168-ASoC-simple-card-simplify-code.patch
-patches.renesas/0169-ASoC-simple-card-simplify-code.patch
-patches.renesas/0170-ASoC-simple-card-fix-__asoc_simple_card_dai_init.patch
-patches.renesas/0171-ASoC-simple-card-simplify-the-daifmt-code.patch
-patches.renesas/0172-ASoC-simple-card-Add-snd_card-s-name-parsing-from-DT.patch
-patches.renesas/0173-ASoC-simple-card-add-off-codec-widgets-supports.patch
-patches.renesas/0174-ASoC-simple-card-for-new-properties-documenting-and-.patch
-patches.renesas/0175-ASoC-simple-card-add-slot-information-parsing-suppor.patch
-patches.renesas/0176-ASoC-simple-card-cpu_dai_name-creates-confusion-when.patch
-patches.renesas/0177-ASoC-simple-card-tidyup-cpu-codec-dai_fmt-settings-f.patch
-patches.renesas/0178-ASoC-simple-card-card-name-can-be-option.patch
-patches.renesas/0179-ASoC-simple-card-Fix-the-reference-count-of-device-n.patch
-patches.renesas/0180-ASoC-simple-card-Simplify-code.patch
-patches.renesas/0181-ASoC-simple-card-overwrite-cpu_dai-fmt-with-codec_da.patch
-patches.renesas/0182-ASoC-simple-card-dynamically-allocate-the-DAI-link-a.patch
-patches.renesas/0183-ASoC-simple-card-Add-DT-documentation-for-multi-DAI-.patch
-patches.renesas/0184-ASoC-simple-card-Handle-many-DAI-links.patch
-patches.renesas/0185-spi-delete-non-required-instances-of-include-linux-i.patch
-patches.renesas/0186-spi-sh-msiof-Fix-SPI-bus-population-from-DT.patch
-patches.renesas/0187-spi-sh-msiof-Typo-in-comment-s-tx-rx.patch
-patches.renesas/0188-spi-sh-msiof-Change-hz-from-unsigned-long-to-u32.patch
-patches.renesas/0189-spi-sh-msiof-Add-more-register-documentation.patch
-patches.renesas/0190-spi-sh-msiof-Use-the-core-cs_gpio-field-and-make-it-.patch
-patches.renesas/0191-spi-sh-msiof-Improve-bindings.patch
-patches.renesas/0192-spi-sh-msiof-Move-default-FIFO-sizes-to-device-ID-da.patch
-patches.renesas/0193-spi-sh-msiof-Add-support-for-R-Car-H2-and-M2.patch
-patches.renesas/0194-spi-sh-msiof-Move-clock-management-to-un-prepare_mes.patch
-patches.renesas/0195-spi-sh-msiof-Convert-to-let-spi-core-validate-xfer-b.patch
-patches.renesas/0196-spi-sh-msiof-Use-core-message-handling-instead-of-sp.patch
-patches.renesas/0197-spi-sh-msiof-Kill-sh_msiof_spi_bits-and-sh_msiof_spi.patch
-patches.renesas/0198-spi-sh-msiof-Remove-renesas-msiof-sh7724-from-bindin.patch
-patches.renesas/0199-spi-sh-msiof-Convert-to-spi-core-auto_runtime_pm-fra.patch
-patches.renesas/0200-ARM-shmobile-dts-Remove-r8a7791-koelsch-reference.dt.patch
-patches.renesas/0201-ARM-shmobile-Add-GPIO-keys-to-Koelsch-DTS.patch
-patches.renesas/0202-ARM-shmobile-koelsch-1-1-GiB-memory-in-DT.patch
-patches.renesas/0203-ARM-shmobile-r8a7791-Add-thermal-clock-in-device-tre.patch
-patches.renesas/0204-ARM-shmobile-r8a7790-Add-thermal-clock-in-device-tre.patch
-patches.renesas/0205-ARM-shmobile-r8a7791-Add-serial-ports-to-the-device-.patch
-patches.renesas/0206-ARM-shmobile-r8a7790-Add-serial-ports-to-the-device-.patch
-patches.renesas/0207-ARM-shmobile-r8a7790-Add-VIN-clocks-to-device-tree.patch
-patches.renesas/0208-ARM-shmobile-r8a7791-Add-VIN-clocks-to-device-tree.patch
-patches.renesas/0209-ARM-shmobile-r8a7790-Add-SATA-clocks-to-device-tree.patch
-patches.renesas/0210-ARM-shmobile-r8a7791-Add-SATA-clocks-to-device-tree.patch
-patches.renesas/0211-ARM-shmobile-r8a7791-Add-SATA-nodes-to-r8a7791.dtsi.patch
-patches.renesas/0212-ARM-shmobile-koelsch-Enable-SATA0-in-r8a7791-koelsch.patch
-patches.renesas/0213-ARM-shmobile-r8a7790-Add-SATA-nodes-to-r8a7790.dtsi.patch
-patches.renesas/0214-ARM-shmobile-lager-Enable-SATA1-in-r8a7790-lager.dts.patch
-patches.renesas/0215-ARM-shmobile-r8a7790-Fix-serial-ports-DT-compatible-.patch
-patches.renesas/0216-ARM-shmobile-r8a7790-Replace-IRQ-type-numerical-valu.patch
-patches.renesas/0217-ARM-shmobile-Lager-conditionally-select-CONFIG_MICRE.patch
-patches.renesas/0218-ARM-shmobile-bockw-use-SSI-DMAEngine-for-sound.patch
-patches.renesas/0219-ARM-shmobile-bockw-use-HPBIF-DMAEngine-for-sound.patch
-patches.renesas/0220-ARM-shmobile-bockw-add-USB-Func-DMAEngine-support.patch
-patches.renesas/0221-ARM-shmobile-koelsch-Conditionally-select-MICREL_PHY.patch
-patches.renesas/0222-ARM-mach-shmobile-kzm9g-add-zboot-support.patch
-patches.renesas/0223-ARM-shmobile-lager-Add-VIN1-SoC-camera-support.patch
-patches.renesas/0224-ARM-shmobile-kzm9d-Use-common-clock-framework.patch
-patches.renesas/0225-ARM-shmobile-lager-Make-spi_flash_data-const.patch
-patches.renesas/0226-ARM-shmobile-lager-Add-SATA-support.patch
-patches.renesas/0227-ARM-shmobile-koelsch-Add-SATA0-support.patch
-patches.renesas/0228-ARM-shmobile-ape6evm-Conditionally-select-SMSC_PHY.patch
-patches.renesas/0229-ARM-shmobile-armadillo800eva-Conditionally-select-SM.patch
-patches.renesas/0230-ARM-shmobile-bockw-Sort-Kconfig-node-s-selections.patch
-patches.renesas/0231-ARM-shmobile-r8a7779-Wait-for-status-on-selected-MST.patch
-patches.renesas/0232-ARM-shmobile-r8a7790-Wait-for-status-on-all-MSTP-clo.patch
-patches.renesas/0233-ARM-shmobile-r8a7791-Add-I2C-clocks.patch
-patches.renesas/0234-ARM-shmobile-r8a7791-Add-VIN-clocks.patch
-patches.renesas/0235-ARM-shmobile-Remove-duplicate-shmobile_invalidate_st.patch
-patches.renesas/0236-ARM-shmobile-r8a7779-Remove-unused-clock-constants.patch
-patches.renesas/0237-ARM-shmobile-emev2-Use-__initconst-for-const-init-de.patch
-patches.renesas/0238-ARM-shmobile-r8a7791-Wait-for-status-on-all-MSTP-clo.patch
-patches.renesas/0239-ARM-shmobile-r8a7790-add-Audio-DMAC-clock.patch
-patches.renesas/0240-ARM-shmobile-r8a7790-add-Audio-DMAC-support.patch
-patches.renesas/0241-ARM-shmobile-r8a7790-Add-VIN-clock-support.patch
-patches.renesas/0242-ARM-shmobile-r8a7790-Add-SATA-clocks.patch
-patches.renesas/0243-ARM-shmobile-r8a7791-Add-ZS-clock.patch
-patches.renesas/0244-ARM-shmobile-r8a7791-Add-SATA-clocks.patch
-patches.renesas/0245-ARM-shmobile-r7s72100-really-add-i2c-clocks.patch
-patches.renesas/0246-ARM-shmobile-r8a7790-Add-PCI-USB-host-clock-support.patch
-patches.renesas/0247-ARM-shmobile-lager-Enable-VIN-along-with-ADV7180-dec.patch
-patches.renesas/0248-ARM-shmobile-koelsch-Enable-SATA-in-defconfig.patch
-patches.renesas/0249-ARM-shmobile-koelsch-Enable-DEVTMPFS_MOUNT-in-defcon.patch
-patches.renesas/0250-ARM-shmobile-lager-Enable-SATA-in-defconfig.patch
-patches.renesas/0251-ARM-shmobile-marzen-enable-CONFIG_DEVTMPFS-in-defcon.patch
-patches.renesas/0252-ARM-shmobile-mackerel-enable-CONFIG_DEVTMPFS-in-defc.patch
-patches.renesas/0253-ARM-shmobile-lager-enable-CONFIG_DEVTMPFS-in-defconf.patch
-patches.renesas/0254-ARM-shmobile-kzm9g-enable-CONFIG_DEVTMPFS-in-defconf.patch
-patches.renesas/0255-ARM-shmobile-kzm9d-enable-CONFIG_DEVTMPFS-in-defconf.patch
-patches.renesas/0256-ARM-shmobile-genmai-enable-CONFIG_DEVTMPFS-in-defcon.patch
-patches.renesas/0257-ARM-shmobile-bockw-enable-CONFIG_DEVTMPFS-in-defconf.patch
-patches.renesas/0258-ARM-shmobile-armadillo-enable-CONFIG_DEVTMPFS-in-def.patch
-patches.renesas/0259-ARM-shmobile-ape6evm-enable-CONFIG_DEVTMPFS-in-defco.patch
-patches.renesas/0260-ARM-shmobile-kzm9d-Conditionally-select-SMSC_PHY.patch
-patches.renesas/0261-ARM-shmobile-mackerel-Conditionally-select-SMSC_PHY.patch
-patches.renesas/0262-ARM-shmobile-marzen-Conditionally-select-SMSC_PHY.patch
-patches.renesas/0263-ARM-shmobile-lager-fix-error-return-code-check-from-.patch
-patches.renesas/0264-ARM-shmobile-koelsch-fix-error-return-code-check-fro.patch
-patches.renesas/0265-ARM-shmobile-lager-Add-USBHS-support.patch
-patches.renesas/0266-ARM-shmobile-Remove-Lager-USBHS-UDC-ifdefs.patch
-patches.renesas/0267-ARM-shmobile-Lager-pass-Ether-PHY-IRQ.patch
-patches.renesas/0268-ARM-shmobile-Koelsch-pass-Ether-PHY-IRQ.patch
-patches.renesas/0269-ARM-shmobile-koelsch-Add-I2C-support.patch
-patches.renesas/0270-ARM-shmobile-koelsch-Enable-I2C-in-defconfig.patch
-patches.renesas/0271-ARM-shmobile-bockw-use-wp-gpios-instead-of-WP-pin.patch
-patches.renesas/0272-ARM-shmobile-Lager-USB0-cable-detection-workaround.patch
-patches.renesas/0273-ARM-shmobile-lager-add-sound-support.patch
-patches.renesas/0274-ARM-shmobile-lager-add-sound-support-on-defconfig.patch
-patches.renesas/0275-Revert-ARM-shmobile-marzen-Conditionally-select-SMSC.patch
-patches.renesas/0276-ARM-shmobile-genmai-legacy-Add-RSPI-support.patch
-patches.renesas/0277-ARM-shmobile-r7s72100-dtsi-Add-RSPI-nodes.patch
-patches.renesas/0278-ARM-shmobile-koelsch-legacy-Add-QSPI-support.patch
-patches.renesas/0279-ARM-shmobile-r8a7791-dtsi-Add-QSPI-node.patch
-patches.renesas/0280-ARM-shmobile-koelsch-dts-Add-QSPI-nodes.patch
-patches.renesas/0281-ARM-shmobile-lager-legacy-Switch-QSPI-to-named-IRQs.patch
-patches.renesas/0282-ARM-shmobile-koelsch-defconfig-Enable-RSPI-and-MTD_M.patch
-patches.renesas/0283-ARM-shmobile-genmai-defconfig-Enable-RSPI.patch
-patches.renesas/0284-ARM-shmobile-genmai-Enable-r7s72100-ether.patch
-patches.renesas/0285-ARM-shmobile-Add-SDHI-devices-for-legacy-Koelsch.patch
-patches.renesas/0286-ARM-shmobile-lager-add-SDHI0-2-support.patch
-patches.renesas/0287-ARM-shmobile-lager-legacy-Add-QSPI-pinmux.patch
-patches.renesas/0288-ARM-shmobile-r8a7790-dtsi-Add-QSPI-node.patch
-patches.renesas/0289-ARM-shmobile-lager-dts-Add-QSPI-nodes.patch
-patches.renesas/0290-ARM-shmobile-lager-defconfig-Enable-RSPI-and-MTD_M25.patch
-patches.renesas/0291-ARM-shmobile-lager-add-SDHI0-2-support-on-DTS.patch
-patches.renesas/0292-ARM-shmobile-r8a7778-dtsi-Remove-duplicate-i2c-nodes.patch
-patches.renesas/0293-ARM-shmobile-Add-defconfig-for-shmobile-multiplatfor.patch
-patches.renesas/0294-ARM-shmobile-lager-Add-internal-USB-PCI-support.patch
-patches.renesas/0295-ARM-shmobile-lager-reference-Refactor-clock-lookup-h.patch
-patches.renesas/0296-ARM-shmobile-lager-Add-DU-device-to-DTS.patch
-patches.renesas/0297-ARM-shmobile-lager-reference-Add-DU-device.patch
-patches.renesas/0298-ARM-shmobile-koelsch-reference-Refactor-clock-lookup.patch
-patches.renesas/0299-ARM-shmobile-koelsch-reference-Add-DU-device.patch
-patches.renesas/0300-ARM-shmobile-koelsch-reference-Add-DU-device-to-DTS.patch
-patches.renesas/0301-ARM-shmobile-r8a7791-remove-superfluous-interrupt-pa.patch
-patches.renesas/0302-ARM-shmobile-r8a7790-remove-superfluous-interrupt-pa.patch
-patches.renesas/0303-ARM-shmobile-r8a7790-add-i2c-aliases-to-dtsi.patch
-patches.renesas/0304-ARM-shmobile-Armadillo-800-EVA-set-proper-DMA-masks-.patch
-patches.renesas/0305-ARM-shmobile-BOCK-W-set-proper-DMA-masks-for-Ether-d.patch
-patches.renesas/0306-ARM-shmobile-Lager-set-proper-DMA-masks-for-Ether-de.patch
-patches.renesas/0307-ARM-shmobile-Koelsch-set-proper-DMA-masks-for-Ether-.patch
-patches.renesas/0308-ARM-shmobile-Genmai-set-proper-DMA-masks-for-Ether-d.patch
-patches.renesas/0309-ARM-shmobile-Get-rid-of-legacy-KZM9D-defconfig.patch
-patches.renesas/0310-ARM-shmobile-koelsch-Enable-SDHI-GPIO-and-regulators.patch
-patches.renesas/0311-ARM-shmobile-Remove-KZM9D-board-code.patch
-patches.renesas/0312-ARM-shmobile-Remove-Koelsch-DT-reference-legacy-cloc.patch
-patches.renesas/0313-ARM-shmobile-Remove-Lager-DT-reference-legacy-clock-.patch
-patches.renesas/0314-ARM-shmobile-r8a7791-add-i2c-master-nodes-to-dtsi.patch
-patches.renesas/0315-ARM-shmobile-r8a7791-add-i2c2-bus-to-koelsch-dt.patch
-patches.renesas/0316-ARM-shmobile-r7s72100-add-nodes-for-i2c-controllers-.patch
-patches.renesas/0317-ARM-shmobile-genmai-adapt-dts-to-use-native-i2c-driv.patch
-patches.renesas/0318-ARM-shmobile-r7s72100-update-defconfig-for-I2C-usage.patch
-patches.renesas/0319-usb-host-remove-selects-of-USB_ARCH_HAS_-HCI.patch
-patches.renesas/0320-ARM-centralize-common-multi-platform-kconfig-options.patch
-patches.renesas/0321-ARM-select-HAVE_SMP-for-V7-multi-platform.patch
-patches.renesas/0322-ARM-select-MIGHT_HAVE_CACHE_L2X0-for-V6-and-V7-multi.patch
-patches.renesas/0323-ARM-shmobile-r8a7778-add-audio-clock-in-new-style.patch
-patches.renesas/0324-ARM-shmobile-r8a7790-add-audio-clock.patch
-patches.renesas/0325-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks.patch
-patches.renesas/0326-ARM-shmobile-r7s72100-clock-Add-RSPI-clocks-for-DT.patch
-patches.renesas/0327-ARM-shmobile-r8a7791-clock-add-QSPI-clocks.patch
-patches.renesas/0328-ARM-shmobile-r7s72100-Add-clock-for-r7s72100-ether.patch
-patches.renesas/0329-ARM-shmobile-Add-r8a7791-legacy-SDHI-clocks.patch
-patches.renesas/0330-ARM-shmobile-Remove-legacy-r8a7790-DT-clocks.patch
-patches.renesas/0331-ARM-shmobile-Use-64-bit-dma_addr_t-on-r8a7790-r8a779.patch
-patches.renesas/0332-ARM-shmobile-Break-out-R-Car-SYSC-PM-code.patch
-patches.renesas/0333-ARM-shmobile-r8a7790-SYSC-setup-code.patch
-patches.renesas/0334-ARM-shmobile-r8a7790-CA7-SCU-enablement.patch
-patches.renesas/0335-ARM-shmobile-r8a7790-CA15-SCU-enablement.patch
-patches.renesas/0336-ARM-shmobile-Remove-__init-from-rcar_gen2_read_mode_.patch
-patches.renesas/0337-ARM-shmobile-r8a7791-Remove-legacy-clock-aliases-for.patch
-patches.renesas/0338-ARM-shmobile-r8a7790-add-sound-SCU-clock-support.patch
-patches.renesas/0339-ARM-shmobile-r8a7790-add-Ether-DT-support.patch
-patches.renesas/0340-ARM-shmobile-lager-add-Ether-DT-support.patch
-patches.renesas/0341-ARM-shmobile-r8a7791-add-Ether-DT-support.patch
-patches.renesas/0342-ARM-shmobile-koelsch-add-Ether-DT-support.patch
-patches.renesas/0343-ARM-shmobile-r8a7791-fix-clock-index-for-i2c5.patch
-patches.renesas/0344-ARM-shmobile-r8a7791-dtsi-Fix-typo-in-msiof2-clock-o.patch
-patches.renesas/0345-ARM-shmobile-Move-SYSC-base-variable-to-inside-ifdef.patch
-patches.renesas/0346-ARM-shmobile-Add-SDHI-devices-to-r8a7791-DTSI.patch
-patches.renesas/0347-ARM-shmobile-Add-SDHI-devices-for-Koelsch-DTS.patch
-patches.renesas/0348-ARM-shmobile-APMU-Fix-warnings-due-to-improper-print.patch
-patches.renesas/0349-ARM-shmobile-r7s72100-fix-bus-clock-calculation.patch
-patches.renesas/0350-ARM-shmobile-Remove-CMT-TMU-and-STI-Kconfig-entries.patch
-patches.renesas/0351-ARM-shmobile-r8a7791-Fix-SCIFA3-5-clocks.patch
-patches.renesas/0352-ASoC-fsi-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
-patches.renesas/0353-ASoC-fsi-fixup-compile-error-for-simple-card.patch
-patches.renesas/0354-ARM-bockw-fixup-SND_SOC_DAIFMT_CBx_CFx-flags.patch
-patches.renesas/0355-Kconfig-rename-HAS_IOPORT-to-HAS_IOPORT_MAP.patch
-patches.renesas/0356-ARM-shmobile-lager-correct-renesas-gpios-to-renesas-.patch
-patches.renesas/0357-ARM-shmobile-lager-fixup-SND_SOC_DAIFMT_CBx_CFx-flag.patch
-patches.renesas/0358-ARM-shmobile-armadillo800eva-fixup-SND_SOC_DAIFMT_CB.patch
-patches.renesas/0359-ARM-shmobile-r8a7778-Use-clks-as-MSTP007-parent.patch
-patches.renesas/0360-ARM-shmobile-sh73a0-drop-address-cells-from-GIC-node.patch
-patches.renesas/0361-ARM-shmobile-r8a7740-drop-address-cells-from-GIC-nod.patch
-patches.renesas/0362-ARM-shmobile-koelsch-correct-renesas-gpios-to-renesa.patch
-patches.renesas/0363-xhci-platform-Change-compatible-string-from-xhci-pla.patch
-patches.renesas/0364-ASoC-rcar-subnode-tidyup-for-renesas-rsnd.txt.patch
-patches.renesas/0365-ARM-shmobile-r8a7790-Correct-SYS-DMAC-clock-defines.patch
-patches.renesas/0366-media-v4l-vsp1-Remove-unexisting-rt-clocks.patch
-patches.renesas/0367-media-v4l-vsp1-uds-Enable-scaling-of-alpha-layer.patch
-patches.renesas/0368-media-v4l-vsp1-Support-multi-input-entities.patch
-patches.renesas/0369-media-v4l-vsp1-Add-BRU-support.patch
-patches.renesas/0370-media-v4l-vsp1-Add-DT-support.patch
-patches.renesas/0371-ASoC-ak4642-Add-ALC-controls.patch
-patches.renesas/0372-ASoC-ak4642-Add-driver-data-and-driver-private-struc.patch
-patches.renesas/0373-ASoC-ak4642-Add-support-for-extended-sysclk-frequenc.patch
-patches.renesas/0374-gpio-rcar-Add-optional-functional-clock-to-bindings.patch
-patches.renesas/0375-gpio-rcar-Add-minimal-runtime-PM-support.patch
-patches.renesas/0376-gpio-rcar-remove-unnecessary-OOM-messages.patch
-patches.renesas/0377-i2c-rcar-add-compatibles-for-additional-SoC.patch
-patches.renesas/0378-i2c-rcar-not-everything-needs-to-be-a-function.patch
-patches.renesas/0379-i2c-rcar-no-need-to-store-irq-number.patch
-patches.renesas/0380-i2c-rcar-refactor-bus-state-machine.patch
-patches.renesas/0381-i2c-rcar-refactor-irq-state-machine.patch
-patches.renesas/0382-i2c-rcar-check-bus-free-before-first-message.patch
-patches.renesas/0383-i2c-rcar-refactor-setting-up-msg.patch
-patches.renesas/0384-i2c-rcar-refactor-status-bit-handling.patch
-patches.renesas/0385-i2c-rcar-remove-spinlock.patch
-patches.renesas/0386-i2c-rcar-reuse-status-bits-as-enable-bits.patch
-patches.renesas/0387-i2c-rcar-janitorial-cleanup-after-refactoring.patch
-patches.renesas/0388-i2c-rcar-update-copyright-and-license-information.patch
-patches.renesas/0389-i2c-remove-unnecessary-OOM-messages.patch
-patches.renesas/0390-i2c-sh_mobile-replace-magic-hex-values-with-constant.patch
-patches.renesas/0391-i2c-sh_mobile-improve-error-handling.patch
-patches.renesas/0392-i2c-sh_mobile-honor-DT-bus-speed-settings.patch
-patches.renesas/0393-i2c-sh_mobile-devm-conversion-low-hanging-fruits.patch
-patches.renesas/0394-i2c-sh_mobile-devm-conversion-irq-setup.patch
-patches.renesas/0395-i2c-sh_mobile-remove-superfluous-offset-parameter.patch
-patches.renesas/0396-i2c-sh_mobile-bail-out-on-errors-when-initializing.patch
-patches.renesas/0397-i2c-sh_mobile-check-timing-parameters-for-valid-rang.patch
-patches.renesas/0398-i2c-sh_mobile-fix-clock-calculation-for-newer-SoCs.patch
-patches.renesas/0399-i2c-sh_mobile-add-compatibles-for-additional-SoC.patch
-patches.renesas/0400-pinctrl-allows-not-to-define-the-get_group_pins-oper.patch
-patches.renesas/0401-pinctrl-pinconf-generic-Use-kmemdup-instead-of-kmall.patch
-patches.renesas/0402-pinctrl-Enable-power-source-to-be-extracted-from-DT-.patch
-patches.renesas/0403-thermal-rcar-Use-pm_runtime_put-i.s.o.-pm_runtime_pu.patch
-patches.renesas/0404-thermal-rcar-remove-unnecessary-OOM-messages.patch
-patches.renesas/0405-ata-use-CONFIG_PM_SLEEP-instead-of-CONFIG_PM-where-a.patch
-patches.renesas/0406-clocksource-sh_cmt-Use-request_irq-instead-of-setup_.patch
-patches.renesas/0407-clocksource-sh_cmt-Split-channel-fields-from-sh_cmt_.patch
-patches.renesas/0408-clocksource-sh_cmt-Rename-struct-sh_cmt_priv-to-sh_c.patch
-patches.renesas/0409-clocksource-sh_cmt-Split-channel-setup-to-separate-f.patch
-patches.renesas/0410-clocksource-sh_cmt-Constify-name-argument-to-sh_cmt_.patch
-patches.renesas/0411-clocksource-sh_cmt-Rename-mapbase-mapbase_str-to-map.patch
-patches.renesas/0412-clocksource-sh_cmt-Add-memory-base-to-sh_cmt_channel.patch
-patches.renesas/0413-clocksource-sh_cmt-Add-index-to-struct-sh_cmt_channe.patch
-patches.renesas/0414-clocksource-sh_cmt-Replace-kmalloc-memset-with-kzall.patch
-patches.renesas/0415-clocksource-sh_cmt-Allocate-channels-dynamically.patch
-patches.renesas/0416-clocksource-sh_cmt-Split-static-information-from-sh_.patch
-patches.renesas/0417-clocksource-sh_cmt-Replace-hardcoded-register-values.patch
-patches.renesas/0418-clocksource-sh_cmt-Set-cpumask-to-cpu_possible_mask.patch
-patches.renesas/0419-clocksource-sh_cmt-Hardcode-CMT-clock-event-rating-t.patch
-patches.renesas/0420-clocksource-sh_cmt-Hardcode-CMT-clock-source-rating-.patch
-patches.renesas/0421-clocksource-sh_cmt-Add-support-for-multiple-channels.patch
-patches.renesas/0422-clocksource-sh_cmt-Rename-clock-to-fck-in-the-non-le.patch
-patches.renesas/0423-clocksource-sh_cmt-Remove-FSF-mail-address-from-GPL-.patch
-patches.renesas/0424-clocksource-sh_cmt-Sort-headers-alphabetically.patch
-patches.renesas/0425-clocksource-sh_cmt-Request-IRQ-for-clock-event-devic.patch
-patches.renesas/0426-clocksource-sh_cmt-Remove-unnecessary-OOM-messages.patch
-patches.renesas/0427-clocksource-sh_mtu2-Use-request_irq-instead-of-setup.patch
-patches.renesas/0428-clocksource-sh_mtu2-Turn-sh_mtu2_priv-fields-into-lo.patch
-patches.renesas/0429-clocksource-sh_mtu2-Split-channel-fields-from-sh_mtu.patch
-patches.renesas/0430-clocksource-sh_mtu2-Rename-struct-sh_mtu2_priv-to-sh.patch
-patches.renesas/0431-clocksource-sh_mtu2-Split-channel-setup-to-separate-.patch
-patches.renesas/0432-clocksource-sh_mtu2-Constify-name-argument-to-sh_mtu.patch
-patches.renesas/0433-clocksource-sh_mtu2-Add-memory-base-to-sh_mtu2_chann.patch
-patches.renesas/0434-clocksource-sh_mtu2-Add-index-to-struct-sh_mtu2_chan.patch
-patches.renesas/0435-clocksource-sh_mtu2-Replace-kmalloc-memset-with-kzal.patch
-patches.renesas/0436-clocksource-sh_mtu2-Allocate-channels-dynamically.patch
-patches.renesas/0437-clocksource-sh_mtu2-Replace-hardcoded-register-value.patch
-patches.renesas/0438-clocksource-sh_mtu2-Set-cpumask-to-cpu_possible_mask.patch
-patches.renesas/0439-clocksource-sh_mtu2-Hardcode-MTU2-clock-event-rating.patch
-patches.renesas/0440-clocksource-sh_mtu2-Add-support-for-multiple-channel.patch
-patches.renesas/0441-clocksource-sh_mtu2-Rename-clock-to-fck-in-the-non-l.patch
-patches.renesas/0442-clocksource-sh_mtu2-Remove-FSF-mail-address-from-GPL.patch
-patches.renesas/0443-clocksource-sh_mtu2-Sort-headers-alphabetically.patch
-patches.renesas/0444-clocksource-sh_mtu2-Remove-unnecessary-OOM-messages.patch
-patches.renesas/0445-pinctrl-sh-pfc-r8a7791-Split-the-DU-sync-and-cde-dis.patch
-patches.renesas/0446-sh-pfc-r8a7791-Add-SSI-pin-support.patch
-patches.renesas/0447-sh-pfc-r8a7791-Add-Audio-pin-support.patch
-patches.renesas/0448-pinctrl-pfc-r8a7790-add-i2c0-muxing.patch
-patches.renesas/0449-pinctrl-pfc-r8a7790-add-mux-data-for-IIC-B-cores.patch
-patches.renesas/0450-pinctrl-sh-pfc-Don-t-set-the-pinmux_irq-irq-field-fo.patch
-patches.renesas/0451-pinctrl-sh-pfc-r8a7740-Allow-Multiplatform-Build.patch
-patches.renesas/0452-pinctrl-sh-pfc-sh73a0-Allow-Multiplatform-Build.patch
-patches.renesas/0453-pinctrl-sh-pfc-r8a73a4-Allow-Multiplatform-Build.patch
-patches.renesas/0454-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch
-patches.renesas/0455-Revert-serial-sh-sci-Add-device-tree-support-for-r8a.patch
-patches.renesas/0456-serial-sh-sci-Add-device-tree-support-for-r8a7779.patch
-patches.renesas/0457-mmc-clarify-DDR-timing-mode-between-SD-UHS-and-eMMC.patch
-patches.renesas/0458-mmc-sh_mmcif-clarify-DDR-timing-mode-between-SD-UHS-.patch
-patches.renesas/0459-cpufreq-Introduce-macros-for-cpufreq_frequency_table.patch
-patches.renesas/0460-cpufreq-Fix-build-error-on-some-platforms-that-use-c.patch
-patches.renesas/0461-sh-clk-Use-cpufreq_for_each_valid_entry-macro-for-it.patch
-patches.renesas/0462-sh-intc-Remove-pointless-irq_reserve_irqs-invocation.patch
-patches.renesas/0463-drivers-sh-pm_runtime-does-not-need-idle-callback.patch
-patches.renesas/0464-drivers-sh-Restrict-INTC_USERIMASK-to-SH4A.patch
-patches.renesas/0465-drivers-sh-pm_runtime-implementation-needs-to-suspen.patch
-patches.renesas/0466-drivers-sh-Enable-PM-runtime-for-new-R-Car-Gen2-SoCs.patch
-patches.renesas/0467-spi-rspi-Round-up-division-to-avoid-slave-overclocki.patch
-patches.renesas/0468-spi-rspi-Extract-rspi_wait_for_-tx_empty-rx_full.patch
-patches.renesas/0469-spi-rspi-Do-not-call-rspi_receive_init-for-TX-only.patch
-patches.renesas/0470-spi-rspi-Remove-unused-16-bit-DMA-support.patch
-patches.renesas/0471-spi-rspi-Use-core-SPI_MASTER_MUST_-RT-X-handling.patch
-patches.renesas/0472-spi-rspi-Extract-rspi_pio_transfer.patch
-patches.renesas/0473-spi-rspi-Don-t-consider-DMA-configuration-failures-f.patch
-patches.renesas/0474-spi-rspi-Extract-rspi_request_dma_chan.patch
-patches.renesas/0475-spi-rspi-Remove-unneeded-resource-test-in-DMA-setup.patch
-patches.renesas/0476-spi-rspi-SPI-DMA-core-needs-both-RX-and-TX-DMA-to-fu.patch
-patches.renesas/0477-spi-rspi-Use-SPI-core-DMA-mapping-framework.patch
-patches.renesas/0478-spi-rspi-Move-RSPI-specific-setup-out-of-DMA-routine.patch
-patches.renesas/0479-spi-rspi-Pass-sg_tables-instead-of-spi_tranfer-to-rs.patch
-patches.renesas/0480-spi-rspi-Merge-rspi_-_dma-into-rspi_dma_transfer.patch
-patches.renesas/0481-spi-rspi-Absorb-rspi_rz_transfer_out_in-into-rspi_rz.patch
-patches.renesas/0482-spi-rspi-Add-DMA-support-for-QSPI-on-R-Car-Gen2.patch
-patches.renesas/0483-spi-rspi-Add-DMA-support-for-RSPI-on-RZ-A1H.patch
-patches.renesas/0484-spi-rspi-Extract-rspi_common_transfer.patch
-patches.renesas/0485-ASoC-ak4642-Fix-typo-zoro-zero.patch
-patches.renesas/0486-pwm-add-period-and-polarity-to-struct-pwm_lookup.patch
-patches.renesas/0487-usb-renesas-gadget-fixup-complete-STATUS-stage-after.patch
-patches.renesas/0488-sh_eth-replace-devm_kzalloc-with-devm_kmalloc_array.patch
-patches.renesas/0489-net-sh_eth-Fix-receive-packet-exceeded-condition-in-.patch
-patches.renesas/0490-net-sh_eth-Fix-timing-of-RACT-setting-in-sh_eth_rx.patch
-patches.renesas/0491-PCI-rcar-Add-Renesas-R-Car-PCIe-driver.patch
-patches.renesas/0492-PCI-rcar-Add-MSI-support-for-PCIe.patch
-patches.renesas/0493-PCI-rcar-Add-R-Car-PCIe-device-tree-bindings.patch
-patches.renesas/0494-DMA-shdma-add-cyclic-transfer-support.patch
-patches.renesas/0495-ARM-shmobile-armadillo-initialize-all-struct-pwm_loo.patch
-patches.renesas/0496-ARM-OMAP3-Beagle-initialize-all-the-struct-pwm_looku.patch
-patches.renesas/0497-ARM-pxa-hx4700-initialize-all-the-struct-pwm_lookup-.patch
-patches.renesas/0498-pwm-modify-PWM_LOOKUP-to-initialize-all-struct-pwm_l.patch
-patches.renesas/0499-ARM-OMAP3-Beagle-use-PWM_LOOKUP-to-initialize-struct.patch
-patches.renesas/0500-ARM-shmobile-armadillo-use-PWM_LOOKUP-to-initialize-.patch
-patches.renesas/0501-ARM-pxa-hx4700-use-PWM_LOOKUP-to-initialize-struct-p.patch
-patches.renesas/0502-ASoC-core-Update-snd_soc_of_parse_daifmt-interface.patch
-patches.renesas/0503-ASoC-simple-card-Move-dai-link-level-properties-away.patch
-patches.renesas/0504-ASoC-simple-card-Drop-node-name-checking.patch
-patches.renesas/0505-ASoC-simple-card-Simplify-error-msg-in-simple_card_d.patch
-patches.renesas/0506-ASoC-simple-card-Improve-coding-style.patch
-patches.renesas/0507-ASoC-simple-card-is_top_level_node-parameter-to-simp.patch
-patches.renesas/0508-ASoC-simple-card-Support-setting-mclk-via-a-fixed-fa.patch
-patches.renesas/0509-serial-sh-sci-Add-device-tree-support-for-r8a7-778-7.patch
-patches.renesas/0510-clocksource-sh_tmu-Use-request_irq-instead-of-setup_.patch
-patches.renesas/0511-clocksource-sh_tmu-Split-channel-fields-from-sh_tmu_.patch
-patches.renesas/0512-clocksource-sh_tmu-Rename-struct-sh_tmu_priv-to-sh_t.patch
-patches.renesas/0513-clocksource-sh_tmu-Split-channel-setup-to-separate-f.patch
-patches.renesas/0514-clocksource-sh_tmu-Constify-name-argument-to-sh_tmu_.patch
-patches.renesas/0515-clocksource-sh_tmu-Add-memory-base-to-sh_tmu_channel.patch
-patches.renesas/0516-clocksource-sh_tmu-Add-index-to-struct-sh_tmu_channe.patch
-patches.renesas/0517-clocksource-sh_tmu-Replace-kmalloc-memset-with-kzall.patch
-patches.renesas/0518-clocksource-sh_tmu-Allocate-channels-dynamically.patch
-patches.renesas/0519-clocksource-sh_tmu-Replace-hardcoded-register-values.patch
-patches.renesas/0520-clocksource-sh_tmu-Hardcode-TMU-clock-event-and-sour.patch
-patches.renesas/0521-clocksource-sh_tmu-Add-support-for-multiple-channels.patch
-patches.renesas/0522-clocksource-sh_tmu-Rename-clock-to-fck-in-the-non-le.patch
-patches.renesas/0523-clocksource-sh_tmu-Remove-FSF-mail-address-from-GPL-.patch
-patches.renesas/0524-clocksource-sh_tmu-Sort-headers-alphabetically.patch
-patches.renesas/0525-clocksource-sh_tmu-Fix-channel-IRQ-retrieval-in-lega.patch
-patches.renesas/0526-clocksource-sh_tmu-Remove-unnecessary-OOM-messages.patch
-patches.renesas/0527-spi-sh-msiof-remove-unnecessary-OOM-messages.patch
-patches.renesas/0528-media-v4l-vsp1-Add-DT-bindings-documentation.patch
-patches.renesas/0529-usb-host-xhci-plat-sort-the-headers-in-alphabetic-or.patch
-patches.renesas/0530-usb-host-xhci-plat-add-clock-support.patch
-patches.renesas/0531-usb-host-xhci-plat-add-support-for-the-Armada-375-38.patch
-patches.renesas/0532-usb-xhci-avoid-warning-for-PM_SLEEP.patch
-patches.renesas/0533-usb-host-xhci-plat-add-xhci_plat_start.patch
-patches.renesas/0534-drm-rcar-du-Add-run-time-dependencies.patch
-patches.renesas/0535-gpio-rcar-Add-support-for-DT-IRQ-flags.patch
-patches.renesas/0536-dmaengine-shdma-Enable-driver-compilation-with-COMPI.patch
-patches.renesas/0537-ARM-shmobile-r8a7790-Rename-VSP1_-SY-RT-clocks-to-VS.patch
-patches.renesas/0538-ARM-shmobile-r8a7791-Rename-VSP1_SY-clocks-to-VSP1_S.patch
-patches.renesas/0539-ARM-shmobile-r8a7791-add-IIC0-1-clock-macros.patch
-patches.renesas/0540-ARM-shmobile-r8a7791-Add-EHCI-MSTP-clock.patch
-patches.renesas/0541-ARM-shmobile-r8a7790-add-IIC0-2-clock-macros.patch
-patches.renesas/0542-ARM-shmobile-r8a7791-Correct-SYS-DMAC-clock-defines.patch
-patches.renesas/0543-clk-shmobile-r8a7779-Add-clocks-support.patch
-patches.renesas/0544-clk-shmobile-r8a7779-Add-MSTP-clock-support.patch
-patches.renesas/0545-ARM-shmobile-r7s72100-document-MSTP-clock-support.patch
-patches.renesas/0546-clk-shmobile-mstp-Fix-the-is_enabled-operation.patch
-patches.renesas/0547-clk-shmobile-Add-R8A7740-specific-clock-support.patch
-patches.renesas/0548-ARM-shmobile-armadillo800eva-Spelling-and-grammar.patch
-patches.renesas/0549-ARM-shmobile-multiplatform-Enable-MSIOF-in-defconfig.patch
-patches.renesas/0550-ARM-shmobile-Include-i2c-shmobile.c-in-shmobile_defc.patch
-patches.renesas/0551-ARM-shmobile-Include-at24.c-in-shmobile_defconfig.patch
-patches.renesas/0552-ARM-shmobile-Enable-USBHS-gadget-support-in-shmobile.patch
-patches.renesas/0553-ARM-shmobile-Enable-HIGHMEM-in-shmobile_defconfig.patch
-patches.renesas/0554-ARM-shmobile-Enable-VSP1-in-shmobile_defconfig.patch
-patches.renesas/0555-ARM-shmobile-Enable-USB-EO-HCI-HCD-support-in-shmobi.patch
-patches.renesas/0556-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-C.patch
-patches.renesas/0557-ARM-shmobile-Add-shared-shmobile_init_delay.patch
-patches.renesas/0558-ARM-shmobile-Remove-legacy-EMEV2-SoC-support.patch
-patches.renesas/0559-ARM-shmobile-Remove-EMEV2-header-file.patch
-patches.renesas/0560-ARM-shmobile-Make-use-of-r8a7790_add_standard_device.patch
-patches.renesas/0561-ARM-shmobile-rcar-gen2-Cache-Mode-Monitor-Register-V.patch
-patches.renesas/0562-ARM-shmobile-Check-r8a7791-MD21-at-SMP-boot.patch
-patches.renesas/0563-ARM-shmobile-r8a7778-bockw-Move-select-RENESAS_INTC_.patch
-patches.renesas/0564-ARM-shmobile-r8a7791-Use-rcar_gen2_read_mode_pins-he.patch
-patches.renesas/0565-ARM-shmobile-Introduce-shmobile_clk_workaround.patch
-patches.renesas/0566-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-l.patch
-patches.renesas/0567-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-l.patch
-patches.renesas/0568-ARM-shmobile-Use-shmobile_clk_workaround-on-Lager.patch
-patches.renesas/0569-ARM-shmobile-Use-shmobile_clk_workaround-on-Koelsch.patch
-patches.renesas/0570-ARM-shmobile-koelsch-Annotate-clk_names-with-__initc.patch
-patches.renesas/0571-ARM-shmobile-lager-Annotate-clk_names-with-__initcon.patch
-patches.renesas/0572-ARM-shmobile-koelsch-reference-Work-around-core-cloc.patch
-patches.renesas/0573-ARM-shmobile-koelsch-reference-Annotate-clk_enables-.patch
-patches.renesas/0574-ARM-shmobile-lager-reference-Work-around-core-clock-.patch
-patches.renesas/0575-ARM-shmobile-Add-Lager-clock-workarounds-for-SDHI-an.patch
-patches.renesas/0576-ARM-shmobile-Add-Koelsch-clock-workarounds-for-SDHI.patch
-patches.renesas/0577-ARM-shmobile-Update-r8a7791-CPU-freq-to-1500MHz-in-D.patch
-patches.renesas/0578-ARM-shmobile-r8a7790-lager-dts-Rename-label-spi-to-q.patch
-patches.renesas/0579-ARM-shmobile-r8a7791-koelsch-dts-Rename-label-spi-to.patch
-patches.renesas/0580-ARM-shmobile-r8a7790-dtsi-Add-MSIOF-nodes-and-aliase.patch
-patches.renesas/0581-ARM-shmobile-r8a7791-dtsi-Add-MSIOF-nodes-and-aliase.patch
-patches.renesas/0582-ARM-shmobile-lager-dts-Add-MSIOF-nodes.patch
-patches.renesas/0583-ARM-shmobile-koelsch-dts-Add-MSIOF-nodes.patch
-patches.renesas/0584-ARM-shmobile-r8a7778-dtsi-Improve-and-correct-HSPI-n.patch
-patches.renesas/0585-ARM-shmobile-r8a7779-dtsi-Improve-and-correct-HSPI-n.patch
-patches.renesas/0586-ARM-shmobile-bockw-reference-dts-Add-SPI-FLASH.patch
-patches.renesas/0587-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-La.patch
-patches.renesas/0588-ARM-shmobile-Add-DTS-gpio-keys-support-for-SW2-on-Ko.patch
-patches.renesas/0589-ARM-shmobile-lager-Set-ethernet-PHY-LED-mode.patch
-patches.renesas/0590-ARM-shmobile-koelsch-Set-ethernet-PHY-LED-mode.patch
-patches.renesas/0591-ARM-shmobile-armadillo-reference-dts-Use-KEY_-macros.patch
-patches.renesas/0592-ARM-shmobile-kzm9g-reference-dts-Use-KEY_-macros-for.patch
-patches.renesas/0593-ARM-shmobile-r8a7791-add-IIC-B-clocks-to-dtsi.patch
-patches.renesas/0594-ARM-shmobile-r8a7791-add-IIC-B-cores-to-dtsi.patch
-patches.renesas/0595-ARM-shmobile-koelsch-make-i2c2-pfc-node-unique.patch
-patches.renesas/0596-ARM-shmobile-koelsch-activate-i2c6-bus.patch
-patches.renesas/0597-ARM-shmobile-Use-r8a7740-suffix-for-i2c-mmcif-fsi2-c.patch
-patches.renesas/0598-ARM-shmobile-armadillo-reference-dts-enable-RTC.patch
-patches.renesas/0599-ARM-shmobile-lager-Correct-setting-of-ethernet-PHY-L.patch
-patches.renesas/0600-ARM-shmobile-r8a7790-Fix-the-I2C-clocks-parents-in-D.patch
-patches.renesas/0601-ARM-shmobile-r8a7791-Fix-the-I2C-clocks-parents-in-D.patch
-patches.renesas/0602-ARM-shmobile-r8a7790-add-IIC-B-clocks-to-dtsi.patch
-patches.renesas/0603-ARM-shmobile-r8a7790-add-IIC-B-cores-to-dtsi.patch
-patches.renesas/0604-ARM-shmobile-r8a7778-remove-old-style-audio-clock.patch
-patches.renesas/0605-ARM-shmobile-r8a7790-remove-old-style-audio-clock.patch
-patches.renesas/0606-ARM-shmobile-bockw-remove-old-style-audio-clock.patch
-patches.renesas/0607-ARM-shmobile-bockw-switch-to-use-dai-info-for-R-Car-.patch
-patches.renesas/0608-ARM-shmobile-lager-switch-to-use-dai-info-for-R-Car-.patch
-patches.renesas/0609-ARM-shmobile-koelsch-legacy-Enable-Quad-SPI-transfer.patch
-patches.renesas/0610-ARM-shmobile-koelsch-dts-Enable-Quad-SPI-transfers-f.patch
-patches.renesas/0611-ARM-shmobile-lager-dts-Enable-Quad-SPI-transfers-for.patch
-patches.renesas/0612-ARM-shmobile-lager-legacy-Enable-Quad-SPI-transfers-.patch
-patches.renesas/0613-ARM-shmobile-r8a7740-Remove-unused-r8a7740_add_early.patch
-patches.renesas/0614-ARM-shmobile-sh7372-Call-sh7372_add_early_devices-in.patch
-patches.renesas/0615-ARM-shmobile-r8a7740-Make-r8a7740_meram_workaround-_.patch
-patches.renesas/0616-ARM-shmobile-armadillo-reference-dts-Seiko-Instrumen.patch
-patches.renesas/0617-ARM-shmobile-Ignore-callbacks-for-subsys-generic_pm_.patch
-patches.renesas/0618-ARM-shmobile-henninger-initial-device-tree.patch
-patches.renesas/0619-ARM-shmobile-henninger-add-Ether-DT-support.patch
-patches.renesas/0620-ARM-shmobile-henninger-enable-SATA0.patch
-patches.renesas/0621-ARM-shmobile-henninger-specify-EXTAL-frequency.patch
-patches.renesas/0622-ARM-shmobile-henninger-add-SDHI0-2-DT-support.patch
-patches.renesas/0623-ARM-shmobile-henninger-add-QSPI-DT-support.patch
-patches.renesas/0624-ARM-shmobile-henninger-add-MSIOF0-DT-support.patch
-patches.renesas/0625-ARM-shmobile-r8a7740-dtsi-Add-Ethernet-support.patch
-patches.renesas/0626-ARM-shmobile-armadillo-reference-dts-Add-Ethernet-su.patch
-patches.renesas/0627-ARM-shmobile-r8a7740-Correct-name-of-DT-Ethernet-clo.patch
-patches.renesas/0628-ARM-shmobile-sh7372-Switch-to-new-style-CMT-device.patch
-patches.renesas/0629-ARM-shmobile-sh73a0-Switch-to-new-style-CMT-device.patch
-patches.renesas/0630-ARM-shmobile-r8a73a4-Switch-to-new-style-CMT-device.patch
-patches.renesas/0631-ARM-shmobile-r8a7740-Switch-to-new-style-CMT-device.patch
-patches.renesas/0632-ARM-shmobile-r8a7790-Switch-to-new-style-CMT-device.patch
-patches.renesas/0633-ARM-shmobile-r8a7791-Switch-to-new-style-CMT-device.patch
-patches.renesas/0634-ARM-shmobile-sh7372-Switch-to-new-style-TMU-device.patch
-patches.renesas/0635-ARM-shmobile-sh73a0-Switch-to-new-style-TMU-device.patch
-patches.renesas/0636-ARM-shmobile-r8a7740-Switch-to-new-style-TMU-device.patch
-patches.renesas/0637-ARM-shmobile-r8a7778-Switch-to-new-style-TMU-device.patch
-patches.renesas/0638-ARM-shmobile-r8a7779-Switch-to-new-style-TMU-device.patch
-patches.renesas/0639-ARM-shmobile-r7s72100-Switch-to-new-style-MTU2-devic.patch
-patches.renesas/0640-ARM-shmobile-Add-r8a7740-Maximum-CPU-Frequency-to-DT.patch
-patches.renesas/0641-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-in-common-.patch
-patches.renesas/0642-ARM-shmobile-Use-r8a7740-DT-CPU-Frequency-for-Armadi.patch
-patches.renesas/0643-ARM-shmobile-Remove-unused-r8a7740_init_delay.patch
-patches.renesas/0644-ARM-shmobile-Minor-cleanup-of-the-Armadillo-legacy-b.patch
-patches.renesas/0645-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-in-common-.patch
-patches.renesas/0646-ARM-shmobile-Use-r8a7791-DT-CPU-Frequency-for-Koelsc.patch
-patches.renesas/0647-ARM-shmobile-Remove-unused-r8a7791_init_early.patch
-patches.renesas/0648-ARM-shmobile-dts-Move-interrupt-parent-property-to-r.patch
-patches.renesas/0649-ARM-shmobile-r8a7790-dtsi-Add-GPIO-clocks.patch
-patches.renesas/0650-ARM-shmobile-r8a7791-dtsi-Add-GPIO-clocks.patch
-patches.renesas/0651-ARM-shmobile-marzen-reference-Set-SMSC-lan-to-use-ir.patch
-patches.renesas/0652-ARM-shmobile-Use-shmobile_init_late-on-r8a7740.patch
-patches.renesas/0653-ARM-shmobile-lager-Enable-SCIF0-and-SCIF1-serial-por.patch
-patches.renesas/0654-ARM-shmobile-koelsch-Enable-SCIF0-and-SCIF1-serial-p.patch
-patches.renesas/0655-ARM-shmobile-r7s72100-add-essential-clock-nodes-to-d.patch
-patches.renesas/0656-ARM-shmobile-r7s72100-genmai-populate-nodes-for-exte.patch
-patches.renesas/0657-ARM-shmobile-r7s72100-add-scif-nodes-to-dtsi.patch
-patches.renesas/0658-ARM-shmobile-r7s72100-genmai-add-uart-alias-and-acti.patch
-patches.renesas/0659-ARM-shmobile-r7s72100-genmai-platform-scif-devices-o.patch
-patches.renesas/0660-ARM-shmobile-r7s72100-add-i2c-clocks-to-dtsi.patch
-patches.renesas/0661-ARM-shmobile-r7s72100-remove-I2C-DT-clocks-from-lega.patch
-patches.renesas/0662-ARM-shmobile-r7s72100-add-spi-clocks-to-dtsi.patch
-patches.renesas/0663-ARM-shmobile-r7s72100-remove-SPI-DT-clocks-from-lega.patch
-patches.renesas/0664-ARM-shmobile-Add-forward-declaration-of-struct-clk-t.patch
-patches.renesas/0665-ARM-shmobile-r7s72100-use-workaround-for-non-DT-cloc.patch
-patches.renesas/0666-ARM-shmobile-Set-clock-frequency-in-HZ-from-OF-nodes.patch
-patches.renesas/0667-ARM-shmobile-r8a7740-dtsi-Remove-duplicate-interrupt.patch
-patches.renesas/0668-ARM-shmobile-Remove-non-multiplatform-Genmai-referen.patch
-patches.renesas/0669-ARM-shmobile-genmai-reference-Remove-legacy-clock-su.patch
-patches.renesas/0670-ARM-shmobile-Sync-Genmai-DTS-with-Genmai-reference-D.patch
-patches.renesas/0671-ARM-shmobile-Let-Genmai-multiplatform-boot-with-Genm.patch
-patches.renesas/0672-ARM-shmobile-Remove-Genmai-reference-DTS.patch
-patches.renesas/0673-USB-delete-CONFIG_USB_DEVICEFS-from-defconfig.patch
-patches.renesas/0674-ARM-shmobile-r8a7779-Add-clock-index-macros-for-DT-s.patch
-patches.renesas/0675-ARM-shmobile-armadillo800eva-fixup-HDMI-sound-flags-.patch
-patches.renesas/0676-ARM-kconfig-allow-PCI-support-to-be-selected-with-AR.patch
-patches.renesas/0677-ARM-shmobile-r8a7791-Fix-SD2CKCR-register-address.patch
-patches.renesas/0678-ASoC-sh-Migo-R-sound-needs-I2C.patch
-patches.renesas/0679-ASoC-rsnd-remove-old-clock-style-support.patch
-patches.renesas/0680-ASoC-rsnd-remove-compatibility-code.patch
-patches.renesas/0681-ASoC-rsnd-add-rsnd_path_parse-macro.patch
-patches.renesas/0682-ASoC-rsnd-add-rsnd_get_adinr.patch
-patches.renesas/0683-ASoC-rsnd-remove-duplicate-parameter-from-rsnd_mod_o.patch
-patches.renesas/0684-ASoC-rsnd-enable-to-use-multi-parameter-on-rsnd_dai_.patch
-patches.renesas/0685-ASoC-rsnd-add-DVC-support.patch
-patches.renesas/0686-ASoC-rsnd-Fix-warnings-due-to-improper-printk-format.patch
-patches.renesas/0687-ASoC-rsnd-DT-node-clean-up-by-using-the-of_node_put.patch
-patches.renesas/0688-ASoC-rsnd-save-platform_device-instead-of-device.patch
-patches.renesas/0689-ASoC-rsnd-remove-rsnd_src_non_ops.patch
-patches.renesas/0690-ASoC-rsnd-module-name-is-unified.patch
-patches.renesas/0691-ASoC-rsnd-care-DMA-slave-channel-name-for-DT.patch
-patches.renesas/0692-ASoC-rsnd-add-rsnd_gen_dma_addr-for-DMAC-addr.patch
-patches.renesas/0693-ASoC-rsnd-fixup-index-of-src-dst-mod-when-capture.patch
-patches.renesas/0694-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch
-patches.renesas/0695-Documentation-dt-bindings-update-xhci-platform-DT-bi.patch
-patches.renesas/0696-mmc-sh-mmcif-update-to-print-version-and-bus-clock-r.patch
-patches.renesas/0697-mmc-sh-mmcif-use-devm_-for-ioremap.patch
-patches.renesas/0698-mmc-sh-mmcif-use-devm_-for-clock-management.patch
-patches.renesas/0699-mmc-sh-mmcif-use-devm_-for-irq-management.patch
-patches.renesas/0700-mmc-sh-mmcif-no-need-to-call-pm_runtime_suspend-on-e.patch
-patches.renesas/0701-mmc-sh-mmcif-final-error-path-cleanup.patch
-patches.renesas/0702-pinctrl-sh-pfc-r8a7791-Add-HSCIF-pin-support.patch
-patches.renesas/0703-media-vb2-Check-if-there-are-buffers-before-streamon.patch
-patches.renesas/0704-media-vb2-rename-queued_count-to-owned_by_drv_count.patch
-patches.renesas/0705-media-vb2-only-call-start_streaming-if-sufficient-bu.patch
-patches.renesas/0706-v4l-Add-ARGB-and-XRGB-pixel-formats.patch
-patches.renesas/0707-DocBook-media-Document-ALPHA_COMPONENT-control-usage.patch
-patches.renesas/0708-v4l-Support-extending-the-v4l2_pix_format-structure.patch
-patches.renesas/0709-v4l-Add-premultiplied-alpha-flag-for-pixel-formats.patch
-patches.renesas/0710-v4l-vb2-Fix-stream-start-and-buffer-completion-race.patch
-patches.renesas/0711-PCI-rcar-Remove-redundant-config-accessor-register-n.patch
-patches.renesas/0712-PCI-rcar-Use-correct-initial-HW-settings.patch
-patches.renesas/0713-PCI-rcar-Cleanup-style-and-formatting.patch
-patches.renesas/0714-PCI-rcar-Remove-rcar_pcie_setup_window-resource-argu.patch
-patches.renesas/0715-spi-rspi-Remove-unused-variable-in-rspi_rz_transfer_.patch
-patches.renesas/0716-spi-rspi-Pass-spi_master-pointer-to-rspi_release_dma.patch
-patches.renesas/0717-sh_eth-remove-checks-around-dev_kfree_skb-calls.patch
-patches.renesas/0718-mmc-tmio-mmc-Add-renesas-sdhi-r8a7791-to-binding-doc.patch
-patches.renesas/0719-sh-pfc-r8a7791-add-CAN-pin-groups.patch
-patches.renesas/0720-sh-pfc-Add-renesas-pfc-r8a7791-to-binding-documentat.patch
-patches.renesas/0721-sh-pfc-sh73a0-Introduce-the-use-of-devm_regulator_re.patch
-patches.renesas/0722-sh-Switch-to-new-style-CMT-device.patch
-patches.renesas/0723-sh-Switch-to-new-style-TMU-device.patch
-patches.renesas/0724-sh-Switch-to-new-style-MTU2-device.patch
-patches.renesas/0725-clocksource-sh_cmt-Drop-support-for-legacy-platform-.patch
-patches.renesas/0726-clocksource-sh_cmt-Replace-global-spinlock-with-a-pe.patch
-patches.renesas/0727-clocksource-shmobile-Remove-unused-sh_timer_config-m.patch
-patches.renesas/0728-clocksource-sh_cmt-Add-DT-support.patch
-patches.renesas/0729-clocksource-sh_mtu2-Drop-support-for-legacy-platform.patch
-patches.renesas/0730-clocksource-sh_mtu2-Replace-global-spinlock-with-a-p.patch
-patches.renesas/0731-clocksource-sh_mtu2-Add-DT-support.patch
-patches.renesas/0732-clocksource-sh_tmu-Drop-support-for-legacy-platform-.patch
-patches.renesas/0733-clocksource-sh_tmu-Replace-global-spinlock-with-a-pe.patch
-patches.renesas/0734-clocksource-sh_tmu-Add-DT-support.patch
-patches.renesas/0735-gpio-rcar-clamp-returned-value-to-0-1.patch
-patches.renesas/0736-usb-renesas_usbhs-fix-usbhs_pipe_malloc-to-re-enable.patch
-patches.renesas/0737-usb-renesas_usbhs-gadget-fix-re-enabling-pipe-withou.patch
-patches.renesas/0738-usb-renesas_usbhs-add-R-Car-Gen.-2-init-and-power-co.patch
-patches.renesas/0739-dmaengine-shdma-Add-more-register-documentation.patch
-patches.renesas/0740-dmaengine-shdma-Use-defines-instead-of-hardcoded-num.patch
-patches.renesas/0741-dmaengine-sh-Rework-Kconfig-and-Makefile.patch
-patches.renesas/0742-serial-sh-sci-Updated-calculation-of-bit-error-rate-.patch
-patches.renesas/0743-serial-sh-sci-Fix-range-check-of-bit-rate-for-HSCIF.patch
-patches.renesas/0744-serial-sh-sci-Add-calculation-recive-margin-for-HSCI.patch
-patches.renesas/0745-sh-pfc-r8a7791-fix-CAN-pin-groups.patch
-patches.renesas/0746-spi-sh-msiof-Add-more-register-documentation.patch
-patches.renesas/0747-spi-sh-msiof-Extract-sh_msiof_spi_-start-stop-helper.patch
-patches.renesas/0748-spi-sh-msiof-Improve-transfer-error-handling.patch
-patches.renesas/0749-spi-sh-msiof-Refactor-sh_msiof_transfer_one.patch
-patches.renesas/0750-spi-sh-msiof-Add-DMA-support.patch
-patches.renesas/0751-spi-sh-msiof-Handle-dmaengine_prep_slave_single-fail.patch
-patches.renesas/0752-spi-sh-msiof-Use-correct-device-for-DMA-mapping-with.patch
-patches.renesas/0753-spi-sh-msiof-Fix-leaking-of-unused-DMA-descriptors.patch
-patches.renesas/0754-spi-sh-msiof-Fix-transmit-only-DMA-transfers.patch
-patches.renesas/0755-mmc-tmio-Configure-DMA-slave-bus-width.patch
-patches.renesas/0756-mmc-sh_mmcif-Fix-DMA-slave-address-configuration.patch
-patches.renesas/0757-mmc-sh_mmcif-Configure-DMA-slave-bus-width.patch
-patches.renesas/0758-net-sh_eth-Add-r8a7794-support.patch
-patches.renesas/0759-sh-intc-Confine-SH_INTC-to-platforms-that-need-it.patch
-patches.renesas/0760-spi-rspi-Handle-dmaengine_prep_slave_sg-failures-gra.patch
-patches.renesas/0761-spi-rspi-Fix-leaking-of-unused-DMA-descriptors.patch
-patches.renesas/0762-thermal-rcar-Document-SoC-specific-bindings.patch
-patches.renesas/0763-drm-rcar-du-fix-warnings.patch
-patches.renesas/0764-drm-rcar-du-Fix-maximum-frame-buffer-pitch-computati.patch
-patches.renesas/0765-PCI-rcar-Fix-GPL-v2-license-string-typo.patch
-patches.renesas/0766-i2c-i2c-rcar-Drop-class-based-scanning-to-improve-bo.patch
-patches.renesas/0767-media-of-move-graph-helpers-from-drivers-media-v4l2-.patch
-patches.renesas/0768-media-rcar_vin-copy-flags-from-pdata.patch
-patches.renesas/0769-media-rcar_vin-add-devicetree-support.patch
-patches.renesas/0770-media-v4l-vsp1-Fix-routing-cleanup-when-stopping-the.patch
-patches.renesas/0771-media-v4l-vsp1-Release-buffers-at-stream-stop.patch
-patches.renesas/0772-media-v4l-vsp1-Fix-pipeline-stop-timeout.patch
-patches.renesas/0773-media-v4l-vsp1-Fix-typos.patch
-patches.renesas/0774-media-v4l-vsp1-Cleanup-video-nodes-at-removal-time.patch
-patches.renesas/0775-media-v4l-vsp1-Propagate-vsp1_device_get-errors-to-t.patch
-patches.renesas/0776-media-v4l-vsp1-Setup-control-handler-automatically-a.patch
-patches.renesas/0777-media-v4l-vsp1-sru-Fix-the-intensity-control-default.patch
-patches.renesas/0778-media-v4l-vsp1-sru-Make-the-intensity-controllable-d.patch
-patches.renesas/0779-media-v4l-vsp1-wpf-Simplify-cast-to-pipeline-structu.patch
-patches.renesas/0780-media-v4l-vsp1-wpf-Clear-RPF-to-WPF-association-at-s.patch
-patches.renesas/0781-media-v4l-vsp1-Switch-to-XRGB-formats.patch
-patches.renesas/0782-media-v4l-vsp1-Add-alpha-channel-support-to-the-memo.patch
-patches.renesas/0783-media-v4l-vsp1-Add-V4L2_CID_ALPHA_COMPONENT-control-.patch
-patches.renesas/0784-media-v4l-vsp1-bru-Support-premultiplied-alpha-at-th.patch
-patches.renesas/0785-media-v4l-vsp1-bru-Support-non-premultiplied-colors-.patch
-patches.renesas/0786-media-v4l-vsp1-bru-Make-the-background-color-configu.patch
-patches.renesas/0787-media-v4l-vsp1-uds-Fix-scaling-of-alpha-layer.patch
-patches.renesas/0788-ASoC-rsnd-fixup-rsnd_gen_dma_addr-for-Gen1.patch
-patches.renesas/0789-ASoC-rsnd-fixup-loop-exit-timing-of-dma-name-search.patch
-patches.renesas/0790-ASoC-rcar-Fix-dma-direction-type.patch
-patches.renesas/0791-ASoC-rsnd-SSI-DMA-can-select-BUSIF.patch
-patches.renesas/0792-ASoC-rsnd-use-dmaengine_prep_dma_cyclic-instead-of-o.patch
-patches.renesas/0793-ASoC-rsnd-enable-DVC-when-capture.patch
-patches.renesas/0794-ASoC-rsnd-DMA-cleanup-for-flexible-SSI-SRC-selection.patch
-patches.renesas/0795-ASoC-rsnd-DMA-start-address-is-properly-used-for-eac.patch
-patches.renesas/0796-ASoC-rsnd-add-DT-support-to-DVC.patch
-patches.renesas/0797-ASoC-rsnd-add-missing-src-dst_addr_width-for-DMAEngi.patch
-patches.renesas/0798-ASoC-rsnd-fixup-dai-remove-callback-operation.patch
-patches.renesas/0799-ASoC-rsnd-use-regmap_mmio-instead-of-original-regmap.patch
-patches.renesas/0800-ASoC-rsnd-care-detail-of-SRC_BSDSR.patch
-patches.renesas/0801-ASoC-rsnd-care-audio-local-bus-data-format-consisten.patch
-patches.renesas/0802-ASoC-rsnd-add-missing-dev_dbg-in-rsnd_bset.patch
-patches.renesas/0803-ASoC-rsnd-fixup-pcm_new-callback-method.patch
-patches.renesas/0804-ASoC-rsnd-fixup-SND_SOC_DAIFMT_xB_xF-behavior.patch
-patches.renesas/0805-ASoC-rsnd-tidyup-DVC-control-method.patch
-patches.renesas/0806-ASoC-rsnd-enable-Mute-control-on-DVC.patch
-patches.renesas/0807-ARM-shmobile-armadillo800eva-reference-dts-Add-match.patch
-patches.renesas/0808-ARM-shmobile-marzen-Remove-early_printk-from-command.patch
-patches.renesas/0809-ARM-shmobile-armadillo800eva-defconfig-Enable-REGULA.patch
-patches.renesas/0810-ARM-shmobile-marzen-Add-to-shmobile-defconfig.patch
-patches.renesas/0811-ARM-shmobile-Enable-PM_RUNTIME-in-defconfig.patch
-patches.renesas/0812-ARM-shmobile-Enable-CPUFREQ-configuration.patch
-patches.renesas/0813-ARM-shmobile-add-cpufreq-cpu0-driver-for-common-SH-M.patch
-patches.renesas/0814-ARM-shmobile-Fix-device-node-reference-leakage-in-sh.patch
-patches.renesas/0815-ARM-shmobile-Move-intc.h-cleanup-sh_intc.h-usage.patch
-patches.renesas/0816-ARM-shmobile-Move-dma-register.h.patch
-patches.renesas/0817-ARM-shmobile-Move-clock.h.patch
-patches.renesas/0818-ARM-shmobile-Move-most-of-irqs.h-keep-some-for-pinct.patch
-patches.renesas/0819-ARM-shmobile-Move-common.h.patch
-patches.renesas/0820-ARM-shmobile-Move-pm-rmobile.h-cleanup-sh73xx.h.patch
-patches.renesas/0821-ARM-shmobile-Move-pm-rcar.h-cleanup-r8a7779-case.patch
-patches.renesas/0822-ARM-shmobile-Move-rcar-gen2.h-cleanup-r8a7790-case.patch
-patches.renesas/0823-ARM-shmobile-Update-EMEV2-DTS-to-include-CPU-frequen.patch
-patches.renesas/0824-ARM-shmobile-Use-shmobile_init_delay-on-EMEV2.patch
-patches.renesas/0825-ARM-shmobile-r8a7779-Add-clocks.patch
-patches.renesas/0826-ARM-shmobile-Sync-Marzen-DTS-with-Marzen-reference-D.patch
-patches.renesas/0827-ARM-shmobile-marzen-Specify-external-clock-frequency.patch
-patches.renesas/0828-ARM-shmobile-r8a7779-Reference-clocks.patch
-patches.renesas/0829-ARM-shmobile-r8a7791-SYSC-setup-code.patch
-patches.renesas/0830-ARM-shmobile-APMU-Add-Core-Standby-state-for-Suspend.patch
-patches.renesas/0831-ARM-shmobile-r8a7790-Support-Core-Standby-for-Suspen.patch
-patches.renesas/0832-ARM-shmobile-r8a7791-Support-Core-Standby-for-Suspen.patch
-patches.renesas/0833-ARM-shmobile-Mark-all-SoCs-in-shmobile-as-CPUFreq-ca.patch
-patches.renesas/0834-ARM-shmobile-Use-shmobile_init_late-on-r8a7790-DT-on.patch
-patches.renesas/0835-ARM-shmobile-Use-shmobile_init_late-on-r8a7791-DT-on.patch
-patches.renesas/0836-ARM-shmobile-Add-shared-R-Car-Gen2-CMA-reservation-c.patch
-patches.renesas/0837-ARM-shmobile-rcar-gen2-Update-for-of_get_flat_dt_pro.patch
-patches.renesas/0838-ARM-shmobile-rcar-gen2-Use-1ULL-instead-of-u64-1.patch
-patches.renesas/0839-ARM-shmobile-rcar-gen2-Remove-useless-copied-section.patch
-patches.renesas/0840-ARM-shmobile-rcar-gen2-correct-return-value-of-shmob.patch
-patches.renesas/0841-ARM-shmobile-koelsch-reference-Remove-workarounds-fo.patch
-patches.renesas/0842-ARM-shmobile-lager-reference-Remove-workarounds-for-.patch
-patches.renesas/0843-ARM-shmobile-armadillo800eva-legacy-Add-LED-support.patch
-patches.renesas/0844-ARM-shmobile-armadillo800eva-reference-Spelling-s-ED.patch
-patches.renesas/0845-ARM-shmobile-Enable-R-Car-Gen2-CMA-code-in-board-fil.patch
-patches.renesas/0846-ARM-shmobile-Get-rid-of-redundant-EMEV2-mach-callbac.patch
-patches.renesas/0847-ARM-shmobile-Update-r7s72100-DTS-to-include-CPU-freq.patch
-patches.renesas/0848-ARM-shmobile-Use-shmobile_init_delay-on-Genmai-board.patch
-patches.renesas/0849-ARM-shmobile-Use-shmobile_init_delay-on-r7s72100.patch
-patches.renesas/0850-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-in-common-.patch
-patches.renesas/0851-ARM-shmobile-Use-r8a7790-DT-CPU-Frequency-for-Lager.patch
-patches.renesas/0852-ARM-shmobile-Remove-unused-r8a7790_init_early.patch
-patches.renesas/0853-ARM-shmobile-r8a7779-Add-helper-to-read-mode-pins.patch
-patches.renesas/0854-ARM-shmobile-r8a7779-Move-r8a7779_earlytimer_init-to.patch
-patches.renesas/0855-ARM-shmobile-marzen-reference-Move-clock-and-OF-devi.patch
-patches.renesas/0856-ARM-shmobile-r8a7779-Initial-multiplatform-support.patch
-patches.renesas/0857-ARM-shmobile-marzen-reference-Initialize-CPG-device.patch
-patches.renesas/0858-ARM-shmobile-marzen-reference-Instantiate-clkdevs-fo.patch
-patches.renesas/0859-ARM-shmobile-Remove-non-multiplatform-Marzen-referen.patch
-patches.renesas/0860-ARM-shmobile-Let-Marzen-multiplatform-boot-with-Marz.patch
-patches.renesas/0861-ARM-shmobile-Remove-Marzen-reference-DTS.patch
-patches.renesas/0862-ARM-shmobile-marzen-reference-Remove-legacy-clock-su.patch
-patches.renesas/0863-ARM-shmobile-r8a7779-Add-Maximum-CPU-Frequency-to-DT.patch
-patches.renesas/0864-ARM-shmobile-r8a7779-Use-DT-CPU-Frequency-in-common-.patch
-patches.renesas/0865-ARM-shmobile-marzen-reference-Use-DT-CPU-Frequency.patch
-patches.renesas/0866-ARM-shmobile-r8a7779-Remove-unused-r8a7779_init_dela.patch
-patches.renesas/0867-ARM-shmobile-r8a7779-dtsi-Update-unit-addresses-for-.patch
-patches.renesas/0868-ARM-shmobile-r8a7779-dtsi-Correct-address-cells-size.patch
-patches.renesas/0869-ARM-shmobile-r8a7779-Add-scif-nodes-to-dtsi.patch
-patches.renesas/0870-ARM-shmobile-marzen-Initialise-SCIF-devices-using-DT.patch
-patches.renesas/0871-ARM-shmobile-marzen-Do-not-use-workaround-for-scif-d.patch
-patches.renesas/0872-ARM-shmobile-r8a7790-add-USB3.0-clocks-to-device-tre.patch
-patches.renesas/0873-ARM-shmobile-r8a7791-add-USB3.0-clocks-to-device-tre.patch
-patches.renesas/0874-ARM-shmobile-r8a7791-dtsi-add-SYS-DMAC-clocks.patch
-patches.renesas/0875-ARM-shmobile-lager-Add-VDD-MPU-regulator-for-DVFS.patch
-patches.renesas/0876-ARM-shmobile-r8a7790-lager-dts-Add-DVFS-parameters-i.patch
-patches.renesas/0877-ARM-shmobile-koelsch-dts-Add-VDD-MPU-regulator-for-D.patch
-patches.renesas/0878-ARM-shmobile-r8a7791-koelsch-dts-Add-DVFS-parameters.patch
-patches.renesas/0879-ARM-shmobile-lager-enable-i2c-devices.patch
-patches.renesas/0880-ARM-shmobile-lager-add-i2c1-i2c2-pins.patch
-patches.renesas/0881-ARM-shmobile-lager-Move-i2c-12-_pins-nodes-to-pfc-no.patch
-patches.renesas/0882-ARM-shmobile-Lager-memory-map-update.patch
-patches.renesas/0883-ARM-shmobile-lager-Remove-duplicate-i2c3-nodes.patch
-patches.renesas/0884-ARM-shmobile-koelsch-Remove-duplicate-i2c6-nodes.patch
-patches.renesas/0885-ARM-shmobile-henninger-add-I2C2-DT-support.patch
-patches.renesas/0886-ARM-shmobile-r8a7790-add-MSTP10-support-on-DTSI.patch
-patches.renesas/0887-ARM-shmobile-r8a7790-add-R-Car-sound-support-on-DTSI.patch
-patches.renesas/0888-ARM-shmobile-r8a7791-add-audio-clock-on-DTSI.patch
-patches.renesas/0889-ARM-shmobile-r8a7791-add-MSTP10-support-on-DTSI.patch
-patches.renesas/0890-ARM-shmobile-r8a7790-Add-PCIEC-clock-device-tree-nod.patch
-patches.renesas/0891-ARM-shmobile-r8a7790-Add-default-PCIe-bus-clock.patch
-patches.renesas/0892-ARM-shmobile-r8a7790-Add-PCIe-Controller-device-node.patch
-patches.renesas/0893-ARM-shmobile-r8a7791-Add-PCIEC-clock-device-tree-nod.patch
-patches.renesas/0894-ARM-shmobile-r8a7791-Add-default-PCIe-bus-clock.patch
-patches.renesas/0895-ARM-shmobile-r8a7791-Add-PCIe-Controller-device-node.patch
-patches.renesas/0896-ARM-shmobile-koelsch-Enable-PCIe-Controller-PCIe-bus.patch
-patches.renesas/0897-ARM-shmobile-henninger-Enable-PCIe-Controller-PCIe-b.patch
-patches.renesas/0898-ARM-shmobile-r8a7791-add-R-Car-sound-support-on-DTSI.patch
-patches.renesas/0899-ARM-shmobile-Enable-genmai-board-in-multiplatform-de.patch
-patches.renesas/0900-ARM-shmobile-Move-r7s72100.h.patch
-patches.renesas/0901-ARM-shmobile-Move-r8a73a4.h.patch
-patches.renesas/0902-ARM-shmobile-Move-r8a7740.h.patch
-patches.renesas/0903-ARM-shmobile-Move-r8a7778.h.patch
-patches.renesas/0904-ARM-shmobile-Move-r8a7790.h.patch
-patches.renesas/0905-ARM-shmobile-Move-sh73a0.h.patch
-patches.renesas/0906-ARM-shmobile-Move-sh7372.h.patch
-patches.renesas/0907-ARM-shmobile-Move-r8a7779.h.patch
-patches.renesas/0908-ARM-shmobile-Move-r8a7791.h.patch
-patches.renesas/0909-ARM-shmobile-Allow-use-of-boot-code-for-non-SMP-case.patch
-patches.renesas/0910-ARM-shmobile-Adjust-APMU-code-to-build-for-non-SMP.patch
-patches.renesas/0911-ARM-shmobile-Use-__init-for-APMU-suspend-init-functi.patch
-patches.renesas/0912-ARM-shmobile-Move-r8a7790-reset-code-to-pm-r8a7790.c.patch
-patches.renesas/0913-ARM-shmobile-Allow-r8a7790-to-build-non-SMP-APMU-cod.patch
-patches.renesas/0914-ARM-shmobile-Move-r8a7791-reset-code-to-pm-r8a7791.c.patch
-patches.renesas/0915-ARM-shmobile-Allow-r8a7791-to-build-non-SMP-APMU-cod.patch
-patches.renesas/0916-ARM-shmobile-r8a7790-add-internal-PCI-bridge-nodes.patch
-patches.renesas/0917-ARM-shmobile-lager-enable-internal-PCI.patch
-patches.renesas/0918-ARM-shmobile-r8a7790-add-DVC-support-for-sound-node-.patch
-patches.renesas/0919-ARM-shmobile-r8a7791-add-DVC-support-for-sound-node-.patch
-patches.renesas/0920-ASoC-fsi-use-SNDRV_DMA_TYPE_DEV-for-sound-buffer.patch
-patches.renesas/0921-ARM-shmobile-r8a7790-Fix-whitespace-errors-in-pci-no.patch
-patches.renesas/0922-ARM-shmobile-genmai-reference-dts-Add-RSPI-node.patch
-patches.renesas/0923-ARM-shmobile-fix-shmobile_smp_apmu_suspend_init-buil.patch
-patches.renesas/0924-ARM-shmobile-r8a7791-add-internal-PCI-bridge-nodes.patch
-patches.renesas/0925-ARM-shmobile-koelsch-enable-internal-PCI.patch
-patches.renesas/0926-ARM-shmobile-henninger-enable-internal-PCI.patch
-patches.renesas/0927-ARM-shmobile-henninger-Consistently-use-tabs-for-ind.patch
-patches.renesas/0928-ARM-shmobile-r8a7779-Consistently-use-tabs-for-inden.patch
-patches.renesas/0929-ARM-shmobile-armadillo800eva-reference-Remove-early_.patch
-patches.renesas/0930-ARM-shmobile-kzm9g-reference-Remove-early_printk-fro.patch
-patches.renesas/0931-ARM-shmobile-marzen-Consistently-use-tabs-for-indent.patch
-patches.renesas/0932-ARM-shmobile-Enable-R-Car-Gen-2-PCIe-in-shmobile_def.patch
-patches.renesas/0933-ARM-shmobile-Remove-opps-table-check-for-cpufreq.patch
-patches.renesas/0934-ARM-shmobile-Lager-Correct-I2C-bus-for-VDD-MPU-regul.patch
-patches.renesas/0935-ARM-shmobile-r8a7790-lager-use-iic-cores-instead-of-.patch
-patches.renesas/0936-ARM-shmobile-r8a7778-add-SCI-clock-support-for-DT.patch
-patches.renesas/0937-ARM-shmobile-r8a73a4-add-SCI-clock-support-for-DT.patch
-patches.renesas/0938-ARM-shmobile-r8a7740-correct-SCI-clock-support-for-D.patch
-patches.renesas/0939-ARM-shmobile-sh73a0-add-SCI-clock-support-for-DT.patch
-patches.renesas/0940-ARM-shmobile-r8a7778-Add-SCIF-nodes.patch
-patches.renesas/0941-ARM-shmobile-bockw-reference-Initialise-SCIF-device-.patch
-patches.renesas/0942-ARM-shmobile-r8a73a4-Add-SCIF-nodes.patch
-patches.renesas/0943-ARM-shmobile-ape6evm-reference-Initialise-SCIF-devic.patch
-patches.renesas/0944-ARM-shmobile-r8a7740-Add-SCIF-nodes.patch
-patches.renesas/0945-ARM-shmobile-armadillo800eva-reference-Initialise-SC.patch
-patches.renesas/0946-ARM-shmobile-sh73a0-Add-SCIF-nodes.patch
-patches.renesas/0947-ARM-shmobile-kzm9g-reference-Initialise-SCIF-device-.patch
-patches.renesas/0948-ARM-shmobile-r8a7778-add-TMU-clock-support-for-DT.patch
-patches.renesas/0949-ARM-shmobile-r8a7740-add-TMU-clock-support-for-DT.patch
-patches.renesas/0950-ARM-shmobile-r8a73a4-add-CMT1-clock-support-for-DT.patch
-patches.renesas/0951-ARM-shmobile-r8a7740-add-CMT1-clock-support-for-DT.patch
-patches.renesas/0952-ARM-shmobile-sh73a0-add-CMT1-clock-support-for-DT.patch
-patches.renesas/0953-ARM-shmobile-genmai-remove-defconfig.patch
-patches.renesas/0954-ARM-shmobile-sh73a0-Remove-spurious-0x-from-SCIFB-cl.patch
-patches.renesas/0955-ARM-shmobile-defconfig-Remove-MACH_GENMAI.patch
-patches.renesas/0956-ARM-shmobile-r8a7790-add-missing-0x0100-for-SDCKCR.patch
-patches.renesas/0957-ARM-shmobile-r8a7791-add-missing-0x0100-for-SDCKCR.patch
-patches.renesas/0958-ARM-shmobile-koelsch-Remove-non-existent-i2c6-pinmux.patch
-patches.renesas/0960-xhci-Platform-Add-en-dis-able_usb3_lpm_timeout.patch
-patches.renesas/0961-xhci-Platform-Set-xhci-lpm-support-quirk-based-on-pl.patch
-patches.renesas/0962-usb-host-xhci-plat-use-devm_functions.patch
-patches.renesas/0963-usb-host-xhci-plat-add-support-for-the-R-Car-H2-and-.patch
-patches.renesas/0964-ASoC-ak4642-Make-of_device_id-array-const.patch
-patches.renesas/0965-i2c-rcar-fix-MNR-interrupt-handling.patch
-patches.renesas/0966-Revert-i2c-rcar-remove-spinlock.patch
-patches.renesas/0967-ASoC-rcar-Use-instead-of-for-boolean-expressions.patch
-patches.renesas/0968-net-sh_eth-fix-driver-dependencies.patch
-patches.renesas/0969-usb-renesas_usbhs-fix-the-behavior-of-some-usbhs_pkt.patch
-patches.renesas/0970-usb-renesas_usbhs-protect-mod-irq_-bemp-brdy-sts-by-.patch
-patches.renesas/0971-usb-renesas_usbhs-fix-the-condition-of-is_done-in-us.patch
-patches.renesas/0972-usb-renesas_usbhs-fix-the-usb_pkt_pop.patch
-patches.renesas/0973-i2c-rcar-fix-RCAR_IRQ_ACK_-RECV-SEND.patch
-patches.renesas/0001-clk-add-clock-indices-support.patch
-patches.renesas/0002-of-fdt-update-of_get_flat_dt_prop-in-prep-for-libfdt.patch
-patches.renesas/phy-micrel-add-of-configuration-for-led-mode.patch
-patches.renesas/micrel-fix-masking-off-led-bits.patch
-
#############################################################################
# Intel patches
#
-patches.intel/pwm-add-support-for-intel-low-power-subsystem-pwm.patch
-patches.intel/pwm-lpss-add-support-for-pci-devices.patch
-patches.intel/pwm-lpss-fix-const-qualifier-and-sparse-warnings.patch
-patches.intel/pwm-lpss-remove-dependency-on-clk-framework.patch
-patches.intel/pwm-lpss-add-acpi-and-pci-ids-for-intel-braswell.patch
-patches.intel/pwm-lpss-properly-split-driver-to-parts.patch
-patches.intel/pwm-lpss-fix-build-failure-on-powerpc.patch
-patches.intel/pwm-lpss-use-c99-initializers-in-structures.patch
-patches.intel/i2c-remove-define_pci_device_table-macro.patch
-patches.intel/i2c-i801-fix-the-alignment-of-the-device-table.patch
-patches.intel/i2c-i801-add-device-id-for-intel-wildcat-point-pch.patch
-patches.intel/i2c-i801-add-pci-id-for-intel-braswell.patch
-patches.intel/mfd-delete-non-required-instances-of-include-linux-init.h.patch
-patches.intel/mfd-lpc_ich-convert-ich-gpios-ids-to-enum.patch
-patches.intel/mfd-lpc_ich-add-support-for-intel-avoton-gpios.patch
-patches.intel/mfd-lpc_ich-fix-acpi-enable-bitmask.patch
-patches.intel/mfd-lpc_ich-only-configure-watchdog-or-gpio-when-present.patch
-patches.intel/mfd-lpc_ich-remove-lpc_ich_cfg-struct-use.patch
-patches.intel/mfd-lpc_ich-add-support-for-itco-v3.patch
-patches.intel/mfd-lpc_ich-change-avoton-to-itco-v3.patch
-patches.intel/mfd-lpc_ich-add-support-for-nm10-gpio.patch
-patches.intel/mfd-lpc_ich-add-support-for-intel-bay-trail-soc.patch
-patches.intel/mfd-lpc_ich-enable-gpio-for-panther-point.patch
-patches.intel/mfd-lpc_ich-add-pci-id-for-intel-braswell.patch
-patches.intel/mfd-lpc_ich-add-device-ids-for-intel-9-series-pch.patch
-patches.intel/watchdog-itco_wdt-add-support-for-v3-silicon.patch
-patches.intel/watchdog-fix-checkpatch-warnings-and-error.patch
-patches.intel/watchdog-itco_wdt-fix-the-parent-device.patch
-
#############################################################################
# fixes that go after all of the above