From patchwork Wed Jun 13 23:53:40 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Troy Kisky X-Patchwork-Id: 164772 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 07800B6FE0 for ; Thu, 14 Jun 2012 09:53:34 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1025E28133; Thu, 14 Jun 2012 01:53:30 +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 ZIZXPtHam00C; Thu, 14 Jun 2012 01:53:29 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5C07928126; Thu, 14 Jun 2012 01:53:28 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 33A8328126 for ; Thu, 14 Jun 2012 01:53:26 +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 JkVFq1I14KzS for ; Thu, 14 Jun 2012 01:53:25 +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-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by theia.denx.de (Postfix) with ESMTPS id 1974C28122 for ; Thu, 14 Jun 2012 01:53:23 +0200 (CEST) Received: by dacx6 with SMTP id x6so1572426dac.3 for ; Wed, 13 Jun 2012 16:53:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=/Y8IvrMCnm9Ak+mVzQb4aw7qdIEiNmdmMN70jq2xfVc=; b=Ren3Jfx7+et/KYzbc0MZ8Gjex/I0UknMUAH4R+X4IVatGJaDq+dwIPxQ3P4u2C+c84 tcCn4r+kALv+3zy7m6jbSFOKt3sGQBtwyENeWwDxLI5ivOTAL3Pxhi10miDuhO8mS+cK 8Z4Nd9YvUzwNBoCfUxwy/yqIVh6WdqeUNJl4R94fFguh2ATQ062Uvhnme0tV+59IJHkY CnBQ2KHVCGbjdgSmELRcEtSoxJVFnjLnNVI7MdvBEWYcgkGpH1NiTWlPiVPxLFamfTQa EFBxtgrBNqWQNlV806o0j4jnB86uu/DadZtzhWqDbWKsGxK/LSlSENB4mLoKK9dpbxnj 9UFw== Received: by 10.68.240.99 with SMTP id vz3mr1567808pbc.60.1339631601998; Wed, 13 Jun 2012 16:53:21 -0700 (PDT) Received: from officeserver-2 ([70.96.116.236]) by mx.google.com with ESMTPS id tm2sm7343617pbc.69.2012.06.13.16.53.20 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 13 Jun 2012 16:53:21 -0700 (PDT) Received: from tkisky by officeserver-2 with local (Exim 4.76) (envelope-from ) id 1SexNe-0000CN-F2; Wed, 13 Jun 2012 16:53:42 -0700 From: Troy Kisky To: sbabic@denx.de Date: Wed, 13 Jun 2012 16:53:40 -0700 Message-Id: <1339631620-730-2-git-send-email-troy.kisky@boundarydevices.com> X-Mailer: git-send-email 1.7.5.4 In-Reply-To: <1339631620-730-1-git-send-email-troy.kisky@boundarydevices.com> References: <1339631620-730-1-git-send-email-troy.kisky@boundarydevices.com> X-Gm-Message-State: ALoCoQmwmMYQPS/5bBfFkzvuBCiO5eCNjpnDjRlcpd/EmN0/B1jDuzo7qufCcgE5y8EnV4XJmsrZ Cc: 0001-imx-common-cmd_resetmode.c-add-imx-resetmode-command.patch@git.boundarydevices.com, u-boot@lists.denx.de Subject: [U-Boot] [RFC v2 3/3] mx53evk: add resetmode support 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 This allows a watchdog reset to start the ROM's usb/serial downloader, or boot from an sdcard. Signed-off-by: Troy Kisky Compile tested only, I don't have a mx53evk. --- board/freescale/mx53evk/mx53evk.c | 13 +++++++++++++ include/configs/mx53evk.h | 3 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff --git a/board/freescale/mx53evk/mx53evk.c b/board/freescale/mx53evk/mx53evk.c index 8a6e31d..48499d6 100644 --- a/board/freescale/mx53evk/mx53evk.c +++ b/board/freescale/mx53evk/mx53evk.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include #include @@ -367,11 +368,23 @@ int board_init(void) return 0; } +#ifdef CONFIG_CMD_RESETMODE +static const struct reset_mode board_reset_modes[] = { + /* 4 bit bus width */ + {"mmc0", MAKE_CFGVAL(0x40, 0x20, 0x00, 0x12)}, + {"mmc1", MAKE_CFGVAL(0x40, 0x20, 0x08, 0x12)}, + {NULL, 0}, +}; +#endif + int board_late_init(void) { setup_i2c(1); power_init(); +#ifdef CONFIG_CMD_RESETMODE + add_board_resetmodes(board_reset_modes); +#endif return 0; } diff --git a/include/configs/mx53evk.h b/include/configs/mx53evk.h index a77e5b2..7be469c 100644 --- a/include/configs/mx53evk.h +++ b/include/configs/mx53evk.h @@ -90,6 +90,9 @@ #define CONFIG_CMD_NET #define CONFIG_CMD_DATE +/* Miscellaneous commands */ +#define CONFIG_CMD_RESETMODE + /* allow to overwrite serial and ethaddr */ #define CONFIG_ENV_OVERWRITE #define CONFIG_CONS_INDEX 1