All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
@ 2011-01-25 10:26 Holger Brunck
  2011-04-11 20:41 ` Wolfgang Denk
  2011-05-04 20:01 ` Wolfgang Denk
  0 siblings, 2 replies; 10+ messages in thread
From: Holger Brunck @ 2011-01-25 10:26 UTC (permalink / raw)
  To: u-boot

From: Andreas Huber <andreas.huber@keymile.com>

This reads the DIP switch on mgcoge. The DIP switch is connected to
the BFTICU (0x40000089) FPGA. If the DIP switch is set the environment
variable 'actual_bank' is set to 0 and starts the SW in bank0.

Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
---
 board/keymile/mgcoge/mgcoge.c |   18 ++++++++++++++++++
 include/configs/mgcoge.h      |    5 +++++
 2 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/board/keymile/mgcoge/mgcoge.c b/board/keymile/mgcoge/mgcoge.c
index 5c9496c..5dcdf37 100644
--- a/board/keymile/mgcoge/mgcoge.c
+++ b/board/keymile/mgcoge/mgcoge.c
@@ -293,6 +293,24 @@ int checkboard(void)
 	return 0;
 }
 
+#define DIPSWITCH_OFFSET 0x89
+#define DIPSWITCH_MASK   0x0f
+
+int last_stage_init(void)
+{
+	u8 dip_switch;
+	/* Dip switch */
+	dip_switch = readb(CONFIG_SYS_BFTICU_BASE + DIPSWITCH_OFFSET);
+	dip_switch &= DIPSWITCH_MASK;
+	/* dip switch 'full reset' or 'db erase' */
+	if (dip_switch & 0x1 || dip_switch & 0x2) {
+		/* start bootloader */
+		puts("DIP:   Enabled\n");
+		setenv("actual_bank", "0");
+	}
+	return 0;
+}
+
 /*
  * Early board initalization.
  */
diff --git a/include/configs/mgcoge.h b/include/configs/mgcoge.h
index 6dec0ee..f1bd32a 100644
--- a/include/configs/mgcoge.h
+++ b/include/configs/mgcoge.h
@@ -348,4 +348,9 @@
 #define OF_TBCLK		(bd->bi_busfreq / 4)
 #define OF_STDOUT_PATH		"/soc/cpm/serial at 11a90"
 
+/* enable last_stage_init */
+#define CONFIG_LAST_STAGE_INIT          1
+/* bfticu address */
+#define CONFIG_SYS_BFTICU_BASE          0x40000000
+
 #endif /* __CONFIG_H */
-- 
1.7.0.5

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-01-25 10:26 [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection Holger Brunck
@ 2011-04-11 20:41 ` Wolfgang Denk
  2011-05-04 20:01 ` Wolfgang Denk
  1 sibling, 0 replies; 10+ messages in thread
From: Wolfgang Denk @ 2011-04-11 20:41 UTC (permalink / raw)
  To: u-boot

Dear Holger Brunck,

In message <1295951175-3635-1-git-send-email-holger.brunck@keymile.com> you wrote:
> From: Andreas Huber <andreas.huber@keymile.com>
> 
> This reads the DIP switch on mgcoge. The DIP switch is connected to
> the BFTICU (0x40000089) FPGA. If the DIP switch is set the environment
> variable 'actual_bank' is set to 0 and starts the SW in bank0.
> 
> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> ---
>  board/keymile/mgcoge/mgcoge.c |   18 ++++++++++++++++++
>  include/configs/mgcoge.h      |    5 +++++
>  2 files changed, 23 insertions(+), 0 deletions(-)

Applied, thanks.

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
When you say "I wrote a program that crashed  Windows",  people  just
stare  at you blankly and say "Hey, I got those with the system, *for
free*".        - Linus Torvalds in <3itc77$9lj@ninurta.fer.uni-lj.si>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-01-25 10:26 [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection Holger Brunck
  2011-04-11 20:41 ` Wolfgang Denk
@ 2011-05-04 20:01 ` Wolfgang Denk
  2011-05-05  7:12   ` Holger Brunck
  1 sibling, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2011-05-04 20:01 UTC (permalink / raw)
  To: u-boot

Dear Holger Brunck,

In message <1295951175-3635-1-git-send-email-holger.brunck@keymile.com> you wrote:
> From: Andreas Huber <andreas.huber@keymile.com>
> 
> This reads the DIP switch on mgcoge. The DIP switch is connected to
> the BFTICU (0x40000089) FPGA. If the DIP switch is set the environment
> variable 'actual_bank' is set to 0 and starts the SW in bank0.
> 
> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
> ---
>  board/keymile/mgcoge/mgcoge.c |   18 ++++++++++++++++++
>  include/configs/mgcoge.h      |    5 +++++
>  2 files changed, 23 insertions(+), 0 deletions(-)

This patch breaks compiling of the  mgcoge2ne  board:

Configuring for mgcoge2ne board...
mgcoge.c: In function 'last_stage_init':
mgcoge.c:305: error: 'CONFIG_SYS_BFTICU_BASE' undeclared (first use in this function)
mgcoge.c:305: error: (Each undeclared identifier is reported only once
mgcoge.c:305: error: for each function it appears in.)


Please fix.

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
ADVISORY:  There is  an  Extremely Small  but  Nonzero  Chance  That,
Through a Process Know as "Tunneling," This Product May Spontaneously
Disappear  from Its Present Location and Reappear at Any Random Place
in the Universe, Including Your Neighbor's Domicile. The Manufacturer
Will Not Be Responsible for Any Damages  or  Inconvenience  That  May
Result.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-04 20:01 ` Wolfgang Denk
@ 2011-05-05  7:12   ` Holger Brunck
  2011-05-05  7:29     ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Holger Brunck @ 2011-05-05  7:12 UTC (permalink / raw)
  To: u-boot

Hi,

On 05/04/2011 10:01 PM, Wolfgang Denk wrote:
> Dear Holger Brunck,
> 
> In message <1295951175-3635-1-git-send-email-holger.brunck@keymile.com> you wrote:
>> From: Andreas Huber <andreas.huber@keymile.com>
>>
>> This reads the DIP switch on mgcoge. The DIP switch is connected to
>> the BFTICU (0x40000089) FPGA. If the DIP switch is set the environment
>> variable 'actual_bank' is set to 0 and starts the SW in bank0.
>>
>> Signed-off-by: Andreas Huber <andreas.huber@keymile.com>
>> Signed-off-by: Holger Brunck <holger.brunck@keymile.com>
>> ---
>>  board/keymile/mgcoge/mgcoge.c |   18 ++++++++++++++++++
>>  include/configs/mgcoge.h      |    5 +++++
>>  2 files changed, 23 insertions(+), 0 deletions(-)
> 
> This patch breaks compiling of the  mgcoge2ne  board:
> 
> Configuring for mgcoge2ne board...
> mgcoge.c: In function 'last_stage_init':
> mgcoge.c:305: error: 'CONFIG_SYS_BFTICU_BASE' undeclared (first use in this function)
> mgcoge.c:305: error: (Each undeclared identifier is reported only once
> mgcoge.c:305: error: for each function it appears in.)
> 

Argh sorry.

> 
> Please fix.
> 

In the already posted patch serie
http://lists.denx.de/pipermail/u-boot/2011-May/091976.html
the problem is fixed, should I repost the patch
powerpc/km82xx: rework DIP switch detection
as a standalone patch and rebase the serie or can you take the whole serie?

Best regards
Holger Brunck

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-05  7:12   ` Holger Brunck
@ 2011-05-05  7:29     ` Wolfgang Denk
  2011-05-05  7:37       ` Holger Brunck
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2011-05-05  7:29 UTC (permalink / raw)
  To: u-boot

Dear Holger Brunck,

In message <4DC24DEA.7010201@keymile.com> you wrote:
> 
> > This patch breaks compiling of the  mgcoge2ne  board:
...
> In the already posted patch serie
> http://lists.denx.de/pipermail/u-boot/2011-May/091976.html
> the problem is fixed, should I repost the patch
> powerpc/km82xx: rework DIP switch detection
> as a standalone patch and rebase the serie or can you take the whole serie?

As the merge window is closed, this new patch series will not go into
this upcoming release any more.

Can you please extract a patch that just fixes the build problem for
now?  Thanks.

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
There's no sense in being precise  when  you  don't  even  know  what
you're talking about.                             -- John von Neumann

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-05  7:29     ` Wolfgang Denk
@ 2011-05-05  7:37       ` Holger Brunck
  2011-05-05 18:16         ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Holger Brunck @ 2011-05-05  7:37 UTC (permalink / raw)
  To: u-boot

Hi,

On 05/05/2011 09:29 AM, Wolfgang Denk wrote:
> Dear Holger Brunck,
> 
> In message <4DC24DEA.7010201@keymile.com> you wrote:
>>
>>> This patch breaks compiling of the  mgcoge2ne  board:
> ...
>> In the already posted patch serie
>> http://lists.denx.de/pipermail/u-boot/2011-May/091976.html
>> the problem is fixed, should I repost the patch
>> powerpc/km82xx: rework DIP switch detection
>> as a standalone patch and rebase the serie or can you take the whole serie?
> 
> As the merge window is closed, this new patch series will not go into
> this upcoming release any more.
> 

Sorry but why this? The initial patch serie was postet on april 8th:
http://lists.denx.de/pipermail/u-boot/2011-April/090012.html
And as far as I know the merge window was closed on april 10th.

The resulting patch series are a rework due to the input of the ML.

Best regards
Holger Brunck

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-05  7:37       ` Holger Brunck
@ 2011-05-05 18:16         ` Wolfgang Denk
  2011-05-06  8:10           ` Holger Brunck
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2011-05-05 18:16 UTC (permalink / raw)
  To: u-boot

Dear Holger Brunck,

In message <4DC253A5.6010109@keymile.com> you wrote:
> 
> > As the merge window is closed, this new patch series will not go into
> > this upcoming release any more.
> 
> Sorry but why this? The initial patch serie was postet on april 8th:
> http://lists.denx.de/pipermail/u-boot/2011-April/090012.html
> And as far as I know the merge window was closed on april 10th.
> 
> The resulting patch series are a rework due to the input of the ML.

The reworked series goes in, but there appear to be a number of
completely new patches; these go into next.

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
Shakespeare's Law of Prototyping: (Hamlet III, iv, 156-160)
        O, throw away the worser part of it,
        And live the purer with the other half.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-05 18:16         ` Wolfgang Denk
@ 2011-05-06  8:10           ` Holger Brunck
  2011-05-06 10:17             ` Wolfgang Denk
  0 siblings, 1 reply; 10+ messages in thread
From: Holger Brunck @ 2011-05-06  8:10 UTC (permalink / raw)
  To: u-boot

On 05/05/2011 08:16 PM, Wolfgang Denk wrote:
> Dear Holger Brunck,
> 
> In message <4DC253A5.6010109@keymile.com> you wrote:
>>
>>> As the merge window is closed, this new patch series will not go into
>>> this upcoming release any more.
>>
>> Sorry but why this? The initial patch serie was postet on april 8th:
>> http://lists.denx.de/pipermail/u-boot/2011-April/090012.html
>> And as far as I know the merge window was closed on april 10th.
>>
>> The resulting patch series are a rework due to the input of the ML.
> 
> The reworked series goes in, but there appear to be a number of
> completely new patches; these go into next.
> 

yes if there is something completely new it goes into next. But both reworked
series posted from myside have no new patches and no new features inside the
patches. Ok two patches are squashed to one, as a result of an input from your
side and I thought this was ok. If you still see something let me know and I
remove it from the serie.

So back to my original question should I post a bugfix patch for the compile
issue for mgcoge2ne and rebase the serie "[PATCH v2 0/7] km82xx mainlining"
above this patch or is it ok if it get fixed with this serie?

Best regards
Holger Brunck

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-06  8:10           ` Holger Brunck
@ 2011-05-06 10:17             ` Wolfgang Denk
  2011-05-06 11:26               ` Holger Brunck
  0 siblings, 1 reply; 10+ messages in thread
From: Wolfgang Denk @ 2011-05-06 10:17 UTC (permalink / raw)
  To: u-boot

Dear Holger Brunck,

In message <4DC3AD11.5080509@keymile.com> you wrote:
>
> yes if there is something completely new it goes into next. But both reworked
> series posted from myside have no new patches and no new features inside the
> patches. Ok two patches are squashed to one, as a result of an input from your
> side and I thought this was ok. If you still see something let me know and I
> remove it from the serie.

OK.

> So back to my original question should I post a bugfix patch for the compile
> issue for mgcoge2ne and rebase the serie "[PATCH v2 0/7] km82xx mainlining"
> above this patch or is it ok if it get fixed with this serie?

If it's not too much of effort, I'd appreciate a separate bug fix,
which I can pull without longer review.  Thanks!

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
Heavier than air flying machines are impossible.
                    -- Lord Kelvin, President, Royal Society, c. 1895

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection
  2011-05-06 10:17             ` Wolfgang Denk
@ 2011-05-06 11:26               ` Holger Brunck
  0 siblings, 0 replies; 10+ messages in thread
From: Holger Brunck @ 2011-05-06 11:26 UTC (permalink / raw)
  To: u-boot

On 05/06/2011 12:17 PM, Wolfgang Denk wrote:
>> So back to my original question should I post a bugfix patch for the compile
>> issue for mgcoge2ne and rebase the serie "[PATCH v2 0/7] km82xx mainlining"
>> above this patch or is it ok if it get fixed with this serie?
> 
> If it's not too much of effort, I'd appreciate a separate bug fix,
> which I can pull without longer review.  Thanks!
> 

Ok done. If the patch was ok and pulled, I send an rebased serie for
[PATCH 0/7] km82xx mainlining

Best regards
Holger Brunck

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-05-06 11:26 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-25 10:26 [U-Boot] [PATCH] ppc, mgcoge: add DIP switch detection Holger Brunck
2011-04-11 20:41 ` Wolfgang Denk
2011-05-04 20:01 ` Wolfgang Denk
2011-05-05  7:12   ` Holger Brunck
2011-05-05  7:29     ` Wolfgang Denk
2011-05-05  7:37       ` Holger Brunck
2011-05-05 18:16         ` Wolfgang Denk
2011-05-06  8:10           ` Holger Brunck
2011-05-06 10:17             ` Wolfgang Denk
2011-05-06 11:26               ` Holger Brunck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.