[U-Boot] [PATCH 3/4] c6x: Add suport build davinci SOC with c674x CPUs
Tom Rini
trini at ti.com
Fri Jun 22 23:57:51 CEST 2012
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 06/22/2012 12:46 PM, Dmitry Bondar wrote:
> C674x CPUs has same peripherals(uart,emac,nand contoller) like
> sitara processors (am1705/am1707/omapl137/omapl138). In u-boot
> this peripheral known as davinci SOC, and placed in
> arch/arm/cpu/arm926ejs/davinci This patch allow compile davinci
> SOC code whith c674x CPU.
>
> Reset code rewritten in C for compile not only for arm.
Please cc me on all of the v2 as this will go in via u-boot-ti, thanks.
[snip]
> diff --git a/arch/arm/cpu/arm926ejs/davinci/reset_c.c
> b/arch/arm/cpu/arm926ejs/davinci/reset_c.c new file mode 100644
> index 0000000..201eb6d --- /dev/null +++
> b/arch/arm/cpu/arm926ejs/davinci/reset_c.c @@ -0,0 +1,33 @@
> +#include <stdint.h> +#include <asm/arch/hardware.h> + +void
> reset_cpu(unsigned long a) +{ + volatile uint32_t *WDT_TGCR; +
> volatile uint32_t *WDT_TIM12; + volatile uint32_t *WDT_TIM34; +
> volatile uint32_t *WDT_PRD12; + volatile uint32_t *WDT_PRD34; +
> volatile uint32_t *WDT_TCR; + volatile uint32_t *WDT_WDTCR; +
> WDT_TGCR = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x24); +
> WDT_TIM12 = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x10); +
> WDT_TIM34 = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x14); +
> WDT_PRD12 = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x18); +
> WDT_PRD34 = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x1c); +
> WDT_TCR = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x20); +
> WDT_WDTCR = (volatile uint32_t *)(DAVINCI_TIMER1_BASE + 0x28); + +
> *WDT_TGCR = 0x08; + *WDT_TGCR |= 0x3; + *WDT_TIM12 = 0; +
> *WDT_TIM34 = 0; + *WDT_PRD12 = 0; + *WDT_PRD34 = 0; + *WDT_TCR |=
> 0x40; + *WDT_WDTCR |= 0x4000; + *WDT_WDTCR = 0xa5c64000; +
> *WDT_WDTCR = 0xda7e4000; + *WDT_WDTCR = 0x4000; + /*while(1);*/ +}
This should be readl/writel and then if possible, just re-used on
davinci as well (which would need to be tested).
- --
Tom
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQIcBAEBAgAGBQJP5OpfAAoJENk4IS6UOR1WiykP/jIXgJhE+BUXapXdDX2HI5eW
JbLNBX5HA/QKSZ2tQJeFlAgzKxPLWHrVkFXKLG3ArioDF2BVWrEYoa0HAh8q1OrG
366BSDNglkpEAYvWxioBXpY7YO8eULgyw1OHFUQohTmUZHIhBjZeSPrOuDulgAEt
u12gYAe58U1zj5z4S2Iguru91u1ltOLQfCP3u0If0X7I9eUJrPQLZKTD6wXK8bG/
LVfkkLnQNl+uNUo7yJH0i9OVENiOmOr3fSZXxo6ofSmCsS69O2geVSU2t6FsRaJf
3H1P3ZqpFOSRwEJ9r1vmpKCsf0bjK8/AZJDYP+F1SOq26trk+7843jnXpRRk4rw7
O5AlwDxhR41XRHtBXRqIdSIAUMGMB9vCWzJCAR6tKra4CZecbgxNYasgCENeXjiM
ewKzHVP8okrEHlG6eoV2wKehJ65ox6Tt4Gtjt+u1KimvwkReklrX8QiyNYgKYGgc
GrJ/BnP5CgC+vk2RZF5UZ9inYMpdYgHyr9YTAhsPzRJf403r/dfjQLXEESGjjbIE
vNjQpmAfZk+ZrvwzisAqKdJIWfyBl8tzLINRfFdXT7PY4WOUBTOXDH0ShDzlPSOq
3JhjUOHi2p6q13oqnWeQVhiCUk/1uSs66dfqmNzjRwWlk9q6q02i+HnYWGmmQU/V
LVA0pTJDtN/WmmYWHnE2
=/ozC
-----END PGP SIGNATURE-----
More information about the U-Boot
mailing list