Skip to content

Commit 348c913

Browse files
committed
[MIPS] Fix build breakage due to duplicate cpu_clock definition
commit e436d80 Author: Ingo Molnar <mingo@elte.hu> Date: Thu Jul 19 21:28:35 2007 +0200 [PATCH] sched: implement cpu_clock(cpu) high-speed time source broke the build of several MIPS platforms which were already using the symbol cpu_clock for the own purposes. Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
1 parent 3266c6a commit 348c913

5 files changed

Lines changed: 11 additions & 11 deletions

File tree

‎arch/mips/lemote/lm2e/prom.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <asm/bootinfo.h>
2424

2525
extern unsigned long bus_clock;
26-
extern unsigned long cpu_clock;
26+
extern unsigned long cpu_clock_freq;
2727
extern unsigned int memsize, highmemsize;
2828
extern int putDebugChar(unsigned char byte);
2929

@@ -81,7 +81,7 @@ do { \
8181
l = (long)*env;
8282
while (l != 0) {
8383
parse_even_earlier(bus_clock, "busclock", l);
84-
parse_even_earlier(cpu_clock, "cpuclock", l);
84+
parse_even_earlier(cpu_clock_freq, "cpuclock", l);
8585
parse_even_earlier(memsize, "memsize", l);
8686
parse_even_earlier(highmemsize, "highmemsize", l);
8787
env++;
@@ -91,7 +91,7 @@ do { \
9191
memsize = 256;
9292

9393
pr_info("busclock=%ld, cpuclock=%ld,memsize=%d,highmemsize=%d\n",
94-
bus_clock, cpu_clock, memsize, highmemsize);
94+
bus_clock, cpu_clock_freq, memsize, highmemsize);
9595
}
9696

9797
void __init prom_free_prom_memory(void)

‎arch/mips/lemote/lm2e/setup.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ extern void mips_reboot_setup(void);
5858
#define PTR_PAD(p) (p)
5959
#endif
6060

61-
unsigned long cpu_clock;
61+
unsigned long cpu_clock_freq;
6262
unsigned long bus_clock;
6363
unsigned int memsize;
6464
unsigned int highmemsize = 0;
@@ -71,7 +71,7 @@ void __init plat_timer_setup(struct irqaction *irq)
7171
static void __init loongson2e_time_init(void)
7272
{
7373
/* setup mips r4k timer */
74-
mips_hpt_frequency = cpu_clock / 2;
74+
mips_hpt_frequency = cpu_clock_freq / 2;
7575
}
7676

7777
static unsigned long __init mips_rtc_get_time(void)

‎arch/mips/pmc-sierra/yosemite/prom.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ extern void prom_grab_secondary(void);
3434
struct callvectors *debug_vectors;
3535

3636
extern unsigned long yosemite_base;
37-
extern unsigned long cpu_clock;
37+
extern unsigned long cpu_clock_freq;
3838

3939
const char *get_system_type(void)
4040
{
@@ -119,7 +119,7 @@ void __init prom_init(void)
119119
16);
120120

121121
if (strncmp("cpuclock", *env, strlen("cpuclock")) == 0)
122-
cpu_clock =
122+
cpu_clock_freq =
123123
simple_strtol(*env + strlen("cpuclock="), NULL,
124124
10);
125125

‎arch/mips/pmc-sierra/yosemite/setup.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ unsigned char titan_ge_mac_addr_base[6] = {
5959
0x00, 0xe0, 0x04, 0x00, 0x00, 0x21
6060
};
6161

62-
unsigned long cpu_clock;
62+
unsigned long cpu_clock_freq;
6363
unsigned long yosemite_base;
6464

6565
static struct m48t37_rtc *m48t37_base;
@@ -140,7 +140,7 @@ void __init plat_timer_setup(struct irqaction *irq)
140140

141141
void yosemite_time_init(void)
142142
{
143-
mips_hpt_frequency = cpu_clock / 2;
143+
mips_hpt_frequency = cpu_clock_freq / 2;
144144
mips_hpt_frequency = 33000000 * 3 * 5;
145145
}
146146

‎arch/mips/tx4938/toshiba_rbtx4938/setup.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,7 +657,7 @@ void __init tx4938_board_setup(void)
657657

658658
/* clocks */
659659
if (txx9_master_clock) {
660-
/* calculate gbus_clock and cpu_clock from master_clock */
660+
/* calculate gbus_clock and cpu_clock_freq from master_clock */
661661
divmode = (unsigned long)tx4938_ccfgptr->ccfg & TX4938_CCFG_DIVMODE_MASK;
662662
switch (divmode) {
663663
case TX4938_CCFG_DIVMODE_8:
@@ -691,7 +691,7 @@ void __init tx4938_board_setup(void)
691691
if (txx9_cpu_clock == 0) {
692692
txx9_cpu_clock = 300000000; /* 300MHz */
693693
}
694-
/* calculate gbus_clock and master_clock from cpu_clock */
694+
/* calculate gbus_clock and master_clock from cpu_clock_freq */
695695
cpuclk = txx9_cpu_clock;
696696
divmode = (unsigned long)tx4938_ccfgptr->ccfg & TX4938_CCFG_DIVMODE_MASK;
697697
switch (divmode) {

0 commit comments

Comments
 (0)