Skip to content

Commit

Permalink
OMAP3 clock: convert clock34xx.h to clock34xx_data.c
Browse files Browse the repository at this point in the history
The OMAP3 clock code currently #includes a large .h file full of static
data structures.  Instead, define the data in a .c file.

Russell King <linux@arm.linux.org.uk> proposed this new arrangement:

    http://marc.info/?l=linux-omap&m=125967425908895&w=2

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Cc: Russell King <linux@arm.linux.org.uk>
  • Loading branch information
Paul Walmsley authored and paul committed Dec 11, 2009
1 parent 75d4334 commit 82e9bd5
Show file tree
Hide file tree
Showing 8 changed files with 3,457 additions and 3,385 deletions.
2 changes: 1 addition & 1 deletion arch/arm/mach-omap2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ obj-$(CONFIG_ARCH_OMAP4) += cm4xxx.o

# Clock framework
obj-$(CONFIG_ARCH_OMAP2) += clock24xx.o
obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o
obj-$(CONFIG_ARCH_OMAP3) += clock34xx.o clock34xx_data.o

# EMU peripherals
obj-$(CONFIG_OMAP3_EMU) += emu.o
Expand Down
2 changes: 2 additions & 0 deletions arch/arm/mach-omap2/clock.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ extern const struct clkops clkops_omap2_dflt;

extern u8 cpu_mask;

extern struct clk_functions omap2_clk_functions;

/* clksel_rate data common to 24xx/343x */
static const struct clksel_rate gpt_32k_rates[] = {
{ .div = 1, .val = 0, .flags = RATE_IN_24XX | RATE_IN_343X | DEFAULT_RATE },
Expand Down
21 changes: 2 additions & 19 deletions arch/arm/mach-omap2/clock24xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include <plat/clock.h>
#include <plat/sram.h>
#include <plat/prcm.h>
#include <plat/clkdev_omap.h>
#include <asm/div64.h>
#include <asm/clkdev.h>

Expand Down Expand Up @@ -59,24 +60,6 @@ static const struct clkops clkops_omap2430_i2chs_wait = {

#include "clock24xx.h"

struct omap_clk {
u32 cpu;
struct clk_lookup lk;
};

#define CLK(dev, con, ck, cp) \
{ \
.cpu = cp, \
.lk = { \
.dev_id = dev, \
.con_id = con, \
.clk = ck, \
}, \
}

#define CK_243X RATE_IN_243X
#define CK_242X RATE_IN_242X

static struct omap_clk omap24xx_clks[] = {
/* external root sources */
CLK(NULL, "func_32k_ck", &func_32k_ck, CK_243X | CK_242X),
Expand Down Expand Up @@ -658,7 +641,7 @@ void omap2_clk_init_cpufreq_table(struct cpufreq_frequency_table **table)
}
#endif

static struct clk_functions omap2_clk_functions = {
struct clk_functions omap2_clk_functions = {
.clk_enable = omap2_clk_enable,
.clk_disable = omap2_clk_disable,
.clk_round_rate = omap2_clk_round_rate,
Expand Down
Loading

0 comments on commit 82e9bd5

Please sign in to comment.