Skip to content

Commit

Permalink
soc: aspeed: Remove LCLK from LPC sub-devices
Browse files Browse the repository at this point in the history
The LCLK is configured to be critical.

LCLK should not be gated even though there are
no LPC sub device drivers mounted.

Signed-off-by: Chia-Wei Wang <[email protected]>
Change-Id: I0a4423a55924c028d92f8220ed59fef7e1cd186f
(cherry picked from commit 857b2a8)
  • Loading branch information
ChiaweiW authored and aspeedkevin committed Nov 24, 2023
1 parent e9a9397 commit 23960d7
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 20 deletions.
5 changes: 5 additions & 0 deletions arch/arm/boot/dts/aspeed/aspeed-ast2600-evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -357,3 +357,8 @@
oob,dma-rx-desc-num = <0x8>;
flash,dma-mode;
};

&lpc_snoop {
status = "okay";
snoop-ports = <0x80>;
};
1 change: 0 additions & 1 deletion arch/arm/boot/dts/aspeed/aspeed-g6.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,6 @@
compatible = "aspeed,ast2600-lpc-snoop";
reg = <0x80 0x80>;
interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&syscon ASPEED_CLK_GATE_LCLK>;
status = "disabled";
};

Expand Down
19 changes: 0 additions & 19 deletions drivers/soc/aspeed/aspeed-lpc-snoop.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
*/

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/interrupt.h>
#include <linux/fs.h>
#include <linux/kfifo.h>
Expand Down Expand Up @@ -66,7 +65,6 @@ struct aspeed_lpc_snoop_channel {
struct aspeed_lpc_snoop {
struct regmap *regmap;
int irq;
struct clk *clk;
struct aspeed_lpc_snoop_channel chan[NUM_SNOOP_CHANNELS];
};

Expand Down Expand Up @@ -292,19 +290,6 @@ static int aspeed_lpc_snoop_probe(struct platform_device *pdev)
return -ENODEV;
}

lpc_snoop->clk = devm_clk_get(dev, NULL);
if (IS_ERR(lpc_snoop->clk)) {
rc = PTR_ERR(lpc_snoop->clk);
if (rc != -EPROBE_DEFER)
dev_err(dev, "couldn't get clock\n");
return rc;
}
rc = clk_prepare_enable(lpc_snoop->clk);
if (rc) {
dev_err(dev, "couldn't enable clock\n");
return rc;
}

rc = aspeed_lpc_snoop_config_irq(lpc_snoop, pdev);
if (rc)
goto err;
Expand All @@ -326,8 +311,6 @@ static int aspeed_lpc_snoop_probe(struct platform_device *pdev)
return 0;

err:
clk_disable_unprepare(lpc_snoop->clk);

return rc;
}

Expand All @@ -339,8 +322,6 @@ static int aspeed_lpc_snoop_remove(struct platform_device *pdev)
aspeed_lpc_disable_snoop(lpc_snoop, 0);
aspeed_lpc_disable_snoop(lpc_snoop, 1);

clk_disable_unprepare(lpc_snoop->clk);

return 0;
}

Expand Down

0 comments on commit 23960d7

Please sign in to comment.