devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
To: Qing Zhang <zhangqing@loongson.cn>
Cc: Rob Herring <robh+dt@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Marc Zyngier <maz@kernel.org>,
	Huacai Chen <chenhuacai@kernel.org>,
	devicetree@vger.kernel.org, linux-mips@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Jiaxun Yang <jiaxun.yang@flygoat.com>,
	Xingxing Su <suxingxing@loongson.cn>
Subject: Re: [PATCH 2/6] MIPS: Loongson64: Distinguish firmware dependencies DTB/LEFI.
Date: Tue, 9 Feb 2021 16:38:43 +0100	[thread overview]
Message-ID: <20210209153843.GA14595@alpha.franken.de> (raw)
In-Reply-To: <20210209093224.7085-3-zhangqing@loongson.cn>

On Tue, Feb 09, 2021 at 05:32:20PM +0800, Qing Zhang wrote:
> Add DTB boot support, only support LS2K1000 processor for now,
> determine whether to use the built-in DTB or the DTB from the
> firmware by checking the range of CKSEG0 and XKPHYS.
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
> Signed-off-by: Qing Zhang <zhangqing@loongson.cn>
> Signed-off-by: Xingxing Su <suxingxing@loongson.cn>
> ---
>  .../include/asm/mach-loongson64/boot_param.h     |  6 ++++++
>  arch/mips/include/asm/mach-loongson64/loongson.h |  3 ++-
>  arch/mips/loongson64/env.c                       | 13 ++++++++++++-
>  arch/mips/loongson64/init.c                      | 16 ++++++++++++++--
>  4 files changed, 34 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/mips/include/asm/mach-loongson64/boot_param.h b/arch/mips/include/asm/mach-loongson64/boot_param.h
> index 4592841b6b0c..53c29a305ff0 100644
> --- a/arch/mips/include/asm/mach-loongson64/boot_param.h
> +++ b/arch/mips/include/asm/mach-loongson64/boot_param.h
> @@ -198,7 +198,13 @@ enum loongson_bridge_type {
>  	VIRTUAL = 3
>  };
>  
> +enum loongson_fw_interface {
> +	LOONGSON_LEFI = 0,
> +	LOONGSON_DTB = 1,
> +};
> +
>  struct loongson_system_configuration {
> +	enum loongson_fw_interface fw_interface;

do you need this for future use ? Right now this information is only
needed in init.c and doesn't need to be exported...

> +	if (fw_arg2 == 0 || (be32_to_cpup((__be32 *)fw_arg2) == OF_DT_HEADER)) {

what about using fdt_magic(fw_arg2) == FDT_MAGIC ?

Thomas.

-- 
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea.                                                [ RFC1925, 2.3 ]

  reply	other threads:[~2021-02-09 15:39 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-09  9:32 [PATCH 0/6] Add basic support for Loongson-2K1000 Qing Zhang
2021-02-09  9:32 ` [PATCH 1/6] MIPS: Loongson64: DeviceTree for 2K1000 Qing Zhang
2021-02-09  9:32 ` [PATCH 2/6] MIPS: Loongson64: Distinguish firmware dependencies DTB/LEFI Qing Zhang
2021-02-09 15:38   ` Thomas Bogendoerfer [this message]
2021-02-09  9:32 ` [PATCH 3/6] MIPS: Loongson64: Add support for the 2K1000 to get cpu_clock_freq Qing Zhang
2021-02-09  9:32 ` [PATCH 4/6] MIPS: Loongson64: Add 2K1000 early_printk_port Qing Zhang
2021-02-10 11:18   ` Jiaxun Yang
2021-02-09  9:32 ` [PATCH 5/6] irqchip/loongson-liointc: irqchip add 2.0 version Qing Zhang
2021-02-10 11:17   ` Jiaxun Yang
2021-02-09  9:32 ` [PATCH 6/6] MIPS: Loongson64: Add a Loongson-2k default config file Qing Zhang

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=20210209153843.GA14595@alpha.franken.de \
    --to=tsbogend@alpha.franken.de \
    --cc=chenhuacai@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=jiaxun.yang@flygoat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=maz@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=suxingxing@loongson.cn \
    --cc=tglx@linutronix.de \
    --cc=zhangqing@loongson.cn \
    /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).