From ac32f3238c1d95a6ebea2c312160dbdbd61bf91c Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 24 Jul 2008 22:53:27 +0200 Subject: ide-generic: fix ide_default_io_base() for m32r Fix ide_default_io_base() to match ide_default_irq(). Cc: Hirokazu Takata Signed-off-by: Bartlomiej Zolnierkiewicz --- include/asm-m32r/ide.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/asm-m32r') diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index 1e7f6474d13..72798d62422 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -52,12 +52,20 @@ static __inline__ int ide_default_irq(unsigned long base) static __inline__ unsigned long ide_default_io_base(int index) { switch (index) { +#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \ + || defined(CONFIG_PLAT_OPSPUT) + case 0: return 0x1f0; +#elif defined(CONFIG_PLAT_MAPPI3) + case 0: return 0x1f0; + case 1: return 0x170; +#else case 0: return 0x1f0; case 1: return 0x170; case 2: return 0x1e8; case 3: return 0x168; case 4: return 0x1e0; case 5: return 0x160; +#endif default: return 0; } -- cgit v1.2.3 From d83b8b85cd56a083d30df73f3fd5e4714591b910 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 24 Jul 2008 22:53:30 +0200 Subject: ide: define MAX_HWIFS in * Now that ide_hwif_t instances are allocated dynamically the difference between MAX_HWIFS == 2 and MAX_HWIFS == 10 is ~100 bytes (x86-32) so use MAX_HWIFS == 10 on all archs except these ones that use MAX_HWIFS == 1. * Define MAX_HWIFS in instead of . [ Please note that avr32/cris/v850 have no and alpha/ia64/sh always define CONFIG_IDE_MAX_HWIFS. ] Signed-off-by: Bartlomiej Zolnierkiewicz --- include/asm-m32r/ide.h | 8 -------- 1 file changed, 8 deletions(-) (limited to 'include/asm-m32r') diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index 72798d62422..d755d41b993 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -15,14 +15,6 @@ #include -#ifndef MAX_HWIFS -# ifdef CONFIG_BLK_DEV_IDEPCI -#define MAX_HWIFS 10 -# else -#define MAX_HWIFS 2 -# endif -#endif - static __inline__ int ide_default_irq(unsigned long base) { switch (base) { -- cgit v1.2.3 From f01d35d87f39ab794ddcdefadb79c11054bcbfbc Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 24 Jul 2008 22:53:31 +0200 Subject: ide-generic: remove ide_default_{io_base,irq}() inlines (take 3) Replace ide_default_{io_base,irq}() inlines by legacy_{bases,irqs}[]. v2: Add missing zero-ing of hws[] (caught during testing by Borislav Petkov). v3: Fix zero-oing of hws[] for _real_ this time. There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- include/asm-m32r/ide.h | 50 -------------------------------------------------- 1 file changed, 50 deletions(-) (limited to 'include/asm-m32r') diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h index d755d41b993..0f1ec697387 100644 --- a/include/asm-m32r/ide.h +++ b/include/asm-m32r/ide.h @@ -13,56 +13,6 @@ #ifdef __KERNEL__ -#include - -static __inline__ int ide_default_irq(unsigned long base) -{ - switch (base) { -#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \ - || defined(CONFIG_PLAT_OPSPUT) - case 0x1f0: return PLD_IRQ_CFIREQ; - default: - return 0; -#elif defined(CONFIG_PLAT_MAPPI3) - case 0x1f0: return PLD_IRQ_CFIREQ; - case 0x170: return PLD_IRQ_IDEIREQ; - default: - return 0; -#else - case 0x1f0: return 14; - case 0x170: return 15; - case 0x1e8: return 11; - case 0x168: return 10; - case 0x1e0: return 8; - case 0x160: return 12; - default: - return 0; -#endif - } -} - -static __inline__ unsigned long ide_default_io_base(int index) -{ - switch (index) { -#if defined(CONFIG_PLAT_M32700UT) || defined(CONFIG_PLAT_MAPPI2) \ - || defined(CONFIG_PLAT_OPSPUT) - case 0: return 0x1f0; -#elif defined(CONFIG_PLAT_MAPPI3) - case 0: return 0x1f0; - case 1: return 0x170; -#else - case 0: return 0x1f0; - case 1: return 0x170; - case 2: return 0x1e8; - case 3: return 0x168; - case 4: return 0x1e0; - case 5: return 0x160; -#endif - default: - return 0; - } -} - #include #endif /* __KERNEL__ */ -- cgit v1.2.3 From 2a8f7450f828eaee49d66f41f99ac2e54f1160a6 Mon Sep 17 00:00:00 2001 From: Bartlomiej Zolnierkiewicz Date: Thu, 24 Jul 2008 22:53:31 +0200 Subject: ide: remove for some archs * Remove include from ( includes which is enough). * Remove for alpha/blackfin/h8300/ia64/m32r/sh/x86/xtensa (this leaves us with arm/frv/m68k/mips/mn10300/parisc/powerpc/sparc[64]). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz --- include/asm-m32r/ide.h | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 include/asm-m32r/ide.h (limited to 'include/asm-m32r') diff --git a/include/asm-m32r/ide.h b/include/asm-m32r/ide.h deleted file mode 100644 index 0f1ec697387..00000000000 --- a/include/asm-m32r/ide.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef _ASM_M32R_IDE_H -#define _ASM_M32R_IDE_H - -/* - * linux/include/asm-m32r/ide.h - * - * Copyright (C) 1994-1996 Linus Torvalds & authors - */ - -/* - * This file contains the i386 architecture specific IDE code. - */ - -#ifdef __KERNEL__ - -#include - -#endif /* __KERNEL__ */ - -#endif /* _ASM_M32R_IDE_H */ -- cgit v1.2.3