lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <11085187.4PsQNSVmtx@avalon>
Date:	Wed, 13 Mar 2013 14:14:33 +0100
From:	Laurent Pinchart <laurent.pinchart@...asonboard.com>
To:	Magnus Damm <magnus.damm@...il.com>
Cc:	linux-kernel@...r.kernel.org, linux-sh@...r.kernel.org,
	linus.walleij@...aro.org, grant.likely@...retlab.ca,
	horms@...ge.net.au
Subject: Re: [PATCH 01/03] gpio: Renesas R-Car GPIO driver V2

Hi Magnus,

Thanks for the patch.

I've reviewed the result of squashing the 3 patches together, I just have one 
comment.

On Wednesday 13 March 2013 20:32:13 Magnus Damm wrote:
> From: Magnus Damm <damm@...nsource.se>
> 
> This patch is V2 of a GPIO driver for the R-Car series of
> SoCs from Renesas. This driver is designed to be reusable
> between multiple SoCs that share the same basic building block,
> but so far it has only been used on R-Car H1 (r8a7779).
> 
> Each driver instance handles 32 GPIOs with individually
> maskable IRQs. The driver operates on a single I/O memory
> range and the 32 GPIOs are hooked up a single interrupt.
> 
> In the case of R-Car H1 either external IRQ pins or GPIOs
> with interrupts can be used for on-board interupts. For
> external IRQs 4 pins are supported, and in the case of GPIO
> there are 202 GPIOS as 202 interrupts hooked up via 6 driver
> instances and to the GIC and the Cortex-A9 Quad.
> 
> At this point this driver is interfacing as a regular
> platform device driver. In the future DT support will be
> submitted as an incremental feature patch.
> 
> Signed-off-by: Magnus Damm <damm@...nsource.se>
> ---
> 
>  Changes since V1:
>  - Update based on most suggestions from review by Laurent, thanks!
> 
>  Please note that in V2 the driver is reworked to reduce the number of
>  lines and includes minor changes related to headers, printouts and
>  data types. In V2 the register access order is kept the same as in V1,
>  and to make that happen IRQCHIP_SET_TYPE_MASKED is omitted. The interface
>  to the Linux kernel is unchanged except the use of dev_dbg() instead of
>  pr_debug(). So from a hardware point of view V2 is a drop in replacement
>  for V1 and there should be no additional dependencies since devm is
>  kept as a separate patch as well. All this to make back porting easier.
> 
>  drivers/gpio/Kconfig                    |    6
>  drivers/gpio/Makefile                   |    1
>  drivers/gpio/gpio-rcar.c                |  383 ++++++++++++++++++++++++++++
>  include/linux/platform_data/gpio-rcar.h |   25 ++
>  4 files changed, 415 insertions(+)

[snip]

> --- /dev/null
> +++ work/drivers/gpio/gpio-rcar.c	2013-03-13 19:41:35.000000000 +0900
> @@ -0,0 +1,383 @@
> +/*
> + * Renesas R-Car GPIO Support
> + *
> + *  Copyright (C) 2013 Magnus Damm
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */

[snip]

> +static int gpio_rcar_irq_domain_map(struct irq_domain *h, unsigned int
> virq,
> +				 irq_hw_number_t hw)
> +{
> +	struct gpio_rcar_priv *p = h->host_data;
> +
> +	dev_dbg(&p->pdev->dev, "map hw irq = %d, virq = %d\n", (int)hw, virq);
> +
> +	irq_set_chip_data(virq, h->host_data);
> +	irq_set_chip_and_handler(virq, &p->irq_chip, handle_level_irq);
> +	set_irq_flags(virq, IRQF_VALID); /* kill me now */

What is that comment about ?

> +	return 0;
> +}

-- 
Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ