From patchwork Sun Aug 18 20:14:27 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 19780 X-Patchwork-Delegate: sylvester.nawrocki@gmail.com Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1VB9NG-0005hR-U7; Sun, 18 Aug 2013 22:14:54 +0200 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.72/mailfrontend-7) with esmtp id 1VB9NE-00058E-2H; Sun, 18 Aug 2013 22:14:54 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754731Ab3HRUOq (ORCPT + 1 other); Sun, 18 Aug 2013 16:14:46 -0400 Received: from mail-ee0-f51.google.com ([74.125.83.51]:41209 "EHLO mail-ee0-f51.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753613Ab3HRUOq (ORCPT ); Sun, 18 Aug 2013 16:14:46 -0400 Received: by mail-ee0-f51.google.com with SMTP id c1so1791650eek.38 for ; Sun, 18 Aug 2013 13:14:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=7gSU9+d9ttVdZGj+2xrf3rgidWK9zRMY08lZcXsw2Pc=; b=OvpA9UWopYf5rLZx5URXLgGZ8fBnWVg3hPFV0xjcW6d94W2R35ebESds24mbcHoJjE bQKth8+cgXIToPhYqFVNFKJQ2aoVGr8EZFxkozmusP7Mzb7CAz3eLjhuzJhWoO2hp5rY AArM0ENz42Dbqc7wSYriiJomcRn9LSWpOUpOw+lKBTqkIrl3kdgwfVtaLU+zsf4gk4sl aXKKxw8wjkHIcigXtBEVtU9KubLo9Bk8xT/KgOyAdTidYiFLHceCDxpFpA7Lb/nS/ddA yUCXqAQv92LXnnY71mfbnC6wAHQ9qG6l4WeL8xeOx1+nTjXgBlciI9J3eCIxPg4IEaaG 2u2g== X-Received: by 10.14.111.9 with SMTP id v9mr16494056eeg.35.1376856884207; Sun, 18 Aug 2013 13:14:44 -0700 (PDT) Received: from localhost.localdomain (093105185086.warszawa.vectranet.pl. [93.105.185.86]) by mx.google.com with ESMTPSA id a4sm12342263eez.0.1969.12.31.16.00.00 (version=TLSv1 cipher=RC4-SHA bits=128/128); Sun, 18 Aug 2013 13:14:43 -0700 (PDT) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, Sylwester Nawrocki , Andrzej Pietrasiewicz Subject: [PATCH] s5p-jpeg: Add initial device tree support for S5PV210/Exynos4210 SoCs Date: Sun, 18 Aug 2013 22:14:27 +0200 Message-Id: <1376856867-17771-1-git-send-email-s.nawrocki@samsung.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 6.0.0.2142326, Antispam-Engine: 2.7.2.2107409, Antispam-Data: 2013.8.18.195716 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' FORGED_FROM_GMAIL 0.1, MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_2000_2999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MULTIPLE_RCPTS_CC_X2 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __YOUTUBE_RCVD 0' This patch enables the JPEG codec on S5PV210 and Exynos4210 SoCs. There are some differences in newer versions of the JPEG codec IP on SoCs like Exynos4x12 and Exynos5 series and support for them will be added in subsequent patches. Cc: Andrzej Pietrasiewicz Signed-off-by: Sylwester Nawrocki Acked-by: Stephen Warren --- .../bindings/media/exynos-jpeg-codec.txt | 11 +++++++++++ drivers/media/platform/s5p-jpeg/jpeg-core.c | 12 +++++++++++- 2 files changed, 22 insertions(+), 1 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt diff --git a/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt new file mode 100644 index 0000000..937b755 --- /dev/null +++ b/Documentation/devicetree/bindings/media/exynos-jpeg-codec.txt @@ -0,0 +1,11 @@ +Samsung S5P/EXYNOS SoC series JPEG codec + +Required properties: + +- compatible : should be one of: + "samsung,s5pv210-jpeg", "samsung,exynos4210-jpeg"; +- reg : address and length of the JPEG codec IP register set; +- interrupts : specifies the JPEG codec IP interrupt; +- clocks : should contain the JPEG codec IP gate clock specifier, from the + common clock bindings; +- clock-names : should contain "jpeg" entry. diff --git a/drivers/media/platform/s5p-jpeg/jpeg-core.c b/drivers/media/platform/s5p-jpeg/jpeg-core.c index 15d2396..88c5beb 100644 --- a/drivers/media/platform/s5p-jpeg/jpeg-core.c +++ b/drivers/media/platform/s5p-jpeg/jpeg-core.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -1513,10 +1514,20 @@ static const struct dev_pm_ops s5p_jpeg_pm_ops = { .runtime_resume = s5p_jpeg_runtime_resume, }; +#ifdef CONFIG_OF +static const struct of_device_id s5p_jpeg_of_match[] = { + { .compatible = "samsung,s5pv210-jpeg" }, + { .compatible = "samsung,exynos4210-jpeg" }, + { /* sentinel */ }, +}; +MODULE_DEVICE_TABLE(of, s5p_jpeg_of_match); +#endif + static struct platform_driver s5p_jpeg_driver = { .probe = s5p_jpeg_probe, .remove = s5p_jpeg_remove, .driver = { + .of_match_table = of_match_ptr(s5p_jpeg_of_match), .owner = THIS_MODULE, .name = S5P_JPEG_M2M_NAME, .pm = &s5p_jpeg_pm_ops, @@ -1528,4 +1539,3 @@ module_platform_driver(s5p_jpeg_driver); MODULE_AUTHOR("Andrzej Pietrasiewicz "); MODULE_DESCRIPTION("Samsung JPEG codec driver"); MODULE_LICENSE("GPL"); -