2 <:copyright-BRCM:2013:DUAL/GPL:standard
4 Copyright (c) 2013 Broadcom
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License, version 2, as published by
9 the Free Software Foundation (the "GPL").
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
17 A copy of the GPL is available at http://www.broadcom.com/licenses/GPLv2.php, or by
18 writing to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA.
28 #define IS_BCMCHIP(num) (defined(_BCM9##num##_)||defined(CONFIG_BCM9##num)||\
29 defined(CONFIG_BCM##num))
35 unsigned int ndiv_int
;
36 unsigned int ndiv_frac
;
42 int pll_vco_freq_set(unsigned int pll_addr
, struct PLL_DIVIDERS
*divs
);
43 int pll_ch_freq_set(unsigned int pll_addr
, unsigned int ch
, unsigned int mdiv
);
44 int pll_ch_freq_get(unsigned int pll_addr
, unsigned int ch
, unsigned int *freq
);
45 int ddr_freq_set(unsigned long freq
);
46 int viper_freq_set(unsigned long freq
);
47 int rdp_freq_set(unsigned long freq
);
48 unsigned long get_rdp_freq(unsigned int *rdp_freq
);
49 #if IS_BCMCHIP(6858) || IS_BCMCHIP(6856) || IS_BCMCHIP(6878) || IS_BCMCHIP(6855)
50 int pll_vco_freq_get(unsigned int pll_addr
, unsigned int *fvco
);
51 int pll_ch_freq_vco_set(unsigned int pll_addr
, unsigned int ch
,
52 unsigned int mdiv
, unsigned int use_vco
);
56 int pll_vco_config(unsigned int pll_addr
, unsigned int ndivider
, unsigned int pdivider
);
59 void set_vreg_clk(void);
68 int bcm_change_cpu_clk(BCM_CPU_CLK clock
);
72 #if IS_BCMCHIP(6858) || IS_BCMCHIP(6855)
73 #define XRDPPLL_RUNNER_CHANNEL 0
75 #if IS_BCMCHIP(6856) || IS_BCMCHIP(6846)
76 #define XRDPPLL_RUNNER_CHANNEL 1
79 #define SYSPLL_RUNNER_CHANNEL 0
82 /* TBD. Verify value. */
83 #define XRDPPLL_RUNNER_CHANNEL 1
85 #endif /* #ifndef CLK_RST_H */