[U-Boot-Users] [PATCH] MPC8360EMDS: Avoid replicating CFG_CMD commands

Jerry Van Baren gerald.vanbaren at comcast.net
Fri Dec 22 04:27:51 CET 2006


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 


More information about the U-Boot mailing list