Page MenuHomeFreeBSD

RPi-B Add MULTIDELAY
ClosedPublic

Authored by manu on Sep 28 2016, 4:45 PM.
Tags
Referenced Files
Unknown Object (File)
Nov 15 2024, 4:06 PM
Unknown Object (File)
Nov 13 2024, 11:05 PM
Unknown Object (File)
Oct 23 2024, 11:06 AM
Unknown Object (File)
Oct 22 2024, 6:58 PM
Unknown Object (File)
Oct 20 2024, 9:15 AM
Unknown Object (File)
Sep 30 2024, 11:53 PM
Unknown Object (File)
Sep 15 2024, 2:03 AM
Unknown Object (File)
Sep 8 2024, 11:07 AM
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.