From: Tom Rini <trini@konsulko.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7 21/21] sf: Add SPI NOR protection mechanism
Date: Sun, 15 Nov 2015 20:58:53 -0500 [thread overview]
Message-ID: <20151116015853.GU8060@bill-the-cat> (raw)
In-Reply-To: <CAPnjgZ1taJ8K=8+eP006AgLY6mGbbgpH7tjt4k3wqfRBv+G=SQ@mail.gmail.com>
On Sun, Nov 15, 2015 at 06:34:51PM -0700, Simon Glass wrote:
> Hi,
>
> On 13 November 2015 at 03:41, Bin Meng <bmeng.cn@gmail.com> wrote:
> > Hi,
> >
> > On Wed, Nov 11, 2015 at 10:04 PM, Fabio Estevam <festevam@gmail.com> wrote:
> >> On Wed, Nov 11, 2015 at 12:56 AM, Simon Glass <sjg@chromium.org> wrote:
> >>> Hi Fabio,
> >>>
> >>> On 10 November 2015 at 16:51, Fabio Estevam <festevam@gmail.com> wrote:
> >>>>
> >>>> Hi Simon,
> >>>>
> >>>> On Tue, Nov 10, 2015 at 10:09 PM, Simon Glass <sjg@chromium.org> wrote:
> >>>>
> >>>> > This patch breaks chromebook_link - I think because it adds a new
> >>>> > operation which is not supported by all flash chips. Those that are
> >>>> > not supported (i.e that don't have the 'flash_is_locked' method)
> >>>> > should still work.
> >>>>
> >>>> What is the symptom you are seeing? Which SPI NOR flash does this board have?
> >>>
> >>> It crashes reading the environment:
> >>>
> >>> U-Boot 2015.10-00544-gcad0499 (Nov 10 2015 - 17:06:00 -0700)
> >>>
> >>> CPU: Intel(R) Core(TM) i5-3427U CPU @ 1.80GHz
> >>> DRAM: 2.7 GiB
> >>> SF: Detected W25Q64CV with page size 256 Bytes, erase size 4 KiB, total 8 MiB
> >>> *** Warning - bad CRC, using default environment
> >>>
> >>> Video: 1280x1024x16
> >>> Model: Google Link
> >>> SF: Detected W25Q64CV with page size 256 Bytes, erase size 4 KiB, total 8 MiB
> >>> Invalid Opcode (Undefined Opcode)
> >>
> >> I am wondering if this invalid opcode is caused by 6c2f758cee266f7648.
> >>
> >> Could you please try this?
> >>
> >
> > No, this does not resolve this issue.
> >
> >> --- a/arch/x86/include/asm/bitops.h
> >> +++ b/arch/x86/include/asm/bitops.h
> >> @@ -364,7 +364,7 @@ static __inline__ int ffs(int x)
> >> __asm__("bsfl %1,%0\n\t"
> >> "jnz 1f\n\t"
> >> "movl $-1,%0\n"
> >> - "1:" : "=r" (r) : "rm" (x));
> >> + "1:" : "=r" (r) : "g" (x));
> >>
> >> return r+1;
> >> }
> >
> > It turns out it is a NULL pointer exception! Fixing this NULL pointer
> > makes the crash disappear, but 'saveenv' does not actually work on the
> > SST flash. Something is broken again, gosh!
>
> Bin thank you for fixing this.
>
> We still have a big problem with this patch though - it adds features
> to the pre-driver-model SPI flash implementation and not the driver
> model implementation! If I somehow have the wrong end of the stick
> please let me know.
>
> If we accept this sort of patch we will never be done with driver
> model conversions, as we make it impossible for boards to move
> forward.
>
> Fabio can you please rework this to remove the pre-driver-model
> support, and add your new functions to struct dm_spi_flash_ops
> instead, then convert the affected boards to driver model?
Hang on, didn't we have this discussion on one of the earlier threads
about this? Part of the problem here is that everything else required
to do this on DM isn't quite there and Fabio has agreed to (under pain
of feature removal later) do the conversion when possible but to not
otherwise block getting this feature (and thus some platform(s))
integrated already.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151115/821d54d5/attachment.sig>
next prev parent reply other threads:[~2015-11-16 1:58 UTC|newest]
Thread overview: 66+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-05 14:43 [U-Boot] [PATCH v7 01/21] include: Add log2 header from the kernel Fabio Estevam
2015-11-05 14:43 ` [U-Boot] [PATCH v7 02/21] include: Add generic bitops headers Fabio Estevam
2015-11-06 12:22 ` Tom Rini
2015-12-01 17:26 ` York Sun
2015-12-01 20:01 ` Simon Glass
2015-11-05 14:43 ` [U-Boot] [PATCH v7 03/21] ARM: Use the " Fabio Estevam
2015-11-06 12:22 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 04/21] x86: " Fabio Estevam
2015-11-06 12:22 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 05/21] m68k: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 06/21] blackfin: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 07/21] sh: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 08/21] microblaze: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 09/21] sandbox: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 10/21] sparc: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 11/21] openrisc: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 12/21] nds32: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 13/21] nios2: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 14/21] mips: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 15/21] arc: " Fabio Estevam
2015-11-06 12:23 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 16/21] avr32: " Fabio Estevam
2015-11-06 12:24 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 17/21] bitops: Add fls_long and __ffs64 Fabio Estevam
2015-11-06 12:24 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 18/21] compat: Remove is_power_of_2() definition Fabio Estevam
2015-11-06 12:24 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 19/21] powerpc: Remove __ilog2_u64 and ffs4 from bitops Fabio Estevam
2015-11-06 12:24 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 20/21] sf: Add SPI protection mechanism from the kernel Fabio Estevam
2015-11-06 12:24 ` Tom Rini
2015-11-05 14:43 ` [U-Boot] [PATCH v7 21/21] sf: Add SPI NOR protection mechanism Fabio Estevam
2015-11-06 12:24 ` Tom Rini
2015-11-11 0:09 ` Simon Glass
2015-11-11 0:29 ` Tom Rini
2015-11-11 0:51 ` Fabio Estevam
2015-11-11 2:56 ` Simon Glass
2015-11-11 9:43 ` Fabio Estevam
2015-11-11 16:25 ` Jagan Teki
2015-11-13 9:20 ` Bin Meng
2015-11-11 14:04 ` Fabio Estevam
2015-11-13 10:41 ` Bin Meng
2015-11-16 1:34 ` Simon Glass
2015-11-16 1:58 ` Tom Rini [this message]
2015-11-16 21:07 ` Simon Glass
2015-11-17 6:43 ` Jagan Teki
2015-11-16 20:57 ` Fabio Estevam
2015-11-05 15:51 ` [U-Boot] [PATCH v7 01/21] include: Add log2 header from the kernel Tom Rini
2015-11-05 15:51 ` Fabio Estevam
2015-11-05 16:35 ` Tom Rini
2015-11-05 17:53 ` Fabio Estevam
2015-11-05 19:10 ` Tom Rini
2015-11-05 20:07 ` Fabio Estevam
2015-11-06 1:40 ` Tom Rini
2015-11-06 11:08 ` Fabio Estevam
2015-11-06 12:22 ` Tom Rini
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=20151116015853.GU8060@bill-the-cat \
--to=trini@konsulko.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