All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Grinberg <grinberg@compulab.co.il>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH v7] dreamplug: initial board support.
Date: Tue, 13 Sep 2011 10:32:41 +0300	[thread overview]
Message-ID: <4E6F0719.5050500@compulab.co.il> (raw)
In-Reply-To: <1315827911-9634-1-git-send-email-u-boot@lakedaemon.net>

On 09/12/11 14:45, Jason Cooper wrote:
> Copied wholeheartedly from board/Marvell/guruplug and modified to add support
> for SPI NOR flash.
> 
> CONFIG_MACH_DREAMPLUG defined in include/configs/dreamplug.h until Linus's
> kernel.org tree adds it to mach-types.h.  Once it trickles down, the definition
> can be removed from dreamplug.h.
> 
> Signed-off-by: Jason Cooper <u-boot@lakedaemon.net>
> ---

[...]

> Changes from v6 to v7:
> 
> 	- Use CONFIG_MACH_TYPE in dreamplug.c and define it to
> 	  MACH_TYPE_DREAMPLUG in include/configs/dreamplug.h

Sorry, but you've got me wrong...
All you need to do is define the CONFIG_MACH_TYPE in your config file.
The rest will be taken care of by the common code.
See below for details.

[...]

> diff --git a/board/Marvell/dreamplug/dreamplug.c b/board/Marvell/dreamplug/dreamplug.c
> new file mode 100644
> index 0000000..05098fa
> --- /dev/null
> +++ b/board/Marvell/dreamplug/dreamplug.c

[...]

> +
> +int board_init(void)
> +{
> +	/* arch number of board */
> +	gd->bd->bi_arch_number = CONFIG_MACH_TYPE;

the above two line should be removed.

[...]

> diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h
> new file mode 100644
> index 0000000..a7168bd
> --- /dev/null
> +++ b/include/configs/dreamplug.h

[...]

> +
> +/*
> + * FIXME: This belongs in mach-types.h.  However, we only pull mach-types
> + * from Linus' kernel.org tree.  This hasn't been updated primarily due to
> + * the recent arch/arm reshuffling.  So, in the meantime, we'll place it
> + * here.
> + */
> +#define MACH_TYPE_DREAMPLUG            3550
> +
> +#ifdef CONFIG_MACH_DREAMPLUG
> +# ifdef machine_arch_type
> +#  undef machine_arch_type
> +#  define machine_arch_type	__machine_arch_type
> +# else
> +#  define machine_arch_type	MACH_TYPE_DREAMPLUG
> +# endif
> +# define machine_is_dreamplug()	(machine_arch_type == MACH_TYPE_DREAMPLUG)
> +#else
> +# define machine_is_dreamplug()	(0)
> +#endif

Do you actually use the machine_is_dreamplug() macro in your code?
If you don't, then you don't need the above block at all.

> +
> +/*
> + * Version number information
> + */
> +#define CONFIG_IDENT_STRING	"\nMarvell-DreamPlug"
> +
> +/*
> + * High Level Configuration Options (easy to change)
> + */
> +#define CONFIG_SHEEVA_88SV131	1	/* CPU Core subversion */
> +#define CONFIG_KIRKWOOD		1	/* SOC Family Name */
> +#define CONFIG_KW88F6281	1	/* SOC Name */
> +#define CONFIG_MACH_TYPE	MACH_TYPE_DREAMPLUG

The above line is all what you need to setup the machine id
(along with MACH_TYPE_DREAMPLUG definition of course,
unless it is in mach_type file).

> +#define CONFIG_MACH_DREAMPLUG		/* Machine type */

shouldn't the above be defined before the machine_is_... block?
If you don't need the machine_is_dreamplug() macro, then you also
don't need the above line.

[...]


-- 
Regards,
Igor.

  reply	other threads:[~2011-09-13  7:32 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-13 15:54 [U-Boot] [PATCH 0/1 v4] RFC: Dreamplug support u-boot at lakedaemon.net
2011-06-13 15:54 ` [U-Boot] [PATCH 1/1 v4] RFC: dreamplug: Initial support u-boot at lakedaemon.net
2011-06-13 15:59   ` Prafulla Wadaskar
2011-06-13 16:07     ` Jason
2011-06-13 16:46       ` Wolfgang Denk
2011-06-13 16:51         ` Jason
2011-07-21 19:36           ` Clint Adams
2011-07-21 20:26             ` Jason
2011-07-21 20:56               ` Clint Adams
2011-07-21 21:17                 ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 0/5 v5] add dreamplug support Jason Cooper
2011-09-11 22:10     ` [U-Boot] [PATCH v6] dreamplug: initial board support u-boot at lakedaemon.net
2011-09-12  7:37       ` Igor Grinberg
2011-09-12 11:36         ` Jason
2011-09-12 11:45       ` [U-Boot] [PATCH v7] " Jason Cooper
2011-09-13  7:32         ` Igor Grinberg [this message]
2011-09-13 13:53           ` Jason
2011-09-13 11:56         ` Prafulla Wadaskar
2011-09-13 13:00           ` Wolfgang Denk
2011-09-13 14:17             ` Jason
2011-09-14  6:39               ` Prafulla Wadaskar
2011-09-18 17:58                 ` Albert ARIBAUD
2011-09-18 18:27                   ` Albert ARIBAUD
2011-09-18 18:39                   ` Jason
2011-09-18 20:28                     ` Wolfgang Denk
2011-09-18 20:58                       ` Jason
2011-09-18 19:06         ` [U-Boot] [PATCH v8] " Jason Cooper
2011-10-03  4:37           ` Prafulla Wadaskar
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 1/5] drivers/rtc: add Marvell Integrated RTC Jason Cooper
2011-07-27 18:12     ` Prafulla Wadaskar
2011-07-28  1:22       ` Jason
2011-07-28 19:09         ` Prafulla Wadaskar
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 2/5] arm/kirkwood: print speeds with cpu info Jason Cooper
2011-07-27 18:21     ` Prafulla Wadaskar
2011-07-28  1:31       ` Jason
2011-07-28 19:14         ` Prafulla Wadaskar
2011-10-06 18:13     ` Wolfgang Denk
2011-10-07 12:37       ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 3/5] usb: Some EHCI chipsets are slow to respond Jason Cooper
2011-07-27 18:23     ` Prafulla Wadaskar
2011-07-28  1:37       ` Jason
2011-07-28 19:16         ` Prafulla Wadaskar
2011-07-29 14:31           ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 4/5 v5] dreamplug: initial board support Jason Cooper
2011-07-27 18:38     ` Prafulla Wadaskar
2011-07-28  2:02       ` Jason
2011-07-28 19:37         ` Prafulla Wadaskar
2011-07-29 15:18           ` Jason
2011-07-29 18:57             ` Prafulla Wadaskar
2011-07-29 19:43               ` Jason
2011-10-06 18:15     ` Wolfgang Denk
2011-10-07 12:40       ` Jason
2011-07-26 21:19   ` [U-Boot] RFC [PATCH 5/5 v5] dreamplug: use MACH_TYPE_DREAMPLUG Jason Cooper
2011-07-27 18:40     ` Prafulla Wadaskar
2011-07-28  2:08       ` Jason
2011-07-28  7:25         ` Bdale Garbee
2011-07-28 12:43           ` Jason
2011-07-28 13:44             ` Bdale Garbee
2011-07-28 19:39         ` Prafulla Wadaskar
2011-07-29 15:25           ` Jason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4E6F0719.5050500@compulab.co.il \
    --to=grinberg@compulab.co.il \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.