[PATCH v2 2/4] pm9g45: fix Ethernet
Asen Chavdarov Dimov
dimov at ronetix.at
Fri Mar 2 11:55:21 EST 2012
Enable PHY clock.
Signed-off-by: Asen Chavdarov Dimov <dimov at ronetix.at>
---
since v1:
- phy_init changed to pm9g45_phy_init
- pm9g45_phy_init becamos void and "return 0" is removed
- removed manual clock enabling
---
arch/arm/boards/pm9g45/init.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/arch/arm/boards/pm9g45/init.c b/arch/arm/boards/pm9g45/init.c
index 480c751..92d010f 100644
--- a/arch/arm/boards/pm9g45/init.c
+++ b/arch/arm/boards/pm9g45/init.c
@@ -82,6 +82,17 @@ static struct at91_ether_platform_data macb_pdata = {
.phy_addr = 0,
};
+static void pm9g45_phy_init(void)
+{
+ /*
+ * PD2 enables the 50MHz oscillator for Ethernet PHY
+ * 1 - enable
+ * 0 - disable
+ */
+ at91_set_gpio_output(AT91_PIN_PD2, 1);
+ at91_set_gpio_value(AT91_PIN_PD2, 1);
+}
+
static int pm9g45_mem_init(void)
{
at91_add_device_sdram(128 * 1024 * 1024);
@@ -92,7 +103,9 @@ mem_initcall(pm9g45_mem_init);
static int pm9g45_devices_init(void)
{
+
pm_add_device_nand();
+ pm9g45_phy_init();
at91_add_device_eth(&macb_pdata);
devfs_add_partition("nand0", 0x00000, 0x80000, PARTITION_FIXED, "self_raw");
--
1.7.4.4
More information about the barebox
mailing list