Linux-Amlogic Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: narmstrong@baylibre.com (Neil Armstrong)
To: linus-amlogic@lists.infradead.org
Subject: [U-Boot] [PATCH u-boot 13/19] ARM: meson: rework soc arch file to prepare for new SoC
Date: Wed, 21 Nov 2018 10:34:08 +0100	[thread overview]
Message-ID: <98f64f0b-e144-d340-3a25-620c1b785a73@baylibre.com> (raw)
In-Reply-To: <6c757972-bfa1-b900-36cf-6d827d8a6f51@suse.de>

Hi Loic,

On 20/11/2018 22:11, Loic Devulder wrote:
> Hi Neil,
> 
> On 11/9/18 4:26 PM, Neil Armstrong wrote:
>> From: Jerome Brunet <jbrunet@baylibre.com>
>>
>> We are about to add support for the Amlogic AXG SoC. While very close to
>> the Gx SoC family, we will need to handle a few thing which are different
>> in this SoC. Rework the meson arch directory to prepare for this.
>>
>> Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
>> Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
>> ---

[...]

>> diff --git a/arch/arm/mach-meson/board-common.c b/arch/arm/mach-meson/board-common.c
>> new file mode 100644
>> index 0000000..0446507
>> --- /dev/null
>> +++ b/arch/arm/mach-meson/board-common.c
>> @@ -0,0 +1,56 @@
>> +// SPDX-License-Identifier: GPL-2.0+
>> +/*
>> + * (C) Copyright 2016 Beniamino Galvani <b.galvani@gmail.com>
>> + */
>> +
>> +#include <common.h>
>> +#include <linux/libfdt.h>
>> +#include <linux/err.h>
>> +#include <asm/arch/mem.h>
>> +#include <asm/arch/sm.h>
>> +#include <asm/armv8/mmu.h>
>> +#include <asm/unaligned.h>
>> +#include <efi_loader.h>
>> +
>> +DECLARE_GLOBAL_DATA_PTR;
>> +
>> +int dram_init(void)
>> +{
>> +	const fdt64_t *val;
>> +	int offset;
>> +	int len;
>> +
>> +	offset = fdt_path_offset(gd->fdt_blob, "/memory");
>> +	if (offset < 0)
>> +		return -EINVAL;
>> +
>> +	val = fdt_getprop(gd->fdt_blob, offset, "reg", &len);
>> +	if (len < sizeof(*val) * 2)
>> +		return -EINVAL;
>> +
>> +	/* Use unaligned access since cache is still disabled */
>> +	gd->ram_size = get_unaligned_be64(&val[1]);
>> +
>> +	return 0;
>> +}
>> +
>> +void meson_board_add_reserved_memory(void *fdt, u64 start, u64 size)
>> +{
>> +	int ret;
>> +
>> +	ret = fdt_add_mem_rsv(fdt, start, size);
>> +	if (ret)
>> +		printf("Could not reserve zone @ 0x%llx\n", start);
>> +
>> +	if (IS_ENABLED(CONFIG_EFI_LOADER)) {
>> +		efi_add_memory_map(start,
>> +				   ALIGN(size, EFI_PAGE_SIZE) >> EFI_PAGE_SHIFT,
>> +				   EFI_RESERVED_MEMORY_TYPE, false);
>> +	}
>> +}
>> +
>> +void reset_cpu(ulong addr)
>> +{
>> +	psci_system_reset();
>> +}
>> +
> 
> Also a small warning because of this blank line at EOF.

Will fix in v2, thanks !

> 
>> diff --git a/arch/arm/mach-meson/board-gx.c b/arch/arm/mach-meson/board-gx.c
>> new file mode 100644
>> index 0000000..f1397f8

[...]
Neil

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-amlogic/attachments/20181121/5646c5e6/attachment.sig>

  reply	other threads:[~2018-11-21  9:34 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-09 15:26 [PATCH u-boot 00/19] Amlogic Meson cleanup for AXG SoC support Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 01/19] ARM: meson: clean-up platform selection Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 02/19] configs: meson: remove unnecessary MESON_FDTFILE_SETTING Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 03/19] board: amlogic: remove p212 derivatives Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 04/19] board: amlogic: move khadas-vim2 as q200 ref board Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 05/19] board: amlogic: factorise gxbb boards Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 06/19] ARM: rework amlogic configuration Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 07/19] configs: meson: change default load addresses Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 08/19] pinctrl: meson: rework gx pmx function Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 09/19] pinctrl: meson: select generic pinctrl Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 10/19] pinctrl: meson: add axg support Neil Armstrong
2018-11-20 14:06   ` Carlo Caione
2018-11-20 14:47   ` Carlo Caione
2018-11-21  9:34     ` Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 11/19] clk: meson: add static to meson_gates table Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 12/19] clk: meson: silence debug print Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 13/19] ARM: meson: rework soc arch file to prepare for new SoC Neil Armstrong
2018-11-20 21:11   ` [U-Boot] " Loic Devulder
2018-11-21  9:34     ` Neil Armstrong [this message]
2018-11-09 15:26 ` [PATCH u-boot 14/19] ARM: meson: Add support for AXG family Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 15/19] ARM: dts: Sync Amlogic Meson AXG DT from Linux 4.20-rc1 Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 16/19] clk: Add clock driver for AXG Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 17/19] board: amlogic: add support for S400 board Neil Armstrong
2018-11-20 21:08   ` [U-Boot] " Loic Devulder
2018-11-21  9:32     ` Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 18/19] ARM: meson: factorize common code out amlogic's boards Neil Armstrong
2018-11-09 15:26 ` [PATCH u-boot 19/19] ARM: meson: Add boot device discovery Neil Armstrong

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=98f64f0b-e144-d340-3a25-620c1b785a73@baylibre.com \
    --to=narmstrong@baylibre.com \
    --cc=linus-amlogic@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