From patchwork Wed Sep 17 03:51:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 390272 X-Patchwork-Delegate: sjg@chromium.org 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 9231E140119 for ; Wed, 17 Sep 2014 13:53:07 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 37C68A7425; Wed, 17 Sep 2014 05:53:02 +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 Rqc0ZJD2jAv6; Wed, 17 Sep 2014 05:53:01 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 29CDCA7436; Wed, 17 Sep 2014 05:52:19 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id EDBFFA7483 for ; Wed, 17 Sep 2014 05:52:11 +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 6GKz0mrAHgvI for ; Wed, 17 Sep 2014 05:52:08 +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-ob0-f202.google.com (mail-ob0-f202.google.com [209.85.214.202]) by theia.denx.de (Postfix) with ESMTPS id 5FFF9A746D for ; Wed, 17 Sep 2014 05:52:00 +0200 (CEST) Received: by mail-ob0-f202.google.com with SMTP id vb8so201909obc.3 for ; Tue, 16 Sep 2014 20:51:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=IcxinhLMWB54HWqm7mWLxH4Y0cIQwqX2YXr1+KIhKSE=; b=BDiDscfuK0pId5+gXE7lEWmnPJ0ngSm0jnIJFFE+ZjxrxO9NEpyILopuu1FhzEzugm BZTOg6/v0L4MLIK/kbe6JN8INY0uHQCGh+0KqG1smmhfyXpRnUr2HQqjMAT71OJYJfGX 3W/UXL257BsxPAXKwFXrU3jjTvzRzKtgPqAeR7gB5rxZsZMl6V1aoQmwFdm/1+jYYGvR YbmEVqhRLN6yBgxfha4y2McffVjssu3LMip8qdSsN6eycJlAeuNflv1N0xDaURK7U42V aHyFWSGhDb3tcBx08tTdjZ+w2b3z1LxEMWScBIAByUfm3L4C80Aw9LcS0uKZFARGseG+ UWqw== X-Gm-Message-State: ALoCoQnQGdlW9ar7sPiQ4ur9mjId+3I1njF6E/vk2UDVOjioclh8WG/IzXZHK4nRwQjFf0DJiO37 X-Received: by 10.182.18.8 with SMTP id s8mr21484190obd.21.1410925919081; Tue, 16 Sep 2014 20:51:59 -0700 (PDT) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id n24si791682yha.6.2014.09.16.20.51.58 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 20:51:59 -0700 (PDT) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id iwcTgCfN.1; Tue, 16 Sep 2014 20:51:58 -0700 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 32F582254C1; Tue, 16 Sep 2014 21:51:57 -0600 (MDT) From: Simon Glass To: U-Boot Mailing List Date: Tue, 16 Sep 2014 21:51:24 -0600 Message-Id: <1410925884-8767-12-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1410925884-8767-1-git-send-email-sjg@chromium.org> References: <1410925884-8767-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v2 11/11] dm: imx: Move cm_fx6 to use driver model for serial and GPIO 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 Now that serial and GPIO are available for iMX.6, move cm_fx6 over as an example. Signed-off-by: Simon Glass Acked-by: Igor Grinberg --- Changes in v2: - Use the correct namespace for the platform data board/compulab/cm_fx6/cm_fx6.c | 10 ++++++++++ include/configs/cm_fx6.h | 11 +++++++++++ 2 files changed, 21 insertions(+) diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c index 10e31b6..d79cd5f 100644 --- a/board/compulab/cm_fx6/cm_fx6.c +++ b/board/compulab/cm_fx6/cm_fx6.c @@ -9,11 +9,13 @@ */ #include +#include #include #include #include #include #include +#include #include #include #include @@ -509,3 +511,11 @@ u32 get_board_rev(void) return cl_eeprom_get_board_rev(); } +static struct mxc_serial_platdata cm_fx6_mxc_serial_plat = { + .reg = (struct mxc_uart *)UART4_BASE, +}; + +U_BOOT_DEVICE(cm_fx6_serial) = { + .name = "serial_mxc", + .platdata = &cm_fx6_mxc_serial_plat, +}; diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h index 10d02b4..1f55150 100644 --- a/include/configs/cm_fx6.h +++ b/include/configs/cm_fx6.h @@ -21,6 +21,17 @@ #define CONFIG_MACH_TYPE 4273 #define CONFIG_SYS_HZ 1000 +#ifndef CONFIG_SPL_BUILD +#define CONFIG_DM +#define CONFIG_CMD_DM + +#define CONFIG_DM_GPIO +#define CONFIG_CMD_GPIO + +#define CONFIG_DM_SERIAL +#define CONFIG_SYS_MALLOC_F_LEN (1 << 10) +#endif + /* Display information on boot */ #define CONFIG_DISPLAY_CPUINFO #define CONFIG_DISPLAY_BOARDINFO