aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* dra71x: lcard: fix wlan enumeration on MMC16AO.1.0-lcard-revbVishal Mahaveer2018-08-231-7/+25
| | | | | | | | | | Add changes needed for bringing up WiLink on MMC1 interface. Also add the gpio configuration needed for selecting WiLink over SD card on this board. Change-Id: I64891707fdcb1d22fbff60645c9c891710d43462 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* dra71x: lcard: enable early mounting andriod partitionsVishal Mahaveer2017-12-181-0/+1
| | | | | Change-Id: Id4179cdda1a9903ea5f764150e40063d05055407 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* arm: dts: lcard: enable auo fpdlink displayVishal Mahaveer2017-12-173-0/+61
| | | | | | | | Enable FPDLink based display and touchscren for LCARD board. Change-Id: If460bfce0461c96f4ae8a2a1e7ff7f4695d3829d Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
* dra71x: lcard: mcasp update for rev-B boardVishal Mahaveer2017-12-171-2/+9
| | | | | | | | | | In previous version of LCARD, codec's MCLK and SCLK was connected together. In Rev-B board, MCLK has separate input. For now unsing the ATL3 clock explicitly. Change-Id: I0d8323685f934f8f75833320f006b09c5ab2b77b Signed-off-by: Vishal Mahaveer <vishalm@ti.com> Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* dra71x: lcard: Change sound card setting for stereoManoj Vishwanathan2017-12-172-2/+2
| | | | | | | | Change the Audio format from I2S to DSP_B in dts. Slot size was not being masked in in hw_params, fix that as well. Change-Id: Ida80a87c1cccee544fa4c3e3b4f8007cd8b276ec Signed-off-by: Manoj Vishwanathan <m-vishwanathan@ti.com>
* ASoC: tas62424: Fix slot count constraintMisael Lopez Cruz2017-12-171-2/+2
| | | | | Change-Id: Ice41e20e47d8b56a0f7503da54cd8eae5914dfc0 Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com>
* dra71x: lcard: add TAS6424 and mcasp4 configurationsMisael Lopez Cruz2017-12-171-0/+66
| | | | | | | | | | On LCARD speaker output is connected via TAS6424 class-D amplifier and mcasp4. Change-Id: Iddac9ca211eb40dc51d4c64e24c7ecb0e2d7ed0f Signed-off-by: Misael Lopez Cruz <misael.lopez@ti.com> Signed-off-by: Manoj Vishwanathan <m-vishwanathan@ti.com> Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* ti_config_fragments: android: enable class-D amplifierVishal Mahaveer2017-12-171-0/+3
| | | | | | | | Enable TAS6424 Quad-Channel Audio amplifier driver for lcard board. Change-Id: Icd7182188b16168164ecb72be5c56cad1834c8ab Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* ASoC: add support for TAS6424 digital amplifierAndreas Dannenberg2017-12-174-0/+910
| | | | | | | | | | | | | | The Texas Instruments TAS6424 device is a high-efficiency quad-channel Class-D audio power amplifier. Its digital time division multiplexed (TDM) interface enables up to 2 devices to share the same bus, supporting a total of eight channels from one audio serial port. This is an initial version of the driver that does not yet support all device capabilities. It is provided for testing/evaluation purposes only. Change-Id: Ia7bed98ba131399024f83d4863b76c68a5c440ad Signed-off-by: Andreas Dannenberg <dannenberg@ti.com>
* dra71x: lcard: add radio related configurationsVishal Mahaveer2017-12-172-0/+111
| | | | | | | | Add gatemp, mcasp, mcspi, atl, sr0, tuner and other memory changes needed for enabling tuner and radio on this board. Change-Id: If91b01eaaacd60b4e081a5ed33c29aa49adcb1f8 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* dra71x: lcard: enable wilink module on mmc1Vishal Mahaveer2017-12-171-1/+94
| | | | | | | | Initial changes for enabling WiLink module on this board. The card is not enumerating yet. Change-Id: I4d13ee8234701f5f86de77710e9d537e6c8aaebb Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* dra71x: lcard: update PMIC configurationsVishal Mahaveer2017-12-171-0/+53
| | | | | | | Update PMIC configurations for this board. Change-Id: I09ac4b43e6e20c480edec474197bcbe4e8ed12dc Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* ti_config_fragments: android: enable USB network adapterVishal Mahaveer2017-12-171-0/+5
| | | | | | | Enable USB network adapter configurations. Change-Id: I403974d12f5c9ec514e5f2d11c66cf7de79dae7c Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* dra71x: lcard: fix sound for HDMIVishal Mahaveer2017-12-171-1/+1
| | | | | | | | HDMI sound card is expected at slot 1, change accordingly. Need to revisit when enabling McASP for audio. Change-Id: I719da77bcddedd38620a0e83d2c272cf4b3b66f4 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* dra71x: lcard: enable USB configurationsVishal Mahaveer2017-12-171-0/+54
| | | | | | | | Enable USB for lcard EVM. With these changes USB1 is working in otg mode, verified via ADB. USB2 host mode is still not functional. Change-Id: Id7e2fbfe8ca955b95048cb4be347295975c3f45b Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* HACK: encoder-tpd12s015: ignore CT_HPD and LS_OEVishal Mahaveer2017-12-171-1/+3
| | | | | | | In lcard board CT_HPD and LS_OE pins are allways enabled. Change-Id: I7f1f84eb241876321bd22b70e14b5ac5fcc1adc5 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* dra71x: lcard: initial commitVishal Mahaveer2017-12-174-2/+339
| | | | | | | | Basic changes to get to boot Android from emmc and get to console. Change-Id: I7e0e70e0a9cb9269dcba843e2d6a1093f777dee6 Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
* am57x: dts: idk: add android early mount partitionsPraneeth Bajjuri2017-11-291-0/+1
| | | | | | | | | | | | | Add support for mounting Android partitions "system" and "vendor" early. This is for first stage mount done by init. Other partitions like "data", "cache", etc.. continue to be loaded by fstab file. [1] https://source.android.com/devices/architecture/kernel/modular-kernels#mounting-partitions-early-first-stage-mount Change-Id: I5310733e8ac8ac3f3891ab03e435ad8a9a223c65 Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* Revert "Revert "ARM: dts: am57x: add android early mount partitions""Praneeth Bajjuri2017-11-293-15/+4
| | | | | | | | | | | | | This reverts commit 8aa2ba5b8636d44cea924a22e2c4f446292cd96e. Early mount is fixed now and we are able to boot from vendor partition and mount paritions early (first stage mount) and load modules as per requirement: https://source.android.com/devices/architecture/kernel/modular-kernels#mounting-partitions-early-first-stage-mount Change-Id: Ie11edfb73b0fc85af7ee13bc48dd811bf8aaffe7 Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* Merge branch 'p-ti-lsk-linux-4.4.y-next' of ↵David Huang2017-11-1310-458/+178
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.omapzoom.org/kernel/omap into p-ti-android-linux-4.4.y Auto Merge of: TI-Feature: linux-4.4.y-next_android-4.4.y TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y-next * 'p-ti-lsk-linux-4.4.y-next' of git://git.omapzoom.org/kernel/omap: mmc: host: omap_hsmmc: keep CON_PADEN always enabled arm: dts: dra7: add late attach dts covering all cores of a SOC arm: dts: dra7: restructure late attach dts Signed-off-by: David Huang <d-huang@ti.com>
| * Merge "mmc: host: omap_hsmmc: keep CON_PADEN always enabled" into ↵David Huang2017-11-131-6/+6
| |\ | | | | | | | | | p-ti-lsk-linux-4.4.y-next
| | * mmc: host: omap_hsmmc: keep CON_PADEN always enabledRavikumar Kattekola2017-11-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There is a delay in enumeration of MMC on some platforms. Rootcause of this behavior is that there is a delay between setting PADEN and the time when the status is reflected on the IO lines. A simple fix is to add a delay in the code after setting the PADEN bit. Change-Id: Iadaff902a6a8eee9525bdc497e2ef9516e2a73c1 Signed-off-by: Ravikumar Kattekola <rk@ti.com> Signed-off-by: Vishal Mahaveer <vishalm@ti.com>
| * | arm: dts: dra7: add late attach dts covering all cores of a SOCVenkateswara Rao Mandela2017-11-135-1/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds late attach device tree files for all DRA7x device variants. For each variant, all the cores in the SOC have the late attach attribute set. This is required for automated testing of early boot late attach feature. Change-Id: Ib5ce420f9748abc7e8a8a463df76c75d6405404e Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
| * | arm: dts: dra7: restructure late attach dtsVenkateswara Rao Mandela2017-11-134-451/+105
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | - Extract the common portions of late attach device tree attributes into dra7x-late.dtsi. - Enable late attach for a remotecore by defining a corresponding macro. - Use a macro for setting the 3 late attach attributes on each node that needs to be modified. Change-Id: I0a77742a4b7220d1d9542c6af80569e537802ddb Signed-off-by: Venkateswara Rao Mandela <venkat.mandela@ti.com>
* | android: sync: Increase size of sync_pt info bufferGowtham Tammana2017-11-101-2/+2
| | | | | | | | | | | | | | | | | | The sync driver is expecting a max of 64 bytes of sync_pt info from the drivers. The pvr sync driver is currently writing info in the order of ~200 bytes. Increase the size to 256 bytes. Change-Id: I4066460434ccff6a1a495e2292e14e7abe841e7e Signed-off-by: Gowtham Tammana <g-tammana@ti.com>
* | Merge branch 'p-ti-lsk-linux-4.4.y-next' of ↵David Huang2017-11-081-1/+16
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.omapzoom.org/kernel/omap into p-ti-android-linux-4.4.y Auto Merge of: TI-Feature: linux-4.4.y-next_android-4.4.y TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y-next * 'p-ti-lsk-linux-4.4.y-next' of git://git.omapzoom.org/kernel/omap: arm: dts: dra76-evm: Add JAMR support Signed-off-by: David Huang <d-huang@ti.com>
| * arm: dts: dra76-evm: Add JAMR supportNikhil Devshatwar2017-11-071-1/+16
| | | | | | | | | | | | | | | | | | | | | | Enable i2c4 and vin1a required for TVP5158 capture Add device tree nodes which expose the base board devices through the expansion board for JAMR board. This includes video port, i2c bus and voltage regulators. Change-Id: I6e286b3875eb0539cfa5db44d5d6772ddbcab518 Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
* | Merge branch 'p-ti-lsk-linux-4.4.y-next' of ↵David Huang2017-11-032-2/+99
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.omapzoom.org/kernel/omap into p-ti-android-linux-4.4.y Auto Merge of: TI-Feature: linux-4.4.y-next_android-4.4.y TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y-next * 'p-ti-lsk-linux-4.4.y-next' of git://git.omapzoom.org/kernel/omap: mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929) Signed-off-by: David Huang <d-huang@ti.com>
| * Merge branch 'p-ti-lsk-linux-4.4.y' of git://git.omapzoom.org/kernel/omap ↵David Huang2017-11-032-2/+99
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into p-ti-lsk-linux-4.4.y-next Auto Merge of: TI-Feature: linux-4.4.y_linux-4.4.y-next TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y * 'p-ti-lsk-linux-4.4.y' of git://git.omapzoom.org/kernel/omap: mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929) Signed-off-by: David Huang <d-huang@ti.com>
| | * Merge branch 'ti-lsk-linux-4.4.y' of ↵David Huang2017-11-032-2/+99
| | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.ti.com/ti-linux-kernel/ti-linux-kernel into p-ti-lsk-linux-4.4.y Auto Merge of: TI-Feature: lcpd-linux-4.4.y_linux-4.4.y TI-Tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git TI-Branch: ti-lsk-linux-4.4.y * 'ti-lsk-linux-4.4.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929) Signed-off-by: David Huang <d-huang@ti.com>
| | | * Merge branch 'ti-linux-4.4.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel ↵LCPD Auto Merger2017-11-022-2/+99
| | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into ti-lsk-linux-4.4.y TI-Feature: ti_linux_base_lsk TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git TI-Branch: ti-linux-4.4.y * 'ti-linux-4.4.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel: mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929) Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
| | | | * Merge branch 'maint-ti-linux-4.4.y' of ↵LCPD Auto Merger2017-11-022-2/+99
| | | | |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.ti.com/ti-linux-kernel/ti-linux-kernel-maint into ti-linux-4.4.y TI-Feature: ti-linux-4.4-maint TI-Tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel-maint.git TI-Branch: maint-ti-linux-4.4.y * 'maint-ti-linux-4.4.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel-maint: mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929) Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
| | | | | * mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929)Faiz Abbas2017-10-312-2/+99
| | | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 8fde69daa390 ("mmc: omap_hsmmc: Workaround errata regarding SDR104/HS200 tuning failures (i929)") branch ti-linux-4.9.y There is a silicon errata in DRA75x, DRA72x and OMAP5 platforms which may result in unexpected tuning pattern errors. A small failure band may be present in the tuning range which may be missed by the curent algorithm. Furthermore, the failure bands vary with temperature leading to different optimum tuning values for different temperatures. As suggested in the silicon errata, tuning should be done in two stages. In stage 1, assign the optimum tuning ratio in the maximum pass window for the current temperature. In stage 2, if the chosen value is close to the small failure band, move away from it in the appropriate direction. Therefore, modify SDR104/HS200 DLL tuning algorithm as a workaround. Signed-off-by: Faiz Abbas <faiz_abbas@ti.com> Signed-off-by: Sekhar Nori <nsekhar@ti.com>
* | | | | Merge branch 'p-ti-lsk-linux-4.4.y-next' of ↵David Huang2017-11-025-3/+161
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.omapzoom.org/kernel/omap into p-ti-android-linux-4.4.y Auto Merge of: TI-Feature: linux-4.4.y-next_android-4.4.y TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y-next * 'p-ti-lsk-linux-4.4.y-next' of git://git.omapzoom.org/kernel/omap: remoteproc/omap: consolidate instance-specific pre_shutdown ops remoteproc/omap: Fix DSP recovery issues with EDMA Signed-off-by: David Huang <d-huang@ti.com>
| * | | | remoteproc/omap: consolidate instance-specific pre_shutdown opsSuman Anna2017-11-025-31/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The .pre_shutdown() ops is defined to handle certain pre-shutdown acvities. This is used by the DSP remoteproc devices on DRA7 SoCs to recover properly during error recovery when an active EDMA transaction was happening. These ops are currently defined to be instance specific, consolidate them into a single instance and derive the instance-id based on the device string names. This reduces the duplicity in pdata definitions and handling the same in remoteproc code. Change-Id: I648cb13596290dfeed7d79a3d4126a7af493d95a Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Sheng Zhao <shengzhao@ti.com>
| * | | | Merge "remoteproc/omap: Fix DSP recovery issues with EDMA" into ↵David Huang2017-11-025-3/+167
| |\ \ \ \ | | | | | | | | | | | | | | | | | | p-ti-lsk-linux-4.4.y-next
| | * | | | remoteproc/omap: Fix DSP recovery issues with EDMAStephen Molfetta2017-11-025-3/+167
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resetting the DSP subsystem while there are pending DSP EDMA transfers or while the DSP EDMA is receiving DMA events from various peripherals (e.g. McASP) can cause various issues in the recovery process: - L3 errors which create a complete system lockup - DSPSS does not reset properly and put TPTCs into an unusable state Prior to shutdown of a DSP core, two cleanup/checks are required in order to mitigate these issues: 1. Clear DSP EDMA crossbar routings Upon remoteproc reset of the DSP, DMA events may continue to arrive to the DSPs EDMA instance after the reset sequence has completed. Clearing the crossbar ensures that no unexpected events arrive to the DSP's EDMA after reset 2. Wait for DSP EDMA traffic completion After clearing DSP EDMA crossbar routings, we disable all future events and poll the various active bits of the TPCC and both TPTCs of the DSP's EDMA and wait for any pending transfers to complete prior to issuing the reset. Change-Id: If34e4f361cbccd6eb86476812be0d3b0362a0190 Signed-off-by: Stephen Molfetta <sjmolfetta@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com> [s-anna@ti.com: rebase from 3.14 to 4.4] Signed-off-by: Suman Anna <s-anna@ti.com> [shengzhao@ti.com: test and port from 3.14 to 4.4] Signed-off-by: Sheng Zhao <shengzhao@ti.com>
* | | | | | ti_config_fragments: android_am57x.cfg: USB built-inPraneeth Bajjuri2017-10-261-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | early mount is not ready for am57x platforms yet. This patch is to make USB built-in so that adb is functional. Need to be reverted once early mount is fixed. Change-Id: I67bca39a7ce89b2e2e51e06451545747faeb60d0 Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* | | | | | ti_config_fragments: android_am57x.cfg: Enable Display and touch built-inPraneeth Bajjuri2017-10-241-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Temp: GPEVM ui fails unless the equivalent configuration is not made as built-in. enabling as built-in for now. Change-Id: If3ffd3777f7756e58ca6a77703a031959813a388 Signed-off-by: Praneeth Bajjuri <praneeth@ti.com>
* | | | | | Merge branch 'p-ti-lsk-linux-4.4.y-next' of ↵David Huang2017-10-204-15/+50
|\| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.omapzoom.org/kernel/omap into p-ti-android-linux-4.4.y Auto Merge of: TI-Feature: linux-4.4.y-next_android-4.4.y TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y-next * 'p-ti-lsk-linux-4.4.y-next' of git://git.omapzoom.org/kernel/omap: net/rpmsg: fix a potential NULL pointer dereference in bind() net/rpmsg: fix possible kernel crash in callback for deleted sockets net/rpmsg: fix error status marking of new Rx sockets during recovery net/rpmsg: skip announcement of rpmsg devices created in bind() rpmsg: rpc: fix suspicious rcu_dereference_check() usage rpmsg: check for invalid parameters in couple of public API rpmsg: add input argument sanity checks to rpmsg_send functions Signed-off-by: David Huang <d-huang@ti.com>
| * | | | | Merge branch 'p-ti-lsk-linux-4.4.y' of git://git.omapzoom.org/kernel/omap ↵David Huang2017-10-204-15/+50
| |\ \ \ \ \ | | | |/ / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into p-ti-lsk-linux-4.4.y-next Manual Merge of: TI-Feature: linux-4.4.y_linux-4.4.y-next TI-Tree: git://git.omapzoom.org/kernel/omap.git TI-Branch: p-ti-lsk-linux-4.4.y * 'p-ti-lsk-linux-4.4.y' of git://git.omapzoom.org/kernel/omap: net/rpmsg: fix a potential NULL pointer dereference in bind() net/rpmsg: fix possible kernel crash in callback for deleted sockets net/rpmsg: fix error status marking of new Rx sockets during recovery net/rpmsg: skip announcement of rpmsg devices created in bind() rpmsg: rpc: fix suspicious rcu_dereference_check() usage rpmsg: check for invalid parameters in couple of public API rpmsg: add input argument sanity checks to rpmsg_send functions Signed-off-by: David Huang <d-huang@ti.com> Conflicts: net/rpmsg/rpmsg_proto.c
| | * | | | Merge branch 'ti-lsk-linux-4.4.y' of ↵David Huang2017-10-194-14/+57
| | |\ \ \ \ | | | | |/ / | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.ti.com/ti-linux-kernel/ti-linux-kernel into p-ti-lsk-linux-4.4.y Auto Merge of: TI-Feature: lcpd-linux-4.4.y_linux-4.4.y TI-Tree: git://git.ti.com/ti-linux-kernel/ti-linux-kernel.git TI-Branch: ti-lsk-linux-4.4.y * 'ti-lsk-linux-4.4.y' of git://git.ti.com/ti-linux-kernel/ti-linux-kernel: net/rpmsg: fix a potential NULL pointer dereference in bind() net/rpmsg: fix possible kernel crash in callback for deleted sockets net/rpmsg: fix error status marking of new Rx sockets during recovery net/rpmsg: skip announcement of rpmsg devices created in bind() rpmsg: rpc: fix suspicious rcu_dereference_check() usage rpmsg: check for invalid parameters in couple of public API rpmsg: add input argument sanity checks to rpmsg_send functions Signed-off-by: David Huang <d-huang@ti.com>
| | | * | | Merge branch 'ti-linux-4.4.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel ↵LCPD Auto Merger2017-10-184-14/+57
| | | |\ \ \ | | | | | |/ | | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into ti-lsk-linux-4.4.y TI-Feature: ti_linux_base_lsk TI-Tree: git@git.ti.com:ti-linux-kernel/ti-linux-kernel.git TI-Branch: ti-linux-4.4.y * 'ti-linux-4.4.y' of git.ti.com:ti-linux-kernel/ti-linux-kernel: net/rpmsg: fix a potential NULL pointer dereference in bind() net/rpmsg: fix possible kernel crash in callback for deleted sockets net/rpmsg: fix error status marking of new Rx sockets during recovery net/rpmsg: skip announcement of rpmsg devices created in bind() rpmsg: rpc: fix suspicious rcu_dereference_check() usage rpmsg: check for invalid parameters in couple of public API rpmsg: add input argument sanity checks to rpmsg_send functions Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
| | | | * | Merge branch 'rpmsg-ti-linux-4.4.y-intg' of git://git.ti.com/rpmsg/rpmsg ↵LCPD Auto Merger2017-10-184-14/+57
| | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | into ti-linux-4.4.y TI-Feature: rpmsg TI-Tree: git://git.ti.com/rpmsg/rpmsg.git TI-Branch: rpmsg-ti-linux-4.4.y-intg * 'rpmsg-ti-linux-4.4.y-intg' of git://git.ti.com/rpmsg/rpmsg: net/rpmsg: fix a potential NULL pointer dereference in bind() net/rpmsg: fix possible kernel crash in callback for deleted sockets net/rpmsg: fix error status marking of new Rx sockets during recovery net/rpmsg: skip announcement of rpmsg devices created in bind() rpmsg: rpc: fix suspicious rcu_dereference_check() usage rpmsg: check for invalid parameters in couple of public API rpmsg: add input argument sanity checks to rpmsg_send functions Signed-off-by: LCPD Auto Merger <lcpd_integration@list.ti.com>
| | | | | * | Merge branch 'rpmsg-ti-linux-4.4.y' of git://git.ti.com/rpmsg/rpmsg into ↵Suman Anna2017-10-184-14/+57
| | | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpmsg-ti-linux-4.4.y-intg Signed-off-by: Suman Anna <s-anna@ti.com>
| | | | | * | Merge branch 'rpmsg-linux-4.4.y' of git://git.ti.com/rpmsg/rpmsg into ↵Suman Anna2017-10-184-14/+57
| | | | | |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | rpmsg-ti-linux-4.4.y Pull in the updated rpmsg base feature branch that includes some additional sanity checking of input arguments in the virtio rpmsg core public API, a minor bug fix in the rpmsg-rpc driver with CONFIG_PROVE_RCU enabled, and various corner-case NULL pointer dereference kernel crash fixes in the rpmsg-proto driver with the TI MessageQ stack. * 'rpmsg-linux-4.4.y' of git://git.ti.com/rpmsg/rpmsg: net/rpmsg: fix a potential NULL pointer dereference in bind() net/rpmsg: fix possible kernel crash in callback for deleted sockets net/rpmsg: fix error status marking of new Rx sockets during recovery net/rpmsg: skip announcement of rpmsg devices created in bind() rpmsg: rpc: fix suspicious rcu_dereference_check() usage rpmsg: check for invalid parameters in couple of public API rpmsg: add input argument sanity checks to rpmsg_send functions Signed-off-by: Suman Anna <s-anna@ti.com>
| | | | | | * | net/rpmsg: fix a potential NULL pointer dereference in bind()Angela Stegmaier2017-10-171-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rpmsg proto driver creates a rpmsg channel device per remote processor through the socket's bind() interface (a Rx socket) for receiving messages from remote processors. The rpmsg channel device is created using a rpmsg_create_channel() API, which creates and registers a rpmsg device. The endpoint associated for this device is allocated during the rpmsg bus probe. In the rare case, the rpmsg bus probe can fail either to create an endpoint or return a failure from the corresponding rpmsg driver probe, and this failure status is not returned back to the callers of rpmsg_create_channel() function with no endpoint associated with the created rpmsg device. This can result in a potential NULL pointer panic in the rpmsg_sock_bind() function. Fix this by adding an additional check for a valid endpoint. The rpmsg_sock_bind() creates a rpmsg device tied to the rpmsg_proto driver itself, so the endpoint creation sequence is guaranteed to be executed in the rpmsg bus probe because of a guaranteed driver match for the device. The rpmsg device is also unregistered upon an endpoint allocation failure as part of the cleanup. Reported-by: Angela Stegmaier <angelabaker@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com> [s-anna@ti.com: add the rpmsg_destroy_channel() call for cleanup] Signed-off-by: Suman Anna <s-anna@ti.com>
| | | | | | * | net/rpmsg: fix possible kernel crash in callback for deleted socketsAngela Stegmaier2017-10-171-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rpmsg proto driver creates a rpmsg channel device per remote processor for each MessageQ object through the socket's bind() call (a Rx socket) for receiving messages. During error recovery, the virtio core removes the devices created by the Rx sockets, while the open sockets themselves can be freed up anytime either by the userspace closing them or through an automatic close when the process is terminated/closed. Commit e5a9a772354e ("net/rpmsg: set error status on open sockets after recovery") added the support for error recovery and handles the race conditions between both the rpmsg_sock_release() and rpmsg_proto_remove() paths. The rpmsg_sock_release() clears the end-point's private field for Rx sockets before destroying the endpoint. This presents a small window (until before the __rpmsg_destroy_ept() is invoked in virtio rpmsg core) during which a message can come in for a socket that has already been deleted, and results in a NULL pointer dereference kernel panic when the invalid (NULL) sk is accessed. This could happen, for example, when an application has incorrectly terminated while still communicating with the remote core. The remote core is unaware of the application's termination and continues to send messages. Fix this by adding a check in the rpmsg_proto callback for a NULL (invalid) sk before accessing the socket, and throw a warning if a message is received for any invalid socket. Note that this will not notify the remote processor of the error and it may still be unaware of the removal of the HOST rpmsg-proto socket unless it has some other mechanism for checking that the socket is still alive. All such messages are either dropped in the virtio rpmsg core or in the rpmsg proto driver's callback. Fixes: e5a9a772354e ("net/rpmsg: set error status on open sockets after recovery") Signed-off-by: Angela Stegmaier <angelabaker@ti.com> [s-anna@ti.com: add some more details to commit description] Signed-off-by: Suman Anna <s-anna@ti.com>
| | | | | | * | net/rpmsg: fix error status marking of new Rx sockets during recoverySuman Anna2017-10-171-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rpmsg proto driver creates a rpmsg channel device per remote processor for each MessageQ object through the socket's bind() call (a Rx socket) for receiving messages. These rpmsg channel devices do not have a designated dst address upon creation, and a dst address is automatically assigned the first time a message is received on the respective channel. An error status is set on all the bound (Rx) sockets during the auto-removal of the rpmsg devices during a remote processor recovery, but this logic is skipped for some devices with a dst address of RPMSG_ADDR_ANY. This causes some Rx sockets to be not marked properly if an error recovery happens before they receive a message, and this may result in a kernel panic during the cleanup of the corresponding socket upon the termination of the application. Fix this by adjusting the logic in rpmsg_proto_remove() so that all Rx sockets are marked properly irrespective of whether they received a message or not. An additional check is also added in the bind implementation to check for valid range of socket addresses since the logic in the probe and remove functions rely on this range to distinguish userspace created rpmsg channel devices and those published from the remote processor. Fixes: e5a9a772354e ("net/rpmsg: set error status on open sockets after recovery") Reported-by: Angela Stegmaier <angelabaker@ti.com> Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Angela Stegmaier <angelabaker@ti.com>
| | | | | | * | net/rpmsg: skip announcement of rpmsg devices created in bind()Angela Stegmaier2017-10-171-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The rpmsg proto driver creates a rpmsg channel device per remote processor (a Rx socket) for each MessageQ object through the socket's bind() call. These rpmsg channel devices are normally announced to the remote processor core, as these channels are treated as rpmsg server channels. The behavior of announcing the bound endpoints to the remote cores isn't necessary since binding is for local endpoints. Furthermore, the TI MessageQ stack doesn't require these devices to be announced as the object will be looked up using a higher-level protocol logic. Skip the announcing of these devices by overriding the rpmsg device's announce field in probe, so that the subsequent announce is skipped in the virtio rpmsg core. This approach limits the customization to the rpmsg proto driver leaving the virtio rpmsg core unchanged. It also has the added benefit of removing the extra delay of sending the notification to the remote processor. Signed-off-by: Angela Stegmaier <angelabaker@ti.com> [s-anna@ti.com: revise commit description] Signed-off-by: Suman Anna <s-anna@ti.com>