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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E8A78C433F5 for ; Mon, 28 Feb 2022 16:32:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Reply-To:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nlVzlUEbQBxp6WWFfgUuNku1p5W0UgQfPUtpmMMF3UY=; b=vY6xig3KXJkrtc c9TKTdX2LM2t7k446iP3zPaXeTmLXD1Lk7we1cfw2I2X5F4qiw7OeJd9Ef77L5n9Oz/tmHW1E+755 T4IZuJ7mycPXIZVtgG1/EBWXnR9EKRxfkUYrgpgy6qZhMgCD0b0QDFtv2Jn1e8EFoqUlT24wO973W Yu34RZhgaeV1r56UZEcBb9oaAV36/MA3bokWqedzfrQlpG5wEEdQCSVx/cpxYegIVFrTa+cl48Xp+ WXMZFEvzi4JO4A4EkYVtv6OeOOZJ14sm46sYFSADtS6eYeUUGaiJgIY+1HHlraU2q9CKQBh80WvUA pgyIwLT/PbqfUaZRMNXw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOivf-00DKys-Uv; Mon, 28 Feb 2022 16:31:20 +0000 Received: from mail-qv1-xf31.google.com ([2607:f8b0:4864:20::f31]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nOivc-00DKxJ-6Y for linux-arm-kernel@lists.infradead.org; Mon, 28 Feb 2022 16:31:17 +0000 Received: by mail-qv1-xf31.google.com with SMTP id j5so13308405qvs.13 for ; Mon, 28 Feb 2022 08:31:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:date:from:to:cc:subject:message-id:reply-to:references :mime-version:content-disposition:in-reply-to; bh=0v5Ckr1BDvRGMYGQtUBSqVcVVBpicAq+TzDB2F3SP4o=; b=YgdXPRHNMr7ESPJgRgejeW8bNoHc3EGMzNh4lphq5r0WwBMt53GULPczyF6A2tkjjS S8EEQWKQAnJbY/RF81NvNsIlTMu1QgGxarrhCnrgvSbUgmwhYah+MT21kkhAGNIFIuD5 77owdGklRrsmOhpHAcQd7EWiYVBrsfVV4skszqh/B0o5VrAJjtgCnQTp7suhj37xf/B0 IXmQQ8mOYN1Hy8FB4CKZCBusDRQot/5NLVon3XjArGdufyaSn/4U5xHNVwS9CpNk/l1x ndfAuQDzayw7dASgnOqiCDjloMhu2bZM2iwQw0/tQ+Oqw2y5279Wb0lUMTu9i5OBrQEJ z1sQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :reply-to:references:mime-version:content-disposition:in-reply-to; bh=0v5Ckr1BDvRGMYGQtUBSqVcVVBpicAq+TzDB2F3SP4o=; b=On/zACqVzPaMTzQNhTNZ4QhcIW6LG1nmlJuGF5B48WWbS/TrRixTkOHw4M1UlDOIHq q072usowsdnZ6hlH4SoeGuhTpLc9yFRnuR2V/vu7kLsB5h+rPGS4qUt6krIpXN6vT9xZ dGV3B+H96fx+r6utjoxyTQgmznlMd+9CXGlsvChD0whoI4i/pRz33lxSGmT7VkpyVNVv jeyn0rdeQci0X1WkQnPgDqOzeh9zOtxDiu/NL8UQ6eUIIbca5X0CAbVbRhO5x7OnFgkP VgKTnPybAtLV5Z3L3aKHD6UlKNz4dJJ+yZTSv6SBFZLVZ26lGAxFKjz0u2lES8/quGXR nw9A== X-Gm-Message-State: AOAM531ITQ+PNkUDNF8V7AL74fvPOFtwGShUtrVEEMyRjenl8x1jcgdK d5NIi8A78bMlZjOf4NlzJA== X-Google-Smtp-Source: ABdhPJwL0PBjt5DkBdjWmc0nAl4wxa/uDI5dSNQJNs1/HvpoAHiQicLk/dATNm6oY/04US6pqmLR0Q== X-Received: by 2002:a05:622a:102:b0:2de:6596:73ff with SMTP id u2-20020a05622a010200b002de659673ffmr16845123qtw.75.1646065873977; Mon, 28 Feb 2022 08:31:13 -0800 (PST) Received: from serve.minyard.net (serve.minyard.net. [2001:470:b8f6:1b::1]) by smtp.gmail.com with ESMTPSA id u3-20020a05622a010300b002dd22803f20sm7169063qtw.46.2022.02.28.08.31.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Feb 2022 08:31:13 -0800 (PST) Received: from minyard.net (unknown [IPv6:2001:470:b8f6:1b:4867:b6d9:d375:2409]) by serve.minyard.net (Postfix) with ESMTPSA id 43B151800BB; Mon, 28 Feb 2022 16:31:12 +0000 (UTC) Date: Mon, 28 Feb 2022 10:31:11 -0600 From: Corey Minyard To: Joel Stanley Cc: Andrew Jeffery , openipmi-developer@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH] ipmi: kcs: aspeed: Remove old bindings support Message-ID: <20220228163111.GD3457@minyard.net> References: <20220228062840.449215-1-joel@jms.id.au> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220228062840.449215-1-joel@jms.id.au> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220228_083116_269868_50A5CFBA X-CRM114-Status: GOOD ( 26.16 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: minyard@acm.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Feb 28, 2022 at 04:58:40PM +1030, Joel Stanley wrote: > It's been a few releases since we depreciated the "v1" bindings. Remove > support from the driver as all known device trees have been updated to > use the new bindings. It always feels good to get rid of old stuff you don't need :-). Applied for next release. -corey > > Signed-off-by: Joel Stanley > --- > This applies on top of the patch to add ast2600 support. I kept them > separate as the ast2600 change is suitable for backporting, but this one > is not. > > drivers/char/ipmi/kcs_bmc_aspeed.c | 68 +++--------------------------- > 1 file changed, 7 insertions(+), 61 deletions(-) > > diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c > index b555286016b1..cdc88cde1e9a 100644 > --- a/drivers/char/ipmi/kcs_bmc_aspeed.c > +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c > @@ -128,11 +128,6 @@ struct aspeed_kcs_bmc { > } obe; > }; > > -struct aspeed_kcs_of_ops { > - int (*get_channel)(struct platform_device *pdev); > - int (*get_io_address)(struct platform_device *pdev, u32 addrs[2]); > -}; > - > static inline struct aspeed_kcs_bmc *to_aspeed_kcs_bmc(struct kcs_bmc_device *kcs_bmc) > { > return container_of(kcs_bmc, struct aspeed_kcs_bmc, kcs_bmc); > @@ -475,38 +470,7 @@ static const struct kcs_ioreg ast_kcs_bmc_ioregs[KCS_CHANNEL_MAX] = { > { .idr = LPC_IDR4, .odr = LPC_ODR4, .str = LPC_STR4 }, > }; > > -static int aspeed_kcs_of_v1_get_channel(struct platform_device *pdev) > -{ > - struct device_node *np; > - u32 channel; > - int rc; > - > - np = pdev->dev.of_node; > - > - rc = of_property_read_u32(np, "kcs_chan", &channel); > - if ((rc != 0) || (channel == 0 || channel > KCS_CHANNEL_MAX)) { > - dev_err(&pdev->dev, "no valid 'kcs_chan' configured\n"); > - return -EINVAL; > - } > - > - return channel; > -} > - > -static int > -aspeed_kcs_of_v1_get_io_address(struct platform_device *pdev, u32 addrs[2]) > -{ > - int rc; > - > - rc = of_property_read_u32(pdev->dev.of_node, "kcs_addr", addrs); > - if (rc || addrs[0] > 0xffff) { > - dev_err(&pdev->dev, "no valid 'kcs_addr' configured\n"); > - return -EINVAL; > - } > - > - return 1; > -} > - > -static int aspeed_kcs_of_v2_get_channel(struct platform_device *pdev) > +static int aspeed_kcs_of_get_channel(struct platform_device *pdev) > { > struct device_node *np; > struct kcs_ioreg ioreg; > @@ -535,12 +499,11 @@ static int aspeed_kcs_of_v2_get_channel(struct platform_device *pdev) > if (!memcmp(&ast_kcs_bmc_ioregs[i], &ioreg, sizeof(ioreg))) > return i + 1; > } > - > return -EINVAL; > } > > static int > -aspeed_kcs_of_v2_get_io_address(struct platform_device *pdev, u32 addrs[2]) > +aspeed_kcs_of_get_io_address(struct platform_device *pdev, u32 addrs[2]) > { > int rc; > > @@ -567,7 +530,6 @@ aspeed_kcs_of_v2_get_io_address(struct platform_device *pdev, u32 addrs[2]) > > static int aspeed_kcs_probe(struct platform_device *pdev) > { > - const struct aspeed_kcs_of_ops *ops; > struct kcs_bmc_device *kcs_bmc; > struct aspeed_kcs_bmc *priv; > struct device_node *np; > @@ -585,15 +547,11 @@ static int aspeed_kcs_probe(struct platform_device *pdev) > return -ENODEV; > } > > - ops = of_device_get_match_data(&pdev->dev); > - if (!ops) > - return -EINVAL; > - > - channel = ops->get_channel(pdev); > + channel = aspeed_kcs_of_get_channel(pdev); > if (channel < 0) > return channel; > > - nr_addrs = ops->get_io_address(pdev, addrs); > + nr_addrs = aspeed_kcs_of_get_io_address(pdev, addrs); > if (nr_addrs < 0) > return nr_addrs; > > @@ -678,22 +636,10 @@ static int aspeed_kcs_remove(struct platform_device *pdev) > return 0; > } > > -static const struct aspeed_kcs_of_ops of_v1_ops = { > - .get_channel = aspeed_kcs_of_v1_get_channel, > - .get_io_address = aspeed_kcs_of_v1_get_io_address, > -}; > - > -static const struct aspeed_kcs_of_ops of_v2_ops = { > - .get_channel = aspeed_kcs_of_v2_get_channel, > - .get_io_address = aspeed_kcs_of_v2_get_io_address, > -}; > - > static const struct of_device_id ast_kcs_bmc_match[] = { > - { .compatible = "aspeed,ast2400-kcs-bmc", .data = &of_v1_ops }, > - { .compatible = "aspeed,ast2500-kcs-bmc", .data = &of_v1_ops }, > - { .compatible = "aspeed,ast2400-kcs-bmc-v2", .data = &of_v2_ops }, > - { .compatible = "aspeed,ast2500-kcs-bmc-v2", .data = &of_v2_ops }, > - { .compatible = "aspeed,ast2600-kcs-bmc", .data = &of_v2_ops }, > + { .compatible = "aspeed,ast2400-kcs-bmc-v2" }, > + { .compatible = "aspeed,ast2500-kcs-bmc-v2" }, > + { .compatible = "aspeed,ast2600-kcs-bmc" }, > { } > }; > MODULE_DEVICE_TABLE(of, ast_kcs_bmc_match); > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel