Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Sergey Podstavin <spodstavin@ru.mvista.com>
To: linux-mips <linux-mips@linux-mips.org>
Subject: NEC VR5701 support
Date: Thu, 23 Feb 2006 18:38:12 +0300	[thread overview]
Message-ID: <1140709092.5741.4.camel@localhost.localdomain> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: pro_mips_nec_vr5701_errata.patch --]
[-- Type: text/x-patch, Size: 2680 bytes --]

Source: MontaVista Software, Inc. Sergey Podstavin <spodstavin@ru.mvista.com>
MR: 17133
Type: Enhancement
Disposition:  needs submitting to linuxmips-embedded mailing list
Signed-off-by: Sergey Podstavin <spodstavin@ru.mvista.com>
Description:
    NEC Vr5701 workaround. Basically,it gives the following workaround:
	Restriction no.1:
	Please set the value 1 in DISCTIM field of the IPCI_CTRL-L
	register of IPCIC (or the EPCI_CTRL-L register of EPCIC).
	Restriction no.2:
	Please clear SERREN bit of the PCICMD register of IDEC.
	Restriction no.6:
	Please clear PREFETCHABLE bit of the IP_BAR_MEM01 register 
	of IPCIC (or the EP_BAR_MEM01 register of EPCIC).

Index: linux-2.6.10/arch/mips/vr5701/vr5701_sg2/setup.c
===================================================================
--- linux-2.6.10.orig/arch/mips/vr5701/vr5701_sg2/setup.c
+++ linux-2.6.10/arch/mips/vr5701/vr5701_sg2/setup.c
@@ -98,7 +98,7 @@ static void __init vr5701_sg2_board_init
 	/* ------------ reset PCI bus and BARs ----------------- */
 	ddb_pci_reset_bus();
 	/* Ext. PCI memory space */
-	ddb_out32(PCI_BAR_MEM01, 0x00000008);
+	ddb_out32(PCI_BAR_MEM01, 0x00000000); /* workaround - Restriction no.6 */
 	ddb_out8(PCI_MLTIM, 0x40);
 
 	ddb_out32(PCI_BAR_LCS0, 0xffffffff);
@@ -114,6 +114,8 @@ static void __init vr5701_sg2_board_init
 	ddb_out32(IPCI_BAR_LCS3, 0xffffffff);
 	ddb_out32(IPCI_BAR_IREG, 0xffffffff);
 
+	ddb_out32(IPCI_CTRLL, 0x01000000); /* workaround - Restriction no.1 */
+	ddb_out32(EPCI_CTRLL, 0x01000000); /* workaround - Restriction no.1 */
 	/*
 	 * We use pci master register 0  for memory space / config space
 	 * And we use register 1 for IO space.
Index: linux-2.6.10/drivers/ide/pci/nec_vr5701_sg2.c
===================================================================
--- linux-2.6.10.orig/drivers/ide/pci/nec_vr5701_sg2.c
+++ linux-2.6.10/drivers/ide/pci/nec_vr5701_sg2.c
@@ -184,6 +184,7 @@ static int __devinit nec_vr5701_init_one
 		return 1;
 	}
 	ide_setup_pci_device(dev, d);
+	pci_write_config_byte(dev, 0x52, 0x00); /* workaround - Restriction no.2 */
 	return 0;
 }
 
Index: linux-2.6.10/include/asm-mips/vr5701/vr5701.h
===================================================================
--- linux-2.6.10.orig/include/asm-mips/vr5701/vr5701.h
+++ linux-2.6.10/include/asm-mips/vr5701/vr5701.h
@@ -40,6 +40,7 @@
 #define LOCAL_CST0	0x400
 #define LOCAL_CFG	0x440
 /* EPCI registers */
+#define EPCI_CTRLL	0x600
 #define EPCI_CTRLH	0x604
 #define EPCI_INIT0	0x610
 #define EPCI_INIT1	0x618
@@ -77,6 +78,7 @@
 #define CSI1_INT	0xBC8
 
 /* IPCI registers*/
+#define IPCI_CTRLL	0xE00
 #define IPCI_CTRLH	0xE04
 #define IPCI_INIT0	0xE10
 #define IPCI_INIT1	0xE18

             reply	other threads:[~2006-02-23 15:32 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-23 15:38 Sergey Podstavin [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-02-23 15:45 NEC VR5701 support Sergey Podstavin
2006-02-23 15:44 Sergey Podstavin
2006-02-23 15:43 Sergey Podstavin
2006-02-23 15:43 Sergey Podstavin
2006-02-23 15:41 Sergey Podstavin
2006-02-23 15:39 Sergey Podstavin
2006-02-23 15:39 Sergey Podstavin
2006-02-23 15:36 Sergey Podstavin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1140709092.5741.4.camel@localhost.localdomain \
    --to=spodstavin@ru.mvista.com \
    --cc=linux-mips@linux-mips.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox