Message ID | 20200914153503.91983-4-seanga2@gmail.com |
---|---|
State | Superseded |
Delegated to: | Jagannadha Sutradharudu Teki |
Headers | show
Return-Path: <u-boot-bounces@lists.denx.de> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=85.214.62.61; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=<UNKNOWN>) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=V3GBCDMS; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4Bqr6h5rVCz9sPB for <incoming@patchwork.ozlabs.org>; Tue, 15 Sep 2020 01:35:56 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1DA6282319; Mon, 14 Sep 2020 17:35:30 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="V3GBCDMS"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 0D81382304; Mon, 14 Sep 2020 17:35:27 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-qk1-x741.google.com (mail-qk1-x741.google.com [IPv6:2607:f8b0:4864:20::741]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A39B981BEB for <u-boot@lists.denx.de>; Mon, 14 Sep 2020 17:35:23 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x741.google.com with SMTP id v123so477631qkd.9 for <u-boot@lists.denx.de>; Mon, 14 Sep 2020 08:35:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RpkKDiIq43Z/RYP0BW0M0xcyf3U0RiI7LUDymxePpjk=; b=V3GBCDMSwvwg5tnvFp2Cs0wHWREoojzrBUO9/lr9PSkOYKi47rovN3Pq9S2tY8Z7Yu 8w7VOttXC80PISnqrDiPa55CO9t+Uz/NEFwDXRkSMu5YxRyAb7XJ6FPdShmXVp5it4qt vm8GGMiPtmmvzwXeGo+7FyUcJSZ/R/0ktygJokuk+d9BnblQftKd8E/3rgjbnGRDjj6u 9eXirZYY3ENjupLiz3BfmpGHVzSU6uo2BQykLf6mkGan33WWFtCaC1xqsqY14qWL/7aB xtreUwoUaV9FUST6NWsI2XQpFUcnu4+MOeiVIKgPaDRCGe6J4W/OyN4pDeoDd1bWT3o5 +4kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=RpkKDiIq43Z/RYP0BW0M0xcyf3U0RiI7LUDymxePpjk=; b=ijCzqjFdFG2NY2aI9qWKfld4fKnd6iCRNysNmcp2vjae6134aNj/Im9UT+WUIdHKpd HV/BuuJTpvO3B6oDmu1GJ/Y0sF9uxmQnH35E4k+JGIbyqzKFmOQe9apT5CdhT/empSmg +qJNS5FpyzOJjrPqUZ9QBQr8GYaQwKOpQXXyB1rZOhd8oLel1ETFnw+HOU2+HO8kcRpU 5E6nywuB3RoXQLimMv5EWysW+WP6PQIvWnmhZ1tgisJ65sC7zsCRQuZIdnXgP7AecB39 4EPXccGcwzOcMCsiUhvXE1WOTdGexYpTAPg1xgt50HIIIf/1662NTB5eSaN4uWzZ8JL4 7z/w== X-Gm-Message-State: AOAM533eb0LQhxXOe6eFFwKDFqlhOZtTijz3gKpLws1DIHHXXav4dtqa 0BLTHQ54IyPUgwxn9DiFb3i043dWn+HuVB2V X-Google-Smtp-Source: ABdhPJyBenIi8pam4vBC6uoFEXXHELFYx6ZHJmJnAKtPIa5dBmTkK4SqtxIhveDeFqegpHB5dJmQ6Q== X-Received: by 2002:a37:97c6:: with SMTP id z189mr13488512qkd.74.1600097722502; Mon, 14 Sep 2020 08:35:22 -0700 (PDT) Received: from godwin.fios-router.home (pool-108-51-35-162.washdc.fios.verizon.net. [108.51.35.162]) by smtp.gmail.com with ESMTPSA id b34sm15246955qtc.73.2020.09.14.08.35.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Sep 2020 08:35:21 -0700 (PDT) From: Sean Anderson <seanga2@gmail.com> To: u-boot@lists.denx.de, uboot-snps-arc@synopsys.com Cc: Marek Vasut <marex@denx.de>, Horatiu Vultur <horatiu.vultur@microchip.com>, Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>, Jagan Teki <jagan@amarulasolutions.com>, Heinrich Schuchardt <xypron.glpk@gmx.de>, Sean Anderson <seanga2@gmail.com> Subject: [PATCH v3 03/10] spi: dw: Use generic function to read reg address Date: Mon, 14 Sep 2020 11:34:56 -0400 Message-Id: <20200914153503.91983-4-seanga2@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200914153503.91983-1-seanga2@gmail.com> References: <20200914153503.91983-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion <u-boot.lists.denx.de> List-Unsubscribe: <https://lists.denx.de/options/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=unsubscribe> List-Archive: <https://lists.denx.de/pipermail/u-boot/> List-Post: <mailto:u-boot@lists.denx.de> List-Help: <mailto:u-boot-request@lists.denx.de?subject=help> List-Subscribe: <https://lists.denx.de/listinfo/u-boot>, <mailto:u-boot-request@lists.denx.de?subject=subscribe> Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" <u-boot-bounces@lists.denx.de> X-Virus-Scanned: clamav-milter 0.102.3 at phobos.denx.de X-Virus-Status: Clean |
Series |
riscv: Add SPI support for Kendryte K210
|
expand
|
diff --git a/drivers/spi/designware_spi.c b/drivers/spi/designware_spi.c index ce4b6c4dc2..a25f846f9a 100644 --- a/drivers/spi/designware_spi.c +++ b/drivers/spi/designware_spi.c @@ -156,6 +156,8 @@ static int dw_spi_ofdata_to_platdata(struct udevice *bus) struct dw_spi_platdata *plat = bus->platdata; plat->regs = dev_read_addr_ptr(bus); + if (!plat->regs) + return -EINVAL; /* Use 500KHz as a suitable default */ plat->frequency = dev_read_u32_default(bus, "spi-max-frequency",
Using an fdt-specific function causes problems when compiled with a live tree. Signed-off-by: Sean Anderson <seanga2@gmail.com> Tested-by Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> --- This patch was previously part of https://patchwork.ozlabs.org/project/uboot/list/?series=161576 (no changes since v1) drivers/spi/designware_spi.c | 2 ++ 1 file changed, 2 insertions(+)