Hello.
On 05-10-2010 0:24, [email protected] wrote:
From: Victor Rodriguez<[email protected]>
This patch adds EMAC support for the Hawkboard-L138 system
It is under the machine name "omapl138_hawkboard".
This system is based on the da850 davinci CPU architecture.
Signed-off-by: Victor Rodriguez<[email protected]>
---
arch/arm/mach-davinci/board-omapl138-hawk.c | 49 +++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c
b/arch/arm/mach-davinci/board-omapl138-hawk.c
index c472dd8..b22c275 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -19,6 +19,55 @@
[...]
+static int __init omapl138_hawk_config_emac(void)
+{
+ void __iomem *cfg_chip3_base;
Why not just 'cfgchip3'?
+ int ret;
+ u32 val;
+ struct davinci_soc_info *soc_info =&davinci_soc_info;
+
+ if (!machine_is_omapl138_hawkboard())
+ return 0;
+
+ cfg_chip3_base = DA8XX_SYSCFG0_VIRT(DA8XX_CFGCHIP3_REG);
+
+ val = __raw_readl(cfg_chip3_base);
+
+ val&= ~BIT(8);
+ ret = davinci_cfg_reg_list(omapl138_hawk_mii_pins);
+ pr_info("EMAC: MII PHY configured, RMII PHY will not be"
+ " functional\n");
+
+ if (ret)
+ pr_warning("omapl138_hawk_init: "
+ "cpgmac/rmii mux setup failed: %d\n", ret);
You're not configurign RMII, why mention it?
+
+ /* configure the CFGCHIP3 register for MII */
+ __raw_writel(val, cfg_chip3_base);
I'd first write CFGCHIP3, and then setup the PinMux...
WBR, Sergei
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source