Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp512294imn; Thu, 28 Jul 2022 07:31:37 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sGNuCkxFx/QCyqtlMI+ODYW5pqkvyDLNzFMECZFF+Z9IDRZPQ6zRulcdC4ydA1VtV2pv6m X-Received: by 2002:a05:6a00:24d6:b0:52b:ee89:ecb2 with SMTP id d22-20020a056a0024d600b0052bee89ecb2mr22850399pfv.15.1659018697327; Thu, 28 Jul 2022 07:31:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659018697; cv=none; d=google.com; s=arc-20160816; b=v6nQx3AW/c/8bw6v0hxmw3+s6ErOapwipxMuSKpP2jRuvTLqWGZENjPFk/0VxIPMs1 Gds5Fiy4X+iWFdHjzm9y9GClbtCUs/wmiyyKaocM3ip3ypx003ZVRfn6Vyt2hVU8FbnO kZk2rWMxqtpx7+gGDXrOITXp6ManiKIrv5ZCGGgjsavTfUALr1BbLFT/HXrj/aq5zdSZ 1LSbN/UZJgXaEN56Tu2mVTbiM7XQnNyr4jSZUEtEYH9Tw41URC0t/8EC3sUuaGqQ50qL eGNqU+MWjWrqBEmZQOkXGg4TLYq9h6shNccpdS3S+rGgXgurFVDgExWcupO7KG/HsJKt /hDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=+qxi1BsKPmynG3xfpNZLp6J5s/IWJprPFoEGd6KJx1s=; b=KtEuN9GkncvA6VN3XkEGIk7ypTr97XGOgzimY1SLgXlBXOLjO7rEcoa2vsmaPs/JI6 lKrwlse44DZtDxhdWc64fWLx5r03XjBShQoa2sAMfoVXb4qChQjuSUPU8lZJO2qTEiYv MeRv2eeCDOUsQ8UN7cEFk2ndoNvS0URYRf2ed7kKwPxQLeb6W9rH6s2ypuGphG7EIGQK HrolwJTDzbevTHmC6SIaPUi2fAY9Vitnm0DZ5IPlKHBTOV31JDS7nhpD6BGbRTFekW8x VDfdmYOxDoKPEmJ1QdSbXVlCZ9fcU/gzMaQBf/IErhCEIYA8IRycebUZALDgLtQ7ZsYk 9hSA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Dqobgjs1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y23-20020a63fa17000000b0041b47042b2dsi1236811pgh.291.2022.07.28.07.31.19; Thu, 28 Jul 2022 07:31:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=Dqobgjs1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231857AbiG1O3H (ORCPT + 99 others); Thu, 28 Jul 2022 10:29:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56706 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231807AbiG1O2y (ORCPT ); Thu, 28 Jul 2022 10:28:54 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F12C565D66; Thu, 28 Jul 2022 07:28:52 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id j22so3491429ejs.2; Thu, 28 Jul 2022 07:28:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=+qxi1BsKPmynG3xfpNZLp6J5s/IWJprPFoEGd6KJx1s=; b=Dqobgjs1nII8eXteQLjz2ED1bVraj/SM6DyKm259IZRg1sN9fXwxKHIjnG2b0D3INP CJtDIdhUiiT3FrZ8VGIV5YyCY/B5CS56vg2LrtG2qoKAVoBPg5C5Rc4irrfAhqzUR8Gh +kybMZBZKngEWg1dyX5m4BVx0V2laC+H53UD1uGBiO18QUV/cjUgIsNB5O4VSdrtTV9W Cjr63Q11WQXEj+bfEst6CJpV6b6nywbFMPcaGL39fGMjwTeOGbNRQn9EtmKqq7ZN4xwN pF26gzooknPqRasWoevZQAJ4FehkqRleQDodSdYOcvnJ8YGzspu/VUm+wAjSwHvBT353 9FoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=+qxi1BsKPmynG3xfpNZLp6J5s/IWJprPFoEGd6KJx1s=; b=HBiH159v6FP5hmFNEK1MbJWvrDYIqVclT5Dl+AOO0iKd0yHrkxHnbsO58UF3dO770+ hEF952flatyyhaMQX7pTelv6SWMFjW4K5pNdiwlOLxNqGzDT97hVFYlyapWCorZpMtWB 0uy1lu/vysX5fUd+pQ312MxgwSDyR+FWIjCCVHCKb7RXa74Py+xi8/yCN9wztZVszwu1 GTXHlYHs/+5b71YUB1HZ2jW2x48TesaXd4Emr5jK5yZkvg11JRqyK7k7lM5b33GMteZL KK7erNO0ijxdKiqNWS+huOqDTYzVhj2khydwnOiBS507h+9QHCqQKuGJKwlaVt1POxvM SAXQ== X-Gm-Message-State: AJIora+rHdZaamCrYfr2AnIh9uK5Ad2uAfyA0RKBUHuj0fIWP6egv66r YAux1owDDUEwsfCbH1hbPclwCQiID5pQIKCj X-Received: by 2002:a17:907:6089:b0:72f:56db:ccb6 with SMTP id ht9-20020a170907608900b0072f56dbccb6mr21020085ejc.318.1659018530972; Thu, 28 Jul 2022 07:28:50 -0700 (PDT) Received: from nergzd-desktop.localdomain ([23.154.177.9]) by smtp.gmail.com with ESMTPSA id y1-20020aa7d501000000b0043cce1d3a0fsm755949edq.87.2022.07.28.07.28.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Jul 2022 07:28:50 -0700 (PDT) From: Markuss Broks To: linux-kernel@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Markuss Broks , Jonathan Corbet , Ard Biesheuvel , Greg Kroah-Hartman , Jiri Slaby , Helge Deller , "Paul E. McKenney" , Borislav Petkov , Andrew Morton , Kees Cook , Randy Dunlap , Damien Le Moal , Thomas Zimmermann , Javier Martinez Canillas , Michal Suchanek , Andy Shevchenko , Arnd Bergmann , Wei Ming Chen , Bartlomiej Zolnierkiewicz , Tony Lindgren , linux-doc@vger.kernel.org, linux-efi@vger.kernel.org, linux-serial@vger.kernel.org, linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Petr Mladek Subject: [PATCH 1/2] drivers: serial: earlycon: Pass device-tree node Date: Thu, 28 Jul 2022 17:28:18 +0300 Message-Id: <20220728142824.3836-2-markuss.broks@gmail.com> X-Mailer: git-send-email 2.37.0 In-Reply-To: <20220728142824.3836-1-markuss.broks@gmail.com> References: <20220728142824.3836-1-markuss.broks@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Pass a pointer to device-tree node in case the driver probed from OF. This makes early console drivers able to fetch options from device-tree node properties. Signed-off-by: Markuss Broks --- drivers/tty/serial/earlycon.c | 3 +++ include/linux/serial_core.h | 1 + 2 files changed, 4 insertions(+) diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index 57c70851f22a0e78805f34d1a7700708104b6f6a..14e8a7fe54486a1c377a6659c37a73858de5bf0b 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -304,6 +304,9 @@ int __init of_setup_earlycon(const struct earlycon_id *match, strlcpy(early_console_dev.options, options, sizeof(early_console_dev.options)); } + + early_console_dev.node = node; + earlycon_init(&early_console_dev, match->name); err = match->setup(&early_console_dev, options); earlycon_print_info(&early_console_dev); diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index cbd5070bc87f42aa450c4ca7af8a9b59fbe88574..3295721f33e482124fae8370b5889d5d6c012303 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -349,6 +349,7 @@ struct earlycon_device { struct uart_port port; char options[16]; /* e.g., 115200n8 */ unsigned int baud; + unsigned long node; }; struct earlycon_id { -- 2.37.0