From: Andre Przywara <andre.przywara@arm.com>
To: Stephen Graf <stephen.graf@gmail.com>
Cc: Mikhail Kalashnikov <iuncuim@gmail.com>,
Jagan Teki <jagan@amarulasolutions.com>,
Vignesh R <vigneshr@ti.com>,
Jaehoon Chung <jh80.chung@samsung.com>,
Jernej Skrabec <jernej.skrabec@gmail.com>,
Piotr Oniszczuk <piotr.oniszczuk@gmail.com>,
u-boot@lists.denx.de, linux-sunxi@lists.linux.dev
Subject: Re: [PATCH 1/1] correct documentation for SPI flashing
Date: Sun, 3 Dec 2023 23:40:14 +0000 [thread overview]
Message-ID: <20231203234014.5dc4cbe7@slackpad.lan> (raw)
In-Reply-To: <ef003512-e433-4d83-87a4-5ae3341f6399@gmail.com>
On Fri, 1 Dec 2023 10:50:39 -0800
Stephen Graf <stephen.graf@gmail.com> wrote:
Hi Stephen,
thanks for the patch, and you almost nailed it, some little things:
- The patch should start a new thread on the list, so do not reply to
an existing discussion or (un)related patch. This avoids the patch
getting buried in longish threads and helps tools like patchworks to
find and process it. Also please just send the patch, and avoid any
quoted text from previous discussions outside of the commit message.
- Please prefix your commit message with some context tags, in this
case "sunxi: ", so that people scanning the list can ignore it if
it's outside their scope of interest.
- Please limit commit messages to 75 characters per line.
$ scripts/checkpatch.pl
0001-correct_documentation_for_SPI_flashing.patch
will do some checks on the patch and would report this.
Anyway, those are minor things, I will just fix them while committing.
> The mtd_debug write does not work in this context. The flashcp command does work, provides
> both the erase and write functions and with the verbose option gives good feedback.
>
> Signed-off-by: Stephen Graf <stephen.graf@gmail.com>
Reviewed-by: Andre Przywara <andre.przywara@arm.com>
Cheers,
Andre
> ---
> doc/board/allwinner/sunxi.rst | 3 +--
> 1 file changed, 1 insertions(+), 2 deletions(-)
>
> diff --git a/doc/board/allwinner/sunxi.rst b/doc/board/allwinner/sunxi.rst
> index 797222d8d3..d0c89b956b 100644
> --- a/doc/board/allwinner/sunxi.rst
> +++ b/doc/board/allwinner/sunxi.rst
> @@ -251,8 +251,7 @@ the SPI flash content from Linux, using the `MTD utils`_::
>
> # apt-get install mtd-utils
> # mtdinfo
> - # mtd_debug erase /dev/mtdX 0 0xf0000
> - # mtd_debug write /dev/mtdX 0 0xf0000 u-boot-sunxi-with-spl.bin
> + # flashcp -v u-boot-sunxi-with-spl.bin /dev/mtdX
>
> ``/dev/mtdX`` needs to be replaced with the respective device name, as listed
> in the output of ``mtdinfo``.
> ---
>
> On 2023-11-30 4:27 p.m., Andre Przywara wrote:
> > Hi Stephen,
> >
> > On 30/11/2023 01:13, Stephen Graf wrote:
> >> Is the attached patch file going in the right direction?
> >
> > yes, thanks, the change itself looks alright, but it needs to be:
> > - in a separate email, with a descriptive subject, prefixed by [PATCH]
> > - have the diff inline, not as an attachment (to allow easy commenting in an email thread)
> > - have a Signed-off-by: tag with your name and email address. This is to signify that the change is an original one made by you and you are happy to submit this under the (GPL) license conditions.
> > - an explanation *why* this change is required (mtd_debug write being not reliable, etc)
> > - sent to the U-Boot list and the maintainer (me)
> >
> > Look at the U-Boot mailing list (archive) for examples.
> > "git format-patch" creates everything in the right format (mbox), and "git send-email" will send this via an SMTP server you point it to. Or you import this into your client.
> >
> > If you could try this (with the Signed-off-by being the most important change), I am happy to submit this with the next push.
> >
> > Thanks,
> > Andre
> >
> >>
> >> On 2023-11-29 3:57 p.m., Andre Przywara wrote:
> >>> Hi Stephen,
> >>>
> >>> On 28/11/2023 20:07, Stephen Graf wrote:
> >>>> Below is the console log from trying to use mtd_debug write. It returned immediately with a strange success message.
> >>>>
> >>>> root@orangepizero3:~# mtd_debug write /dev/mtd0 0 0xf0000 /home/sysadmin/u-boot-sunxi-with-spl.bin
> >>>> file_to_flash: fread, size 0xf0000, n 0xf0000
> >>>> fread(): Success
> >>>
> >>> interesting, I was under the impression that "mtd_debug write" would be the way to write to flash. In hindsight, the "debug" in that name should have probably put me off. Anyway, "cat" is probably not a good choice, "dd" is better, but it looks like "flashcp" (also part of mtdutils) is the go-to tool, since it does the required erasing automatically and also reportedly does some error detection. Can you please test this?
> >>> # flashcp u-boot-sunxi-with-spl.bin /dev/mtd0
> >>> I would test this on my end ASAP as well.
> >>>
> >>> Do you feel like sending a patch to the U-Boot documentation to get this changed then?
> >>>
> >>> Thanks,
> >>> Andre
> >>>
>
next prev parent reply other threads:[~2023-12-03 23:41 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-14 1:31 [PATCH 0/3] sunxi: add OrangePi Zero 3 board support Andre Przywara
2023-11-14 1:31 ` [PATCH 1/3] mtd: spi-nor: Add support for zBIT ZB25VQ128 Andre Przywara
2023-11-14 1:31 ` [PATCH 2/3] sunxi: H616: remove default AXP305 selection Andre Przywara
2023-11-14 13:24 ` Jaehoon Chung
2023-11-14 1:31 ` [PATCH 3/3] sunxi: H616: Add OrangePi Zero 3 board support Andre Przywara
2023-11-25 17:43 ` Mikhail Kalashnikov
2023-11-26 0:23 ` Andre Przywara
2023-11-26 4:27 ` Stephen Graf
2023-11-26 12:23 ` Andre Przywara
2023-11-27 20:21 ` Stephen Graf
2023-11-27 22:31 ` Stephen Graf
2023-11-28 1:37 ` Andre Przywara
2023-11-28 2:35 ` Stephen Graf
2023-11-28 6:03 ` Stephen Graf
2023-11-28 20:07 ` mdt_debug write Stephen Graf
2023-11-29 23:57 ` Andre Przywara
2023-11-30 0:20 ` Stephen Graf
2023-11-30 1:13 ` Stephen Graf
2023-12-01 0:27 ` Andre Przywara
2023-12-01 18:50 ` [PATCH 1/1] correct documentation for SPI flashing Stephen Graf
2023-12-03 23:40 ` Andre Przywara [this message]
2023-11-29 18:45 ` OrangePI Zero3 memory timing testing Stephen Graf
2023-11-30 0:10 ` Andre Przywara
2023-11-30 1:15 ` Siarhei Siamashka
2023-11-28 1:29 ` [PATCH 3/3] sunxi: H616: Add OrangePi Zero 3 board support Andre Przywara
2023-11-26 13:30 ` Mikhail Kalashnikov
2023-11-26 11:45 ` Bob McChesney
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=20231203234014.5dc4cbe7@slackpad.lan \
--to=andre.przywara@arm.com \
--cc=iuncuim@gmail.com \
--cc=jagan@amarulasolutions.com \
--cc=jernej.skrabec@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=linux-sunxi@lists.linux.dev \
--cc=piotr.oniszczuk@gmail.com \
--cc=stephen.graf@gmail.com \
--cc=u-boot@lists.denx.de \
--cc=vigneshr@ti.com \
/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