Skip to content

Conversation

@sabhiram
Copy link

@sabhiram sabhiram commented Feb 3, 2021

No description provided.

@sabhiram sabhiram requested a review from brudley February 3, 2021 16:31
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)
Copy link
Author

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)
Copy link
Author

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();
Copy link
Author

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;
Copy link
Author

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

if ((n = lr_eth_recv_size(priv)) > 0)
{

pkt = net_pkt_rx_alloc_with_buffer(priv->iface, n, AF_UNSPEC, 0,
Copy link
Author

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.

memcpy(priv->mac, mac_addr, sizeof(mac_addr));
eth_update_address(priv, mac_addr);
priv->ioaddr = (void *) 0x30000000;
//
Copy link
Author

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 :)

@brudley
Copy link

brudley commented Feb 3, 2021

This is a snapshot of work in progress and expected to have commented out code, hacks, etc.

@sabhiram sabhiram merged commit 768ac08 into recogni Feb 3, 2021
brudley pushed a commit that referenced this pull request Mar 11, 2021
* 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]>
berendo pushed a commit that referenced this pull request Apr 9, 2021
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]>
@akifsaglam akifsaglam deleted the akif/dev/ethernet branch June 14, 2021 21:27
sabhiram added a commit that referenced this pull request Aug 12, 2021
* 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]>
sabhiram added a commit that referenced this pull request Sep 17, 2021
* 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]>
sabhiram added a commit that referenced this pull request Sep 17, 2021
* 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants