Make names more sensible.
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1593 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
@ -4,6 +4,6 @@
|
|||||||
/*
|
/*
|
||||||
* Various clock routines.
|
* Various clock routines.
|
||||||
*/
|
*/
|
||||||
extern unsigned long get_clock_speed(void);
|
extern unsigned long get_timer_freq(void);
|
||||||
extern unsigned long get_bus_freq(void);
|
extern unsigned long get_pci_bus_freq(void);
|
||||||
#endif /* _CLOCK_H */
|
#endif /* _CLOCK_H */
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
unsigned long get_hz(void)
|
unsigned long get_hz(void)
|
||||||
{
|
{
|
||||||
return get_clock_speed();
|
return get_timer_freq();
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long ticks_since_boot(void)
|
unsigned long ticks_since_boot(void)
|
||||||
|
@ -164,7 +164,7 @@ void get_sys_info (struct ppc4xx_sys_info * sysInfo)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long get_clock_speed(void)
|
unsigned long get_timer_freq(void)
|
||||||
{
|
{
|
||||||
struct ppc4xx_sys_info sys_info;
|
struct ppc4xx_sys_info sys_info;
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ unsigned long get_clock_speed(void)
|
|||||||
return sys_info.freqProcessor;
|
return sys_info.freqProcessor;
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned long get_bus_freq(void)
|
unsigned long get_pci_bus_freq(void)
|
||||||
{
|
{
|
||||||
struct ppc4xx_sys_info sys_info;
|
struct ppc4xx_sys_info sys_info;
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ void sdram_init(void)
|
|||||||
/*
|
/*
|
||||||
* Determine SDRAM speed
|
* Determine SDRAM speed
|
||||||
*/
|
*/
|
||||||
speed = get_bus_freq(); /* parameter not used on ppc4xx */
|
speed = get_pci_bus_freq(); /* parameter not used on ppc4xx */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Support for 100MHz and 133MHz SDRAM
|
* Support for 100MHz and 133MHz SDRAM
|
||||||
|
@ -20,7 +20,7 @@ static int PLL_multiplier[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
unsigned long
|
unsigned long
|
||||||
get_clock_speed(void)
|
get_timer_freq(void)
|
||||||
{
|
{
|
||||||
unsigned long clock = CONFIG_SYS_CLK_FREQ * 1000000;
|
unsigned long clock = CONFIG_SYS_CLK_FREQ * 1000000;
|
||||||
return clock * PLL_multiplier[ppc_gethid1() >> 28] / 10;
|
return clock * PLL_multiplier[ppc_gethid1() >> 28] / 10;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
#include <ppc.h>
|
#include <ppc.h>
|
||||||
|
|
||||||
unsigned long get_clock_speed(void)
|
unsigned long get_timer_freq(void)
|
||||||
{
|
{
|
||||||
return 100000000 / 4;
|
return 100000000 / 4;
|
||||||
}
|
}
|
||||||
|
@ -317,7 +317,7 @@ mpc107_config_memory(int no_banks, sdram_bank_info * bank, int for_real)
|
|||||||
int i, j;
|
int i, j;
|
||||||
char ignore[8];
|
char ignore[8];
|
||||||
/* Convert bus clock to cycle time in 100ns units */
|
/* Convert bus clock to cycle time in 100ns units */
|
||||||
unsigned cycle_time = 10 * (2500000000U / get_clock_speed());
|
unsigned cycle_time = 10 * (2500000000U / get_timer_freq());
|
||||||
/* Approximate */
|
/* Approximate */
|
||||||
unsigned access_time = cycle_time - 300;
|
unsigned access_time = cycle_time - 300;
|
||||||
unsigned cas_latency = 0;
|
unsigned cas_latency = 0;
|
||||||
|
Reference in New Issue
Block a user