Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWu Zhangjin <wuzhangjin@gmail.com>2010-03-11 16:04:44 +0800
committerWu Zhangjin <wuzhangjin@gmail.com>2010-03-11 19:54:39 +0800
commit876c52cc046e00eaa2ffc5124dc187106ef57594 (patch)
tree1f10a7424bf811967e169ad222c5c52d30539bab
parent324b875f9006d755ffdb79117ab42d221fb2e0ef (diff)
Loongson: add a new option FUJITSU_QUIRKS
This option enables the quirks of fujitsu disk on some old FuLoong-2F series(6002, 6003), If you want to use the libata, this option must be enabled, otherwise, the kernel will report "IRQ #14 nobody cared". but for the old IDE driver, this option is not needed and for some new FuLoong-2F series(6004, 6005, 6014, 6015), this must be disabled to avoid the kernel hang on booting. Note: a better method is determining it through the machtype, but currently, the machtype only reflect the fuloong, yeeloong, not reflect the model of them, for example, fuloong-6002, fuloong-6003, in the future, this machtype should be improved. Signed-off-by: Wu Zhangjin <wuzhangjin@gmail.com>
-rw-r--r--arch/mips/loongson/Kconfig14
-rw-r--r--drivers/ide/ide-iops.c6
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/mips/loongson/Kconfig b/arch/mips/loongson/Kconfig
index ab08247598ed..a105316f2d7d 100644
--- a/arch/mips/loongson/Kconfig
+++ b/arch/mips/loongson/Kconfig
@@ -83,3 +83,17 @@ config LOONGSON_UART_BASE
bool
default y
depends on EARLY_PRINTK || SERIAL_8250
+
+config FUJITSU_QUIRKS
+ bool "Enable the quirks of fujitsu disk on some old FuLoong-2F series"
+ default n
+ depends on LEMOTE_MACH2F
+ help
+ This option enables the quirks of fujitsu disk on some old FuLoong-2F
+ series(6002, 6003), If you want to use the libata, this option must
+ be enabled, otherwise, the kernel will report "IRQ #14 nobody cared".
+ but for the old IDE driver, this option is not needed and for some
+ new FuLoong-2F series(6004, 6005, 6014, 6015), this must be disabled
+ to avoid the kernel hang on booting.
+
+ If unsure, say N.
diff --git a/drivers/ide/ide-iops.c b/drivers/ide/ide-iops.c
index 53a085c35616..9dba71e5fe7d 100644
--- a/drivers/ide/ide-iops.c
+++ b/drivers/ide/ide-iops.c
@@ -26,6 +26,7 @@
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/io.h>
+#include <asm/bootinfo.h>
void SELECT_MASK(ide_drive_t *drive, int mask)
{
@@ -300,6 +301,11 @@ void ide_check_nien_quirk_list(ide_drive_t *drive)
{
const char **list, *m = (char *)&drive->id[ATA_ID_PROD];
+#ifdef CONFIG_FUJITSU_QUIRKS
+ if (mips_machtype != MACH_LEMOTE_YL2F89)
+ return;
+#endif
+
for (list = nien_quirk_list; *list != NULL; list++)
if (strstr(m, *list) != NULL) {
drive->dev_flags |= IDE_DFLAG_NIEN_QUIRK;