Re: svn commit: r353575 - head/sys/dev/mmc/host

2019-10-15 Thread Emmanuel Vadot
On Tue, 15 Oct 2019 18:37:57 +0100
Ruslan Bukin  wrote:

> On Tue, Oct 15, 2019 at 07:34:51PM +0200, Emmanuel Vadot wrote:
> > On Tue, 15 Oct 2019 17:24:22 + (UTC)
> > Ruslan Bukin  wrote:
> > 
> > > Author: br
> > > Date: Tue Oct 15 17:24:21 2019
> > > New Revision: 353575
> > > URL: https://svnweb.freebsd.org/changeset/base/353575
> > > 
> > > Log:
> > >   Fix dwmmc(4) driver attachment when ext_resources are not present.
> > >   
> > >   Ignore only ENOENT (no DTS properties found) and ENODEV (driver not
> > >   present) non-zero return values from ext_resources.
> > >   
> > >   Reviewed by:manu
> > >   Sponsored by:   DARPA, AFRL
> > >   Differential Revision:  https://reviews.freebsd.org/D22043
> > > 
> > > Modified:
> > >   head/sys/dev/mmc/host/dwmmc.c
> > 
> >  I've just realized that you are probably using the SOCFPGA kernel
> > configuration and it doesn't have option EXT_RESOURCES so how did you
> > got those errors ?
> 
> No, I'm using arm64 GENERIC kernel since Intel Stratix 10 is arm64/FPGA.
> 
> Ruslan

 Ah ok, I though this was the previous generation. Again I think that
would be good to spend a few days to properly support the ext resources
from this platform. This seems to be the only arm64 SoC that doesn't
support it.

-- 
Emmanuel Vadot 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r353575 - head/sys/dev/mmc/host

2019-10-15 Thread Ruslan Bukin
On Tue, Oct 15, 2019 at 07:34:51PM +0200, Emmanuel Vadot wrote:
> On Tue, 15 Oct 2019 17:24:22 + (UTC)
> Ruslan Bukin  wrote:
> 
> > Author: br
> > Date: Tue Oct 15 17:24:21 2019
> > New Revision: 353575
> > URL: https://svnweb.freebsd.org/changeset/base/353575
> > 
> > Log:
> >   Fix dwmmc(4) driver attachment when ext_resources are not present.
> >   
> >   Ignore only ENOENT (no DTS properties found) and ENODEV (driver not
> >   present) non-zero return values from ext_resources.
> >   
> >   Reviewed by:  manu
> >   Sponsored by: DARPA, AFRL
> >   Differential Revision:https://reviews.freebsd.org/D22043
> > 
> > Modified:
> >   head/sys/dev/mmc/host/dwmmc.c
> 
>  I've just realized that you are probably using the SOCFPGA kernel
> configuration and it doesn't have option EXT_RESOURCES so how did you
> got those errors ?

No, I'm using arm64 GENERIC kernel since Intel Stratix 10 is arm64/FPGA.

Ruslan

___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r353575 - head/sys/dev/mmc/host

2019-10-15 Thread Emmanuel Vadot
On Tue, 15 Oct 2019 17:24:22 + (UTC)
Ruslan Bukin  wrote:

> Author: br
> Date: Tue Oct 15 17:24:21 2019
> New Revision: 353575
> URL: https://svnweb.freebsd.org/changeset/base/353575
> 
> Log:
>   Fix dwmmc(4) driver attachment when ext_resources are not present.
>   
>   Ignore only ENOENT (no DTS properties found) and ENODEV (driver not
>   present) non-zero return values from ext_resources.
>   
>   Reviewed by:manu
>   Sponsored by:   DARPA, AFRL
>   Differential Revision:  https://reviews.freebsd.org/D22043
> 
> Modified:
>   head/sys/dev/mmc/host/dwmmc.c

 I've just realized that you are probably using the SOCFPGA kernel
configuration and it doesn't have option EXT_RESOURCES so how did you
got those errors ?

> Modified: head/sys/dev/mmc/host/dwmmc.c
> ==
> --- head/sys/dev/mmc/host/dwmmc.c Tue Oct 15 17:17:16 2019
> (r353574)
> +++ head/sys/dev/mmc/host/dwmmc.c Tue Oct 15 17:24:21 2019
> (r353575)
> @@ -457,20 +457,32 @@ parse_fdt(struct dwmmc_softc *sc)
>  
>   /* IP block reset is optional */
>   error = hwreset_get_by_ofw_name(sc->dev, 0, "reset", >hwreset);
> - if (error != 0 && error != ENOENT)
> + if (error != 0 &&
> + error != ENOENT &&
> + error != ENODEV) {
>   device_printf(sc->dev, "Cannot get reset\n");
> + goto fail;
> + }
>  
>   /* vmmc regulator is optional */
>   error = regulator_get_by_ofw_property(sc->dev, 0, "vmmc-supply",
>>vmmc);
> - if (error != 0 && error != ENOENT)
> + if (error != 0 &&
> + error != ENOENT &&
> + error != ENODEV) {
>   device_printf(sc->dev, "Cannot get regulator 'vmmc-supply'\n");
> + goto fail;
> + }
>  
>   /* vqmmc regulator is optional */
>   error = regulator_get_by_ofw_property(sc->dev, 0, "vqmmc-supply",
>>vqmmc);
> - if (error != 0 && error != ENOENT)
> + if (error != 0 &&
> + error != ENOENT &&
> + error != ENODEV) {
>   device_printf(sc->dev, "Cannot get regulator 'vqmmc-supply'\n");
> + goto fail;
> + }
>  
>   /* Assert reset first */
>   if (sc->hwreset != NULL) {
> @@ -483,8 +495,12 @@ parse_fdt(struct dwmmc_softc *sc)
>  
>   /* BIU (Bus Interface Unit clock) is optional */
>   error = clk_get_by_ofw_name(sc->dev, 0, "biu", >biu);
> - if (error != 0 && error != ENOENT)
> + if (error != 0 &&
> + error != ENOENT &&
> + error != ENODEV) {
>   device_printf(sc->dev, "Cannot get 'biu' clock\n");
> + goto fail;
> + }
>  
>   if (sc->biu) {
>   error = clk_enable(sc->biu);
> @@ -499,8 +515,12 @@ parse_fdt(struct dwmmc_softc *sc)
>* if no clock-frequency property is given
>*/
>   error = clk_get_by_ofw_name(sc->dev, 0, "ciu", >ciu);
> - if (error != 0 && error != ENOENT)
> + if (error != 0 &&
> + error != ENOENT &&
> + error != ENODEV) {
>   device_printf(sc->dev, "Cannot get 'ciu' clock\n");
> + goto fail;
> + }
>  
>   if (sc->ciu) {
>   if (bus_hz != 0) {


-- 
Emmanuel Vadot 
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


svn commit: r353575 - head/sys/dev/mmc/host

2019-10-15 Thread Ruslan Bukin
Author: br
Date: Tue Oct 15 17:24:21 2019
New Revision: 353575
URL: https://svnweb.freebsd.org/changeset/base/353575

Log:
  Fix dwmmc(4) driver attachment when ext_resources are not present.
  
  Ignore only ENOENT (no DTS properties found) and ENODEV (driver not
  present) non-zero return values from ext_resources.
  
  Reviewed by:  manu
  Sponsored by: DARPA, AFRL
  Differential Revision:https://reviews.freebsd.org/D22043

Modified:
  head/sys/dev/mmc/host/dwmmc.c

Modified: head/sys/dev/mmc/host/dwmmc.c
==
--- head/sys/dev/mmc/host/dwmmc.c   Tue Oct 15 17:17:16 2019
(r353574)
+++ head/sys/dev/mmc/host/dwmmc.c   Tue Oct 15 17:24:21 2019
(r353575)
@@ -457,20 +457,32 @@ parse_fdt(struct dwmmc_softc *sc)
 
/* IP block reset is optional */
error = hwreset_get_by_ofw_name(sc->dev, 0, "reset", >hwreset);
-   if (error != 0 && error != ENOENT)
+   if (error != 0 &&
+   error != ENOENT &&
+   error != ENODEV) {
device_printf(sc->dev, "Cannot get reset\n");
+   goto fail;
+   }
 
/* vmmc regulator is optional */
error = regulator_get_by_ofw_property(sc->dev, 0, "vmmc-supply",
 >vmmc);
-   if (error != 0 && error != ENOENT)
+   if (error != 0 &&
+   error != ENOENT &&
+   error != ENODEV) {
device_printf(sc->dev, "Cannot get regulator 'vmmc-supply'\n");
+   goto fail;
+   }
 
/* vqmmc regulator is optional */
error = regulator_get_by_ofw_property(sc->dev, 0, "vqmmc-supply",
 >vqmmc);
-   if (error != 0 && error != ENOENT)
+   if (error != 0 &&
+   error != ENOENT &&
+   error != ENODEV) {
device_printf(sc->dev, "Cannot get regulator 'vqmmc-supply'\n");
+   goto fail;
+   }
 
/* Assert reset first */
if (sc->hwreset != NULL) {
@@ -483,8 +495,12 @@ parse_fdt(struct dwmmc_softc *sc)
 
/* BIU (Bus Interface Unit clock) is optional */
error = clk_get_by_ofw_name(sc->dev, 0, "biu", >biu);
-   if (error != 0 && error != ENOENT)
+   if (error != 0 &&
+   error != ENOENT &&
+   error != ENODEV) {
device_printf(sc->dev, "Cannot get 'biu' clock\n");
+   goto fail;
+   }
 
if (sc->biu) {
error = clk_enable(sc->biu);
@@ -499,8 +515,12 @@ parse_fdt(struct dwmmc_softc *sc)
 * if no clock-frequency property is given
 */
error = clk_get_by_ofw_name(sc->dev, 0, "ciu", >ciu);
-   if (error != 0 && error != ENOENT)
+   if (error != 0 &&
+   error != ENOENT &&
+   error != ENODEV) {
device_printf(sc->dev, "Cannot get 'ciu' clock\n");
+   goto fail;
+   }
 
if (sc->ciu) {
if (bus_hz != 0) {
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"