Skip to content
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

Add ethernet bits to Arty A7 board description. #153

Merged
merged 1 commit into from
Dec 15, 2023
Merged

Conversation

davidchisnall
Copy link
Collaborator

This includes a driver for Kunyan's ethernet adaptor.

@davidchisnall
Copy link
Collaborator Author

This depends on #148.

@davidchisnall davidchisnall force-pushed the ethernet branch 4 times, most recently from ec65e86 to 64fb0b2 Compare December 14, 2023 17:05
Copy link
Collaborator

@rmn30 rmn30 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are a few magic constants that might be nice to have symbolic names for (e.g. buffer length and addresses) although mostly they are only used once.

* Current interrupt status. Bit 0 is transmit, bit 1 is receive.
* Write one to each bit to clear.
*/
Interruptstatus = 0x3c,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is repeated. Typo?

auto &macControl = mmio_register<RegisterOffset::MACControl>();
macControl = 1;
thread_millisecond_wait(167);
mmio_register<RegisterOffset::MDIOControl>() = 0x10;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is 0x10 here?

void mdio_wait_for_ready()
{
auto &mdioControl = mmio_register<RegisterOffset::MDIOControl>();
int loops = 0;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead?

*/
{adaptor.mac_address_set(macAddress)};
/**
* Get the MAC address of this adaptor to the default value.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* Get the MAC address of this adaptor to the default value.
* Set the MAC address of this adaptor to the default value.

This includes a driver for Kunyan's ethernet adaptor.
@davidchisnall davidchisnall merged commit dc17d71 into main Dec 15, 2023
7 checks passed
@davidchisnall davidchisnall deleted the ethernet branch December 15, 2023 15:30
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.

2 participants