diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-16 06:53:14 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2024-09-16 06:53:14 +0200 |
commit | 8617d7d6298f54dfef4038281863270b5864fe83 (patch) | |
tree | 3ab02deb2eb2537cd284b66d643d3f18dd5c85b9 /drivers/bus | |
parent | a4ebad655b98c91c10cf0690e66c11b0891c76ee (diff) | |
parent | 439667fb943cfea46d7bde5c7b29c89efec3cbc7 (diff) |
Merge tag 'mips_6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux
Pull MIPS updates from Thomas Bogendoerfer:
- use devm_clk_get_enabled() helper
- prototype fixes
- cleanup unused stuff
* tag 'mips_6.12' of git://git.kernel.org/pub/scm/linux/kernel/git/mips/linux:
mips: Remove posix_types.h include from sigcontext.h
bus: bt1-apb: change to use devm_clk_get_enabled() helper
bus: bt1-axi: change to use devm_clk_get_enabled() helper
MIPS: dec: prom: Remove unused unregister_prom_console() declaration
MIPS: Remove unused mips_display/_scroll_message() declarations
MIPS: Remove unused declarations in asm/cmp.h
MIPS: MT: Remove unused function mips_mt_regdump()
mips/jazz: remove unused jazz_handle_int() declaration
MIPS: Remove unused function dump_au1000_dma_channel() in dma.c
MIPS: ralink: Fix missing `get_c0_perfcount_int` prototype
MIPS: ralink: Fix missing `plat_time_init` prototype
Diffstat (limited to 'drivers/bus')
-rw-r--r-- | drivers/bus/bt1-apb.c | 23 | ||||
-rw-r--r-- | drivers/bus/bt1-axi.c | 23 |
2 files changed, 3 insertions, 43 deletions
diff --git a/drivers/bus/bt1-apb.c b/drivers/bus/bt1-apb.c index 595fb22b73e0..7463124b6dd9 100644 --- a/drivers/bus/bt1-apb.c +++ b/drivers/bus/bt1-apb.c @@ -185,34 +185,13 @@ static int bt1_apb_request_rst(struct bt1_apb *apb) return ret; } -static void bt1_apb_disable_clk(void *data) -{ - struct bt1_apb *apb = data; - - clk_disable_unprepare(apb->pclk); -} - static int bt1_apb_request_clk(struct bt1_apb *apb) { - int ret; - - apb->pclk = devm_clk_get(apb->dev, "pclk"); + apb->pclk = devm_clk_get_enabled(apb->dev, "pclk"); if (IS_ERR(apb->pclk)) return dev_err_probe(apb->dev, PTR_ERR(apb->pclk), "Couldn't get APB clock descriptor\n"); - ret = clk_prepare_enable(apb->pclk); - if (ret) { - dev_err(apb->dev, "Couldn't enable the APB clock\n"); - return ret; - } - - ret = devm_add_action_or_reset(apb->dev, bt1_apb_disable_clk, apb); - if (ret) { - dev_err(apb->dev, "Can't add APB EHB clocks disable action\n"); - return ret; - } - apb->rate = clk_get_rate(apb->pclk); if (!apb->rate) { dev_err(apb->dev, "Invalid clock rate\n"); diff --git a/drivers/bus/bt1-axi.c b/drivers/bus/bt1-axi.c index 4007e7322cf2..a5254c73bf43 100644 --- a/drivers/bus/bt1-axi.c +++ b/drivers/bus/bt1-axi.c @@ -146,33 +146,14 @@ static int bt1_axi_request_rst(struct bt1_axi *axi) return ret; } -static void bt1_axi_disable_clk(void *data) -{ - struct bt1_axi *axi = data; - - clk_disable_unprepare(axi->aclk); -} - static int bt1_axi_request_clk(struct bt1_axi *axi) { - int ret; - - axi->aclk = devm_clk_get(axi->dev, "aclk"); + axi->aclk = devm_clk_get_enabled(axi->dev, "aclk"); if (IS_ERR(axi->aclk)) return dev_err_probe(axi->dev, PTR_ERR(axi->aclk), "Couldn't get AXI Interconnect clock\n"); - ret = clk_prepare_enable(axi->aclk); - if (ret) { - dev_err(axi->dev, "Couldn't enable the AXI clock\n"); - return ret; - } - - ret = devm_add_action_or_reset(axi->dev, bt1_axi_disable_clk, axi); - if (ret) - dev_err(axi->dev, "Can't add AXI clock disable action\n"); - - return ret; + return 0; } static int bt1_axi_request_irq(struct bt1_axi *axi) |