MIPS: BCM63XX: add and use a clock for PCIe
Add a PCIe clock and use that instead of directly touching the clock control register. While at it, fail if there is no such clock. Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com> Acked-by: Florian Fainelli <florian@openwrt.org> Patchwork: http://patchwork.linux-mips.org/patch/4452 Signed-off-by: John Crispin <blogic@openwrt.org>
このコミットが含まれているのは:
@@ -252,6 +252,19 @@ static struct clk clk_ipsec = {
|
||||
.set = ipsec_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* PCIe clock
|
||||
*/
|
||||
|
||||
static void pcie_set(struct clk *clk, int enable)
|
||||
{
|
||||
bcm_hwclock_set(CKCTL_6328_PCIE_EN, enable);
|
||||
}
|
||||
|
||||
static struct clk clk_pcie = {
|
||||
.set = pcie_set,
|
||||
};
|
||||
|
||||
/*
|
||||
* Internal peripheral clock
|
||||
*/
|
||||
@@ -313,6 +326,8 @@ struct clk *clk_get(struct device *dev, const char *id)
|
||||
return &clk_pcm;
|
||||
if (BCMCPU_IS_6368() && !strcmp(id, "ipsec"))
|
||||
return &clk_ipsec;
|
||||
if (BCMCPU_IS_6328() && !strcmp(id, "pcie"))
|
||||
return &clk_pcie;
|
||||
return ERR_PTR(-ENOENT);
|
||||
}
|
||||
|
||||
|
新しいイシューから参照
ユーザーをブロックする