* [PATCH 2.6] vr41xx: bcu update
@ 2005-04-11 14:54 Yoichi Yuasa
2005-04-11 16:05 ` Ralf Baechle
0 siblings, 1 reply; 2+ messages in thread
From: Yoichi Yuasa @ 2005-04-11 14:54 UTC (permalink / raw)
To: Ralf Baechle; +Cc: yuasa, linux-mips
This patch had added EXPORT_SYMBOL() and had removed early_initcall().
Yoichi
Signed-off-by: Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
diff -urN -X dontdiff c-orig/arch/mips/vr41xx/common/bcu.c c/arch/mips/vr41xx/common/bcu.c
--- c-orig/arch/mips/vr41xx/common/bcu.c Thu Dec 2 13:56:02 2004
+++ c/arch/mips/vr41xx/common/bcu.c Sat Apr 9 23:28:45 2005
@@ -3,7 +3,7 @@
*
* Copyright (C) 2002 MontaVista Software Inc.
* Author: Yoichi Yuasa <yyuasa@mvista.com, or source@mvista.com>
- * Copyright (C) 2003-2004 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ * Copyright (C) 2003-2005 Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
*
* 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
@@ -28,20 +28,16 @@
* Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
* - Added support for NEC VR4133.
*/
-#include <linux/init.h>
-#include <linux/ioport.h>
#include <linux/kernel.h>
+#include <linux/module.h>
#include <linux/smp.h>
#include <linux/types.h>
#include <asm/cpu.h>
#include <asm/io.h>
-#define IO_MEM_RESOURCE_START 0UL
-#define IO_MEM_RESOURCE_END 0x1fffffffUL
-
-#define CLKSPEEDREG_TYPE1 KSEG1ADDR(0x0b000014)
-#define CLKSPEEDREG_TYPE2 KSEG1ADDR(0x0f000014)
+#define CLKSPEEDREG_TYPE1 (void __iomem *)KSEG1ADDR(0x0b000014)
+#define CLKSPEEDREG_TYPE2 (void __iomem *)KSEG1ADDR(0x0f000014)
#define CLKSP(x) ((x) & 0x001f)
#define CLKSP_VR4133(x) ((x) & 0x0007)
@@ -63,11 +59,15 @@
return vr41xx_vtclock;
}
+EXPORT_SYMBOL_GPL(vr41xx_get_vtclock_frequency);
+
unsigned long vr41xx_get_tclock_frequency(void)
{
return vr41xx_tclock;
}
+EXPORT_SYMBOL_GPL(vr41xx_get_tclock_frequency);
+
static inline uint16_t read_clkspeed(void)
{
switch (current_cpu_data.cputype) {
@@ -207,7 +207,7 @@
return tclock;
}
-static int __init vr41xx_bcu_init(void)
+void vr41xx_calculate_clock_frequency(void)
{
unsigned long pclock;
uint16_t clkspeed;
@@ -217,11 +217,6 @@
pclock = calculate_pclock(clkspeed);
vr41xx_vtclock = calculate_vtclock(clkspeed, pclock);
vr41xx_tclock = calculate_tclock(clkspeed, pclock, vr41xx_vtclock);
-
- iomem_resource.start = IO_MEM_RESOURCE_START;
- iomem_resource.end = IO_MEM_RESOURCE_END;
-
- return 0;
}
-early_initcall(vr41xx_bcu_init);
+EXPORT_SYMBOL_GPL(vr41xx_calculate_clock_frequency);
diff -urN -X dontdiff c-orig/include/asm-mips/vr41xx/vr41xx.h c/include/asm-mips/vr41xx/vr41xx.h
--- c-orig/include/asm-mips/vr41xx/vr41xx.h Tue Mar 8 08:11:27 2005
+++ c/include/asm-mips/vr41xx/vr41xx.h Sat Apr 9 23:29:46 2005
@@ -45,6 +45,7 @@
/*
* Bus Control Uint
*/
+extern unsigned long vr41xx_calculate_clock_frequency(void);
extern unsigned long vr41xx_get_vtclock_frequency(void);
extern unsigned long vr41xx_get_tclock_frequency(void);
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-11 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-11 14:54 [PATCH 2.6] vr41xx: bcu update Yoichi Yuasa
2005-04-11 16:05 ` Ralf Baechle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox