Skip to content

Commit

Permalink
MIPS: BCM63XX: add support for "ipsec" clock
Browse files Browse the repository at this point in the history
This module is only available on BCM6368 so far and does not require
resetting the block.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Cc: linux-mips@linux-mips.org
Cc: mpm@selenic.com
Cc: herbert@gondor.apana.org.au
Patchwork: https://patchwork.linux-mips.org/patch/3324/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
  • Loading branch information
Florian Fainelli authored and Ralf Baechle committed Jul 24, 2012
1 parent a03822e commit 0b55561
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/mips/bcm63xx/clk.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,18 @@ static struct clk clk_xtm = {
.set = xtm_set,
};

/*
* IPsec clock
*/
static void ipsec_set(struct clk *clk, int enable)
{
bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable);
}

static struct clk clk_ipsec = {
.set = ipsec_set,
};

/*
* Internal peripheral clock
*/
Expand Down Expand Up @@ -280,6 +292,8 @@ struct clk *clk_get(struct device *dev, const char *id)
return &clk_periph;
if (BCMCPU_IS_6358() && !strcmp(id, "pcm"))
return &clk_pcm;
if (BCMCPU_IS_6368() && !strcmp(id, "ipsec"))
return &clk_ipsec;
return ERR_PTR(-ENOENT);
}

Expand Down

0 comments on commit 0b55561

Please sign in to comment.