Skip to content

Commit

Permalink
Add support for ethernet in imxrt1064-evk
Browse files Browse the repository at this point in the history
JIRA: RTOS-507
  • Loading branch information
Julian Uziemblo committed Sep 2, 2024
1 parent 00751e7 commit b8059e4
Show file tree
Hide file tree
Showing 13 changed files with 2,340 additions and 1,280 deletions.
2 changes: 1 addition & 1 deletion _targets/Makefile.armv7a7-imx6ull
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
NET_DRIVERS_SUPPORTED := enet tuntap
NET_DRIVERS ?= $(NET_DRIVERS_SUPPORTED)

DRIVERS_SRCS_enet = imx6-enet.c ephy.c gpio.c imx6ull-gpio.c $(DRIVERS_SRCS_UTIL) hw-debug.c
DRIVERS_SRCS_enet = enet.c ephy.c imx6ull-gpio.c $(DRIVERS_SRCS_UTIL) hw-debug.c
4 changes: 3 additions & 1 deletion _targets/Makefile.armv7m7-imxrt106x
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
# Copyright 2021 Phoenix Systems
#

NET_DRIVERS_SUPPORTED := pppou pppos
NET_DRIVERS_SUPPORTED := pppou pppos enet
NET_DRIVERS ?= $(NET_DRIVERS_SUPPORTED)
PPPOS_MODEM := huawei

DRIVERS_SRCS_enet = enet.c ephy.c imxrt106x-gpio.c $(DRIVERS_SRCS_UTIL)
3 changes: 3 additions & 0 deletions drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ endif
ifeq ($(EPHY_KSZ8081),RND)
LOCAL_CFLAGS := -DEPHY_KSZ8081RND
endif
ifeq ($(EPHY_KSZ8081),RNB)
LOCAL_CFLAGS := -DEPHY_KSZ8081RNB
endif

# make possible to specify defalult APN name externally
ifneq ($(PPPOS_DEFAULT_APN),)
Expand Down
12 changes: 5 additions & 7 deletions drivers/bdring.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
*
* Buffer descriptor ring handling
*
* Copyright 2018 Phoenix Systems
* Author: Michał Mirosław
* Copyright 2018/2024 Phoenix Systems
* Author: Michał Mirosław, Julian Uziembło
*
* %LICENSE%
*/
Expand All @@ -27,8 +27,7 @@ enum {
};


typedef struct net_bufdesc_ops_
{
typedef struct net_bufdesc_ops_ {
size_t (*nextRxBufferSize)(const net_bufdesc_ring_t *ring, size_t i);
int (*pktRxFinished)(const net_bufdesc_ring_t *ring, size_t i);
void (*fillRxDesc)(const net_bufdesc_ring_t *ring, size_t i, addr_t pa, size_t sz, unsigned seg /* = zero */);
Expand All @@ -42,11 +41,10 @@ typedef struct net_bufdesc_ops_
} net_bufdesc_ops_t;


struct net_bufdesc_ring_
{
struct net_bufdesc_ring_ {
volatile void *ring;
struct pbuf **bufp;
volatile unsigned head, tail;
_Atomic volatile unsigned head, tail;
unsigned last;
addr_t phys;
const net_bufdesc_ops_t *ops;
Expand Down
Loading

0 comments on commit b8059e4

Please sign in to comment.