kernel: generic: spi: allow empty (un)prepare transfer
[openwrt.git] / target / linux / brcm63xx / patches-3.3 / 102-MIPS-BCM63XX-add-support-for-ipsec-clock.patch
1 From 69b21096e25889d7db7cfc159202ef0a16530e6b Mon Sep 17 00:00:00 2001
2 From: Florian Fainelli <florian@openwrt.org>
3 Date: Wed, 25 Jan 2012 17:39:54 +0100
4 Subject: [PATCH 15/63] MIPS: BCM63XX: add support for "ipsec" clock
5
6 This module is only available on BCM6368 so far and does not require
7 resetting the block.
8
9 Signed-off-by: Florian Fainelli <florian@openwrt.org>
10 ---
11  arch/mips/bcm63xx/clk.c |   14 ++++++++++++++
12  1 files changed, 14 insertions(+), 0 deletions(-)
13
14 --- a/arch/mips/bcm63xx/clk.c
15 +++ b/arch/mips/bcm63xx/clk.c
16 @@ -224,6 +224,18 @@ static struct clk clk_xtm = {
17  };
18  
19  /*
20 + * IPsec clock
21 + */
22 +static void ipsec_set(struct clk *clk, int enable)
23 +{
24 +       bcm_hwclock_set(CKCTL_6368_IPSEC_EN, enable);
25 +}
26 +
27 +static struct clk clk_ipsec = {
28 +       .set    = ipsec_set,
29 +};
30 +
31 +/*
32   * Internal peripheral clock
33   */
34  static struct clk clk_periph = {
35 @@ -280,6 +292,8 @@ struct clk *clk_get(struct device *dev,
36                 return &clk_periph;
37         if (BCMCPU_IS_6358() && !strcmp(id, "pcm"))
38                 return &clk_pcm;
39 +       if (BCMCPU_IS_6368() && !strcmp(id, "ipsec"))
40 +               return &clk_ipsec;
41         return ERR_PTR(-ENOENT);
42  }
43