⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 auide.patch

📁 patches for linux-2.6.
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
Note this patch requires misc2.patchdiff -Naur linux26-cvs/arch/mips/Kconfig linux26-amd/arch/mips/Kconfig--- linux26-cvs/arch/mips/Kconfig       Tue Apr 12 14:01:13 2005+++ linux26-amd/arch/mips/Kconfig	Tue Apr 12 13:28:56 2005@@ -61,9 +61,10 @@ config MIPS_PB1200 	bool "AMD Alchemy PB1200 board" 	select SOC_AU1200-	select DMA_NONCOHERENT+	select DMA_COHERENT 	select MIPS_DISABLE_OBSOLETE_IDE 	select SYS_SUPPORTS_LITTLE_ENDIAN+	select HW_HAS_PCI  config MIPS_DB1000 	bool "AMD Alchemy DB1000 board"@@ -97,9 +98,10 @@ config MIPS_DB1200 	bool "AMD Alchemy DB1200 board" 	select SOC_AU1200-	select DMA_NONCOHERENT+	select DMA_COHERENT 	select MIPS_DISABLE_OBSOLETE_IDE 	select SYS_SUPPORTS_LITTLE_ENDIAN+	select HW_HAS_PCI  config MIPS_MIRAGE        bool "AMD Alchemy Mirage board"diff -Naur linux26-cvs/arch/mips/au1000/common/setup.c linux26-amd/arch/mips/au1000/common/setup.c--- linux26-cvs/arch/mips/au1000/common/setup.c	Tue Apr 12 14:01:13 2005+++ linux26-amd/arch/mips/au1000/common/setup.c	Tue Apr 12 13:28:56 2005@@ -159,7 +159,7 @@  early_initcall(au1x00_setup); -#if defined(CONFIG_64BIT_PHYS_ADDR)+#if defined(CONFIG_64BIT_PHYS_ADDR) && (defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)) /* This routine should be valid for all Au1x based boards */ phys_t fixup_bigphys_addr(phys_t phys_addr, phys_t size) {diff -Naur linux26-cvs/arch/mips/pci/Makefile linux26-amd/arch/mips/pci/Makefile--- linux26-cvs/arch/mips/pci/Makefile	Tue Apr 12 14:01:18 2005+++ linux26-amd/arch/mips/pci/Makefile	Tue Apr 12 13:29:02 2005@@ -34,6 +34,7 @@ obj-$(CONFIG_MIPS_IVR)		+= fixup-ivr.o obj-$(CONFIG_SOC_AU1500)	+= fixup-au1000.o ops-au1000.o obj-$(CONFIG_SOC_AU1550)	+= fixup-au1000.o ops-au1000.o+obj-$(CONFIG_SOC_AU1200)	+= fixup-au1000.o ops-au1000.o obj-$(CONFIG_MIPS_MALTA)	+= fixup-malta.o obj-$(CONFIG_MOMENCO_JAGUAR_ATX)+= fixup-jaguar.o obj-$(CONFIG_MOMENCO_OCELOT)	+= fixup-ocelot.o pci-ocelot.odiff -Naur linux26-cvs/arch/mips/pci/fixup-au1000.c linux26-amd/arch/mips/pci/fixup-au1000.c--- linux26-cvs/arch/mips/pci/fixup-au1000.c	Tue Apr 12 14:01:18 2005+++ linux26-amd/arch/mips/pci/fixup-au1000.c	Tue Apr 12 13:29:02 2005@@ -34,11 +34,14 @@ #include <asm/mach-au1x00/au1000.h>-extern char irq_tab_alchemy[][5];- int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) {+#if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )+	extern char irq_tab_alchemy[][5]; 	return irq_tab_alchemy[slot][pin];+#else+	return NULL;+#endif } /* Do platform specific device initialization at pci_enable_device() time */diff -Naur linux26-cvs/drivers/ide/Kconfig linux26-amd/drivers/ide/Kconfig--- linux26-cvs/drivers/ide/Kconfig     Tue May 31 10:23:16 2005+++ linux26-amd/drivers/ide/Kconfig     Wed Jul 13 15:12:39 2005@@ -776,6 +776,35 @@        bool "IDE for Sibyte evaluation boards"        depends on SIBYTE_SB1xxx_SOC +config BLK_DEV_IDE_AU1XXX+       bool "IDE for AMD Alchemy Au1200"+       depends on BLK_DEV_IDEDMA_PCI && SOC_AU1200+choice+       prompt "IDE Mode for AMD Alchemy Au1200"+       default CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA+       depends on SOC_AU1200 && BLK_DEV_IDE_AU1XXX++config BLK_DEV_IDE_AU1XXX_PIO_DBDMA+       bool "PIO+DbDMA IDE for AMD Alchemy Au1200"++config BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA+       bool "MDMA2+DbDMA IDE for AMD Alchemy Au1200"+       depends on SOC_AU1200 && BLK_DEV_IDE_AU1XXX     +endchoice++config BLK_DEV_IDE_AU1XXX_BURSTABLE_ON+        bool "Enable burstable Mode on DbDMA"+        default false+        depends BLK_DEV_IDE_AU1XXX+        help+          This option enable the burstable Flag on DbDMA controller+          (cf. "AMD Alchemy 'Au1200' Processor Data Book - PRELIMINARY").++config BLK_DEV_IDE_AU1XXX_SEQTS_PER_RQ+       int "Maximum transfer size (KB) per request (up to 128)"+       default "128"+       depends BLK_DEV_IDE_AU1XXX+ config IDE_ARM        def_bool ARM && (ARCH_A5K || ARCH_CLPS7500 || ARCH_RPC || ARCH_SHARK)  diff -Naur linux26-cvs/drivers/ide/ide-iops.c linux26-amd/drivers/ide/ide-iops.c--- linux26-cvs/drivers/ide/ide-iops.c	Tue Apr 12 14:01:51 2005+++ linux26-amd/drivers/ide/ide-iops.c	Tue Apr 12 13:29:46 2005@@ -25,6 +25,8 @@ #include <linux/ide.h> #include <linux/bitops.h> +#include <asm/mach-au1x00/au1000.h>+ #include <asm/byteorder.h> #include <asm/irq.h> #include <asm/uaccess.h>diff -Naur linux26-cvs/drivers/ide/ide-proc.c linux26-amd/drivers/ide/ide-proc.c--- linux26-cvs/drivers/ide/ide-proc.c	Tue Apr 12 14:08:08 2005+++ linux26-amd/drivers/ide/ide-proc.c	Tue Apr 12 13:29:46 2005@@ -64,6 +64,7 @@ 		case ide_cy82c693:	name = "cy82c693";	break; 		case ide_4drives:	name = "4drives";	break; 		case ide_pmac:		name = "mac-io";	break;+		case ide_au1xxx:	name = "au1xxx";	break; 		default:		name = "(unknown)";	break; 	} 	len = sprintf(page, "%s\n", name);diff -Naur linux26-cvs/arch/mips/pci/ops-au1000.c linux26-amd/arch/mips/pci/ops-au1000.c--- linux26-cvs/arch/mips/pci/ops-au1000.c	Tue May 31 10:22:45 2005+++ linux26-amd/arch/mips/pci/ops-au1000.c	Wed Jun  1 13:57:50 2005@@ -71,8 +71,10 @@ }  struct vm_struct *pci_cfg_vm;+#if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 ) static int pci_cfg_wired_entry; static int first_cfg = 1;+#endif unsigned long last_entryLo0, last_entryLo1;  static int config_access(unsigned char access_type, struct pci_bus *bus,@@ -186,7 +188,12 @@  	local_irq_restore(flags); 	return error;+#else+	*data = 0xffffffff;+	return -1;+ #endif+ }  static int read_config_byte(struct pci_bus *bus, unsigned int devfn,diff -Naur linux26-cvs/drivers/ide/ide.c linux26-amd/drivers/ide/ide.c--- linux26-cvs/drivers/ide/ide.c     	Tue May 31 10:23:17 2005+++ linux26-amd/drivers/ide/ide.c       Wed Jun  1 13:01:44 2005@@ -2020,6 +2020,12 @@                buddha_init();        } #endif /* CONFIG_BLK_DEV_BUDDHA */+#ifdef CONFIG_BLK_DEV_IDE_AU1XXX+       {+               extern void auide_probe(void);+               auide_probe();+       }+#endif /* CONFIG_BLK_DEV_IDE_AU1XXX */ #ifdef CONFIG_BLK_DEV_IDEPNP        pnpide_init(); #endifdiff -Naur linux26-cvs/drivers/ide/ide-probe.c linux26-amd/drivers/ide/ide-probe.c--- linux26-cvs/drivers/ide/ide-probe.c	Tue May 31 10:23:17 2005+++ linux26-amd/drivers/ide/ide-probe.c	Wed Jun  1 11:19:26 2005@@ -703,6 +703,9 @@ 		return;  	if ((hwif->chipset != ide_4drives || !hwif->mate || !hwif->mate->present) &&+#if CONFIG_BLK_DEV_IDE_AU1XXX+	    (hwif->chipset != ide_au1xxx) &&+#endif /* CONFIG_BLK_DEV_AU1XXX */ 	    (ide_hwif_request_regions(hwif))) { 		u16 msgout = 0; 		for (unit = 0; unit < MAX_DRIVES; ++unit) {diff -Naur linux26-cvs/drivers/ide/mips/Makefile linux26-amd/drivers/ide/mips/Makefile--- linux26-cvs/drivers/ide/mips/Makefile	Tue Apr 12 14:08:08 2005+++ linux26-amd/drivers/ide/mips/Makefile	Tue Apr 12 13:29:47 2005@@ -1,3 +1,4 @@ obj-$(CONFIG_BLK_DEV_IDE_SWARM)		+= swarm.o+obj-$(CONFIG_BLK_DEV_IDE_AU1XXX)	+= au1xxx-ide.o EXTRA_CFLAGS	:= -I../diff -Naur linux26-cvs/include/asm-mips/mach-au1x00/au1xxx_ide.h linux26-amd/include/asm-mips/mach-au1x00/au1xxx_ide.h--- linux26-cvs/include/asm-mips/mach-au1x00/au1xxx_ide.h	Tue Aug  2 14:27:22 2005+++ linux26-amd/include/asm-mips/mach-au1x00/au1xxx_ide.h	Tue Aug  2 14:54:36 2005@@ -0,0 +1,309 @@+/*+ * include/asm-mips/mach-au1x00/au1xxx_ide.h  version 01.30.00   Aug. 02 2005+ *+ * BRIEF MODULE DESCRIPTION+ * AMD Alchemy Au1xxx IDE interface routines over the Static Bus+ *+ * Copyright (c) 2003-2005 AMD, Personal Connectivity Solutions+ *+ * 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 SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND+ * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+ * POSSIBILITY OF SUCH DAMAGE.+ *+ * 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.,+ * 675 Mass Ave, Cambridge, MA 02139, USA.+ *+ * Note: for more information, please refer "AMD Alchemy Au1200/Au1550 IDE+ *       Interface and Linux Device Driver" Application Note.+ */+#ifndef AUTOCONF_INCLUDED+        #include <linux/autoconf.h>+#endif++#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA+        #define DMA_WAIT_TIMEOUT        100+        #define NUM_DESCRIPTORS         PRD_ENTRIES+#else /* CONFIG_BLK_DEV_IDE_AU1XXX_PIO_DBDMA */+        #define NUM_DESCRIPTORS         2+#endif++#ifndef AU1XXX_ATA_RQSIZE+        #define AU1XXX_ATA_RQSIZE       128+#endif++/* Disable Burstable-Support for DBDMA */+#ifndef CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON+        #define CONFIG_BLK_DEV_IDE_AU1XXX_BURSTABLE_ON  0+#endif++#ifdef CONFIG_PM+/*+* This will enable the device to be powered up when write() or read()+* is called. If this is not defined, the driver will return -EBUSY.+*/+#define WAKE_ON_ACCESS 1++typedef struct+{+        spinlock_t         lock;       /* Used to block on state transitions */+        au1xxx_power_dev_t *dev;       /* Power Managers device structure */+        unsigned	   stopped;    /* USed to signaling device is stopped */+} pm_state;+#endif+++typedef struct+{+        u32                     tx_dev_id, rx_dev_id, target_dev_id;+        u32                     tx_chan, rx_chan;+        void                    *tx_desc_head, *rx_desc_head;+        ide_hwif_t              *hwif;+#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA+        ide_drive_t             *drive;+        u8                      white_list, black_list;+        struct dbdma_cmd        *dma_table_cpu;+        dma_addr_t              dma_table_dma;+        struct scatterlist      *sg_table;+        int                     sg_nents;+        int                     sg_dma_direction;++        struct device           *dev;+#endif+#ifdef CONFIG_PM+        pm_state                pm;+#endif+} _auide_hwif;++#ifdef CONFIG_BLK_DEV_IDE_AU1XXX_MDMA2_DBDMA+struct drive_list_entry {+        const char * id_model;+        const char * id_firmware;+};++/* HD white list */+static const struct drive_list_entry dma_white_list [] = {+/*+ * Hitachi+ */+        { "HITACHI_DK14FA-20"    ,       "ALL"           },+        { "HTS726060M9AT00"      ,       "ALL"           },+/*+ * Maxtor+ */+        { "Maxtor 6E040L0"      ,       "ALL"           },+        { "Maxtor 6Y080P0"      ,       "ALL"           },+        { "Maxtor 6Y160P0"      ,       "ALL"           },+        { "Maxtor 6L200P0"      ,       "ALL"           },+/*+ * Seagate+ */+        { "ST3120026A"          ,       "ALL"           },+        { "ST320014A"           ,       "ALL"           },+        { "ST94011A"            ,       "ALL"           },+        { "ST3200822A"          ,       "ALL"           },+        { "ST3160023A"          ,       "ALL"           },+        { "ST340014A"           ,       "ALL"           },+/*+ * Toshiba+ */+        { "TOSHIBA MK1003GAL"   ,       "ALL"           },+/*+ * Western Digital+ */+        { "WDC WD400UE-00HCT0"  ,       "ALL"           },+        { "WDC WD400JB-00JJC0"  ,       "ALL"           },+        { NULL                  ,       NULL            }+};++/* HD black list */+static const struct drive_list_entry dma_black_list [] = {+/*+ * Western Digital+ */+        { "WDC WD100EB-00CGH0"  ,       "ALL"           },+        { "WDC WD200BB-00AUA1"  ,       "ALL"           },+        { "WDC AC24300L"        ,       "ALL"           },+        { NULL                  ,       NULL            }+};+#endif++/* function prototyping */+u8 auide_inb(unsigned long port);+u16 auide_inw(unsigned long port);+u32 auide_inl(unsigned long port);+void auide_insw(unsigned long port, void *addr, u32 count);+void auide_insl(unsigned long port, void *addr, u32 count);+void auide_outb(u8 addr, unsigned long port);+void auide_outbsync(ide_drive_t *drive, u8 addr, unsigned long port);+void auide_outw(u16 addr, unsigned long port);+void auide_outl(u32 addr, unsigned long port);+void auide_outsw(unsigned long port, void *addr, u32 count);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -