Blame view
arch/arm/mach-w90x900/clock.h
1023 Bytes
0e4a34bb6
|
1 2 3 4 5 6 7 8 9 10 11 |
/* * linux/arch/arm/mach-w90x900/clock.h * * Copyright (c) 2008 Nuvoton technology corporation * * Wan ZongShun <mcuos.com@gmail.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License. */ |
6d803ba73
|
12 |
#include <linux/clkdev.h> |
0e4a34bb6
|
13 |
|
35c9221ac
|
14 15 |
void nuc900_clk_enable(struct clk *clk, int enable); void nuc900_subclk_enable(struct clk *clk, int enable); |
0e4a34bb6
|
16 17 18 19 20 21 22 23 24 |
struct clk { unsigned long cken; unsigned int enabled; void (*enable)(struct clk *, int enable); }; #define DEFINE_CLK(_name, _ctrlbit) \ struct clk clk_##_name = { \ |
35c9221ac
|
25 |
.enable = nuc900_clk_enable, \ |
0e4a34bb6
|
26 27 |
.cken = (1 << _ctrlbit), \ } |
db58e90fd
|
28 29 |
#define DEFINE_SUBCLK(_name, _ctrlbit) \ struct clk clk_##_name = { \ |
35c9221ac
|
30 |
.enable = nuc900_subclk_enable, \ |
db58e90fd
|
31 32 |
.cken = (1 << _ctrlbit), \ } |
0e4a34bb6
|
33 34 35 36 37 38 |
#define DEF_CLKLOOK(_clk, _devname, _conname) \ { \ .clk = _clk, \ .dev_id = _devname, \ .con_id = _conname, \ } |