Re: [PATCH 10/10] boot-mode-reg: Convert to device tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 9, 2016 at 9:14 AM, Dirk Behme <dirk.behme@xxxxxxxxxxxx> wrote:
> --- a/drivers/misc/boot-mode-reg/rcar.c
> +++ b/drivers/misc/boot-mode-reg/rcar.c
> @@ -16,24 +16,32 @@
>  #include <linux/io.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/of_address.h>
>
>  #include <misc/boot-mode-reg.h>
>
> -#define MODEMR 0xe6160060
> -
>  static int __init rcar_read_mode_pins(void)
>  {
>         void __iomem *modemr;
> +       struct device_node *np;
>         int err = -ENOMEM;
>         static u32 mode;
>
> -       modemr = ioremap_nocache(MODEMR, 4);
> +       np = of_find_compatible_node(NULL, NULL, "renesas,modemr");
> +       if (!np) {
> +               pr_err("can't find renesas,modemr device node");
> +               goto err;

At least for R-Car Gen2, we need to preserve compatibility with old DTBs that
don't have the node in DT.

> +       }
> +
> +       modemr = of_iomap(np, 0);

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@xxxxxxxxxxxxxx

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



[Index of Archives]     [Linux Samsung SOC]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux