From patchwork Mon Jun 9 20:47:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ash Charles X-Patchwork-Id: 357621 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 36AF1140078 for ; Tue, 10 Jun 2014 06:48:18 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id CA2D84A01F; Mon, 9 Jun 2014 22:48:16 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gh75VI-P+wfn; Mon, 9 Jun 2014 22:48:16 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 0A2AA4A030; Mon, 9 Jun 2014 22:48:13 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D83544A01F for ; Mon, 9 Jun 2014 22:48:08 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id zoD-XUp2C6TT for ; Mon, 9 Jun 2014 22:48:05 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pd0-f172.google.com (mail-pd0-f172.google.com [209.85.192.172]) by theia.denx.de (Postfix) with ESMTPS id 9E6534A044 for ; Mon, 9 Jun 2014 22:47:56 +0200 (CEST) Received: by mail-pd0-f172.google.com with SMTP id fp1so5276526pdb.3 for ; Mon, 09 Jun 2014 13:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=gIhgVinVwi8G9VUxchfHTsBmroIZIuJXkeBawF5ELy4=; b=XDLQMe3tWEsdjqOORyf5gZAh5RLmChlfqTWc6YwkeD9c34PGKTz5mh9kl17DmAkGE6 i8iUwEvgSL19HS6DAyA6Y9R3YFpaNNUGhhReCX7zgrJULE4Y7UGqtq4TDhUHA7zMlWHc k/KJ4zZce+E5o0oE6YetwVa41yc9sKt5M4MQh1tdhDDZCoTJdDrH4QuypxYLPUemNYQn uA5Jm81Y7gXs0xCh9cK0S+hbj39+YjabVeqgkou7BjeNwzXoC+fZ3a653YBUNrG1vStO XGJqK/gVy/DD1Pg5rwz+xtqdSoxMCS3cZIagEXUfOZlp6pkCah6oDuBUQOcMalBBd7V4 JVlg== X-Received: by 10.69.31.202 with SMTP id ko10mr30037627pbd.23.1402346874720; Mon, 09 Jun 2014 13:47:54 -0700 (PDT) Received: from localhost.localdomain ([68.65.81.226]) by mx.google.com with ESMTPSA id xw2sm1769444pab.30.2014.06.09.13.47.53 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 09 Jun 2014 13:47:54 -0700 (PDT) From: Ash Charles To: u-boot@lists.denx.de Date: Mon, 9 Jun 2014 13:47:31 -0700 Message-Id: <1402346851-20350-1-git-send-email-ashcharles@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: References: Cc: trini@ti.com, Ash Charles Subject: [U-Boot] [Patch v2] omap3: overo: Select fdtfile for expansion board X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de The u-boot Overo board actually supports both Overo (OMAP35xx) and Overo Storm (AM/DM37xx) COMs with a range of different expansion boards. This provides a mechanism to select the an appropriate device tree file based on the processor version and, if available, the expansion board ID written on the expansion board EEPROM. To match the 3.15+ kernels, fdtfile names have this format: "omap3-overo[-storm]-.dtb" By default, we use "omap3-overo-storm-tobi.dtb". Signed-off-by: Ash Charles Conflicts: include/configs/omap3_overo.h --- board/overo/overo.c | 12 ++++++++++++ include/configs/omap3_overo.h | 10 +++++----- 2 files changed, 17 insertions(+), 5 deletions(-) diff --git a/board/overo/overo.c b/board/overo/overo.c index 62b50a8..02b606c 100644 --- a/board/overo/overo.c +++ b/board/overo/overo.c @@ -267,12 +267,14 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "dvi"); + setenv("expansionname", "summit"); break; case GUMSTIX_TOBI: printf("Recognized Tobi expansion board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "dvi"); + setenv("expansionname", "tobi"); break; case GUMSTIX_TOBI_DUO: printf("Recognized Tobi Duo expansion board (rev %d %s)\n", @@ -293,12 +295,14 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "lcd43"); + setenv("expansionname", "palo43"); break; case GUMSTIX_CHESTNUT43: printf("Recognized Chestnut43 expansion board (rev %d %s)\n", expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "lcd43"); + setenv("expansionname", "chestnut43"); break; case GUMSTIX_PINTO: printf("Recognized Pinto expansion board (rev %d %s)\n", @@ -310,6 +314,7 @@ int misc_init_r(void) expansion_config.revision, expansion_config.fab_revision); setenv("defaultdisplay", "lcd43"); + setenv("expansionname", "gallop43"); break; case GUMSTIX_ALTO35: printf("Recognized Alto35 expansion board (rev %d %s)\n", @@ -317,6 +322,7 @@ int misc_init_r(void) expansion_config.fab_revision); MUX_ALTO35(); setenv("defaultdisplay", "lcd35"); + setenv("expansionname", "alto35"); break; case GUMSTIX_STAGECOACH: printf("Recognized Stagecoach expansion board (rev %d %s)\n", @@ -352,6 +358,7 @@ int misc_init_r(void) break; default: printf("Unrecognized expansion board 0x%08x\n", expansion_id); + setenv("expansionname", "tobi"); break; } @@ -360,6 +367,11 @@ int misc_init_r(void) dieid_num_r(); + if (get_cpu_family() == CPU_OMAP34XX) + setenv(boardname, "overo") + else: + setenv(boardname, "overo-storm") + return 0; } diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index 1a13633..f7483a0 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -83,7 +83,6 @@ /* Environment information */ #define CONFIG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ - "fdtfile=overo.dtb\0" \ "bootdir=/boot\0" \ "bootfile=zImage\0" \ "usbtty=cdc_acm\0" \ @@ -152,10 +151,11 @@ "run mmcboot;" \ "fi;" \ "if run loadzimage; then " \ - "if test -n $fdtfile; then " \ - "if run loadfdt; then " \ - "run mmcbootfdt;" \ - "fi;" \ + "if test $fdtfile; then " \ + "setenv fdtfile omap3-${boardname}-${expansionname}.dtb;" \ + "fi;" \ + "if run loadfdt; then " \ + "run mmcbootfdt;" \ "fi;" \ "fi;" \ "fi;" \