Page MenuHomeFreeBSD

RPi-B Add MULTIDELAY
ClosedPublic

Authored by manu on Sep 28 2016, 4:45 PM.
Tags
Referenced Files
Unknown Object (File)
Mar 3 2024, 7:31 AM
Unknown Object (File)
Mar 3 2024, 7:07 AM
Unknown Object (File)
Feb 10 2024, 6:49 PM
Unknown Object (File)
Jan 10 2024, 5:21 PM
Unknown Object (File)
Dec 22 2023, 3:49 PM
Unknown Object (File)
Dec 22 2023, 3:48 PM
Unknown Object (File)
Dec 20 2023, 1:26 AM
Unknown Object (File)
Nov 28 2023, 9:50 PM
Subscribers

Details

Summary

Add MULTIDELAY for RPI-B

Test Plan

Tested on RPI-B

Diff Detail

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

Event Timeline

manu retitled this revision from to RPi-B Add MULTIDELAY.
manu updated this object.
manu edited the test plan for this revision. (Show Details)
manu added a reviewer: ARM.
manu set the repository for this revision to rS FreeBSD src repository - subversion.
manu added a project: ARM.
imp added a reviewer: imp.

Modulo one small Q, this looks good to me.

sys/arm/broadcom/bcm2835/bcm2835_machdep.c
132 ↗(On Diff #20775)

Do we know this platform has 200 cycles per us?

This revision is now accepted and ready to land.Sep 28 2016, 6:46 PM
In D8062#166787, @imp wrote:

Modulo one small Q, this looks good to me.

No idea, that was the number used before so I simply re-used it.

In D8062#166794, @manu wrote:
In D8062#166787, @imp wrote:

Modulo one small Q, this looks good to me.

No idea, that was the number used before so I simply re-used it.

Perhaps we should see, since it is used here:

static void
platform_delay(int usec, void *arg __unused)
{

int counts;

for (; usec > 0; usec--)
        for (counts = plat_obj->cls->delay_count; counts > 0; counts--)
                /*
                 * Prevent the compiler from optimizing
                 * out the loop
                 */
                cpufunc_nullop();

}

In D8062#166796, @imp wrote:
In D8062#166794, @manu wrote:
In D8062#166787, @imp wrote:

Modulo one small Q, this looks good to me.

No idea, that was the number used before so I simply re-used it.

Perhaps we should see, since it is used here:

static void
platform_delay(int usec, void *arg __unused)
{

int counts;

for (; usec > 0; usec--)
        for (counts = plat_obj->cls->delay_count; counts > 0; counts--)
                /*
                 * Prevent the compiler from optimizing
                 * out the loop
                 */
                cpufunc_nullop();

}

100 seems accurate enough.
But the platform bits for delay seems broken, the delay_count stays at 0.

andrew added a reviewer: andrew.
andrew added inline comments.
sys/arm/broadcom/bcm2835/bcm2835_machdep.c
132 ↗(On Diff #20775)

We currently lack a way to measure this. It would need someone to think about how to do this across the different timers.

This revision was automatically updated to reflect the committed changes.