- 23 Apr, 2018 40 commits
-
-
Gaurav Dhingra authored
Wrap comment to fix warning "prefer a maximum 75 chars per line" Signed-off-by: Gaurav Dhingra <gauravdhingra.gxyd@gmail.com> Acked-by: Vaibhav Agarwal <vaibhav.sr@gmail.com> Reviewed-by: Mark Greer <mgreer@animalcreek.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The dma_addr field of msdc_host is never used, so remove it. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The cmd_rsp_done field of msdc_host is never used, so remove it. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The field cmd_r1b_done in msdc_host is unused, so remove it. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The dma_left_size field of msdc_host is never used, remove it. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The reserved field of msdc_host is never used and msdc_host is also never exposed to hardware, so remove that field. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The starttime field of msdc_host is never used, remove it. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The current default transfer is to use DMA or not depending on the size of the data. The upstream driver mtk-sd uses DMA all times, change the standard mode here to DMA for testing, if there are any performance problems with DMA for small data sizes. If not, the option for transfer mode should be removed in the future, Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The msdc_init_gpd_bd function is currently hard to read, because of old, commented out code and a while loop, where a for loop is much easier to read. Refactor it to make the code more readable. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The xfersz field of msdc_dma is only set to host->xfer_size and this is also available at the (few) positions, where dma.xfersz is used, so it is removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The flags of msdc_dma are set to a constant value, so block and dword padding are disabled and checksum is enabled. By removing the field the code is easier to read and the difference to the mtk-sd driver is smaller. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The fields used_gpd|bd in struct msdc_dma are only set and reset, but never used, so remove them. The other removed fields are never used, so they were removed either. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Currently the msdc_dma_config function has some variables, that are not needed, uses the macro msdc_init_bd that is only used here and does not use the for_each_sg iterator. That last fact could cause a bug if the scatterlist is chained. The function is changed to remove these things, but none of the changes should change the behavior of it (despite the case of a linked scatterlist). Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The msdc_dma_dump function is disabled by a preprocessor macro, was only used in the msdc_dma_setup function. The code also contains no information about the device, it only dumps some memory for debug. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The burstsz field in msdc_dma is set to a constant value and later only used two times, using the constant directly in that places allows to remove the field and improves readability. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The data_offset field in msdc_hw is never used, so remove it. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Current code just busy waits with nop for clock becoming stable, relaxing the cpu here improves readability and portability and also removes a unnecessary difference with the mtk-sd driver. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The MT7621|7628_FPGA config flags are non existent in the tree, so code guarded by this flags can be removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
In the current code the hardware reset is realised via a macro and does only wait for a certain ammount of time for the controller to come out of reset state, but it should wait until it IS out of reset state. So it is refactored to improve this, it is also changed from a macro to a function and renamed to msdc_reset_hw to match the mtk-sd driver. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The ext_power_on|off fields of msdc_hw are never set, and only once checked for not being zero, so they can just be removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The enable|disable_sdio_irq() fields of msdc_hw are never set, so when they are called, they are null pointer. In case of the MSDC_EXT_SDIO_IRQ flag set in msdc0_hw, this happens. But because these fields are never set, they can simply be removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The disable_cd_eirq() field of msdc_hw is never set and only once checked for being non zero, so it is deleted. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The enable_cd_eirq() field of msdc_hw is never set and only once checked for not being zero, so it is removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The get_cd_status() field of msdc_hw is never set and there is only one check for it being non zero, so it is deleted. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The board.h file contins lot of never used code, to clean up the driver, this code is removed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Remove the owner assignment form the platform driver as platform_driver_register() already initializes the owner. Found using coccinelle. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Remove the owner assignment form the platform driver as platform_driver_register() already initializes the owner. Found using coccinelle. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Remove the owner assignment form the platform driver as platform_driver_register() already initializes the owner. Found using coccinelle. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The opcode check in msdc_command_start is redundant in case of MMC_SET_RELATIVE_ADDR, this is 3 like SD_SEND_RELATIVE_ADDR, so the second check can be removed. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
copy_from_user() returns a positive value in case of an error, to fix this the check is turned around, also a better return value is chosen. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Suggested-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Currently the debug file in proc fs is world writable, remove the access for other. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
If the debug file in proc fs is not successfully created current code prints an error message, this is removed. de is also not an error pointer, so the IS_ERR() call leads to a static checker warning. The unused return value of the msdc_debug_proc_init function is also removed. Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The MSDC_HIGHSPEED flag is always set and never unset, remove it to clean up the code. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The functions msdc_eirq_cd and msdc_eirq_sdio are defined but never used, so they are removed. This also fixes two compiler warnings: drivers/staging/mt7621-mmc/sd.c:517:13: warning: ‘msdc_eirq_cd’ defined but not used [-Wunused-function] static void msdc_eirq_cd(void *data) ^~~~~~~~~~~~ drivers/staging/mt7621-mmc/sd.c:507:13: warning: ‘msdc_eirq_sdio’ defined but not used [-Wunused-function] static void msdc_eirq_sdio(void *data) Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The mt6575_host variable is never used, only set and exported. Removing it for code cleanup. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The MSDC_SYS_SUSPEND flag is always set and is never unset. Removing it cleans up the code. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The mmc_suspend|resume_host functions have been decrepated in the 3.11 [1] release and were completely removed in 3.13 [2]. Removing the calls to this functions as it was done for other mmc host drivers before the old api was removed (eg. [3]) fixes compile errors in this driver while CONFIG_PM is enabled. The rest of the removed code is simply dead, the MSDC_SYS_SUSPEND flag is always set and will be removed in a later patch. [1] commit 986892ca ("mmc: core: Initiate suspend|resume from mmc bus instead of mmc host") [2] commit 3c0d22e8 ("mmc: core: Remove deprecated mmc_suspend|resume_host APIs") [3] commit 1e63d485 ("mmc: au1xmmc: Move away from using deprecated APIs") Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
Remove defines that are both in board.h and sd.c from sd.c, this file already includes board.h Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The request of the irq line is not correctly handled by the current code, platform_get_irq may fail and if the irq is requested via devm_request_irq, its release is automatically done. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Christian Lütke-Stetzkamp authored
The dma_alloc_coherent (and also dma_free_coherent) should get the device, the dma memory is allocated for as the first parameter. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-