diff options
author | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-16 23:40:32 +0200 |
---|---|---|
committer | Álvaro Fernández Rojas <noltari@gmail.com> | 2022-05-17 15:11:22 +0200 |
commit | 20ea6adbf199097c4f5f591ffee088340630dae4 (patch) | |
tree | d6719d95e136611a1c25bbf7789652d6d402779d /target/linux/bcm27xx/patches-5.15/950-0046-Register-the-clocks-early-during-the-boot-process-so.patch | |
parent | bca05bd072180dc38ef740b37ded9572a6db1981 (diff) | |
download | upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.gz upstream-20ea6adbf199097c4f5f591ffee088340630dae4.tar.bz2 upstream-20ea6adbf199097c4f5f591ffee088340630dae4.zip |
bcm27xx: add support for linux v5.15
Build system: x86_64
Build-tested: bcm2708, bcm2709, bcm2710, bcm2711
Run-tested: bcm2708/RPiB+, bcm2709/RPi3B, bcm2710/RPi3B, bcm2711/RPi4B
Signed-off-by: Marty Jones <mj8263788@gmail.com>
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-5.15/950-0046-Register-the-clocks-early-during-the-boot-process-so.patch')
-rw-r--r-- | target/linux/bcm27xx/patches-5.15/950-0046-Register-the-clocks-early-during-the-boot-process-so.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-5.15/950-0046-Register-the-clocks-early-during-the-boot-process-so.patch b/target/linux/bcm27xx/patches-5.15/950-0046-Register-the-clocks-early-during-the-boot-process-so.patch new file mode 100644 index 0000000000..8dd6abdfdb --- /dev/null +++ b/target/linux/bcm27xx/patches-5.15/950-0046-Register-the-clocks-early-during-the-boot-process-so.patch @@ -0,0 +1,45 @@ +From 098cc3b9ed15b24089bae72c5de9d099910d10d4 Mon Sep 17 00:00:00 2001 +From: Martin Sperl <kernel@martin.sperl.org> +Date: Fri, 2 Sep 2016 16:45:27 +0100 +Subject: [PATCH] Register the clocks early during the boot process, so + that special/critical clocks can get enabled early on in the boot process + avoiding the risk of disabling a clock, pll_divider or pll when a claiming + driver fails to install propperly - maybe it needs to defer. + +Signed-off-by: Martin Sperl <kernel@martin.sperl.org> +--- + drivers/clk/bcm/clk-bcm2835.c | 15 +++++++++++++-- + 1 file changed, 13 insertions(+), 2 deletions(-) + +--- a/drivers/clk/bcm/clk-bcm2835.c ++++ b/drivers/clk/bcm/clk-bcm2835.c +@@ -2289,8 +2289,15 @@ static int bcm2835_clk_probe(struct plat + if (ret) + return ret; + +- return of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, ++ ret = of_clk_add_hw_provider(dev->of_node, of_clk_hw_onecell_get, + &cprman->onecell); ++ if (ret) ++ return ret; ++ ++ /* note that we have registered all the clocks */ ++ dev_dbg(dev, "registered %d clocks\n", asize); ++ ++ return 0; + } + + static const struct cprman_plat_data cprman_bcm2835_plat_data = { +@@ -2316,7 +2323,11 @@ static struct platform_driver bcm2835_cl + .probe = bcm2835_clk_probe, + }; + +-builtin_platform_driver(bcm2835_clk_driver); ++static int __init __bcm2835_clk_driver_init(void) ++{ ++ return platform_driver_register(&bcm2835_clk_driver); ++} ++core_initcall(__bcm2835_clk_driver_init); + + MODULE_AUTHOR("Eric Anholt <eric@anholt.net>"); + MODULE_DESCRIPTION("BCM2835 clock driver"); |