You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: James S. <jsi...@us...> - 2002-05-25 20:32:31
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/arm/lib In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/arch/arm/lib Modified Files: Makefile Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/arm/lib/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 18 Mar 2002 19:29:09 -0000 1.2 +++ Makefile 25 May 2002 20:31:58 -0000 1.3 @@ -4,8 +4,6 @@ # Copyright (C) 1995-2000 Russell King # -USE_STANDARD_AS_RULE := true - L_TARGET := lib.a obj-y := backtrace.o changebit.o csumipv6.o csumpartial.o \ |
From: James S. <jsi...@us...> - 2002-05-25 20:32:31
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386 In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/arch/i386 Modified Files: config.in Log Message: Synced to 2.5.18 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/config.in,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- config.in 6 May 2002 17:29:59 -0000 1.41 +++ config.in 25 May 2002 20:31:58 -0000 1.42 @@ -386,6 +386,9 @@ mainmenu_option next_comment comment 'Kernel hacking' +if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + dep_bool 'Software Suspend' CONFIG_SOFTWARE_SUSPEND $CONFIG_PM +fi bool 'Kernel debugging' CONFIG_DEBUG_KERNEL if [ "$CONFIG_DEBUG_KERNEL" != "n" ]; then |
From: James S. <jsi...@us...> - 2002-05-25 20:32:31
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/arch/arm/kernel Modified Files: setup.c Log Message: Synced to 2.5.18 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel/setup.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- setup.c 21 May 2002 04:06:05 -0000 1.11 +++ setup.c 25 May 2002 20:31:58 -0000 1.12 @@ -60,7 +60,6 @@ extern int _stext, _text, _etext, _edata, _end; unsigned int processor_id; -unsigned int compat; unsigned int __machine_arch_type; unsigned int system_rev; unsigned int system_serial_low; @@ -287,11 +286,6 @@ } printk("Machine: %s\n", list->name); - if (compat) - printk(KERN_WARNING "Using compatibility code " - "scheduled for removal in v%d.%d.%d\n", - compat >> 24, (compat >> 12) & 0x3ff, - compat & 0x3ff); return list; } |
From: James S. <jsi...@us...> - 2002-05-25 20:32:07
|
Update of /cvsroot/linuxconsole/ruby/utils In directory usw-pr-cvs1:/tmp/cvs-serv32077/utils Modified Files: remove-obsolete-files Log Message: Synced to 2.5.18 Index: remove-obsolete-files =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/remove-obsolete-files,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- remove-obsolete-files 30 Mar 2002 18:15:38 -0000 1.32 +++ remove-obsolete-files 25 May 2002 20:32:04 -0000 1.33 @@ -1,7 +1,7 @@ #!/bin/sh rm -fv Documentation/usb/hid.txt -rm -fv arch/arm/lib/kbd.o +rm -fv arch/arm/lib/kbd.c rm -fv arch/m68k/atari/atakeyb.c rm -fv arch/m68k/atari/joystick.c rm -fv arch/m68k/hp300/hil.c @@ -16,7 +16,11 @@ rm -fv arch/ppc/boot/kbd.c rm -fv drivers/acorn/char/keyb_arc.c rm -fv drivers/acorn/char/keyb_ps2.c +rm -fv drivers/acorn/char/mouse_ps2.c rm -fv drivers/acorn/char/mouse_rpc.c +rm -rf drivers/acorn/char/defkeymap-acorn.c +rm -rf drivers/acorn/char/defkeymap-acorn.map +rm -rf drivers/acorn/char/defkeymap-l7200.c rm -fv drivers/char/console.c rm -fv drivers/char/adbmouse.c rm -fv drivers/char/amigamouse.c |
From: James S. <jsi...@us...> - 2002-05-25 20:32:07
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/include/linux Modified Files: gameport.h Log Message: Synced to 2.5.18 Index: gameport.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/gameport.h,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- gameport.h 3 Jan 2002 08:55:05 -0000 1.20 +++ gameport.h 25 May 2002 20:32:04 -0000 1.21 @@ -78,8 +78,8 @@ void gameport_register_port(struct gameport *gameport); void gameport_unregister_port(struct gameport *gameport); #else -void __inline__ gameport_register_port(struct gameport *gameport) { return; } -void __inline__ gameport_unregister_port(struct gameport *gameport) { return; } +static inline void gameport_register_port(struct gameport *gameport) { return; } +static inline void gameport_unregister_port(struct gameport *gameport) { return; } #endif void gameport_register_device(struct gameport_dev *dev); |
From: James S. <jsi...@us...> - 2002-05-25 20:32:06
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/aty In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/drivers/video/aty Modified Files: Makefile Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/aty/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 9 Sep 2001 16:36:34 -0000 1.2 +++ Makefile 25 May 2002 20:32:04 -0000 1.3 @@ -1,12 +1,12 @@ -O_TARGET := atyfb.o - export-objs := atyfb_base.o mach64_accel.o -obj-y := atyfb_base.o mach64_accel.o -obj-$(CONFIG_FB_ATY_GX) += mach64_gx.o -obj-$(CONFIG_FB_ATY_CT) += mach64_ct.o mach64_cursor.o -obj-m := $(O_TARGET) +obj-$(CONFIG_FB_ATY) += atyfb.o + +atyfb-y := atyfb_base.o mach64_accel.o +atyfb-$(CONFIG_FB_ATY_GX) += mach64_gx.o +atyfb-$(CONFIG_FB_ATY_CT) += mach64_ct.o mach64_cursor.o +atyfb-objs := $(atyfb-y) include $(TOPDIR)/Rules.make |
From: James S. <jsi...@us...> - 2002-05-25 20:32:06
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/drivers/video Modified Files: Makefile cfbimgblt.c sgivwfb.c Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Makefile,v retrieving revision 1.46 retrieving revision 1.47 diff -u -d -r1.46 -r1.47 --- Makefile 16 Apr 2002 17:41:52 -0000 1.46 +++ Makefile 25 May 2002 20:32:03 -0000 1.47 @@ -38,7 +38,7 @@ obj-$(CONFIG_FB_ACORN) += acornfb.o obj-$(CONFIG_FB_AMIGA) += amifb.o -obj-$(CONFIG_FB_PM2) += pm2fb.o fbgen.o +obj-$(CONFIG_FB_PM2) += pm2fb.o obj-$(CONFIG_FB_PM3) += pm3fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_APOLLO) += dnfb.o obj-$(CONFIG_FB_Q40) += q40fb.o @@ -60,9 +60,9 @@ obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_IMSTT) += imsttfb.o obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o -obj-$(CONFIG_FB_CLGEN) += clgenfb.o fbgen.o +obj-$(CONFIG_FB_CLGEN) += clgenfb.o obj-$(CONFIG_FB_S3TRIO) += S3triofb.o -obj-$(CONFIG_FB_TGA) += tgafb.o fbgen.o +obj-$(CONFIG_FB_TGA) += tgafb.o obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VGA16) += vga16fb.o vga.o obj-$(CONFIG_FB_VIRGE) += virgefb.o @@ -76,44 +76,25 @@ obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o -obj-$(CONFIG_FB_STI) += stifb.o sticore.o fbgen.o +obj-$(CONFIG_FB_STI) += stifb.o sticore.o obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o obj-$(CONFIG_FB_MAXINE) += maxinefb.o obj-$(CONFIG_FB_TX3912) += tx3912fb.o -subdir-$(CONFIG_FB_MATROX) += matrox -ifeq ($(CONFIG_FB_MATROX),y) -obj-y += matrox/matrox.o -endif - -subdir-$(CONFIG_FB_RIVA) += riva -ifeq ($(CONFIG_FB_RIVA),y) -obj-y += riva/rivafb.o -endif - -subdir-$(CONFIG_FB_SIS) += sis -ifeq ($(CONFIG_FB_SIS),y) -obj-y += sis/sisfb.o -endif - -subdir-$(CONFIG_FB_ATY) += aty -ifeq ($(CONFIG_FB_ATY),y) -obj-y += aty/atyfb.o -endif - -subdir-$(CONFIG_FB_TDFX) += tdfx -ifeq ($(CONFIG_FB_TDFX),y) -obj-y += tdfx/tdfxfb.o -endif - +obj-$(CONFIG_FB_MATROX) += matrox/ +obj-$(CONFIG_FB_RIVA) += riva/ +obj-$(CONFIG_FB_SIS) += sis/ +obj-$(CONFIG_FB_ATY) += aty/ +obj-$(CONFIG_FB_TDFX) += tdfx/ + obj-$(CONFIG_FB_SUN3) += sun3fb.o obj-$(CONFIG_FB_BWTWO) += bwtwofb.o obj-$(CONFIG_FB_HGA) += hgafb.o obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_HIT) += hitfb.o fbgen.o -obj-$(CONFIG_FB_E1355) += epson1355fb.o fbgen.o +obj-$(CONFIG_FB_HIT) += hitfb.o +obj-$(CONFIG_FB_E1355) += epson1355fb.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o obj-$(CONFIG_FB_ANAKIN) += anakinfb.o Index: cfbimgblt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/cfbimgblt.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- cfbimgblt.c 20 May 2002 21:53:12 -0000 1.12 +++ cfbimgblt.c 25 May 2002 20:32:03 -0000 1.13 @@ -105,7 +105,7 @@ fb_writel((mask & eorx)^bgx, dst); dst++; } - l =- pad; + l -= pad; dst1 += p->fix.line_length; } } Index: sgivwfb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/sgivwfb.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- sgivwfb.c 26 Dec 2001 17:28:11 -0000 1.12 +++ sgivwfb.c 25 May 2002 20:32:03 -0000 1.13 @@ -32,8 +32,8 @@ struct sgivw_par { asregs *regs; - u32 cmap_fifo; - u_long timing_num; + u32 cmap_fifo; + u_long timing_num; }; /* @@ -44,51 +44,53 @@ [...1131 lines suppressed...] static void __exit sgivwfb_exit(void) { - struct sgivw_par *par = fb_info.par; + struct sgivw_par *par = fb_info.par; - unregister_framebuffer(&fb_info); - dbe_TurnOffDma(); - iounmap(par->regs); - iounmap(fb_info.screenbase); + unregister_framebuffer(&fb_info); + dbe_TurnOffDma(); + iounmap(par->regs); + iounmap(fb_info.screenbase); } module_init(sgivwfb_init); module_exit(sgivwfb_exit); MODULE_LICENSE("GPL"); - |
From: James S. <jsi...@us...> - 2002-05-25 20:32:06
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/tc In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/drivers/tc Modified Files: Makefile Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/tc/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 15 Mar 2002 18:28:12 -0000 1.1 +++ Makefile 25 May 2002 20:32:03 -0000 1.2 @@ -1,11 +1,6 @@ # # Makefile for the linux kernel. # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. @@ -14,25 +9,7 @@ # Object file lists. -obj-y := -obj-m := -obj-n := -obj- := - obj-$(CONFIG_TC) += tc.o obj-$(CONFIG_ZS) += zs.o - -# Files that are both resident and modular: remove from modular. - -obj-m := $(filter-out $(obj-y), $(obj-m)) - -# Translate to Rules.make lists. - -L_TARGET := tc.a - -L_OBJS := $(sort $(filter-out $(export-objs), $(obj-y))) -LX_OBJS := $(sort $(filter $(export-objs), $(obj-y))) -M_OBJS := $(sort $(filter-out $(export-objs), $(obj-m))) -MX_OBJS := $(sort $(filter $(export-objs), $(obj-m))) include $(TOPDIR)/Rules.make |
From: James S. <jsi...@us...> - 2002-05-25 20:32:06
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video/riva In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/drivers/video/riva Modified Files: Makefile Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/riva/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 27 Mar 2002 17:30:57 -0000 1.1 +++ Makefile 25 May 2002 20:32:04 -0000 1.2 @@ -1,15 +1,9 @@ # # Makefile for the Riva framebuffer driver # -# Note! Dependencies are done automagically by 'make dep', which also -# removes any old dependencies. DON'T put your own dependencies here -# unless it's something special (ie not a .c file). -# -# Note 2! The CFLAGS definitions are now in the main makefile... -O_TARGET := rivafb.o +obj-$(CONFIG_FB_RIVA) += rivafb.o -obj-y := fbdev.o riva_hw.o ../cfbfillrect.o ../cfbcopyarea.o ../cfbimgblt.o -obj-m := $(O_TARGET) +rivafb-objs := fbdev.o riva_hw.o include $(TOPDIR)/Rules.make |
From: James S. <jsi...@us...> - 2002-05-25 20:32:06
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/drivers/input/joystick Modified Files: Makefile analog.c Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 10 Feb 2002 23:13:57 -0000 1.5 +++ Makefile 25 May 2002 20:32:03 -0000 1.6 @@ -2,10 +2,6 @@ # Makefile for the input core drivers. # -# The target object and module list name. - -O_TARGET := joydrv.o - mod-subdirs := iforce # Each configuration option enables a list of files. @@ -33,7 +29,7 @@ obj-$(CONFIG_JOYSTICK_TWIDJOY) += twidjoy.o obj-$(CONFIG_JOYSTICK_WARRIOR) += warrior.o -subdir-$(CONFIG_JOYSTICK_IFORCE) += iforce +obj-$(CONFIG_JOYSTICK_IFORCE) += iforce/ # The global Rules.make. Index: analog.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/analog.c,v retrieving revision 1.68 retrieving revision 1.69 diff -u -d -r1.68 -r1.69 --- analog.c 22 Jan 2002 20:18:32 -0000 1.68 +++ analog.c 25 May 2002 20:32:03 -0000 1.69 @@ -137,10 +137,9 @@ */ #ifdef __i386__ -#define TSC_PRESENT (test_bit(X86_FEATURE_TSC, &boot_cpu_data.x86_capability)) -#define GET_TIME(x) do { if (TSC_PRESENT) rdtscl(x); else x = get_time_pit(); } while (0) -#define DELTA(x,y) (TSC_PRESENT?((y)-(x)):((x)-(y)+((x)<(y)?1193180L/HZ:0))) -#define TIME_NAME (TSC_PRESENT?"TSC":"PIT") +#define GET_TIME(x) do { if (cpu_has_tsc) rdtscl(x); else x = get_time_pit(); } while (0) +#define DELTA(x,y) (cpu_has_tsc?((y)-(x)):((x)-(y)+((x)<(y)?1193180L/HZ:0))) +#define TIME_NAME (cpu_has_tsc?"TSC":"PIT") static unsigned int get_time_pit(void) { extern spinlock_t i8253_lock; |
From: James S. <jsi...@us...> - 2002-05-25 20:32:06
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input In directory usw-pr-cvs1:/tmp/cvs-serv32077/linux/drivers/input Modified Files: Makefile Log Message: Synced to 2.5.18 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/input/Makefile,v retrieving revision 1.48 retrieving revision 1.49 diff -u -d -r1.48 -r1.49 --- Makefile 27 Mar 2002 20:58:50 -0000 1.48 +++ Makefile 25 May 2002 20:32:03 -0000 1.49 @@ -22,26 +22,10 @@ obj-$(CONFIG_INPUT_POWER) += power.o obj-$(CONFIG_INPUT_EVBUG) += evbug.o -subdir-$(CONFIG_INPUT_JOYSTICK) += joystick -subdir-$(CONFIG_INPUT_KEYBOARD) += keyboard -subdir-$(CONFIG_INPUT_MOUSE) += mouse -subdir-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen - -ifeq ($(CONFIG_INPUT_KEYBOARD),y) - obj-y += keyboard/keybdrv.o -endif - -ifeq ($(CONFIG_INPUT_MOUSE),y) - obj-y += mouse/mousedrv.o -endif - -ifeq ($(CONFIG_INPUT_JOYSTICK),y) - obj-y += joystick/joydrv.o -endif - -ifeq ($(CONFIG_INPUT_TOUCHSCREEN),y) - obj-y += touchscreen/tsdrv.o -endif +obj-$(CONFIG_INPUT_KEYBOARD) += keyboard/ +obj-$(CONFIG_INPUT_MOUSE) += mouse/ +obj-$(CONFIG_INPUT_JOYSTICK) += joystick/ +obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/ # The global Rules.make. |
From: James S. <jsi...@us...> - 2002-05-25 20:32:03
|
Update of /cvsroot/linuxconsole/ruby In directory usw-pr-cvs1:/tmp/cvs-serv32077 Added Files: AGAINST-2.5.18 Removed Files: AGAINST-2.5.16 Log Message: Synced to 2.5.18 --- NEW FILE: AGAINST-2.5.18 --- --- AGAINST-2.5.16 DELETED --- |
From: Brad M. <bra...@us...> - 2002-05-24 08:07:28
|
Update of /cvsroot/linuxconsole/ruby/web/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv27785 Modified Files: index.html quick.html Log Message: typos, image links, usb hid link in resources Index: index.html =================================================================== RCS file: /cvsroot/linuxconsole/ruby/web/htdocs/index.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- index.html 22 May 2002 20:42:08 -0000 1.9 +++ index.html 24 May 2002 08:07:24 -0000 1.10 @@ -145,6 +145,10 @@ href="http://www.suse.cz/development/input">input drivers</a>, a previous effort in this direction which we have integrated.<p> +<li>The <a +href="http://www.frogmouth.net/hid-doco/linux-hid.html">Linux USB HID +</a> document has information about the event device and ioctls.<p> + <li> EvStack, another previous attempt associated with the GGI project. There is a <a href="http://zhrodague.net/~jmcc/ggi/EvStack">home Index: quick.html =================================================================== RCS file: /cvsroot/linuxconsole/ruby/web/htdocs/quick.html,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- quick.html 22 May 2002 20:42:08 -0000 1.5 +++ quick.html 24 May 2002 08:07:24 -0000 1.6 @@ -228,7 +228,7 @@ interface can be used with any type of input device. This is how we can access keyboards with a tty as well as talk to touchscreens, joysticks, mice, and other various devices in a standard way. The mouse -interface is for backwards compatibality. Please use the Event interface for +interface is for backwards compatibility. Please use the Event interface for userland apps. For serial mice you need: @@ -274,7 +274,7 @@ Please note the Event interface can be used with any type of input device. This is how we can access keyboards with a tty as well as talk to touchscreens, joysticks, mice, and other various devices in a standard way. The mouse -interface is for backwards compatibality. Please use the Event interface for +interface is for backwards compatibility. Please use the Event interface for userland apps. <p> @@ -401,10 +401,10 @@ <a href="http://www.suse.cz/"><img src="input/sponsor.png" alt="Sponsored by SuSE" border=0 width=298 height=61></a> </div> -</td><td background="r3i.png"><img src="input/r3i.png" border=0 width=32 height=16 alt=""><br></td></tr> +</td><td background="input/r3i.png"><img src="input/r3i.png" border=0 width=32 height=16 alt=""><br></td></tr> <tr><td><img src="input/l5i.png" border=0 width=32 height=16 alt=""><br></td><td> </td><td><img src="input/r5i.png" border=0 width=32 height=16 alt=""><br></td></tr> -<tr><td><img src="input/l7i.png" border=0 width=32 height=16 alt=""><br></td><td background="m2i.png"> +<tr><td><img src="input/l7i.png" border=0 width=32 height=16 alt=""><br></td><td background="input/m2i.png"> <img src="input/m2i.png" border=0 width=32 height=16 alt=""><br> </td><td><img src="input/r7i.png" border=0 width=32 height=16 alt=""><br></td></tr> </table> |
From: Brad M. <bra...@us...> - 2002-05-22 20:42:12
|
Update of /cvsroot/linuxconsole/ruby/web/htdocs In directory usw-pr-cvs1:/tmp/cvs-serv7462 Modified Files: index.html quick.html Log Message: typos, better links from quick.html Index: index.html =================================================================== RCS file: /cvsroot/linuxconsole/ruby/web/htdocs/index.html,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- index.html 20 May 2002 15:33:55 -0000 1.8 +++ index.html 22 May 2002 20:42:08 -0000 1.9 @@ -79,7 +79,7 @@ <H1>Project Status and News:</H1> Development is moving fast. Since we cover a lot of areas of the linux kernel -we have separate links to pages that have developements to each different +we have separate links to pages that have developments to each different sub system<p> <a href="input/input.html">Input API</a> @@ -90,7 +90,7 @@ like to give it a try <a href="quick.html">click here</a> for instructions. Once you try it out we know you will have questions or just want to tell -your experiences we have a public developement mailing list. Also our list +your experiences we have a public development mailing list. Also our list is archived. If you like to join follow this <a href="http://lists.sourceforge.net/lists/listinfo/linuxconsole-dev">link</a>. @@ -124,11 +124,11 @@ the terminal emulation modular design.<p> <dt><a href="mailto:es...@th...">Eric S. Raymond</a> -<dd> Worked with Dominik to develope better temrinal emulation. Interested +<dd> Worked with Dominik to develop better terminal emulation. Interested in terminfo and ANSI conformance. (Eric maintains the master terminfo file.)<p> -<dd>And many others who have put time in and helped develope various parts +<dd>And many others who have put time in and helped develop various parts of the code. Thank you.<p> </dl> Index: quick.html =================================================================== RCS file: /cvsroot/linuxconsole/ruby/web/htdocs/quick.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- quick.html 3 Nov 2001 19:42:21 -0000 1.4 +++ quick.html 22 May 2002 20:42:08 -0000 1.5 @@ -18,15 +18,8 @@ <tr><td background="input/l3i.png"><img src="input/l3i.png" border=0 width=32 height=16 alt=""><br></td><td> <div align=center><strong> -<a href="index.html#introduction">Introduction</a> - -<a href="index.html#news">News</a> - -<a href="quick.html#download">Download</a> - -<a href="joystick.html">Joysticks</a> - -<a href="quick.html">Quick Start</a> - -<a href="index.html#documentation">Documentation</a> - -<a href="hardware.html">Supported Hardware</a> - -<a href="adapters.html">Adapters</a> - -<a href="input_links.html">Links</a><br> +<a href="input/input.html">InputMain</a> - +<a href="index.html">LinuxConsole</a><br> </strong></div></td><td background="input/r3i.png"><img src="input/r3i.png" border=0 width=32 height=16 alt=""><br></td></tr> <tr><td><img src="input/l4i.png" border=0 width=32 height=16 alt=""><br></td><td> @@ -405,15 +398,15 @@ </address> <div align=center> -<a href="http://www.suse.cz/"><img src="sponsor.png" alt="Sponsored by SuSE" border=0 width=298 height=61></a> +<a href="http://www.suse.cz/"><img src="input/sponsor.png" alt="Sponsored by SuSE" border=0 width=298 height=61></a> </div> -</td><td background="r3i.png"><img src="r3i.png" border=0 width=32 height=16 alt=""><br></td></tr> -<tr><td><img src="l5i.png" border=0 width=32 height=16 alt=""><br></td><td> -</td><td><img SRC="r5i.png" border=0 width=32 height=16 alt=""><br></td></tr> -<tr><td><img src="l7i.png" border=0 width=32 height=16 alt=""><br></td><td background="m2i.png"> -<img src="m2i.png" border=0 width=32 height=16 alt=""><br> -</td><td><img SRC="r7i.png" border=0 width=32 height=16 alt=""><br></td></tr> +</td><td background="r3i.png"><img src="input/r3i.png" border=0 width=32 height=16 alt=""><br></td></tr> +<tr><td><img src="input/l5i.png" border=0 width=32 height=16 alt=""><br></td><td> +</td><td><img src="input/r5i.png" border=0 width=32 height=16 alt=""><br></td></tr> +<tr><td><img src="input/l7i.png" border=0 width=32 height=16 alt=""><br></td><td background="m2i.png"> +<img src="input/m2i.png" border=0 width=32 height=16 alt=""><br> +</td><td><img src="input/r7i.png" border=0 width=32 height=16 alt=""><br></td></tr> </table> </body> |
From: James S. <jsi...@us...> - 2002-05-22 19:53:02
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv25145 Modified Files: vfb.c Log Message: Small cleanups. Updated to use NODEV. Index: vfb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/vfb.c,v retrieving revision 1.32 retrieving revision 1.33 diff -u -d -r1.32 -r1.33 --- vfb.c 26 Dec 2001 17:28:12 -0000 1.32 +++ vfb.c 22 May 2002 19:52:57 -0000 1.33 @@ -1,7 +1,7 @@ /* * linux/drivers/video/vfb.c -- Virtual frame buffer device * - * Copyright (C) 1999 James Simmons + * Copyright (C) 2002 James Simmons * * Copyright (C) 1997 Geert Uytterhoeven * @@ -24,6 +24,8 @@ #include <linux/fb.h> #include <linux/init.h> +#include <linux/fbcon.h> + /* * RAM we reserve for the frame buffer. This defines the maximum screen * size @@ -33,7 +35,7 @@ #define VIDEOMEMSIZE (1*1024*1024) /* 1 MB */ -static void* videomemory; +static void *videomemory; static u_long videomemorysize = VIDEOMEMSIZE; MODULE_PARM(videomemorysize, "l"); static const char *mode_option __initdata = NULL; @@ -42,16 +44,35 @@ static u32 vfb_pseudo_palette[17]; static struct fb_var_screeninfo vfb_default __initdata = { - /* 640x480, 8 bpp */ - 640, 480, 640, 480, 0, 0, 8, 0, - {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, - 0, FB_ACTIVATE_TEST, -1, -1, 0, - 20000, 64, 64, 32, 32, 64, 2, 0, FB_VMODE_NONINTERLACED + xres: 640, + yres: 480, + xres_virtual: 640, + yres_virtual: 480, + bits_per_pixel: 8, + red: { 0, 8, 0 }, + green: { 0, 8, 0 }, + blue: { 0, 8, 0 }, + activate: FB_ACTIVATE_TEST, + height: -1, + width: -1, + pixclock: 20000, + left_margin: 64, + right_margin: 64, + upper_margin: 32, + lower_margin: 32, + hsync_len: 64, + vsync_len: 2, + vmode: FB_VMODE_NONINTERLACED, }; static struct fb_fix_screeninfo vfb_fix __initdata = { - "Virtual FB", (unsigned long) NULL, 0, FB_TYPE_PACKED_PIXELS, 0, - FB_VISUAL_PSEUDOCOLOR, 1, 1, 1, 0, (unsigned long) NULL, 0, FB_ACCEL_NONE + id: "Virtual FB", + type: FB_TYPE_PACKED_PIXELS, + visual: FB_VISUAL_PSEUDOCOLOR, + xpanstep: 1, + ypanstep: 1, + ywrapstep: 1, + accel: FB_ACCEL_NONE, }; static int vfb_enable __initdata = 0; /* disabled by default */ @@ -61,25 +82,27 @@ * Interface used by the world */ int vfb_init(void); -int vfb_setup(char*); +int vfb_setup(char *); -static int vfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info); +static int vfb_check_var(struct fb_var_screeninfo *var, + struct fb_info *info); static int vfb_set_par(struct fb_info *info); static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, - u_int transp, struct fb_info *info); -static int vfb_pan_display(struct fb_var_screeninfo *var,struct fb_info *info); + u_int transp, struct fb_info *info); +static int vfb_pan_display(struct fb_var_screeninfo *var, + struct fb_info *info); static int vfb_mmap(struct fb_info *info, struct file *file, - struct vm_area_struct *vma); + struct vm_area_struct *vma); static struct fb_ops vfb_ops = { - fb_check_var: vfb_check_var, - fb_set_par: vfb_set_par, - fb_setcolreg: vfb_setcolreg, - fb_pan_display: vfb_pan_display, - fb_fillrect: cfb_fillrect, - fb_copyarea: cfb_copyarea, - fb_imageblit: cfb_imageblit, - fb_mmap: vfb_mmap, + fb_check_var: vfb_check_var, + fb_set_par: vfb_set_par, + fb_setcolreg: vfb_setcolreg, + fb_pan_display: vfb_pan_display, + fb_fillrect: cfb_fillrect, + fb_copyarea: cfb_copyarea, + fb_imageblit: cfb_imageblit, + fb_mmap: vfb_mmap, }; /* @@ -88,12 +111,12 @@ static u_long get_line_length(int xres_virtual, int bpp) { - u_long length; + u_long length; - length = xres_virtual*bpp; - length = (length+31)&~31; - length >>= 3; - return(length); + length = xres_virtual * bpp; + length = (length + 31) & ~31; + length >>= 3; + return (length); } /* @@ -104,122 +127,124 @@ * data from it to check this var. */ -static int vfb_check_var(struct fb_var_screeninfo *var, struct fb_info *info) +static int vfb_check_var(struct fb_var_screeninfo *var, + struct fb_info *info) { - u_long line_length; + u_long line_length; - /* - * FB_VMODE_CONUPDATE and FB_VMODE_SMOOTH_XPAN are equal! - * as FB_VMODE_SMOOTH_XPAN is only used internally - */ + /* + * FB_VMODE_CONUPDATE and FB_VMODE_SMOOTH_XPAN are equal! + * as FB_VMODE_SMOOTH_XPAN is only used internally + */ - if (var->vmode & FB_VMODE_CONUPDATE) { - var->vmode |= FB_VMODE_YWRAP; - var->xoffset = info->var.xoffset; - var->yoffset = info->var.yoffset; - } + if (var->vmode & FB_VMODE_CONUPDATE) { + var->vmode |= FB_VMODE_YWRAP; + var->xoffset = info->var.xoffset; + var->yoffset = info->var.yoffset; + } - /* - * Some very basic checks - */ - if (!var->xres) - var->xres = 1; - if (!var->yres) - var->yres = 1; - if (var->xres > var->xres_virtual) - var->xres_virtual = var->xres; - if (var->yres > var->yres_virtual) - var->yres_virtual = var->yres; - if (var->bits_per_pixel <= 1) - var->bits_per_pixel = 1; - else if (var->bits_per_pixel <= 8) - var->bits_per_pixel = 8; - else if (var->bits_per_pixel <= 16) - var->bits_per_pixel = 16; - else if (var->bits_per_pixel <= 24) - var->bits_per_pixel = 24; - else if (var->bits_per_pixel <= 32) - var->bits_per_pixel = 32; - else - return -EINVAL; + /* + * Some very basic checks + */ + if (!var->xres) + var->xres = 1; + if (!var->yres) + var->yres = 1; + if (var->xres > var->xres_virtual) + var->xres_virtual = var->xres; + if (var->yres > var->yres_virtual) + var->yres_virtual = var->yres; + if (var->bits_per_pixel <= 1) + var->bits_per_pixel = 1; + else if (var->bits_per_pixel <= 8) + var->bits_per_pixel = 8; + else if (var->bits_per_pixel <= 16) + var->bits_per_pixel = 16; + else if (var->bits_per_pixel <= 24) + var->bits_per_pixel = 24; + else if (var->bits_per_pixel <= 32) + var->bits_per_pixel = 32; + else + return -EINVAL; - if (var->xres_virtual < var->xoffset + var->xres) - var->xres_virtual = var->xoffset + var->xres; - if (var->yres_virtual < var->yoffset + var->yres) - var->yres_virtual = var->yoffset + var->yres; + if (var->xres_virtual < var->xoffset + var->xres) + var->xres_virtual = var->xoffset + var->xres; + if (var->yres_virtual < var->yoffset + var->yres) + var->yres_virtual = var->yoffset + var->yres; - /* - * Memory limit - */ - line_length = get_line_length(var->xres_virtual, var->bits_per_pixel); - if (line_length*var->yres_virtual > videomemorysize) - return -ENOMEM; + /* + * Memory limit + */ + line_length = + get_line_length(var->xres_virtual, var->bits_per_pixel); + if (line_length * var->yres_virtual > videomemorysize) + return -ENOMEM; - /* - * Now that we checked it we alter var. The reason being is that the video - * mode passed in might not work but slight changes to it might make it - * work. This way we let the user know what is acceptable. - */ - switch (var->bits_per_pixel) { - case 1: - case 8: - var->red.offset = 0; - var->red.length = 8; - var->green.offset = 0; - var->green.length = 8; - var->blue.offset = 0; - var->blue.length = 8; - var->transp.offset = 0; - var->transp.length = 0; - break; - case 16: /* RGBA 5551 */ - if (var->transp.length) { - var->red.offset = 0; - var->red.length = 5; - var->green.offset = 5; - var->green.length = 5; - var->blue.offset = 10; - var->blue.length = 5; - var->transp.offset = 15; - var->transp.length = 1; - } else { /* RGB 565 */ - var->red.offset = 0; - var->red.length = 5; - var->green.offset = 5; - var->green.length = 6; - var->blue.offset = 11; - var->blue.length = 5; - var->transp.offset = 0; - var->transp.length = 0; - } - break; - case 24: /* RGB 888 */ - var->red.offset = 0; - var->red.length = 8; - var->green.offset = 8; - var->green.length = 8; - var->blue.offset = 16; - var->blue.length = 8; - var->transp.offset = 0; - var->transp.length = 0; - break; - case 32: /* RGBA 8888 */ - var->red.offset = 0; - var->red.length = 8; - var->green.offset = 8; - var->green.length = 8; - var->blue.offset = 16; - var->blue.length = 8; - var->transp.offset = 24; - var->transp.length = 8; - break; - } - var->red.msb_right = 0; - var->green.msb_right = 0; - var->blue.msb_right = 0; - var->transp.msb_right = 0; + /* + * Now that we checked it we alter var. The reason being is that the video + * mode passed in might not work but slight changes to it might make it + * work. This way we let the user know what is acceptable. + */ + switch (var->bits_per_pixel) { + case 1: + case 8: + var->red.offset = 0; + var->red.length = 8; + var->green.offset = 0; + var->green.length = 8; + var->blue.offset = 0; + var->blue.length = 8; + var->transp.offset = 0; + var->transp.length = 0; + break; + case 16: /* RGBA 5551 */ + if (var->transp.length) { + var->red.offset = 0; + var->red.length = 5; + var->green.offset = 5; + var->green.length = 5; + var->blue.offset = 10; + var->blue.length = 5; + var->transp.offset = 15; + var->transp.length = 1; + } else { /* RGB 565 */ + var->red.offset = 0; + var->red.length = 5; + var->green.offset = 5; + var->green.length = 6; + var->blue.offset = 11; + var->blue.length = 5; + var->transp.offset = 0; + var->transp.length = 0; + } + break; + case 24: /* RGB 888 */ + var->red.offset = 0; + var->red.length = 8; + var->green.offset = 8; + var->green.length = 8; + var->blue.offset = 16; + var->blue.length = 8; + var->transp.offset = 0; + var->transp.length = 0; + break; + case 32: /* RGBA 8888 */ + var->red.offset = 0; + var->red.length = 8; + var->green.offset = 8; + var->green.length = 8; + var->blue.offset = 16; + var->blue.length = 8; + var->transp.offset = 24; + var->transp.length = 8; + break; + } + var->red.msb_right = 0; + var->green.msb_right = 0; + var->blue.msb_right = 0; + var->transp.msb_right = 0; - return 0; + return 0; } /* This routine actually sets the video mode. It's in here where we @@ -229,10 +254,10 @@ static int vfb_set_par(struct fb_info *info) { info->fix.line_length = get_line_length(info->var.xres_virtual, - info->var.bits_per_pixel); + info->var.bits_per_pixel); return 0; } - + /* * Set a single color register. The values supplied are already * rounded down to the hardware's capabilities (according to the @@ -240,84 +265,85 @@ */ static int vfb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, - u_int transp, struct fb_info *info) + u_int transp, struct fb_info *info) { - if (regno >= 256) /* no. of hw registers */ - return 1; - /* - * Program hardware... do anything you want with transp - */ + if (regno >= 256) /* no. of hw registers */ + return 1; + /* + * Program hardware... do anything you want with transp + */ - /* grayscale works only partially under directcolor */ - if (info->var.grayscale) { - /* grayscale = 0.30*R + 0.59*G + 0.11*B */ - red = green = blue = (red * 77 + green * 151 + blue * 28) >> 8; - } - - /* Directcolor: - * var->{color}.offset contains start of bitfield - * var->{color}.length contains length of bitfield - * {hardwarespecific} contains width of RAMDAC - * cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset) - * RAMDAC[X] is programmed to (red, green, blue) - * - * Pseudocolor: - * uses offset = 0 && length = RAMDAC register width. - * var->{color}.offset is 0 - * var->{color}.length contains widht of DAC - * cmap is not used - * RAMDAC[X] is programmed to (red, green, blue) - * Truecolor: - * does not use DAC. Usually 3 are present. - * var->{color}.offset contains start of bitfield - * var->{color}.length contains length of bitfield - * cmap is programmed to (red << red.offset) | (green << green.offset) | - * (blue << blue.offset) | (transp << transp.offset) - * RAMDAC does not exist - */ + /* grayscale works only partially under directcolor */ + if (info->var.grayscale) { + /* grayscale = 0.30*R + 0.59*G + 0.11*B */ + red = green = blue = + (red * 77 + green * 151 + blue * 28) >> 8; + } + + /* Directcolor: + * var->{color}.offset contains start of bitfield + * var->{color}.length contains length of bitfield + * {hardwarespecific} contains width of RAMDAC + * cmap[X] is programmed to (X << red.offset) | (X << green.offset) | (X << blue.offset) + * RAMDAC[X] is programmed to (red, green, blue) + * + * Pseudocolor: + * uses offset = 0 && length = RAMDAC register width. + * var->{color}.offset is 0 + * var->{color}.length contains widht of DAC + * cmap is not used + * RAMDAC[X] is programmed to (red, green, blue) + * Truecolor: + * does not use DAC. Usually 3 are present. + * var->{color}.offset contains start of bitfield + * var->{color}.length contains length of bitfield + * cmap is programmed to (red << red.offset) | (green << green.offset) | + * (blue << blue.offset) | (transp << transp.offset) + * RAMDAC does not exist + */ #define CNVT_TOHW(val,width) ((((val)<<(width))+0x7FFF-(val))>>16) - switch (info->fix.visual) { - case FB_VISUAL_TRUECOLOR: - case FB_VISUAL_PSEUDOCOLOR: - red = CNVT_TOHW(red, info->var.red.length); - green = CNVT_TOHW(green, info->var.green.length); - blue = CNVT_TOHW(blue, info->var.blue.length); - transp = CNVT_TOHW(transp, info->var.transp.length); - break; - case FB_VISUAL_DIRECTCOLOR: - red = CNVT_TOHW(red, 8); /* expect 8 bit DAC */ - green = CNVT_TOHW(green, 8); - blue = CNVT_TOHW(blue, 8); - /* hey, there is bug in transp handling... */ - transp = CNVT_TOHW(transp, 8); - break; - } + switch (info->fix.visual) { + case FB_VISUAL_TRUECOLOR: + case FB_VISUAL_PSEUDOCOLOR: + red = CNVT_TOHW(red, info->var.red.length); + green = CNVT_TOHW(green, info->var.green.length); + blue = CNVT_TOHW(blue, info->var.blue.length); + transp = CNVT_TOHW(transp, info->var.transp.length); + break; + case FB_VISUAL_DIRECTCOLOR: + red = CNVT_TOHW(red, 8); /* expect 8 bit DAC */ + green = CNVT_TOHW(green, 8); + blue = CNVT_TOHW(blue, 8); + /* hey, there is bug in transp handling... */ + transp = CNVT_TOHW(transp, 8); + break; + } #undef CNVT_TOHW - /* Truecolor has hardware independent palette */ - if (info->fix.visual == FB_VISUAL_TRUECOLOR) { - u32 v; + /* Truecolor has hardware independent palette */ + if (info->fix.visual == FB_VISUAL_TRUECOLOR) { + u32 v; - if (regno >= 16) - return 1; + if (regno >= 16) + return 1; - v = (red << info->var.red.offset) | - (green << info->var.green.offset) | - (blue << info->var.blue.offset) | - (transp << info->var.transp.offset); - switch (info->var.bits_per_pixel) { + v = (red << info->var.red.offset) | + (green << info->var.green.offset) | + (blue << info->var.blue.offset) | + (transp << info->var.transp.offset); + switch (info->var.bits_per_pixel) { case 8: break; case 16: - ((u16*)(info->pseudo_palette))[regno] = v; + ((u16 *) (info->pseudo_palette))[regno] = v; break; case 24: case 32: - ((u32*)(info->pseudo_palette))[regno] = v; + ((u32 *) (info->pseudo_palette))[regno] = v; break; - } - return 0; - } - return 0; + } + return 0; + } + return 0; } /* @@ -326,24 +352,26 @@ * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag */ -static int vfb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info) +static int vfb_pan_display(struct fb_var_screeninfo *var, + struct fb_info *info) { - if (var->vmode & FB_VMODE_YWRAP) { - if (var->yoffset < 0 || var->yoffset >= info->var.yres_virtual || - var->xoffset) - return -EINVAL; - } else { - if (var->xoffset + var->xres > info->var.xres_virtual || - var->yoffset + var->yres > info->var.yres_virtual) - return -EINVAL; - } - info->var.xoffset = var->xoffset; - info->var.yoffset = var->yoffset; - if (var->vmode & FB_VMODE_YWRAP) - info->var.vmode |= FB_VMODE_YWRAP; - else - info->var.vmode &= ~FB_VMODE_YWRAP; - return 0; + if (var->vmode & FB_VMODE_YWRAP) { + if (var->yoffset < 0 + || var->yoffset >= info->var.yres_virtual + || var->xoffset) + return -EINVAL; + } else { + if (var->xoffset + var->xres > info->var.xres_virtual || + var->yoffset + var->yres > info->var.yres_virtual) + return -EINVAL; + } + info->var.xoffset = var->xoffset; + info->var.yoffset = var->yoffset; + if (var->vmode & FB_VMODE_YWRAP) + info->var.vmode |= FB_VMODE_YWRAP; + else + info->var.vmode &= ~FB_VMODE_YWRAP; + return 0; } /* @@ -351,27 +379,27 @@ */ static int vfb_mmap(struct fb_info *info, struct file *file, - struct vm_area_struct *vma) + struct vm_area_struct *vma) { - return -EINVAL; + return -EINVAL; } int __init vfb_setup(char *options) { - char *this_opt; + char *this_opt; - vfb_enable = 1; + vfb_enable = 1; - if (!options || !*options) - return 1; + if (!options || !*options) + return 1; - while ((this_opt = strsep(&options, ",")) != NULL) { - if (!*this_opt) - continue; - if (!strncmp(this_opt, "disable", 7)) - vfb_enable = 0; - } - return 1; + while ((this_opt = strsep(&options, ",")) != NULL) { + if (!*this_opt) + continue; + if (!strncmp(this_opt, "disable", 7)) + vfb_enable = 0; + } + return 1; } /* @@ -380,57 +408,59 @@ int __init vfb_init(void) { - int retval; + int retval; - if (!vfb_enable) - return -ENXIO; + if (!vfb_enable) + return -ENXIO; - /* - * For real video cards we use ioremap. - */ - if (!(videomemory = vmalloc(videomemorysize))) - return -ENOMEM; - - /* - * VFB must clear memory to prevent kernel info - * leakage into userspace - * VGA-based drivers MUST NOT clear memory if - * they want to be able to take over vgacon - */ - memset(videomemory, 0, videomemorysize); - - fb_info.screen_base = videomemory; - fb_info.node = -1; - fb_info.fbops = &vfb_ops; + /* + * For real video cards we use ioremap. + */ + if (!(videomemory = vmalloc(videomemorysize))) + return -ENOMEM; - retval = fb_find_mode(&fb_info.var, &fb_info, mode_option, - NULL, 0, NULL, 8); + /* + * VFB must clear memory to prevent kernel info + * leakage into userspace + * VGA-based drivers MUST NOT clear memory if + * they want to be able to take over vgacon + */ + memset(videomemory, 0, videomemorysize); - if (!retval || (retval == 4)) - fb_info.var = vfb_default; - fb_info.fix = vfb_fix; - fb_info.pseudo_palette = &vfb_pseudo_palette; - fb_info.flags = FBINFO_FLAG_DEFAULT; - - if (register_framebuffer(&fb_info) < 0) { - vfree(videomemory); - return -EINVAL; - } + fb_info.screen_base = videomemory; + fb_info.node = -1; + fb_info.fbops = &vfb_ops; - printk(KERN_INFO "fb%d: Virtual frame buffer device, using %ldK of video memory\n", GET_FB_IDX(fb_info.node), videomemorysize>>10); - return 0; + retval = fb_find_mode(&fb_info.var, &fb_info, mode_option, + NULL, 0, NULL, 8); + + if (!retval || (retval == 4)) + fb_info.var = vfb_default; + fb_info.fix = vfb_fix; + fb_info.pseudo_palette = &vfb_pseudo_palette; + fb_info.flags = FBINFO_FLAG_DEFAULT; + + if (register_framebuffer(&fb_info) < 0) { + vfree(videomemory); + return -EINVAL; + } + + printk(KERN_INFO + "fb%d: Virtual frame buffer device, using %ldK of video memory\n", + GET_FB_IDX(fb_info.node), videomemorysize >> 10); + return 0; } #ifdef MODULE static void __exit vfb_cleanup(void) { - unregister_framebuffer(&fb_info); - vfree(videomemory); + unregister_framebuffer(&fb_info); + vfree(videomemory); } module_init(vfb_init); module_exit(vfb_cleanup); MODULE_LICENSE("GPL"); -#endif /* MODULE */ +#endif /* MODULE */ |
From: Franz S. <fs...@us...> - 2002-05-21 19:38:04
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/macintosh In directory usw-pr-cvs1:/tmp/cvs-serv16504 Modified Files: Makefile adbhid.c mac_hid.c Log Message: Revert accidental merge, ruby CVS is far ahead to the stuff in the kernel :-). Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/macintosh/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile 21 May 2002 04:06:05 -0000 1.9 +++ Makefile 21 May 2002 19:34:14 -0000 1.10 @@ -29,7 +29,7 @@ obj-$(CONFIG_PMAC_PBOOK) += mediabay.o obj-$(CONFIG_MAC_SERIAL) += macserial.o obj-$(CONFIG_NVRAM) += nvram.o -obj-$(CONFIG_MAC_HID) += mac_hid.o +obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o obj-$(CONFIG_INPUT_ADBHID) += adbhid.o obj-$(CONFIG_PPC_RTC) += rtc.o obj-$(CONFIG_ANSLCD) += ans-lcd.o Index: adbhid.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/macintosh/adbhid.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- adbhid.c 21 May 2002 04:06:06 -0000 1.3 +++ adbhid.c 21 May 2002 19:34:14 -0000 1.4 @@ -96,11 +96,6 @@ static struct adb_ids mouse_ids; static struct adb_ids buttons_ids; -#ifdef CONFIG_PMAC_BACKLIGHT -/* Exported to via-pmu.c */ -int disable_kernel_backlight = 0; -#endif /* CONFIG_PMAC_BACKLIGHT */ - /* Kind of keyboard, see Apple technote 1152 */ #define ADB_KEYBOARD_UNKNOWN 0 #define ADB_KEYBOARD_ANSI 0x0100 @@ -133,7 +128,10 @@ /* first check this is from register 0 */ if (nb != 3 || (data[0] & 3) != KEYB_KEYREG) return; /* ignore it */ +#if 0 + /* How will this be handled now? */ kbd_pt_regs = regs; +#endif adbhid_input_keycode(id, data[1], 0); if (!(data[2] == 0xff || (data[2] == 0x7f && data[1] == 0x7f))) adbhid_input_keycode(id, data[2], 0); @@ -278,7 +276,7 @@ break; case 0x1f: /* Powerbook button device */ { - int down = (data[1] == (data[1] & 0xf)); + int down = (data[1] == (data[1] & 0xf)); #ifdef CONFIG_PMAC_BACKLIGHT int backlight = get_backlight_level(); #endif @@ -289,48 +287,44 @@ switch (data[1] & 0x0f) { case 0x8: /* mute */ - input_report_key(&adbhid[id]->input, KEY_MUTE, down); + input_report_key(&adbhid[id]->input, KEY_MUTE, + down); break; case 0x7: /* volume decrease */ - input_report_key(&adbhid[id]->input, KEY_VOLUMEDOWN, down); + input_report_key(&adbhid[id]->input, KEY_VOLUMEDOWN, + down); break; case 0x6: /* volume increase */ - input_report_key(&adbhid[id]->input, KEY_VOLUMEUP, down); - break; + input_report_key(&adbhid[id]->input, KEY_VOLUMEUP, + down); + break; case 0xb: /* eject */ - input_report_key(&adbhid[id]->input, KEY_EJECTCD, down); + input_report_key(&adbhid[id]->input, KEY_EJECTCD, + down); break; - case 0xa: /* brightness decrease */ + #ifdef CONFIG_PMAC_BACKLIGHT - if (!disable_kernel_backlight) { - if (!down || backlight < 0) - break; - if (backlight > BACKLIGHT_OFF) - set_backlight_level(backlight-1); - else - set_backlight_level(BACKLIGHT_OFF); + case 0xa: /* brightness decrease */ + if (!down || backlight < 0) break; - } -#endif /* CONFIG_PMAC_BACKLIGHT */ - input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSDOWN, down); + if (backlight > BACKLIGHT_OFF) + set_backlight_level(backlight-1); + else + set_backlight_level(BACKLIGHT_OFF); break; + case 0x9: /* brightness increase */ -#ifdef CONFIG_PMAC_BACKLIGHT - if (!disable_kernel_backlight) { - if (!down || backlight < 0) - break; - if (backlight < BACKLIGHT_MAX) - set_backlight_level(backlight+1); - else - set_backlight_level(BACKLIGHT_MAX); + if (!down || backlight < 0) break; - } -#endif /* CONFIG_PMAC_BACKLIGHT */ - input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down); + if (backlight < BACKLIGHT_MAX) + set_backlight_level(backlight+1); + else + set_backlight_level(BACKLIGHT_MAX); break; +#endif /* CONFIG_PMAC_BACKLIGHT */ } } break; @@ -463,8 +457,7 @@ return; } - sprintf(adbhid[id]->name, "ADB keyboard on ID %d:%d.%02x", - id, default_id, original_handler_id); + sprintf(adbhid[id]->name, "ADB keyboard"); memcpy(adbhid[id]->keycode, adb_to_linux_keycodes, sizeof(adb_to_linux_keycodes)); @@ -511,8 +504,7 @@ break; case ADB_MOUSE: - sprintf(adbhid[id]->name, "ADB mouse on ID %d:%d.%02x", - id, default_id, original_handler_id); + sprintf(adbhid[id]->name, "ADB mouse"); adbhid[id]->input.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); adbhid[id]->input.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); @@ -522,18 +514,14 @@ case ADB_MISC: switch (original_handler_id) { case 0x02: /* Adjustable keyboard button device */ - sprintf(adbhid[id]->name, "ADB adjustable keyboard buttons on ID %d:%d.%02x", - id, default_id, original_handler_id); + sprintf(adbhid[id]->name, "ADB adjustable keyboard buttons"); break; case 0x1f: /* Powerbook button device */ - sprintf(adbhid[id]->name, "ADB Powerbook buttons on ID %d:%d.%02x", - id, default_id, original_handler_id); + sprintf(adbhid[id]->name, "ADB Powerbook buttons"); adbhid[id]->input.evbit[0] = BIT(EV_KEY) | BIT(EV_REP); set_bit(KEY_MUTE, adbhid[id]->input.keybit); set_bit(KEY_VOLUMEUP, adbhid[id]->input.keybit); set_bit(KEY_VOLUMEDOWN, adbhid[id]->input.keybit); - set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit); - set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit); set_bit(KEY_EJECTCD, adbhid[id]->input.keybit); break; } @@ -551,8 +539,8 @@ input_register_device(&adbhid[id]->input); - printk(KERN_INFO "input%d: ADB HID on ID %d:%d.%02x\n", - adbhid[id]->input.number, id, default_id, original_handler_id); + printk(KERN_INFO "input: %s on adb%d:%d.%02x\n", + adbhid[id]->name, id, default_id, original_handler_id); if (default_id == ADB_KEYBOARD) { /* HACK WARNING!! This should go away as soon there is an utility @@ -582,11 +570,11 @@ ((id << 12)|(default_id << 8)|org_handler_id)) { adbhid_input_unregister(id); adbhid_input_register(id, default_id, org_handler_id, - cur_handler_id, mk); + cur_handler_id, mk); } } else adbhid_input_register(id, default_id, org_handler_id, - cur_handler_id, mk); + cur_handler_id, mk); return 1<<id; } @@ -595,10 +583,10 @@ { int i; for(i=1; i<16; i++) - if (adbhid[i] && !(exist&(1<<i))) - adbhid_input_unregister(i); + if (adbhid[i] && !(exist&(1<<i))) + adbhid_input_unregister(i); } - + static void adbhid_probe(void) { @@ -633,14 +621,16 @@ printk("ADB keyboard at %d, handler 1\n", id); adb_get_infos(id, &default_id, &cur_handler_id); - reg |= adbhid_input_reregister(id, default_id, org_handler_id, cur_handler_id, 0); + reg |= adbhid_input_reregister(id, default_id, org_handler_id, + cur_handler_id, 0); } for (i = 0; i < buttons_ids.nids; i++) { int id = buttons_ids.id[i]; adb_get_infos(id, &default_id, &org_handler_id); - reg |= adbhid_input_reregister(id, default_id, org_handler_id, org_handler_id, 0); + reg |= adbhid_input_reregister(id, default_id, org_handler_id, + org_handler_id, 0); } /* Try to switch all mice to handler 4, or 2 for three-button @@ -730,8 +720,8 @@ adb_get_infos(id, &default_id, &cur_handler_id); reg |= adbhid_input_reregister(id, default_id, org_handler_id, - cur_handler_id, mouse_kind); - } + cur_handler_id, mouse_kind); + } adbhid_input_devcleanup(reg); } @@ -744,7 +734,7 @@ printk(" (trackpad)"); adb_request(&req, NULL, ADBREQ_SYNC | ADBREQ_REPLY, 1, - ADB_READREG(id,1)); + ADB_READREG(id,1)); if (req.reply_len < 8) printk("bad length for reg. 1\n"); else @@ -784,7 +774,7 @@ 0x03, /*r1_buffer[6],*/ r1_buffer[7]); - /* Without this flush, the trackpad may be locked up */ + /* Without this flush, the trackpad may be locked up */ adb_request(&req, NULL, ADBREQ_SYNC, 1, ADB_FLUSH(id)); } } Index: mac_hid.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/macintosh/mac_hid.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- mac_hid.c 21 May 2002 04:06:06 -0000 1.2 +++ mac_hid.c 21 May 2002 19:34:14 -0000 1.3 @@ -3,11 +3,9 @@ * * HID support stuff for Macintosh computers. * - * Copyright (C) 2000 Franz Sirl. + * Copyright (C) 2000, 2001 Franz Sirl. * - * Stuff inside CONFIG_MAC_ADBKEYCODES should go away during 2.5 when all - * major distributions are using the Linux keycodes. - * Stuff inside CONFIG_MAC_EMUMOUSEBTN should really be moved to userspace. + * This stuff should really be handled in userspace. */ #include <linux/config.h> @@ -15,235 +13,19 @@ #include <linux/proc_fs.h> #include <linux/sysctl.h> #include <linux/input.h> -#include <linux/module.h> - -#ifdef CONFIG_MAC_ADBKEYCODES -#include <linux/keyboard.h> -#include <asm/keyboard.h> -#include <asm/machdep.h> -#endif - -#ifdef CONFIG_MAC_ADBKEYCODES -/* Simple translation table for the SysRq keys */ - -#ifdef CONFIG_MAGIC_SYSRQ -unsigned char mac_hid_kbd_sysrq_xlate[128] = - "asdfhgzxcv\000bqwer" /* 0x00 - 0x0f */ - "yt123465=97-80o]" /* 0x10 - 0x1f */ - "u[ip\rlj'k;\\,/nm." /* 0x20 - 0x2f */ - "\t `\177\000\033\000\000\000\000\000\000\000\000\000\000" - /* 0x30 - 0x3f */ - "\000\000\000*\000+\000\000\000\000\000/\r\000-\000" - /* 0x40 - 0x4f */ - "\000\0000123456789\000\000\000" /* 0x50 - 0x5f */ - "\205\206\207\203\210\211\000\213\000\215\000\000\000\000\000\212\000\214"; - /* 0x60 - 0x6f */ -extern unsigned char pckbd_sysrq_xlate[128]; -#endif - -static u_short macplain_map[NR_KEYS] = { - 0xfb61, 0xfb73, 0xfb64, 0xfb66, 0xfb68, 0xfb67, 0xfb7a, 0xfb78, - 0xfb63, 0xfb76, 0xf200, 0xfb62, 0xfb71, 0xfb77, 0xfb65, 0xfb72, - 0xfb79, 0xfb74, 0xf031, 0xf032, 0xf033, 0xf034, 0xf036, 0xf035, - 0xf03d, 0xf039, 0xf037, 0xf02d, 0xf038, 0xf030, 0xf05d, 0xfb6f, - 0xfb75, 0xf05b, 0xfb69, 0xfb70, 0xf201, 0xfb6c, 0xfb6a, 0xf027, - 0xfb6b, 0xf03b, 0xf05c, 0xf02c, 0xf02f, 0xfb6e, 0xfb6d, 0xf02e, - 0xf009, 0xf020, 0xf060, 0xf07f, 0xf200, 0xf01b, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, - 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, - 0xf104, 0xf105, 0xf106, 0xf102, 0xf107, 0xf108, 0xf200, 0xf10a, - 0xf200, 0xf10c, 0xf200, 0xf209, 0xf200, 0xf109, 0xf200, 0xf10b, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf103, 0xf117, - 0xf101, 0xf119, 0xf100, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, -}; - -static u_short macshift_map[NR_KEYS] = { - 0xfb41, 0xfb53, 0xfb44, 0xfb46, 0xfb48, 0xfb47, 0xfb5a, 0xfb58, - 0xfb43, 0xfb56, 0xf200, 0xfb42, 0xfb51, 0xfb57, 0xfb45, 0xfb52, - 0xfb59, 0xfb54, 0xf021, 0xf040, 0xf023, 0xf024, 0xf05e, 0xf025, - 0xf02b, 0xf028, 0xf026, 0xf05f, 0xf02a, 0xf029, 0xf07d, 0xfb4f, - 0xfb55, 0xf07b, 0xfb49, 0xfb50, 0xf201, 0xfb4c, 0xfb4a, 0xf022, - 0xfb4b, 0xf03a, 0xf07c, 0xf03c, 0xf03f, 0xfb4e, 0xfb4d, 0xf03e, - 0xf009, 0xf020, 0xf07e, 0xf07f, 0xf200, 0xf01b, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, - 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, - 0xf10e, 0xf10f, 0xf110, 0xf10c, 0xf111, 0xf112, 0xf200, 0xf10a, - 0xf200, 0xf10c, 0xf200, 0xf203, 0xf200, 0xf113, 0xf200, 0xf10b, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf20b, 0xf116, 0xf10d, 0xf117, - 0xf10b, 0xf20a, 0xf10a, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, -}; -static u_short macaltgr_map[NR_KEYS] = { - 0xf914, 0xfb73, 0xf917, 0xf919, 0xfb68, 0xfb67, 0xfb7a, 0xfb78, - 0xf916, 0xfb76, 0xf200, 0xf915, 0xfb71, 0xfb77, 0xf918, 0xfb72, - 0xfb79, 0xfb74, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200, - 0xf200, 0xf05d, 0xf07b, 0xf05c, 0xf05b, 0xf07d, 0xf07e, 0xfb6f, - 0xfb75, 0xf200, 0xfb69, 0xfb70, 0xf201, 0xfb6c, 0xfb6a, 0xf200, - 0xfb6b, 0xf200, 0xf200, 0xf200, 0xf200, 0xfb6e, 0xfb6d, 0xf200, - 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf90a, 0xf90b, 0xf90c, 0xf90d, 0xf90e, 0xf90f, - 0xf910, 0xf911, 0xf200, 0xf912, 0xf913, 0xf200, 0xf200, 0xf200, - 0xf510, 0xf511, 0xf512, 0xf50e, 0xf513, 0xf514, 0xf200, 0xf516, - 0xf200, 0xf10c, 0xf200, 0xf202, 0xf200, 0xf515, 0xf200, 0xf517, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf50f, 0xf117, - 0xf50d, 0xf119, 0xf50c, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, -}; - -static u_short macctrl_map[NR_KEYS] = { - 0xf001, 0xf013, 0xf004, 0xf006, 0xf008, 0xf007, 0xf01a, 0xf018, - 0xf003, 0xf016, 0xf200, 0xf002, 0xf011, 0xf017, 0xf005, 0xf012, - 0xf019, 0xf014, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01e, 0xf01d, - 0xf200, 0xf200, 0xf01f, 0xf01f, 0xf07f, 0xf200, 0xf01d, 0xf00f, - 0xf015, 0xf01b, 0xf009, 0xf010, 0xf201, 0xf00c, 0xf00a, 0xf007, - 0xf00b, 0xf200, 0xf01c, 0xf200, 0xf07f, 0xf00e, 0xf00d, 0xf20e, - 0xf200, 0xf000, 0xf000, 0xf008, 0xf200, 0xf200, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, - 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, - 0xf104, 0xf105, 0xf106, 0xf102, 0xf107, 0xf108, 0xf200, 0xf10a, - 0xf200, 0xf10c, 0xf200, 0xf204, 0xf200, 0xf109, 0xf200, 0xf10b, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf103, 0xf117, - 0xf101, 0xf119, 0xf100, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, -}; -static u_short macshift_ctrl_map[NR_KEYS] = { - 0xf001, 0xf013, 0xf004, 0xf006, 0xf008, 0xf007, 0xf01a, 0xf018, - 0xf003, 0xf016, 0xf200, 0xf002, 0xf011, 0xf017, 0xf005, 0xf012, - 0xf019, 0xf014, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200, 0xf00f, - 0xf015, 0xf200, 0xf009, 0xf010, 0xf201, 0xf00c, 0xf00a, 0xf200, - 0xf00b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf00e, 0xf00d, 0xf200, - 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, - 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, - 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf200, 0xf10c, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf200, 0xf117, - 0xf200, 0xf119, 0xf200, 0xf700, 0xf701, 0xf702, 0xf200, 0xf20c, -}; - -static u_short macalt_map[NR_KEYS] = { - 0xf861, 0xf873, 0xf864, 0xf866, 0xf868, 0xf867, 0xf87a, 0xf878, - 0xf863, 0xf876, 0xf200, 0xf862, 0xf871, 0xf877, 0xf865, 0xf872, - 0xf879, 0xf874, 0xf831, 0xf832, 0xf833, 0xf834, 0xf836, 0xf835, - 0xf83d, 0xf839, 0xf837, 0xf82d, 0xf838, 0xf830, 0xf85d, 0xf86f, - 0xf875, 0xf85b, 0xf869, 0xf870, 0xf80d, 0xf86c, 0xf86a, 0xf827, - 0xf86b, 0xf83b, 0xf85c, 0xf82c, 0xf82f, 0xf86e, 0xf86d, 0xf82e, - 0xf809, 0xf820, 0xf860, 0xf87f, 0xf200, 0xf81b, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf210, 0xf211, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf900, 0xf901, 0xf902, 0xf903, 0xf904, 0xf905, - 0xf906, 0xf907, 0xf200, 0xf908, 0xf909, 0xf200, 0xf200, 0xf200, - 0xf504, 0xf505, 0xf506, 0xf502, 0xf507, 0xf508, 0xf200, 0xf50a, - 0xf200, 0xf10c, 0xf200, 0xf209, 0xf200, 0xf509, 0xf200, 0xf50b, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf503, 0xf117, - 0xf501, 0xf119, 0xf500, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, -}; - -static u_short macctrl_alt_map[NR_KEYS] = { - 0xf801, 0xf813, 0xf804, 0xf806, 0xf808, 0xf807, 0xf81a, 0xf818, - 0xf803, 0xf816, 0xf200, 0xf802, 0xf811, 0xf817, 0xf805, 0xf812, - 0xf819, 0xf814, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, - 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf80f, - 0xf815, 0xf200, 0xf809, 0xf810, 0xf201, 0xf80c, 0xf80a, 0xf200, - 0xf80b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf80e, 0xf80d, 0xf200, - 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf702, 0xf703, - 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, - 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, - 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, - 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, - 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, - 0xf504, 0xf505, 0xf506, 0xf502, 0xf507, 0xf508, 0xf200, 0xf50a, - 0xf200, 0xf10c, 0xf200, 0xf200, 0xf200, 0xf509, 0xf200, 0xf50b, - 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf503, 0xf117, - 0xf501, 0xf119, 0xf500, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, -}; - -static unsigned short *mac_key_maps_save[MAX_NR_KEYMAPS] = { - macplain_map, macshift_map, macaltgr_map, 0, - macctrl_map, macshift_ctrl_map, 0, 0, - macalt_map, 0, 0, 0, - macctrl_alt_map, 0 -}; - -static unsigned short *pc_key_maps_save[MAX_NR_KEYMAPS]; - -int mac_hid_kbd_translate(unsigned char keycode, unsigned char *keycodep, - char raw_mode); -static int mac_hid_sysctl_keycodes(ctl_table *ctl, int write, struct file * filp, - void *buffer, size_t *lenp); -char mac_hid_kbd_unexpected_up(unsigned char keycode); - -static int keyboard_lock_keycodes = 0; -int keyboard_sends_linux_keycodes = 0; -#else -int keyboard_sends_linux_keycodes = 1; -#endif - - -static unsigned char e0_keys[128] = { - 0, 0, 0, KEY_KPCOMMA, 0, KEY_INTL3, 0, 0, /* 0x00-0x07 */ - 0, 0, 0, 0, KEY_LANG1, KEY_LANG2, 0, 0, /* 0x08-0x0f */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10-0x17 */ - 0, 0, 0, 0, KEY_KPENTER, KEY_RIGHTCTRL, KEY_VOLUMEUP, 0,/* 0x18-0x1f */ - 0, 0, 0, 0, 0, KEY_VOLUMEDOWN, KEY_MUTE, 0, /* 0x20-0x27 */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28-0x2f */ - 0, 0, 0, 0, 0, KEY_KPSLASH, 0, KEY_SYSRQ, /* 0x30-0x37 */ - KEY_RIGHTALT, KEY_BRIGHTNESSUP, KEY_BRIGHTNESSDOWN, - KEY_EJECTCD, 0, 0, 0, 0, /* 0x38-0x3f */ - 0, 0, 0, 0, 0, 0, 0, KEY_HOME, /* 0x40-0x47 */ - KEY_UP, KEY_PAGEUP, 0, KEY_LEFT, 0, KEY_RIGHT, 0, KEY_END, /* 0x48-0x4f */ - KEY_DOWN, KEY_PAGEDOWN, KEY_INSERT, KEY_DELETE, 0, 0, 0, 0, /* 0x50-0x57 */ - 0, 0, 0, KEY_LEFTMETA, KEY_RIGHTMETA, KEY_COMPOSE, KEY_POWER, 0, /* 0x58-0x5f */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ - 0, 0, 0, 0, 0, 0, 0, KEY_MACRO, /* 0x68-0x6f */ - 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */ - 0, 0, 0, 0, 0, 0, 0, 0 /* 0x78-0x7f */ -}; - -#ifdef CONFIG_MAC_EMUMOUSEBTN static struct input_dev emumousebtn; static void emumousebtn_input_register(void); static int mouse_emulate_buttons = 0; static int mouse_button2_keycode = KEY_RIGHTCTRL; /* right control key */ static int mouse_button3_keycode = KEY_RIGHTALT; /* right option key */ static int mouse_last_keycode = 0; -#endif - -extern void pckbd_init_hw(void); -#if defined CONFIG_SYSCTL && (defined(CONFIG_MAC_ADBKEYCODES) || defined(CONFIG_MAC_EMUMOUSEBTN)) +#if defined(CONFIG_SYSCTL) /* file(s) in /proc/sys/dev/mac_hid */ ctl_table mac_hid_files[] = { -#ifdef CONFIG_MAC_ADBKEYCODES - { - DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES, - "keyboard_sends_linux_keycodes", &keyboard_sends_linux_keycodes, sizeof(int), - 0644, NULL, &mac_hid_sysctl_keycodes - }, - { - DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES, - "keyboard_lock_keycodes", &keyboard_lock_keycodes, sizeof(int), - 0644, NULL, &proc_dointvec - }, -#endif -#ifdef CONFIG_MAC_EMUMOUSEBTN { DEV_MAC_HID_MOUSE_BUTTON_EMULATION, "mouse_button_emulation", &mouse_emulate_buttons, sizeof(int), @@ -259,7 +41,6 @@ "mouse_button3_keycode", &mouse_button3_keycode, sizeof(int), 0644, NULL, &proc_dointvec }, -#endif { 0 } }; @@ -279,154 +60,13 @@ static struct ctl_table_header *mac_hid_sysctl_header; -#ifdef CONFIG_MAC_ADBKEYCODES -static -int mac_hid_sysctl_keycodes(ctl_table *ctl, int write, struct file * filp, - void *buffer, size_t *lenp) -{ - int val = keyboard_sends_linux_keycodes; - int ret = 0; - - if (!write - || (write && !keyboard_lock_keycodes)) - ret = proc_dointvec(ctl, write, filp, buffer, lenp); - - if (write - && keyboard_sends_linux_keycodes != val) { - if (!keyboard_sends_linux_keycodes) { -#ifdef CONFIG_MAGIC_SYSRQ - ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate; - SYSRQ_KEY = 0x69; -#endif - memcpy(pc_key_maps_save, key_maps, sizeof(key_maps)); - memcpy(key_maps, mac_key_maps_save, sizeof(key_maps)); - } else { -#ifdef CONFIG_MAGIC_SYSRQ - ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate; - SYSRQ_KEY = 0x54; -#endif - memcpy(mac_key_maps_save, key_maps, sizeof(key_maps)); - memcpy(key_maps, pc_key_maps_save, sizeof(key_maps)); - } - } - - return ret; -} -#endif #endif /* endif CONFIG_SYSCTL */ -int mac_hid_kbd_translate(unsigned char scancode, unsigned char *keycode, - char raw_mode) -{ -#ifdef CONFIG_MAC_ADBKEYCODES - if (!keyboard_sends_linux_keycodes) { - if (!raw_mode) { - /* - * Convert R-shift/control/option to L version. - */ - switch (scancode) { - case 0x7b: scancode = 0x38; break; /* R-shift */ - case 0x7c: scancode = 0x3a; break; /* R-option */ - case 0x7d: scancode = 0x36; break; /* R-control */ - } - } - *keycode = scancode; - return 1; - } else -#endif - { - /* This code was copied from char/pc_keyb.c and will be - * superflous when the input layer is fully integrated. - * We don't need the high_keys handling, so this part - * has been removed. - */ - static int prev_scancode = 0; - - /* special prefix scancodes.. */ - if (scancode == 0xe0 || scancode == 0xe1) { - prev_scancode = scancode; - return 0; - } - - scancode &= 0x7f; - - if (prev_scancode) { - if (prev_scancode != 0xe0) { - if (prev_scancode == 0xe1 && scancode == 0x1d) { - prev_scancode = 0x100; - return 0; - } else if (prev_scancode == 0x100 && scancode == 0x45) { - *keycode = KEY_PAUSE; - prev_scancode = 0; - } else { - if (!raw_mode) - printk(KERN_INFO "keyboard: unknown e1 escape sequence\n"); - prev_scancode = 0; - return 0; - } - } else { - prev_scancode = 0; - if (scancode == 0x2a || scancode == 0x36) - return 0; - } - if (e0_keys[scancode]) - *keycode = e0_keys[scancode]; - else { - if (!raw_mode) - printk(KERN_INFO "keyboard: unknown scancode e0 %02x\n", - scancode); - return 0; - } - } else { - switch (scancode) { - case 91: scancode = KEY_LINEFEED; break; - case 92: scancode = KEY_KPEQUAL; break; - case 125: scancode = KEY_INTL1; break; - } - *keycode = scancode; - } - return 1; - } -} - -char mac_hid_kbd_unexpected_up(unsigned char keycode) -{ - if (keyboard_sends_linux_keycodes && keycode == KEY_F13) - return 0; - else - return 0x80; -} - -#ifdef CONFIG_MAC_ADBKEYCODES -int mac_hid_keyboard_sends_linux_keycodes(void) -{ - return keyboard_sends_linux_keycodes; -} - -EXPORT_SYMBOL(mac_hid_keyboard_sends_linux_keycodes); - -static int __init mac_hid_setup(char *str) -{ - int ints[2]; - - str = get_options(str, ARRAY_SIZE(ints), ints); - if (ints[0] == 1) { - keyboard_sends_linux_keycodes = ints[1] != 0; - keyboard_lock_keycodes = 1; - } - return 1; -} - -__setup("keyboard_sends_linux_keycodes=", mac_hid_setup); - -#endif - -#ifdef CONFIG_MAC_EMUMOUSEBTN int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down) { switch (caller) { case 1: - /* Called from keybdev.c */ + /* Called from keyboard.c */ if (mouse_emulate_buttons && (keycode == mouse_button2_keycode || keycode == mouse_button3_keycode)) { @@ -439,24 +79,14 @@ mouse_last_keycode = down ? keycode : 0; } break; - case 2: - /* Called from mousedev.c */ - if (mouse_emulate_buttons == 2 && keycode == 0) { - if (mouse_last_keycode == mouse_button2_keycode) - return 1; /* map to middle button */ - if (mouse_last_keycode == mouse_button3_keycode) - return 2; /* map to right button */ - } - return keycode; /* keep button */ } return 0; } -EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons); - static void emumousebtn_input_register(void) { emumousebtn.name = "Macintosh mouse button emulation"; + emumousebtn.phys = "machid/input0"; /* FIXME */ emumousebtn.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); emumousebtn.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); @@ -468,41 +98,22 @@ emumousebtn.idversion = 0x0100; input_register_device(&emumousebtn); - - printk(KERN_INFO "input%d: Macintosh mouse button emulation\n", emumousebtn.number); } -#endif -void __init mac_hid_init_hw(void) +static int __init mac_hid_init(void) { - -#ifdef CONFIG_MAC_ADBKEYCODES - memcpy(pc_key_maps_save, key_maps, sizeof(key_maps)); - - if (!keyboard_sends_linux_keycodes) { -#ifdef CONFIG_MAGIC_SYSRQ - ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate; - SYSRQ_KEY = 0x69; -#endif - memcpy(key_maps, mac_key_maps_save, sizeof(key_maps)); - } else { -#ifdef CONFIG_MAGIC_SYSRQ - ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate; - SYSRQ_KEY = 0x54; -#endif - } -#endif /* CONFIG_MAC_ADBKEYCODES */ - -#ifdef CONFIG_MAC_EMUMOUSEBTN emumousebtn_input_register(); -#endif - -#if CONFIG_PPC - if (_machine != _MACH_Pmac) - pckbd_init_hw(); -#endif -#if defined(CONFIG_SYSCTL) && (defined(CONFIG_MAC_ADBKEYCODES) || defined(CONFIG_MAC_EMUMOUSEBTN)) +#if defined(CONFIG_SYSCTL) mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 1); #endif /* CONFIG_SYSCTL */ + + return(0); } + +static void __exit mac_hid_exit(void) +{ +} + +module_init(mac_hid_init); +module_exit(mac_hid_exit); |
From: James S. <jsi...@us...> - 2002-05-21 04:06:09
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/macintosh In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/drivers/macintosh Modified Files: Makefile adbhid.c mac_hid.c Log Message: Synced to 2.5.16 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/macintosh/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 27 Jan 2002 22:22:56 -0000 1.8 +++ Makefile 21 May 2002 04:06:05 -0000 1.9 @@ -29,7 +29,7 @@ obj-$(CONFIG_PMAC_PBOOK) += mediabay.o obj-$(CONFIG_MAC_SERIAL) += macserial.o obj-$(CONFIG_NVRAM) += nvram.o -obj-$(CONFIG_MAC_EMUMOUSEBTN) += mac_hid.o +obj-$(CONFIG_MAC_HID) += mac_hid.o obj-$(CONFIG_INPUT_ADBHID) += adbhid.o obj-$(CONFIG_PPC_RTC) += rtc.o obj-$(CONFIG_ANSLCD) += ans-lcd.o Index: adbhid.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/macintosh/adbhid.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- adbhid.c 27 Jan 2002 22:22:56 -0000 1.2 +++ adbhid.c 21 May 2002 04:06:06 -0000 1.3 @@ -96,6 +96,11 @@ static struct adb_ids mouse_ids; static struct adb_ids buttons_ids; +#ifdef CONFIG_PMAC_BACKLIGHT +/* Exported to via-pmu.c */ +int disable_kernel_backlight = 0; +#endif /* CONFIG_PMAC_BACKLIGHT */ + /* Kind of keyboard, see Apple technote 1152 */ #define ADB_KEYBOARD_UNKNOWN 0 #define ADB_KEYBOARD_ANSI 0x0100 @@ -128,10 +133,7 @@ /* first check this is from register 0 */ if (nb != 3 || (data[0] & 3) != KEYB_KEYREG) return; /* ignore it */ -#if 0 - /* How will this be handled now? */ kbd_pt_regs = regs; -#endif adbhid_input_keycode(id, data[1], 0); if (!(data[2] == 0xff || (data[2] == 0x7f && data[1] == 0x7f))) adbhid_input_keycode(id, data[2], 0); @@ -276,7 +278,7 @@ break; case 0x1f: /* Powerbook button device */ { - int down = (data[1] == (data[1] & 0xf)); + int down = (data[1] == (data[1] & 0xf)); #ifdef CONFIG_PMAC_BACKLIGHT int backlight = get_backlight_level(); #endif @@ -287,44 +289,48 @@ switch (data[1] & 0x0f) { case 0x8: /* mute */ - input_report_key(&adbhid[id]->input, KEY_MUTE, - down); + input_report_key(&adbhid[id]->input, KEY_MUTE, down); break; case 0x7: /* volume decrease */ - input_report_key(&adbhid[id]->input, KEY_VOLUMEDOWN, - down); + input_report_key(&adbhid[id]->input, KEY_VOLUMEDOWN, down); break; case 0x6: /* volume increase */ - input_report_key(&adbhid[id]->input, KEY_VOLUMEUP, - down); - break; + input_report_key(&adbhid[id]->input, KEY_VOLUMEUP, down); + break; case 0xb: /* eject */ - input_report_key(&adbhid[id]->input, KEY_EJECTCD, - down); + input_report_key(&adbhid[id]->input, KEY_EJECTCD, down); break; - -#ifdef CONFIG_PMAC_BACKLIGHT case 0xa: /* brightness decrease */ - if (!down || backlight < 0) +#ifdef CONFIG_PMAC_BACKLIGHT + if (!disable_kernel_backlight) { + if (!down || backlight < 0) + break; + if (backlight > BACKLIGHT_OFF) + set_backlight_level(backlight-1); + else + set_backlight_level(BACKLIGHT_OFF); break; - if (backlight > BACKLIGHT_OFF) - set_backlight_level(backlight-1); - else - set_backlight_level(BACKLIGHT_OFF); + } +#endif /* CONFIG_PMAC_BACKLIGHT */ + input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSDOWN, down); break; - case 0x9: /* brightness increase */ - if (!down || backlight < 0) +#ifdef CONFIG_PMAC_BACKLIGHT + if (!disable_kernel_backlight) { + if (!down || backlight < 0) + break; + if (backlight < BACKLIGHT_MAX) + set_backlight_level(backlight+1); + else + set_backlight_level(BACKLIGHT_MAX); break; - if (backlight < BACKLIGHT_MAX) - set_backlight_level(backlight+1); - else - set_backlight_level(BACKLIGHT_MAX); - break; + } #endif /* CONFIG_PMAC_BACKLIGHT */ + input_report_key(&adbhid[id]->input, KEY_BRIGHTNESSUP, down); + break; } } break; @@ -457,7 +463,8 @@ return; } - sprintf(adbhid[id]->name, "ADB keyboard"); + sprintf(adbhid[id]->name, "ADB keyboard on ID %d:%d.%02x", + id, default_id, original_handler_id); memcpy(adbhid[id]->keycode, adb_to_linux_keycodes, sizeof(adb_to_linux_keycodes)); @@ -504,7 +511,8 @@ break; case ADB_MOUSE: - sprintf(adbhid[id]->name, "ADB mouse"); + sprintf(adbhid[id]->name, "ADB mouse on ID %d:%d.%02x", + id, default_id, original_handler_id); adbhid[id]->input.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); adbhid[id]->input.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); @@ -514,14 +522,18 @@ case ADB_MISC: switch (original_handler_id) { case 0x02: /* Adjustable keyboard button device */ - sprintf(adbhid[id]->name, "ADB adjustable keyboard buttons"); + sprintf(adbhid[id]->name, "ADB adjustable keyboard buttons on ID %d:%d.%02x", + id, default_id, original_handler_id); break; case 0x1f: /* Powerbook button device */ - sprintf(adbhid[id]->name, "ADB Powerbook buttons"); + sprintf(adbhid[id]->name, "ADB Powerbook buttons on ID %d:%d.%02x", + id, default_id, original_handler_id); adbhid[id]->input.evbit[0] = BIT(EV_KEY) | BIT(EV_REP); set_bit(KEY_MUTE, adbhid[id]->input.keybit); set_bit(KEY_VOLUMEUP, adbhid[id]->input.keybit); set_bit(KEY_VOLUMEDOWN, adbhid[id]->input.keybit); + set_bit(KEY_BRIGHTNESSUP, adbhid[id]->input.keybit); + set_bit(KEY_BRIGHTNESSDOWN, adbhid[id]->input.keybit); set_bit(KEY_EJECTCD, adbhid[id]->input.keybit); break; } @@ -539,8 +551,8 @@ input_register_device(&adbhid[id]->input); - printk(KERN_INFO "input: %s on adb%d:%d.%02x\n", - adbhid[id]->name, id, default_id, original_handler_id); + printk(KERN_INFO "input%d: ADB HID on ID %d:%d.%02x\n", + adbhid[id]->input.number, id, default_id, original_handler_id); if (default_id == ADB_KEYBOARD) { /* HACK WARNING!! This should go away as soon there is an utility @@ -570,11 +582,11 @@ ((id << 12)|(default_id << 8)|org_handler_id)) { adbhid_input_unregister(id); adbhid_input_register(id, default_id, org_handler_id, - cur_handler_id, mk); + cur_handler_id, mk); } } else adbhid_input_register(id, default_id, org_handler_id, - cur_handler_id, mk); + cur_handler_id, mk); return 1<<id; } @@ -583,10 +595,10 @@ { int i; for(i=1; i<16; i++) - if (adbhid[i] && !(exist&(1<<i))) - adbhid_input_unregister(i); + if (adbhid[i] && !(exist&(1<<i))) + adbhid_input_unregister(i); } - + static void adbhid_probe(void) { @@ -621,16 +633,14 @@ printk("ADB keyboard at %d, handler 1\n", id); adb_get_infos(id, &default_id, &cur_handler_id); - reg |= adbhid_input_reregister(id, default_id, org_handler_id, - cur_handler_id, 0); + reg |= adbhid_input_reregister(id, default_id, org_handler_id, cur_handler_id, 0); } for (i = 0; i < buttons_ids.nids; i++) { int id = buttons_ids.id[i]; adb_get_infos(id, &default_id, &org_handler_id); - reg |= adbhid_input_reregister(id, default_id, org_handler_id, - org_handler_id, 0); + reg |= adbhid_input_reregister(id, default_id, org_handler_id, org_handler_id, 0); } /* Try to switch all mice to handler 4, or 2 for three-button @@ -720,8 +730,8 @@ adb_get_infos(id, &default_id, &cur_handler_id); reg |= adbhid_input_reregister(id, default_id, org_handler_id, - cur_handler_id, mouse_kind); - } + cur_handler_id, mouse_kind); + } adbhid_input_devcleanup(reg); } @@ -734,7 +744,7 @@ printk(" (trackpad)"); adb_request(&req, NULL, ADBREQ_SYNC | ADBREQ_REPLY, 1, - ADB_READREG(id,1)); + ADB_READREG(id,1)); if (req.reply_len < 8) printk("bad length for reg. 1\n"); else @@ -774,7 +784,7 @@ 0x03, /*r1_buffer[6],*/ r1_buffer[7]); - /* Without this flush, the trackpad may be locked up */ + /* Without this flush, the trackpad may be locked up */ adb_request(&req, NULL, ADBREQ_SYNC, 1, ADB_FLUSH(id)); } } Index: mac_hid.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/macintosh/mac_hid.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- mac_hid.c 24 Jan 2002 19:51:26 -0000 1.1 +++ mac_hid.c 21 May 2002 04:06:06 -0000 1.2 @@ -3,9 +3,11 @@ * * HID support stuff for Macintosh computers. * - * Copyright (C) 2000, 2001 Franz Sirl. + * Copyright (C) 2000 Franz Sirl. * - * This stuff should really be handled in userspace. + * Stuff inside CONFIG_MAC_ADBKEYCODES should go away during 2.5 when all + * major distributions are using the Linux keycodes. + * Stuff inside CONFIG_MAC_EMUMOUSEBTN should really be moved to userspace. */ #include <linux/config.h> @@ -13,19 +15,235 @@ #include <linux/proc_fs.h> #include <linux/sysctl.h> #include <linux/input.h> +#include <linux/module.h> + +#ifdef CONFIG_MAC_ADBKEYCODES +#include <linux/keyboard.h> +#include <asm/keyboard.h> +#include <asm/machdep.h> +#endif + +#ifdef CONFIG_MAC_ADBKEYCODES +/* Simple translation table for the SysRq keys */ + +#ifdef CONFIG_MAGIC_SYSRQ +unsigned char mac_hid_kbd_sysrq_xlate[128] = + "asdfhgzxcv\000bqwer" /* 0x00 - 0x0f */ + "yt123465=97-80o]" /* 0x10 - 0x1f */ + "u[ip\rlj'k;\\,/nm." /* 0x20 - 0x2f */ + "\t `\177\000\033\000\000\000\000\000\000\000\000\000\000" + /* 0x30 - 0x3f */ + "\000\000\000*\000+\000\000\000\000\000/\r\000-\000" + /* 0x40 - 0x4f */ + "\000\0000123456789\000\000\000" /* 0x50 - 0x5f */ + "\205\206\207\203\210\211\000\213\000\215\000\000\000\000\000\212\000\214"; + /* 0x60 - 0x6f */ +extern unsigned char pckbd_sysrq_xlate[128]; +#endif + +static u_short macplain_map[NR_KEYS] = { + 0xfb61, 0xfb73, 0xfb64, 0xfb66, 0xfb68, 0xfb67, 0xfb7a, 0xfb78, + 0xfb63, 0xfb76, 0xf200, 0xfb62, 0xfb71, 0xfb77, 0xfb65, 0xfb72, + 0xfb79, 0xfb74, 0xf031, 0xf032, 0xf033, 0xf034, 0xf036, 0xf035, + 0xf03d, 0xf039, 0xf037, 0xf02d, 0xf038, 0xf030, 0xf05d, 0xfb6f, + 0xfb75, 0xf05b, 0xfb69, 0xfb70, 0xf201, 0xfb6c, 0xfb6a, 0xf027, + 0xfb6b, 0xf03b, 0xf05c, 0xf02c, 0xf02f, 0xfb6e, 0xfb6d, 0xf02e, + 0xf009, 0xf020, 0xf060, 0xf07f, 0xf200, 0xf01b, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, + 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, + 0xf104, 0xf105, 0xf106, 0xf102, 0xf107, 0xf108, 0xf200, 0xf10a, + 0xf200, 0xf10c, 0xf200, 0xf209, 0xf200, 0xf109, 0xf200, 0xf10b, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf103, 0xf117, + 0xf101, 0xf119, 0xf100, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, +}; + +static u_short macshift_map[NR_KEYS] = { + 0xfb41, 0xfb53, 0xfb44, 0xfb46, 0xfb48, 0xfb47, 0xfb5a, 0xfb58, + 0xfb43, 0xfb56, 0xf200, 0xfb42, 0xfb51, 0xfb57, 0xfb45, 0xfb52, + 0xfb59, 0xfb54, 0xf021, 0xf040, 0xf023, 0xf024, 0xf05e, 0xf025, + 0xf02b, 0xf028, 0xf026, 0xf05f, 0xf02a, 0xf029, 0xf07d, 0xfb4f, + 0xfb55, 0xf07b, 0xfb49, 0xfb50, 0xf201, 0xfb4c, 0xfb4a, 0xf022, + 0xfb4b, 0xf03a, 0xf07c, 0xf03c, 0xf03f, 0xfb4e, 0xfb4d, 0xf03e, + 0xf009, 0xf020, 0xf07e, 0xf07f, 0xf200, 0xf01b, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, + 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, + 0xf10e, 0xf10f, 0xf110, 0xf10c, 0xf111, 0xf112, 0xf200, 0xf10a, + 0xf200, 0xf10c, 0xf200, 0xf203, 0xf200, 0xf113, 0xf200, 0xf10b, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf20b, 0xf116, 0xf10d, 0xf117, + 0xf10b, 0xf20a, 0xf10a, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, +}; +static u_short macaltgr_map[NR_KEYS] = { + 0xf914, 0xfb73, 0xf917, 0xf919, 0xfb68, 0xfb67, 0xfb7a, 0xfb78, + 0xf916, 0xfb76, 0xf200, 0xf915, 0xfb71, 0xfb77, 0xf918, 0xfb72, + 0xfb79, 0xfb74, 0xf200, 0xf040, 0xf200, 0xf024, 0xf200, 0xf200, + 0xf200, 0xf05d, 0xf07b, 0xf05c, 0xf05b, 0xf07d, 0xf07e, 0xfb6f, + 0xfb75, 0xf200, 0xfb69, 0xfb70, 0xf201, 0xfb6c, 0xfb6a, 0xf200, + 0xfb6b, 0xf200, 0xf200, 0xf200, 0xf200, 0xfb6e, 0xfb6d, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf90a, 0xf90b, 0xf90c, 0xf90d, 0xf90e, 0xf90f, + 0xf910, 0xf911, 0xf200, 0xf912, 0xf913, 0xf200, 0xf200, 0xf200, + 0xf510, 0xf511, 0xf512, 0xf50e, 0xf513, 0xf514, 0xf200, 0xf516, + 0xf200, 0xf10c, 0xf200, 0xf202, 0xf200, 0xf515, 0xf200, 0xf517, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf50f, 0xf117, + 0xf50d, 0xf119, 0xf50c, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, +}; + +static u_short macctrl_map[NR_KEYS] = { + 0xf001, 0xf013, 0xf004, 0xf006, 0xf008, 0xf007, 0xf01a, 0xf018, + 0xf003, 0xf016, 0xf200, 0xf002, 0xf011, 0xf017, 0xf005, 0xf012, + 0xf019, 0xf014, 0xf200, 0xf000, 0xf01b, 0xf01c, 0xf01e, 0xf01d, + 0xf200, 0xf200, 0xf01f, 0xf01f, 0xf07f, 0xf200, 0xf01d, 0xf00f, + 0xf015, 0xf01b, 0xf009, 0xf010, 0xf201, 0xf00c, 0xf00a, 0xf007, + 0xf00b, 0xf200, 0xf01c, 0xf200, 0xf07f, 0xf00e, 0xf00d, 0xf20e, + 0xf200, 0xf000, 0xf000, 0xf008, 0xf200, 0xf200, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, + 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, + 0xf104, 0xf105, 0xf106, 0xf102, 0xf107, 0xf108, 0xf200, 0xf10a, + 0xf200, 0xf10c, 0xf200, 0xf204, 0xf200, 0xf109, 0xf200, 0xf10b, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf103, 0xf117, + 0xf101, 0xf119, 0xf100, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, +}; +static u_short macshift_ctrl_map[NR_KEYS] = { + 0xf001, 0xf013, 0xf004, 0xf006, 0xf008, 0xf007, 0xf01a, 0xf018, + 0xf003, 0xf016, 0xf200, 0xf002, 0xf011, 0xf017, 0xf005, 0xf012, + 0xf019, 0xf014, 0xf200, 0xf000, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf01f, 0xf200, 0xf200, 0xf200, 0xf00f, + 0xf015, 0xf200, 0xf009, 0xf010, 0xf201, 0xf00c, 0xf00a, 0xf200, + 0xf00b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf00e, 0xf00d, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, + 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf10c, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf200, 0xf117, + 0xf200, 0xf119, 0xf200, 0xf700, 0xf701, 0xf702, 0xf200, 0xf20c, +}; + +static u_short macalt_map[NR_KEYS] = { + 0xf861, 0xf873, 0xf864, 0xf866, 0xf868, 0xf867, 0xf87a, 0xf878, + 0xf863, 0xf876, 0xf200, 0xf862, 0xf871, 0xf877, 0xf865, 0xf872, + 0xf879, 0xf874, 0xf831, 0xf832, 0xf833, 0xf834, 0xf836, 0xf835, + 0xf83d, 0xf839, 0xf837, 0xf82d, 0xf838, 0xf830, 0xf85d, 0xf86f, + 0xf875, 0xf85b, 0xf869, 0xf870, 0xf80d, 0xf86c, 0xf86a, 0xf827, + 0xf86b, 0xf83b, 0xf85c, 0xf82c, 0xf82f, 0xf86e, 0xf86d, 0xf82e, + 0xf809, 0xf820, 0xf860, 0xf87f, 0xf200, 0xf81b, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf210, 0xf211, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf900, 0xf901, 0xf902, 0xf903, 0xf904, 0xf905, + 0xf906, 0xf907, 0xf200, 0xf908, 0xf909, 0xf200, 0xf200, 0xf200, + 0xf504, 0xf505, 0xf506, 0xf502, 0xf507, 0xf508, 0xf200, 0xf50a, + 0xf200, 0xf10c, 0xf200, 0xf209, 0xf200, 0xf509, 0xf200, 0xf50b, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf503, 0xf117, + 0xf501, 0xf119, 0xf500, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, +}; + +static u_short macctrl_alt_map[NR_KEYS] = { + 0xf801, 0xf813, 0xf804, 0xf806, 0xf808, 0xf807, 0xf81a, 0xf818, + 0xf803, 0xf816, 0xf200, 0xf802, 0xf811, 0xf817, 0xf805, 0xf812, + 0xf819, 0xf814, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf80f, + 0xf815, 0xf200, 0xf809, 0xf810, 0xf201, 0xf80c, 0xf80a, 0xf200, + 0xf80b, 0xf200, 0xf200, 0xf200, 0xf200, 0xf80e, 0xf80d, 0xf200, + 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf200, 0xf702, 0xf703, + 0xf700, 0xf207, 0xf701, 0xf601, 0xf602, 0xf600, 0xf603, 0xf200, + 0xf200, 0xf310, 0xf200, 0xf30c, 0xf200, 0xf30a, 0xf200, 0xf208, + 0xf200, 0xf200, 0xf200, 0xf30d, 0xf30e, 0xf200, 0xf30b, 0xf200, + 0xf200, 0xf200, 0xf300, 0xf301, 0xf302, 0xf303, 0xf304, 0xf305, + 0xf306, 0xf307, 0xf200, 0xf308, 0xf309, 0xf200, 0xf200, 0xf200, + 0xf504, 0xf505, 0xf506, 0xf502, 0xf507, 0xf508, 0xf200, 0xf50a, + 0xf200, 0xf10c, 0xf200, 0xf200, 0xf200, 0xf509, 0xf200, 0xf50b, + 0xf200, 0xf11d, 0xf115, 0xf114, 0xf118, 0xf116, 0xf503, 0xf117, + 0xf501, 0xf119, 0xf500, 0xf700, 0xf701, 0xf702, 0xf200, 0xf200, +}; + +static unsigned short *mac_key_maps_save[MAX_NR_KEYMAPS] = { + macplain_map, macshift_map, macaltgr_map, 0, + macctrl_map, macshift_ctrl_map, 0, 0, + macalt_map, 0, 0, 0, + macctrl_alt_map, 0 +}; + +static unsigned short *pc_key_maps_save[MAX_NR_KEYMAPS]; + +int mac_hid_kbd_translate(unsigned char keycode, unsigned char *keycodep, + char raw_mode); +static int mac_hid_sysctl_keycodes(ctl_table *ctl, int write, struct file * filp, + void *buffer, size_t *lenp); +char mac_hid_kbd_unexpected_up(unsigned char keycode); + +static int keyboard_lock_keycodes = 0; +int keyboard_sends_linux_keycodes = 0; +#else +int keyboard_sends_linux_keycodes = 1; +#endif + + +static unsigned char e0_keys[128] = { + 0, 0, 0, KEY_KPCOMMA, 0, KEY_INTL3, 0, 0, /* 0x00-0x07 */ + 0, 0, 0, 0, KEY_LANG1, KEY_LANG2, 0, 0, /* 0x08-0x0f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x10-0x17 */ + 0, 0, 0, 0, KEY_KPENTER, KEY_RIGHTCTRL, KEY_VOLUMEUP, 0,/* 0x18-0x1f */ + 0, 0, 0, 0, 0, KEY_VOLUMEDOWN, KEY_MUTE, 0, /* 0x20-0x27 */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x28-0x2f */ + 0, 0, 0, 0, 0, KEY_KPSLASH, 0, KEY_SYSRQ, /* 0x30-0x37 */ + KEY_RIGHTALT, KEY_BRIGHTNESSUP, KEY_BRIGHTNESSDOWN, + KEY_EJECTCD, 0, 0, 0, 0, /* 0x38-0x3f */ + 0, 0, 0, 0, 0, 0, 0, KEY_HOME, /* 0x40-0x47 */ + KEY_UP, KEY_PAGEUP, 0, KEY_LEFT, 0, KEY_RIGHT, 0, KEY_END, /* 0x48-0x4f */ + KEY_DOWN, KEY_PAGEDOWN, KEY_INSERT, KEY_DELETE, 0, 0, 0, 0, /* 0x50-0x57 */ + 0, 0, 0, KEY_LEFTMETA, KEY_RIGHTMETA, KEY_COMPOSE, KEY_POWER, 0, /* 0x58-0x5f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x60-0x67 */ + 0, 0, 0, 0, 0, 0, 0, KEY_MACRO, /* 0x68-0x6f */ + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x70-0x77 */ + 0, 0, 0, 0, 0, 0, 0, 0 /* 0x78-0x7f */ +}; + +#ifdef CONFIG_MAC_EMUMOUSEBTN static struct input_dev emumousebtn; static void emumousebtn_input_register(void); static int mouse_emulate_buttons = 0; static int mouse_button2_keycode = KEY_RIGHTCTRL; /* right control key */ static int mouse_button3_keycode = KEY_RIGHTALT; /* right option key */ static int mouse_last_keycode = 0; +#endif -#if defined(CONFIG_SYSCTL) +extern void pckbd_init_hw(void); + +#if defined CONFIG_SYSCTL && (defined(CONFIG_MAC_ADBKEYCODES) || defined(CONFIG_MAC_EMUMOUSEBTN)) /* file(s) in /proc/sys/dev/mac_hid */ ctl_table mac_hid_files[] = { +#ifdef CONFIG_MAC_ADBKEYCODES + { + DEV_MAC_HID_KEYBOARD_SENDS_LINUX_KEYCODES, + "keyboard_sends_linux_keycodes", &keyboard_sends_linux_keycodes, sizeof(int), + 0644, NULL, &mac_hid_sysctl_keycodes + }, + { + DEV_MAC_HID_KEYBOARD_LOCK_KEYCODES, + "keyboard_lock_keycodes", &keyboard_lock_keycodes, sizeof(int), + 0644, NULL, &proc_dointvec + }, +#endif +#ifdef CONFIG_MAC_EMUMOUSEBTN { DEV_MAC_HID_MOUSE_BUTTON_EMULATION, "mouse_button_emulation", &mouse_emulate_buttons, sizeof(int), @@ -41,6 +259,7 @@ "mouse_button3_keycode", &mouse_button3_keycode, sizeof(int), 0644, NULL, &proc_dointvec }, +#endif { 0 } }; @@ -60,13 +279,154 @@ static struct ctl_table_header *mac_hid_sysctl_header; +#ifdef CONFIG_MAC_ADBKEYCODES +static +int mac_hid_sysctl_keycodes(ctl_table *ctl, int write, struct file * filp, + void *buffer, size_t *lenp) +{ + int val = keyboard_sends_linux_keycodes; + int ret = 0; + + if (!write + || (write && !keyboard_lock_keycodes)) + ret = proc_dointvec(ctl, write, filp, buffer, lenp); + + if (write + && keyboard_sends_linux_keycodes != val) { + if (!keyboard_sends_linux_keycodes) { +#ifdef CONFIG_MAGIC_SYSRQ + ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate; + SYSRQ_KEY = 0x69; +#endif + memcpy(pc_key_maps_save, key_maps, sizeof(key_maps)); + memcpy(key_maps, mac_key_maps_save, sizeof(key_maps)); + } else { +#ifdef CONFIG_MAGIC_SYSRQ + ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate; + SYSRQ_KEY = 0x54; +#endif + memcpy(mac_key_maps_save, key_maps, sizeof(key_maps)); + memcpy(key_maps, pc_key_maps_save, sizeof(key_maps)); + } + } + + return ret; +} +#endif #endif /* endif CONFIG_SYSCTL */ +int mac_hid_kbd_translate(unsigned char scancode, unsigned char *keycode, + char raw_mode) +{ +#ifdef CONFIG_MAC_ADBKEYCODES + if (!keyboard_sends_linux_keycodes) { + if (!raw_mode) { + /* + * Convert R-shift/control/option to L version. + */ + switch (scancode) { + case 0x7b: scancode = 0x38; break; /* R-shift */ + case 0x7c: scancode = 0x3a; break; /* R-option */ + case 0x7d: scancode = 0x36; break; /* R-control */ + } + } + *keycode = scancode; + return 1; + } else +#endif + { + /* This code was copied from char/pc_keyb.c and will be + * superflous when the input layer is fully integrated. + * We don't need the high_keys handling, so this part + * has been removed. + */ + static int prev_scancode = 0; + + /* special prefix scancodes.. */ + if (scancode == 0xe0 || scancode == 0xe1) { + prev_scancode = scancode; + return 0; + } + + scancode &= 0x7f; + + if (prev_scancode) { + if (prev_scancode != 0xe0) { + if (prev_scancode == 0xe1 && scancode == 0x1d) { + prev_scancode = 0x100; + return 0; + } else if (prev_scancode == 0x100 && scancode == 0x45) { + *keycode = KEY_PAUSE; + prev_scancode = 0; + } else { + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown e1 escape sequence\n"); + prev_scancode = 0; + return 0; + } + } else { + prev_scancode = 0; + if (scancode == 0x2a || scancode == 0x36) + return 0; + } + if (e0_keys[scancode]) + *keycode = e0_keys[scancode]; + else { + if (!raw_mode) + printk(KERN_INFO "keyboard: unknown scancode e0 %02x\n", + scancode); + return 0; + } + } else { + switch (scancode) { + case 91: scancode = KEY_LINEFEED; break; + case 92: scancode = KEY_KPEQUAL; break; + case 125: scancode = KEY_INTL1; break; + } + *keycode = scancode; + } + return 1; + } +} + +char mac_hid_kbd_unexpected_up(unsigned char keycode) +{ + if (keyboard_sends_linux_keycodes && keycode == KEY_F13) + return 0; + else + return 0x80; +} + +#ifdef CONFIG_MAC_ADBKEYCODES +int mac_hid_keyboard_sends_linux_keycodes(void) +{ + return keyboard_sends_linux_keycodes; +} + +EXPORT_SYMBOL(mac_hid_keyboard_sends_linux_keycodes); + +static int __init mac_hid_setup(char *str) +{ + int ints[2]; + + str = get_options(str, ARRAY_SIZE(ints), ints); + if (ints[0] == 1) { + keyboard_sends_linux_keycodes = ints[1] != 0; + keyboard_lock_keycodes = 1; + } + return 1; +} + +__setup("keyboard_sends_linux_keycodes=", mac_hid_setup); + +#endif + +#ifdef CONFIG_MAC_EMUMOUSEBTN int mac_hid_mouse_emulate_buttons(int caller, unsigned int keycode, int down) { switch (caller) { case 1: - /* Called from keyboard.c */ + /* Called from keybdev.c */ if (mouse_emulate_buttons && (keycode == mouse_button2_keycode || keycode == mouse_button3_keycode)) { @@ -79,14 +439,24 @@ mouse_last_keycode = down ? keycode : 0; } break; + case 2: + /* Called from mousedev.c */ + if (mouse_emulate_buttons == 2 && keycode == 0) { + if (mouse_last_keycode == mouse_button2_keycode) + return 1; /* map to middle button */ + if (mouse_last_keycode == mouse_button3_keycode) + return 2; /* map to right button */ + } + return keycode; /* keep button */ } return 0; } +EXPORT_SYMBOL(mac_hid_mouse_emulate_buttons); + static void emumousebtn_input_register(void) { emumousebtn.name = "Macintosh mouse button emulation"; - emumousebtn.phys = "machid/input0"; /* FIXME */ emumousebtn.evbit[0] = BIT(EV_KEY) | BIT(EV_REL); emumousebtn.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT); @@ -98,22 +468,41 @@ emumousebtn.idversion = 0x0100; input_register_device(&emumousebtn); + + printk(KERN_INFO "input%d: Macintosh mouse button emulation\n", emumousebtn.number); } +#endif -static int __init mac_hid_init(void) +void __init mac_hid_init_hw(void) { + +#ifdef CONFIG_MAC_ADBKEYCODES + memcpy(pc_key_maps_save, key_maps, sizeof(key_maps)); + + if (!keyboard_sends_linux_keycodes) { +#ifdef CONFIG_MAGIC_SYSRQ + ppc_md.ppc_kbd_sysrq_xlate = mac_hid_kbd_sysrq_xlate; + SYSRQ_KEY = 0x69; +#endif + memcpy(key_maps, mac_key_maps_save, sizeof(key_maps)); + } else { +#ifdef CONFIG_MAGIC_SYSRQ + ppc_md.ppc_kbd_sysrq_xlate = pckbd_sysrq_xlate; + SYSRQ_KEY = 0x54; +#endif + } +#endif /* CONFIG_MAC_ADBKEYCODES */ + +#ifdef CONFIG_MAC_EMUMOUSEBTN emumousebtn_input_register(); +#endif -#if defined(CONFIG_SYSCTL) +#if CONFIG_PPC + if (_machine != _MACH_Pmac) + pckbd_init_hw(); +#endif + +#if defined(CONFIG_SYSCTL) && (defined(CONFIG_MAC_ADBKEYCODES) || defined(CONFIG_MAC_EMUMOUSEBTN)) mac_hid_sysctl_header = register_sysctl_table(mac_hid_root_dir, 1); #endif /* CONFIG_SYSCTL */ - - return(0); } - -static void __exit mac_hid_exit(void) -{ -} - -module_init(mac_hid_init); -module_exit(mac_hid_exit); |
From: James S. <jsi...@us...> - 2002-05-21 04:06:09
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/include/linux Modified Files: input.h Log Message: Synced to 2.5.16 Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/input.h,v retrieving revision 1.66 retrieving revision 1.67 diff -u -d -r1.66 -r1.67 --- input.h 3 May 2002 18:47:12 -0000 1.66 +++ input.h 21 May 2002 04:06:06 -0000 1.67 @@ -329,6 +329,9 @@ #define KEY_UNKNOWN 240 +#define KEY_BRIGHTNESSDOWN 224 +#define KEY_BRIGHTNESSUP 225 + #define BTN_MISC 0x100 #define BTN_0 0x100 #define BTN_1 0x101 |
From: James S. <jsi...@us...> - 2002-05-21 04:06:09
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/drivers/video Modified Files: g364fb.c Log Message: Synced to 2.5.16 Index: g364fb.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/g364fb.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- g364fb.c 27 Aug 2001 16:36:15 -0000 1.6 +++ g364fb.c 21 May 2002 04:06:06 -0000 1.7 @@ -2,7 +2,7 @@ * * linux/drivers/video/g364fb.c -- Mips Magnum frame buffer device * - * (C) 1998 Thomas Bogendoerfer <tsb...@al...> + * (C) 1998 Thomas Bogendoerfer * * This driver is based on tgafb.c * @@ -72,20 +72,33 @@ #define MON_ID_REG 0xe4100000 /* unused */ #define RESET_REG 0xe4180000 /* Write only */ -#define arraysize(x) (sizeof(x)/sizeof(*(x))) - static struct fb_info fb_info; -static struct fb_fix_screeninfo fb_fix __initdata = { - "G364 8plane", 0x40000000 /* physical address */, 0, FB_TYPE_PACKED_PIXELS, - 0, FB_VISUAL_PSEUDOCOLOR, 0, 1, 0, 0, (unsigned long)NULL, 0, FB_ACCEL_NONE +static struct fb_fix_screeninfo fb_fix __initdata = { + id: "G364 8plane", + smem_start: 0x40000000, /* physical address */ + type: FB_TYPE_PACKED_PIXELS, + visual: FB_VISUAL_PSEUDOCOLOR, + ypanstep: 1, + accel: FB_ACCEL_NONE, }; -static struct fb_var_screeninfo fb_var __initdata = { - 0, 0, 0, 0, 0, 0, 8, 0, - {0, 8, 0}, {0, 8, 0}, {0, 8, 0}, {0, 0, 0}, - 0, FB_ACTIVATE_NOW, -1, -1, 0, 39722, 40, 24, 32, 11, 96, 2, - 0, FB_VMODE_NONINTERLACED +static struct fb_var_screeninfo fb_var __initdata = { + bits_per_pixel: 8, + red: {0, 8, 0}, + green: {0, 8, 0}, + blue: {0, 8, 0}, + activate: FB_ACTIVATE_NOW, + height: -1, + width: -1, + pixclock: 39722, + left_margin: 40, + right_margin: 24, + upper_margin: 32, + lower_margin: 11, + hsync_len: 96, + vsync_len: 2, + vmode: FB_VMODE_NONINTERLACED, }; /* @@ -93,50 +106,45 @@ */ int g364fb_init(void); -static int g364fb_check_var(struct fb_var_screeninfo *var, - struct fb_info *info); -static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, - u_int transp, struct fb_info *info); -static int g364fb_blank(int blank, struct fb_info *info); static int g364fb_pan_display(struct fb_var_screeninfo *var, int con, struct fb_info *info); +static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, + u_int transp, struct fb_info *info); +static int g364fb_blank(int blank, struct fb_info *info); static struct fb_ops g364fb_ops = { - owner: THIS_MODULE, - fb_check_var: g364fb_check_var, - //fb_cursor: g364fb_cursor, - fb_setcolreg: g364fb_setcolreg, - fb_blank: g364fb_blank, - fb_pan_display: g364fb_pan_display, - fb_fillrect: cfb_fillrect, - fb_copyarea: cfb_copyarea, - fb_imageblit: cfb_imageblit, + owner: THIS_MODULE, + //fb_cursor: g364fb_cursor, + fb_setcolreg: g364fb_setcolreg, + fb_pan_display: g364fb_pan_display, + fb_blank: g364fb_blank, + fb_fillrect: cfb_fillrect, + fb_copyarea: cfb_copyarea, + fb_imageblit: cfb_imageblit, }; -void g364fb_cursor(struct fb_info *info, struct fbcursor *cursor) +void g364fb_cursor(struct fb_info *info, struct fb_cursor *cursor) { - if (info->cursor.enable) { - *(unsigned int *) CTLA_REG &= ~CURS_TOGGLE; - *(unsigned int *) CURS_POS_REG = (cursor->size.x << 12) | ((y * cursor->size.y) - info->var.yoffset); - } else { - *(unsigned int *) CTLA_REG |= CURS_TOGGLE; - } + if (info->cursor.enable) { + *(unsigned int *) CTLA_REG &= ~CURS_TOGGLE; + *(unsigned int *) CURS_POS_REG = ((x * fontwidth(p)) << 12) | ((y * fontheight(p))-p->var.yoffset); + } else + *(unsigned int *) CTLA_REG |= CURS_TOGGLE; } /* - * Set the User Defined Part of the Display + * Pan or Wrap the Display + * + * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag */ -static int g364fb_set_var(struct fb_var_screeninfo *var, int con, - struct fb_info *info) +static int g364fb_pan_display(struct fb_var_screeninfo *var, int con, + struct fb_info *info) { - if (var->xres > info->var.xres || var->yres > info->var.yres || - var->xres_virtual > info->var.xres_virtual || - var->yres_virtual > info->var.yres_virtual || - var->bits_per_pixel > info->var.bits_per_pixel || - var->nonstd || - (var->vmode & FB_VMODE_MASK) != FB_VMODE_NONINTERLACED) - return -EINVAL; - return 0; + if (var->xoffset || var->yoffset+var->yres > var->yres_virtual) + return -EINVAL; + + *(unsigned int *)TOP_REG = var->yoffset * var->xres; + return 0; } /* @@ -144,11 +152,11 @@ */ static int g364fb_blank(int blank, struct fb_info *info) { - if (blank) - *(unsigned int *) CTLA_REG |= FORCE_BLANK; - else - *(unsigned int *) CTLA_REG &= ~FORCE_BLANK; - return 0; + if (blank) + *(unsigned int *) CTLA_REG |= FORCE_BLANK; + else + *(unsigned int *) CTLA_REG &= ~FORCE_BLANK; + return 0; } /* @@ -157,32 +165,17 @@ static int g364fb_setcolreg(u_int regno, u_int red, u_int green, u_int blue, u_int transp, struct fb_info *info) { - volatile unsigned int *ptr = (volatile unsigned int *) CLR_PAL_REG; - - if (regno > 255) - return 1; + volatile unsigned int *ptr = (volatile unsigned int *) CLR_PAL_REG; - red >>= 8; - green >>= 8; - blue >>=8; - - ptr[regno << 1] = (red << 16) | (green << 8) | blue; - return 0; -} + if (regno > 255) + return 1; -/* - * Pan or Wrap the Display - * - * This call looks only at xoffset, yoffset and the FB_VMODE_YWRAP flag - */ -static int g364fb_pan_display(struct fb_var_screeninfo *var, int con, - struct fb_info *info) -{ - if (var->xoffset || var->yoffset+var->yres > var->yres_virtual) - return -EINVAL; + red >>= 8; + green >>= 8; + blue >>=8; - *(unsigned int *)TOP_REG = var->yoffset * var->xres; - return 0; + ptr[regno << 1] = (red << 16) | (green << 8) | blue; + return 0; } /* @@ -190,59 +183,65 @@ */ int __init g364fb_init(void) { - volatile unsigned int *curs_pal_ptr = (volatile unsigned int *)CURS_PAL_REG; - unsigned int xres, yres; - int mem, i; + volatile unsigned int *curs_pal_ptr = (volatile unsigned int *) CURS_PAL_REG; + volatile unsigned int *pal_ptr = (volatile unsigned int *) CLR_PAL_REG; + int mem, i, j; - /* TBD: G364 detection */ + /* TBD: G364 detection */ - /* get the resolution set by ARC console */ - *(volatile unsigned int *)CTLA_REG &= ~ENABLE_VTG; - xres = (*((volatile unsigned int*)DISPLAY_REG) & 0x00ffffff) * 4; - yres = (*((volatile unsigned int*)VDISPLAY_REG) & 0x00ffffff) / 2; - *(volatile unsigned int *)CTLA_REG |= ENABLE_VTG; - - /* setup cursor */ - curs_pal_ptr[0] |= 0x00ffffff; - curs_pal_ptr[2] |= 0x00ffffff; - curs_pal_ptr[4] |= 0x00ffffff; + /* get the resolution set by ARC console */ + *(volatile unsigned int *)CTLA_REG &= ~ENABLE_VTG; + fb_var.xres = (*((volatile unsigned int*)DISPLAY_REG) & 0x00ffffff) * 4; + fb_var.yres = (*((volatile unsigned int*)VDISPLAY_REG) & 0x00ffffff)/2; + *(volatile unsigned int *)CTLA_REG |= ENABLE_VTG; - /* - * first set the whole cursor to transparent - */ - for (i = 0; i < 512; i++) - *(unsigned short *)(CURS_PAT_REG+i*8) = 0; + /* setup cursor */ + curs_pal_ptr[0] |= 0x00ffffff; + curs_pal_ptr[2] |= 0x00ffffff; + curs_pal_ptr[4] |= 0x00ffffff; - /* - * switch the last two lines to cursor palette 3 - * we assume here, that FONTSIZE_X is 8 - */ - *(unsigned short *)(CURS_PAT_REG + 14*64) = 0xffff; - *(unsigned short *)(CURS_PAT_REG + 15*64) = 0xffff; - - fb_var.xres = fb_var.xres_virtual = xres; - fb_var.yres = yres; + /* + * first set the whole cursor to transparent + */ + for (i = 0; i < 512; i++) + *(unsigned short *)(CURS_PAT_REG+i*8) = 0; - /* get size of video memory; this is special for the JAZZ hardware */ - mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3; - fb_fix.smem_len = (1 << (mem*2)) * 512 * 1024; - fb_fix.line_length = (xres / 8) * fb_var.bits_per_pixel; - - fb_var.yres_virtual = fb_fix.smem_len / xres; + /* + * switch the last two lines to cursor palette 3 + * we assume here, that FONTSIZE_X is 8 + */ + *(unsigned short *)(CURS_PAT_REG + 14*64) = 0xffff; + *(unsigned short *)(CURS_PAT_REG + 15*64) = 0xffff; + fb_var.xres_virtual = fbvar.xres; + fb_fix.line_length = (fb_var.xres / 8) * fb_var.bits_per_pixel; + /* get size of video memory; this is special for the JAZZ hardware */ + mem = (r4030_read_reg32(JAZZ_R4030_CONFIG) >> 8) & 3; + fb_fix.smem_len = (1 << (mem*2)) * 512 * 1024; + fb_var.yres_virtual = fb_fix.smem_len / fb_var.xres; - fb_info.screen_base = (char *)G364_MEM_BASE; /* virtual kernel address */ + strcpy(fb_info.modename, fb_fix.id); + fb_info.node = NODEV; + fb_info.screen_base = (char *)G364_MEM_BASE;/* virtual kernel address */ + fb_info.fbops = &g364fb_ops; + fb_info.currcon = -1; + fb_info.var = fb_var; + fb_info.fix = fb_fix; + fb_info.disp = &disp; + fb_info.fontname[0] = '\0'; + fb_info.changevar = NULL; + fb_info.switch_con = gen_switch; + fb_info.updatevar = gen_update_var; + fb_info.flags = FBINFO_FLAG_DEFAULT; - strcpy(fb_info.modename, fb_fix.id); - fb_info.node = -1; - fb_info.fbops = &g364fb_ops; - fb_info.var = fb_var; - fb_info.fix = fb_fix; - fb_info.flags = FBINFO_FLAG_DEFAULT; + fb_alloc_cmap(&fb_info.cmap, 255, 0); + gen_set_disp(-1, &fb_info); - if (register_framebuffer(&fb_info) < 0) - return -EINVAL; + if (register_framebuffer(&fb_info) < 0) + return -EINVAL; - printk("fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.node), - fb_fix.id); - return 0; + printk("fb%d: %s frame buffer device\n", GET_FB_IDX(fb_info.node), + fb_info.fix.id); + return 0; } + +MODULE_LICENSE("GPL"); |
From: James S. <jsi...@us...> - 2002-05-21 04:06:08
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/drivers/char Modified Files: misc.c Log Message: Synced to 2.5.16 Index: misc.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/misc.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- misc.c 20 Jan 2002 03:54:46 -0000 1.17 +++ misc.c 21 May 2002 04:06:05 -0000 1.18 @@ -166,7 +166,7 @@ int misc_register(struct miscdevice * misc) { - static devfs_handle_t devfs_handle; + static devfs_handle_t devfs_handle, dir; struct miscdevice *c; if (misc->next || misc->prev) @@ -197,11 +197,12 @@ misc_minors[misc->minor >> 3] |= 1 << (misc->minor & 7); if (!devfs_handle) devfs_handle = devfs_mk_dir (NULL, "misc", NULL); + dir = strchr (misc->name, '/') ? NULL : devfs_handle; misc->devfs_handle = - devfs_register (devfs_handle, misc->name, DEVFS_FL_NONE, - MISC_MAJOR, misc->minor, - S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, - misc->fops, NULL); + devfs_register (dir, misc->name, DEVFS_FL_NONE, + MISC_MAJOR, misc->minor, + S_IFCHR | S_IRUSR | S_IWUSR | S_IRGRP, + misc->fops, NULL); /* * Add it to the front, so that later devices can "override" |
From: James S. <jsi...@us...> - 2002-05-21 04:06:08
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/mips/lib In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/arch/mips/lib Modified Files: Makefile Log Message: Synced to 2.5.16 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/mips/lib/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 8 Jul 2001 00:41:51 -0000 1.6 +++ Makefile 21 May 2002 04:06:05 -0000 1.7 @@ -2,12 +2,11 @@ # Makefile for MIPS-specific library files.. # -.S.s: - $(CPP) $(CFLAGS) $< -o $*.s -.S.o: - $(CC) $(CFLAGS) -c $< -o $*.o +USE_STANDARD_AS_RULE := true; L_TARGET = lib.a + +EXTRA_AFLAGS := $(CFLAGS) obj-y += csum_partial.o csum_partial_copy.o \ rtc-std.o rtc-no.o memcpy.o memset.o \ |
From: James S. <jsi...@us...> - 2002-05-21 04:06:08
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/arch/arm/kernel Modified Files: armksyms.c setup.c Log Message: Synced to 2.5.16 Index: armksyms.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel/armksyms.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- armksyms.c 24 Apr 2002 18:56:49 -0000 1.4 +++ armksyms.c 21 May 2002 04:06:05 -0000 1.5 @@ -177,7 +177,6 @@ EXPORT_SYMBOL_NOVERS(strlen); EXPORT_SYMBOL_NOVERS(strnlen); EXPORT_SYMBOL_NOVERS(strpbrk); -EXPORT_SYMBOL_NOVERS(strsep); EXPORT_SYMBOL_NOVERS(strrchr); EXPORT_SYMBOL_NOVERS(strstr); EXPORT_SYMBOL_NOVERS(memset); Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel/setup.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- setup.c 24 Apr 2002 18:56:50 -0000 1.10 +++ setup.c 21 May 2002 04:06:05 -0000 1.11 @@ -34,10 +34,6 @@ #define MEM_SIZE (16*1024*1024) #endif -#ifndef CONFIG_CMDLINE -#define CONFIG_CMDLINE "" -#endif - #ifdef CONFIG_PREEMPT spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; #endif @@ -56,7 +52,8 @@ extern unsigned int mem_fclk_21285; extern void paging_init(struct meminfo *, struct machine_desc *desc); -extern void convert_to_tag_list(struct param_struct *params, int mem_init); +extern void convert_to_tag_list(struct tag *tags); +extern void squash_mem_tags(struct tag *tag); extern void bootmem_init(struct meminfo *); extern void reboot_setup(char *str); extern int root_mountflags; @@ -515,6 +512,20 @@ __tagtable(ATAG_INITRD, parse_tag_initrd); +static int __init parse_tag_initrd2(const struct tag *tag) +{ + unsigned long start = 0; + + if (tag->u.initrd.size) { + start = (unsigned long)phys_to_virt(tag->u.initrd.start); + + setup_initrd(start, tag->u.initrd.size); + } + return 0; +} + +__tagtable(ATAG_INITRD2, parse_tag_initrd2); + static int __init parse_tag_serialnr(const struct tag *tag) { system_serial_low = tag->u.serialnr.low; @@ -573,14 +584,29 @@ t->hdr.tag); } +/* + * This holds our defaults. + */ +static struct init_tags { + struct tag_header hdr1; + struct tag_core core; + struct tag_header hdr2; + struct tag_mem32 mem; + struct tag_header hdr3; +} init_tags __initdata = { + { tag_size(tag_core), ATAG_CORE }, + { 1, PAGE_SIZE, 0xff }, + { tag_size(tag_mem32), ATAG_MEM }, + { MEM_SIZE, PHYS_OFFSET }, + { 0, ATAG_NONE } +}; + void __init setup_arch(char **cmdline_p) { - struct tag *tags = NULL; + struct tag *tags = (struct tag *)&init_tags; struct machine_desc *mdesc; char *from = default_command_line; - ROOT_DEV = mk_kdev(0, 255); - setup_processor(); mdesc = setup_machine(machine_arch_type); machine_name = mdesc->name; @@ -592,28 +618,21 @@ tags = phys_to_virt(mdesc->param_offset); /* - * Do the machine-specific fixups before we parse the - * parameters or tags. - */ - if (mdesc->fixup) - mdesc->fixup(mdesc, (struct param_struct *)tags, - &from, &meminfo); - - /* * If we have the old style parameters, convert them to - * a tag list before. + * a tag list. */ - if (tags && tags->hdr.tag != ATAG_CORE) - convert_to_tag_list((struct param_struct *)tags, - meminfo.nr_banks == 0); + if (tags->hdr.tag != ATAG_CORE) + convert_to_tag_list(tags); + if (tags->hdr.tag != ATAG_CORE) + tags = (struct tag *)&init_tags; - if (tags && tags->hdr.tag == ATAG_CORE) - parse_tags(tags); + if (mdesc->fixup) + mdesc->fixup(mdesc, tags, &from, &meminfo); - if (meminfo.nr_banks == 0) { - meminfo.nr_banks = 1; - meminfo.bank[0].start = PHYS_OFFSET; - meminfo.bank[0].size = MEM_SIZE; + if (tags->hdr.tag == ATAG_CORE) { + if (meminfo.nr_banks != 0) + squash_mem_tags(tags); + parse_tags(tags); } init_mm.start_code = (unsigned long) &_text; |
From: James S. <jsi...@us...> - 2002-05-21 04:06:08
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/arch/i386/kernel Modified Files: setup.c Log Message: Synced to 2.5.16 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel/setup.c,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- setup.c 1 May 2002 18:07:49 -0000 1.41 +++ setup.c 21 May 2002 04:06:05 -0000 1.42 @@ -2141,11 +2141,6 @@ strcpy(c->x86_model_id, p); #ifdef CONFIG_SMP - /* PGE CPUID bug: Pentium4 supports PGE, but seems to have SMP bugs.. */ - if ( c->x86 == 15 ) - clear_bit(X86_FEATURE_PGE, c->x86_capability); - - if (test_bit(X86_FEATURE_HT, c->x86_capability)) { extern int phys_proc_id[NR_CPUS]; |
From: James S. <jsi...@us...> - 2002-05-21 04:06:08
|
Update of /cvsroot/linuxconsole/ruby/linux In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux Modified Files: Makefile Log Message: Synced to 2.5.16 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.58 retrieving revision 1.59 diff -u -d -r1.58 -r1.59 --- Makefile 16 May 2002 18:01:36 -0000 1.58 +++ Makefile 21 May 2002 04:06:05 -0000 1.59 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 15 +SUBLEVEL = 16 EXTRAVERSION = -ruby KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) |
From: James S. <jsi...@us...> - 2002-05-21 04:06:08
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/arm In directory usw-pr-cvs1:/tmp/cvs-serv29209/linux/arch/arm Modified Files: config.in Log Message: Synced to 2.5.16 Index: config.in =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/arm/config.in,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- config.in 6 May 2002 17:29:59 -0000 1.25 +++ config.in 21 May 2002 04:06:05 -0000 1.26 @@ -464,20 +464,8 @@ dep_bool 'Preemptible Kernel (experimental)' CONFIG_PREEMPT $CONFIG_CPU_32 $CONFIG_EXPERIMENTAL dep_tristate 'Advanced Power Management Emulation' CONFIG_APM $CONFIG_PM dep_tristate 'RISC OS personality' CONFIG_ARTHUR $CONFIG_CPU_32 +string 'Default kernel command string' CONFIG_CMDLINE "" -if [ "$CONFIG_ARCH_EBSA110" = "y" -o \ - "$CONFIG_ARCH_SA1100" = "y" -o \ - "$CONFIG_ARCH_CLPS7500" = "y" -o \ - "$CONFIG_ARCH_PERSONAL_SERVER" = "y" -o \ - "$CONFIG_ARCH_CATS" = "y" -o \ - "$CONFIG_ARCH_P720T" = "y" -o \ - "$CONFIG_ARCH_CDB89712" = "y" -o \ - "$CONFIG_ARCH_CAMELOT" = "y" -o \ - "$CONFIG_ARCH_ANAKIN" = "y" -o \ - "$CONFIG_ARCH_IOP310" = "y" -o \ - "$CONFIG_ARCH_ADIFCC" = "y" ]; then - string 'Default kernel command string' CONFIG_CMDLINE "" -fi if [ "$CONFIG_ARCH_NETWINDER" = "y" -o \ "$CONFIG_ARCH_EBSA110" = "y" -o \ "$CONFIG_ARCH_EBSA285" = "y" -o \ |