From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9A49BC4338F for ; Sat, 7 Aug 2021 13:26:07 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D274660C41 for ; Sat, 7 Aug 2021 13:26:06 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org D274660C41 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 553B883208; Sat, 7 Aug 2021 15:25:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="UXJ53tqD"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id E154C82C4D; Sat, 7 Aug 2021 15:24:42 +0200 (CEST) Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) (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 52230831C2 for ; Sat, 7 Aug 2021 15:24:29 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@chromium.org Received: by mail-ot1-x336.google.com with SMTP id x15-20020a05683000cfb02904d1f8b9db81so12279692oto.12 for ; Sat, 07 Aug 2021 06:24:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1mqsokk+rCKgBeTCEFKqJz/ZiL9YKiAWwJGFQ+/PIhQ=; b=UXJ53tqD+5KteIL6SJYTFBFTGvwnvvtDxs2OiVWO6xClh6+2ZY/4CIrcRW8nv3xlq8 D26NUOFmCPIvIMtd0LWCC+JNMuzc+kW5ZM6a7GwGDRJSUh1JOUKD1LjjXAX21UEtFxtj v1IPROe88p86QxbPucJTGWm475mV8jTGuYO0w= 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=1mqsokk+rCKgBeTCEFKqJz/ZiL9YKiAWwJGFQ+/PIhQ=; b=nyhhtX2L9DCqdYjqi9VOdXs0t8uWm2wcdsMJxPL8++B9uSbIrVZWALwlRNJObGQnLg my5K8GjYGvifl27gbXdMrLHUHe4R8PpkygMhshQw+xK7Mg4Ul3oaweXKIX4BO0iChUH+ 5E8P9PNTfdToT9Fh9Q7iUrUvqEWpD6NvvN5ZynKRKjOQ6rG81FArMSUuQBggle6YjzWX vduDVm8aO7haoXo+4fiq6bHUgetX4QvV7cAcLc2Vvgnprpe3VBVA8h5Jv18n2EwBzCzl 1qBZRISkMWtbQbu/6NT1X0s6THVYrI875WVng0Kzkl5fUFFnT7CGFh+CvM6s9LNM/0mj CdGA== X-Gm-Message-State: AOAM531PPsGb6VSyocJ+gxXXCkdpfDWEaEtPCv83cYjitjNO6wdAUuFT 2Ghcl8/D8xyVCDX6MD4FIBG+tziB0fk47rev X-Google-Smtp-Source: ABdhPJycfFy0FmGn8VqYS9ePTTAIGdlnfBhtFssXK/nKYc8fYYb3IqwMvQlUySIJ95RIuMhxQicF7A== X-Received: by 2002:a05:6830:4108:: with SMTP id w8mr11205658ott.216.1628342667705; Sat, 07 Aug 2021 06:24:27 -0700 (PDT) Received: from kiwi.bld.corp.google.com (c-67-190-101-114.hsd1.co.comcast.net. [67.190.101.114]) by smtp.gmail.com with ESMTPSA id x16sm1866417ooj.1.2021.08.07.06.24.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 07 Aug 2021 06:24:27 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Cc: Tom Rini , Simon Glass , Marek Vasut , Pavel Herrmann Subject: [PATCH 10/12] dm: doc: Add a note about of-platdata header files Date: Sat, 7 Aug 2021 07:24:10 -0600 Message-Id: <20210807132413.3513724-11-sjg@chromium.org> X-Mailer: git-send-email 2.32.0.605.g8dce9f2422-goog In-Reply-To: <20210807132413.3513724-1-sjg@chromium.org> References: <20210807132413.3513724-1-sjg@chromium.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean This error can be confusing so mention it specifically in the documentation. Signed-off-by: Simon Glass --- doc/develop/driver-model/of-plat.rst | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/doc/develop/driver-model/of-plat.rst b/doc/develop/driver-model/of-plat.rst index 61aa2bc3ed9..921178cd4aa 100644 --- a/doc/develop/driver-model/of-plat.rst +++ b/doc/develop/driver-model/of-plat.rst @@ -634,7 +634,7 @@ then dtoc looks at the first compatible string ("rockchip,rk3188-grf"), converts that to a C identifier (rockchip_rk3188_grf) and then looks for that. Various things can cause dtoc to fail to find the driver and it tries to -warn about these. For example: +warn about these. For example:: rockchip_rk3188_uart: Missing .compatible in drivers/serial/serial_rockchip.c : WARNING: the driver rockchip_rk3188_uart was not found in the driver list @@ -649,6 +649,30 @@ Checks are also made to confirm that the referenced driver has a .compatible member and a .id member. The first provides the array of compatible strings and the second provides the uclass ID. +Another error that can crop up is something like:: + + spl/dts/dt-device.c:257:38: error: invalid application of ‘sizeof’ to + incomplete type ‘struct sandbox_irq_priv’ + 257 | u8 _sandbox_irq_priv_irq_sbox[sizeof(struct sandbox_irq_priv)] + | ^~~~~~ + +This indicates that `struct sandbox_irq_priv` is not defined anywhere. The +solution is to add a DM_HEADER() line, as below, so this is included in the +dt-device.c file:: + + U_BOOT_DRIVER(sandbox_irq) = { + .name = "sandbox_irq", + .id = UCLASS_IRQ, + .of_match = sandbox_irq_ids, + .ops = &sandbox_irq_ops, + .priv_auto = sizeof(struct sandbox_irq_priv), + DM_HEADER() + }; + +Note that there is no dependency checking on the above, so U-Boot will not +regenerate the dt-device.c file when you update the source file (here, +`irq_sandbox.c`). You need to run `make mrproper` first to get a fresh build. + Caveats ------- -- 2.32.0.605.g8dce9f2422-goog