All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Simek <monstr@monstr.eu>
To: u-boot@lists.denx.de
Subject: [PATCH] xilinx: Introduce board_late_init_xilinx()
Date: Thu, 30 Apr 2020 09:34:06 +0200	[thread overview]
Message-ID: <CAHTX3dJqmfJ+i-=RppqD=WHcshKeCn8AXMXx3yqsE0ERf-GhCg@mail.gmail.com> (raw)
In-Reply-To: <1c80f929f9ff22330c791c3c4441b487ad271b16.1586335808.git.michal.simek@xilinx.com>

st 8. 4. 2020 v 10:50 odes?latel Michal Simek <michal.simek@xilinx.com> napsal:
>
> This function should keep common shared late configurations for Xilinx
> SoCs.
>
> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
> ---
>
>  board/xilinx/common/board.c  |  8 ++++++++
>  board/xilinx/common/board.h  | 12 ++++++++++++
>  board/xilinx/versal/board.c  |  5 ++---
>  board/xilinx/zynq/board.c    |  5 ++---
>  board/xilinx/zynqmp/zynqmp.c |  5 ++---
>  5 files changed, 26 insertions(+), 9 deletions(-)
>  create mode 100644 board/xilinx/common/board.h
>
> diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
> index e83c692f2174..7c191e53fb71 100644
> --- a/board/xilinx/common/board.c
> +++ b/board/xilinx/common/board.c
> @@ -8,6 +8,7 @@
>  #include <asm/sections.h>
>  #include <dm/uclass.h>
>  #include <i2c.h>
> +#include "board.h"
>
>  int zynq_board_read_rom_ethaddr(unsigned char *ethaddr)
>  {
> @@ -71,3 +72,10 @@ void *board_fdt_blob_setup(void)
>         return NULL;
>  }
>  #endif
> +
> +int board_late_init_xilinx(void)
> +{
> +       env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
> +
> +       return 0;
> +}
> diff --git a/board/xilinx/common/board.h b/board/xilinx/common/board.h
> new file mode 100644
> index 000000000000..180dfbca1082
> --- /dev/null
> +++ b/board/xilinx/common/board.h
> @@ -0,0 +1,12 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/*
> + * (C) Copyright 2020 Xilinx, Inc.
> + * Michal Simek <michal.simek@xilinx.com>
> + */
> +
> +#ifndef _BOARD_XILINX_COMMON_BOARD_H
> +#define _BOARD_XILINX_COMMON_BOARD_H
> +
> +int board_late_init_xilinx(void);
> +
> +#endif /* BOARD_XILINX_COMMON_BOARD_H */
> diff --git a/board/xilinx/versal/board.c b/board/xilinx/versal/board.c
> index 75aedb092922..908ea87163f8 100644
> --- a/board/xilinx/versal/board.c
> +++ b/board/xilinx/versal/board.c
> @@ -17,6 +17,7 @@
>  #include <dm/uclass.h>
>  #include <versalpl.h>
>  #include <linux/sizes.h>
> +#include "../common/board.h"
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -204,9 +205,7 @@ int board_late_init(void)
>         initrd_hi = round_down(initrd_hi, SZ_16M);
>         env_set_addr("initrd_high", (void *)initrd_hi);
>
> -       env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
> -
> -       return 0;
> +       return board_late_init_xilinx();
>  }
>
>  int dram_init_banksize(void)
> diff --git a/board/xilinx/zynq/board.c b/board/xilinx/zynq/board.c
> index 420a5ca66311..2164eac8d518 100644
> --- a/board/xilinx/zynq/board.c
> +++ b/board/xilinx/zynq/board.c
> @@ -17,6 +17,7 @@
>  #include <zynqpl.h>
>  #include <asm/arch/hardware.h>
>  #include <asm/arch/sys_proto.h>
> +#include "../common/board.h"
>
>  DECLARE_GLOBAL_DATA_PTR;
>
> @@ -76,9 +77,7 @@ int board_late_init(void)
>
>         env_set("boot_targets", new_targets);
>
> -       env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
> -
> -       return 0;
> +       return board_late_init_xilinx();
>  }
>
>  #if !defined(CONFIG_SYS_SDRAM_BASE) && !defined(CONFIG_SYS_SDRAM_SIZE)
> diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
> index 3c92b1a5825f..b2172356ad0a 100644
> --- a/board/xilinx/zynqmp/zynqmp.c
> +++ b/board/xilinx/zynqmp/zynqmp.c
> @@ -27,6 +27,7 @@
>  #include <zynqmp_firmware.h>
>  #include <g_dnl.h>
>  #include <linux/sizes.h>
> +#include "../common/board.h"
>
>  #include "pm_cfg_obj.h"
>
> @@ -695,11 +696,9 @@ int board_late_init(void)
>         initrd_hi = round_down(initrd_hi, SZ_16M);
>         env_set_addr("initrd_high", (void *)initrd_hi);
>
> -       env_set_hex("script_offset_f", CONFIG_BOOT_SCRIPT_OFFSET);
> -
>         reset_reason();
>
> -       return 0;
> +       return board_late_init_xilinx();
>  }
>  #endif
>
> --
> 2.26.0
>

Applied but also fix antminer and topic Makefiles.

Thanks,
Michal

-- 
Michal Simek, Ing. (M.Eng), OpenPGP -> KeyID: FE3D1F91
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel - Xilinx Microblaze
Maintainer of Linux kernel - Xilinx Zynq ARM and ZynqMP ARM64 SoCs
U-Boot custodian - Xilinx Microblaze/Zynq/ZynqMP/Versal SoCs

      reply	other threads:[~2020-04-30  7:34 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-08  8:50 [PATCH] xilinx: Introduce board_late_init_xilinx() Michal Simek
2020-04-30  7:34 ` Michal Simek [this message]

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='CAHTX3dJqmfJ+i-=RppqD=WHcshKeCn8AXMXx3yqsE0ERf-GhCg@mail.gmail.com' \
    --to=monstr@monstr.eu \
    --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.