mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Andrey Smirnov <andrew.smirnov@gmail.com>
Cc: Cory Tusar <cory.tusar@zii.aero>,
	Barebox List <barebox@lists.infradead.org>
Subject: Re: [PATCH 4/7] misc: Add a driver to expose U-Boot environment variable data
Date: Wed, 29 May 2019 07:25:46 +0200	[thread overview]
Message-ID: <20190529052546.o3wk5plv6gykyjou@pengutronix.de> (raw)
In-Reply-To: <CAHQ1cqE+ghjtyvBGzORzKXTerQbEQ1c-r0yrSAu3-JwEcz4c8A@mail.gmail.com>

On Tue, May 28, 2019 at 06:19:51PM -0700, Andrey Smirnov wrote:
> On Tue, May 28, 2019 at 2:34 AM Sascha Hauer <s.hauer@pengutronix.de> wrote:
> >
> > On Mon, May 27, 2019 at 01:18:50PM -0700, Andrey Smirnov wrote:
> > > Add a driver to expose U-Boot environment variable data as a single
> > > mmap-able device. Not very useful on its own, it is a crucial
> > > low-level plumbing needed by filesystem driver introduced in the
> > > following commit.
> >
> > It wasn't clear to me why we need this driver at all, so it might be
> > worth adding a comment that this is for handling redundant env.
> >
> 
> Was it before of after you read the Kconfig help that talks about it?
> Asking to see if copying that text into commit would be enough, or if
> should write a more detailed explanation.

It was before I had read the Kconfig text. Indeed the Kconfig text makes
it clear.

> > > +      */
> > > +     ubdata->current = !ubdata->current;
> > > +
> > > +close_fd:
> > > +     close(fd);
> > > +     return ret;
> > > +}
> > > +
> > > +static struct cdev_operations ubootvar_ops = {
> > > +     .read = mem_read,
> > > +     .write = mem_write,
> > > +     .memmap = generic_memmap_rw,
> >
> > Ok, now I understand this struct resource thingy, you want to reuse
> > mem_read and friends. Given that these functions are oneliners to
> > implement I still suggest implementing them.
> >
> 
> OK, I'll have to make mem_copy() visible globally for them to remain
> one-liners, but that should be doable.

You won't need mem_copy(), plain memcpy() is enough. mem_copy() is only for
accessing registers in with the correct width, but that doesn't matter
here.

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2019-05-29  5:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-27 20:18 [PATCH 0/7] U-Boot environment data as a filesystem Andrey Smirnov
2019-05-27 20:18 ` [PATCH 1/7] filetype: Add "U-Boot environmemnt variable data" filetype Andrey Smirnov
2019-05-27 20:18 ` [PATCH 2/7] filetype: Allow specifying cdev's filetype explicitly Andrey Smirnov
2019-05-27 20:18 ` [PATCH 3/7] drivers: Introduce late_platform_driver() Andrey Smirnov
2019-05-27 20:18 ` [PATCH 4/7] misc: Add a driver to expose U-Boot environment variable data Andrey Smirnov
2019-05-28  9:34   ` Sascha Hauer
2019-05-29  1:19     ` Andrey Smirnov
2019-05-29  5:25       ` Sascha Hauer [this message]
2019-05-27 20:18 ` [PATCH 5/7] fs: Add a driver to access U-Boot environment variables Andrey Smirnov
2019-05-28  9:56   ` Sascha Hauer
2019-05-29  2:05     ` Andrey Smirnov
2019-05-29  6:08       ` Sascha Hauer
2019-05-27 20:18 ` [PATCH 6/7] ARM: rdu2: Add U-Boot environment partitions Andrey Smirnov
2019-05-28  9:57   ` Sascha Hauer
2019-05-29  0:56     ` Andrey Smirnov
2019-05-27 20:18 ` [PATCH 7/7] ARM: rdu1: Add U-Boot environment partition Andrey Smirnov

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=20190529052546.o3wk5plv6gykyjou@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=andrew.smirnov@gmail.com \
    --cc=barebox@lists.infradead.org \
    --cc=cory.tusar@zii.aero \
    /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