spi-topcliff-pch: supports a spi mode setup and bit order setup by IO control
[zen-stable.git] / arch / arm / mach-highbank / clock.c
blobc25a2ae4fde150cc683f4221afb0466c237bf43e
1 /*
2 * Copyright 2011 Calxeda, Inc.
4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License,
6 * version 2, as published by the Free Software Foundation.
8 * This program is distributed in the hope it will be useful, but WITHOUT
9 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
10 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
11 * more details.
13 * You should have received a copy of the GNU General Public License along with
14 * this program. If not, see <http://www.gnu.org/licenses/>.
16 #include <linux/module.h>
17 #include <linux/kernel.h>
18 #include <linux/errno.h>
19 #include <linux/clk.h>
20 #include <linux/clkdev.h>
22 struct clk {
23 unsigned long rate;
26 int clk_enable(struct clk *clk)
28 return 0;
31 void clk_disable(struct clk *clk)
34 unsigned long clk_get_rate(struct clk *clk)
36 return clk->rate;
39 long clk_round_rate(struct clk *clk, unsigned long rate)
41 return clk->rate;
44 int clk_set_rate(struct clk *clk, unsigned long rate)
46 return 0;
49 static struct clk eclk = { .rate = 200000000 };
50 static struct clk pclk = { .rate = 150000000 };
52 static struct clk_lookup lookups[] = {
53 { .clk = &pclk, .con_id = "apb_pclk", },
54 { .clk = &pclk, .dev_id = "sp804", },
55 { .clk = &eclk, .dev_id = "ffe0e000.sdhci", },
56 { .clk = &pclk, .dev_id = "fff36000.serial", },
59 void __init highbank_clocks_init(void)
61 clkdev_add_table(lookups, ARRAY_SIZE(lookups));