mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Antony Pavlov <antonynpavlov@gmail.com>
Cc: barebox@lists.infradead.org
Subject: Re: [RFC 2/4] of: add MIPS memory bank adding support
Date: Wed, 8 May 2013 23:23:29 +0200	[thread overview]
Message-ID: <20130508212329.GG32299@pengutronix.de> (raw)
In-Reply-To: <1367944452-20946-3-git-send-email-antonynpavlov@gmail.com>

On Tue, May 07, 2013 at 08:34:10PM +0400, Antony Pavlov wrote:
> The MIPS architecture has different view on memory
> resources than the ARM architecture.
> This patch move memory segment registration
> to a arch-specific files.
> 
> Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> ---
>  arch/arm/cpu/dtb.c   |   13 +++++++++++++
>  arch/mips/boot/dtb.c |   17 +++++++++++++++++
>  drivers/of/base.c    |    8 +-------
>  include/of.h         |    2 ++
>  4 files changed, 33 insertions(+), 7 deletions(-)
> 
> diff --git a/arch/arm/cpu/dtb.c b/arch/arm/cpu/dtb.c
> index 10b73bd..66346cf 100644
> --- a/arch/arm/cpu/dtb.c
> +++ b/arch/arm/cpu/dtb.c
> @@ -17,6 +17,19 @@
>  #include <common.h>
>  #include <init.h>
>  #include <of.h>
> +#include <memory.h>
> +
> +void of_add_memory_bank(struct device_node *node, bool dump, int r,
> +		u64 base, u64 size)
> +{
> +	static char str[6];
> +
> +	sprintf(str, "ram%d", r);
> +	barebox_add_memory_bank(str, base, size);
> +
> +	if (dump)
> +		pr_info("%s: %s: 0x%llx@0x%llx\n", node->name, str, size, base);
> +}

Would be good to have this as generic version and call it from arm
specific code. What about powerpc? Does it compile with this patch?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-05-08 21:23 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-07 16:34 [RFC 0/4] MIPS: add initial device tree support Antony Pavlov
2013-05-07 16:34 ` [RFC 1/4] " Antony Pavlov
2013-05-07 16:34 ` [RFC 2/4] of: add MIPS memory bank adding support Antony Pavlov
2013-05-08 21:23   ` Sascha Hauer [this message]
2013-05-07 16:34 ` [RFC 3/4] MIPS: qemu-malta: add device tree support Antony Pavlov
2013-05-07 16:34 ` [RFC 4/4] MIPS: qemu-malta_defconfig: enable OF support Antony Pavlov

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=20130508212329.GG32299@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.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