public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
@ 2007-03-27 16:13 Ulf Samuelsson
  2007-03-27 16:38 ` Wolfgang Denk
  2007-03-27 16:56 ` Grant Likely
  0 siblings, 2 replies; 9+ messages in thread
From: Ulf Samuelsson @ 2007-03-27 16:13 UTC (permalink / raw)
  To: u-boot

Author: Ulf Samuelsson <ulf@atmel.com>
Date:     2007-03-27

Subject:	"2.mach_types":(1 of  1)     [PATCH][ARM] Create mach-types for various at91 boards

CHANGELOG:
    [PATCH][ARM] Create mach-types for various at91 boards
	at91rm9200df
	at91sam9260
	at91sam9261
	at91sam9263

    Patch generated from files:
          include_asm-arm_mach-types.h.patch

    Signed-off-by:	Ulf Samuelsson
---------------------------------------------------------------------------------------------------------------------------------
diff -urN u-boot-1.2.0/include/asm-arm/mach-types.h u-boot-1.2.0-atmel/include/asm-arm/mach-types.h
--- u-boot-1.2.0/include/asm-arm/mach-types.h	2007-01-07 00:13:11.000000000 +0100
+++ u-boot-1.2.0-atmel/include/asm-arm/mach-types.h	2007-03-24 20:07:34.000000000 +0100
@@ -736,7 +736,11 @@
 #define MACH_TYPE_LN2410SBC            725
 #define MACH_TYPE_CB3RUFC              726
 #define MACH_TYPE_MP2USB               727
+#define MACH_TYPE_AT91SAM9261EK        848
 #define MACH_TYPE_PDNB3               1002
+#define MACH_TYPE_AT91SAM9260EK       1099
+#define MACH_TYPE_AT91RM9200DF	1119
+#define MACH_TYPE_AT91SAM9263EK	1202

 #ifdef CONFIG_ARCH_EBSA110
 # ifdef machine_arch_type
@@ -9402,6 +9406,66 @@
 # define machine_is_mp2usb()	(0)
 #endif

+#ifdef CONFIG_MACH_AT91SAM9261EK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_AT91SAM9261EK
+# endif
+# define machine_is_at91sam9261ek()	(machine_arch_type == MACH_TYPE_AT91SAM9261EK)
+#else
+# define machine_is_at91sam9261ek()	(0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9260EK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_AT91SAM9260EK
+# endif
+# define machine_is_at91sam9260ek()	(machine_arch_type == MACH_TYPE_AT91SAM9260EK)
+#else
+# define machine_is_at91sam9260ek()	(0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9263EK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_AT91SAM9263EK
+# endif
+# define machine_is_at91sam9263ek()	(machine_arch_type == MACH_TYPE_AT91SAM9263EK)
+#else
+# define machine_is_at91sam9263ek()	(0)
+#endif
+
+#ifdef CONFIG_MACH_AT91RM9200DF
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_AT91RM9200DF
+# endif
+# define machine_is_at91rm9200df()	(machine_arch_type == MACH_TYPE_AT91RM9200DF)
+#else
+# define machine_is_at91rm9200df()	(0)
+#endif
+
+#ifdef CONFIG_MACH_AT91SAM9263EK
+# ifdef machine_arch_type
+#  undef machine_arch_type
+#  define machine_arch_type	__machine_arch_type
+# else
+#  define machine_arch_type	MACH_TYPE_AT91SAM9263EK
+# endif
+# define machine_is_at91sam9263ek()	(machine_arch_type == MACH_TYPE_AT91SAM9263EK)
+#else
+# define machine_is_at91sam9263ek()	(0)
+#endif
+
 /*
  * These have not yet been registered
  */

-- 
Best Regards,
Ulf Samuelsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ulf.vcf
Type: text/x-vcard
Size: 301 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070327/5d0f075a/attachment.vcf 

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 16:13 [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards Ulf Samuelsson
@ 2007-03-27 16:38 ` Wolfgang Denk
  2007-03-27 16:42   ` Ulf Samuelsson
  2007-05-23 15:28   ` Ladislav Michl
  2007-03-27 16:56 ` Grant Likely
  1 sibling, 2 replies; 9+ messages in thread
From: Wolfgang Denk @ 2007-03-27 16:38 UTC (permalink / raw)
  To: u-boot

In message <460942BA.3010609@atmel.com> you wrote:
>
> Subject:	"2.mach_types":(1 of  1)     [PATCH][ARM] Create mach-types for various at91 boards
> 
> CHANGELOG:
>     [PATCH][ARM] Create mach-types for various at91 boards
> 	at91rm9200df
> 	at91sam9260
> 	at91sam9261
> 	at91sam9263

I send a NAK to this patch. Instead of updating individual entries,
please update the whole file.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
There are no data that cannot be plotted on a straight  line  if  the
axis are chosen correctly.

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 16:38 ` Wolfgang Denk
@ 2007-03-27 16:42   ` Ulf Samuelsson
  2007-03-27 17:37     ` Wolfgang Denk
  2007-05-23 15:28   ` Ladislav Michl
  1 sibling, 1 reply; 9+ messages in thread
From: Ulf Samuelsson @ 2007-03-27 16:42 UTC (permalink / raw)
  To: u-boot

Wolfgang Denk skrev:
> In message <460942BA.3010609@atmel.com> you wrote:
>> Subject:	"2.mach_types":(1 of  1)     [PATCH][ARM] Create mach-types for various at91 boards
>>
>> CHANGELOG:
>>     [PATCH][ARM] Create mach-types for various at91 boards
>> 	at91rm9200df
>> 	at91sam9260
>> 	at91sam9261
>> 	at91sam9263
> 
> I send a NAK to this patch. Instead of updating individual entries,
> please update the whole file.
> 
> Best regards,
> 
> Wolfgang Denk
> 

You mean that I need to supply the complete board patch for the board?
Intend to but each board will be too large for one file anyway.

-- 
Best Regards,
Ulf Samuelsson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ulf.vcf
Type: text/x-vcard
Size: 301 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070327/a1c552a4/attachment.vcf 

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 16:13 [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards Ulf Samuelsson
  2007-03-27 16:38 ` Wolfgang Denk
@ 2007-03-27 16:56 ` Grant Likely
  2007-03-27 17:40   ` Wolfgang Denk
  1 sibling, 1 reply; 9+ messages in thread
From: Grant Likely @ 2007-03-27 16:56 UTC (permalink / raw)
  To: u-boot

On 3/27/07, Ulf Samuelsson <ulf@atmel.com> wrote:
> diff -urN u-boot-1.2.0/include/asm-arm/mach-types.h u-boot-1.2.0-atmel/include/asm-arm/mach-types.h
> --- u-boot-1.2.0/include/asm-arm/mach-types.h   2007-01-07 00:13:11.000000000 +0100
> +++ u-boot-1.2.0-atmel/include/asm-arm/mach-types.h     2007-03-24 20:07:34.000000000 +0100
> @@ -736,7 +736,11 @@
>  #define MACH_TYPE_LN2410SBC            725
>  #define MACH_TYPE_CB3RUFC              726
>  #define MACH_TYPE_MP2USB               727
> +#define MACH_TYPE_AT91SAM9261EK        848
>  #define MACH_TYPE_PDNB3               1002
> +#define MACH_TYPE_AT91SAM9260EK       1099
> +#define MACH_TYPE_AT91RM9200DF 1119
> +#define MACH_TYPE_AT91SAM9263EK        1202
>
>  #ifdef CONFIG_ARCH_EBSA110
>  # ifdef machine_arch_type
> @@ -9402,6 +9406,66 @@
>  # define machine_is_mp2usb()   (0)
>  #endif
>
> +#ifdef CONFIG_MACH_AT91SAM9261EK
> +# ifdef machine_arch_type
> +#  undef machine_arch_type
> +#  define machine_arch_type    __machine_arch_type
> +# else
> +#  define machine_arch_type    MACH_TYPE_AT91SAM9261EK
> +# endif
> +# define machine_is_at91sam9261ek()    (machine_arch_type == MACH_TYPE_AT91SAM9261EK)
> +#else
> +# define machine_is_at91sam9261ek()    (0)
> +#endif

(Note: I realize this is a comment on the entire file, and your change
just matches the existing code, but I'm going to bring it up
anyway...)

I'm confused by this construct.  What is the reason for the large
#ifdef block?  As I read it, there are two conditions for each board;
1. #ifdef CONFIG_MACH_XXXX
2. #ifdef machine_arch_type

Regardless of the result of condition 2, 'machine_arch_type' is always
defined to something.  That something either matches the current
board, or it does not, and therefore the test in the first definition
of machine_is_XXXXX() should always evaluate correctly.

To me, it seems like quite a verbose construct when something simpler
could be used.  For example:

#ifdef machine_arch_type
# undef machine_arch_type
# define machine_arch_type    __machine_arch_type
#else
# ifdef CONFIG_MACH_ARMBOARD1
#  define machine_arch_type    MACH_TYPE_ARMBOARD1
# elif CONFIG_MACH_ARMBOARD2
#  define machine_arch_type    MACH_TYPE_ARMBOARD1
...etc for all boards...
# endif
#endif

#define machine_is_board1()    (machine_arch_type == MACH_TYPE_BOARD1)
#define machine_is_board2()    (machine_arch_type == MACH_TYPE_BOARD2)
...etc

Am I missing something?

Cheers,
g.

-- 
Grant Likely, B.Sc. P.Eng.
Secret Lab Technologies Ltd.
grant.likely at secretlab.ca
(403) 399-0195

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 16:42   ` Ulf Samuelsson
@ 2007-03-27 17:37     ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2007-03-27 17:37 UTC (permalink / raw)
  To: u-boot

In message <4609495C.6020802@atmel.com> you wrote:
>
> > I send a NAK to this patch. Instead of updating individual entries,
> > please update the whole file.
...
> You mean that I need to supply the complete board patch for the board?
> Intend to but each board will be too large for one file anyway.

No. I mean that instead of updating just single machine type entries
you should install a complete new versiosn of the mach-types file.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Computers are not intelligent.  They only think they are.

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 16:56 ` Grant Likely
@ 2007-03-27 17:40   ` Wolfgang Denk
  2007-03-27 19:10     ` Robert Schwebel
  0 siblings, 1 reply; 9+ messages in thread
From: Wolfgang Denk @ 2007-03-27 17:40 UTC (permalink / raw)
  To: u-boot

In message <528646bc0703270956p682a183eu6af0545e33de8dd7@mail.gmail.com> you wrote:
>
> I'm confused by this construct.  What is the reason for the large
> #ifdef block?  As I read it, there are two conditions for each board;

You may ask this on the ARM linux mailing list. make sure to put your
asbestos on...

> Am I missing something?

Maybe - this whole file is a verbatim copy from the corresponding
Linux kernel file.

And updating single entries just makes no sense. Instead, the recent
version of the whole file should be copied.

And then we'll selentrly swallow that bitter pill of adding  tons  of
unused defines just to get a few binary numbers...

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, HRB 165235 Munich, CEO: Wolfgang Denk
Office:  Kirchenstr. 5,       D-82194 Groebenzell,            Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Change is the essential process of all existence.
	-- Spock, "Let That Be Your Last Battlefield",
	   stardate 5730.2

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 17:40   ` Wolfgang Denk
@ 2007-03-27 19:10     ` Robert Schwebel
  0 siblings, 0 replies; 9+ messages in thread
From: Robert Schwebel @ 2007-03-27 19:10 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 27, 2007 at 07:40:44PM +0200, Wolfgang Denk wrote:
> Maybe - this whole file is a verbatim copy from the corresponding
> Linux kernel file.
> 
> And updating single entries just makes no sense. Instead, the recent
> version of the whole file should be copied.
> 
> And then we'll selentrly swallow that bitter pill of adding  tons  of
> unused defines just to get a few binary numbers...

Well, compared with

rsc at isonoe:~/git/u-boot$ find . -type f | grep -v .git | xargs wcgrep -i "#define" | wc -l
126281

it seems to fit the u-boot design very well ;)

Robert
-- 
 Dipl.-Ing. Robert Schwebel | http://www.pengutronix.de
 Pengutronix - Linux Solutions for Science and Industry
   Handelsregister:  Amtsgericht Hildesheim, HRA 2686
     Hannoversche Str. 2, 31134 Hildesheim, Germany
   Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-03-27 16:38 ` Wolfgang Denk
  2007-03-27 16:42   ` Ulf Samuelsson
@ 2007-05-23 15:28   ` Ladislav Michl
  2007-05-23 15:54     ` Wolfgang Denk
  1 sibling, 1 reply; 9+ messages in thread
From: Ladislav Michl @ 2007-05-23 15:28 UTC (permalink / raw)
  To: u-boot

On Tue, Mar 27, 2007 at 06:38:21PM +0200, Wolfgang Denk wrote:
> I send a NAK to this patch. Instead of updating individual entries,
> please update the whole file.

Sending again, this time gziped to fit into mailing list size limit.
I almost forgot how big this file is...

Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

Best regards,
	ladis

-------------- next part --------------
A non-text attachment was scrubbed...
Name: mach-type.diff.gz
Type: application/octet-stream
Size: 24032 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20070523/ebcbd611/attachment.obj 

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

* [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards
  2007-05-23 15:28   ` Ladislav Michl
@ 2007-05-23 15:54     ` Wolfgang Denk
  0 siblings, 0 replies; 9+ messages in thread
From: Wolfgang Denk @ 2007-05-23 15:54 UTC (permalink / raw)
  To: u-boot

In message <20070523152851.GA25561@michl.2n.cz> you wrote:
>
> Sending again, this time gziped to fit into mailing list size limit.
> I almost forgot how big this file is...
> 
> Signed-off-by: Ladislav Michl <ladis@linux-mips.org>

Acked-by: Wolfgang Denk <wd@denx.de>

> Content-Disposition: attachment; filename="mach-type.diff.gz"


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
Conscious is when you are aware of something, and conscience is  when
you wish you weren't.

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

end of thread, other threads:[~2007-05-23 15:54 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-27 16:13 [U-Boot-Users] "2.mach_types":(1 of 1) [PATCH][ARM] Create mach-types for various at91 boards Ulf Samuelsson
2007-03-27 16:38 ` Wolfgang Denk
2007-03-27 16:42   ` Ulf Samuelsson
2007-03-27 17:37     ` Wolfgang Denk
2007-05-23 15:28   ` Ladislav Michl
2007-05-23 15:54     ` Wolfgang Denk
2007-03-27 16:56 ` Grant Likely
2007-03-27 17:40   ` Wolfgang Denk
2007-03-27 19:10     ` Robert Schwebel

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