Skip to content

[I2C, sw, hal] Replaced MMIO accesses with autogenerated HAL#545

Merged
KinzaQamar merged 3 commits into
lowRISC:mainfrom
KinzaQamar:i2c_sw_conv_autogen_hal
May 12, 2026
Merged

[I2C, sw, hal] Replaced MMIO accesses with autogenerated HAL#545
KinzaQamar merged 3 commits into
lowRISC:mainfrom
KinzaQamar:i2c_sw_conv_autogen_hal

Conversation

@KinzaQamar
Copy link
Copy Markdown
Contributor

@KinzaQamar KinzaQamar commented May 11, 2026

Replacing MMIO accesses (DEV_READ and DEV_WRITE) with HAL structs.

Close #546

@KinzaQamar KinzaQamar force-pushed the i2c_sw_conv_autogen_hal branch 3 times, most recently from 272ba69 to 28c6a35 Compare May 11, 2026 19:15
@KinzaQamar KinzaQamar changed the title [I2C, sw, hal] Converted the mmio access with autogenerated HAL [I2C, sw, hal] Replaced MMIO accesses with autogenerated HAL May 11, 2026
@KinzaQamar KinzaQamar force-pushed the i2c_sw_conv_autogen_hal branch 2 times, most recently from d19a486 to ee1f1d6 Compare May 11, 2026 19:32
@KinzaQamar KinzaQamar force-pushed the i2c_sw_conv_autogen_hal branch from ee1f1d6 to eaa8c05 Compare May 11, 2026 20:42
Copy link
Copy Markdown
Collaborator

@engdoreis engdoreis left a comment

Choose a reason for hiding this comment

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

Thanks for getting this done!
I left a few comments regarding coding style. I'm happy approve as soom as the comments are addressed.

Comment thread sw/device/lib/hal/i2c.c Outdated
Comment thread sw/device/lib/hal/i2c.c Outdated
Comment thread sw/device/tests/i2c/smoketest.c Outdated
Comment thread sw/device/lib/hal/i2c.c Outdated
Comment thread sw/device/lib/hal/i2c.c
Comment thread sw/device/lib/hal/i2c.c Outdated
@KinzaQamar KinzaQamar force-pushed the i2c_sw_conv_autogen_hal branch 2 times, most recently from aaf9d98 to 1b73c05 Compare May 12, 2026 10:43
Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
This used to be a part of i2c_init() function and then I took it out from it
in lowRISC#521 but forgot to explicitly enable the controller mode here.

Signed-off-by: Kinza Qamar <kqzaman@lowrisc.org>
@KinzaQamar KinzaQamar force-pushed the i2c_sw_conv_autogen_hal branch from 1b73c05 to ac2d20e Compare May 12, 2026 10:52
@KinzaQamar KinzaQamar requested a review from engdoreis May 12, 2026 10:57
@KinzaQamar
Copy link
Copy Markdown
Contributor Author

Thanks @engdoreis for your review.

I've addressed your comments and waiting for CI to finish

Copy link
Copy Markdown
Collaborator

@engdoreis engdoreis left a comment

Choose a reason for hiding this comment

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

Thanks for the changes.

Copy link
Copy Markdown
Contributor

@martin-velay martin-velay left a comment

Choose a reason for hiding this comment

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

I am not super familiar with C, but LGTM

@KinzaQamar KinzaQamar merged commit 1aedc40 into lowRISC:main May 12, 2026
5 checks passed
@KinzaQamar KinzaQamar deleted the i2c_sw_conv_autogen_hal branch May 12, 2026 12:18
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.

[I2C, SW] Replace MMIO accesses with autogenerated HAL structs

3 participants