Thread (24 messages) 24 messages, 4 authors, 2018-03-15

Re: [PATCH v2 03/15] mmc: mmci: Don't pretend all variants to have OPENDRAIN bit

From: Patrice CHOTARD <hidden>
Date: 2018-01-18 13:25:33
Also in: linux-arm-kernel, linux-clk, linux-gpio, linux-mmc, lkml

Hi Ulf

On 01/17/2018 10:33 AM, Ulf Hansson wrote:
[...]
quoted
  /* Busy detection for the ST Micro variant */
@@ -1455,16 +1465,13 @@ static void mmci_set_ios(struct mmc_host *mmc, struct mmc_ios *ios)
                                 ~MCI_ST_DATA2DIREN);
         }

-       if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN) {
-               if (host->hw_designer != AMBA_VENDOR_ST)
-                       pwr |= MCI_ROD;
-               else {
-                       /*
-                        * The ST Micro variant use the ROD bit for something
-                        * else and only has OD (Open Drain).
-                        */
-                       pwr |= MCI_OD;
-               }
+       if (ios->bus_mode == MMC_BUSMODE_OPENDRAIN &&
+           host->variant->opendrain) {
A few nitpicks (because I anyway had some comment on patch4):

The above can be written on one line and the brackets isn't needed.

Replace host->variant->opendrain with variant->opendrain. The same
applies to the below change.
Ah yes, i will fix it
quoted
+               /*
+                * The ST Micro variant use the ROD bit for
+                * something else and only has OD (Open Drain).
+                */
I think we can remove this comment, as this information becomes
implicit when we start using the variant data.
Ok

Thanks

Patrice
quoted
+               pwr |= host->variant->opendrain;
         }

         /*
--
1.9.1
Kind regards
Uffe
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help