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>
diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c
index cfab729..ffdc20b 100644
--- a/board/davinci/common/misc.c
+++ b/board/davinci/common/misc.c
@@ -28,6 +28,7 @@
#include <net.h>
#include <asm/arch/hardware.h>
+
DECLARE_GLOBAL_DATA_PTR;
int dram_init(void)
@@ -38,18 +39,6 @@
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.
diff --git a/board/davinci/common/misc.h b/board/davinci/common/misc.h
index 5d29784..316159a 100644
--- a/board/davinci/common/misc.h
+++ b/board/davinci/common/misc.h
@@ -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);
diff --git a/board/davinci/dvevm/dvevm.c b/board/davinci/dvevm/dvevm.c
index 162a5dc..8f38633 100644
--- a/board/davinci/dvevm/dvevm.c
+++ b/board/davinci/dvevm/dvevm.c
@@ -69,8 +69,6 @@
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);
diff --git a/board/davinci/schmoogie/schmoogie.c b/board/davinci/schmoogie/schmoogie.c
index d6dfef5..6e0f591 100644
--- a/board/davinci/schmoogie/schmoogie.c
+++ b/board/davinci/schmoogie/schmoogie.c
@@ -104,8 +104,6 @@
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);
diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c
index 7d855fb..7f4ee36 100644
--- a/board/davinci/sffsdr/sffsdr.c
+++ b/board/davinci/sffsdr/sffsdr.c
@@ -131,8 +131,6 @@
/* 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,
diff --git a/board/davinci/sonata/sonata.c b/board/davinci/sonata/sonata.c
index 155fb54..a0bea05 100644
--- a/board/davinci/sonata/sonata.c
+++ b/board/davinci/sonata/sonata.c
@@ -66,8 +66,6 @@
{
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);