Commit Graph

5 Commits (master)

Author SHA1 Message Date
cinap_lenrek c38fcb5dc3 arm64: use generic timer virtual counter for cycles()
We used to use performance cycle counter for cycles(),
but it is kind of useless in userspace as each core
has its own counter and hence not comparable between
cores. Also, the cycle counter stops counting when
the cores are idle.

Most callers expect cycles() to return a high resolution
timestamp instead, so do the best we can do here
and enable the userspace generic timer virtual counter.
2021-07-23 15:10:01 +00:00
cinap_lenrek 6280c0f17b bcm64: do not use OTP_BOOTMODE_REG to determine OSC frequency (thanks richard miller)
the register does not seem to be accessible on the Rpi 3b.
so instead hardcode oscfreq in the Soc structure.
2019-08-19 16:42:20 +02:00
cinap_lenrek ea2a5a33ca bcm64: fix wrong prescaler for generic timer on rpi4
the raspberry pi 4 uses 54 instead of 19.2 MHz crystal.
detect which frequency is used by reading OTP bootmode
register:

https://www.raspberrypi.org/documentation/hardware/raspberrypi/otpbits.md

Bit 1: sets the oscillator frequency to 19.2MHz
2019-07-27 17:59:25 +02:00
cinap_lenrek 811b80cae1 bcm, bcm64: make irq.$O optional and add intrdisable(), use intrenable()
the raspberry pi 4 has a new interrupt controller and
pci support, so get rid of intrenable() macro and
properly make intrenable function with tbdf argument.
2019-07-25 08:58:58 +02:00
cinap_lenrek c6ad540af5 bcm64: add experimental work in progress arm64 kernel for raspberry pi 3 2019-05-03 23:14:57 +02:00