mirror of
https://github.com/torvalds/linux.git
synced 2024-11-28 15:11:31 +00:00
db58e90fdb
Add sub clock api for w90p910 platform. Signed-off-by: Wan ZongShun <mcuos.com@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
45 lines
1.1 KiB
C
45 lines
1.1 KiB
C
/*
|
|
* 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.
|
|
*/
|
|
|
|
#include <asm/clkdev.h>
|
|
|
|
void w90x900_clk_enable(struct clk *clk, int enable);
|
|
void w90x900_subclk_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 = w90x900_clk_enable, \
|
|
.cken = (1 << _ctrlbit), \
|
|
}
|
|
|
|
#define DEFINE_SUBCLK(_name, _ctrlbit) \
|
|
struct clk clk_##_name = { \
|
|
.enable = w90x900_subclk_enable, \
|
|
.cken = (1 << _ctrlbit), \
|
|
}
|
|
|
|
|
|
#define DEF_CLKLOOK(_clk, _devname, _conname) \
|
|
{ \
|
|
.clk = _clk, \
|
|
.dev_id = _devname, \
|
|
.con_id = _conname, \
|
|
}
|
|
|