Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3098042imm; Tue, 29 May 2018 00:34:44 -0700 (PDT) X-Google-Smtp-Source: AB8JxZpXTf+x1sYfmZKRY9CY45XttGs7zvO4ReYXfgYAwtrIS7rpOuL4xG8yEJY2QKmdvhb8uWAG X-Received: by 2002:a17:902:1e2:: with SMTP id b89-v6mr16575589plb.279.1527579284573; Tue, 29 May 2018 00:34:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527579284; cv=none; d=google.com; s=arc-20160816; b=RbjJHwyOQdZlhL+1eZ/Vc5/P67eeW3jc+z9r18sWzNlbd3X+PZt+au0ynZCm18ffP8 6XTD2ZgjwoDfMT8QFc+kfwvzn+E+2tKBoLYkbEJEQfUBfvV6JYvLihqONnDnCat/1Myk tT6RC43KyDbKbUz04g2hSeDArmktdAwcE5bpeVhjUJ/SmjpXjx9vHlXE/eVfblDUUv+I /R8i+NgOHM9GqM4UDYWgDTywpuzw6VI+W7tluVA8XYqUoXE5nrGxLsC0fi3MilYmyt41 Vtt20EaPQMZbwkxl+xRAAePiZ4koDnhDrD8Yq28z9EI5m1cHegWK+h65n9a7nw9/fVMu Xe7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=2+IriSKbhhC5SGqJI5od7ZuBbb/egHB/FiT1FpgZTwo=; b=cg6E5mvuNgN5pLZLAonFIv/YCucsSFN151VSsTnK6vOC+6FIvwfzvOoIggbzHCMVuH bdLImAytxmiLC1J3hp+3nW8Gz2P4fsrh+ArsfT1W/A90WPQ5Yh27uXqGIOs6r6nodP9J Z7b/bqtkK/ihEMNxguCS+R7HFGNbh9yTq93zaWzLH7mCJ6x/lhiOC9UsRpHLCu8RxBLl M7bO4jAclWojRyQ9Dh3/ALgZoLiwtRJL3NUVVa/rxdB5qN7osmoIe98EgF115ZJemuvx rGdwkDvlBMKWqYbu0VLf/kTmha6fSYMRgnwyiqeyEgr9X11o+fQUzgDVlIpenyVXW0t/ GMLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Kze8Qukp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g22-v6si24685197pgv.468.2018.05.29.00.34.30; Tue, 29 May 2018 00:34:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=Kze8Qukp; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754901AbeE2Hd5 (ORCPT + 99 others); Tue, 29 May 2018 03:33:57 -0400 Received: from mail-ua0-f196.google.com ([209.85.217.196]:42144 "EHLO mail-ua0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754863AbeE2Hdv (ORCPT ); Tue, 29 May 2018 03:33:51 -0400 Received: by mail-ua0-f196.google.com with SMTP id x18-v6so2569670uaj.9; Tue, 29 May 2018 00:33:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=2+IriSKbhhC5SGqJI5od7ZuBbb/egHB/FiT1FpgZTwo=; b=Kze8QukpGEwruKTSuvkbyT9UsgtMweE7CYEF0OVFwzGkIjBtj0y7XF3HwwdIyH45R0 SPhZ08aYRybHgyl7VdO3/CaN1uVeGvjxgkQGOyQOgbkNQbArI+gV2sgJ4+GMhnnRv7rv ka5d2vVaTCDBtTbIVHglAoCYcHFjscnqRYe6arhZh9yH7vNLAvVsIbJXH3e1PChQOSkd k2NDe0FueAHoBzndSuWjHAAxV+p+7S1wIfLU3Sq74voaoBACX4lygfegX9POCXjlvG85 s+mL1pHMWoLD0B8boCLfO1TpPCVLtnpBk21SxiQsMTTn7s9IJYRP+wNgF1iFvU0GDbEN aJhQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=2+IriSKbhhC5SGqJI5od7ZuBbb/egHB/FiT1FpgZTwo=; b=g6noIHgUoERghhjiHnm8F/3nUMefLL72XGEvNI8oe6VS5zATu1K0v1mz+Kxsz9apIO urN3G/faVSOWzovweDVzzR0z1bgza26ZdNfgjg98YqcH59dh//6DA/LBreoxyLXmwu0s bp0hOm452zwfqUPI2mf39kcpSOdcimCK9hOpt1dQwHqwboK9STktX/TFckgB74w+J/cf hG/GZEzM/ZbBB1967HI0vmnI30lwRwffuqJkIdJB60TW2bjgG65BqHGaVpSd+qLRw6A2 tquHkuyJAM8iBt79baeyB2F8VkWAZM6Td3RqNll8L+gzr9M0BzpoyhZDxyx3YtdqCdbn OQvQ== X-Gm-Message-State: ALKqPwdJNUIMQa4A7p//1nlgGtCMWH4sZJNoGyrILr4d0u4vBNn/wB4N rLh5d/oFXal3tzX6VkGNNZcCurGv924I/AUtaPAayIXW X-Received: by 2002:a9f:35c5:: with SMTP id u5-v6mr11379112uad.26.1527579230820; Tue, 29 May 2018 00:33:50 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a67:7a0a:0:0:0:0:0 with HTTP; Tue, 29 May 2018 00:33:50 -0700 (PDT) In-Reply-To: <1527525431-22852-4-git-send-email-jacopo+renesas@jmondi.org> References: <1527525431-22852-1-git-send-email-jacopo+renesas@jmondi.org> <1527525431-22852-4-git-send-email-jacopo+renesas@jmondi.org> From: Geert Uytterhoeven Date: Tue, 29 May 2018 09:33:50 +0200 X-Google-Sender-Auth: DHuH0CZ2ECoBPBz-3EhvRLrG1zo Message-ID: Subject: Re: [PATCH 3/5] arch: sh: kfr2r09: Use new renesas-ceu camera driver To: Jacopo Mondi Cc: Hans Verkuil , Laurent Pinchart , Sakari Ailus , Mauro Carvalho Chehab , Yoshinori Sato , Rich Felker , Linux-Renesas , Linux Media Mailing List , Linux-sh list , Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Jacopo, On Mon, May 28, 2018 at 6:37 PM, Jacopo Mondi wrote: > Use the new renesas-ceu camera driver in kfr2r09 board file instead of > the soc_camera based sh_mobile_ceu_camera driver. > > Get rid of soc_camera specific components, and move clk and gpio handling > away from board file, registering the clock source and the enable gpios > for driver consumption. > > Memory for the CEU video buffers is now reserved with membocks APIs, > and need to be declared as dma_coherent during machine initialization to > remove that architecture specific part from CEU driver. > > While at there update license to SPDX header and sort headers alphabetically. > > No need to udapte the clock source names, as > commit c2f9b05fd5c1 ("media: arch: sh: ecovec: Use new renesas-ceu camera driver") > already updated it to the new ceu driver name for all SH7724 boards (possibly > breaking kfr2r09 before this commit). > > Compile tested only. > > Signed-off-by: Jacopo Mondi Thanks for your patch! > --- a/arch/sh/boards/mach-kfr2r09/setup.c > +++ b/arch/sh/boards/mach-kfr2r09/setup.c > @@ -1,41 +1,53 @@ > @@ -635,6 +580,36 @@ static int __init kfr2r09_devices_setup(void) > > i2c_register_board_info(0, &kfr2r09_backlight_board_info, 1); > > + /* Set camera clock frequency and register and alias for rj54n1. */ > + camera_clk = clk_get(NULL, "video_clk"); > + if (!IS_ERR(camera_clk)) { > + clk_set_rate(camera_clk, > + clk_round_rate(camera_clk, CEU_MCLK_FREQ)); > + clk_put(camera_clk); > + } > + clk_add_alias(NULL, "1-0050", "video_clk", NULL); > + > + /* set DRVCRB > + * > + * use 1.8 V for VccQ_VIO > + * use 2.85V for VccQ_SR > + */ > + __raw_writew((__raw_readw(DRVCRB) & ~0x0003) | 0x0001, DRVCRB); > + > + gpiod_add_lookup_table(&rj54n1_gpios); > + > + i2c_register_board_info(1, &kfr2r09_i2c_camera, 1); > + > + /* Initialize CEU platform device separately to map memory first */ > + device_initialize(&kfr2r09_ceu_device.dev); > + arch_setup_pdev_archdata(&kfr2r09_ceu_device); arch_setup_pdev_archdata() is a no-op on SH, so I think this can be dropped (also in patches 4/5 and 5/5). Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds