From patchwork Tue Apr 19 13:36:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 12818575 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 B33A6C433F5 for ; Tue, 19 Apr 2022 14:14:23 +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:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=tZxlKUM+BSRPn2Ha+qjIrOrdcsIxs6CcWx1qAm/+Rl0=; b=Eap2vasbZXisVP amq1zuz0qNDaT4LJAZ2wZhDuBGB1nY2TrBaUlUniEQRtQ/Px6i9N8VpHOc6Ng2/7j7vaY7a6sjUOE ckFu9/JUGuz0zqVI1Me2DeMTyJ3CYlGZtZlBHMH5c3WCOL/kz6b97mEWpOq7gdPNH6O1zr7nwNK+V +XMnJ6rGnoAO+2TruCGQJWON7ZN6xKG5FwK0dGnF+/TsGp8qjYcmltQrVkvdF5zWJHHOEBMsQzTo2 Kj/htB5x+D83DvEnJ3Uaw0ul8DYi6CctQ6mAfqdLp0QKNqz3A1tygv3TJmHT3z5plY5/pkzNJyc9e Dd+i+FrkvubVb746Piow==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngoaJ-0049vI-TS; Tue, 19 Apr 2022 14:12:04 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ngo3H-003ujq-0e for linux-arm-kernel@lists.infradead.org; Tue, 19 Apr 2022 13:37:56 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 1F6F06169F; Tue, 19 Apr 2022 13:37:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39DE8C385A8; Tue, 19 Apr 2022 13:37:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1650375473; bh=t86HMs480nJ81wDi3aXmoHW9AjEzd927cpvY7iUPkRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=q1oWQPoZS7/CENhb5OPLC7YJ2sk5BX0Sd+TR7Ne2RbCX+e8cAKq8cwuskbrP54N8y stQZ598/GBeuriRAogXLbe7l2++zRj9NvvKdunSnGmHIycGC7BrO0A6CdtSklsrDOc hCpSAcyylOign9vUpLxEd7s3xbU8j0GLafaS11OmXeTYCHwfoODc14V2+61/hy14jV V3DE6MU1MIbRw0VhLnmngnMuv5cH7WF6tiE/ouBgQn9Bq49QmvAKcXEu8Yo+jYH8JT k3XjmyW8CWF3oBmp9Ft52/Ap2qUIjZrTYHUIc5Ot7q4x0/rQS5znuTVT5ci9wr0C6Y uHZkXXfi0EBrQ== From: Arnd Bergmann To: linux-omap@vger.kernel.org, tony@atomide.com, aaro.koskinen@iki.fi, jmkrzyszt@gmail.com Cc: Arnd Bergmann , Russell King , Paul Walmsley , Kevin Hilman , Peter Ujfalusi , Vinod Koul , Dmitry Torokhov , Ulf Hansson , Dominik Brodowski , Mark Brown , Felipe Balbi , Alan Stern , Lee Jones , Daniel Thompson , Jingoo Han , Helge Deller , Linus Walleij , Krzysztof Kozlowski , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org, dmaengine@vger.kernel.org, linux-input@vger.kernel.org, linux-mmc@vger.kernel.org, linux-serial@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org, Bartlomiej Zolnierkiewicz Subject: [PATCH 02/41] ARM: omap1: innovator: pass lcd control address as pdata Date: Tue, 19 Apr 2022 15:36:44 +0200 Message-Id: <20220419133723.1394715-3-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20220419133723.1394715-1-arnd@kernel.org> References: <20220419133723.1394715-1-arnd@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220419_063755_209677_1F540CA7 X-CRM114-Status: GOOD ( 19.81 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Arnd Bergmann To avoid using the mach/omap1510.h header file, pass the correct address as platform data. Acked-by: Bartlomiej Zolnierkiewicz Signed-off-by: Arnd Bergmann --- arch/arm/mach-omap1/board-innovator.c | 3 +++ drivers/video/fbdev/omap/lcd_inn1510.c | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/arch/arm/mach-omap1/board-innovator.c b/arch/arm/mach-omap1/board-innovator.c index cbe093f969d5..2425f1bacb33 100644 --- a/arch/arm/mach-omap1/board-innovator.c +++ b/arch/arm/mach-omap1/board-innovator.c @@ -194,6 +194,9 @@ static struct platform_device innovator1510_smc91x_device = { static struct platform_device innovator1510_lcd_device = { .name = "lcd_inn1510", .id = -1, + .dev = { + .platform_data = (void __force *)OMAP1510_FPGA_LCD_PANEL_CONTROL, + } }; static struct platform_device innovator1510_spi_device = { diff --git a/drivers/video/fbdev/omap/lcd_inn1510.c b/drivers/video/fbdev/omap/lcd_inn1510.c index 776e7f8d656e..37ed0c14aa5a 100644 --- a/drivers/video/fbdev/omap/lcd_inn1510.c +++ b/drivers/video/fbdev/omap/lcd_inn1510.c @@ -14,15 +14,17 @@ #include "omapfb.h" +static void __iomem *omap1510_fpga_lcd_panel_control; + static int innovator1510_panel_enable(struct lcd_panel *panel) { - __raw_writeb(0x7, OMAP1510_FPGA_LCD_PANEL_CONTROL); + __raw_writeb(0x7, omap1510_fpga_lcd_panel_control); return 0; } static void innovator1510_panel_disable(struct lcd_panel *panel) { - __raw_writeb(0x0, OMAP1510_FPGA_LCD_PANEL_CONTROL); + __raw_writeb(0x0, omap1510_fpga_lcd_panel_control); } static struct lcd_panel innovator1510_panel = { @@ -48,6 +50,7 @@ static struct lcd_panel innovator1510_panel = { static int innovator1510_panel_probe(struct platform_device *pdev) { + omap1510_fpga_lcd_panel_control = (void __iomem *)pdev->dev.platform_data; omapfb_register_panel(&innovator1510_panel); return 0; }