An error occurred fetching the project authors.
- 09 Oct, 2018 14 commits
-
-
Ludovic Barre authored
This patch allows to define specific pio mask for variants. Needed to support the STM32 sdmmc variant which has some bits with different meaning (bits: 21,20,13,12,9) Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds datactrl variant property to define dpsm enable bit. Needed to support the STM32 variant (STM32 has no dpsm enable bit). Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds command variant properties to define cpsm enable bit and responses. Needed to support the STM32 variant (shift of cpsm bit, specific definition of commands response). Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
All variants don't pretend to have a startbiterr. -While data error check, if status register return an error (like MCI_DATACRCFAIL) we must avoid to check MCI_STARTBITERR (if not desired). -expand start_err to MCI_IRQENABLE to avoid to set this bit by default. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch allows to define a datactrl block size by variant, requested by STM32 sdmmc variant. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds set_clkreg and set_pwrreg callbacks at mmci_host_ops to allow to call specific variant. extends visibility of mmci_write_clk/pwrreg functions to be used into specific file variant. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds validate_data callback at mmci_host_ops to check specific constraints of variant. Move mmci_validate_data function to regroup mmci_host_ops interfaces. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds dma_error callback at mmci_host_ops to allow to call specific variant. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds dma_finalize callback at mmci_host_ops to allow to call specific variant. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds dma_start callback to mmci_host_ops. Create a generic mmci_dma_start function which regroup common action between variant. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds get_next_data callback to mmci_host_ops. Generic mmci_get_next_data factorizes next_cookie check and the host ops call. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch adds prepare/unprepare callbacks to mmci_host_ops. Like this mmci_pre/post_request can be generic, mmci_prepare_data and mmci_unprepare_data provide common next_cookie management. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
-Introduces dma_priv pointer to define specific needs for each dma engine. This patch is needed to prepare sdmmc variant with internal dma which not use dmaengine API. -Moves next cookie to mmci host structure to share same cookie management between all variants. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch creates a common mmci_dma_setup/release which calls dma_setup/release callbacks of mmci_host_ops and manages common features like use_dma... If there is a fallbacks to pio mode, dma functions must check use_dma. error management: -mmci_dmae_setup fail if Tx and Rx dma channels are not defined -qcom_dma_setup fail if one of both dma channels is not defined, Qcom has no specific resource to release, just mmci dmae resource. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 08 Oct, 2018 2 commits
-
-
Ludovic Barre authored
Recent versions of checkpatch have a new warning based on a documented preference of Linus to not use bool in structures due to wasted space and the size of bool is implementation dependent. For more information, see the email thread at https://lkml.org/lkml/2017/11/21/384 fix checkpatch --strict issues: -CHECK: Avoid using bool structure members because of possible alignment issues - see: https://lkml.org/lkml/2017/11/21/384 -WARNING: Avoid using bool as bitfield. Prefer bool bitfields as unsigned int or u<8|16|32> Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ludovic Barre authored
This patch internalizes the dma_inprogress into mmci dma interfaces. This allows to simplify and prepare the next dma callbacks for mmci host ops. dma_inprogress is called in mmci_dma_data_error and mmci_dma_finalize. Signed-off-by:
Ludovic Barre <ludovic.barre@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 01 Aug, 2018 1 commit
-
-
Ulf Hansson authored
As a first step to improve the variant specific code for mmci, add a ->dma_setup() callback to the struct mmci_host_ops. To show its use, let's deploy the callback for the qcom dml, which involves also to the assign the mmci_host_ops pointer from the variant ->init() callback. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by:
Ludovic Barre <ludovic.barre@st.com>
-
- 30 Jul, 2018 1 commit
-
-
Ulf Hansson authored
To be able to better support different mmci variants, we need to be able to use variant specific callbacks, rather than continue to sprinkle the code with additional variant data. To move in this direction, let's add an optional ->init() callback to the variant data struct, which variants shall use to assign the mmci_host_ops pointer. Using an ->init() callback enables us to partition the code between different files. To allow separate mmci variant files to implement the variant specifics, let's also move the definition of the struct variant_data to the common mmci header file. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by:
Ludovic Barre <ludovic.barre@st.com> Acked-by:
Linus Walleij <linus.walleij@linaro.org>
-
- 18 Jan, 2018 2 commits
-
-
Patrice Chotard authored
If variant hasn't the control bit to switch pads in opendrain mode, we can achieve the same result by asking to the pinmux driver to configure pins for us. This patch make the mmci driver able to do this whenever needed. Signed-off-by:
Andrea Merello <andrea.merello@gmail.com> Signed-off-by:
Patrice Chotard <patrice.chotard@st.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Patrice Chotard authored
Two mask registers are used in order to select which events have to actually generate an interrupt on each IRQ line. It seems that in the single-IRQ case it's assumed that the IRQs lines are simply OR-ed, while the two mask registers are still present. The driver still programs the two mask registers separately. However the STM32 variant has only one IRQ, and also has only one mask register. This patch prepares for STM32 variant support by making the driver using only one mask register. This patch also optimize the MMCIMASK1 mask usage by caching it into host->mask1_reg which avoid to read it into mmci_irq(). Tested only on STM32 variant. RFT for variants other than STM32 Signed-off-by:
Andrea Merello <andrea.merello@gmail.com> Signed-off-by:
Patrice Chotard <patrice.chotard@st.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 13 Feb, 2017 1 commit
-
-
Linus Walleij authored
commit 64b12a68 "mmc: core: fix prepared requests while doing bkops" is fixing a bug in the wrong way. A bug in the MMCI device driver is fixed by amending the MMC core. Thinking about it: what the pre- and post-callbacks are doing is to essentially map and unmap SG lists for DMA transfers. Why would we not be able to do that just because a BKOPS command is sent inbetween? Having to unprepare/prepare the next asynchronous request for DMA seems wrong. Looking the backtrace in that commit we can see what the real problem actually is: mmci_data_irq() is calling mmci_dma_unmap() twice which is goung to call arm_dma_unmap_sg() twice and v7_dma_inv_range() twice for the same sglist and that will crash. This happens because a request is prepared, then a BKOPS is sent. The IRQ completing the BKOPS command goes through mmci_data_irq() and thinks that a DMA operation has just been completed because dma_inprogress() reports true. It then proceeds to unmap the sglist. But that was wrong! dma_inprogress() should NOT be true because no DMA was actually in progress! We had just prepared the sglist, and the DMA channel dma_current has been configured, but NOT started! Because of this, the sglist is already unmapped when we get our actual data completion IRQ, and we are unmapping the sglist once more, and we get this crash. Therefore, we need to revert this solution pushing the problem to the core and causing problems, and instead augment the implementation such that dma_inprogress() only reports true if some DMA has actually been started. After this we can keep the request prepared during the BKOPS and we need not unprepare/reprepare it. Fixes: 64b12a68 ("mmc: core: fix prepared requests while doing bkops") Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Tested-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 29 Nov, 2016 2 commits
-
-
Linus Walleij authored
The ST Micro-specific busy detection was made after the assumption that only this variant supports busy detection. So when doing busy detection, the host immediately tries to use some ST-specific register bits. Since the qualcomm variant also supports some busy detection schemes, encapsulate the variant flags better in the variant struct and prepare to add more variants by just providing some bitmasks to the logic. Put the entire busy detection logic within an if()-clause in the mmci_cmd_irq() function so the code is only executed when busy detection is enabled, and so that it is kept in (almost) one place, and add comments describing what is going on so the code can be understood. Tested on the Ux500 by introducing some prints in the busy detection path and noticing how the IRQ is enabled, used and disabled successfully. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Linus Walleij authored
There was some confusion in the CPSM (Command Path State Machine) and DPSM (Data Path State Machine) regarding the naming of the registers, clarify the meaning of this acronym so the naming is understandable, and consistently use BIT() to define these fields. Consequently name the register bit defines MCI_[C|D]PSM_* and adjust the driver as well. Include new definitions for a few bits found in a patch from Srinivas Kandagatla. Cc: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 09 Jul, 2014 3 commits
-
-
Srinivas Kandagatla authored
MCIFIFOCNT register behaviour on Qcom chips is very different than the other pl180 integrations. MCIFIFOCNT register contains the number of words that are still waiting to be transferred through the FIFO. It keeps decrementing once the host CPU reads the MCIFIFO. With the existing logic and the MCIFIFOCNT behaviour, mmci_pio_read will loop forever, as the FIFOCNT register will always return transfer size before reading the FIFO. Also the data sheet states that "This register is only useful for debug purposes and should not be used for normal operation since it does not reflect data which may or may not be in the pipeline". This patch implements a qcom specific get_rx_fifocnt function which is implemented based on status register flags. Based on qcom_fifo flag in variant data structure, the corresponding get_rx_fifocnt function is selected. Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Srinivas Kandagatla authored
On Controllers like Qcom SD card controller where cclk is mclk and mclk should be directly controlled by the driver. This patch adds support to control mclk directly in the driver, and also adds explicit_mclk_control flag in variant structure giving more flexibility to the driver. Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> [Ulf Hansson] Fixed checkpatch warning Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Srinivas Kandagatla authored
This patch adds a Qualcomm SD Card controller specific register variations to header file. Qualcomm SDCC controller is pl180, with slight changes in the register layout from standard pl180 register set. Signed-off-by:
Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 12 May, 2014 2 commits
-
-
Ulf Hansson authored
Remove the option to provide signal direction configuration and feeback clock as platform data, enforce it through DT. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
Ulf Hansson authored
To avoid duplication of code while handling card detect and write protect GPIO pins/irqs, let's convert to use the mmc gpio API. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org>
-
- 23 Feb, 2014 1 commit
-
-
Ulf Hansson authored
The ux500 variants have HW busy detection support, which is indicated by the busy_detect flag. For these variants let's enable the MMC_CAP_WAIT_WHILE_BUSY flag and add the support for it. The mmc core will provide the RSP_BUSY command flag for those requests we should care about busy detection. Regarding the max_busy_timeout, the HW don't support busy detection timeouts so at this initial step let's make it simple and set it to zero to indicate we are able to support any timeout. Cc: Russell King <linux@arm.linux.org.uk> Cc: Johan Rudholm <jrudholm@gmail.com> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Chris Ball <chris@printf.net>
-
- 12 Feb, 2014 1 commit
-
-
Linus Walleij authored
These four (so far unused) flags are only found in the ST Micro versions of MMCI, so infix them properly with the _ST_ infix. Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 19 Sep, 2013 1 commit
-
-
Ulf Hansson authored
There is no need for every driver to fetch a pinctrl handle and to select the default state. Instead this is handled by the device driver core, thus we can remove this piece of code from mmci. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 22 May, 2013 3 commits
-
-
Ulf Hansson authored
To verify a signal voltage switch at initialization of UHS cards the .card_busy callback is used. For some of the ST-variants, card busy detection on the DAT0 pin is supported. We extend the variant struct with a busy_detect flag to indicate support for it. A corresponding busy detect function, which polls the busy status bit, is then set to the .card_busy callback. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Ulf Hansson authored
Add a cache variable in the host struct that reflects the current data in the MMCIDATACTRL register. This patch will not introduce any functional change but instead provide an easy option to keep specific bits in the register between each data transfer. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Ulf Hansson authored
We can not rely on regulator_is_enabled to decide whether to enable|disable the regulator. It would mean that the reference counter for it is not balanced properly. Instead keep track of our internal state by using a new flag in the host struct, so we can take correct decisions. Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 28 Jan, 2013 1 commit
-
-
Pawel Moll authored
The Versatile Express IOFPGA as shipped on VECD 5.0 (bitfiles v108/208 and v116/216) contains a modified version of the PL180 MMCI, with PeriphID Configuration value changed to 0x2. This version adds an optional "hardware flow control" feature. When enabled MMC card clock will be automatically disabled when FIFO is about to over/underflow and re-enabled once the host retrieved some data. This makes the controller immune to over/underrun errors caused by big interrupt handling latencies. This patch adds relevant device variant in the driver. Signed-off-by:
Pawel Moll <pawel.moll@arm.com> Reviewed-by:
Linus Walleij <linus.walleij@linaro.org> Acked-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 08 Jan, 2013 1 commit
-
-
Ulf Hansson authored
By using the mmc_regulator_get_supply API we are able to do some cleanups of the regulator code. Additionally let the regulator API handle the error printing. Cc: Chris Ball <cjb@laptop.org> Signed-off-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 04 Nov, 2012 1 commit
-
-
Linus Walleij authored
This fetches the pinctrl resource for the MMCI driver, and if a "default" state is found, it is activated. Acked-by:
Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 02 Feb, 2012 1 commit
-
-
Ulf Hansson authored
Instead of reading a register value everytime we need to apply a new value for it, maintain a cached copy for it. This also means we are able to skip writes that are not needed. Tested-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
- 20 Jan, 2012 2 commits
-
-
Ulf Hansson authored
The ST Micro variant supports bus signal direction indication. A new member in the variant struct is added for this. Moreover the actual signal direction configuration is board specific, thus the amba mmci platform data is extended with a new member to be able provide mmci with these specific board configurations. This patch is based upon a patch from Sebastian Rasmussen. Tested-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Sebastian Rasmussen <sebastian.rasmussen@stericsson.com> Signed-off-by:
Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-
Ulf Hansson authored
A significant increase (10-20%) in performance throughput for USB mass storage is the reason for incrementing the value. By some reason the USB driver allocates buffers which requires a scattergather list to contain a lot more than 16 elements to get optimal performance. This change sets the maximum elements to 128. Tests with large reads and large writes (100 MiB) show that the throughput increase is significant for write (10% for this test) but not for read. Tests are run on a Linux host with ext4 FS on the gadget mass storage device. The sg-len still exceeds 16 for the read tests but the performance gain is low or nothing. Tested-by:
Linus Walleij <linus.walleij@linaro.org> Signed-off-by:
Per Forlin <per.forlin@stericsson.com> Signed-off-by:
Ulf Hansson <ulf.hansson@stericsson.com> Signed-off-by:
Russell King <rmk+kernel@arm.linux.org.uk>
-