From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Warren Date: Thu, 13 Sep 2012 16:47:30 -0600 Subject: [U-Boot] [PATCH 9/9] Tegra30: Enable Cardhu build (SPL) In-Reply-To: <1347487855-27077-10-git-send-email-twarren@nvidia.com> References: <1347487855-27077-1-git-send-email-twarren@nvidia.com> <1347487855-27077-10-git-send-email-twarren@nvidia.com> Message-ID: <50526282.8050603@wwwdotorg.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/12/2012 04:10 PM, Tom Warren wrote: > This builds & boots to the command prompt on a Cardhu (T30) board. > This is a barebones binary - no I2C, USB, MMC, SPI, etc. > Drivers for those peripherals to follow. > diff --git a/Makefile b/Makefile > ifeq ($(SOC),tegra20) > LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o > endif > +ifeq ($(SOC),tegra30) > +LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o > +endif To avoid adding more and more copies of that assignment, how about: ifneq ($(filter $(SOC),tegra20 tegra30),) LIBS-y += arch/$(ARCH)/cpu/$(SOC)-common/lib$(SOC)-common.o endif The same trick can be applied to the other two changes in this file, and spl/Makefile. Or perhaps you can just use: ifneq ($(CONFIG_TEGRA),) > diff --git a/drivers/gpio/tegra_gpio.c b/drivers/gpio/tegra_gpio.c > +#if defined(CONFIG_TEGRA20) > #include > +#else /* Tegra30 */ > +#include > +#endif If that file got renamed to tegra.h in both places, you wouldn't need ifdefs around the include.