Version:  2.0.40 2.2.26 2.4.37 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15 3.16

Linux/drivers/clk/clk-bcm2835.c

  1 /*
  2  * Copyright (C) 2010 Broadcom
  3  * Copyright (C) 2012 Stephen Warren
  4  *
  5  * This program is free software; you can redistribute it and/or modify
  6  * it under the terms of the GNU General Public License as published by
  7  * the Free Software Foundation; either version 2 of the License, or
  8  * (at your option) any later version.
  9  *
 10  * This program is distributed in the hope that it will be useful,
 11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
 12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 13  * GNU General Public License for more details.
 14  *
 15  * You should have received a copy of the GNU General Public License
 16  * along with this program; if not, write to the Free Software
 17  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18  */
 19 
 20 #include <linux/clk-provider.h>
 21 #include <linux/clkdev.h>
 22 #include <linux/clk/bcm2835.h>
 23 #include <linux/of.h>
 24 
 25 /*
 26  * These are fixed clocks. They're probably not all root clocks and it may
 27  * be possible to turn them on and off but until this is mapped out better
 28  * it's the only way they can be used.
 29  */
 30 void __init bcm2835_init_clocks(void)
 31 {
 32         struct clk *clk;
 33         int ret;
 34 
 35         clk = clk_register_fixed_rate(NULL, "sys_pclk", NULL, CLK_IS_ROOT,
 36                                         250000000);
 37         if (IS_ERR(clk))
 38                 pr_err("sys_pclk not registered\n");
 39 
 40         clk = clk_register_fixed_rate(NULL, "apb_pclk", NULL, CLK_IS_ROOT,
 41                                         126000000);
 42         if (IS_ERR(clk))
 43                 pr_err("apb_pclk not registered\n");
 44 
 45         clk = clk_register_fixed_rate(NULL, "uart0_pclk", NULL, CLK_IS_ROOT,
 46                                         3000000);
 47         if (IS_ERR(clk))
 48                 pr_err("uart0_pclk not registered\n");
 49         ret = clk_register_clkdev(clk, NULL, "20201000.uart");
 50         if (ret)
 51                 pr_err("uart0_pclk alias not registered\n");
 52 
 53         clk = clk_register_fixed_rate(NULL, "uart1_pclk", NULL, CLK_IS_ROOT,
 54                                         125000000);
 55         if (IS_ERR(clk))
 56                 pr_err("uart1_pclk not registered\n");
 57         ret = clk_register_clkdev(clk, NULL, "20215000.uart");
 58         if (ret)
 59                 pr_err("uart1_pclk alias not registered\n");
 60 }
 61 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us