[PATCH u-boot v2019.04-aspeed-openbmc 09/11] clk: aspeed: Add HACE yclk to ast2600

Klaus Heinrich Kiwi klaus at linux.vnet.ibm.com
Wed Apr 14 06:42:56 AEST 2021



On 4/13/2021 5:07 AM, Joel Stanley wrote:
> Signed-off-by: Joel Stanley <joel at jms.id.au>
Reviewed-by: Klaus Heinrich Kiwi <klaus at linux.vnet.ibm.com>
> ---
>   drivers/clk/aspeed/clk_ast2600.c | 22 ++++++++++++++++++++++
>   1 file changed, 22 insertions(+)
> 
> diff --git a/drivers/clk/aspeed/clk_ast2600.c b/drivers/clk/aspeed/clk_ast2600.c
> index 4c00008a5dfd..ba9a0a0a9a5a 100644
> --- a/drivers/clk/aspeed/clk_ast2600.c
> +++ b/drivers/clk/aspeed/clk_ast2600.c
> @@ -1066,6 +1066,25 @@ static ulong ast2600_enable_usbbhclk(struct ast2600_scu *scu)
>   	return 0;
>   }
> 
> +/* also known as yclk */
> +static ulong ast2600_enable_haceclk(struct ast2600_scu *scu)
> +{
> +	u32 reset_bit;
> +	u32 clkstop_bit;
> +
> +	reset_bit = BIT(ASPEED_RESET_HACE);
> +	clkstop_bit = BIT(13);
> +
> +	writel(reset_bit, &scu->sysreset_ctrl1);
> +	udelay(100);
> +	writel(clkstop_bit, &scu->clk_stop_clr_ctrl1);
> +	mdelay(20);
> +
> +	writel(reset_bit, &scu->sysreset_clr_ctrl1);
> +
> +	return 0;
> +}
> +
>   static int ast2600_clk_enable(struct clk *clk)
>   {
>   	struct ast2600_clk_priv *priv = dev_get_priv(clk->dev);
> @@ -1104,6 +1123,9 @@ static int ast2600_clk_enable(struct clk *clk)
>   		case ASPEED_CLK_GATE_USBPORT2CLK:
>   			ast2600_enable_usbbhclk(priv->scu);
>   			break;
> +		case ASPEED_CLK_GATE_YCLK:
> +			ast2600_enable_haceclk(priv->scu);
> +			break;
>   		default:
>   			pr_debug("can't enable clk \n");
>   			return -ENOENT;
> 

-- 
Klaus Heinrich Kiwi <klaus at linux.vnet.ibm.com>


More information about the openbmc mailing list