
On Thursday 26 May 2022 06:08:04 Priyanka Jain (OSS) wrote:
-----Original Message----- From: U-Boot u-boot-bounces@lists.denx.de On Behalf Of Pali Rohár Sent: Monday, April 25, 2022 8:18 PM To: Priyanka Jain priyanka.jain@nxp.com; Qiang Zhao qiang.zhao@nxp.com; Shengzhou Liu shengzhou.liu@nxp.com; Sinan Akman sinan@writeme.com Cc: u-boot@lists.denx.de Subject: [PATCH v2] board: freescale: p1_p2_rdb_pc: Move boot reset macros to p1_p2_bootsrc.h
Code for changing boot source is platform generic and can be used by any P1* and P2* compatible RDB board. Not only by boards which use config header file p1_p2_rdb_pc.h.
So move this code from p1_p2_rdb_pc.h to p1_p2_bootsrc.h and cleanup macros for generating boot source env variables in CONFIG_EXTRA_ENV_SETTINGS.
This allows to use code for resetting board and rebooting to other boot source also by other boards in future.
Signed-off-by: Pali Rohár pali@kernel.org
Changes in v2:
- Fix commit message
- Move macros to file p1_p2_bootsrc.h
- Rewrite macros even more to be more generic and use them without custom
macros in p1_p2_rdb_pc.h
include/configs/p1_p2_bootsrc.h | 55 +++++++++++++++++++++++++++++++++ include/configs/p1_p2_rdb_pc.h | 41 ++++++------------------ 2 files changed, 64 insertions(+), 32 deletions(-) create mode 100644 include/configs/p1_p2_bootsrc.h
diff --git a/include/configs/p1_p2_bootsrc.h b/include/configs/p1_p2_bootsrc.h new file mode 100644 index 000000000000..a274c57786f5 --- /dev/null +++ b/include/configs/p1_p2_bootsrc.h @@ -0,0 +1,55 @@ +// SPDX-License-Identifier: GPL-2.0+ +// (C) 2022 Pali Rohár pali@kernel.org
Code is copied from one file to another. Please don’t remove original copyright
I rewritten all those macros from scratch during moving and I therefore I have thought about copyright header (I just put default one here).
But I can copy+paste copyright header from old file, no problem.
<snip>
Regards Priyanka