public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
@ 2010-06-10  4:18 Kumar Gala
  2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
                   ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Kumar Gala @ 2010-06-10  4:18 UTC (permalink / raw)
  To: u-boot

Add 'errata' command to report what errata we workaround

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/cpu/mpc85xx/Makefile     |    1 +
 arch/powerpc/cpu/mpc85xx/cmd_errata.c |   35 +++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c

diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile
index f064fee..e3746e6 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -32,6 +32,7 @@ START	= start.o resetvec.o
 SOBJS-$(CONFIG_MP)	+= release.o
 SOBJS	= $(SOBJS-y)
 
+COBJS-$(CONFIG_CMD_ERRATA) += cmd_errata.o
 COBJS-$(CONFIG_CPM2)	+= commproc.o
 
 # supports ddr1
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
new file mode 100644
index 0000000..6824ebf
--- /dev/null
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -0,0 +1,35 @@
+/*
+ * Copyright 2010 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <command.h>
+
+static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
+{
+	return 0;
+}
+
+U_BOOT_CMD(
+	errata, 1, 0,	do_errata,
+	"Report errata workarounds",
+	""
+);
-- 
1.6.0.6

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-06-10  4:18 [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds Kumar Gala
@ 2010-06-10  4:18 ` Kumar Gala
  2010-06-11  1:58   ` Timur Tabi
                     ` (2 more replies)
  2010-06-30  9:39 ` [U-Boot] [PATCH 1/2] " Kumar Gala
  2010-07-14 19:29 ` Wolfgang Denk
  2 siblings, 3 replies; 17+ messages in thread
From: Kumar Gala @ 2010-06-10  4:18 UTC (permalink / raw)
  To: u-boot

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/cpu/mpc85xx/cmd_errata.c |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
index 6824ebf..81078bd 100644
--- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -22,9 +22,23 @@
 
 #include <common.h>
 #include <command.h>
+#include <linux/compiler.h>
+#include <asm/processor.h>
 
 static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
 {
+	__maybe_unused u32 svr = get_svr();
+
+#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
+	if (IS_SVR_REV(svr, 1, 0) &&
+	    ((SVR_SOC_VER(svr) == SVR_P1022) ||
+	     (SVR_SOC_VER(svr) == SVR_P1022_E) ||
+	     (SVR_SOC_VER(svr) == SVR_P1013) ||
+	     (SVR_SOC_VER(svr) == SVR_P1013_E))) {
+		puts("Work-around for Erratum SATA A001 enabled\n");
+	}
+#endif
+
 	return 0;
 }
 
-- 
1.6.0.6

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
@ 2010-06-11  1:58   ` Timur Tabi
  2010-06-11 13:33     ` Kumar Gala
  2010-06-30  9:40   ` Kumar Gala
  2010-07-14 19:30   ` Wolfgang Denk
  2 siblings, 1 reply; 17+ messages in thread
From: Timur Tabi @ 2010-06-11  1:58 UTC (permalink / raw)
  To: u-boot

On Wed, Jun 9, 2010 at 11:18 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
> ?static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> ?{
> + ? ? ? __maybe_unused u32 svr = get_svr();
> +
> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
> + ? ? ? if (IS_SVR_REV(svr, 1, 0) &&
> + ? ? ? ? ? ((SVR_SOC_VER(svr) == SVR_P1022) ||
> + ? ? ? ? ? ?(SVR_SOC_VER(svr) == SVR_P1022_E) ||
> + ? ? ? ? ? ?(SVR_SOC_VER(svr) == SVR_P1013) ||
> + ? ? ? ? ? ?(SVR_SOC_VER(svr) == SVR_P1013_E))) {
> + ? ? ? ? ? ? ? puts("Work-around for Erratum SATA A001 enabled\n");
> + ? ? ? }
> +#endif
> +
> ? ? ? ?return 0;
> ?}

How are you planning on handling chip-specific errata?  Do you forsee
do_errata() containing code for every erratum of every chip?

-- 
Timur Tabi
Linux kernel developer at Freescale

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-06-11  1:58   ` Timur Tabi
@ 2010-06-11 13:33     ` Kumar Gala
  0 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2010-06-11 13:33 UTC (permalink / raw)
  To: u-boot


On Jun 10, 2010, at 8:58 PM, Timur Tabi wrote:

> On Wed, Jun 9, 2010 at 11:18 PM, Kumar Gala <galak@kernel.crashing.org> wrote:
>>  static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>>  {
>> +       __maybe_unused u32 svr = get_svr();
>> +
>> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
>> +       if (IS_SVR_REV(svr, 1, 0) &&
>> +           ((SVR_SOC_VER(svr) == SVR_P1022) ||
>> +            (SVR_SOC_VER(svr) == SVR_P1022_E) ||
>> +            (SVR_SOC_VER(svr) == SVR_P1013) ||
>> +            (SVR_SOC_VER(svr) == SVR_P1013_E))) {
>> +               puts("Work-around for Erratum SATA A001 enabled\n");
>> +       }
>> +#endif
>> +
>>        return 0;
>>  }
> 
> How are you planning on handling chip-specific errata?  Do you forsee
> do_errata() containing code for every erratum of every chip?

Yes, we can split it up into functions as it grows.

- k

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

* [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
  2010-06-10  4:18 [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds Kumar Gala
  2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
@ 2010-06-30  9:39 ` Kumar Gala
  2010-07-14 19:29 ` Wolfgang Denk
  2 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2010-06-30  9:39 UTC (permalink / raw)
  To: u-boot


On Jun 9, 2010, at 11:18 PM, Kumar Gala wrote:

> Add 'errata' command to report what errata we workaround
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/cpu/mpc85xx/Makefile     |    1 +
> arch/powerpc/cpu/mpc85xx/cmd_errata.c |   35 +++++++++++++++++++++++++++++++++
> 2 files changed, 36 insertions(+), 0 deletions(-)
> create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c

applied to 85xx

- k

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
  2010-06-11  1:58   ` Timur Tabi
@ 2010-06-30  9:40   ` Kumar Gala
  2010-07-14 19:30   ` Wolfgang Denk
  2 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2010-06-30  9:40 UTC (permalink / raw)
  To: u-boot


On Jun 9, 2010, at 11:18 PM, Kumar Gala wrote:

> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
> arch/powerpc/cpu/mpc85xx/cmd_errata.c |   14 ++++++++++++++
> 1 files changed, 14 insertions(+), 0 deletions(-)

applied to 85xx

- k

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

* [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
  2010-06-10  4:18 [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds Kumar Gala
  2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
  2010-06-30  9:39 ` [U-Boot] [PATCH 1/2] " Kumar Gala
@ 2010-07-14 19:29 ` Wolfgang Denk
  2010-07-14 20:50   ` Kumar Gala
  2 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2010-07-14 19:29 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <1276143535-22532-1-git-send-email-galak@kernel.crashing.org> you wrote:
> Add 'errata' command to report what errata we workaround
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  arch/powerpc/cpu/mpc85xx/Makefile     |    1 +
>  arch/powerpc/cpu/mpc85xx/cmd_errata.c |   35 +++++++++++++++++++++++++++++++++
>  2 files changed, 36 insertions(+), 0 deletions(-)
>  create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c
...
> +static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
> +{
> +	return 0;
> +}

NAK. Please do not add dead code.

Please re-submit when you really add code here.

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
Time is fluid ... like a river with currents, eddies, backwash.
	-- Spock, "The City on the Edge of Forever", stardate 3134.0

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
  2010-06-11  1:58   ` Timur Tabi
  2010-06-30  9:40   ` Kumar Gala
@ 2010-07-14 19:30   ` Wolfgang Denk
  2010-07-14 21:06     ` Kumar Gala
  2 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2010-07-14 19:30 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <1276143535-22532-2-git-send-email-galak@kernel.crashing.org> you wrote:
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ---
>  arch/powerpc/cpu/mpc85xx/cmd_errata.c |   14 ++++++++++++++
>  1 files changed, 14 insertions(+), 0 deletions(-)
> 
> diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> index 6824ebf..81078bd 100644
> --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
> @@ -22,9 +22,23 @@
>  
>  #include <common.h>
>  #include <command.h>
> +#include <linux/compiler.h>
> +#include <asm/processor.h>
>  
>  static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>  {
> +	__maybe_unused u32 svr = get_svr();
> +
> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
> +	if (IS_SVR_REV(svr, 1, 0) &&
> +	    ((SVR_SOC_VER(svr) == SVR_P1022) ||
> +	     (SVR_SOC_VER(svr) == SVR_P1022_E) ||
> +	     (SVR_SOC_VER(svr) == SVR_P1013) ||
> +	     (SVR_SOC_VER(svr) == SVR_P1013_E))) {

Please use a switch().

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 first rule of magic is simple. Don't waste your time waving your
hands and hoping when a rock or a club will do."
                                               - McCloctnik the Lucid

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

* [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 19:29 ` Wolfgang Denk
@ 2010-07-14 20:50   ` Kumar Gala
  2010-07-14 21:00     ` Wolfgang Denk
  0 siblings, 1 reply; 17+ messages in thread
From: Kumar Gala @ 2010-07-14 20:50 UTC (permalink / raw)
  To: u-boot


On Jul 14, 2010, at 2:29 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1276143535-22532-1-git-send-email-galak@kernel.crashing.org> you wrote:
>> Add 'errata' command to report what errata we workaround
>> 
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>> ---
>> arch/powerpc/cpu/mpc85xx/Makefile     |    1 +
>> arch/powerpc/cpu/mpc85xx/cmd_errata.c |   35 +++++++++++++++++++++++++++++++++
>> 2 files changed, 36 insertions(+), 0 deletions(-)
>> create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c
> ...
>> +static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>> +{
>> +	return 0;
>> +}
> 
> NAK. Please do not add dead code.
> 
> Please re-submit when you really add code here.
> 
> Best regards,
> 
> Wolfgang Denk

Do you want me to just merge w/the patch that does add code here?

- k

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

* [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 20:50   ` Kumar Gala
@ 2010-07-14 21:00     ` Wolfgang Denk
  2010-07-14 21:06       ` Kumar Gala
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2010-07-14 21:00 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <4203E0DB-91EC-4311-8C52-7EC48F570323@kernel.crashing.org> you wrote:
> 
> > NAK. Please do not add dead code.
> > 
> > Please re-submit when you really add code here.
> > 
> > Best regards,
> > 
> > Wolfgang Denk
>
> Do you want me to just merge w/the patch that does add code here?

Yes, squash these two commits (sorry, I saw the secont patch only
after sending the message).


BTW: it makes sense to wait a couple of days for reviews.

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
"Ada is PL/I trying to be Smalltalk.                 - Codoso diBlini

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

* [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 21:00     ` Wolfgang Denk
@ 2010-07-14 21:06       ` Kumar Gala
  0 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2010-07-14 21:06 UTC (permalink / raw)
  To: u-boot


On Jul 14, 2010, at 4:00 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <4203E0DB-91EC-4311-8C52-7EC48F570323@kernel.crashing.org> you wrote:
>> 
>>> NAK. Please do not add dead code.
>>> 
>>> Please re-submit when you really add code here.
>>> 
>>> Best regards,
>>> 
>>> Wolfgang Denk
>> 
>> Do you want me to just merge w/the patch that does add code here?
> 
> Yes, squash these two commits (sorry, I saw the secont patch only
> after sending the message).

ok

> BTW: it makes sense to wait a couple of days for reviews.

I posted this on Jun 10th. Seems like a month is a few days ;)

- k

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-07-14 19:30   ` Wolfgang Denk
@ 2010-07-14 21:06     ` Kumar Gala
  2010-07-14 21:13       ` Wolfgang Denk
                         ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Kumar Gala @ 2010-07-14 21:06 UTC (permalink / raw)
  To: u-boot


On Jul 14, 2010, at 2:30 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1276143535-22532-2-git-send-email-galak@kernel.crashing.org> you wrote:
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
>> ---
>> arch/powerpc/cpu/mpc85xx/cmd_errata.c |   14 ++++++++++++++
>> 1 files changed, 14 insertions(+), 0 deletions(-)
>> 
>> diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
>> index 6824ebf..81078bd 100644
>> --- a/arch/powerpc/cpu/mpc85xx/cmd_errata.c
>> +++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
>> @@ -22,9 +22,23 @@
>> 
>> #include <common.h>
>> #include <command.h>
>> +#include <linux/compiler.h>
>> +#include <asm/processor.h>
>> 
>> static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char *argv[])
>> {
>> +	__maybe_unused u32 svr = get_svr();
>> +
>> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
>> +	if (IS_SVR_REV(svr, 1, 0) &&
>> +	    ((SVR_SOC_VER(svr) == SVR_P1022) ||
>> +	     (SVR_SOC_VER(svr) == SVR_P1022_E) ||
>> +	     (SVR_SOC_VER(svr) == SVR_P1013) ||
>> +	     (SVR_SOC_VER(svr) == SVR_P1013_E))) {
> 
> Please use a switch().

Really?  There is only 1 case, you want:

	switch(SVR_SOC_VER(svr)) {
		case SVR_P1022:
		case SVR_P1022_E:
		case SVR_P1013:
		case SVR_P1013_E:
			....
			break;
	}

- k

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

* [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001
  2010-07-14 21:06     ` Kumar Gala
@ 2010-07-14 21:13       ` Wolfgang Denk
  2010-07-14 21:20       ` [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds Kumar Gala
  2010-07-14 22:07       ` [U-Boot] [PATCH v3] " Kumar Gala
  2 siblings, 0 replies; 17+ messages in thread
From: Wolfgang Denk @ 2010-07-14 21:13 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <EDA07492-2746-46D4-963A-37F4CAE0B415@kernel.crashing.org> you wrote:
> 
> >> +#if defined(CONFIG_FSL_SATA_V2) && > defined(CONFIG_FSL_SATA_ERRATUM_A001)
> >> +	if (IS_SVR_REV(svr, 1, 0) &&
> >> +	    ((SVR_SOC_VER(svr) == SVR_P1022) ||
> >> +	     (SVR_SOC_VER(svr) == SVR_P1022_E) ||
> >> +	     (SVR_SOC_VER(svr) == SVR_P1013) ||
> >> +	     (SVR_SOC_VER(svr) == SVR_P1013_E))) {
> > 
> > Please use a switch().
>
> Really?  There is only 1 case, you want:
>
> 	switch(SVR_SOC_VER(svr)) {
> 		case SVR_P1022:
> 		case SVR_P1022_E:
> 		case SVR_P1013:
> 		case SVR_P1013_E:
> 			....
> 			break;
> 	}

Yes - don't you think it's much easier to write and to read?

Also it shows clearly that you are missing a default: case...

BTW: your indentation is wrong, and please sort the list...

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
"He only drinks when he gets depressed." "Why does he get depressed?"
"Sometimes it's because he hasn't had a drink."
                                     - Terry Pratchett, _Men at Arms_

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

* [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 21:06     ` Kumar Gala
  2010-07-14 21:13       ` Wolfgang Denk
@ 2010-07-14 21:20       ` Kumar Gala
  2010-07-14 21:43         ` Wolfgang Denk
  2010-07-14 22:07       ` [U-Boot] [PATCH v3] " Kumar Gala
  2 siblings, 1 reply; 17+ messages in thread
From: Kumar Gala @ 2010-07-14 21:20 UTC (permalink / raw)
  To: u-boot

Add 'errata' command to report what errata we workaround.  Report
workaround for erratum SATA-A001 on P1022/P1013.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
 arch/powerpc/cpu/mpc85xx/Makefile     |    1 +
 arch/powerpc/cpu/mpc85xx/cmd_errata.c |   51 +++++++++++++++++++++++++++++++++
 include/configs/P1022DS.h             |    1 +
 3 files changed, 53 insertions(+), 0 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c

diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile
index a481326..4ee0e9a 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -32,6 +32,7 @@ START	= start.o resetvec.o
 SOBJS-$(CONFIG_MP)	+= release.o
 SOBJS	= $(SOBJS-y)
 
+COBJS-$(CONFIG_CMD_ERRATA) += cmd_errata.o
 COBJS-$(CONFIG_CPM2)	+= commproc.o
 
 # supports ddr1
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
new file mode 100644
index 0000000..d7835c8
--- /dev/null
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2010 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <command.h>
+#include <linux/compiler.h>
+#include <asm/processor.h>
+
+static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	__maybe_unused u32 svr = get_svr();
+
+#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
+	if (IS_SVR_REV(svr, 1, 0)) {
+		switch (SVR_SOC_VER(svr)) {
+		case SVR_P1013:
+		case SVR_P1013_E:
+		case SVR_P1022:
+		case SVR_P1022_E:
+			puts("Work-around for Erratum SATA A001 enabled\n");
+		}
+	}
+#endif
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	errata, 1, 0,	do_errata,
+	"Report errata workarounds",
+	""
+);
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index e444179..ce9a4d1 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -345,6 +345,7 @@
 #define CONFIG_CMD_ELF
 #define CONFIG_CMD_IRQ
 #define CONFIG_CMD_SETEXPR
+#define CONFIG_CMD_ERRATA
 
 #ifdef CONFIG_PCI
 #define CONFIG_CMD_PCI
-- 
1.6.0.6

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

* [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 21:20       ` [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds Kumar Gala
@ 2010-07-14 21:43         ` Wolfgang Denk
  2010-07-14 22:05           ` Kumar Gala
  0 siblings, 1 reply; 17+ messages in thread
From: Wolfgang Denk @ 2010-07-14 21:43 UTC (permalink / raw)
  To: u-boot

Dear Kumar Gala,

In message <1279142410-30629-1-git-send-email-galak@kernel.crashing.org> you wrote:
> Add 'errata' command to report what errata we workaround.  Report
> workaround for erratum SATA-A001 on P1022/P1013.
> 
> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
...
> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
> +	if (IS_SVR_REV(svr, 1, 0)) {
> +		switch (SVR_SOC_VER(svr)) {
> +		case SVR_P1013:
> +		case SVR_P1013_E:
> +		case SVR_P1022:
> +		case SVR_P1022_E:
> +			puts("Work-around for Erratum SATA A001 enabled\n");
> +		}

I think there should be a "default" case?

> +++ b/include/configs/P1022DS.h
> @@ -345,6 +345,7 @@
>  #define CONFIG_CMD_ELF
>  #define CONFIG_CMD_IRQ
>  #define CONFIG_CMD_SETEXPR
> +#define CONFIG_CMD_ERRATA

Please sort the list.

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
I really hate this damned machine     It never does quite what I want
I wish that they would sell it.              But only what I tell it.

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

* [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 21:43         ` Wolfgang Denk
@ 2010-07-14 22:05           ` Kumar Gala
  0 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2010-07-14 22:05 UTC (permalink / raw)
  To: u-boot


On Jul 14, 2010, at 4:43 PM, Wolfgang Denk wrote:

> Dear Kumar Gala,
> 
> In message <1279142410-30629-1-git-send-email-galak@kernel.crashing.org> you wrote:
>> Add 'errata' command to report what errata we workaround.  Report
>> workaround for erratum SATA-A001 on P1022/P1013.
>> 
>> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
> ...
>> +#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
>> +	if (IS_SVR_REV(svr, 1, 0)) {
>> +		switch (SVR_SOC_VER(svr)) {
>> +		case SVR_P1013:
>> +		case SVR_P1013_E:
>> +		case SVR_P1022:
>> +		case SVR_P1022_E:
>> +			puts("Work-around for Erratum SATA A001 enabled\n");
>> +		}
> 
> I think there should be a "default" case?

No, since if you dont match you dont have the errata.

> 
>> +++ b/include/configs/P1022DS.h
>> @@ -345,6 +345,7 @@
>> #define CONFIG_CMD_ELF
>> #define CONFIG_CMD_IRQ
>> #define CONFIG_CMD_SETEXPR
>> +#define CONFIG_CMD_ERRATA

will do

- k

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

* [U-Boot] [PATCH v3] powerpc/85xx: Add command to report errata workarounds
  2010-07-14 21:06     ` Kumar Gala
  2010-07-14 21:13       ` Wolfgang Denk
  2010-07-14 21:20       ` [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds Kumar Gala
@ 2010-07-14 22:07       ` Kumar Gala
  2 siblings, 0 replies; 17+ messages in thread
From: Kumar Gala @ 2010-07-14 22:07 UTC (permalink / raw)
  To: u-boot

Add 'errata' command to report what errata we workaround.  Report
workaround for erratum SATA-A001 on P1022/P1013.

Also sorted the CONFIG_CMD_* list.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
* Sorted the CMD list

 arch/powerpc/cpu/mpc85xx/Makefile     |    1 +
 arch/powerpc/cpu/mpc85xx/cmd_errata.c |   51 +++++++++++++++++++++++++++++++++
 include/configs/P1022DS.h             |    6 ++--
 3 files changed, 55 insertions(+), 3 deletions(-)
 create mode 100644 arch/powerpc/cpu/mpc85xx/cmd_errata.c

diff --git a/arch/powerpc/cpu/mpc85xx/Makefile b/arch/powerpc/cpu/mpc85xx/Makefile
index a481326..4ee0e9a 100644
--- a/arch/powerpc/cpu/mpc85xx/Makefile
+++ b/arch/powerpc/cpu/mpc85xx/Makefile
@@ -32,6 +32,7 @@ START	= start.o resetvec.o
 SOBJS-$(CONFIG_MP)	+= release.o
 SOBJS	= $(SOBJS-y)
 
+COBJS-$(CONFIG_CMD_ERRATA) += cmd_errata.o
 COBJS-$(CONFIG_CPM2)	+= commproc.o
 
 # supports ddr1
diff --git a/arch/powerpc/cpu/mpc85xx/cmd_errata.c b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
new file mode 100644
index 0000000..d7835c8
--- /dev/null
+++ b/arch/powerpc/cpu/mpc85xx/cmd_errata.c
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2010 Freescale Semiconductor, Inc.
+ *
+ * See file CREDITS for list of people who contributed to this
+ * project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of
+ * the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ * MA 02111-1307 USA
+ */
+
+#include <common.h>
+#include <command.h>
+#include <linux/compiler.h>
+#include <asm/processor.h>
+
+static int do_errata(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[])
+{
+	__maybe_unused u32 svr = get_svr();
+
+#if defined(CONFIG_FSL_SATA_V2) && defined(CONFIG_FSL_SATA_ERRATUM_A001)
+	if (IS_SVR_REV(svr, 1, 0)) {
+		switch (SVR_SOC_VER(svr)) {
+		case SVR_P1013:
+		case SVR_P1013_E:
+		case SVR_P1022:
+		case SVR_P1022_E:
+			puts("Work-around for Erratum SATA A001 enabled\n");
+		}
+	}
+#endif
+
+	return 0;
+}
+
+U_BOOT_CMD(
+	errata, 1, 0,	do_errata,
+	"Report errata workarounds",
+	""
+);
diff --git a/include/configs/P1022DS.h b/include/configs/P1022DS.h
index e444179..b42b5d0 100644
--- a/include/configs/P1022DS.h
+++ b/include/configs/P1022DS.h
@@ -338,12 +338,12 @@
  */
 #include <config_cmd_default.h>
 
+#define CONFIG_CMD_ELF
+#define CONFIG_CMD_ERRATA
 #define CONFIG_CMD_IRQ
-#define CONFIG_CMD_PING
 #define CONFIG_CMD_I2C
 #define CONFIG_CMD_MII
-#define CONFIG_CMD_ELF
-#define CONFIG_CMD_IRQ
+#define CONFIG_CMD_PING
 #define CONFIG_CMD_SETEXPR
 
 #ifdef CONFIG_PCI
-- 
1.6.0.6

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

end of thread, other threads:[~2010-07-14 22:07 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10  4:18 [U-Boot] [PATCH 1/2] powerpc/85xx: Add command to report errata workarounds Kumar Gala
2010-06-10  4:18 ` [U-Boot] [PATCH 2/2] powerpc/85xx: Report workaround of errata SATA-A001 Kumar Gala
2010-06-11  1:58   ` Timur Tabi
2010-06-11 13:33     ` Kumar Gala
2010-06-30  9:40   ` Kumar Gala
2010-07-14 19:30   ` Wolfgang Denk
2010-07-14 21:06     ` Kumar Gala
2010-07-14 21:13       ` Wolfgang Denk
2010-07-14 21:20       ` [U-Boot] [PATCH] powerpc/85xx: Add command to report errata workarounds Kumar Gala
2010-07-14 21:43         ` Wolfgang Denk
2010-07-14 22:05           ` Kumar Gala
2010-07-14 22:07       ` [U-Boot] [PATCH v3] " Kumar Gala
2010-06-30  9:39 ` [U-Boot] [PATCH 1/2] " Kumar Gala
2010-07-14 19:29 ` Wolfgang Denk
2010-07-14 20:50   ` Kumar Gala
2010-07-14 21:00     ` Wolfgang Denk
2010-07-14 21:06       ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox