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:
parent
0353db9168
commit
046cd824c1
|
|
@ -127,7 +127,7 @@ int spl_start_uboot(void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define OSC (V_OSCK/1000000)
|
#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};
|
400, OSC-1, 1, -1, -1, -1, -1};
|
||||||
|
|
||||||
void am33xx_spl_board_init(void)
|
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)
|
const struct dpll_params *get_dpll_ddr_params(void)
|
||||||
{
|
{
|
||||||
|
dpll_ddr_nbhw16.n = (get_osclk() / 1000000) - 1;
|
||||||
return &dpll_ddr_nbhw16;
|
return &dpll_ddr_nbhw16;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -320,6 +321,8 @@ int board_init(void)
|
||||||
#define SMA2_REGISTER (CTRL_BASE + 0x1320)
|
#define SMA2_REGISTER (CTRL_BASE + 0x1320)
|
||||||
writel(0x01, SMA2_REGISTER); /* Select RMII2_CRS_DV instead of MMC2_DAT7 */
|
writel(0x01, SMA2_REGISTER); /* Select RMII2_CRS_DV instead of MMC2_DAT7 */
|
||||||
|
|
||||||
|
printf("OSC: %lu Hz\n", get_osclk());
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
#define CONFIG_BOARD_LATE_INIT
|
#define CONFIG_BOARD_LATE_INIT
|
||||||
|
|
||||||
/* Clock Defines */
|
/* 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)
|
#define V_SCLK (V_OSCK)
|
||||||
|
|
||||||
#include <config_distro_bootcmd.h>
|
#include <config_distro_bootcmd.h>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue