From 7a4f511b59f08f51dde4ceacbd45f49b8bf2a5cc Mon Sep 17 00:00:00 2001 From: David Brownell Date: Fri, 15 May 2009 23:47:12 +0200 Subject: 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 --- board/davinci/common/misc.c | 13 +------------ board/davinci/common/misc.h | 1 - board/davinci/dvevm/dvevm.c | 2 -- board/davinci/schmoogie/schmoogie.c | 2 -- board/davinci/sffsdr/sffsdr.c | 2 -- board/davinci/sonata/sonata.c | 2 -- 6 files changed, 1 insertion(+), 21 deletions(-) (limited to 'board/davinci') diff --git a/board/davinci/common/misc.c b/board/davinci/common/misc.c index cfab729bb..ffdc20b93 100644 --- a/board/davinci/common/misc.c +++ b/board/davinci/common/misc.c @@ -28,6 +28,7 @@ #include #include + 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. diff --git a/board/davinci/common/misc.h b/board/davinci/common/misc.h index 5d2978440..316159a2f 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 162a5dcea..8f386331e 100644 --- a/board/davinci/dvevm/dvevm.c +++ b/board/davinci/dvevm/dvevm.c @@ -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); diff --git a/board/davinci/schmoogie/schmoogie.c b/board/davinci/schmoogie/schmoogie.c index d6dfef581..6e0f59133 100644 --- a/board/davinci/schmoogie/schmoogie.c +++ b/board/davinci/schmoogie/schmoogie.c @@ -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); diff --git a/board/davinci/sffsdr/sffsdr.c b/board/davinci/sffsdr/sffsdr.c index 7d855fb83..7f4ee361b 100644 --- a/board/davinci/sffsdr/sffsdr.c +++ b/board/davinci/sffsdr/sffsdr.c @@ -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, diff --git a/board/davinci/sonata/sonata.c b/board/davinci/sonata/sonata.c index 155fb549c..a0bea0517 100644 --- a/board/davinci/sonata/sonata.c +++ b/board/davinci/sonata/sonata.c @@ -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); -- cgit v1.2.3