summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-11-11staging: mt7621-pci: avoid use of global variable 'pcie_link_status'Sergio Paracuellos
'pcie_link_status' is a global variable which is being used as a mask to know which virtual bridges are or not enabled. Instead of this extract a new 'mt7621_pcie_init_virtual_bridges' function where a similar local variable is used for the same task. This allow us to properly configure the virtual PCI-PCI bridges in configuration registers of the mt7621 pci controller. For a correct initiation of which is connected use 'enabled' field of 'mt7621_pcie_port' struct. With this change driver probe function gets a bit cleaner and readable. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: factor out 'mt7621_pcie_enable_ports' functionSergio Paracuellos
Driver probe function check for a bit in 'pcie_link_status' for enabling the pcie port or not. Instead of this add 'enabled' field in 'mt7621_pcie_port' structure and check its value to achieve this inside a new 'mt7621_pcie_enable_ports' function. The offsets for the correct port are derived from the slot of the port. This field 'enabled' is properly initilized in 'mt7621_pcie_init_port'. Also depending of the number of ports enabled we have to properly init its registers taking into account that we will use virtual bridges from zero to num_slots_enabled as follows: - Only one enabled -> only enable virtual bridge 0. - Two enabled -> enable virtual bridges 0 and 1. - Three enabled -> enable virtual bridges 0, 1 and 2. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: use dev_* functions instead of printkSergio Paracuellos
checkpatch script is complaining about the use of printk instead of use more proper dev_* kernel functions. Replace all of them removing warnings. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: use a trailing */ on a separate lineSergio Paracuellos
Chackpatch script is compalining about one comment which is not following the kernel style. Fix it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: remap and use sysctl from device treeSergio Paracuellos
There are some pointer read and writes which can be replaced properly using sysctl registers readed from device tree. Remap sysctl registers and replace in proper places. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-dts: add sysctl registers base address to pcieSergio Paracuellos
Add missing system control registers address in pcie node of the device tree. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: rename 'mt7621_pcie_enable_port' into ↵Sergio Paracuellos
'mt7621_pcie_init_port' Rename function 'mt7621_pcie_enable_port' with a name which is better for what the function is really doing calling it 'mt7621_pcie_init_port'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: debug port N_FTS inside 'mt7621_pcie_enable_port'Sergio Paracuellos
Move debug for the port N_FTS from driver probe function to the more appropiate one 'mt7621_pcie_enable_port'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: factor out 'mt7621_enable_phy' functionSergio Paracuellos
Factor out a new function 'mt7621_enable_phy' for enabling the pcie phy for each port and call it from 'mt7621_pcie_enable_port'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: rewrite pcie phy related functionsSergio Paracuellos
Function 'bypass_pipe_rst' and 'set_phy_for_ssc' can be written in a cleaner way. Instead of use comments to see which bits are the ones which are being enabled add new macros with that information using BIT and GENMASK kernel macros. Avoid the use of set_pcie_phy which is kind of dark and use new macros also resetting and adding bits using bitwise operators directly in the code. Now these function are offset-based on the port to use them cleaner in driver probe functio and improving readability. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: reagroup reset related macros all togetherSergio Paracuellos
Reset bits related macros are in different parts. Reagroup all of them together to improve readability. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: remove reset related unused macrosSergio Paracuellos
There are three macros which are not being used at all. Remove them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: remove two commented code linesSergio Paracuellos
This two lines whch are commented are not needed at all. Remove them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: remove GPL2+ text from license headerSergio Paracuellos
This file has a valid SPDX license line added so reamining GPL2+ boilerplate text is not needed at all. Remove it. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: remove [ASSERT|DEASSERT]_SYSRST_PCIE macrosSergio Paracuellos
Driver is using reset_control kernel API's to manage this so this two macros are not needed anymore. Remove them. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: factor out 'mt7621_pcie_enable_port' functionSergio Paracuellos
Driver probe function is a mess and shall be refactored a lot. At first make use of assert and deassert control factoring out a new function called 'mt7621_pcie_enable_port'. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: add two helpers for read and write pcie register portsSergio Paracuellos
mt7621-pcie_port data structure has filed 'base' as the base address for read and write related port registers. Create two inline functions 'pcie_port_read' and 'pcie_port_write' to make this task easier and code more readable. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: replace return value if devm_pci_alloc_host_bridge call ↵Sergio Paracuellos
fails Driver probe function calls 'devm_pci_alloc_host_bridge'. If this call fails it is returning -ENODEV. Return -ENOMEM instead which is more accurate for this. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: mt7621-pci: parse and init port data from device treeSergio Paracuellos
Add initialization of each PCIe port reading and initializing data using device tree. Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-11staging: wilc1000: update wilc1000 driver maintainer idsAjay Singh
We would like to update the maintainer email id's for wilc1000 driver. Signed-off-by: Aditya Shankar <aditya.shankar@microchip.com> Signed-off-by: Ganesh Krishna <ganesh.krishna@microchip.com> Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Ajay Singh <ajay.kathat@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: remove unmatched right bracketIoannis Valasakis
Remove unmatched right bracket. Reported by uncrustify. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: remove comparison to BOOLIoannis Valasakis
Remove two instances of a comparison to BOOL. Reported by coccinelle. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: remove extra space before tabIoannis Valasakis
Remove extra spaces before the tab character inside a comment section. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: add extra space around OR operatorIoannis Valasakis
Add extra spaces around the OR operator. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: remove multiple blank linesIoannis Valasakis
Remove extra blank lines to conform with coding style. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: remove space before tabIoannis Valasakis
Remove extra space before a tab character. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: remove multiple blank linesIoannis Valasakis
Remove continuous multiple blank lines. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: correct SPDX License IdentifierIoannis Valasakis
Replace SPDX License Identifier comments with C comments. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: align arguments with parenthesesIoannis Valasakis
Align arguments with the right side of the open left parentheses. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: fix SPDX License IdentifierIoannis Valasakis
Replace the SPDX identifier with standard C comment. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: align parameters to parenthesesIoannis Valasakis
Align parameters to the right side of the left parentheses Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: greybus: shorten comparison to NULLIoannis Valasakis
Shorten pointer NULL check by simple truth test. Reported by checkpatch. Signed-off-by: Ioannis Valasakis <code@wizofe.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: erofs: fix undefined LZ4_decompress_safe_partial()Gao Xiang
It needs an explicit LZ4 library dependency if lz4 compression is enabled, found by kbuild randconfig. Reported-by: kbuild test robot <lkp@intel.com> Fixes: 05f9d4a0c8c4 ("staging: erofs: use the new LZ4_decompress_safe_partial()") Signed-off-by: Gao Xiang <hsiangkao@aol.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: android: ion: Add per-heap countersAlexey Skidanov
Heap statistics have been removed and currently even basics statistics are missing. This patch creates per heap debugfs directory /sys/kernel/debug/<heap_name> and adds the following counters: - the number of allocated buffers; - the number of allocated bytes; - the number of allocated bytes watermark. Signed-off-by: Alexey Skidanov <alexey.skidanov@intel.com> Acked-by: Laura Abbott <labbott@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: davinci_vpfe: Remove multiple blank spaceIrenge Jules Bashizi
Remove multiple blank space complained by checkpatch Signed-off-by: Irenge Jules Bashizi <jbi.octave@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-09staging: davinci_vpfe: Change to !formatIrenge Jules Bashizi
Change from if(format==NULL) to if(!format) to remove checkpatch warning Signed-off-by: Irenge Jules Bashizi <jbi.octave@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: rtlwifi: Add spaces for commentsMaya Nakamura
Add spaces before and after text in comments. Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: rtlwifi: Remove empty commentMaya Nakamura
Remove a comment that does not contain any text. Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: rtlwifi: Improve line endingsMaya Nakamura
Edit statements so that the line does not end with an assignment operator or a parenthesis. Signed-off-by: Maya Nakamura <m.maya.nakamura@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: wlan-ng: reformatting in prism2mib.c to fit 80 character limitTim Collier
Reformat lines over 80 characters in prism2mib.c to resolve "line over 80 characters" warnings reported by checkpatch. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: wlan-ng: formatting change in cfg80211.cTim Collier
Resolve "line over 80 characters" warning reported by checkpatch by splitting function header over 2 lines. Signed-off-by: Tim Collier <osdevtc@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: emxx_udc: Added missing le16_to_cpu conversionsCarmeli Tamir
Fixed sparse tool warnings due to missing convesion from le16 to cpu endienness. Signed-off-by: Carmeli Tamir <carmeli.tamir@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: emxx_udc: Added missing __iomem modifier to handle p_regsCarmeli Tamir
Since in nbu2ss_drv_probe() p_regs is assigned from mmio_base, which is marked as __iomem, p_regs also should be market with __iomem. Signed-off-by: Carmeli Tamir <carmeli.tamir@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: emxx_udc: Added static modifier to udc_controllerCarmeli Tamir
Added static modifier to the udc_controller, since it's only required within emxx_udc.c. Signed-off-by: Carmeli Tamir <carmeli.tamir@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: olpc_dcon: olpc_dcon_xo_1.c: Switch to the gpio descriptor interfaceNishad Kamdar
Use the gpiod interface instead of the deprecated old non-descriptor interface in olpc_dcon_xo_1.c. Signed-off-by: Nishad Kamdar <nishadkamdar@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: bcm2835-audio: interpolate audio delayMike Brady
When the BCM2835 audio output is used, userspace sees a jitter up to 10ms in the audio position, aka "delay" -- the number of frames that must be output before a new frame would be played. Make this a bit nicer for userspace by interpolating the position using the CPU clock. The overhead is small -- an extra ktime_get() every time a GPU message is sent -- and another call and a few calculations whenever the delay is sought from userland. At 48,000 frames per second, i.e. approximately 20 microseconds per frame, it would take a clock inaccuracy of 20 microseconds in 10 milliseconds -- 2,000 parts per million -- to result in an inaccurate estimate, whereas crystal- or resonator-based clocks typically have an inaccuracy of 10s to 100s of parts per million. Signed-off-by: Mike Brady <mikebrady@eircom.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: wilc1000: remove unused flags in handle_cfg_param()Adham Abozaeid
handle_cfg_param() receives a bit map that describes what to be changed. Some of these bits flags aren't referred to from elsewhere and can be removed. Signed-off-by: Adham Abozaeid <adham.abozaeid@microchip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08staging: erofs: use the new LZ4_decompress_safe_partial()Gao Xiang
LZ4_decompress_safe_partial() can now decode exactly the nb of bytes requested after the upstreamed commit 2209fda323e2 ("lib/lz4: update LZ4 decompressor module"), remove the erofs hacked lz4 decompression code. A more cleaned compressor wrapper will be introduced in the subsequent patches in order to prepare for supporting multiple compression algorithms. Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Reviewed-by: Chao Yu <yuchao0@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-08media: staging: tegra-vde: print long unsigned using %lu format specifierColin Ian King
The frame.flags & FLAG_B_FRAME is promoted to a long unsigned because of the use of the BIT() macro when defining FLAG_B_FRAME and causing a build warning. Fix this by using the %lu format specifer. Cleans up warning: drivers/staging/media/tegra-vde/tegra-vde.c:267:5: warning: format specifies type 'int' but the argument has type 'unsigned long' [-Wformat] Fixes: 42e764d05712 ("staging: tegravde: replace bit assignment with macro") Cc: Ioannis Valasakis <code@wizofe.uk> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07staging: rtlwifi: SET_RATE_ID inline no arg reuseCristian Sicilia
The macro SET_RATE_ID is a definition in function and undefined at end of function. Make it as inline avoid the arg reuse for macro, the name is changed in _rtl_rate_id, following the same function pattern in the file. Signed-off-by: Cristian Sicilia <sicilia.cristian@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>