source: trunk/target/linux/brcm63xx/patches-3.3/102-MIPS-BCM63XX-add-support-for-ipsec-clock.patch @ 31131

Last change on this file since 31131 was 31131, checked in by jogo, 4 years ago

bcm63xx: add driver for the internal hw trng on bcm6368

File size: 1.1 KB
  • arch/mips/bcm63xx/clk.c

    From 69b21096e25889d7db7cfc159202ef0a16530e6b Mon Sep 17 00:00:00 2001
    From: Florian Fainelli <florian@openwrt.org>
    Date: Wed, 25 Jan 2012 17:39:54 +0100
    Subject: [PATCH 15/63] MIPS: BCM63XX: add support for "ipsec" clock
    
    This module is only available on BCM6368 so far and does not require
    resetting the block.
    
    Signed-off-by: Florian Fainelli <florian@openwrt.org>
    ---
     arch/mips/bcm63xx/clk.c |   14 ++++++++++++++
     1 files changed, 14 insertions(+), 0 deletions(-)
    
    a b static struct clk clk_xtm = { 
    224224}; 
    225225 
    226226/* 
     227 * IPsec clock 
     228 */ 
     229static void ipsec_set(struct clk *clk, int enable) 
     230{ 
     231        bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable); 
     232} 
     233 
     234static struct clk clk_ipsec = { 
     235        .set    = ipsec_set, 
     236}; 
     237 
     238/* 
    227239 * Internal peripheral clock 
    228240 */ 
    229241static struct clk clk_periph = { 
    struct clk *clk_get(struct device *dev, 
    280292                return &clk_periph; 
    281293        if (BCMCPU_IS_6358() && !strcmp(id, "pcm")) 
    282294                return &clk_pcm; 
     295        if (BCMCPU_IS_6368() && !strcmp(id, "ipsec")) 
     296                return &clk_ipsec; 
    283297        return ERR_PTR(-ENOENT); 
    284298} 
    285299 
Note: See TracBrowser for help on using the repository browser.