From patchwork Tue Apr 21 13:36:08 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 47397 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f198.google.com (mail-wi0-f198.google.com [209.85.212.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id BD6D620553 for ; Tue, 21 Apr 2015 13:36:24 +0000 (UTC) Received: by wicmx19 with SMTP id mx19sf4630511wic.3 for ; Tue, 21 Apr 2015 06:36:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:cc:subject :precedence:list-id:list-unsubscribe:list-archive:list-post :list-help:list-subscribe:mime-version:content-type :content-transfer-encoding:errors-to:sender:x-original-sender :x-original-authentication-results:mailing-list; bh=ALbkx9WM/V5SWtGscZP5+6UZR/hahDX6YS+LlnC44Aw=; b=U07NzaPnVj9DIYs6M1erlmOVpQVcCH1fHRFRHANT66V1z2lSldYlph2UnoWC6Pm1St CN9AQMRZ44nOegPsXGq4jNdeSFTC5Xv4LQoawCRWl1SpJ9od6xudyqfJg760WRp/Pb4X XYMbyqQnua6SJrFj/1mO3yBGw4yQVTQvvooCaj3KFlCpJw8u813Jok/qFDmSind8yIkJ AAHuorxO/2FUEP18CVOKQ6TKvu78HnVtbvzV+X/Iv7SSTsoYXQrZTjdGLhvTwZloESuT wTZLvmVT25bVDsiMUmkw/V+Z+Aipd9X9FyOW/wE9+XNiMKnveqCo6srZ+VwM1wUvjGKG AAxw== X-Gm-Message-State: ALoCoQljWLMPwihDwUndEHPNk9KJzTLd41WMyrT13upn4usL758Eh/RTjVbSjLoBNdAzCoTPGj8l X-Received: by 10.112.138.2 with SMTP id qm2mr9211276lbb.19.1429623384049; Tue, 21 Apr 2015 06:36:24 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.153.6.35 with SMTP id cr3ls40223lad.47.gmail; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) X-Received: by 10.112.198.225 with SMTP id jf1mr19722219lbc.91.1429623383806; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) Received: from mail-lb0-f172.google.com (mail-lb0-f172.google.com. [209.85.217.172]) by mx.google.com with ESMTPS id o10si1361411laj.121.2015.04.21.06.36.23 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2015 06:36:23 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) client-ip=209.85.217.172; Received: by lbbuc2 with SMTP id uc2so155761199lbb.2 for ; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) X-Received: by 10.112.199.133 with SMTP id jk5mr20719277lbc.32.1429623383699; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.67.65 with SMTP id l1csp639751lbt; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) X-Received: by 10.194.171.36 with SMTP id ar4mr40165081wjc.7.1429623383115; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) Received: from theia.denx.de (theia.denx.de. [85.214.87.163]) by mx.google.com with ESMTP id et2si3705391wib.90.2015.04.21.06.36.22; Tue, 21 Apr 2015 06:36:23 -0700 (PDT) Received-SPF: none (google.com: u-boot-bounces@lists.denx.de does not designate permitted sender hosts) client-ip=85.214.87.163; Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1B809B37CA; Tue, 21 Apr 2015 15:36:22 +0200 (CEST) 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 CabyVYpiKlOs; Tue, 21 Apr 2015 15:36:21 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9EDCBB37C1; Tue, 21 Apr 2015 15:36:21 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A0607B37C1 for ; Tue, 21 Apr 2015 15:36:18 +0200 (CEST) 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 5Y-9_SPUwQt8 for ; Tue, 21 Apr 2015 15:36:18 +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-la0-f46.google.com (mail-la0-f46.google.com [209.85.215.46]) by theia.denx.de (Postfix) with ESMTPS id 613DEB37B7 for ; Tue, 21 Apr 2015 15:36:14 +0200 (CEST) Received: by labbd9 with SMTP id bd9so151360880lab.2 for ; Tue, 21 Apr 2015 06:36:14 -0700 (PDT) X-Received: by 10.152.88.99 with SMTP id bf3mr19736815lab.97.1429623374214; Tue, 21 Apr 2015 06:36:14 -0700 (PDT) Received: from localhost.localdomain ([85.235.11.236]) by mx.google.com with ESMTPSA id lh8sm401989lab.30.2015.04.21.06.36.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Apr 2015 06:36:13 -0700 (PDT) From: Linus Walleij To: u-boot@lists.denx.de, Albert Aribaud , Tom Rini , Simon Glass Date: Tue, 21 Apr 2015 15:36:08 +0200 Message-Id: <1429623368-32659-1-git-send-email-linus.walleij@linaro.org> X-Mailer: git-send-email 1.9.3 Cc: Steve Rae , u-boot-review@google.com Subject: [U-Boot] [PATCH 2/2] integrator: switch to DM serial port X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: linus.walleij@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.172 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This switches the Integrator boards over to using the device model for its serial ports. Cc: Masahiro Yamada Signed-off-by: Linus Walleij --- board/armltd/integrator/integrator.c | 18 ++++++++++++++++++ include/configs/integrator-common.h | 8 ++++++++ include/configs/integratorap.h | 11 ----------- include/configs/integratorcp.h | 9 --------- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/board/armltd/integrator/integrator.c b/board/armltd/integrator/integrator.c index e94ac850c751..cbe706170d0f 100644 --- a/board/armltd/integrator/integrator.c +++ b/board/armltd/integrator/integrator.c @@ -20,11 +20,29 @@ #include #include #include +#include +#include #include "arm-ebi.h" #include "integrator-sc.h" DECLARE_GLOBAL_DATA_PTR; +static const struct pl01x_serial_platdata serial_platdata = { + .base = 0x16000000, +#ifdef CONFIG_ARCH_CINTEGRATOR + .type = TYPE_PL011, + .clock = 14745600, +#else + .type = TYPE_PL010, + .clock = 0, /* Not used for PL010 */ +#endif +}; + +U_BOOT_DEVICE(integrator_serials) = { + .name = "serial_pl01x", + .platdata = &serial_platdata, +}; + void peripheral_power_enable (void); #if defined(CONFIG_SHOW_BOOT_PROGRESS) diff --git a/include/configs/integrator-common.h b/include/configs/integrator-common.h index 4362925ae1e1..13ee580c91bd 100644 --- a/include/configs/integrator-common.h +++ b/include/configs/integrator-common.h @@ -21,6 +21,14 @@ #define CONFIG_SYS_MAXARGS 16 /* max number of command args */ #define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size*/ #define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + 128*1024) /* Size of malloc() pool */ +#define CONFIG_SYS_MALLOC_F_LEN 0x2000 + +/* Serial port PL010/PL011 through the device model */ +#define CONFIG_DM +#define CONFIG_DM_SERIAL +#define CONFIG_PL01X_SERIAL +#define CONFIG_BAUDRATE 38400 +#define CONFIG_CONS_INDEX 0 #define CONFIG_CMDLINE_TAG /* enable passing of ATAGs */ #define CONFIG_SETUP_MEMORY_TAGS diff --git a/include/configs/integratorap.h b/include/configs/integratorap.h index e168c8c9ba57..567fd361bd69 100644 --- a/include/configs/integratorap.h +++ b/include/configs/integratorap.h @@ -22,17 +22,6 @@ #define CONFIG_SYS_HZ_CLOCK 24000000 /* Timer 1 is clocked at 24Mhz */ /* - * PL010 Configuration - */ -#define CONFIG_PL010_SERIAL -#define CONFIG_CONS_INDEX 0 -#define CONFIG_BAUDRATE 38400 -#define CONFIG_PL01x_PORTS { (void *) (CONFIG_SYS_SERIAL0), (void *) (CONFIG_SYS_SERIAL1) } -#define CONFIG_SYS_SERIAL0 0x16000000 -#define CONFIG_SYS_SERIAL1 0x17000000 - - -/* * BOOTP options */ #define CONFIG_BOOTP_BOOTFILESIZE diff --git a/include/configs/integratorcp.h b/include/configs/integratorcp.h index 7c1ef2483ea2..7727b4e08eef 100644 --- a/include/configs/integratorcp.h +++ b/include/configs/integratorcp.h @@ -29,15 +29,6 @@ #define CONFIG_SMC91111_BASE 0xC8000000 #undef CONFIG_SMC91111_EXT_PHY -/* PL011 configuration */ -#define CONFIG_PL011_SERIAL -#define CONFIG_PL011_CLOCK 14745600 -#define CONFIG_PL01x_PORTS { (void *)CONFIG_SYS_SERIAL0, (void *)CONFIG_SYS_SERIAL1 } -#define CONFIG_CONS_INDEX 0 -#define CONFIG_BAUDRATE 38400 -#define CONFIG_SYS_SERIAL0 0x16000000 -#define CONFIG_SYS_SERIAL1 0x17000000 - /* * Command line configuration. */