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: 2846230 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 5AF759F242 for ; Sun, 18 Aug 2013 20:14:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 50EE32026F for ; Sun, 18 Aug 2013 20:14:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5C5DA20221 for ; Sun, 18 Aug 2013 20:14:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754731Ab3HRUOq (ORCPT ); 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-Spam-Status: No, score=-9.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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"); -