From: Alex G. <mr.nuke.me@gmail.com>
To: u-boot@lists.denx.de
Subject: [PATCH 4/7] spl: fit: Warn if FIT contains "fpga" property in config node
Date: Fri, 19 Mar 2021 09:53:45 -0500 [thread overview]
Message-ID: <05eb8cd5-4eee-5559-5dde-c8e81dae3d01@gmail.com> (raw)
In-Reply-To: <CAPnjgZ2RPd6=-LsfcN83cu6LyqFfa5i43MAqRo-4kFCHWXwRBw@mail.gmail.com>
On 3/18/21 1:44 AM, Simon Glass wrote:
> Hi Alexandru,
>
> On Thu, 11 Mar 2021 at 07:04, Alexandru Gagniuc <mr.nuke.me@gmail.com> wrote:
>>
>> Commit 4afc4f37c70e ("doc: FIT image: Clarify format and simplify
>> syntax") requires that FPGA images be referenced through the
>> "loadables" in the config node. This means that "fpga" properties in
>> config nodes are deprecated.
>>
>> Given that there are likely FIT images which use "fpga", let's not
>> break those right away. Print a warning message that such use is
>> deprecated, and give users a couple of releases to update their
>>
>> Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
>> ---
>> common/spl/spl_fit.c | 9 +++++++++
>> 1 file changed, 9 insertions(+)
>>
>> diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c
>> index 55fca9f399..68f29c0026 100644
>> --- a/common/spl/spl_fit.c
>> +++ b/common/spl/spl_fit.c
>> @@ -526,6 +526,13 @@ __weak bool spl_load_simple_fit_skip_processing(void)
>> return false;
>> }
>>
>> +static void warn_deprecated(const char *msg)
>> +{
>> + printf("DEPRECATED: %s\n", msg);
>> + printf("\tThis will stop working in a future u-boot release\n");
>> + printf("\tSee doc/uImage.FIT/source_file_format.txt\n");
>
> That is a lot of text to add...can it be shorter?
Sure. The idea was that we'd remove this message in a couple of releases
anyway, and we want it very loud until then. If I remove the middle
printf(), will thgat work ?
Alex
>> +}
>> +
>> static int spl_fit_upload_fpga(struct spl_fit_info *ctx, int node,
>> struct spl_image_info *fpga_image)
>> {
>> @@ -558,6 +565,8 @@ static int spl_fit_load_fpga(struct spl_fit_info *ctx,
>> if (node < 0)
>> return node;
>>
>> + warn_deprecated("'fpga' property in config node. Use 'loadables'");
>> +
>> /* Load the image and set up the fpga_image structure */
>> ret = spl_load_fit_image(info, sector, ctx, node, &fpga_image);
>> if (ret) {
>> --
>> 2.26.2
>>
>
> Regards,
> Simon
>
next prev parent reply other threads:[~2021-03-19 14:53 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-10 18:04 [PATCH 0/7] SPL: FIT: Bring the SPL_LOAD_FIT path in line with documentation Alexandru Gagniuc
2021-03-10 18:04 ` [PATCH 1/7] spl: fit: Don't overwrite previous loadable if "load" is missing Alexandru Gagniuc
2021-03-15 7:25 ` Simon Glass
2021-03-10 18:04 ` [PATCH 2/7] doc: FIT image: Introduce "u-boot,fpga-legacy" property Alexandru Gagniuc
2021-03-10 18:04 ` [PATCH 3/7] spl: fit: Move FPGA loading code to separate functions Alexandru Gagniuc
2021-03-15 7:25 ` Simon Glass
2021-03-10 18:04 ` [PATCH 4/7] spl: fit: Warn if FIT contains "fpga" property in config node Alexandru Gagniuc
2021-03-18 6:44 ` Simon Glass
2021-03-19 14:53 ` Alex G. [this message]
2021-03-19 23:54 ` Simon Glass
2021-03-10 18:04 ` [PATCH 5/7] spl: fit: Support loading FPGA images from list of "loadables" Alexandru Gagniuc
2021-03-29 7:43 ` Simon Glass
2021-03-29 15:35 ` Alex G.
2021-03-10 18:04 ` [PATCH 6/7] Kconfig: Document the limitations of the simple SPL_LOAD_FIT path Alexandru Gagniuc
2021-03-29 7:43 ` Simon Glass
2021-03-10 18:04 ` [PATCH 7/7] doc: FIT image: Update FPGA example to make use of "loadables" Alexandru Gagniuc
2021-03-29 7:43 ` Simon Glass
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=05eb8cd5-4eee-5559-5dde-c8e81dae3d01@gmail.com \
--to=mr.nuke.me@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox