2009-12-31 14:06:05 +00:00
|
|
|
/*
|
|
|
|
* linux/arch/arm/mach-nuc93x/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.
|
|
|
|
*/
|
|
|
|
|
2010-11-17 09:04:33 +00:00
|
|
|
#include <linux/clkdev.h>
|
2009-12-31 14:06:05 +00:00
|
|
|
|
|
|
|
void nuc93x_clk_enable(struct clk *clk, int enable);
|
|
|
|
void clks_register(struct clk_lookup *clks, size_t num);
|
|
|
|
|
|
|
|
struct clk {
|
|
|
|
unsigned long cken;
|
|
|
|
unsigned int enabled;
|
|
|
|
void (*enable)(struct clk *, int enable);
|
|
|
|
};
|
|
|
|
|
|
|
|
#define DEFINE_CLK(_name, _ctrlbit) \
|
|
|
|
struct clk clk_##_name = { \
|
|
|
|
.enable = nuc93x_clk_enable, \
|
|
|
|
.cken = (1 << _ctrlbit), \
|
|
|
|
}
|
|
|
|
|
|
|
|
#define DEF_CLKLOOK(_clk, _devname, _conname) \
|
|
|
|
{ \
|
|
|
|
.clk = _clk, \
|
|
|
|
.dev_id = _devname, \
|
|
|
|
.con_id = _conname, \
|
|
|
|
}
|
|
|
|
|