diff mbox series

[v2,5/5] vexpress64: Enable VIRTIO_NET network driver

Message ID 20211111092603.774415-6-peter.hoyes@arm.com
State Accepted
Commit 439581dca4c786dbbdd2d6be024e0b907a3b0c80
Delegated to: Tom Rini
Headers show
Series VExpress64 board family improvements | expand

Commit Message

Peter Hoyes Nov. 11, 2021, 9:26 a.m. UTC
From: Peter Hoyes <Peter.Hoyes@arm.com>

The SMSC driver is using the old driver model.

Init the virtio system in vexpress64.c so that the network device is
discovered.

Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
---
 board/armltd/vexpress64/vexpress64.c | 7 +++++++
 include/configs/vexpress_aemv8.h     | 4 ++--
 2 files changed, 9 insertions(+), 2 deletions(-)

Comments

Andre Przywara Nov. 11, 2021, 5:11 p.m. UTC | #1
On Thu, 11 Nov 2021 09:26:03 +0000
Peter Hoyes <peter.hoyes@arm.com> wrote:

> From: Peter Hoyes <Peter.Hoyes@arm.com>
> 
> The SMSC driver is using the old driver model.
> 
> Init the virtio system in vexpress64.c so that the network device is
> discovered.
> 
> Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>

Looks like the same as v1, so repeating my tag:

Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Cheers,
Andre

> ---
>  board/armltd/vexpress64/vexpress64.c | 7 +++++++
>  include/configs/vexpress_aemv8.h     | 4 ++--
>  2 files changed, 9 insertions(+), 2 deletions(-)
> 
> diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
> index d17b463be5..5e22e89824 100644
> --- a/board/armltd/vexpress64/vexpress64.c
> +++ b/board/armltd/vexpress64/vexpress64.c
> @@ -18,6 +18,10 @@
>  #include <dm/platform_data/serial_pl01x.h>
>  #include "pcie.h"
>  #include <asm/armv8/mmu.h>
> +#ifdef CONFIG_VIRTIO_NET
> +#include <virtio_types.h>
> +#include <virtio.h>
> +#endif
>  
>  DECLARE_GLOBAL_DATA_PTR;
>  
> @@ -64,6 +68,9 @@ __weak void vexpress64_pcie_init(void)
>  int board_init(void)
>  {
>  	vexpress64_pcie_init();
> +#ifdef CONFIG_VIRTIO_NET
> +	virtio_init();
> +#endif
>  	return 0;
>  }
>  
> diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
> index 7cdfc30649..faa7065086 100644
> --- a/include/configs/vexpress_aemv8.h
> +++ b/include/configs/vexpress_aemv8.h
> @@ -88,8 +88,8 @@
>  #endif
>  #endif /* !CONFIG_GICV3 */
>  
> -#ifndef CONFIG_TARGET_VEXPRESS64_JUNO
> -/* The Vexpress64 simulators use SMSC91C111 */
> +#if defined(CONFIG_TARGET_VEXPRESS64_BASE_FVP) && !defined(CONFIG_DM_ETH)
> +/* The Vexpress64 BASE_FVP simulator uses SMSC91C111 */
>  #define CONFIG_SMC91111			1
>  #define CONFIG_SMC91111_BASE		(V2M_PA_BASE + 0x01A000000)
>  #endif
Tom Rini Jan. 7, 2022, 5:03 p.m. UTC | #2
On Thu, Nov 11, 2021 at 09:26:03AM +0000, Peter Hoyes wrote:

> From: Peter Hoyes <Peter.Hoyes@arm.com>
> 
> The SMSC driver is using the old driver model.
> 
> Init the virtio system in vexpress64.c so that the network device is
> discovered.
> 
> Signed-off-by: Peter Hoyes <Peter.Hoyes@arm.com>
> Reviewed-by: Andre Przywara <andre.przywara@arm.com>

Applied to u-boot/next, thanks!
diff mbox series

Patch

diff --git a/board/armltd/vexpress64/vexpress64.c b/board/armltd/vexpress64/vexpress64.c
index d17b463be5..5e22e89824 100644
--- a/board/armltd/vexpress64/vexpress64.c
+++ b/board/armltd/vexpress64/vexpress64.c
@@ -18,6 +18,10 @@ 
 #include <dm/platform_data/serial_pl01x.h>
 #include "pcie.h"
 #include <asm/armv8/mmu.h>
+#ifdef CONFIG_VIRTIO_NET
+#include <virtio_types.h>
+#include <virtio.h>
+#endif
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -64,6 +68,9 @@  __weak void vexpress64_pcie_init(void)
 int board_init(void)
 {
 	vexpress64_pcie_init();
+#ifdef CONFIG_VIRTIO_NET
+	virtio_init();
+#endif
 	return 0;
 }
 
diff --git a/include/configs/vexpress_aemv8.h b/include/configs/vexpress_aemv8.h
index 7cdfc30649..faa7065086 100644
--- a/include/configs/vexpress_aemv8.h
+++ b/include/configs/vexpress_aemv8.h
@@ -88,8 +88,8 @@ 
 #endif
 #endif /* !CONFIG_GICV3 */
 
-#ifndef CONFIG_TARGET_VEXPRESS64_JUNO
-/* The Vexpress64 simulators use SMSC91C111 */
+#if defined(CONFIG_TARGET_VEXPRESS64_BASE_FVP) && !defined(CONFIG_DM_ETH)
+/* The Vexpress64 BASE_FVP simulator uses SMSC91C111 */
 #define CONFIG_SMC91111			1
 #define CONFIG_SMC91111_BASE		(V2M_PA_BASE + 0x01A000000)
 #endif