Fix the Atheros MIPS startup path a little.

* Print out the platform frequency the same as the other frequencies.
* Print out the MDIO frequency.
* Optionally do GMAC and ethernet switch setup if required.

Tested:

* AR9344
This commit is contained in:
Adrian Chadd 2013-10-15 01:37:00 +00:00
parent 2418402399
commit 8c56b727e4
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=256488

View File

@ -233,8 +233,9 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused,
printf("CPU Frequency=%d MHz\n", u_ar71xx_cpu_freq / 1000000); printf("CPU Frequency=%d MHz\n", u_ar71xx_cpu_freq / 1000000);
printf("CPU DDR Frequency=%d MHz\n", u_ar71xx_ddr_freq / 1000000); printf("CPU DDR Frequency=%d MHz\n", u_ar71xx_ddr_freq / 1000000);
printf("CPU AHB Frequency=%d MHz\n", u_ar71xx_ahb_freq / 1000000); printf("CPU AHB Frequency=%d MHz\n", u_ar71xx_ahb_freq / 1000000);
printf("platform frequency: %lld\n", platform_counter_freq); printf("platform frequency: %lld MHz\n", platform_counter_freq / 1000000);
printf("CPU reference clock: %d MHz\n", u_ar71xx_refclk / 1000000); printf("CPU reference clock: %d MHz\n", u_ar71xx_refclk / 1000000);
printf("CPU MDIO clock: %d MHz\n", u_ar71xx_mdio_freq / 1000000);
printf("arguments: \n"); printf("arguments: \n");
printf(" a0 = %08x\n", a0); printf(" a0 = %08x\n", a0);
printf(" a1 = %08x\n", a1); printf(" a1 = %08x\n", a1);
@ -279,6 +280,16 @@ platform_start(__register_t a0 __unused, __register_t a1 __unused,
*/ */
ar71xx_init_usb_peripheral(); ar71xx_init_usb_peripheral();
/*
* Reset internal ethernet switch, if one exists
*/
ar71xx_reset_ethernet_switch();
/*
* Initialise the gmac driver.
*/
ar71xx_init_gmac();
kdb_init(); kdb_init();
#ifdef KDB #ifdef KDB
if (boothowto & RB_KDB) if (boothowto & RB_KDB)