From patchwork Thu Nov 24 12:39:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 25505 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3371887wrr; Thu, 24 Nov 2022 04:42:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf4CakrHoaIAmnWQgInmD602CKIBizas+hHuQIjQWg6NPEos8fSj2CiPMXVSm/NS9T65IwAf X-Received: by 2002:a17:90b:1e0f:b0:213:c5ae:55ec with SMTP id pg15-20020a17090b1e0f00b00213c5ae55ecmr34478744pjb.182.1669293731265; Thu, 24 Nov 2022 04:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669293731; cv=none; d=google.com; s=arc-20160816; b=jkCcNv7uHWbXZDqfGlWTmNXGV5pqTAy0F0s2t950DIImRYpCgBBqQi06/CF5aQ8H1v JUtxs5+HigMFM/kQD2Ura5jzdOJPslNPH4x+LCmS2PDWdUfQK44F/Pt77wlyM67l+bbt 4VeG22rjrBQj3+YT7M55jVWfWBeT0DDGzJ8M9rIRYQSpAOHO+NZycM6RI1Ip3qINqYxO dUeSgvIgnYxo6vNrCT2wVwjhUcgRb83uYP7xLP9AK54uIYKELU191Xq/f0fswUjYEBHs fp8+M0uQI56YN05DQZ5BHHeRG+VmzFOG47QSc128qU7fsAS68457mEmnNNn4nXq0SGpr ZkuQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=mi315TgqSNV1QPewkqYmgMjgkgNVWKPQf5Z22dCDnMQ=; b=MO183DYqrCP2gddiie0alI/nwIJUxhi9rxWJS11haiTfIGRhITQ89oFLi6e1jswmkF 192VSu4+Mu9BR3ukwqFKSr99yfMHADps0Q0Y+yxvjVj09dwGbduusgs0928LVJyFYurc 8nOfSnu9+fRCp9U1ucVzV/pmNnBbpK8MhMWz0stlAZza7UkKcN957O9RvtoHyCveDbUp fHvRb6QMpPr3hFcrv2RQcI/6jIOikZGUOyLqUdY5q1sp7DIGp/zU1ZILD3GqvbRczuP2 z7pDag/4URUw6tHn7/o64Foc4rpsxCOtPeDDXpySjZ7XJv0EvM8KA5C0AcfoA4y3tqzV ipag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=QRKkncHK; 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=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n18-20020a170902d2d200b0017f7fa141f2si988085plc.583.2022.11.24.04.41.54; Thu, 24 Nov 2022 04:42:11 -0800 (PST) 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=@chromium.org header.s=google header.b=QRKkncHK; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229825AbiKXMkA (ORCPT + 99 others); Thu, 24 Nov 2022 07:40:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229558AbiKXMjw (ORCPT ); Thu, 24 Nov 2022 07:39:52 -0500 Received: from mail-ej1-x62b.google.com (mail-ej1-x62b.google.com [IPv6:2a00:1450:4864:20::62b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A3F98D905A for ; Thu, 24 Nov 2022 04:39:34 -0800 (PST) Received: by mail-ej1-x62b.google.com with SMTP id f18so3909672ejz.5 for ; Thu, 24 Nov 2022 04:39:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=mi315TgqSNV1QPewkqYmgMjgkgNVWKPQf5Z22dCDnMQ=; b=QRKkncHKXcLmYnIHRb9MRb64RXwSMIQpr5WdrOiLvKI+FVqJqf8r85LY0snhzKzO6m D4LFVAITrZdVXShdbeiNaf4W/BW8ZMQewJpu0g/cmUnIVqn1dAs7aUaRzLim125WVXaU 75dfyn8fOkmRHAs3F2PDQbGQ3xyVzvfvQBsJU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=mi315TgqSNV1QPewkqYmgMjgkgNVWKPQf5Z22dCDnMQ=; b=n8dY49M+mHNaxUW+k1bYj5M5iQiYP4piwsb2iR8syRXQyFyX6nGKhJEE5w9XllYtqW UnWpJG8p0LQ0CYoFf02dR0k2FMsqurFTZsGySDcQWGi5f2luv0koxnzPrgFvIYe7aM0P oES7dCOjuNJzTEss2K+Jj1wmWjcfhl7dE9b70pNCzCpqefBUZM3hoUM7D3N2Wf3FnRkK SVkuxTvbvZA1yR8obzshIGchD6d1CuHjeA6wYE6J1kteh1wCHKjxPeEmvZ554erctdQp H9eaq5y2qbf2b3tB/awTD0WXaXH+3SCSlDi/iMkiRz6E1FpowTbkj77gqObKh12/hRjb pK9w== X-Gm-Message-State: ANoB5pkcwqYlFnBPLm19TyWJK/QD6PwRgKte/ztyjpmcceSW06Jc2Zn/ L9mL+sxtViJZ1JJ+6YEqidH3LA== X-Received: by 2002:a17:906:b804:b0:7ad:90dd:4af with SMTP id dv4-20020a170906b80400b007ad90dd04afmr27429228ejb.488.1669293572933; Thu, 24 Nov 2022 04:39:32 -0800 (PST) Received: from alco.roam.corp.google.com ([2620:0:1059:10:7b70:9ff8:7491:883a]) by smtp.gmail.com with ESMTPSA id c17-20020aa7c991000000b004619f024864sm462866edt.81.2022.11.24.04.39.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 04:39:32 -0800 (PST) From: Ricardo Ribalda Date: Thu, 24 Nov 2022 13:39:07 +0100 Subject: [PATCH v3 1/2] earlycon: Let users set the clock frequency MIME-Version: 1.0 Message-Id: <20221123-serial-clk-v3-1-49c516980ae0@chromium.org> References: <20221123-serial-clk-v3-0-49c516980ae0@chromium.org> In-Reply-To: <20221123-serial-clk-v3-0-49c516980ae0@chromium.org> To: Jonathan Corbet , Jiri Slaby , Greg Kroah-Hartman Cc: linux-doc@vger.kernel.org, Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=2577; i=ribalda@chromium.org; h=from:subject:message-id; bh=97od82rQM7J+dlJlURxYgrd+b0BH3VtzulTBdDQhZB4=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjf2X+C3xqMspNynDb56lIq9kJexgGty5sRyd8oqK+ 9WuEyM2JAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCY39l/gAKCRDRN9E+zzrEiFzrD/ 0V0c1UZ0Pymknlj5ClLphxk8ixlPP8rDNM5smW6l/SgzMmxkhL+P1L7lX3C5beGyhV2pL+9JGlyrIX ayiV0uB07JyMd4WjIIrD95kRb1p2qvVQ9Zxh8oHaButCm/y3z2Ut+RsjFwuZWdN8bhDXik8JwDLfcQ vvMgCkix3lde8aIrmDWmy5fyvlmf7SZ0CJAhEe/B//pRmc0A+xoDHHKQgigqqTrR0j6azNn6Rrid7g qrIV7l+QrIY1reh8sNduQV8SM/bWMsVVs600EG2qPplbqXjDJc3jN95xAwblkyh5n+NajEjoRnX0mn 1FlSVvlO6V6YILpJULfUjR9EPy4DzgzidLpsf90w+YV82FKYvR6z7HjusM16liTcs9r0g0nUdXdbRV FQdKBDsfjvdkirwV8ojRNFmDU0S+Wh/wKLl5kBXjJjpWX4bqtXTbC5NMXp6QbW/WqBti2MNMhwAhgo KqkFhHViHoOanXHJmbE1d5ZzOYeUmaS6cs2sdCHCdKaIAPtGbKFseiknOq7O0L/UDYXYp2kVqK0OT1 8BZGeFzew53w/865wCipAWyCtxCCtPd0RnfbhOByxLEo8L88Uq2buZVwlmrZKTkL0jZyRjt6rR9PrW cMlnJWgEYAaJC4RFWX0ERjnS5YBF6r/aT59XN87LPLKKgk4LEQn6lG4IGVkQ== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750371662522889240?= X-GMAIL-MSGID: =?utf-8?q?1750381343516773543?= Some platforms, namely AMD Picasso, use non standard uart clocks (48M), witch makes it impossible to use with earlycon. Let the user select its own frequency. Signed-off-by: Ricardo Ribalda Reviewed-by: Jiri Slaby diff --git a/Documentation/admin-guide/kernel-parameters.txt b/Documentation/admin-guide/kernel-parameters.txt index a465d5242774..9efb6c3b0486 100644 --- a/Documentation/admin-guide/kernel-parameters.txt +++ b/Documentation/admin-guide/kernel-parameters.txt @@ -1182,10 +1182,10 @@ specified, the serial port must already be setup and configured. - uart[8250],io,[,options] - uart[8250],mmio,[,options] - uart[8250],mmio32,[,options] - uart[8250],mmio32be,[,options] + uart[8250],io,[,options[,uartclk]] + uart[8250],mmio,[,options[,uartclk]] + uart[8250],mmio32,[,options[,uartclk]] + uart[8250],mmio32be,[,options[,uartclk]] uart[8250],0x[,options] Start an early, polled-mode console on the 8250/16550 UART at the specified I/O port or MMIO address. @@ -1194,7 +1194,9 @@ If none of [io|mmio|mmio32|mmio32be], is assumed to be equivalent to 'mmio'. 'options' are specified in the same format described for "console=ttyS"; if - unspecified, the h/w is not initialized. + unspecified, the h/w is not initialized. 'uartclk' is + the uart clock frequency; if unspecified, it is set + to 'BASE_BAUD' * 16. pl011, pl011,mmio32, diff --git a/drivers/tty/serial/earlycon.c b/drivers/tty/serial/earlycon.c index a5f380584cda..3a0c88419b6c 100644 --- a/drivers/tty/serial/earlycon.c +++ b/drivers/tty/serial/earlycon.c @@ -120,7 +120,13 @@ static int __init parse_options(struct earlycon_device *device, char *options) } if (options) { + char *uartclk; + device->baud = simple_strtoul(options, NULL, 0); + uartclk = strchr(options, ','); + if (uartclk && kstrtouint(uartclk + 1, 0, &port->uartclk) < 0) + pr_warn("[%s] unsupported earlycon uart clkrate option\n", + options); length = min(strcspn(options, " ") + 1, (size_t)(sizeof(device->options))); strscpy(device->options, options, length); @@ -139,7 +145,8 @@ static int __init register_earlycon(char *buf, const struct earlycon_id *match) buf = NULL; spin_lock_init(&port->lock); - port->uartclk = BASE_BAUD * 16; + if (!port->uartclk) + port->uartclk = BASE_BAUD * 16; if (port->mapbase) port->membase = earlycon_map(port->mapbase, 64); From patchwork Thu Nov 24 12:39:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Ribalda X-Patchwork-Id: 25506 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp3372012wrr; Thu, 24 Nov 2022 04:42:28 -0800 (PST) X-Google-Smtp-Source: AA0mqf4D5BhUr5sD4bVCsxZBh79wFZweD5RB9dVdiSCeFQdBWNDW+msA+BYBCJ2qDgM6j11Jfpwk X-Received: by 2002:a17:90a:df06:b0:212:d299:4758 with SMTP id gp6-20020a17090adf0600b00212d2994758mr41033496pjb.120.1669293747957; Thu, 24 Nov 2022 04:42:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669293747; cv=none; d=google.com; s=arc-20160816; b=haDJy2842NnDsEbPOEnrqC6BsLm4mlEBqWe+IM83Dah/3B/jzvKQ2HtvlnGyecpzE+ +iLj7YJoeRVAjHXKVPDFm5wH5XoWW0Y935fXSTrgTXMXbBGU8lsnDT7BX8tDYgpw3Sn7 IDojprPZall9G1Mm341060mhH+c3sH4mv8EgDzwzsdrMXxDr4fiit13H7QYEXtRYI2ra QTlzHwJqJ1mfSDaEuWdWMn30lY8HDFoAL63Tn2Wn6VjXjzmcqcbQZqhG/ZkLg2vYZrU4 kp2TQkQvoibuUjMXGlgkAp8bbJK/34PRi8L/q8m1Hcz1yRAlQtzzxYptNQv1p+yup0iZ A9gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=/t7lNXd7tivgAb5igBDrtCfwGh/wo9NfhZ6XZkO9LQs=; b=dwC10ypq0Tu2LOXsfa3zdSELRr1Vm2F6jE6JLhQf3Up07+ET+RxBrw8+kxhWqTj5Qj P1xeAyusE9arLTdMNnJCQ+O4ysBaNljIbGKA3Wrw04EkATNpcEOsJ5tKj1ta6wec4wEx yTuQKJNBLia+Q3IGVlAlBlNsiEnGoRMwueoBLwDoIAcylUEMtJ0GFMkxj6yqOSdh8yJ7 iu3Glai7LAAgg2BRD+ox/NnaJvHdJtVEmI2RbQZZ3pqso8ln22CI9VHI7v0H8HTRTQf8 3hKpdRyHe4P47IvTMCa1vvQtfzNOlrvuft21rbLXXPRzI1ImmWNa2BI2CBwKtWOd1xYY EsYg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=CwAwnhaZ; 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=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u2-20020a170902e5c200b001854f631c8esi1087430plf.221.2022.11.24.04.42.15; Thu, 24 Nov 2022 04:42:27 -0800 (PST) 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=@chromium.org header.s=google header.b=CwAwnhaZ; 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=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229538AbiKXMkG (ORCPT + 99 others); Thu, 24 Nov 2022 07:40:06 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52234 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229881AbiKXMjx (ORCPT ); Thu, 24 Nov 2022 07:39:53 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BA17AE06A9 for ; Thu, 24 Nov 2022 04:39:35 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id z63so2405436ede.1 for ; Thu, 24 Nov 2022 04:39:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=/t7lNXd7tivgAb5igBDrtCfwGh/wo9NfhZ6XZkO9LQs=; b=CwAwnhaZdX9OilFLK72ch9GrUK0xeFxcVPhlg6ATs0/jojQfK+OA2PP75ZW8SGcqhZ 2IFFfE+r8r6ZxNlGsvxG55gcZf2PCYuTlv5p10KSAeIwUZQdTIjmdIHXIzKJmA6oGaq2 5n1BLEko9R0m64dyS3wXLZrQHGKyCX1/NTzzI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/t7lNXd7tivgAb5igBDrtCfwGh/wo9NfhZ6XZkO9LQs=; b=BA8MaMEr0YdeWQvuHO29+Ou+oPF/5DQr1EjocwbVwW7l4JGLJN1Uv27lWXAAO3scCo 9wSw6HJI6NOiiK/55DY3wYLCCXoWjUJRVzUAJnFZqp+PhDzBGV4eFpzF0yskCLTe4MF5 dNDoJ6pzSUfQnzZvD6JU28x1H4Aw6nGOo60jEyApeT9KpeWw4e1k6JRfIbyKuqe4iR4D TMbyERjofsirzQiMzus3ad2LQ5grs78AlXFRDGDVS3l74EEHkHXfp4XEi3RCtD20nlfK QJ2/Yc2vGq5c5MSqbHdLPYvCUf7UuHPVGvC5O3fRi+ias+6htRjePQfgIn8rPrKe/FiR kkAA== X-Gm-Message-State: ANoB5pnwjQFB9oKGdlEEWHIqjlMywA85rq2yiyXgx2gMohwXMtTgHn2s 99boMg1RPMrB/UhEVLmHIe74NA== X-Received: by 2002:aa7:dd4b:0:b0:467:65a2:f635 with SMTP id o11-20020aa7dd4b000000b0046765a2f635mr16516340edw.106.1669293574328; Thu, 24 Nov 2022 04:39:34 -0800 (PST) Received: from alco.roam.corp.google.com ([2620:0:1059:10:7b70:9ff8:7491:883a]) by smtp.gmail.com with ESMTPSA id c17-20020aa7c991000000b004619f024864sm462866edt.81.2022.11.24.04.39.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Nov 2022 04:39:33 -0800 (PST) From: Ricardo Ribalda Date: Thu, 24 Nov 2022 13:39:08 +0100 Subject: [PATCH v3 2/2] earlycon: Increase options size MIME-Version: 1.0 Message-Id: <20221123-serial-clk-v3-2-49c516980ae0@chromium.org> References: <20221123-serial-clk-v3-0-49c516980ae0@chromium.org> In-Reply-To: <20221123-serial-clk-v3-0-49c516980ae0@chromium.org> To: Jonathan Corbet , Jiri Slaby , Greg Kroah-Hartman Cc: linux-doc@vger.kernel.org, Ricardo Ribalda , linux-kernel@vger.kernel.org, linux-serial@vger.kernel.org X-Mailer: b4 0.11.0-dev-d93f8 X-Developer-Signature: v=1; a=openpgp-sha256; l=804; i=ribalda@chromium.org; h=from:subject:message-id; bh=LDMEvgd//6KOjPTqmpYoayiLmRUHZGWV9dd55Hylf3E=; b=owEBbQKS/ZANAwAKAdE30T7POsSIAcsmYgBjf2YAMvEHYcx8DY5+AyWKex9Y2BerkLgm3gHjPpgl Lm2EtbaJAjMEAAEKAB0WIQREDzjr+/4oCDLSsx7RN9E+zzrEiAUCY39mAAAKCRDRN9E+zzrEiNv0D/ 9m3hYtxTUDRJdqKoKkRknZf1ck19nhHvyghTUthaohqBuzLJrkgAvs4nJALziTZieMc86DW69gwDnD QQ6jU5wvwk7JiBJ7Q3rKizf8J+JDt6OGkrI3CWNRLwpUd0ocHAEv/nqzmjLoVtlTV9/sLKUqwYQuwM vjueNem+8ZClKf8wDYXy5zDqrMf/2MkvJ8Im95tFm/JWnzYxp5vCzHQLT9jjBY1Lu1JkcnOTMte93X 5odbnGsQitXvpi+kVeX3cY69OFqk/AM+P8Carsv6TLulDvkJCvs3reqIGKRVCiXNkyde781eEr+jlB F6gSAnVWb6C72lieHHdR7bGOPIaunJSTdEKl5TfzD08FnavmA1n2i/b1haMA/wxq3VkiyfrvUFDhDC k6NzwddmRtAzMdfu4SoI318lUs9mFnzETr8XamPGVMic5LmWyumFl5QDKj/9juop6/RsnK4cAZJAZq sAmpbjwxPQgbi75UQRG/Of3LxTr9FPhlbmaV37vuGrkIC+liFqHf4YP2L5wfeX/ullD3cIZpoe0+LJ +a80WcGzcvhIYi2/8xhQ3V6yJomX3QuqMtjGHVPpIUe7J43YUwbv4X52OOiEbBMvWNq2+DjDoTGkd7 yUrkKflmDRyfHfx5v7G25WwroG5Pn0GxlRRefxDH/SfUyx9RMG1+t4rWaoYg== X-Developer-Key: i=ribalda@chromium.org; a=openpgp; fpr=9EC3BB66E2FC129A6F90B39556A0D81F9F782DA9 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750381361056911618?= X-GMAIL-MSGID: =?utf-8?q?1750381361056911618?= Now that the clock frequency is also part of the options, 16 bytes is too little. Without this patch dmesg does not show the whole options, Eg: earlycon: uart0 at MMIO32 0x00000000fedc9000 (options '115200n8,480000') instead of: '115200n8,48000000' Signed-off-by: Ricardo Ribalda Reviewed-by: Jiri Slaby diff --git a/include/linux/serial_core.h b/include/linux/serial_core.h index d657f2a42a7b..f555927195da 100644 --- a/include/linux/serial_core.h +++ b/include/linux/serial_core.h @@ -701,7 +701,7 @@ static inline int uart_poll_timeout(struct uart_port *port) struct earlycon_device { struct console *con; struct uart_port port; - char options[16]; /* e.g., 115200n8 */ + char options[32]; /* e.g., 115200n8 */ unsigned int baud; };