diff mbox

[U-Boot,2/3] h2200: Add board reset support

Message ID 1358026767-28130-2-git-send-email-luk0104@gmail.com
State Changes Requested
Delegated to: Marek Vasut
Headers show

Commit Message

Łukasz Dałek Jan. 12, 2013, 9:39 p.m. UTC
Use Samsung S3CA410X01 companion chip to reset PDA.

Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
---
 board/h2200/h2200.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

Comments

Marek Vasut Jan. 12, 2013, 11:54 p.m. UTC | #1
Dear Lukasz Dalek,

> Use Samsung S3CA410X01 companion chip to reset PDA.
> 
> Signed-off-by: Lukasz Dalek <luk0104@gmail.com>
> ---
>  board/h2200/h2200.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
> 
> diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
> index 720b06e..a716a3f 100644
> --- a/board/h2200/h2200.c
> +++ b/board/h2200/h2200.c
> @@ -32,6 +32,15 @@ int board_eth_init(bd_t *bis)
>  	return 0;
>  }
> 
> +void board_reset(void)
> +{
> +	/* Enable VLIO interface on Hamcop */
> +	writeb(0x1, 0x4000);
> +
> +	/* Reset board (cold reset) */
> +	writeb(0xff, 0x4002);
> +}

Can you not reimplement reset_cpu() ?

>  int board_init(void)
>  {
>  	/* We have RAM, disable cache */

Best regards,
Marek Vasut
Łukasz Dałek Jan. 13, 2013, 1 a.m. UTC | #2
On 13.01.2013 00:54, Marek Vasut wrote:
> Dear Lukasz Dalek,
>
>
> +void board_reset(void)
> +{
> +	/* Enable VLIO interface on Hamcop */
> +	writeb(0x1, 0x4000);
> +
> +	/* Reset board (cold reset) */
> +	writeb(0xff, 0x4002);
> +}
> Can you not reimplement reset_cpu() ?

reset_cpu() doesn't have __attribute__((weak)) so if I would try to 
implement it
compiler will return with error.

Yours sincerely,
Łukasz Dałek
Marek Vasut Jan. 13, 2013, 1:05 a.m. UTC | #3
Dear Łukasz Dałek,

> On 13.01.2013 00:54, Marek Vasut wrote:
> > Dear Lukasz Dalek,
> > 
> > 
> > +void board_reset(void)
> > +{
> > +	/* Enable VLIO interface on Hamcop */
> > +	writeb(0x1, 0x4000);
> > +
> > +	/* Reset board (cold reset) */
> > +	writeb(0xff, 0x4002);
> > +}
> > Can you not reimplement reset_cpu() ?
> 
> reset_cpu() doesn't have __attribute__((weak)) so if I would try to
> implement it
> compiler will return with error.

Add it? Wasn't there similar patch already for some altera device?

Best regards,
Marek Vasut
diff mbox

Patch

diff --git a/board/h2200/h2200.c b/board/h2200/h2200.c
index 720b06e..a716a3f 100644
--- a/board/h2200/h2200.c
+++ b/board/h2200/h2200.c
@@ -32,6 +32,15 @@  int board_eth_init(bd_t *bis)
 	return 0;
 }
 
+void board_reset(void)
+{
+	/* Enable VLIO interface on Hamcop */
+	writeb(0x1, 0x4000);
+
+	/* Reset board (cold reset) */
+	writeb(0xff, 0x4002);
+}
+
 int board_init(void)
 {
 	/* We have RAM, disable cache */