All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v4 2/2] sunxi: Pass serial number through ATAG
Date: Sun, 29 Mar 2015 14:49:05 +0200	[thread overview]
Message-ID: <5517F4C1.4080601@redhat.com> (raw)
In-Reply-To: <1427564136-25861-2-git-send-email-contact@paulk.fr>

Hi,

On 28-03-15 18:35, Paul Kocialkowski wrote:
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

Thanks, I've added this to my personal git repo, sunxi-wip
branch. I'll move it over to u-boot-sunxi/next once it
is clear that the kernel patch to show the devicetree
serial-number string /proc/cpuinfo is going to be accepted.

Regards,

Hans



> ---
>   board/sunxi/board.c            | 20 ++++++++++++++++++++
>   include/configs/sunxi-common.h |  1 +
>   2 files changed, 21 insertions(+)
>
> diff --git a/board/sunxi/board.c b/board/sunxi/board.c
> index 79516bf..d1b3c5e 100644
> --- a/board/sunxi/board.c
> +++ b/board/sunxi/board.c
> @@ -369,6 +369,26 @@ int g_dnl_board_usb_cable_connected(void)
>   }
>   #endif
>
> +#ifdef CONFIG_SERIAL_TAG
> +void get_board_serial(struct tag_serialnr *serialnr)
> +{
> +	char *serial_string;
> +	unsigned long long serial;
> +
> +	serial_string = getenv("serial#");
> +
> +	if (serial_string) {
> +		serial = simple_strtoull(serial_string, NULL, 16);
> +
> +		serialnr->high = (unsigned int) (serial >> 32);
> +		serialnr->low = (unsigned int) (serial & 0xffffffff);
> +	} else {
> +		serialnr->high = 0;
> +		serialnr->low = 0;
> +	}
> +}
> +#endif
> +
>   #ifdef CONFIG_MISC_INIT_R
>   int misc_init_r(void)
>   {
> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h
> index 1f7a1cb..b9bb971 100644
> --- a/include/configs/sunxi-common.h
> +++ b/include/configs/sunxi-common.h
> @@ -98,6 +98,7 @@
>   #define CONFIG_SETUP_MEMORY_TAGS
>   #define CONFIG_CMDLINE_TAG
>   #define CONFIG_INITRD_TAG
> +#define CONFIG_SERIAL_TAG
>
>   /* mmc config */
>   #if !defined(CONFIG_UART0_PORT_F)
>

  reply	other threads:[~2015-03-29 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-28 17:35 [U-Boot] [PATCH v4 1/2] sunxi: Serial number support, obtained from SID bits Paul Kocialkowski
2015-03-28 17:35 ` [U-Boot] [PATCH v4 2/2] sunxi: Pass serial number through ATAG Paul Kocialkowski
2015-03-29 12:49   ` Hans de Goede [this message]
2015-03-29 12:47 ` [U-Boot] [PATCH v4 1/2] sunxi: Serial number support, obtained from SID bits Hans de Goede

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=5517F4C1.4080601@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=u-boot@lists.denx.de \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.