Skip to content

Rpi 4.4.y clk driver fixes #1472

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 23, 2016
Merged

Conversation

anholt
Copy link
Contributor

@anholt anholt commented May 12, 2016

Here are a few fixes that are on their way into the clk-next tree (Stephen Boyd had one comment that I hope I've answered to his satisfaction). Patch 1 should make having drivers reference the VPU clock from cprman reliable. Patch 2 should keep -EPROBE_DEFER or clock disables of siblings below PLLD_PER from taking down the network. Patch 3 should fix a user's bug report I have about HDMI flickering (and I've had flickering on DSI because of it, as well).

Lee Jones and others added 4 commits May 12, 2016 12:08
Critical clocks are those which must not be gated, else undefined
or catastrophic failure would occur.  Here we have chosen to
ensure the prepare/enable counts are correctly incremented, so as
not to confuse users with enabled clocks with no visible users.

Signed-off-by: Lee Jones <[email protected]>
Signed-off-by: Michael Turquette <[email protected]>
Link: lkml.kernel.org/r/[email protected]
(cherry picked from commit 32b9b10)
The VPU clock is also the clock for our AXI bus, so we really can't
disable it.  This might have happened during boot if, for example,
uart1 (aux_uart clock) probed and was then disabled before the other
consumers of the VPU clock had probed.

v2: Rewrite to use a .flags in bcm2835_clock_data, since other clocks
    will need this too.

Signed-off-by: Eric Anholt <[email protected]>
These divide off of PLLD_PER and are used for the ethernet and wifi
PHYs source PLLs.  Neither of them is currently represented by a phy
device that would grab the clock for us.

This keeps other drivers from killing the networking PHYs when they
disable their own clocks and trigger PLLD_PER's refcount going to 0.

v2: Skip marking as critical if they aren't on at boot.

Signed-off-by: Eric Anholt <[email protected]>
If the firmware had set up a clock to source from PLLC, go along with
it.  But if we're looking for a new parent, we don't want to switch it
to PLLC because the firmware will force PLLC (and thus the AXI bus
clock) to different frequencies during over-temp/under-voltage,
without notification to Linux.

On my system, this moves the Linux-enabled HDMI state machine and DSI1
escape clock over to plld_per from pllc_per.  EMMC still ends up on
pllc_per, because the firmware had set it up to use that.

Signed-off-by: Eric Anholt <[email protected]>
Fixes: 41691b8 ("clk: bcm2835: Add support for programming the audio domain clocks")
@popcornmix popcornmix merged commit c9667ac into raspberrypi:rpi-4.4.y May 23, 2016
popcornmix added a commit to raspberrypi/firmware that referenced this pull request May 23, 2016
See: raspberrypi/linux#1463

kernel: Rpi 4.4.y clk driver fixes
See: raspberrypi/linux#1472

kernel: config: Add NF_MATCH_RPFILTER
See: raspberrypi/linux#1483

kernel: rtc: ds1307: ensure that any pending alarm is cleared before a new alarm is enabled
See: raspberrypi/linux#1482

kernel: mmc: Add card_quirks module parameter, log quirks
popcornmix added a commit to Hexxeh/rpi-firmware that referenced this pull request May 23, 2016
See: raspberrypi/linux#1463

kernel: Rpi 4.4.y clk driver fixes
See: raspberrypi/linux#1472

kernel: config: Add NF_MATCH_RPFILTER
See: raspberrypi/linux#1483

kernel: rtc: ds1307: ensure that any pending alarm is cleared before a new alarm is enabled
See: raspberrypi/linux#1482

kernel: mmc: Add card_quirks module parameter, log quirks
@anholt anholt deleted the rpi-4.4.y-clk branch June 2, 2016 18:41
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this pull request Feb 27, 2017
See: raspberrypi/linux#1463

kernel: Rpi 4.4.y clk driver fixes
See: raspberrypi/linux#1472

kernel: config: Add NF_MATCH_RPFILTER
See: raspberrypi/linux#1483

kernel: rtc: ds1307: ensure that any pending alarm is cleared before a new alarm is enabled
See: raspberrypi/linux#1482

kernel: mmc: Add card_quirks module parameter, log quirks
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.

2 participants