davinci: display correct clock info

Move the clock-rate dumping code into the cpu/.../davinci area
where it should have been, enabled by CONFIG_DISPLAY_CPUINFO,
updating the format and showing the DSP clock (where relevant).

Switch boards to use the cpuinfo() hook for this stuff.

Remove a few now-obsolete PLL #defines.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
This commit is contained in:
David Brownell
2009-05-15 23:47:12 +02:00
committed by Wolfgang Denk
parent daea928829
commit 7a4f511b59
13 changed files with 138 additions and 29 deletions

View File

@@ -28,6 +28,7 @@
#include <net.h>
#include <asm/arch/hardware.h>
DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
@@ -38,18 +39,6 @@ int dram_init(void)
return(0);
}
static int dv_get_pllm_output(uint32_t pllm)
{
return (pllm + 1) * (CONFIG_SYS_HZ_CLOCK / 1000000);
}
void dv_display_clk_infos(void)
{
printf("ARM Clock: %dMHz\n", dv_get_pllm_output(REG(PLL1_PLLM)) / 2);
printf("DDR Clock: %dMHz\n", dv_get_pllm_output(REG(PLL2_PLLM)) /
((REG(PLL2_DIV2) & 0x1f) + 1) / 2);
}
#ifdef CONFIG_DRIVER_TI_EMAC
/* Read ethernet MAC address from EEPROM for DVEVM compatible boards.

View File

@@ -24,7 +24,6 @@
extern int eth_hw_init(void);
void dv_display_clk_infos(void);
int dvevm_read_mac_address(uint8_t *buf);
void dv_configure_mac_address(uint8_t *rom_enetaddr);

View File

@@ -69,8 +69,6 @@ int misc_init_r(void)
uint8_t video_mode;
uint8_t eeprom_enetaddr[6];
dv_display_clk_infos();
/* Read Ethernet MAC address from EEPROM if available. */
if (dvevm_read_mac_address(eeprom_enetaddr))
dv_configure_mac_address(eeprom_enetaddr);

View File

@@ -104,8 +104,6 @@ int misc_init_r(void)
0xb6, 0xe8, 0x0a, 0x54, 0xd7, 0x89, 0x6b, 0x35
};
dv_display_clk_infos();
/* Set serial number from UID chip */
if (i2c_read(CONFIG_SYS_UID_ADDR, 0, 1, buf, 8)) {
printf("\nUID @ 0x%02x read FAILED!!!\n", CONFIG_SYS_UID_ADDR);

View File

@@ -131,8 +131,6 @@ int misc_init_r(void)
/* EMIF-A CS3 configuration for FPGA. */
REG(DAVINCI_A3CR) = DAVINCI_A3CR_VAL;
dv_display_clk_infos();
/* Configure I2C switch (PCA9543) to enable channel 0. */
i2cbuf = CONFIG_SYS_I2C_PCA9543_ENABLE_CH0;
if (i2c_write(CONFIG_SYS_I2C_PCA9543_ADDR, 0,

View File

@@ -66,8 +66,6 @@ int misc_init_r(void)
{
uint8_t eeprom_enetaddr[6];
dv_display_clk_infos();
/* Read Ethernet MAC address from EEPROM if available. */
if (dvevm_read_mac_address(eeprom_enetaddr))
dv_configure_mac_address(eeprom_enetaddr);