summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ns9xxx/clock.h
blob: b86c30dd79eb50aa73f57d61177b8b5fabcf2158 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * arch/arm/mach-ns9xxx/clock.h
 *
 * Copyright (C) 2007 by Digi International Inc.
 * All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */
#ifndef __NS9XXX_CLOCK_H
#define __NS9XXX_CLOCK_H

#include <linux/list.h>

struct clk {
	struct module *owner;
	const char *name;
	int id;

	struct clk *parent;

	unsigned long rate;
	int (*endisable)(struct clk *, int enable);
	unsigned long (*get_rate)(struct clk *);

	struct list_head node;
	unsigned long refcount;
	unsigned long usage;
};

int clk_register(struct clk *clk);
int clk_unregister(struct clk *clk);

#endif /* ifndef __NS9XXX_CLOCK_H */
OpenPOWER on IntegriCloud