* [U-Boot] [PATCH 1/1] MIMC200: tidy GCLK init code
@ 2008-11-24 12:10 Mark Jackson
2009-01-23 23:48 ` Wolfgang Denk
2009-02-23 10:17 ` Haavard Skinnemoen
0 siblings, 2 replies; 3+ messages in thread
From: Mark Jackson @ 2008-11-24 12:10 UTC (permalink / raw)
To: u-boot
Change the MIMC200 startup code to use the built-in (rather than
hard-coded) funtions for setting up gclk outputs.
We'll also move the code to the new, more-appropriate
board_postclk_init() routine.
Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
---
board/mimc/mimc200/mimc200.c | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/board/mimc/mimc200/mimc200.c b/board/mimc/mimc200/mimc200.c
index ec83b9d..62c0943 100644
--- a/board/mimc/mimc200/mimc200.c
+++ b/board/mimc/mimc200/mimc200.c
@@ -30,8 +30,6 @@
#include <asm/arch/portmux.h>
#include <lcd.h>
-#define SM_PM_GCCTRL 0x0060
-
DECLARE_GLOBAL_DATA_PTR;
static const struct sdram_config sdram_config = {
@@ -83,10 +81,6 @@ int board_early_init_f(void)
portmux_select_gpio(PORTMUX_PORT_C, 1 << 18,
PORTMUX_DIR_OUTPUT | PORTMUX_INIT_HIGH);
- /* GCLK0 - 10MHz clock */
- writel(0x00000004, (void *)SM_BASE + SM_PM_GCCTRL);
- portmux_select_peripheral(PORTMUX_PORT_A, 1 << 30, PORTMUX_FUNC_A, 0);
-
udelay(5000);
/* release phys reset */
@@ -132,6 +126,14 @@ int board_early_init_r(void)
return 0;
}
+int board_postclk_init(void)
+{
+ /* Use GCLK0 as 10MHz output */
+ gclk_enable_output(0, PORTMUX_DRIVE_LOW);
+ gclk_set_rate(0, GCLK_PARENT_OSC0, 10000000);
+ return 0;
+}
+
/* SPI chip select control */
#ifdef CONFIG_ATMEL_SPI
#include <spi.h>
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH 1/1] MIMC200: tidy GCLK init code
2008-11-24 12:10 [U-Boot] [PATCH 1/1] MIMC200: tidy GCLK init code Mark Jackson
@ 2009-01-23 23:48 ` Wolfgang Denk
2009-02-23 10:17 ` Haavard Skinnemoen
1 sibling, 0 replies; 3+ messages in thread
From: Wolfgang Denk @ 2009-01-23 23:48 UTC (permalink / raw)
To: u-boot
Dear Mark Jackson,
In message <492A99D0.9090605@mimc.co.uk> you wrote:
> Change the MIMC200 startup code to use the built-in (rather than
> hard-coded) funtions for setting up gclk outputs.
>
> We'll also move the code to the new, more-appropriate
> board_postclk_init() routine.
>
> Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
>
> ---
>
> board/mimc/mimc200/mimc200.c | 14 ++++++++------
> 1 files changed, 8 insertions(+), 6 deletions(-)
I think you will have to rebase this patch. It does not apply any
more.
Best regards,
Wolfgang Denk
--
DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
The idea of male and female are universal constants.
-- Kirk, "Metamorphosis", stardate 3219.8
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH 1/1] MIMC200: tidy GCLK init code
2008-11-24 12:10 [U-Boot] [PATCH 1/1] MIMC200: tidy GCLK init code Mark Jackson
2009-01-23 23:48 ` Wolfgang Denk
@ 2009-02-23 10:17 ` Haavard Skinnemoen
1 sibling, 0 replies; 3+ messages in thread
From: Haavard Skinnemoen @ 2009-02-23 10:17 UTC (permalink / raw)
To: u-boot
Mark Jackson wrote:
> Change the MIMC200 startup code to use the built-in (rather than
> hard-coded) funtions for setting up gclk outputs.
>
> We'll also move the code to the new, more-appropriate
> board_postclk_init() routine.
>
> Signed-off-by: Mark Jackson <mpfj@mimc.co.uk>
Applied to mimc200 and merged into next, thanks.
Haavard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2009-02-23 10:17 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-24 12:10 [U-Boot] [PATCH 1/1] MIMC200: tidy GCLK init code Mark Jackson
2009-01-23 23:48 ` Wolfgang Denk
2009-02-23 10:17 ` Haavard Skinnemoen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox