public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] tegra: config: Add 'pci enum' to preboot when PCI is enabled
@ 2016-08-03  9:35 Alban Bedel
  2016-08-03 15:37 ` Stephen Warren
  0 siblings, 1 reply; 4+ messages in thread
From: Alban Bedel @ 2016-08-03  9:35 UTC (permalink / raw)
  To: u-boot

For simplicity and backward compatibility automatically run 'pci enum'
via preboot when PCI is enabled. As preboot is already used for the
USB keyboard support this rework how CONFIG_PREBOOT is set to allow
combining several commands.

Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de>
---
 include/configs/tegra-common-post.h | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/include/configs/tegra-common-post.h b/include/configs/tegra-common-post.h
index b206ce4bf93c..eff4c760797d 100644
--- a/include/configs/tegra-common-post.h
+++ b/include/configs/tegra-common-post.h
@@ -42,9 +42,10 @@
 #ifdef CONFIG_USB_KEYBOARD
 #define STDIN_KBD_USB ",usbkbd"
 #define CONFIG_SYS_USB_EVENT_POLL
-#define CONFIG_PREBOOT			"usb start"
+#define PREBOOT_USB "usb start;"
 #else
 #define STDIN_KBD_USB ""
+#define PREBOOT_USB ""
 #endif
 
 #ifdef CONFIG_LCD
@@ -89,6 +90,12 @@
 #define INITRD_HIGH "ffffffff"
 #endif
 
+#ifdef CONFIG_PCI
+#define PREBOOT_PCI "pci enum;"
+#else
+#define PREBOOT_PCI ""
+#endif
+
 #define CONFIG_EXTRA_ENV_SETTINGS \
 	TEGRA_DEVICE_SETTINGS \
 	MEM_LAYOUT_ENV_SETTINGS \
@@ -102,6 +109,10 @@
 #define CONFIG_TEGRA_SPI
 #endif
 
+#if defined(CONFIG_USB_KEYBOARD) || defined(CONFIG_PCI)
+#define CONFIG_PREBOOT PREBOOT_USB PREBOOT_PCI
+#endif
+
 /* overrides for SPL build here */
 #ifdef CONFIG_SPL_BUILD
 
-- 
2.9.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] tegra: config: Add 'pci enum' to preboot when PCI is enabled
  2016-08-03  9:35 [U-Boot] [PATCH] tegra: config: Add 'pci enum' to preboot when PCI is enabled Alban Bedel
@ 2016-08-03 15:37 ` Stephen Warren
  2016-08-04  1:16   ` Simon Glass
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Warren @ 2016-08-03 15:37 UTC (permalink / raw)
  To: u-boot

On 08/03/2016 03:35 AM, Alban Bedel wrote:
> For simplicity and backward compatibility automatically run 'pci enum'
> via preboot when PCI is enabled. As preboot is already used for the
> USB keyboard support this rework how CONFIG_PREBOOT is set to allow
> combining several commands.

For better or worse, this was a deliberate change, so I don't think this 
patch will be accepted.

If it is, then you should apply it to all boards, not just Tegra boards, 
and adjust include/config_distro_bootcmd.h since it will no longer need 
to run "pci enum", and also test/py/tests/test_net.py won't need to either.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] tegra: config: Add 'pci enum' to preboot when PCI is enabled
  2016-08-03 15:37 ` Stephen Warren
@ 2016-08-04  1:16   ` Simon Glass
  2016-08-04  9:05     ` Alban Bedel
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Glass @ 2016-08-04  1:16 UTC (permalink / raw)
  To: u-boot

Hi,

On 3 August 2016 at 09:37, Stephen Warren <swarren@wwwdotorg.org> wrote:
> On 08/03/2016 03:35 AM, Alban Bedel wrote:
>>
>> For simplicity and backward compatibility automatically run 'pci enum'
>> via preboot when PCI is enabled. As preboot is already used for the
>> USB keyboard support this rework how CONFIG_PREBOOT is set to allow
>> combining several commands.
>
>
> For better or worse, this was a deliberate change, so I don't think this
> patch will be accepted.
>
> If it is, then you should apply it to all boards, not just Tegra boards, and
> adjust include/config_distro_bootcmd.h since it will no longer need to run
> "pci enum", and also test/py/tests/test_net.py won't need to either.

The boards which need PCI to boot are still few... we've talked about
this before. It would be great if we could find a way to detect or be
told that boot devices are on PCI and probe it accordingly. Perhaps we
should have a driver flag?

Regards,
Simon

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [U-Boot] [PATCH] tegra: config: Add 'pci enum' to preboot when PCI is enabled
  2016-08-04  1:16   ` Simon Glass
@ 2016-08-04  9:05     ` Alban Bedel
  0 siblings, 0 replies; 4+ messages in thread
From: Alban Bedel @ 2016-08-04  9:05 UTC (permalink / raw)
  To: u-boot

On Wed, 3 Aug 2016 19:16:57 -0600
Simon Glass <sjg@chromium.org> wrote:

> Hi,
> 
> On 3 August 2016 at 09:37, Stephen Warren <swarren@wwwdotorg.org> wrote:
> > On 08/03/2016 03:35 AM, Alban Bedel wrote:
> >>
> >> For simplicity and backward compatibility automatically run 'pci enum'
> >> via preboot when PCI is enabled. As preboot is already used for the
> >> USB keyboard support this rework how CONFIG_PREBOOT is set to allow
> >> combining several commands.
> >
> >
> > For better or worse, this was a deliberate change, so I don't think this
> > patch will be accepted.
> >
> > If it is, then you should apply it to all boards, not just Tegra boards, and
> > adjust include/config_distro_bootcmd.h since it will no longer need to run
> > "pci enum", and also test/py/tests/test_net.py won't need to either.
> 
> The boards which need PCI to boot are still few... we've talked about
> this before. It would be great if we could find a way to detect or be
> told that boot devices are on PCI and probe it accordingly. Perhaps we
> should have a driver flag?

In my case I needed this for network boot. However I just found out
that with a properly reseted environment this is already handled, so
this is not needed. Sorry for the noise.

Alban

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20160804/f69c42d5/attachment.sig>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-08-04  9:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-03  9:35 [U-Boot] [PATCH] tegra: config: Add 'pci enum' to preboot when PCI is enabled Alban Bedel
2016-08-03 15:37 ` Stephen Warren
2016-08-04  1:16   ` Simon Glass
2016-08-04  9:05     ` Alban Bedel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox