mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 13:27:01 +08:00
drivers/net: add support for Intel I225 network card
add support for Intel I225 network card Signed-off-by: p-szafonimateusz <p-szafonimateusz@xiaomi.com>
This commit is contained in:
committed by
Xiang Xiao
parent
bc0c7b0db3
commit
1e212981b9
@@ -83,6 +83,10 @@ if(CONFIG_NET)
|
|||||||
list(APPEND SRCS e1000.c)
|
list(APPEND SRCS e1000.c)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(CONFIG_NET_IGC)
|
||||||
|
list(APPEND SRCS igc.c)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_ARCH_PHY_INTERRUPT)
|
if(CONFIG_ARCH_PHY_INTERRUPT)
|
||||||
list(APPEND SRCS phy_notify.c)
|
list(APPEND SRCS phy_notify.c)
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -801,4 +801,23 @@ config NET_E1000_82574L
|
|||||||
|
|
||||||
endif # NET_E1000
|
endif # NET_E1000
|
||||||
|
|
||||||
|
menuconfig NET_IGC
|
||||||
|
bool "Intel IGC support"
|
||||||
|
default n
|
||||||
|
depends on PCI && PCI_MSIX
|
||||||
|
---help---
|
||||||
|
Enable IGC PCI Ethernet driver.
|
||||||
|
|
||||||
|
if NET_IGC
|
||||||
|
|
||||||
|
config NET_IGC_RXSPARE
|
||||||
|
int "Intel IGC spare RX buffers"
|
||||||
|
default 8
|
||||||
|
|
||||||
|
config NET_IGC_I225LM
|
||||||
|
bool "Intel I225LM"
|
||||||
|
default n
|
||||||
|
|
||||||
|
endif # NET_IGC
|
||||||
|
|
||||||
endif # NETDEVICES
|
endif # NETDEVICES
|
||||||
|
|||||||
@@ -101,6 +101,10 @@ ifeq ($(CONFIG_DRIVERS_WIFI_SIM),y)
|
|||||||
CSRCS += wifi_sim.c
|
CSRCS += wifi_sim.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_NET_IGC),y)
|
||||||
|
CSRCS += igc.c
|
||||||
|
endif
|
||||||
|
|
||||||
# Include network build support
|
# Include network build support
|
||||||
|
|
||||||
DEPPATH += --dep-path net
|
DEPPATH += --dep-path net
|
||||||
|
|||||||
+1336
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -31,6 +31,7 @@
|
|||||||
#include <nuttx/rpmsg/rpmsg_virtio_ivshmem.h>
|
#include <nuttx/rpmsg/rpmsg_virtio_ivshmem.h>
|
||||||
#include <nuttx/virtio/virtio-pci.h>
|
#include <nuttx/virtio/virtio-pci.h>
|
||||||
#include <nuttx/net/e1000.h>
|
#include <nuttx/net/e1000.h>
|
||||||
|
#include <nuttx/net/igc.h>
|
||||||
|
|
||||||
#include "pci_drivers.h"
|
#include "pci_drivers.h"
|
||||||
|
|
||||||
@@ -125,6 +126,16 @@ int pci_register_drivers(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Initialization igc driver */
|
||||||
|
|
||||||
|
#ifdef CONFIG_NET_IGC
|
||||||
|
ret = pci_igc_init();
|
||||||
|
if (ret < 0)
|
||||||
|
{
|
||||||
|
pcierr("pci_igc_init failed, ret=%d\n", ret);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
UNUSED(ret);
|
UNUSED(ret);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
/****************************************************************************
|
||||||
|
* include/nuttx/net/igc.h
|
||||||
|
*
|
||||||
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership. The
|
||||||
|
* ASF licenses this file to you under the Apache License, Version 2.0 (the
|
||||||
|
* "License"); you may not use this file except in compliance with the
|
||||||
|
* License. You may obtain a copy of the License at
|
||||||
|
*
|
||||||
|
* http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
*
|
||||||
|
* Unless required by applicable law or agreed to in writing, software
|
||||||
|
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
* License for the specific language governing permissions and limitations
|
||||||
|
* under the License.
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef __INCLUDE_NUTTX_NET_IGC_H
|
||||||
|
#define __INCLUDE_NUTTX_NET_IGC_H
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Included Files
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
#include <nuttx/config.h>
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
#define EXTERN extern "C"
|
||||||
|
extern "C"
|
||||||
|
{
|
||||||
|
#else
|
||||||
|
#define EXTERN extern
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Public Function Prototypes
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
/****************************************************************************
|
||||||
|
* Name: pci_igc_init
|
||||||
|
*
|
||||||
|
* Description:
|
||||||
|
* Register a pci driver
|
||||||
|
*
|
||||||
|
****************************************************************************/
|
||||||
|
|
||||||
|
int pci_igc_init(void);
|
||||||
|
|
||||||
|
#undef EXTERN
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* __INCLUDE_NUTTX_NET_IGC_H */
|
||||||
Reference in New Issue
Block a user