xtensa: xtfpga: set ethoc clock frequency
authorMax Filippov <jcmvbkbc@gmail.com>
Wed, 29 Jan 2014 03:53:44 +0000 (07:53 +0400)
committerMax Filippov <jcmvbkbc@gmail.com>
Fri, 21 Feb 2014 17:33:44 +0000 (21:33 +0400)
Connect xtfpga board ethernet MAC to the clock in the DTS. Set up MAC
base frequency in the platform data in case of build w/o CONFIG_OF.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
arch/xtensa/boot/dts/xtfpga.dtsi
arch/xtensa/platforms/xtfpga/setup.c

index d5ccbbb7eec1b5e459c1c2bf6488c465a49a7550..e7370b11348e8d06c113d420704664740dbdec9b 100644 (file)
@@ -57,5 +57,6 @@
                reg = <0xfd030000 0x4000 0xfd800000 0x4000>;
                interrupts = <1 1>; /* external irq 1 */
                local-mac-address = [00 50 c2 13 6f 00];
+               clocks = <&osc>;
        };
 };
index 03729132ae441215179a360374476af852bbb26a..57fd08b36f51a151a389794bf4e8af7c9b64fd13 100644 (file)
@@ -290,6 +290,7 @@ static int __init xtavnet_init(void)
         * knows whether they set it correctly on the DIP switches.
         */
        pr_info("XTFPGA: Ethernet MAC %pM\n", ethoc_pdata.hwaddr);
+       ethoc_pdata.eth_clkfreq = *(long *)XTFPGA_CLKFRQ_VADDR;
 
        return 0;
 }