All of lore.kernel.org
 help / color / mirror / Atom feed
From: Miquel Raynal <miquel.raynal@bootlin.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [RTC][PATCH V0 0/7] Initial support of driver brcmnand (from kernel 4.18)
Date: Sat, 17 Nov 2018 10:01:18 +0100	[thread overview]
Message-ID: <20181117100118.150fe873@xps13> (raw)
In-Reply-To: <1542376624-17495-1-git-send-email-philippe.reynes@softathome.com>

Hi Philippe,

Thanks for the work.

Philippe Reynes <philippe.reynes@softathome.com> wrote on Fri, 16 Nov
2018 14:56:57 +0100:

> This serie is a RFC to port the support of driver brcmnand
> from kernel 4.18 to u-boot. I've tried to stay as close as
> possible to the kernel. In this first port, I haven't ported
> the support of DMA, it's not mandatory in the first step and
> it could be added later.
> 
> This code has been tested on bcm6838 (mips) and bcm6858 (arm64).
> This code isn't clean enough to be integrated. I just send this
> serie to show the code and ask some question.
> 
> In the code, I've used "#ifndef __UBOOT__" to show the
> difference between the kernel code. Is it a good way or
> is it better to just replace the code ?

I think it is a good way. I find harder to read the code, but much
easier to apply patches from Linux.

> 
> I've also added a file with brcmnand_compat.[hc] to compat
> function with the kernel (for example platform_get_resource_byname).
> What is the prefered way to support this function on u-boot ?
> - just replace them by other code on u-boot
> - just add this function on the brcmnand driver
> - share this code for others driver (adding compat file for platform device, ...)

In your case, helpers might find their ways in their respective
original .c/.h files. But then you can modify them to fit with U-Boot
(why not with a #ifdef __UBOOT__?). Plus, I think you missed some of
them that are already existing in U-Boot (even if they are dummy
inline functions for instance).

> 
> 
> Boris Brezillon (1):
>   mtd: nand: provide several helpers to do common NAND operations
> 
> Brian Norris (1):
>   mtd: add get/set of_node/flash_node helpers
> 
> Marc Gonzalez (1):
>   mtd: nand: import nand_hw_control_init()
> 

When you pick commits from other authors, what you do is:

[Linux commit: d45bc58dd3bdcaabc1d7d8d9b0b8dee826635cc6]
[Philippe Reynes: adapt code to u-boot and only keep new function]
Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>

Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com>
---

* I think the [Linux commit:] is generally in the commit log itself,
before the Git tags.
* You don't need this extra SoB tag at the end.
* I suggest that you always keep the entire file, even when adding
  unused functions, so that they will be available later if we continue
  backporting; so there will not be two commits with the exact same
  title+author in the future. If it triggers build issues, just add
  #ifdef statements.


Also, all patches must come with a description in the commit log (but
this is a preliminary version so you probably just did not take the time).


Thanks,
Miquèl

      parent reply	other threads:[~2018-11-17  9:01 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-16 13:56 [U-Boot] [RTC][PATCH V0 0/7] Initial support of driver brcmnand (from kernel 4.18) Philippe Reynes
2018-11-16 13:56 ` [U-Boot] [RFC][PATCH V0 1/7] mtd: add get/set of_node/flash_node helpers Philippe Reynes
2018-11-16 13:56 ` [U-Boot] [RFC][PATCH v0 2/7] mtd: nand: import nand_hw_control_init() Philippe Reynes
2018-11-16 13:57 ` [U-Boot] [RFC][PATCH v0 3/7] mtd: nand: provide several helpers to do common NAND operations Philippe Reynes
2018-11-16 13:57 ` [U-Boot] [RFC][PATCH V0 4/7] arm: asm: io.h: define readX_relaxed and writeX_relaxed Philippe Reynes
2018-11-16 13:57 ` [U-Boot] [RFC][PATCH V0 5/7] drivers: nand: brcmnand: add initial support Philippe Reynes
2018-11-16 13:57 ` [U-Boot] [RFC][PATCH V0 6/7] drivers: nand: brcmnand: add parameter parameter-page-big-endian Philippe Reynes
2018-11-16 13:57 ` [U-Boot] [RFC][PATCH V0 7/7] drivers: nand: brcmnand: add an option to read the write-protect from device tree Philippe Reynes
2018-11-17  9:01 ` Miquel Raynal [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=20181117100118.150fe873@xps13 \
    --to=miquel.raynal@bootlin.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 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.