All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] MPC8360EMDS: Avoid replicating CFG_CMD commands
@ 2006-12-22  3:27 Jerry Van Baren
  0 siblings, 0 replies; only message in thread
From: Jerry Van Baren @ 2006-12-22  3:27 UTC (permalink / raw)
  To: u-boot

Hi Dave,

This is a fairly simple patch that rearranges the command configuration 
so there are not four very similar lists of commands for the four 
configurations (with/without PCI, with/without CFG_RAMBOOT).  I got 
tired of editing four sets of commands (or worse, editing the wrong set 
of commands).

The patch creates a CONFIG_COMMANDS_COMMON with the common commands, a 
CONFIG_COMMANDS_PCI with the PCI-related commands (or 0), and 
CONFIG_COMMANDS_REMOVE with the commands that are removed for 
CFG_RAMBOOT operation (or ~0).

Diff didn't produce a very readable patch. :-(  The result of the patch is:

#define CONFIG_COMMANDS_COMMON  (CONFIG_CMD_DFL \
                                 | CFG_CMD_ASKENV \
                                 | CFG_CMD_DHCP \
                                 | CFG_CMD_I2C \
                                 | CFG_CMD_PING)
#if defined(CONFIG_PCI)
#define CONFIG_COMMANDS_PCI     CFG_CMD_PCI
#else
#define CONFIG_COMMANDS_PCI     0ULL
#endif

#if defined(CFG_RAMBOOT)
#define CONFIG_COMMANDS_REMOVE  ~(CFG_CMD_ENV \
                                 | CFG_CMD_LOADS)
#else
#define CONFIG_COMMANDS_REMOVE  ~0ULL
#endif

#define  CONFIG_COMMANDS        ((CONFIG_COMMANDS_COMMON \
                                 | CONFIG_COMMANDS_PCI) \
                                 & CONFIG_COMMANDS_REMOVE)

Best regards,
gvb
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0001-MPC8360EMDS-Avoid-replicating-CFG_CMD-commands.txt
Url: http://lists.denx.de/pipermail/u-boot/attachments/20061221/05449739/attachment.txt 

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-12-22  3:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-12-22  3:27 [U-Boot-Users] [PATCH] MPC8360EMDS: Avoid replicating CFG_CMD commands Jerry Van Baren

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.