From patchwork Tue Nov 25 04:36:34 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 414223 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 9FE5F14012A for ; Tue, 25 Nov 2014 15:37:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 679764B67D; Tue, 25 Nov 2014 05:37:04 +0100 (CET) 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 j3+Zx7Pbpz-S; Tue, 25 Nov 2014 05:37:04 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 5A07F4B622; Tue, 25 Nov 2014 05:37:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B3D1F4B660 for ; Tue, 25 Nov 2014 05:36:58 +0100 (CET) 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 q6QQqpR7O0Ix for ; Tue, 25 Nov 2014 05:36:58 +0100 (CET) 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-ig0-f202.google.com (mail-ig0-f202.google.com [209.85.213.202]) by theia.denx.de (Postfix) with ESMTPS id 5B1704B622 for ; Tue, 25 Nov 2014 05:36:55 +0100 (CET) Received: by mail-ig0-f202.google.com with SMTP id hn18so8267igb.5 for ; Mon, 24 Nov 2014 20:36:54 -0800 (PST) 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=79jTIsWiraUdNHxT+du0v2JgVvYzhIGqz6j+6lcSza0=; b=aORnfveMltcnCRQmwHvbmtmSBjPZwjYnN0H4AjdawnEuCx1cz8YNvXavNhdlhMrUpx 46yFIG/pjQat12+dLFKYSKnoPkShTbmfmGBuhIIEpt/lgUNrnBaDUePU4gfmfTP0iRbw omo8vWmsKCdMEZBkzHrXoruUQasGdI2Tv/d0lhiilcSmk3EtFl8I4p6kHc0ib1OMtuYO n41bKxPKCu1T05k1NXimIfPmmxME1SxTWVrxOVadotnns7B+J4vFNhtV8h2Llwwgj0OR ntjwvQkMF1AmdTUboEy4yGqq9TdWMwbP9EL+PExfUworbvqlKOPMJPN0YQI9WrNIBl6g iGpw== X-Gm-Message-State: ALoCoQmpK7crdIT3iK2Wbk8OYjw6k8d8M5N8euw3FEo2VQdTBC3Ktm5wFbu68HlRahoY04+ji2dm X-Received: by 10.182.81.74 with SMTP id y10mr24107855obx.22.1416890214252; Mon, 24 Nov 2014 20:36:54 -0800 (PST) Received: from corpmail-nozzle1-2.hot.corp.google.com ([100.108.1.103]) by gmr-mx.google.com with ESMTPS id e24si4894yhe.3.2014.11.24.20.36.53 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Nov 2014 20:36:54 -0800 (PST) Received: from kaki.bld.corp.google.com ([172.29.216.32]) by corpmail-nozzle1-2.hot.corp.google.com with ESMTP id BPWAjZGk.1; Mon, 24 Nov 2014 20:36:54 -0800 Received: by kaki.bld.corp.google.com (Postfix, from userid 121222) id 837AA220C4C; Mon, 24 Nov 2014 21:36:53 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Mon, 24 Nov 2014 21:36:34 -0700 Message-Id: <1416890195-20001-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 2.1.0.rc2.206.gedb03e5 In-Reply-To: <1416890195-20001-1-git-send-email-sjg@chromium.org> References: <1416890195-20001-1-git-send-email-sjg@chromium.org> Subject: [U-Boot] [PATCH v3 1/2] dm: rpi: Move serial to driver model X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.13 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 Adjust the configuration to use the driver model version of the pl01x serial driver. Add the required platform data. Signed-off-by: Simon Glass Tested-by: Stephen Warren --- Changes in v3: None Changes in v2: - Adjust header file include to dm/platform_data/... board/raspberrypi/rpi/rpi.c | 12 ++++++++++++ include/configs/rpi.h | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index aaded88..5ebafd7 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -24,6 +24,7 @@ #include #include #include +#include DECLARE_GLOBAL_DATA_PTR; @@ -36,6 +37,17 @@ U_BOOT_DEVICE(bcm2835_gpios) = { .platdata = &gpio_platdata, }; +static const struct pl01x_serial_platdata serial_platdata = { + .base = 0x20201000, + .type = TYPE_PL011, + .clock = 3000000, +}; + +U_BOOT_DEVICE(bcm2835_serials) = { + .name = "serial_pl01x", + .platdata = &serial_platdata, +}; + struct msg_get_arm_mem { struct bcm2835_mbox_hdr hdr; struct bcm2835_mbox_tag_get_arm_mem get_arm_mem; diff --git a/include/configs/rpi.h b/include/configs/rpi.h index 4d5426e..c94f411 100644 --- a/include/configs/rpi.h +++ b/include/configs/rpi.h @@ -34,6 +34,7 @@ #define CONFIG_DM #define CONFIG_CMD_DM #define CONFIG_DM_GPIO +#define CONFIG_DM_SERIAL /* Memory layout */ #define CONFIG_NR_DRAM_BANKS 1 @@ -51,6 +52,7 @@ CONFIG_SYS_SDRAM_SIZE - \ GENERATED_GBL_DATA_SIZE) #define CONFIG_SYS_MALLOC_LEN SZ_4M +#define CONFIG_SYS_MALLOC_F_LEN (1 << 10) #define CONFIG_SYS_MEMTEST_START 0x00100000 #define CONFIG_SYS_MEMTEST_END 0x00200000 #define CONFIG_LOADADDR 0x00200000 @@ -92,9 +94,7 @@ #endif /* Console UART */ -#define CONFIG_PL011_SERIAL -#define CONFIG_PL011_CLOCK 3000000 -#define CONFIG_PL01x_PORTS { (void *)0x20201000 } +#define CONFIG_PL01X_SERIAL #define CONFIG_CONS_INDEX 0 #define CONFIG_BAUDRATE 115200