Patchwork [U-Boot] Enable the EMAC clock in at91_macb_hw_init().

login
register
mail settings
Submitter Markus Hubig
Date Aug. 1, 2012, 7:49 p.m.
Message ID <1343850590-25406-1-git-send-email-mhubig@imko.de>
Download mbox | patch
Permalink /patch/174580/
State Accepted
Commit a3dab5d1d9447d75dbf3bb47abc7341508ccafd5
Delegated to: Andreas Bießmann
Headers show

Comments

Markus Hubig - Aug. 1, 2012, 7:49 p.m.
Signed-off-by: Markus Hubig <mhubig@imko.de>
Cc: Andreas Bießmann <andreas.devel@googlemail.com>
---
 arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
Andreas Bießmann - Aug. 7, 2012, 10:14 p.m.
Dear Markus Hubig,

On 01.08.12 21:49, Markus Hubig wrote:
> Signed-off-by: Markus Hubig <mhubig@imko.de>
> Cc: Andreas Bießmann <andreas.devel@googlemail.com>
> ---

applied to u-boot-atmel, thanks.

Best regards

Andreas Bießmann

Patch

diff --git a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
index 62f76fa..19ec615 100644
--- a/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
+++ b/arch/arm/cpu/arm926ejs/at91/at91sam9260_devices.c
@@ -158,6 +158,10 @@  void at91_spi1_hw_init(unsigned long cs_mask)
 #ifdef CONFIG_MACB
 void at91_macb_hw_init(void)
 {
+	/* Enable EMAC clock */
+	struct at91_pmc *pmc = (struct at91_pmc *)ATMEL_BASE_PMC;
+	writel(1 << ATMEL_ID_EMAC0, &pmc->pcer);
+
 	at91_set_a_periph(AT91_PIO_PORTA, 19, 0);	/* ETXCK_EREFCK */
 	at91_set_a_periph(AT91_PIO_PORTA, 17, 0);	/* ERXDV */
 	at91_set_a_periph(AT91_PIO_PORTA, 14, 0);	/* ERX0 */