Re: [PATCH 1/6 v5] ARM: Add basic architecture support forVIA/WonderMedia 85xx SoC's
From: Russell King - ARM Linux
Date: Thu Nov 11 2010 - 18:50:52 EST
The good news is that it's getting harder to find things wrong...
Only three points follow below.
On Fri, Nov 12, 2010 at 12:23:22AM +0300, Alexey Charkov wrote:
> diff --git a/arch/arm/mach-vt8500/bv07.c b/arch/arm/mach-vt8500/bv07.c
> new file mode 100644
> index 0000000..25aea3d
> --- /dev/null
> +++ b/arch/arm/mach-vt8500/bv07.c
> @@ -0,0 +1,81 @@
> +/*
> + * arch/arm/mach-vt8500/bv07.c
> + *
> + * Copyright (C) 2010 Alexey Charkov <alchark@xxxxxxxxx>
> + *
> + * 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, or
> + * (at your option) any later version.
> + *
> + * 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.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
> + */
> +
> +#include <asm/mach-types.h>
> +#include <asm/mach/arch.h>
> +#include <linux/io.h>
> +#include <linux/pm.h>
asm/ includes after linux/ includes please (applies to multiple files).
> diff --git a/arch/arm/mach-vt8500/gpio.c b/arch/arm/mach-vt8500/gpio.c
> new file mode 100644
> index 0000000..f533ff0
> --- /dev/null
> +++ b/arch/arm/mach-vt8500/gpio.c
> @@ -0,0 +1,230 @@
> +/* linux/arch/arm/mach-vt8500/gpio.c
> + *
> + * Copyright (C) 2010 Alexey Charkov <alchark@xxxxxxxxx>
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * 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.
> + *
> + */
> +
> +#include <linux/init.h>
> +#include <linux/irq.h>
> +#include <linux/io.h>
> +
> +#include <mach/gpio.h>
linux/gpio.h please.
> +static int vt8500_irq_set_type(unsigned int irq, unsigned int flow_type)
> +{
> + void __iomem *base = ic_regbase;
> + unsigned int orig_irq = irq;
> + if (irq >= 64) {
> + base = sic_regbase;
> + irq -= 64;
> + }
> + switch (flow_type) {
> + case IRQF_TRIGGER_LOW:
> + return -EINVAL;
> + case IRQF_TRIGGER_HIGH:
> + writeb((readb(base
> + + VT8500_IC_DCTR + irq) & ~(3 << 4))
> + | VT8500_TRIGGER_HIGH, base
> + + VT8500_IC_DCTR + irq);
> + set_irq_handler(orig_irq, handle_level_irq);
> + break;
> + case IRQF_TRIGGER_FALLING:
> + writeb((readb(base
> + + VT8500_IC_DCTR + irq) & ~(3 << 4))
> + | VT8500_TRIGGER_FALLING, base
> + + VT8500_IC_DCTR + irq);
> + set_irq_handler(orig_irq, handle_edge_irq);
> + break;
> + case IRQF_TRIGGER_RISING:
> + writeb((readb(base
> + + VT8500_IC_DCTR + irq) & ~(3 << 4))
> + | VT8500_TRIGGER_RISING, base
> + + VT8500_IC_DCTR + irq);
> + set_irq_handler(orig_irq, handle_edge_irq);
These set_irq_handler's probably warn if you have spinlock debugging
enabled.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/