From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Jacopo Mondi <jacopo+renesas@jmondi.org>
Cc: Hans Verkuil <hverkuil@xs4all.nl>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Sakari Ailus <sakari.ailus@iki.fi>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
Linux Media Mailing List <linux-media@vger.kernel.org>,
Linux-sh list <linux-sh@vger.kernel.org>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 3/5] arch: sh: kfr2r09: Use new renesas-ceu camera driver
Date: Tue, 29 May 2018 09:33:50 +0200 [thread overview]
Message-ID: <CAMuHMdXuD8R5KL4msAnVPxrf5GyyA=o_q3R74sOeQJ1tr5DbXw@mail.gmail.com> (raw)
In-Reply-To: <1527525431-22852-4-git-send-email-jacopo+renesas@jmondi.org>
Hi Jacopo,
On Mon, May 28, 2018 at 6:37 PM, Jacopo Mondi <jacopo+renesas@jmondi.org> 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 <jacopo+renesas@jmondi.org>
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
next prev parent reply other threads:[~2018-05-29 7:33 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-28 16:37 [PATCH 0/5] Remove sh_mobile_ceu_camera from arch/sh Jacopo Mondi
2018-05-28 16:37 ` [PATCH 1/5] media: i2c: Copy rj54n1cb0c soc_camera sensor driver Jacopo Mondi
2018-05-28 16:37 ` [PATCH 2/5] media: i2c: rj54n1: Remove soc_camera dependencies Jacopo Mondi
2018-05-28 16:37 ` [PATCH 3/5] arch: sh: kfr2r09: Use new renesas-ceu camera driver Jacopo Mondi
2018-05-29 7:33 ` Geert Uytterhoeven [this message]
2018-05-31 2:48 ` kbuild test robot
2018-05-28 16:37 ` [PATCH 4/5] arch: sh: ms7724se: " Jacopo Mondi
2018-05-28 16:37 ` [PATCH 5/5] arch: sh: ap325rxa: " Jacopo Mondi
2018-08-31 12:25 ` [PATCH 0/5] Remove sh_mobile_ceu_camera from arch/sh Sakari Ailus
2018-09-03 7:22 ` jacopo mondi
2018-09-04 9:33 ` jacopo mondi
2018-09-04 9:43 ` Sakari Ailus
2018-09-04 10:04 ` jacopo mondi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMuHMdXuD8R5KL4msAnVPxrf5GyyA=o_q3R74sOeQJ1tr5DbXw@mail.gmail.com' \
--to=geert@linux-m68k.org \
--cc=dalias@libc.org \
--cc=hverkuil@xs4all.nl \
--cc=jacopo+renesas@jmondi.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@iki.fi \
--cc=ysato@users.sourceforge.jp \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).