#include <ar7240_soc.h>
#include "../board/ar7240/common/ar7240_flash.h"
-extern void ar7240_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq);
+extern void ar933x_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq);
#if defined(OFFSET_MAC_ADDRESS)
/*
}
U_BOOT_CMD(defenv, 1, 0, do_default_env, "reset environment variables to their default values\n", NULL);
-#endif /* if defined(CONFIG_FOR_8DEVICES_CARAMBOLA2) || defined(CONFIG_FOR_DRAGINO_V2) || defined(CONFIG_FOR_MESH_POTATO_V2) */
+#endif /* if !defined(CONFIG_FOR_DLINK_DIR505_A1) */
#if defined(PLL_IN_FLASH_MAGIC_OFFSET)
if(argc == 1){
// read clocks
- ar7240_sys_frequency(&cpu_freq, &ddr_freq, &ahb_freq);
+ ar933x_sys_frequency(&cpu_freq, &ddr_freq, &ahb_freq);
// calculate SPI clock (we need to set bit 0 to 1 in SPI_FUNC_SELECT to access SPI registers)
ar7240_reg_wr(AR7240_SPI_FS, 0x01);
ag7240_mac_t *ag7240_macs[CFG_AG7240_NMACS];
-extern void ar7240_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq);
+extern void ar933x_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq);
extern int athrs26_phy_setup(int unit);
extern int athrs26_phy_is_up(int unit);
ag7240_reg_wr(mac, AG7240_MAC_MII_MGMT_CFG, mgmt_cfg_val);
}
} else {
- ar7240_sys_frequency(&cpu_freq, &ddr_freq, &ahb_freq);
+ ar933x_sys_frequency(&cpu_freq, &ddr_freq, &ahb_freq);
switch (ahb_freq / 1000000) {
case 150:
* Get CPU, RAM and AHB clocks
* Based on: Linux/arch/mips/ath79/clock.c
*/
-/* TODO: void ar933x_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq) */
-void ar7240_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq)
+void ar933x_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq)
{
u32 ref_rate, clock_ctrl, cpu_config, pll, temp;
extern void all_led_on(void);
extern void all_led_off(void);
extern const char* print_mem_type(void);
+#ifdef CONFIG_WASP
extern void ar7240_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq);
+#else
+extern void ar933x_sys_frequency(u32 *cpu_freq, u32 *ddr_freq, u32 *ahb_freq);
+#endif
ulong monitor_flash_len;
bd = gd->bd;
/* get CPU/RAM/AHB clocks */
+#ifdef CONFIG_WASP
ar7240_sys_frequency(&cpu_freq, &ddr_freq, &ahb_freq);
+#else
+ ar933x_sys_frequency(&cpu_freq, &ddr_freq, &ahb_freq);
+#endif
/* set bi_cfg_hz */
bd->bi_cfg_hz = (unsigned long)(cpu_freq >> 1);