[PATCH] Revert "spi: spi-uclass: Add support to manually relocate spi memory ops"
Tom Rini
trini at konsulko.com
Thu Jul 22 19:30:11 CEST 2021
On Thu, Jul 22, 2021 at 06:04:40PM +0200, Michal Simek wrote:
>
>
> On 7/22/21 5:25 PM, Peter Robinson wrote:
> > This reverts commit 346df7d4fa62afc578d820b3a18815eec765074f.
> >
> > This patch broke booting Rockchip systems from U-Boot residing on SPI
> > flash, for at least the Pinebook Pro and Rockpro64, and also confirmed
> > with the not yet upstream Helios64.
> >
> > Signed-off-by: Peter Robinson <pbrobinson at gmail.com>
> > Cc: T Karthik Reddy <t.karthik.reddy at xilinx.com>
> > Cc: Ashok Reddy Soma <ashok.reddy.soma at xilinx.com>
> > Cc: Michal Simek <michal.simek at xilinx.com>
> > Cc: Pratyush Yadav <p.yadav at ti.com>
> > ---
> > drivers/spi/spi-uclass.c | 11 -----------
> > 1 file changed, 11 deletions(-)
> >
> > diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
> > index d867b27806..ec7f4652b3 100644
> > --- a/drivers/spi/spi-uclass.c
> > +++ b/drivers/spi/spi-uclass.c
> > @@ -11,7 +11,6 @@
> > #include <log.h>
> > #include <malloc.h>
> > #include <spi.h>
> > -#include <spi-mem.h>
> > #include <dm/device_compat.h>
> > #include <asm/global_data.h>
> > #include <dm/device-internal.h>
> > @@ -200,16 +199,6 @@ static int spi_post_probe(struct udevice *bus)
> > ops->set_mode += gd->reloc_off;
> > if (ops->cs_info)
> > ops->cs_info += gd->reloc_off;
> > - if (ops->mem_ops) {
> > - struct spi_controller_mem_ops *mem_ops =
> > - (struct spi_controller_mem_ops *)ops->mem_ops;
> > - if (mem_ops->adjust_op_size)
> > - mem_ops->adjust_op_size += gd->reloc_off;
> > - if (mem_ops->supports_op)
> > - mem_ops->supports_op += gd->reloc_off;
> > - if (mem_ops->exec_op)
> > - mem_ops->exec_op += gd->reloc_off;
> > - }
> > reloc_done++;
> > }
> > #endif
> >
>
> This is protected by CONFIG_NEEDS_MANUAL_RELOC which is only enable for
> m68k and microblaze. I expect rockchip is arm and you should never have
> this code in your binary. That's why please double check it.
Yes, this really doesn't make sense. Try also just removing spi-mem.h
from the file and see if that causes things to work again. If so, time
to dig in to that header file to figure out what could be going wrong.
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 659 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20210722/5fd9e677/attachment.sig>
More information about the U-Boot
mailing list