* [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file
@ 2020-07-06 2:16 Simon Glass
2020-07-06 2:16 ` [PATCH 2/2] x86: apl: Re-enable loading of SPL Simon Glass
2020-07-07 7:56 ` [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Bin Meng
0 siblings, 2 replies; 8+ messages in thread
From: Simon Glass @ 2020-07-06 2:16 UTC (permalink / raw)
To: u-boot
These prevent use of compile-time checks such as:
if (CONFIG_IS_ENABLED(DM_SPI))
since, for example, if CONFIG_SPL_DM_SPI is not enabled then the
definitions are not included by spi.h and the C code will not build.
The #ifdefs are unnecessary since there are no conflicts with the pre-DM
code. In any case we have almost switched over to driver model for SPI.
Drop these #ifdefs from spi.h to fix a build warning on chromebook_coral
in the following patch.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
include/spi.h | 8 --------
1 file changed, 8 deletions(-)
diff --git a/include/spi.h b/include/spi.h
index 9b4fb8dc0b..7fca646759 100644
--- a/include/spi.h
+++ b/include/spi.h
@@ -39,7 +39,6 @@
#define SPI_DEFAULT_WORDLEN 8
-#if CONFIG_IS_ENABLED(DM_SPI)
/* TODO(sjg at chromium.org): Remove this and use max_hz from struct spi_slave */
struct dm_spi_bus {
uint max_hz;
@@ -65,8 +64,6 @@ struct dm_spi_slave_platdata {
uint mode;
};
-#endif /* CONFIG_DM_SPI */
-
/**
* enum spi_clock_phase - indicates the clock phase to use for SPI (CPHA)
*
@@ -317,7 +314,6 @@ void spi_flash_copy_mmap(void *data, void *offset, size_t len);
*/
int spi_cs_is_valid(unsigned int bus, unsigned int cs);
-#if !CONFIG_IS_ENABLED(DM_SPI)
/**
* Activate a SPI chipselect.
* This function is provided by the board code when using a driver
@@ -343,7 +339,6 @@ void spi_cs_deactivate(struct spi_slave *slave);
* @hz: The transfer speed
*/
void spi_set_speed(struct spi_slave *slave, uint hz);
-#endif
/**
* Write 8 bits, then read 8 bits.
@@ -367,8 +362,6 @@ static inline int spi_w8r8(struct spi_slave *slave, unsigned char byte)
return ret < 0 ? ret : din[1];
}
-#if CONFIG_IS_ENABLED(DM_SPI)
-
/**
* struct spi_cs_info - Information about a bus chip select
*
@@ -717,6 +710,5 @@ int dm_spi_get_mmap(struct udevice *dev, ulong *map_basep, uint *map_sizep,
/* Access the operations for a SPI device */
#define spi_get_ops(dev) ((struct dm_spi_ops *)(dev)->driver->ops)
#define spi_emul_get_ops(dev) ((struct dm_spi_emul_ops *)(dev)->driver->ops)
-#endif /* CONFIG_DM_SPI */
#endif /* _SPI_H_ */
--
2.27.0.212.ge8ba1cc988-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] x86: apl: Re-enable loading of SPL
2020-07-06 2:16 [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Simon Glass
@ 2020-07-06 2:16 ` Simon Glass
2020-07-07 7:56 ` Bin Meng
2020-07-07 7:56 ` [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Bin Meng
1 sibling, 1 reply; 8+ messages in thread
From: Simon Glass @ 2020-07-06 2:16 UTC (permalink / raw)
To: u-boot
At present the SPL loader is not included in the TPL image so SPL cannot
be loaded. Fix it by including this file for both SPL and TPL.
Signed-off-by: Simon Glass <sjg@chromium.org>
Fixes: c87f9ce2273 ("x86: Don't build some unused objects in TPL")
---
arch/x86/cpu/apollolake/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/cpu/apollolake/Makefile b/arch/x86/cpu/apollolake/Makefile
index 11621256ae..3aa2a55676 100644
--- a/arch/x86/cpu/apollolake/Makefile
+++ b/arch/x86/cpu/apollolake/Makefile
@@ -3,6 +3,7 @@
# Copyright 2019 Google LLC
obj-$(CONFIG_SPL_BUILD) += cpu_spl.o
+obj-$(CONFIG_SPL_BUILD) += spl.o
obj-$(CONFIG_SPL_BUILD) += systemagent.o
obj-y += cpu_common.o
@@ -11,7 +12,6 @@ obj-y += cpu.o
obj-y += punit.o
obj-y += fsp_bindings.o
ifdef CONFIG_SPL_BUILD
-obj-y += spl.o
obj-y += fsp_m.o
endif
endif
--
2.27.0.212.ge8ba1cc988-goog
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [PATCH 2/2] x86: apl: Re-enable loading of SPL
2020-07-06 2:16 ` [PATCH 2/2] x86: apl: Re-enable loading of SPL Simon Glass
@ 2020-07-07 7:56 ` Bin Meng
2020-07-07 7:58 ` Bin Meng
0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2020-07-07 7:56 UTC (permalink / raw)
To: u-boot
On Mon, Jul 6, 2020 at 10:16 AM Simon Glass <sjg@chromium.org> wrote:
>
> At present the SPL loader is not included in the TPL image so SPL cannot
> be loaded. Fix it by including this file for both SPL and TPL.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> Fixes: c87f9ce2273 ("x86: Don't build some unused objects in TPL")
> ---
>
> arch/x86/cpu/apollolake/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file
2020-07-06 2:16 [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Simon Glass
2020-07-06 2:16 ` [PATCH 2/2] x86: apl: Re-enable loading of SPL Simon Glass
@ 2020-07-07 7:56 ` Bin Meng
2020-07-07 7:58 ` Bin Meng
1 sibling, 1 reply; 8+ messages in thread
From: Bin Meng @ 2020-07-07 7:56 UTC (permalink / raw)
To: u-boot
On Mon, Jul 6, 2020 at 10:16 AM Simon Glass <sjg@chromium.org> wrote:
>
> These prevent use of compile-time checks such as:
>
> if (CONFIG_IS_ENABLED(DM_SPI))
>
> since, for example, if CONFIG_SPL_DM_SPI is not enabled then the
> definitions are not included by spi.h and the C code will not build.
>
> The #ifdefs are unnecessary since there are no conflicts with the pre-DM
> code. In any case we have almost switched over to driver model for SPI.
>
> Drop these #ifdefs from spi.h to fix a build warning on chromebook_coral
> in the following patch.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> include/spi.h | 8 --------
> 1 file changed, 8 deletions(-)
>
Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file
2020-07-07 7:56 ` [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Bin Meng
@ 2020-07-07 7:58 ` Bin Meng
2020-07-08 1:05 ` Bin Meng
0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2020-07-07 7:58 UTC (permalink / raw)
To: u-boot
On Tue, Jul 7, 2020 at 3:56 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 6, 2020 at 10:16 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > These prevent use of compile-time checks such as:
> >
> > if (CONFIG_IS_ENABLED(DM_SPI))
> >
> > since, for example, if CONFIG_SPL_DM_SPI is not enabled then the
> > definitions are not included by spi.h and the C code will not build.
> >
> > The #ifdefs are unnecessary since there are no conflicts with the pre-DM
> > code. In any case we have almost switched over to driver model for SPI.
> >
> > Drop these #ifdefs from spi.h to fix a build warning on chromebook_coral
> > in the following patch.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > ---
> >
> > include/spi.h | 8 --------
> > 1 file changed, 8 deletions(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] x86: apl: Re-enable loading of SPL
2020-07-07 7:56 ` Bin Meng
@ 2020-07-07 7:58 ` Bin Meng
0 siblings, 0 replies; 8+ messages in thread
From: Bin Meng @ 2020-07-07 7:58 UTC (permalink / raw)
To: u-boot
On Tue, Jul 7, 2020 at 3:56 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Mon, Jul 6, 2020 at 10:16 AM Simon Glass <sjg@chromium.org> wrote:
> >
> > At present the SPL loader is not included in the TPL image so SPL cannot
> > be loaded. Fix it by including this file for both SPL and TPL.
> >
> > Signed-off-by: Simon Glass <sjg@chromium.org>
> > Fixes: c87f9ce2273 ("x86: Don't build some unused objects in TPL")
> > ---
> >
> > arch/x86/cpu/apollolake/Makefile | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
>
> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
applied to u-boot-x86, thanks!
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file
2020-07-07 7:58 ` Bin Meng
@ 2020-07-08 1:05 ` Bin Meng
2020-07-08 15:01 ` Simon Glass
0 siblings, 1 reply; 8+ messages in thread
From: Bin Meng @ 2020-07-08 1:05 UTC (permalink / raw)
To: u-boot
Hi Simon,
On Tue, Jul 7, 2020 at 3:58 PM Bin Meng <bmeng.cn@gmail.com> wrote:
>
> On Tue, Jul 7, 2020 at 3:56 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Mon, Jul 6, 2020 at 10:16 AM Simon Glass <sjg@chromium.org> wrote:
> > >
> > > These prevent use of compile-time checks such as:
> > >
> > > if (CONFIG_IS_ENABLED(DM_SPI))
> > >
> > > since, for example, if CONFIG_SPL_DM_SPI is not enabled then the
> > > definitions are not included by spi.h and the C code will not build.
> > >
> > > The #ifdefs are unnecessary since there are no conflicts with the pre-DM
> > > code. In any case we have almost switched over to driver model for SPI.
> > >
> > > Drop these #ifdefs from spi.h to fix a build warning on chromebook_coral
> > > in the following patch.
> > >
> > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > ---
> > >
> > > include/spi.h | 8 --------
> > > 1 file changed, 8 deletions(-)
> > >
> >
> > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
>
> applied to u-boot-x86, thanks!
Unfortunately this breaks some boards. Could you please take a look?
https://dev.azure.com/bmeng/GitHub/_build/results?buildId=250&view=logs&j=ed3f42d9-8790-5c10-89c6-b1feb81eb957&t=aa0bab01-4da3-5dc7-7237-a00778129ead
Regards,
Bin
^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file
2020-07-08 1:05 ` Bin Meng
@ 2020-07-08 15:01 ` Simon Glass
0 siblings, 0 replies; 8+ messages in thread
From: Simon Glass @ 2020-07-08 15:01 UTC (permalink / raw)
To: u-boot
Hi Bin,
On Tue, 7 Jul 2020 at 19:05, Bin Meng <bmeng.cn@gmail.com> wrote:
>
> Hi Simon,
>
> On Tue, Jul 7, 2020 at 3:58 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> >
> > On Tue, Jul 7, 2020 at 3:56 PM Bin Meng <bmeng.cn@gmail.com> wrote:
> > >
> > > On Mon, Jul 6, 2020 at 10:16 AM Simon Glass <sjg@chromium.org> wrote:
> > > >
> > > > These prevent use of compile-time checks such as:
> > > >
> > > > if (CONFIG_IS_ENABLED(DM_SPI))
> > > >
> > > > since, for example, if CONFIG_SPL_DM_SPI is not enabled then the
> > > > definitions are not included by spi.h and the C code will not build.
> > > >
> > > > The #ifdefs are unnecessary since there are no conflicts with the pre-DM
> > > > code. In any case we have almost switched over to driver model for SPI.
> > > >
> > > > Drop these #ifdefs from spi.h to fix a build warning on chromebook_coral
> > > > in the following patch.
> > > >
> > > > Signed-off-by: Simon Glass <sjg@chromium.org>
> > > > ---
> > > >
> > > > include/spi.h | 8 --------
> > > > 1 file changed, 8 deletions(-)
> > > >
> > >
> > > Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
> >
> > applied to u-boot-x86, thanks!
>
> Unfortunately this breaks some boards. Could you please take a look?
> https://dev.azure.com/bmeng/GitHub/_build/results?buildId=250&view=logs&j=ed3f42d9-8790-5c10-89c6-b1feb81eb957&t=aa0bab01-4da3-5dc7-7237-a00778129ead
Oh dear, the pre-DM functions conflict. I'll send a v2.
Regards,
SImon
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2020-07-08 15:01 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 2:16 [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Simon Glass
2020-07-06 2:16 ` [PATCH 2/2] x86: apl: Re-enable loading of SPL Simon Glass
2020-07-07 7:56 ` Bin Meng
2020-07-07 7:58 ` Bin Meng
2020-07-07 7:56 ` [PATCH 1/2] spi: Remove unnecessary #ifdefs in header file Bin Meng
2020-07-07 7:58 ` Bin Meng
2020-07-08 1:05 ` Bin Meng
2020-07-08 15:01 ` Simon Glass
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.