> Date: Thu, 3 Jan 2019 22:47:14 +1100
> From: Jonathan Gray <[email protected]>
> Cc: [email protected]
> Content-Type: text/plain; charset="utf-8"
> Content-Disposition: inline
> 
> On Wed, Jan 02, 2019 at 04:08:53PM +1000, David Gwynne wrote:
> > This makes it more obvious what interesting things there are to hack on.
> > 
> > Thoughts? ok?
> > 
> > For example, from an od1000:
> > 
> > dlg@o1000 fdt$ dmesg | grep 'not configured'
> 
> The whitespace is wrong on 'return (UNCONF)'
> 
> The same diff for armv7 on cubox:

Best to keep the code in sync; ok kettenis@

> Index: simplebus.c
> ===================================================================
> RCS file: /cvs/src/sys/arch/arm/simplebus/simplebus.c,v
> retrieving revision 1.13
> diff -u -p -r1.13 simplebus.c
> --- simplebus.c       27 Apr 2017 22:41:46 -0000      1.13
> +++ simplebus.c       3 Jan 2019 11:39:56 -0000
> @@ -115,6 +115,26 @@ simplebus_submatch(struct device *self, 
>       return 0;
>  }
>  
> +int
> +simplebus_print(void *aux, const char *pnp)
> +{
> +     struct fdt_attach_args *fa = aux;
> +     char name[32];
> +
> +     if (!pnp)
> +             return (QUIET);
> +
> +     if (OF_getprop(fa->fa_node, "name", name, sizeof(name)) > 0) {
> +             name[sizeof(name) - 1] = 0;
> +             printf("\"%s\"", name);
> +     } else
> +             printf("node %u", fa->fa_node);
> +
> +     printf(" at %s", pnp);
> +
> +     return (UNCONF);
> +}
> +
>  /*
>   * Look for a driver that wants to be attached to this node.
>   */
> @@ -180,7 +200,8 @@ simplebus_attach_node(struct device *sel
>               OF_getpropintarray(node, "interrupts", fa.fa_intr, len);
>       }
>  
> -     config_found_sm(self, &fa, NULL, simplebus_submatch);
> +     config_found_sm(self, &fa, sc->sc_early ? NULL : simplebus_print,
> +         simplebus_submatch);
>  
>       free(fa.fa_reg, M_DEVBUF, fa.fa_nreg * sizeof(struct fdt_reg));
>       free(fa.fa_intr, M_DEVBUF, fa.fa_nintr * sizeof(uint32_t));
> 
> 

Reply via email to