devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Subject: Re: [PATCH] of/fdt: Add extern prototype for early_init_dt_scan_chosen_serial()
Date: Mon, 20 Oct 2014 17:22:01 +0800	[thread overview]
Message-ID: <CAL_JsqKzWfwMRheB0qGhcHFkj9zku2uevX7GF+=U4Qhd9m3VYg@mail.gmail.com> (raw)
In-Reply-To: <1413706294-12578-1-git-send-email-cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>

On Sun, Oct 19, 2014 at 4:11 PM, Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> The original commit that introduced this function (fb11ffe74c794a)
> indicated that calling it from the architecture code was one possible
> use case.  Let's declare it in of_fdt.h to make it a public API.

Who is the user for this?

Despite what I said, there would be issues calling this from arch
code. Doing so would result in 2 calls to this function as the
early_param call is not disabled. This could be fixed, but really we
want an arch to implement one of the other options.

Rob


>
> Signed-off-by: Kevin Cernekee <cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
> ---
>  include/linux/of_fdt.h | 8 ++++++++
>  1 file changed, 8 insertions(+)
>
> diff --git a/include/linux/of_fdt.h b/include/linux/of_fdt.h
> index 0ff360d..5d233df 100644
> --- a/include/linux/of_fdt.h
> +++ b/include/linux/of_fdt.h
> @@ -12,6 +12,7 @@
>  #ifndef _LINUX_OF_FDT_H
>  #define _LINUX_OF_FDT_H
>
> +#include <linux/errno.h>
>  #include <linux/types.h>
>  #include <linux/init.h>
>
> @@ -87,6 +88,13 @@ extern void early_init_devtree(void *);
>  extern void early_get_first_memblock_info(void *, phys_addr_t *);
>  extern u64 fdt_translate_address(const void *blob, int node_offset);
>  extern void of_fdt_limit_memory(int limit);
> +
> +#if defined(CONFIG_SERIAL_EARLYCON)
> +extern int early_init_dt_scan_chosen_serial(void);
> +#else
> +static inline int early_init_dt_scan_chosen_serial(void) { return -ENOENT; }
> +#endif
> +
>  #else /* CONFIG_OF_FLATTREE */
>  static inline void early_init_fdt_scan_reserved_mem(void) {}
>  static inline const char *of_flat_dt_get_machine_name(void) { return NULL; }
> --
> 2.1.1
>
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2014-10-20  9:22 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19  8:11 [PATCH] of/fdt: Add extern prototype for early_init_dt_scan_chosen_serial() Kevin Cernekee
     [not found] ` <1413706294-12578-1-git-send-email-cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-10-20  7:26   ` Geert Uytterhoeven
2014-10-20  9:22   ` Rob Herring [this message]
     [not found]     ` <CAL_JsqKzWfwMRheB0qGhcHFkj9zku2uevX7GF+=U4Qhd9m3VYg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-10-20 15:59       ` Kevin Cernekee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAL_JsqKzWfwMRheB0qGhcHFkj9zku2uevX7GF+=U4Qhd9m3VYg@mail.gmail.com' \
    --to=robh-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=cernekee-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).