netbird: set V_OSCK to 0, this will autodetect the clock

This patch uses the autodetection of the Oszillator frequency from
sysboot1.
This commit is contained in:
Stefan Eichenberger 2016-08-11 18:15:17 +02:00
parent 0353db9168
commit 046cd824c1
2 changed files with 5 additions and 2 deletions

View File

@ -127,7 +127,7 @@ int spl_start_uboot(void)
#endif
#define OSC (V_OSCK/1000000)
const struct dpll_params dpll_ddr_nbhw16= {
struct dpll_params dpll_ddr_nbhw16= {
400, OSC-1, 1, -1, -1, -1, -1};
void am33xx_spl_board_init(void)
@ -155,6 +155,7 @@ void am33xx_spl_board_init(void)
const struct dpll_params *get_dpll_ddr_params(void)
{
dpll_ddr_nbhw16.n = (get_osclk() / 1000000) - 1;
return &dpll_ddr_nbhw16;
}
@ -320,6 +321,8 @@ int board_init(void)
#define SMA2_REGISTER (CTRL_BASE + 0x1320)
writel(0x01, SMA2_REGISTER); /* Select RMII2_CRS_DV instead of MMC2_DAT7 */
printf("OSC: %lu Hz\n", get_osclk());
return 0;
}

View File

@ -35,7 +35,7 @@
#define CONFIG_BOARD_LATE_INIT
/* Clock Defines */
#define V_OSCK 24000000 /* Clock output from T2 */
#define V_OSCK 0 /* 0 means detect from sysboot1 config */
#define V_SCLK (V_OSCK)
#include <config_distro_bootcmd.h>