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

📄 full.patch

📁 2.6.12 内核版本的patch
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
diff --git a/Makefile b/Makefile--- a/Makefile+++ b/Makefile@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 12-EXTRAVERSION =+EXTRAVERSION = -h1940 NAME=Woozy Numbat  # *DOCUMENTATION*@@ -190,8 +190,8 @@ SUBARCH := $(shell uname -m | sed -e s/i # Default value for CROSS_COMPILE is not to prefix executables # Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile -ARCH		?= $(SUBARCH)-CROSS_COMPILE	?=+ARCH		?= arm+CROSS_COMPILE	?= arm-linux-  # Architecture as present in compile.h UTS_MACHINE := $(ARCH)diff --git a/arch/arm/kernel/calls.S b/arch/arm/kernel/calls.S--- a/arch/arm/kernel/calls.S+++ b/arch/arm/kernel/calls.S@@ -236,7 +236,7 @@ __syscall_start: 		.long	sys_mincore /* 220 */	.long	sys_madvise 		.long	sys_fcntl64-		.long	sys_ni_syscall /* TUX */+		.long	sys_mhelper 		.long	sys_ni_syscall 		.long	sys_gettid /* 225 */	.long	sys_readaheaddiff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.c--- a/arch/arm/mach-s3c2410/devs.c+++ b/arch/arm/mach-s3c2410/devs.c@@ -29,12 +29,15 @@ #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/irq.h>-+#include <asm/arch/s3c2410fb.h> #include <asm/hardware.h> #include <asm/io.h> #include <asm/irq.h>  #include <asm/arch/regs-serial.h>+#include <asm/arch/s3c2410_udc.h>+#include <asm/arch/s3c2410_ts.h>+#include <asm/arch/s3c2410_lcd.h>  #include "devs.h" @@ -74,6 +77,15 @@ EXPORT_SYMBOL(s3c_device_usb);  /* LCD Controller */ +static struct s3c2410fb_mach_info s3c2410fb_info;++void __init set_s3c2410fb_info(struct s3c2410fb_mach_info *hard_s3c2410fb_info)+{+	memcpy(&s3c2410fb_info,hard_s3c2410fb_info,sizeof(struct s3c2410fb_mach_info));+}+EXPORT_SYMBOL(set_s3c2410fb_info);++ static struct resource s3c_lcd_resource[] = { 	[0] = { 		.start = S3C2410_PA_LCD,@@ -96,6 +108,7 @@ struct platform_device s3c_device_lcd =  	.num_resources	  = ARRAY_SIZE(s3c_lcd_resource), 	.resource	  = s3c_lcd_resource, 	.dev              = {+ 		.platform_data	= &s3c2410fb_info, 		.dma_mask = &s3c_device_lcd_dmamask, 		.coherent_dma_mask = 0xffffffffUL 	}@@ -103,6 +116,24 @@ struct platform_device s3c_device_lcd =   EXPORT_SYMBOL(s3c_device_lcd); +static struct s3c2410_bl_mach_info s3c2410bl_info;++void __init set_s3c2410bl_info(struct s3c2410_bl_mach_info *hard_s3c2410bl_info)+{+	memcpy(&s3c2410bl_info,hard_s3c2410bl_info,sizeof(struct s3c2410_bl_mach_info));+}+EXPORT_SYMBOL(set_s3c2410bl_info);++struct platform_device s3c_device_bl = {+	.name		  = "s3c2410-bl",+	.id		  = -1,+	.dev              = {+ 		.platform_data	= &s3c2410bl_info,+	}+};++EXPORT_SYMBOL(s3c_device_bl);+ /* NAND Controller */  static struct resource s3c_nand_resource[] = {@@ -122,7 +153,41 @@ struct platform_device s3c_device_nand =  EXPORT_SYMBOL(s3c_device_nand); +/* Touchscreen */+static struct s3c2410_ts_mach_info s3c2410ts_info;++void __init set_s3c2410ts_info(struct s3c2410_ts_mach_info *hard_s3c2410ts_info)+{+	memcpy(&s3c2410ts_info,hard_s3c2410ts_info,sizeof(struct s3c2410_ts_mach_info));+}+EXPORT_SYMBOL(set_s3c2410ts_info);++struct platform_device s3c_device_ts = {+	.name		  = "s3c2410-ts",+	.id		  = -1,+	.dev              = {+ 		.platform_data	= &s3c2410ts_info,+	}+};+EXPORT_SYMBOL(s3c_device_ts);++/* 'Keyboard' */+struct platform_device s3c_device_kbd = {+	.name             = "s3c2410-kbd",+	.id               = -1,+};++EXPORT_SYMBOL(s3c_device_kbd);+ /* USB Device (Gadget)*/+static struct s3c2410_udc_mach_info s3c2410udc_info;++void __init set_s3c2410udc_info(struct s3c2410_udc_mach_info *hard_s3c2410udc_info)+{+	memcpy(&s3c2410udc_info,hard_s3c2410udc_info,sizeof(struct s3c2410_udc_mach_info));+}+EXPORT_SYMBOL(set_s3c2410udc_info);+  static struct resource s3c_usbgadget_resource[] = { 	[0] = {@@ -143,6 +208,10 @@ struct platform_device s3c_device_usbgad 	.id		  = -1, 	.num_resources	  = ARRAY_SIZE(s3c_usbgadget_resource), 	.resource	  = s3c_usbgadget_resource,+	.dev		  = {+		.platform_data  = &s3c2410udc_info,+	}+ };  EXPORT_SYMBOL(s3c_device_usbgadget);diff --git a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.h--- a/arch/arm/mach-s3c2410/devs.h+++ b/arch/arm/mach-s3c2410/devs.h@@ -20,6 +20,7 @@ extern struct platform_device *s3c24xx_u  extern struct platform_device s3c_device_usb; extern struct platform_device s3c_device_lcd;+extern struct platform_device s3c_device_bl; extern struct platform_device s3c_device_wdt; extern struct platform_device s3c_device_i2c; extern struct platform_device s3c_device_iis;@@ -38,6 +39,8 @@ extern struct platform_device s3c_device extern struct platform_device s3c_device_timer3;  extern struct platform_device s3c_device_usbgadget;+extern struct platform_device s3c_device_ts;+extern struct platform_device s3c_device_kbd;  /* s3c2440 specific devices */ diff --git a/arch/arm/mach-s3c2410/irq.c b/arch/arm/mach-s3c2410/irq.c--- a/arch/arm/mach-s3c2410/irq.c+++ b/arch/arm/mach-s3c2410/irq.c@@ -716,7 +716,6 @@ void __init s3c24xx_init_irq(void) 		case IRQ_UART0: 		case IRQ_UART1: 		case IRQ_UART2:-		case IRQ_LCD: 		case IRQ_ADCPARENT: 			set_irq_chip(irqno, &s3c_irq_level_chip); 			set_irq_handler(irqno, do_level_IRQ);diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.c--- a/arch/arm/mach-s3c2410/mach-h1940.c+++ b/arch/arm/mach-s3c2410/mach-h1940.c@@ -32,6 +32,7 @@ #include <linux/list.h> #include <linux/timer.h> #include <linux/init.h>+#include <linux/device.h>  #include <asm/mach/arch.h> #include <asm/mach/map.h>@@ -45,6 +46,14 @@  //#include <asm/debug-ll.h> #include <asm/arch/regs-serial.h>+#include <asm/arch/regs-gpio.h>+#include <asm/arch/regs-lcd.h>+#include <asm/arch/regs-timer.h>++#include <asm/arch/s3c2410fb.h>+#include <asm/arch/s3c2410_udc.h>+#include <asm/arch/s3c2410_ts.h>+#include <asm/arch/s3c2410_lcd.h>  #include <linux/serial_core.h> @@ -87,14 +96,149 @@ static struct s3c2410_uartcfg h1940_uart };  +static void pullup(unsigned char cmd)+{+	printk(KERN_DEBUG "udc: pullup(%d)\n",cmd);+	switch (cmd)+	{+		case S3C2410_UDC_P_ENABLE :+			break;+		case S3C2410_UDC_P_DISABLE :+			break;+		case S3C2410_UDC_P_RESET :+			break;+		default: break;+	}+}++static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = {+		.udc_command = pullup,+};+++static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {+		.delay = 10000,+		.presc = 49,+		.oversampling_shift = 2,+};++/**+ * Set lcd on or off+ **/++static void h1940_backlight_power(int on)+{+	s3c2410_gpio_setpin(S3C2410_GPB0, 0);+	s3c2410_gpio_pullup(S3C2410_GPB0, 0);++	s3c2410_gpio_cfgpin(S3C2410_GPB0,+			    (on) ? S3C2410_GPB0_TOUT0 : S3C2410_GPB0_OUTP);+}++static void h1940_lcd_power(int on)+{+	s3c2410_gpio_setpin(S3C2410_GPC0, on);+}++static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = {+	.fixed_syncs=		1,+	.regs={ +		.lcdcon1=	S3C2410_LCDCON1_TFT16BPP | \+				S3C2410_LCDCON1_TFT | \+				S3C2410_LCDCON1_CLKVAL(0x0C),++		.lcdcon2=	S3C2410_LCDCON2_VBPD(7) | \+				S3C2410_LCDCON2_LINEVAL(319) | \+				S3C2410_LCDCON2_VFPD(6) | \+				S3C2410_LCDCON2_VSPW(0),++		.lcdcon3=	S3C2410_LCDCON3_HBPD(19) | \+				S3C2410_LCDCON3_HOZVAL(239) | \+				S3C2410_LCDCON3_HFPD(7),++		.lcdcon4=	S3C2410_LCDCON4_MVAL(0) | \+				S3C2410_LCDCON4_HSPW(3),++		.lcdcon5=	S3C2410_LCDCON5_FRM565 | \+				S3C2410_LCDCON5_INVVLINE | \+				S3C2410_LCDCON5_HWSWP,+	},+	.lpcsel=	0x02,+	.gpccon=	0xaa940659,+	.gpccon_mask=	0xffffffff,+	.gpcup=		0x0000ffff,+	.gpcup_mask=	0xffffffff,+	.gpdcon=	0xaa84aaa0,+	.gpdcon_mask=	0xffffffff,+	.gpdup=		0x0000faff,+	.gpdup_mask=	0xffffffff,++	.width=		240,+	.height=	320,+	.xres=		{240,240,240},+	.yres=		{320,320,320},+	.bpp=		{16,16,16},+};++static void h1940_set_brightness(int tcmpb0)+{+	unsigned long tcfg0;+	unsigned long tcfg1;+	unsigned long tcon;++	/* configure power on/off */+	h1940_backlight_power(tcmpb0 ? 1 : 0);+++	tcfg0=readl(S3C2410_TCFG0);+	tcfg1=readl(S3C2410_TCFG1);++	tcfg0 &= ~S3C2410_TCFG_PRESCALER0_MASK;+	tcfg0 |= 0x18;++	tcfg1 &= ~S3C2410_TCFG1_MUX0_MASK;+	tcfg1 |= S3C2410_TCFG1_MUX0_DIV2;++	writel(tcfg0, S3C2410_TCFG0);+	writel(tcfg1, S3C2410_TCFG1);+	writel(0x31, S3C2410_TCNTB(0)); +	tcon = readl(S3C2410_TCON);+	tcon &= ~0x0F;+	tcon |= S3C2410_TCON_T0RELOAD;+	tcon |= S3C2410_TCON_T0MANUALUPD;++	writel(tcon, S3C2410_TCON);+	writel(0x31, S3C2410_TCNTB(0));+	writel(tcmpb0, S3C2410_TCMPB(0));++	/* start the timer running */+	tcon |= S3C2410_TCON_T0START;+	tcon &= ~S3C2410_TCON_T0MANUALUPD;+	writel(tcon, S3C2410_TCON);+}++static struct s3c2410_bl_mach_info h1940_blcfg __initdata = {++	.backlight_max          = 0x2c,+	.backlight_default      = 0x16,+	.backlight_power	= h1940_backlight_power,+	.set_brightness		= h1940_set_brightness,+	.backlight_power	= h1940_backlight_power,+	.lcd_power		= h1940_lcd_power+};  static struct platform_device *h1940_devices[] __initdata = { 	&s3c_device_usb, 	&s3c_device_lcd,+	&s3c_device_bl, 	&s3c_device_wdt, 	&s3c_device_i2c, 	&s3c_device_iis,+	&s3c_device_sdi,+	&s3c_device_usbgadget,+	&s3c_device_ts,+	&s3c_device_kbd, };  static struct s3c24xx_board h1940_board __initdata = {@@ -116,11 +260,22 @@ void __init h1940_init_irq(void)  } +void __init h1940_init(void)+{+	set_s3c2410ts_info(&h1940_ts_cfg);+ 	set_s3c2410udc_info(&h1940_udc_cfg);+ 	/* Set pad to usb device and usbsuspend to 'normal' */+ 	__raw_writel(__raw_readl(S3C2410_MISCCR)&~0x3008,S3C2410_MISCCR);+	set_s3c2410fb_info(&h1940_lcdcfg);+	set_s3c2410bl_info(&h1940_blcfg);+}+ MACHINE_START(H1940, "IPAQ-H1940")      MAINTAINER("Ben Dooks <ben@fluff.org>")      BOOT_MEM(S3C2410_SDRAM_PA, S3C2410_PA_UART, (u32)S3C24XX_VA_UART)      BOOT_PARAMS(S3C2410_SDRAM_PA + 0x100)      MAPIO(h1940_map_io)      INITIRQ(h1940_init_irq)+     INIT_MACHINE(h1940_init) 	.timer		= &s3c24xx_timer, MACHINE_ENDdiff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.c--- a/arch/arm/mach-s3c2410/s3c2410.c+++ b/arch/arm/mach-s3c2410/s3c2410.c@@ -45,8 +45,9 @@  /* Initial IO mappings */ -static struct map_desc s3c2410_iodesc[] __initdata = {+struct map_desc s3c2410_iodesc[] __initdata = { 	IODESC_ENT(USBHOST),+	IODESC_ENT(USBDEV), 	IODESC_ENT(CLKPWR), 	IODESC_ENT(LCD), 	IODESC_ENT(UART),@@ -55,6 +56,8 @@ static struct map_desc s3c2410_iodesc[]  	IODESC_ENT(WATCHDOG) }; +unsigned long s3c2410_iodesc_size = ARRAY_SIZE(s3c2410_iodesc);+ static struct resource s3c_uart0_resource[] = { 	[0] = { 		.start = S3C2410_PA_UART0,diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig--- a/drivers/input/keyboard/Kconfig+++ b/drivers/input/keyboard/Kconfig@@ -182,4 +182,14 @@ config KEYBOARD_HIL 	  This driver implements support for HIL-keyboards attached 	  to your machine, so normally you should say Y here. +config KEYBOARD_S3C2410+	tristate "s3c2410 keyboard"+	depends on ARCH_S3C2410+	default y	+	help++	  To compile this driver as a module, choose M here: the +	  module will be called s3c2410kbd.++ endifdiff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefile--- a/drivers/input/keyboard/Makefile+++ b/drivers/input/keyboard/Makefile@@ -16,4 +16,5 @@ obj-$(CONFIG_KEYBOARD_98KBD)		+= 98kbd.o obj-$(CONFIG_KEYBOARD_CORGI)		+= corgikbd.o obj-$(CONFIG_KEYBOARD_HIL)		+= hil_kbd.o obj-$(CONFIG_KEYBOARD_HIL_OLD)		+= hilkbd.o+obj-$(CONFIG_KEYBOARD_S3C2410)		+= s3c2410kbd.o diff --git a/drivers/input/keyboard/s3c2410kbd.c b/drivers/input/keyboard/s3c2410kbd.cnew file mode 100644--- /dev/null+++ b/drivers/input/keyboard/s3c2410kbd.c@@ -0,0 +1,175 @@+/*+ * 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 program is distributed in the hope that it will be useful,+ * but WITHOUT ANY WARRANTY; without even the implied warranty of+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the+ * GNU General Public License for more details.+ *+ * You should have received a copy of the GNU General Public License+ * along with this program; if not, write to the Free Software

⌨️ 快捷键说明

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