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

📄 misc2.patch

📁 patches for linux-2.6.
💻 PATCH
字号:
Misc touchup for au1200fb, audio, i2c/smbus and usb driver--- linux26-cvs/arch/mips/au1000/common/cputable.c	2005-03-23 13:26:33.000000000 +0100+++ linux26-amd/arch/mips/au1000/common/cputable.c	2005-06-03 16:48:29.133908000 +0200@@ -38,7 +38,7 @@     { 0xffffffff, 0x02030204, "Au1100 BE", 0, 1 },     { 0xffffffff, 0x03030200, "Au1550 AA", 0, 1 },     { 0xffffffff, 0x04030200, "Au1200 AB", 0, 0 },-    { 0xffffffff, 0x04030201, "Au1200 AC", 0, 1 },+    { 0xffffffff, 0x04030201, "Au1200 AC", 1, 0 },     { 0x00000000, 0x00000000, "Unknown Au1xxx", 1, 0 }, }; --- linux26-cvs/arch/mips/au1000/common/platform.c	2005-03-23 13:26:34.000000000 +0100+++ linux26-amd/arch/mips/au1000/common/platform.c	2005-04-11 10:16:42.569096000 +0200@@ -14,10 +14,11 @@  #include <asm/mach-au1x00/au1000.h> +/* OHCI (USB full speed host controller) */ static struct resource au1xxx_usb_ohci_resources[] = { 	[0] = { 		.start		= USB_OHCI_BASE,-		.end		= USB_OHCI_BASE + USB_OHCI_LEN,+		.end		= USB_OHCI_BASE + USB_OHCI_LEN - 1, 		.flags		= IORESOURCE_MEM, 	}, 	[1] = {@@ -41,8 +42,156 @@ 	.resource	= au1xxx_usb_ohci_resources, }; +#ifdef CONFIG_SOC_AU1100+/*** AU1100 LCD controller ***/+static struct resource au1100_lcd_resources[] = {+	[0] = {+		.start          = LCD_PHYS_ADDR,+		.end            = LCD_PHYS_ADDR + 0x800 - 1,+		.flags          = IORESOURCE_MEM,+	},+	[1] = {+		.start          = AU1100_LCD_INT,+		.end            = AU1100_LCD_INT,+		.flags          = IORESOURCE_IRQ,+	}+};++static u64 au1100_lcd_dmamask = ~(u32)0;++static struct platform_device au1100_lcd_device = {+	.name           = "au1100-lcd",+	.id             = 0,+	.dev = {+		.dma_mask               = &au1100_lcd_dmamask,+		.coherent_dma_mask      = 0xffffffff,+	},+	.num_resources  = ARRAY_SIZE(au1100_lcd_resources),+	.resource       = au1100_lcd_resources,+};+#endif++#ifdef CONFIG_SOC_AU1200+/* EHCI (USB high speed host controller) */+static struct resource au1xxx_usb_ehci_resources[] = {+	[0] = {+		.start		= USB_EHCI_BASE,+		.end		= USB_EHCI_BASE + USB_EHCI_LEN - 1,+		.flags		= IORESOURCE_MEM,+	},+	[1] = {+		.start		= AU1000_USB_HOST_INT,+		.end		= AU1000_USB_HOST_INT,+		.flags		= IORESOURCE_IRQ,+	},+};++static u64 ehci_dmamask = ~(u32)0;++static struct platform_device au1xxx_usb_ehci_device = {+	.name		= "au1xxx-ehci",+	.id		= 0,+	.dev = {+		.dma_mask		= &ehci_dmamask,+		.coherent_dma_mask	= 0xffffffff,+	},+	.num_resources	= ARRAY_SIZE(au1xxx_usb_ehci_resources),+	.resource	= au1xxx_usb_ehci_resources,+};++/* Au1200 UDC (USB gadget controller) */+static struct resource au1xxx_usb_gdt_resources[] = {+	[0] = {+		.start		= USB_UDC_BASE,+		.end		= USB_UDC_BASE + USB_UDC_LEN - 1,+		.flags		= IORESOURCE_MEM,+	},+	[1] = {+		.start		= AU1200_USB_INT,+		.end		= AU1200_USB_INT,+		.flags		= IORESOURCE_IRQ,+	},+};++static u64 udc_dmamask = ~(u32)0;++static struct platform_device au1xxx_usb_gdt_device = {+	.name		= "au1xxx-udc",+	.id		= 0,+	.dev = {+		.dma_mask		= &udc_dmamask,+		.coherent_dma_mask	= 0xffffffff,+	},+	.num_resources	= ARRAY_SIZE(au1xxx_usb_gdt_resources),+	.resource	= au1xxx_usb_gdt_resources,+};++/* Au1200 UOC (USB OTG controller) */+static struct resource au1xxx_usb_otg_resources[] = {+	[0] = {+		.start		= USB_UOC_BASE,+		.end		= USB_UOC_BASE + USB_UOC_LEN - 1,+		.flags		= IORESOURCE_MEM,+	},+	[1] = {+		.start		= AU1200_USB_INT,+		.end		= AU1200_USB_INT,+		.flags		= IORESOURCE_IRQ,+	},+};++static u64 uoc_dmamask = ~(u32)0;++static struct platform_device au1xxx_usb_otg_device = {+	.name		= "au1xxx-uoc",+	.id		= 0,+	.dev = {+		.dma_mask		= &uoc_dmamask,+		.coherent_dma_mask	= 0xffffffff,+	},+	.num_resources	= ARRAY_SIZE(au1xxx_usb_otg_resources),+	.resource	= au1xxx_usb_otg_resources,+};++/*** AU1200 LCD controller ***/+static struct resource au1200_lcd_resources[] = {+	[0] = {+		.start          = LCD_PHYS_ADDR,+		.end            = LCD_PHYS_ADDR + 0x800 - 1,+		.flags          = IORESOURCE_MEM,+	},+	[1] = {+		.start          = AU1200_LCD_INT,+		.end            = AU1200_LCD_INT,+		.flags          = IORESOURCE_IRQ,+	}+};++static u64 au1200_lcd_dmamask = ~(u32)0;++static struct platform_device au1200_lcd_device = {+	.name           = "au1200-lcd",+	.id             = 0,+	.dev = {+		.dma_mask               = &au1200_lcd_dmamask,+		.coherent_dma_mask      = 0xffffffff,+	},+	.num_resources  = ARRAY_SIZE(au1200_lcd_resources),+	.resource       = au1200_lcd_resources,+};+#endif+ static struct platform_device *au1xxx_platform_devices[] __initdata = { 	&au1xxx_usb_ohci_device,+#ifdef CONFIG_SOC_AU1100+	&au1100_lcd_device,+#endif+#ifdef CONFIG_SOC_AU1200+	&au1xxx_usb_ehci_device,+	&au1xxx_usb_gdt_device,+	&au1xxx_usb_otg_device,+	&au1200_lcd_device,+#endif };  int au1xxx_platform_init(void)--- linux26-cvs/arch/mips/au1000/pb1200/board_setup.c	Tue May 31 10:22:41 2005+++ linux26-amd/arch/mips/au1000/pb1200/board_setup.c	Wed Jun  1 11:16:39 2005@@ -58,22 +58,10 @@ extern void _board_init_irq(void); extern void	(*board_init_irq)(void); -#ifdef CONFIG_BLK_DEV_IDE_AU1XXX-extern u32 au1xxx_ide_virtbase;-extern u64 au1xxx_ide_physbase;-extern int au1xxx_ide_irq;--u32 led_base_addr;-/* Ddma */-chan_tab_t *ide_read_ch, *ide_write_ch;-u32 au1xxx_ide_ddma_enable = 0, switch4ddma = 1; // PIO+ddma--dbdev_tab_t new_dbdev_tab_element = { DSCR_CMD0_THROTTLE, DEV_FLAGS_ANYUSE, 0, 0, 0x00000000, 0, 0 };-#endif /* end CONFIG_BLK_DEV_IDE_AU1XXX */- void board_reset (void) { 	bcsr->resets = 0;+	bcsr->system = 0; }  void __init board_setup(void)@@ -94,7 +82,7 @@ 	au_sync(); #endif -#if defined( CONFIG_I2C_ALGO_AU1550 )+#if defined(CONFIG_I2C_AU1550) 	{ 	u32 freq0, clksrc; @@ -134,35 +122,24 @@ #ifdef CONFIG_FB_AU1200 	argptr = prom_getcmdline(); #ifdef CONFIG_MIPS_PB1200-	strcat(argptr, " video=au1200fb:panel:s11");+	strcat(argptr, " video=au1200fb:panel:bs"); #endif #ifdef CONFIG_MIPS_DB1200-	strcat(argptr, " video=au1200fb:panel:s7");+	strcat(argptr, " video=au1200fb:panel:bs"); #endif #endif -#if defined(CONFIG_BLK_DEV_IDE_AU1XXX)-	/*-	 * Iniz IDE parameters-	 */-	au1xxx_ide_irq = PB1200_IDE_INT;-	au1xxx_ide_physbase = AU1XXX_ATA_PHYS_ADDR;-	au1xxx_ide_virtbase = KSEG1ADDR(AU1XXX_ATA_PHYS_ADDR);-	/*-	 * change PIO or PIO+Ddma-	 * check the GPIO-5 pin condition. pb1200:s18_dot */-	switch4ddma = (au_readl(SYS_PINSTATERD) & (1 << 5)) ? 1 : 0; -#endif- 	/* The Pb1200 development board uses external MUX for PSC0 to 	support SMB/SPI. bcsr->resets bit 12: 0=SMB 1=SPI 	*/-#if defined(CONFIG_AU1550_PSC_SPI) && defined(CONFIG_I2C_ALGO_AU1550)+#if defined(CONFIG_AU1XXX_PSC_SPI) && defined(CONFIG_I2C_AU1550) 	#error I2C and SPI are mutually exclusive. Both are physically connected to PSC0.\ 			Refer to Pb1200/Db1200 documentation.-#elif defined( CONFIG_AU1550_PSC_SPI )+#elif defined( CONFIG_AU1XXX_PSC_SPI ) 	bcsr->resets |= BCSR_RESETS_PCS0MUX;-#elif defined( CONFIG_I2C_ALGO_AU1550 )+	/*Hard Coding Value to enable Temp Sensors [bit 14] Value for SOC Au1200. Pls refer documentation*/+	  bcsr->resets  &= ~ BCSR_RESETS_SPISEL;	  +#elif defined( CONFIG_I2C_AU1550 ) 	bcsr->resets &= (~BCSR_RESETS_PCS0MUX); #endif 	au_sync();@@ -181,3 +158,36 @@ 		board_init_irq = _board_init_irq; 	} }++int+board_au1200fb_panel (void)+{+	BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;+	int p;++	p = bcsr->switches;+	p >>= 8;+	p &= 0x0F;+	return p;+}++int+board_au1200fb_panel_init (void)+{+	/* Apply power */+    BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;+	bcsr->board |= (BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);+	/*printk("board_au1200fb_panel_init()\n"); */+	return 0;+}++int+board_au1200fb_panel_shutdown (void)+{+	/* Remove power */+    BCSR *bcsr = (BCSR *)BCSR_KSEG1_ADDR;+	bcsr->board &= ~(BCSR_BOARD_LCDVEE | BCSR_BOARD_LCDVDD | BCSR_BOARD_LCDBL);+	/*printk("board_au1200fb_panel_shutdown()\n"); */+	return 0;+}+--- linux26-cvs/include/asm-mips/mach-au1x00/au1xxx_psc.h	Wed Mar  9 11:21:59 2005+++ linux26-amd/include/asm-mips/mach-au1x00/au1xxx_psc.h	Wed Mar 30 08:38:02 2005@@ -41,6 +41,11 @@ #define PSC3_BASE_ADDR		0xb0d00000 #endif +#ifdef CONFIG_SOC_AU1200+#define PSC0_BASE_ADDR		0xb1a00000+#define PSC1_BASE_ADDR		0xb1b00000+#endif+ /* The PSC select and control registers are common to  * all protocols.  */@@ -504,7 +510,7 @@  /* Transmit register control. */-#define PSC_SMBTXRX_RSR		(1 << 30)+#define PSC_SMBTXRX_RSR		(1 << 28) #define PSC_SMBTXRX_STP		(1 << 29) #define PSC_SMBTXRX_DATAMASK	(0xff) 

⌨️ 快捷键说明

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