OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [rc203soc/] [sw/] [uClinux/] [drivers/] [block/] [rz1000.c] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1626 jcastillo
/*
2
 *  linux/drivers/block/rz1000.c        Version 0.03  Mar 20, 1996
3
 *
4
 *  Copyright (C) 1995-1996  Linus Torvalds & author (see below)
5
 */
6
 
7
/*
8
 *  Principal Author/Maintainer:  mlord@pobox.com (Mark Lord)
9
 *
10
 *  This file provides support for disabling the buggy read-ahead
11
 *  mode of the RZ1000 IDE chipset, commonly used on Intel motherboards.
12
 */
13
 
14
#undef REALLY_SLOW_IO           /* most systems can safely undef this */
15
 
16
#include <linux/types.h>
17
#include <linux/kernel.h>
18
#include <linux/delay.h>
19
#include <linux/timer.h>
20
#include <linux/mm.h>
21
#include <linux/ioport.h>
22
#include <linux/blkdev.h>
23
#include <linux/hdreg.h>
24
#include <asm/io.h>
25
#include <linux/bios32.h>
26
#include <linux/pci.h>
27
#include "ide.h"
28
 
29
static void ide_pci_access_error (int rc)
30
{
31
        printk("ide: pcibios access failed - %s\n", pcibios_strerror(rc));
32
}
33
 
34
void init_rz1000 (byte bus, byte fn)
35
{
36
        int rc;
37
        unsigned short reg;
38
 
39
        printk("ide0: buggy RZ1000 interface: ");
40
        if ((rc = pcibios_read_config_word (bus, fn, PCI_COMMAND, &reg))) {
41
                ide_pci_access_error (rc);
42
        } else if (!(reg & 1)) {
43
                printk("not enabled\n");
44
        } else {
45
                if ((rc = pcibios_read_config_word(bus, fn, 0x40, &reg))
46
                 || (rc =  pcibios_write_config_word(bus, fn, 0x40, reg & 0xdfff)))
47
                {
48
                        ide_hwifs[0].drives[0].no_unmask = 1;
49
                        ide_hwifs[0].drives[1].no_unmask = 1;
50
                        ide_hwifs[1].drives[0].no_unmask = 1;
51
                        ide_hwifs[1].drives[1].no_unmask = 1;
52
                        ide_hwifs[0].serialized = 1;
53
                        ide_hwifs[1].serialized = 1;
54
                        ide_pci_access_error (rc);
55
                        printk("serialized, disabled unmasking\n");
56
                } else
57
                        printk("disabled read-ahead\n");
58
        }
59
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.