From patchwork Thu Jan 25 11:05:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Graf X-Patchwork-Id: 125813 Delivered-To: patch@linaro.org Received: by 10.46.66.141 with SMTP id h13csp1039811ljf; Thu, 25 Jan 2018 03:16:41 -0800 (PST) X-Google-Smtp-Source: AH8x226MeQHuiD8vRE5qcfcyIJvLq9OpYQtcrNxGW6wQrh06b/qJlhQQC4dyOGzPFbQxeJ8gCOMC X-Received: by 10.80.153.143 with SMTP id m15mr28893483edb.145.1516879001697; Thu, 25 Jan 2018 03:16:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516879001; cv=none; d=google.com; s=arc-20160816; b=NohBgK1oP0FB/ylNonvUTbRFK4bRPH9/Ad/BQ6AtK/MEOZsm2034HpuTtzNKRIN17Y GOZ9hrXnIW+yVbgQYYGpQBN0qreyYALGWutxEfD/lAOQiB4TzUl08nBJNErb9ECji9J5 xy+7MbSmbXsbhJxxSTO1dgAzOYrvwaGr/bHPyWdTlEvIfV8jDnZQRE3Tbp78gvPZhK3V k8LegfZ6uOSlhSNE4Wufsh8dXyPYaAm0NTiF3hGMH2Ez3mjwDFo7+9fEyu6jvZw4oHZX rvbtWaGcatYhn/0TBG2Mknu/DOJYPLBWvCn7ypxoHgfiE4CxIp7PxSEjoqhWCkEj9Tv7 plEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:cc:references:in-reply-to:message-id :date:to:from:arc-authentication-results; bh=rwiZdajnWyseXrRYm44oMLicafLdc7nvlBTXddS14p4=; b=zdR/FAd8kl+Mow6wiPMuJTjTclRCCXYpGEqN1CLbojYWaovz75/DP4ksxELb9WHMhw WtwO0Pwi9J2HddDM0UuL1V1iDGtYMEYxuqNYpyydaAxsqOIctU8yzOFQvFXqd9us/nKD I2JcgpPdtjIw7fafN5KaGsrgDq4SaObqghq/drOHwt+epUQrOn2vgTegRT1iDmd2TRqw 31un3IBXnclo8TMED3iUVxgL7NhFzLrq5Jhd2W64ElomC7menVJlP3IKuIe/g3EkhKZw Q2vMc1A3LSdrJ4arjQ9oKHiDStXDrlV5fUldLKVod1t15MPPqYbVuThWzCD4F6WlPJ4t rDGw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Return-Path: Received: from lists.denx.de (dione.denx.de. [81.169.180.215]) by mx.google.com with ESMTP id y14si1261210edc.119.2018.01.25.03.16.41; Thu, 25 Jan 2018 03:16:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) client-ip=81.169.180.215; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of u-boot-bounces@lists.denx.de designates 81.169.180.215 as permitted sender) smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by lists.denx.de (Postfix, from userid 105) id 1A3BFC2244A; Thu, 25 Jan 2018 11:13:45 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 7E91AC223DB; Thu, 25 Jan 2018 11:12:07 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 9C87DC22417; Thu, 25 Jan 2018 11:05:58 +0000 (UTC) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by lists.denx.de (Postfix) with ESMTPS id C05AFC22405 for ; Thu, 25 Jan 2018 11:05:57 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 62384AC43; Thu, 25 Jan 2018 11:05:57 +0000 (UTC) From: Alexander Graf To: u-boot@lists.denx.de Date: Thu, 25 Jan 2018 12:05:43 +0100 Message-Id: <20180125110556.76352-3-agraf@suse.de> X-Mailer: git-send-email 2.12.3 In-Reply-To: <20180125110556.76352-1-agraf@suse.de> References: <20180125110556.76352-1-agraf@suse.de> Cc: Tom Rini Subject: [U-Boot] [PATCH v3 02/15] rpi: Remove runtime disabling support for serial X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion 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" We are switching to a model where our board file can directly fail probing of serial devices when they're not usable, so remove the current runtime hack we have. Signed-off-by: Alexander Graf --- board/raspberrypi/rpi/rpi.c | 43 ------------------------------------------- 1 file changed, 43 deletions(-) diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c index c8924d4362..177f4af265 100644 --- a/board/raspberrypi/rpi/rpi.c +++ b/board/raspberrypi/rpi/rpi.c @@ -420,54 +420,11 @@ static void get_board_rev(void) printf("RPI %s (0x%x)\n", model->name, revision); } -#ifndef CONFIG_PL01X_SERIAL -static bool rpi_is_serial_active(void) -{ - int serial_gpio = 15; - struct udevice *dev; - - /* - * The RPi3 disables the mini uart by default. The easiest way to find - * out whether it is available is to check if the RX pin is muxed. - */ - - if (uclass_first_device(UCLASS_PINCTRL, &dev) || !dev) - return true; - - if (pinctrl_get_gpio_mux(dev, 0, serial_gpio) != BCM2835_GPIO_ALT5) - return false; - - return true; -} - -/* Disable mini-UART I/O if it's not pinmuxed to our pins. - * The firmware only enables it if explicitly done in config.txt: enable_uart=1 - */ -static void rpi_disable_inactive_uart(void) -{ - struct udevice *dev; - struct bcm283x_mu_serial_platdata *plat; - - if (uclass_get_device_by_driver(UCLASS_SERIAL, - DM_GET_DRIVER(serial_bcm283x_mu), - &dev) || !dev) - return; - - if (!rpi_is_serial_active()) { - plat = dev_get_platdata(dev); - plat->disabled = true; - } -} -#endif - int board_init(void) { #ifdef CONFIG_HW_WATCHDOG hw_watchdog_init(); #endif -#ifndef CONFIG_PL01X_SERIAL - rpi_disable_inactive_uart(); -#endif get_board_rev();