From patchwork Sat Dec 7 04:42:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1205404 X-Patchwork-Delegate: bmeng.cn@gmail.com Return-Path: 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=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="f8BbMY1o"; dkim-atps=neutral Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (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 47VHL76tH0z9sPL for ; Sat, 7 Dec 2019 15:59:11 +1100 (AEDT) Received: from phobos.denx.de (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BDF9081791; Sat, 7 Dec 2019 05:51:26 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=fail (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=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="f8BbMY1o"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id CBCC28179D; Sat, 7 Dec 2019 05:51:21 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.1 required=5.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_HELO_NONE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.2 Received: from mail-il1-x144.google.com (mail-il1-x144.google.com [IPv6:2607:f8b0:4864:20::144]) (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 A1E0A81791 for ; Sat, 7 Dec 2019 05:51:18 +0100 (CET) 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-il1-x144.google.com with SMTP id b15so8152025iln.3 for ; Fri, 06 Dec 2019 20:51:18 -0800 (PST) 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=WJcbJ7usitLYUJHZuLjY30Z6gLmsb9o4JH/u3BFpzHg=; b=f8BbMY1oFz7sff1OSm5UqCl2w4hnIHL17rubEu7YrLAYxnnjgfYaI3V3UI/+JrWFyP hJf5t2GpLYg8bxTNbekz3j2XMYT/l5o0ir2WbzpzatlHH0UgcIMiCvToLzrTaO0KuC6C YYsAQVQLEwKCL4Z2BhEk/RvE/OK8dBR1yyLqE= 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=WJcbJ7usitLYUJHZuLjY30Z6gLmsb9o4JH/u3BFpzHg=; b=thbuYbPet1vg9bXRV3cTTZr3x9+o8+BW/N0LVHbl0VOnrlYC+a/Xx0cofp4tnR5djT Nuowtaswup64HQi9W+0QTvqHUNF4/Zz5EsYgnMA9NZSPxdxur/jx9l5gvjDFG8wWuGO6 1xAorXE9wvuC+FTIzV92vhCgNi2tw3ldqevJFO5iCLI26VvHwvUJxkVa9xjawkDIHU0T 85MqNbK9TR726WiPgUidzOCdhSpB5gi1LXx8pe33ZW9EOJwAYHLM4DtcRzuXd6cjYLx9 ucbMdivvpgw+v2cOD/+goRjFs3WcX3rMY2JdplrMLRGylLm+Zs5tly+rLIwf7sRiIaDt KTPA== X-Gm-Message-State: APjAAAWa90ZHofvU7Lrwf6lDgtw66CpwY8XCBSrZ20Ylk7wM6bULu9OY TdjOWvRyGzj/JUYQUhgd0fEX5k7l2iM= X-Google-Smtp-Source: APXvYqzn0Kqdxemi8a4OUp4LpJtlPZbwrfdSAMHs2YQ4Ex5eUiwoSdb+8H9ONDKh4eu8lnwolFHtCg== X-Received: by 2002:a92:bf08:: with SMTP id z8mr16937524ilh.11.1575694277470; Fri, 06 Dec 2019 20:51:17 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id o7sm4549410ilo.58.2019.12.06.20.51.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 06 Dec 2019 20:51:17 -0800 (PST) From: Simon Glass To: U-Boot Mailing List Subject: [PATCH v6 070/102] dm: doc: Add a note about of-platdata and header files Date: Fri, 6 Dec 2019 21:42:43 -0700 Message-Id: <20191206213936.v6.70.I9b25f07ad6fbccec824c9d46fc6c9b998699e68d@changeid> X-Mailer: git-send-email 2.24.0.393.g34dc348eaf-goog In-Reply-To: <20191207044315.51770-1-sjg@chromium.org> References: <20191207044315.51770-1-sjg@chromium.org> MIME-Version: 1.0 X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.26 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pavel Herrmann Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.101.4 at phobos.denx.de X-Virus-Status: Clean We don't want to include dt-structs.h in header files, so add a note about that. Signed-off-by: Simon Glass Reviewed-by: Bin Meng --- Changes in v6: None Changes in v5: None Changes in v4: - Add a patch to explain of-platdata and header files Changes in v3: None Changes in v2: None doc/driver-model/of-plat.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/driver-model/of-plat.rst b/doc/driver-model/of-plat.rst index 557957d2a1..034a68bb4e 100644 --- a/doc/driver-model/of-plat.rst +++ b/doc/driver-model/of-plat.rst @@ -279,6 +279,12 @@ For example: }; +Note that struct mmc_platdata is defined in the C file, not in a header. This +is to avoid needing to include dt-structs.h in a header file. The idea is to +keep the use of each of-platdata struct to the smallest possible code area. +There is just one driver C file for each struct, that can convert from the +of-platdata struct to the standard one used by the driver. + In the case where SPL_OF_PLATDATA is enabled, platdata_auto_alloc_size is still used to allocate space for the platform data. This is different from the normal behaviour and is triggered by the use of of-platdata (strictly