Page MenuHomeFreeBSD

Add a size flag to OF_decode_addr
ClosedPublic

Authored by andrew on Feb 11 2016, 10:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Feb 26 2024, 5:52 AM
Unknown Object (File)
Jan 23 2024, 2:29 AM
Unknown Object (File)
Jan 10 2024, 12:46 PM
Unknown Object (File)
Jan 10 2024, 12:46 PM
Unknown Object (File)
Jan 10 2024, 12:46 PM
Unknown Object (File)
Jan 10 2024, 12:33 PM
Unknown Object (File)
Jan 9 2024, 10:19 AM
Unknown Object (File)
Jan 5 2024, 9:03 AM
Subscribers

Details

Summary

This is needed when temporarily mapping a device, bus_space_unmap
needs the size to be passed in.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

andrew retitled this revision from to Add a size flag to OF_decode_addr.
andrew updated this object.
andrew edited the test plan for this revision. (Show Details)
andrew added reviewers: ian, nwhitehorn.

Why do you need this? I don't understand the description since OF_decode_addr() calls bus_space_map() internally.

andrew edited edge metadata.

Why do you need this? I don't understand the description since OF_decode_addr() calls bus_space_map() internally.

It's to allow us to unmap the buffer. I've updated the summary to fix this.

That makes sense, thanks. Where are you planning to use this that you want to unmap it? The function is intended for use only in early boot (UART consoles in particular) where you don't ever want to unmap the result. The patch itself looks good to me.

I'm using it to replace calls to fdt_get_range and fdt_regsize.

I found the Amlogic clock driver may be asked to read a frequency register early in the boot. It then uses this to set the bus-frequency property on a node so the mmc driver can read it back when it attaches. To read this data it needs to map the registers, read, then can unmap them, but needs the size to unmap.

This does seem to be a work around for our lack of a clock management framework, but that would be even more work to implement.

jhibbits edited edge metadata.

Add your reply to Nathan to the commit message to make it easier to see at first glance the reasoning behind it.

This revision is now accepted and ready to land.Feb 15 2016, 8:00 PM
This revision was automatically updated to reflect the committed changes.