From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hans de Goede Date: Mon, 04 Aug 2014 20:35:06 +0200 Subject: [U-Boot] [PATCH 5/7] sunxi-common.h: Use new generic $bootcmd In-Reply-To: <53DBE283.7000704@wwwdotorg.org> References: <1406879207-12322-1-git-send-email-hdegoede@redhat.com> <1406879207-12322-5-git-send-email-hdegoede@redhat.com> <53DBE283.7000704@wwwdotorg.org> Message-ID: <53DFD25A.9020802@redhat.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, On 08/01/2014 08:54 PM, Stephen Warren wrote: > On 08/01/2014 01:46 AM, Hans de Goede wrote: >> Use the new standard bootcmd from . > > Acked-by: Stephen Warren Thanks for the review. >> diff --git a/include/configs/sunxi-common.h b/include/configs/sunxi-common.h > >> +#ifdef CONFIG_AHCI >> +#define BOOT_TARGET_DEVICES(func) \ >> + func(MMC, mmc, 0) \ >> + func(SCSI, scsi, 0) \ >> + func(USB, usb, 0) \ >> + func(PXE, pxe, na) \ >> + func(DHCP, dhcp, na) >> +#else >> +#define BOOT_TARGET_DEVICES(func) \ >> + func(MMC, mmc, 0) \ >> + func(USB, usb, 0) \ >> + func(PXE, pxe, na) \ >> + func(DHCP, dhcp, na) >> +#endif > > In the spirit of using crazy macros (!) :-) I might code that as: > > #ifdef CONFIG_AHCI > #define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0) > #else > #define BOOT_TARGET_DEVICES_SCSI(func) > #endif > > #define BOOT_TARGET_DEVICES(func) \ > func(MMC, mmc, 0) \ > BOOT_TARGET_DEVICES_SCSI(func) \ > func(USB, usb, 0) \ > func(PXE, pxe, na) \ > func(DHCP, dhcp, na) > > ... since it doesn't duplicate the rest of the main macro, but either way is fine by me. Ah, I like, esp. since in the future we may get boards without an USB host (tablets), and then things would get complicated but not with your trick. I've modified this patch my personal tree to use your approach. Regards, Hans