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

📄 full.patch

📁 2410平台的linux补丁!基于1940板子!惠普公司的产品不错!
💻 PATCH
📖 第 1 页 / 共 5 页
字号:
diff --git a/Makefile b/Makefileindex 4a47203..eea8b18 100644--- a/Makefile+++ b/Makefile@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 20-EXTRAVERSION =-rc1+EXTRAVERSION =-rc1-h1940 NAME=Avast! A bilge rat!  # *DOCUMENTATION*@@ -182,8 +182,8 @@ # Alternatively CROSS_COMPILE can be set # 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.Sindex e8f7436..b556794 100644--- a/arch/arm/kernel/calls.S+++ b/arch/arm/kernel/calls.S@@ -231,7 +231,7 @@ 		CALL(sys_mincore) /* 220 */	CALL(sys_madvise) 		CALL(ABI(sys_fcntl64, sys_oabi_fcntl64))-		CALL(sys_ni_syscall) /* TUX */+		CALL(sys_mhelper) /* TUX */ 		CALL(sys_ni_syscall) 		CALL(sys_gettid) /* 225 */	CALL(ABI(sys_readahead, sys_oabi_readahead))diff --git a/arch/arm/mach-s3c2410/devs.c b/arch/arm/mach-s3c2410/devs.cindex cae35ff..fe94044 100644--- a/arch/arm/mach-s3c2410/devs.c+++ b/arch/arm/mach-s3c2410/devs.c@@ -28,6 +28,10 @@ #include <asm/io.h> #include <asm/irq.h>  #include <asm/arch/regs-serial.h>+#include <asm/arch/udc.h>+#include <asm/arch/ts.h>+#include <asm/arch/lcd.h>+#include <asm/arch/buttons.h>  #include "devs.h" #include "cpu.h"@@ -185,6 +189,22 @@ void __init s3c24xx_fb_set_platdata(stru 	} } +struct platform_device s3c_device_bl = {+	.name		  = "s3c2410-bl",+	.id		  = -1,+};++EXPORT_SYMBOL(s3c_device_bl);++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));+	s3c_device_bl.dev.platform_data = &s3c2410bl_info;+}+EXPORT_SYMBOL(set_s3c2410bl_info);+ /* NAND Controller */  static struct resource s3c_nand_resource[] = {@@ -204,6 +224,44 @@ struct platform_device s3c_device_nand =  EXPORT_SYMBOL(s3c_device_nand); +/* Touchscreen */+struct platform_device s3c_device_ts = {+	.name		  = "s3c2410-ts",+	.id		  = -1,+};++EXPORT_SYMBOL(s3c_device_ts);++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));+	s3c_device_ts.dev.platform_data = &s3c2410ts_info;+}+EXPORT_SYMBOL(set_s3c2410ts_info);++/* 'Keyboard' */+struct platform_device s3c_device_buttons = {+	.name             = "s3c-buttons",+	.id               = -1,+};++EXPORT_SYMBOL(s3c_device_buttons);++void __init s3c24xx_butt_set_platdata(struct s3c_butt_mach_info *pd)+{+	struct s3c_butt_mach_info *npd;++	npd = kmalloc(sizeof(*npd), GFP_KERNEL);+	if (npd) {+		memcpy(npd, pd, sizeof(*npd));+		s3c_device_buttons.dev.platform_data = npd;+	} else {+		printk(KERN_ERR "no memory for buttons platform data\n");+	}+}+ /* USB Device (Gadget)*/  static struct resource s3c_usbgadget_resource[] = {@@ -229,6 +287,20 @@ struct platform_device s3c_device_usbgad  EXPORT_SYMBOL(s3c_device_usbgadget); +void __init s3c24xx_udc_set_platdata(struct s3c2410_udc_mach_info *pd)+{+	struct s3c2410_udc_mach_info *npd;++	npd = kmalloc(sizeof(*npd), GFP_KERNEL);+	if (npd) {+		memcpy(npd, pd, sizeof(*npd));+		s3c_device_usbgadget.dev.platform_data = npd;+	} else {+		printk(KERN_ERR "no memory for udc platform data\n");+	}+}++ /* Watchdog */  static struct resource s3c_wdt_resource[] = {diff --git a/arch/arm/mach-s3c2410/devs.h b/arch/arm/mach-s3c2410/devs.hindex 14fb0ba..6760aa4 100644--- a/arch/arm/mach-s3c2410/devs.h+++ b/arch/arm/mach-s3c2410/devs.h@@ -23,6 +23,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;@@ -41,6 +42,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_buttons;  /* s3c2440 specific devices */ diff --git a/arch/arm/mach-s3c2410/mach-bast.c b/arch/arm/mach-s3c2410/mach-bast.cindex 2968fb2..ccaab33 100644--- a/arch/arm/mach-s3c2410/mach-bast.c+++ b/arch/arm/mach-s3c2410/mach-bast.c@@ -410,6 +410,7 @@ static struct s3c2410_platform_i2c bast_   static struct s3c2410fb_mach_info __initdata bast_lcd_info = {+	.type		= S3C2410_LCDCON1_TFT, 	.width		= 640, 	.height		= 480, diff --git a/arch/arm/mach-s3c2410/mach-h1940.c b/arch/arm/mach-s3c2410/mach-h1940.cindex f5b9809..b4266fd 100644--- a/arch/arm/mach-s3c2410/mach-h1940.c+++ b/arch/arm/mach-s3c2410/mach-h1940.c@@ -19,6 +19,8 @@ #include <linux/timer.h> #include <linux/init.h> #include <linux/platform_device.h> +#include <linux/mmc/protocol.h>+ #include <asm/mach/arch.h> #include <asm/mach/map.h> #include <asm/mach/irq.h>@@ -32,10 +34,19 @@ #include <asm/mach-types.h>  #include <asm/arch/regs-serial.h> #include <asm/arch/regs-lcd.h>+#include <asm/arch/regs-gpio.h>+#include <asm/arch/regs-timer.h>+#include <asm/arch/regs-clock.h>+#include <asm/arch/irqs.h>  #include <asm/arch/h1940.h> #include <asm/arch/h1940-latch.h> #include <asm/arch/fb.h>+#include <asm/arch/udc.h>+#include <asm/arch/ts.h>+#include <asm/arch/lcd.h>+#include <asm/arch/mmc.h>+#include <asm/arch/buttons.h>  #include <linux/serial_core.h> @@ -103,12 +114,83 @@ void h1940_latch_control(unsigned int cl  EXPORT_SYMBOL_GPL(h1940_latch_control); +static void h1940_udc_pullup(enum s3c2410_udc_cmd_e cmd)+{+	printk(KERN_DEBUG "udc: pullup(%d)\n",cmd);++	switch (cmd)+	{+		case S3C2410_UDC_P_ENABLE :+			h1940_latch_control(0, H1940_LATCH_USB_DP);+			break;+		case S3C2410_UDC_P_DISABLE :+			h1940_latch_control(H1940_LATCH_USB_DP, 0);+			break;+		case S3C2410_UDC_P_RESET :+			break;+		default:+			break;+	}+}++static struct s3c2410_udc_mach_info h1940_udc_cfg __initdata = {+	.udc_command		= h1940_udc_pullup,+	.vbus_pin		= S3C2410_GPG5,+	.vbus_pin_inverted	= 1,+};+++static struct s3c2410_ts_mach_info h1940_ts_cfg __initdata = {+		.delay = 10000,+		.presc = 49,+		.oversampling_shift = 2,+};++static struct s3c24xx_mmc_platdata h1940_mmc_cfg = {+	.gpio_detect	= S3C2410_GPF5,+	.set_power	= NULL,+	.ocr_avail	= MMC_VDD_32_33,+};+  /**  * 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)+{+	int value;++	if (!on) {+		/* set to 3ec */+		s3c2410_gpio_setpin(S3C2410_GPC0, 0);+		/* wait for 3ac */+		do {+			value = s3c2410_gpio_getpin(S3C2410_GPC6);+		} while (value);+		/* set to 38c */+		s3c2410_gpio_setpin(S3C2410_GPC5, 0);+	}+	else {+		/* Set to 3ac */+		s3c2410_gpio_setpin(S3C2410_GPC5, 1);+		/* Set to 3ad */+		s3c2410_gpio_setpin(S3C2410_GPC0, 1);+	}+}+ static struct s3c2410fb_mach_info h1940_lcdcfg __initdata = { 	.fixed_syncs=		1,+	.type=			S3C2410_LCDCON1_TFT, 	.regs={ 		.lcdcon1=	S3C2410_LCDCON1_TFT16BPP | \ 				S3C2410_LCDCON1_TFT | \@@ -147,12 +229,84 @@ static struct s3c2410fb_mach_info h1940_ 	.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,+	.lcd_power		= h1940_lcd_power+};++static struct s3c_button h1940_butts[] = {+	DECLARE_BUTTON(  S3C2410_GPF0,    KEY_POWER,	      "Power", 0 ),+	DECLARE_BUTTON(  S3C2410_GPF6,    KEY_ENTER, 	     "Select", 1 ),+	DECLARE_BUTTON(  S3C2410_GPF7,   KEY_RECORD,	     "Record", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG0, KEY_CALENDAR,	   "Calendar", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG2,   KEY_COFFEE,	   "Contacts", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG3,     KEY_MAIL,	       "Mail", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG6,     KEY_LEFT,	 "Left_arrow", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG7, KEY_HOMEPAGE,	       "Home", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG8,    KEY_RIGHT,	"Right_arrow", 0 ),+	DECLARE_BUTTON(  S3C2410_GPG9,       KEY_UP,	   "Up_arrow", 0 ),+	DECLARE_BUTTON( S3C2410_GPG10,     KEY_DOWN,	 "Down_arrow", 0 ),+};++static struct s3c_butt_mach_info h1940_butt_cfg __initdata = {+	.buttons  = h1940_butts,+	.size = ARRAY_SIZE(h1940_butts),+};+ 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_buttons,+	&s3c_device_nand, };  static struct s3c24xx_board h1940_board __initdata = {@@ -180,7 +334,28 @@ static void __init h1940_init_irq(void)  static void __init h1940_init(void) {+	u32 tmp;+ 	s3c24xx_fb_set_platdata(&h1940_lcdcfg);+	set_s3c2410ts_info(&h1940_ts_cfg);+	set_s3c2410bl_info(&h1940_blcfg);+ 	s3c24xx_udc_set_platdata(&h1940_udc_cfg);+	s3c24xx_butt_set_platdata(&h1940_butt_cfg);++	s3c_device_sdi.dev.platform_data = &h1940_mmc_cfg;++	/* Turn off suspend on both USB ports, and switch the+	 * selectable USB port to USB device mode. */++	s3c2410_modify_misccr(S3C2410_MISCCR_USBHOST |+			      S3C2410_MISCCR_USBSUSPND0 |+			      S3C2410_MISCCR_USBSUSPND1, 0x0);++	tmp = (+		 0x78 << S3C2410_PLLCON_MDIVSHIFT)+	      | (0x02 << S3C2410_PLLCON_PDIVSHIFT)+	      | (0x03 << S3C2410_PLLCON_SDIVSHIFT);+	writel(tmp, S3C2410_UPLLCON); }  MACHINE_START(H1940, "IPAQ-H1940")@@ -190,6 +365,6 @@ MACHINE_START(H1940, "IPAQ-H1940") 	.boot_params	= S3C2410_SDRAM_PA + 0x100, 	.map_io		= h1940_map_io, 	.init_irq	= h1940_init_irq,-	.init_machine   = h1940_init,+	.init_machine	= h1940_init, 	.timer		= &s3c24xx_timer, MACHINE_ENDdiff --git a/arch/arm/mach-s3c2410/mach-rx3715.c b/arch/arm/mach-s3c2410/mach-rx3715.cindex ecbcdf7..15b1c0e 100644--- a/arch/arm/mach-s3c2410/mach-rx3715.c+++ b/arch/arm/mach-s3c2410/mach-rx3715.c@@ -111,6 +111,7 @@ static struct s3c2410_uartcfg rx3715_uar /* framebuffer lcd controller information */  static struct s3c2410fb_mach_info rx3715_lcdcfg __initdata = {+	.type	=		S3C2410_LCDCON1_TFT, 	.regs	= { 		.lcdcon1 =	S3C2410_LCDCON1_TFT16BPP | \ 				S3C2410_LCDCON1_TFT | \diff --git a/arch/arm/mach-s3c2410/mach-smdk2440.c b/arch/arm/mach-s3c2410/mach-smdk2440.cindex e2205ff..90114a7 100644--- a/arch/arm/mach-s3c2410/mach-smdk2440.c+++ b/arch/arm/mach-s3c2410/mach-smdk2440.c@@ -105,7 +105,8 @@ static struct s3c2410_uartcfg smdk2440_u /* LCD driver info */  static struct s3c2410fb_mach_info smdk2440_lcd_cfg __initdata = {-	.regs	= {+	.type	=		  S3C2410_LCDCON1_TFT,+  	.regs	= {  		.lcdcon1	= S3C2410_LCDCON1_TFT16BPP | 				  S3C2410_LCDCON1_TFT |diff --git a/arch/arm/mach-s3c2410/s3c2410.c b/arch/arm/mach-s3c2410/s3c2410.cindex 183e403..ef462b5 100644--- a/arch/arm/mach-s3c2410/s3c2410.c+++ b/arch/arm/mach-s3c2410/s3c2410.c@@ -39,6 +39,7 @@ #include "clock.h"  static struct map_desc s3c2410_iodesc[] __initdata = { 	IODESC_ENT(USBHOST),+	IODESC_ENT(USBDEV), 	IODESC_ENT(CLKPWR), 	IODESC_ENT(LCD), 	IODESC_ENT(TIMER),diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfigindex 049f2f5..2a98293 100644--- a/drivers/input/keyboard/Kconfig+++ b/drivers/input/keyboard/Kconfig@@ -214,4 +214,13 @@ config KEYBOARD_AAED2000 	  To compile this driver as a module, choose M here: the 	  module will be called aaed2000_kbd. +config S3C_BUTTONS+	tristate "s3c2410 buttons"+	depends on ARCH_S3C2410+	default y	+	help++	  To compile this driver as a module, choose M here: the +	  module will be called s3c2410_buttons.ko.+ endifdiff --git a/drivers/input/keyboard/Makefile b/drivers/input/keyboard/Makefileindex 5687979..90cd801 100644--- a/drivers/input/keyboard/Makefile+++ b/drivers/input/keyboard/Makefile@@ -18,4 +18,5 @@ obj-$(CONFIG_KEYBOARD_HIL)		+= hil_kbd.o obj-$(CONFIG_KEYBOARD_HIL_OLD)		+= hilkbd.o obj-$(CONFIG_KEYBOARD_OMAP)             += omap-keypad.o obj-$(CONFIG_KEYBOARD_AAED2000)         += aaed2000_kbd.o

⌨️ 快捷键说明

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