-
Notifications
You must be signed in to change notification settings - Fork 1
ethernet :: low-risc eth driver et al #14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| zephyr_sources_ifdef(CONFIG_ETH_LITEETH eth_liteeth.c) | ||
| zephyr_sources_ifdef(CONFIG_ETH_W5500 eth_w5500.c) | ||
| zephyr_sources_ifdef(CONFIG_ETH_LOWRISC eth_lowRISC.c) | ||
| zephyr_sources_ifdef(CONFIG_ETH_LOWRISC mdiobb.c) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure they have a MDIO driver in zephyr - we can investigate this later.
| } | ||
|
|
||
|
|
||
| static int lr_send(const struct device *dev, struct net_pkt *pkt) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should group the eth_ and lr_ functions together. Especially copyin/copyout.
| * multicast packets addressed to PTP Multicast Group Addr 01:1b:19:00:00:00 | ||
| */ | ||
| eth_base[MACHI_OFFSET >> 3] |= (MACHI_IRQ_EN | MACHI_ALLPKTS_MASK); | ||
| mmiowb(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we nuke these if they are noops for us?
|
|
||
| const int rsr = eth_read(priv, RSR_OFFSET); | ||
| const int first = rsr & RSR_RECV_FIRST_MASK; | ||
| // const int next = rsr & RSR_RECV_NEXT_MASK >> 4; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nitpick : comment aligned or remove line
drivers/ethernet/eth_lowRISC.c
Outdated
| if ((n = lr_eth_recv_size(priv)) > 0) | ||
| { | ||
|
|
||
| pkt = net_pkt_rx_alloc_with_buffer(priv->iface, n, AF_UNSPEC, 0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspect somewhere we are mixing tabs and spaces. The recogni and I suspect zephyr standard is to use spaces instead of tabs and set tabs to 4 spaces.
drivers/ethernet/eth_lowRISC.c
Outdated
| memcpy(priv->mac, mac_addr, sizeof(mac_addr)); | ||
| eth_update_address(priv, mac_addr); | ||
| priv->ioaddr = (void *) 0x30000000; | ||
| // |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are these comments commented :)
|
This is a snapshot of work in progress and expected to have commented out code, hacks, etc. |
7b6727a to
7e34fcf
Compare
* Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * format :: use uncrustify on edited files Co-authored-by: akif <[email protected]>
This makes the gatt metrics also available for gatt write-without-rsp-cb so it now prints the rate of each write: uart:~$ gatt write-without-response-cb 1e ff 10 10 Write #1: 16 bytes (0 bps) Write #2: 32 bytes (3445948416 bps) Write #3: 48 bytes (2596929536 bps) Write #4: 64 bytes (6400 bps) Write #5: 80 bytes (8533 bps) Write #6: 96 bytes (10666 bps) Write #7: 112 bytes (8533 bps) Write #8: 128 bytes (9955 bps) Write #9: 144 bytes (11377 bps) Write #10: 160 bytes (7680 bps) Write #11: 176 bytes (8533 bps) Write #12: 192 bytes (9386 bps) Write Complete (err 0) Write #13: 208 bytes (8533 bps) Write #14: 224 bytes (9244 bps) Write #15: 240 bytes (9955 bps) Write #16: 256 bytes (8000 bps) Signed-off-by: Luiz Augusto von Dentz <[email protected]>
* Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * format :: use uncrustify on edited files Co-authored-by: akif <[email protected]>
* Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * format :: use uncrustify on edited files Co-authored-by: akif <[email protected]>
* Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * Initial build frame for low RISC eth driver in Zephyr * Port the lr_send based on freeFtos implementation and bring some utility functions * Add probe function for low risc driver init * Add iface_api.init function * Turn on DT interrupt parsing and modify dtsi to include eth in soc * Make sure MAC address saved properly * Check in lowRisc config for echo test * Checkin the latest mdio changes and DT IRQ parsing update (broken) * enable DT_INST for eth driver slot 0 * Check in lowRISC ISR for rx packets and helper functions * Correct lr_send to properly process pkt to be sent * format :: use uncrustify on edited files Co-authored-by: akif <[email protected]>
No description provided.