From 16f3c8ceb9886676b0310c735526581bbc292f74 Mon Sep 17 00:00:00 2001 From: Tony Lindgren Date: Mon, 3 Dec 2007 10:57:01 -0800 Subject: [PATCH] ARM: OMAP: User GPLv2 for MMU, make checkpatch.pl happier This patch changes MMU code to use GPLv2 as requested by Paul Mundt. It also does some minor formatting to make checkpatch.pl mostly happy, and removes dummy release function. Signed-off-by: Tony Lindgren --- arch/arm/mach-omap1/mmu.c | 36 ++++++++++---------------- arch/arm/mach-omap1/mmu.h | 4 +-- arch/arm/mach-omap2/mmu.c | 14 ++-------- arch/arm/mach-omap2/mmu.h | 6 ++--- arch/arm/plat-omap/mmu.c | 19 ++------------ include/asm-arm/arch-omap/dsp_common.h | 17 +++--------- 6 files changed, 25 insertions(+), 71 deletions(-) diff --git a/arch/arm/mach-omap1/mmu.c b/arch/arm/mach-omap1/mmu.c index 2d05708de7a..3bb3efe54d9 100644 --- a/arch/arm/mach-omap1/mmu.c +++ b/arch/arm/mach-omap1/mmu.c @@ -9,18 +9,8 @@ * and Paul Mundt * * 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 + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. */ #include #include @@ -286,7 +276,7 @@ static void omap1_mmu_interrupt(struct omap_mmu *mmu) /* if the fault is masked, nothing to do */ if ((status & MMUFAULT_MASK) == 0) { - pr_debug( "MMU interrupt, but ignoring.\n"); + pr_debug("MMU interrupt, but ignoring.\n"); /* * note: in OMAP1710, * when CACHE + DMA domain gets out of idle in DSP, @@ -294,16 +284,16 @@ static void omap1_mmu_interrupt(struct omap_mmu *mmu) * in this case, we just ignore the interrupt. */ if (status) { - pr_debug( "%s%s%s%s\n", - (status & OMAP_MMU_FAULT_ST_PREF)? - " (prefetch err)" : "", - (status & OMAP_MMU_FAULT_ST_PERM)? - " (permission fault)" : "", - (status & OMAP_MMU_FAULT_ST_TLB_MISS)? - " (TLB miss)" : "", - (status & OMAP_MMU_FAULT_ST_TRANS) ? - " (translation fault)": ""); - pr_debug( "fault address = %#08lx\n", va); + pr_debug("%s%s%s%s\n", + (status & OMAP_MMU_FAULT_ST_PREF)? + " (prefetch err)" : "", + (status & OMAP_MMU_FAULT_ST_PERM)? + " (permission fault)" : "", + (status & OMAP_MMU_FAULT_ST_TLB_MISS)? + " (TLB miss)" : "", + (status & OMAP_MMU_FAULT_ST_TRANS) ? + " (translation fault)": ""); + pr_debug("fault address = %#08lx\n", va); } enable_irq(mmu->irq); return; diff --git a/arch/arm/mach-omap1/mmu.h b/arch/arm/mach-omap1/mmu.h index 521c3bf287b..918688efe6c 100644 --- a/arch/arm/mach-omap1/mmu.h +++ b/arch/arm/mach-omap1/mmu.h @@ -76,7 +76,7 @@ #define OMAP_MMU_LD_TLB_RD 0x0002 -#define INIT_TLB_ENTRY(ent,v,p,ps) \ +#define INIT_TLB_ENTRY(ent, v, p, ps) \ do { \ (ent)->va = (v); \ (ent)->pa = (p); \ @@ -86,7 +86,7 @@ do { \ (ent)->tlb = 1; \ } while (0) -#define INIT_TLB_ENTRY_4KB_PRESERVED(ent,v,p) \ +#define INIT_TLB_ENTRY_4KB_PRESERVED(ent, v, p) \ do { \ (ent)->va = (v); \ (ent)->pa = (p); \ diff --git a/arch/arm/mach-omap2/mmu.c b/arch/arm/mach-omap2/mmu.c index d5c15838849..f8bb6dfa11a 100644 --- a/arch/arm/mach-omap2/mmu.c +++ b/arch/arm/mach-omap2/mmu.c @@ -11,18 +11,8 @@ * TWL support: Hiroshi DOYU * * 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 + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. */ #include #include diff --git a/arch/arm/mach-omap2/mmu.h b/arch/arm/mach-omap2/mmu.h index 818ea8c14e8..bae9db79a7d 100644 --- a/arch/arm/mach-omap2/mmu.h +++ b/arch/arm/mach-omap2/mmu.h @@ -59,7 +59,7 @@ #define IOMAP_VAL 0x3f -#define INIT_TLB_ENTRY(ent,v,p,ps) \ +#define INIT_TLB_ENTRY(ent, v, p, ps) \ do { \ (ent)->va = (v); \ (ent)->pa = (p); \ @@ -71,7 +71,7 @@ do { \ (ent)->tlb = 1; \ } while (0) -#define INIT_TLB_ENTRY_4KB_PRESERVED(ent,v,p) \ +#define INIT_TLB_ENTRY_4KB_PRESERVED(ent, v, p) \ do { \ (ent)->va = (v); \ (ent)->pa = (p); \ @@ -82,7 +82,7 @@ do { \ (ent)->mixed = 0; \ } while (0) -#define INIT_TLB_ENTRY_4KB_ES32_PRESERVED(ent,v,p) \ +#define INIT_TLB_ENTRY_4KB_ES32_PRESERVED(ent, v, p) \ do { \ (ent)->va = (v); \ (ent)->pa = (p); \ diff --git a/arch/arm/plat-omap/mmu.c b/arch/arm/plat-omap/mmu.c index 5c0a9efbb05..b7ae3d21237 100644 --- a/arch/arm/plat-omap/mmu.c +++ b/arch/arm/plat-omap/mmu.c @@ -11,18 +11,8 @@ * TWL support: Hiroshi DOYU * * 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 + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. */ #include #include @@ -1466,13 +1456,8 @@ static ssize_t mempool_show(struct class *class, char *buf) static CLASS_ATTR(mempool, S_IRUGO, mempool_show, NULL); -static void omap_mmu_class_dev_release(struct device *dev) -{ -} - static struct class omap_mmu_class = { .name = "mmu", - .dev_release = omap_mmu_class_dev_release, }; int omap_mmu_register(struct omap_mmu *mmu) diff --git a/include/asm-arm/arch-omap/dsp_common.h b/include/asm-arm/arch-omap/dsp_common.h index c52b6c65df0..fa8f3a65f6d 100644 --- a/include/asm-arm/arch-omap/dsp_common.h +++ b/include/asm-arm/arch-omap/dsp_common.h @@ -5,20 +5,9 @@ * * Contact: Toshihiro Kobayashi * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License - * version 2 as published by the Free Software Foundation. - * - * 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., 51 Franklin St, Fifth Floor, Boston, MA - * 02110-1301 USA - * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. */ #ifndef ASM_ARCH_DSP_COMMON_H -- 2.41.1