From patchwork Thu May 6 20:27:25 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 431941 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=-14.0 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, 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 97A5FC433B4 for ; Thu, 6 May 2021 20:29:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 78BA16112F for ; Thu, 6 May 2021 20:29:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233142AbhEFUag (ORCPT ); Thu, 6 May 2021 16:30:36 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49212 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbhEFUag (ORCPT ); Thu, 6 May 2021 16:30:36 -0400 Received: from mail-qk1-f197.google.com ([209.85.222.197]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lekcq-0001bl-2l for linux-samsung-soc@vger.kernel.org; Thu, 06 May 2021 20:29:36 +0000 Received: by mail-qk1-f197.google.com with SMTP id c4-20020a3781040000b02902e46e29acf5so4313850qkd.22 for ; Thu, 06 May 2021 13:29:36 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=PflL7ALzIS28zgo9gRKf5LrSO5ZMKaq1J727pxpPmSA=; b=Atv3hYfSl6DUJQCZ2NEDjuj5y6xgXO77CwZjYTy4nCNye0xv3qESIBO6Q9DVy+an85 7TZ4u1nNcxk3bUu6mMszbe3TMRsCTU2YN8pUgQcnSrlKKS/C1trA9jDfqTbEfwZlQl/S w7VEP4hzWkVM4t1Z/N+Fi6V6+5EdWhKihC7EaAOO25NdwgvaSap+XOWgAc59AEIIRBpo pZbLbjFvDoatmUy2cVre9aKREY2XF5fkNvof9KO181yaCDGdReWZou1c+6dOYK/1BBLF x9z8cmbvMVL17GBvg6pIkgS/txTH0Efl3XCCP93fW1vZrVz4m9ChOQCp4O4GFd1vmvZT t2nQ== X-Gm-Message-State: AOAM532s26OUOi8VgSI4+3zfQjUDuycJA+CYgzai3/D8papG3nKHRStT OJmYlQe2niJu2V2U5Uhr5UXC0yQkt70/Phjv3v3EECnmdlpix1Ohf3vSzOx0U28M9jr95PuX9XX QA0I8r/0RPCxEvqabZ20/GStXpEk00li9Eii1fBTWEMtKyleH X-Received: by 2002:a37:f503:: with SMTP id l3mr5848972qkk.307.1620332975223; Thu, 06 May 2021 13:29:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO/jXf1XyPty4NXaJwbxTsZ7FayuPAfdAwFO8HWJXLvf8aCh7QXhu7leoeiVIxg4xBQN7sbg== X-Received: by 2002:a37:f503:: with SMTP id l3mr5848955qkk.307.1620332974997; Thu, 06 May 2021 13:29:34 -0700 (PDT) Received: from localhost.localdomain ([45.237.49.6]) by smtp.gmail.com with ESMTPSA id r9sm3151363qtf.62.2021.05.06.13.29.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:29:34 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 1/5] clocksource/drivers/samsung_pwm: Minor whitespace cleanup Date: Thu, 6 May 2021 16:27:25 -0400 Message-Id: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Cleanup the code to be slightly more readable and follow coding convention - only whitespace. This fixes checkpatch warnings: WARNING: Block comments should align the * on each line WARNING: please, no space before tabs WARNING: Missing a blank line after declarations CHECK: Alignment should match open parenthesis Signed-off-by: Krzysztof Kozlowski --- drivers/clocksource/samsung_pwm_timer.c | 19 +++++++++++-------- include/clocksource/samsung_pwm.h | 3 ++- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index f760229d0c7f..69bf79c7f462 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -4,7 +4,7 @@ * http://www.samsung.com/ * * samsung - Common hr-timer support (s3c and s5p) -*/ + */ #include #include @@ -22,7 +22,6 @@ #include - /* * Clocksource driver */ @@ -38,8 +37,8 @@ #define TCFG0_PRESCALER_MASK 0xff #define TCFG0_PRESCALER1_SHIFT 8 -#define TCFG1_SHIFT(x) ((x) * 4) -#define TCFG1_MUX_MASK 0xf +#define TCFG1_SHIFT(x) ((x) * 4) +#define TCFG1_MUX_MASK 0xf /* * Each channel occupies 4 bits in TCON register, but there is a gap of 4 @@ -183,7 +182,7 @@ static void samsung_time_start(unsigned int channel, bool periodic) } static int samsung_set_next_event(unsigned long cycles, - struct clock_event_device *evt) + struct clock_event_device *evt) { /* * This check is needed to account for internal rounding @@ -225,6 +224,7 @@ static void samsung_clockevent_resume(struct clock_event_device *cev) if (pwm.variant.has_tint_cstat) { u32 mask = (1 << pwm.event_id); + writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT); } } @@ -248,6 +248,7 @@ static irqreturn_t samsung_clock_event_isr(int irq, void *dev_id) if (pwm.variant.has_tint_cstat) { u32 mask = (1 << pwm.event_id); + writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT); } @@ -272,7 +273,7 @@ static void __init samsung_clockevent_init(void) time_event_device.cpumask = cpumask_of(0); clockevents_config_and_register(&time_event_device, - clock_rate, 1, pwm.tcnt_max); + clock_rate, 1, pwm.tcnt_max); irq_number = pwm.irq[pwm.event_id]; if (request_irq(irq_number, samsung_clock_event_isr, @@ -282,6 +283,7 @@ static void __init samsung_clockevent_init(void) if (pwm.variant.has_tint_cstat) { u32 mask = (1 << pwm.event_id); + writel(mask | (mask << 5), pwm.base + REG_TINT_CSTAT); } } @@ -347,7 +349,7 @@ static int __init samsung_clocksource_init(void) pwm.source_reg = pwm.base + pwm.source_id * 0x0c + 0x14; sched_clock_register(samsung_read_sched_clock, - pwm.variant.bits, clock_rate); + pwm.variant.bits, clock_rate); samsung_clocksource.mask = CLOCKSOURCE_MASK(pwm.variant.bits); return clocksource_register_hz(&samsung_clocksource, clock_rate); @@ -398,7 +400,8 @@ static int __init _samsung_pwm_clocksource_init(void) } void __init samsung_pwm_clocksource_init(void __iomem *base, - unsigned int *irqs, struct samsung_pwm_variant *variant) + unsigned int *irqs, + struct samsung_pwm_variant *variant) { pwm.base = base; memcpy(&pwm.variant, variant, sizeof(pwm.variant)); diff --git a/include/clocksource/samsung_pwm.h b/include/clocksource/samsung_pwm.h index c395238d0922..76341988fb4f 100644 --- a/include/clocksource/samsung_pwm.h +++ b/include/clocksource/samsung_pwm.h @@ -27,6 +27,7 @@ struct samsung_pwm_variant { }; void samsung_pwm_clocksource_init(void __iomem *base, - unsigned int *irqs, struct samsung_pwm_variant *variant); + unsigned int *irqs, + struct samsung_pwm_variant *variant); #endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */ From patchwork Thu May 6 20:27:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 432391 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 4D5C0C43460 for ; Thu, 6 May 2021 20:29:39 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 29B4E6112F for ; Thu, 6 May 2021 20:29:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233444AbhEFUah (ORCPT ); Thu, 6 May 2021 16:30:37 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49220 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbhEFUag (ORCPT ); Thu, 6 May 2021 16:30:36 -0400 Received: from mail-qk1-f197.google.com ([209.85.222.197]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lekcr-0001cE-LN for linux-samsung-soc@vger.kernel.org; Thu, 06 May 2021 20:29:37 +0000 Received: by mail-qk1-f197.google.com with SMTP id g184-20020a3784c10000b02902e385de9adaso4357440qkd.3 for ; Thu, 06 May 2021 13:29:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Kr71HxmM9qcmrtqnZvjbEArHjJcDpTE8gEhMoKfplI8=; b=RQuWNSfi8dwOWdskX+sA3yhC55r3XYfJsrbyQ0AcmLdImfgm8galeKT3twp+vC105K kdhDYmUOyndskwaQKY6mmuLmStwGjiUurqQbX1zLuC9ejs4z2clWohjtYTW1RWRrNC0Q BfjDo41b6JF3KUgqhiMgNtomkqOhlGbDwTlxTiJWEaBKLbBwBzd5lhHRs3pWMNcW4crz Z2wcFxwd6AMduAcaaxnv+26NlJt5kEDPTFq9T2qkaBXG4gOsKBnWxxDC0NqlKbaN9O70 HHiW5NZa3uJj7TeabJHWnMNLh8aE7XU1r5uQSfTMqN14ed+1yJps3ZG6mhU/mdjSFloW 6y7g== X-Gm-Message-State: AOAM532sEibPZHUsJ5b7xacwleHtfOHfxeWvNaF2mkADp5AMz0U0XogX sheEgznqQJF3AfPpFfypAM9iDlWTxFbFNrl1aJMWI7znc3vxiQu1Dds+QnMfwpP59nuRK4BmdHb le57HJyyS8KGRkyBn3hzGU81z5/z+i2rxkkrGPOlc5DlxIIbs X-Received: by 2002:a05:622a:3cf:: with SMTP id k15mr5876574qtx.282.1620332976524; Thu, 06 May 2021 13:29:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyk3b8O3zAhrDM7x/cMI1eJVdxQMKUo6w7vmzjoPUcDq01NFnKYHmva7Zxpns1CqKXuC7HwQA== X-Received: by 2002:a05:622a:3cf:: with SMTP id k15mr5876557qtx.282.1620332976322; Thu, 06 May 2021 13:29:36 -0700 (PDT) Received: from localhost.localdomain ([45.237.49.6]) by smtp.gmail.com with ESMTPSA id r9sm3151363qtf.62.2021.05.06.13.29.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:29:35 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 2/5] clocksource/drivers/samsung_pwm: Constify passed structure Date: Thu, 6 May 2021 16:27:26 -0400 Message-Id: <20210506202729.157260-2-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> References: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The 'struct samsung_pwm_variant' argument passed to initialization functions is not modified, so it can be made const for safety. Signed-off-by: Krzysztof Kozlowski --- drivers/clocksource/samsung_pwm_timer.c | 2 +- include/clocksource/samsung_pwm.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index 69bf79c7f462..bfad61b509f9 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -401,7 +401,7 @@ static int __init _samsung_pwm_clocksource_init(void) void __init samsung_pwm_clocksource_init(void __iomem *base, unsigned int *irqs, - struct samsung_pwm_variant *variant) + const struct samsung_pwm_variant *variant) { pwm.base = base; memcpy(&pwm.variant, variant, sizeof(pwm.variant)); diff --git a/include/clocksource/samsung_pwm.h b/include/clocksource/samsung_pwm.h index 76341988fb4f..9b435caa95fe 100644 --- a/include/clocksource/samsung_pwm.h +++ b/include/clocksource/samsung_pwm.h @@ -28,6 +28,6 @@ struct samsung_pwm_variant { void samsung_pwm_clocksource_init(void __iomem *base, unsigned int *irqs, - struct samsung_pwm_variant *variant); + const struct samsung_pwm_variant *variant); #endif /* __CLOCKSOURCE_SAMSUNG_PWM_H */ From patchwork Thu May 6 20:27:27 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 431940 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 66F36C433ED for ; Thu, 6 May 2021 20:29:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 38525613C2 for ; Thu, 6 May 2021 20:29:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234144AbhEFUai (ORCPT ); Thu, 6 May 2021 16:30:38 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49227 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbhEFUai (ORCPT ); Thu, 6 May 2021 16:30:38 -0400 Received: from mail-qk1-f198.google.com ([209.85.222.198]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lekct-0001cl-Aq for linux-samsung-soc@vger.kernel.org; Thu, 06 May 2021 20:29:39 +0000 Received: by mail-qk1-f198.google.com with SMTP id b3-20020a05620a0cc3b02902e9d5ca06f2so4330888qkj.19 for ; Thu, 06 May 2021 13:29:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=i3wg2XN420azu/evG4iGtlbTYfEz7jreR3UbeD+i/T0=; b=lVseyOpxMU5VsBfhhZ2uzchnlu/cc1RLuRY8EGEfxuWulB9ejc4NKPw2upzJUyh/WW qjAo0xxhRvjA5MMBdeeaUahF/Ls64JZhX2KjQGDYwS2K6LUqJhUtVIBMJk6vuFPTjfUY D/QCc6YvY4hiFZg1pghOEvuK5P8SoLlFRPOgm9ChE3quiAC0C33Q2XBOubGXQtkj6KjZ a+wkBGztMAIpY3C/Krh/48x0hGKJKCCHg71YyvB/A4C562dwd0zorK8Vn0iEDiU+2sDa wpflLscGS+HV17PhSs4WZMc0O/D65a42iu6ItBye35gE+C7uUX5Iw7Lus0b4qMmhl2IP Bs5Q== X-Gm-Message-State: AOAM532sGEQQSIe43UslSeTn2J1EGJmRwhehV6UGmNiywaKq1KYYhWgy 7xK6E6sqCPLtcOTh8xh2T7vMTCbRt6huouPXmX+UQ7+46eTKD3NiI3vdEngO1E3gFOdu91rD6CX /oMZ6F61t4kVlCDqU4xBl/tDvP9lF03l9vqk2mIhtCpHFh69Y X-Received: by 2002:ac8:5dce:: with SMTP id e14mr6047040qtx.385.1620332978030; Thu, 06 May 2021 13:29:38 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyr/teC4fU26p0xkpWZj5KkZrm5frwONB63LY6ImAr+V1yN3mfqGPo04XbzbC5xzeeBkOr5Tg== X-Received: by 2002:ac8:5dce:: with SMTP id e14mr6047029qtx.385.1620332977866; Thu, 06 May 2021 13:29:37 -0700 (PDT) Received: from localhost.localdomain ([45.237.49.6]) by smtp.gmail.com with ESMTPSA id r9sm3151363qtf.62.2021.05.06.13.29.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:29:37 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 3/5] clocksource/drivers/samsung_pwm: Cleanup on init error Date: Thu, 6 May 2021 16:27:27 -0400 Message-Id: <20210506202729.157260-3-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> References: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org Failure of timer initialization is likely to be fatal for the system, so cleanup in such case is not strictly necessary. However the code might be refactored or reused, so better not to rely on such assumption that system won't continue init failure. Unmap the IO memory and put the clock on initialization failures from devicetree. Signed-off-by: Krzysztof Kozlowski --- Not marking as cc-stable and not adding Fixes tag, as this is not really a bug. --- drivers/clocksource/samsung_pwm_timer.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index bfad61b509f9..55e2f9fa2a15 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -421,7 +421,7 @@ static int __init samsung_pwm_alloc(struct device_node *np, struct property *prop; const __be32 *cur; u32 val; - int i; + int i, ret; memcpy(&pwm.variant, variant, sizeof(pwm.variant)); for (i = 0; i < SAMSUNG_PWM_NUM; ++i) @@ -444,10 +444,24 @@ static int __init samsung_pwm_alloc(struct device_node *np, pwm.timerclk = of_clk_get_by_name(np, "timers"); if (IS_ERR(pwm.timerclk)) { pr_crit("failed to get timers clock for timer\n"); - return PTR_ERR(pwm.timerclk); + ret = PTR_ERR(pwm.timerclk); + goto err_clk; } - return _samsung_pwm_clocksource_init(); + ret = _samsung_pwm_clocksource_init(); + if (ret) + goto err_clocksource; + + return 0; + +err_clocksource: + clk_put(pwm.timerclk); + pwm.timerclk = NULL; +err_clk: + iounmap(pwm.base); + pwm.base = NULL; + + return ret; } static const struct samsung_pwm_variant s3c24xx_variant = { From patchwork Thu May 6 20:27:28 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 432390 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 7FF9EC43461 for ; Thu, 6 May 2021 20:29:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 5A89A6112F for ; Thu, 6 May 2021 20:29:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229951AbhEFUak (ORCPT ); Thu, 6 May 2021 16:30:40 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49231 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233770AbhEFUaj (ORCPT ); Thu, 6 May 2021 16:30:39 -0400 Received: from mail-qk1-f200.google.com ([209.85.222.200]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lekcu-0001dC-E2 for linux-samsung-soc@vger.kernel.org; Thu, 06 May 2021 20:29:40 +0000 Received: by mail-qk1-f200.google.com with SMTP id g184-20020a3784c10000b02902e385de9adaso4357514qkd.3 for ; Thu, 06 May 2021 13:29:40 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QaN2sKrS+2gNp66ooV3kIZkyoZhndv/BbfpM71H4E2s=; b=BaUJl1I8RHocm0ltwwiCF3KQOo9ERFl18N/Y+uPy8yCy/lB4rrtWkcLJRnOseIzbQD oO48DnY2Zcs4182CuEicuL/vvaHfIdhZGA0Az9pxtXLHKKwZP2UpkTLTBW+A6bkMSk6X fUmt0Gvmlhs0JHaMXBbI6g2uEOboEoO32K9aRpcGuMeInlu34t80U19Or5x6ILraJIJ/ /LENwrl6UrXQl+8NdVfYGFkH5zWJk+hPeKYXIER+bBmslblqinS+h5Zh8iop0H4ygM5g DrQ2KTdIKpBG3OAQrASGF46Bu+PtbaVdYQwZCBixH2p/9GGHi03HZSlOcSGcqiQUlo+m I2dg== X-Gm-Message-State: AOAM533puxyqJLwNJi2f2EuemU+g8jzhdpeNtzy7TV3qhlHu3isEtsrG EdMjgnaXFmC6n22IIJbKJn4bCC6PWmnAVkv5YegP4pncpQsI8WZWeWNuu2ntk3kVWIS6jJozUuJ QwOpmBLg6DWMaFLo/DWmH3RjOWZ44U4pBfq2DNYn0Khe24+V7 X-Received: by 2002:a05:620a:4081:: with SMTP id f1mr5956455qko.203.1620332979446; Thu, 06 May 2021 13:29:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzapbevGV176ziXFWsYiPHEgdYz4M/VREvFTBrCMRIegcj3hsTKcp6weSBOfIpotKXfoR086A== X-Received: by 2002:a05:620a:4081:: with SMTP id f1mr5956445qko.203.1620332979286; Thu, 06 May 2021 13:29:39 -0700 (PDT) Received: from localhost.localdomain ([45.237.49.6]) by smtp.gmail.com with ESMTPSA id r9sm3151363qtf.62.2021.05.06.13.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:29:38 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 4/5] clocksource/drivers/samsung_pwm: Constify source IO memory Date: Thu, 6 May 2021 16:27:28 -0400 Message-Id: <20210506202729.157260-4-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> References: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The 'source_reg' IO memory is only read, so the pointer can point to const for safety. Signed-off-by: Krzysztof Kozlowski --- drivers/clocksource/samsung_pwm_timer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clocksource/samsung_pwm_timer.c b/drivers/clocksource/samsung_pwm_timer.c index 55e2f9fa2a15..6e46781bc9ac 100644 --- a/drivers/clocksource/samsung_pwm_timer.c +++ b/drivers/clocksource/samsung_pwm_timer.c @@ -61,7 +61,7 @@ EXPORT_SYMBOL(samsung_pwm_lock); struct samsung_pwm_clocksource { void __iomem *base; - void __iomem *source_reg; + const void __iomem *source_reg; unsigned int irq[SAMSUNG_PWM_NUM]; struct samsung_pwm_variant variant; From patchwork Thu May 6 20:27:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 431939 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=-16.8 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, 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 E7496C433ED for ; Thu, 6 May 2021 20:29:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C1D55613C2 for ; Thu, 6 May 2021 20:29:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234339AbhEFUam (ORCPT ); Thu, 6 May 2021 16:30:42 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:49237 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234194AbhEFUal (ORCPT ); Thu, 6 May 2021 16:30:41 -0400 Received: from mail-qt1-f197.google.com ([209.85.160.197]) by youngberry.canonical.com with esmtps (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1lekcv-0001dg-Kq for linux-samsung-soc@vger.kernel.org; Thu, 06 May 2021 20:29:41 +0000 Received: by mail-qt1-f197.google.com with SMTP id k13-20020ac8140d0000b02901bad0e39d8fso4330901qtj.6 for ; Thu, 06 May 2021 13:29:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=MEVMUDWkqGHYlLcG9Az7Ro+mD4OVQo3sjNJ8RnA9DCE=; b=PEztYQOQ/Exnvb5CvL1B0yyIvBi47u9eOa+GE4uqf4RdwJI646/rg+xk7Q876u6mcE 24bNneKkdEj7lOn2lmTmV4E4M4bcbvhkZyJN9xiC5gTIVQA4f2W7dOmoLWvO/pHWw0kB Ofw2bNZ/YsPIZsqr+FTcXzBfWlIx5UmILL9xNdxKCRg2f+lo9bHt7ygqA2MsKXjKvvNp VNhA8D8bzCBp9jYz7HnOZLnuslrhjbSBTvkO8BI9bsP2H8D+XQO8ODWlBBtyjmr7mKS7 cGdVLg3vkgqPxK30fHZyret2k9sOO9NAvD+l5WK7DmJSBFmdWfgGPXyucuZwuUvhZD3r k1bg== X-Gm-Message-State: AOAM530YBC/pyqrHil454LT3icOE/o2FwEJqWM/nbpwcKYm2C6OFjQvy fK1K7VTwg3rurbDtSyjg3jsbWwyrtIPlu40dYoP/ZtOdEQa70nqhp1VSvtoksBzNyk9t7TGDxED UoQKHqpRkNsxincyhmC864jYoYLvxy1UuZ3Z505SHBIgIoVS3 X-Received: by 2002:ac8:6a07:: with SMTP id t7mr6289060qtr.74.1620332980815; Thu, 06 May 2021 13:29:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxGTOcflvNGn/QW/M44UQ6PapIvsGKyEKZR1mufl7BaAi09QOxao1TSWpkNhvwAlfCnFrWG3Q== X-Received: by 2002:ac8:6a07:: with SMTP id t7mr6289043qtr.74.1620332980669; Thu, 06 May 2021 13:29:40 -0700 (PDT) Received: from localhost.localdomain ([45.237.49.6]) by smtp.gmail.com with ESMTPSA id r9sm3151363qtf.62.2021.05.06.13.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 May 2021 13:29:40 -0700 (PDT) From: Krzysztof Kozlowski To: Krzysztof Kozlowski , Daniel Lezcano , Thomas Gleixner , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH 5/5] MAINTAINERS: Include Samsung PWM in Samsung SoC entry Date: Thu, 6 May 2021 16:27:29 -0400 Message-Id: <20210506202729.157260-5-krzysztof.kozlowski@canonical.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> References: <20210506202729.157260-1-krzysztof.kozlowski@canonical.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org The Samsung PWM and PWM-based timer/clocksource drivers lacked dedicated maintainers entry. They are used on all Samsung SoC designs (although timer/clocksource driver only on older platforms), so include them in Samsung SoC entry maintained by Krzysztof Kozlowski. Signed-off-by: Krzysztof Kozlowski --- This can go via clocksource/drivers tree or I can take it via Samsung SoC. --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index efeaebe1bcae..bb9c5815a308 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2436,9 +2436,12 @@ F: drivers/*/*/*s3c24* F: drivers/*/*s3c24* F: drivers/*/*s3c64xx* F: drivers/*/*s5pv210* +F: drivers/clocksource/samsung_pwm_timer.c F: drivers/memory/samsung/ +F: drivers/pwm/pwm-samsung.c F: drivers/soc/samsung/ F: drivers/tty/serial/samsung* +F: include/clocksource/samsung_pwm.h F: include/linux/platform_data/*s3c* F: include/linux/serial_s3c.h F: include/linux/soc/samsung/