This list is closed, nobody may subscribe to it.
2004 |
Jan
(53) |
Feb
(78) |
Mar
(34) |
Apr
(26) |
May
(25) |
Jun
(34) |
Jul
(16) |
Aug
(16) |
Sep
(2) |
Oct
(58) |
Nov
(13) |
Dec
(32) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(62) |
Feb
(4) |
Mar
(40) |
Apr
(9) |
May
(13) |
Jun
(26) |
Jul
(32) |
Aug
(24) |
Sep
(18) |
Oct
(18) |
Nov
(14) |
Dec
|
2006 |
Jan
(15) |
Feb
(2) |
Mar
(23) |
Apr
(2) |
May
(2) |
Jun
(13) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
(1) |
Feb
(45) |
Mar
|
Apr
(13) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(31) |
Dec
(5) |
2008 |
Jan
(6) |
Feb
(34) |
Mar
(113) |
Apr
(40) |
May
(19) |
Jun
(5) |
Jul
(41) |
Aug
(13) |
Sep
(53) |
Oct
(4) |
Nov
(53) |
Dec
|
2009 |
Jan
(1) |
Feb
(29) |
Mar
(66) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(163) |
Nov
|
Dec
(91) |
From: <he...@us...> - 2004-06-23 17:34:35
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20759 Modified Files: gc-dvdcover.c Log Message: Added code to stop DVD motor on init to save DVD life. Otherwise, cosmetic changes. Index: gc-dvdcover.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gc-dvdcover.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gc-dvdcover.c 16 Jun 2004 15:32:36 -0000 1.4 +++ gc-dvdcover.c 23 Jun 2004 17:34:24 -0000 1.5 @@ -1,7 +1,8 @@ /* ------------------------------------------------------------------------- */ -/* gc-dvdcover.c GameCube DVD Cover Close Message Driver */ +/* gc-dvdcover.c GameCube DVD Cover Close Message Driver */ /* ------------------------------------------------------------------------- */ /* Copyright (C) 2004 Stefan Esser + Copyright (C) 2004 Albert Herranz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -17,12 +18,6 @@ along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ /* ------------------------------------------------------------------------- */ -/* - * Albert Herranz - * GAMECUBE - * - Fixed bug that caused kernel to "loop" in gc_dvdcover_handler - * sometimes during kernel init. - */ #include <linux/init.h> #include <linux/kernel.h> @@ -33,51 +28,80 @@ #define DVD_IRQ 2 -#define GAMECUBE_DICVR 0xcc006004 /* DI Cover Register */ -#define GC_DI_DISR 0xcc006000 /* DI Status Register */ -#define GC_DI_DISR_BRKINT (1<<6) -#define GC_DI_DISR_BRKINTMASK (1<<5) -#define GC_DI_DISR_TCINT (1<<4) -#define GC_DI_DISR_TCINTMASK (1<<3) -#define GC_DI_DISR_DEINT (1<<2) -#define GC_DI_DISR_DEINTMASK (1<<1) -#define GC_DI_DISR_BRK (1<<0) +#define DI_DISR 0xcc006000 /* DI Status Register */ +#define DI_DISR_BRKINT (1<<6) +#define DI_DISR_BRKINTMASK (1<<5) +#define DI_DISR_TCINT (1<<4) +#define DI_DISR_TCINTMASK (1<<3) +#define DI_DISR_DEINT (1<<2) +#define DI_DISR_DEINTMASK (1<<1) +#define DI_DISR_BRK (1<<0) +#define DI_DICVR 0xcc006004 /* DI Cover Register */ +#define DI_DICVR_CVRINT (1<<2) +#define DI_DICVR_CVRINTMASK (1<<1) +#define DI_DICVR_CVR (1<<0) -static irqreturn_t gc_dvdcover_handler(int this_irq, void *dev_id, struct pt_regs *regs) { +#define DI_DICMDBUF0 0xcc006008 /* DI Command Buffer 0 */ - unsigned long reason = readl(GAMECUBE_DICVR); +#define DI_DICR 0xcc00601c /* DI Control Register */ +#define DI_DICR_RW (1<<2) +#define DI_DICR_DMA (1<<1) +#define DI_DICR_TSTART (1<<0) + +#define DI_CMD_STOP (0xE3) + +/** + * + */ +static irqreturn_t gc_dvdcover_handler(int this_irq, void *dev_id, + struct pt_regs *regs) +{ + unsigned long reason = readl(DI_DICVR); + + /* handle only DVD cover interrupts here */ + if (reason & DI_DICVR_CVRINT) { + writel(reason | DI_DICVR_CVRINT, DI_DICVR); + printk(KERN_INFO "gc_dvdcover: DVD cover was %s.\n", + (reason & DI_DICVR_CVR) ? "opened" : "closed"); - // really a DVD cover interrupt? - if (reason & 4) { - writel(reason | 4, GAMECUBE_DICVR); - printk(KERN_INFO "gc_dvdcover: DVD cover was closed\n"); return IRQ_HANDLED; } return IRQ_NONE; } +/** + * + */ static int gc_dvdcover_init(void) { unsigned long outval; int err; - + /* clear pending DI interrupts and mask new ones */ /* this prevents an annoying bug while we lack a complete DVD driver */ - outval = GC_DI_DISR_BRKINT | GC_DI_DISR_TCINT | GC_DI_DISR_DEINT; - outval &= ~(GC_DI_DISR_BRKINTMASK | GC_DI_DISR_TCINTMASK | - GC_DI_DISR_DEINTMASK); - writel(outval, GC_DI_DISR); + outval = DI_DISR_BRKINT | DI_DISR_TCINT | DI_DISR_DEINT; + outval &= ~(DI_DISR_BRKINTMASK | DI_DISR_TCINTMASK | DI_DISR_DEINTMASK); + writel(outval, DI_DISR); - err = request_irq(DVD_IRQ, gc_dvdcover_handler, 0, "GameCube DVD Cover", 0); + /* stop DVD motor */ + writel(DI_CMD_STOP << 24, DI_DICMDBUF0); + writel(DI_DICR_TSTART, DI_DICR); + + err = + request_irq(DVD_IRQ, gc_dvdcover_handler, 0, "GameCube DVD Cover", + 0); if (err) return err; - writel(readl(GAMECUBE_DICVR) | 2, GAMECUBE_DICVR); + writel(readl(DI_DICVR) | DI_DICVR_CVRINTMASK, DI_DICVR); return 0; } +/** + * + */ static void gc_dvdcover_exit(void) { free_irq(DVD_IRQ, 0); @@ -89,3 +113,4 @@ module_init(gc_dvdcover_init); module_exit(gc_dvdcover_exit); + |
From: <st...@us...> - 2004-06-23 14:13:33
|
Update of /cvsroot/gc-linux/linux/sound/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9035 Modified Files: gamecube.c Log Message: Commit new and fixed driver Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/sound/ppc/gamecube.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- gamecube.c 24 Apr 2004 18:31:45 -0000 1.4 +++ gamecube.c 23 Jun 2004 14:13:24 -0000 1.5 @@ -1,3 +1,13 @@ + +/* + sound driver for the gamecube audio interface + + 2004/05/16 - groepaz + - fixed most things needed to make it work, little bit of + cleanup. still somewhat dirty but its a start. + +*/ + #include <sound/driver.h> #include <linux/init.h> #include <linux/interrupt.h> @@ -10,25 +20,11 @@ #include <sound/initval.h> #define DSP_IRQ 6 -/* #define GAMECUBE_AUDIO_DEBUG */ - -#if 0 -#include <asm/io.h> - -#define AUDIO_DSP_CONTROL (iobase + 0x0a) -#define AUDIO_IRQ_CAUSE (iobase + 0x10) -#define AUDIO_DMA_STARTH (iobase + 0x30) -#define AUDIO_DMA_STARTL (iobase + 0x32) -#define AUDIO_DMA_LENGTH (iobase + 0x36) -#define AUDIO_DMA_LEFT (iobase + 0x3a) -#define AUDIO_INTERFACE_ADDR 0xCC005000 -#endif +//#define GAMECUBE_AUDIO_DEBUG #define AUDIO_DSP_CONTROL *(volatile u_int16_t *)(0xCC00500a) #define AUDIO_IRQ_CAUSE *(volatile u_int16_t *)(0xCC005010) -/* from CrowTRobo's audio demo */ - #define AUDIO_DMA_STARTH *(volatile u_int16_t *)(0xCC005030) #define AUDIO_DMA_STARTL *(volatile u_int16_t *)(0xCC005032) #define AUDIO_DMA_LENGTH *(volatile u_int16_t *)(0xCC005036) @@ -94,11 +90,13 @@ gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; +#ifdef GAMECUBE_AUDIO_DEBUG printk(KERN_ALERT "pcm open\n"); +#endif chip->playback_substream = substream; runtime->hw = snd_gamecube_playback; - /* align to 32 bytes */ + /* align to 32 bytes */ snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_BUFFER_BYTES, 32); snd_pcm_hw_constraint_step(runtime, 0, SNDRV_PCM_HW_PARAM_PERIOD_BYTES, 32); @@ -109,7 +107,9 @@ { gamecube_t *chip = snd_pcm_substream_chip(substream); +#ifdef GAMECUBE_AUDIO_DEBUG printk(KERN_ALERT "pcm close\n"); +#endif chip->playback_substream = NULL; return 0; } @@ -131,12 +131,14 @@ { gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - + /* printk(KERN_ALERT "snd_gamecube_prepare\n"); */ +#ifdef GAMECUBE_AUDIO_DEBUG printk("prepare: rate=%i, channels=%i, sample_bits=%i\n", runtime->rate, runtime->channels, runtime->sample_bits); printk("prepare: format=%i, access=%i\n", runtime->format, runtime->access); +#endif /* set requested samplerate */ switch (runtime->rate) { @@ -163,7 +165,9 @@ switch (cmd) { case SNDRV_PCM_TRIGGER_START: /* do something to start the PCM engine */ +#ifdef GAMECUBE_AUDIO_DEBUG printk(KERN_ALERT "PCM_TRIGGER_START\n"); +#endif if (substream->stream == SNDRV_PCM_STREAM_PLAYBACK) { chip->dma_size = snd_pcm_lib_buffer_bytes(substream); chip->period_size = snd_pcm_lib_period_bytes(substream); @@ -172,11 +176,13 @@ chip->stop_play = 0; chip->start_play = 1; +#ifdef GAMECUBE_AUDIO_DEBUG printk(KERN_ALERT "stream is PCM_PLAYBACK, dma_area=0x%p dma_size=%i\n", runtime->dma_area, chip->dma_size); printk(KERN_ALERT "%i periods of %i bytes\n", chip->nperiods, chip->period_size); - +#endif + flush_dcache_range(runtime->dma_area, runtime->dma_area + chip->period_size); LoadSample((u_int32_t) runtime->dma_area, chip->period_size); StartSample(); @@ -184,7 +190,9 @@ break; case SNDRV_PCM_TRIGGER_STOP: /* do something to stop the PCM engine */ +#ifdef GAMECUBE_AUDIO_DEBUG printk(KERN_ALERT "PCM_TRIGGER_STOP\n"); +#endif chip->stop_play = 1; /* StopSample(); */ @@ -218,9 +226,12 @@ gamecube_t *chip = (gamecube_t *) dev; unsigned long val = AUDIO_DSP_CONTROL; - if (val & 0x100) { +// fixme: we should only handle dma-finish irq here + +// if (val & 0x100) + { u_int32_t addr; - + #ifdef GAMECUBE_AUDIO_DEBUG printk("DSP interrupt! period #%i\n", chip->cur_period); #endif @@ -230,7 +241,7 @@ StopSample(); } else { StopSample(); - + if (chip->cur_period < (chip->nperiods - 1)) { chip->cur_period++; } else chip->cur_period = 0; @@ -242,12 +253,17 @@ StartSample(); /* chip->start_play = 1; */ - + snd_pcm_period_elapsed(chip->playback_substream); } - AUDIO_DSP_CONTROL = (val | 0x100); /* clear DSP interrupt */ } + // This clears the dsp DMA interrupt flag. + AUDIO_DSP_CONTROL |= (1<<3); // AI +// AUDIO_DSP_CONTROL |= (1<<5); // ARAM +// AUDIO_DSP_CONTROL |= (1<<7); // DSP + + return IRQ_HANDLED; } @@ -272,7 +288,7 @@ snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_gamecube_playback_ops); /* snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_gamecube_capture_ops); */ - + /* preallocate 64k buffer */ snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_CONTINUOUS, snd_dma_continuous_data(GFP_KERNEL), @@ -281,7 +297,7 @@ pcm->info_flags = 0; pcm->private_data = chip; strcpy(pcm->name, chip->card->shortname); - + chip->pcm = pcm; return 0; @@ -307,7 +323,7 @@ memset(gamecube_audio, 0, sizeof(gamecube_t)); gamecube_audio->card = card; gamecube_audio->stop_play = 1; - + strcpy(card->driver, "GAMECUBE"); strcpy(card->shortname, "GameCube audio"); sprintf(card->longname, "GameCube audio"); @@ -315,6 +331,15 @@ if (request_irq(DSP_IRQ, snd_gamecube_interrupt, 0, card->shortname, gamecube_audio)) { snd_printk(KERN_ERR "%s: unable to grab IRQ %d\n", card->shortname, DSP_IRQ); return -EBUSY; + } else { + enable_irq(DSP_IRQ); + + AUDIO_DSP_CONTROL |= (1<<4); // AI enable dma finished irq +// AUDIO_DSP_CONTROL |= (1<<6); // ARAM +// AUDIO_DSP_CONTROL |= (1<<8); // DSP + + AUDIO_DSP_CONTROL |= (1<<1); // enable any DSP irqs (?) + } #if 0 @@ -329,7 +354,7 @@ AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); return -ENOMEM; } - + printk("iobase=0x%lx\n", iobase); #endif @@ -341,12 +366,12 @@ /* PCM */ if ((err = snd_gamecube_new_pcm(gamecube_audio)) < 0) goto fail; - + if ((err = snd_card_register(card)) == 0) { printk( KERN_INFO "GameCube audio support initialized\n" ); return 0; } - + fail: snd_card_free(card); return err; |
From: <st...@us...> - 2004-06-23 14:10:15
|
Update of /cvsroot/gc-linux/linux/drivers/input/keyboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8057 Removed Files: Kconfig Makefile gckbd.c Log Message: Removed obsolete keyboard driver. --- Kconfig DELETED --- --- Makefile DELETED --- --- gckbd.c DELETED --- |
From: <st...@us...> - 2004-06-23 14:01:57
|
Update of /cvsroot/gc-linux/linux/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6141 Added Files: Kconfig Makefile gamecube_keymap.h gamecube_si.c Log Message: First version of the new input driver. Detects standard pads and keyboard. --- NEW FILE: Kconfig --- # # Input device configuration # menu "Input device support" config INPUT tristate "Input devices (needed for keyboard, mouse, ...)" if EMBEDDED default y ---help--- Say Y here if you have any input device (mouse, keyboard, tablet, joystick, steering wheel ...) connected to your system and want it to be available to applications. This includes standard PS/2 keyboard and mouse. Say N here if you have a headless (no monitor, no keyboard) system. More information is available: <file:Documentation/input/input.txt> If unsure, say Y. To compile this driver as a module, choose M here: the module will be called input. comment "Userland interfaces" config INPUT_MOUSEDEV tristate "Mouse interface" if EMBEDDED default y depends on INPUT ---help--- Say Y here if you want your mouse to be accessible as char devices 13:32+ - /dev/input/mouseX and 13:63 - /dev/input/mice as an emulated IntelliMouse Explorer PS/2 mouse. That way, all user space programs (includung SVGAlib, GPM and X) will be able to use your mouse. If unsure, say Y. To compile this driver as a module, choose M here: the module will be called mousedev. config INPUT_MOUSEDEV_PSAUX bool "Provide legacy /dev/psaux device" default y depends on INPUT_MOUSEDEV ---help--- Say Y here if you want your mouse also be accessible as char device 10:1 - /dev/psaux. The data available through /dev/psaux is exactly the same as the data from /dev/input/mice. If unsure, say Y. config INPUT_MOUSEDEV_SCREEN_X int "Horizontal screen resolution" depends on INPUT_MOUSEDEV default "1024" help If you're using a digitizer, or a graphic tablet, and want to use it as a mouse then the mousedev driver needs to know the X window screen resolution you are using to correctly scale the data. If you're not using a digitizer, this value is ignored. config INPUT_MOUSEDEV_SCREEN_Y int "Vertical screen resolution" depends on INPUT_MOUSEDEV default "768" help If you're using a digitizer, or a graphic tablet, and want to use it as a mouse then the mousedev driver needs to know the X window screen resolution you are using to correctly scale the data. If you're not using a digitizer, this value is ignored. config INPUT_JOYDEV tristate "Joystick interface" depends on INPUT ---help--- Say Y here if you want your joystick or gamepad to be accessible as char device 13:0+ - /dev/input/jsX device. If unsure, say Y. More information is available: <file:Documentation/input/joystick.txt> To compile this driver as a module, choose M here: the module will be called joydev. config INPUT_TSDEV tristate "Touchscreen interface" depends on INPUT ---help--- Say Y here if you have an application that only can understand the Compaq touchscreen protocol for absolute pointer data. This is useful namely for embedded configurations. If unsure, say N. To compile this driver as a module, choose M here: the module will be called tsdev. config INPUT_TSDEV_SCREEN_X int "Horizontal screen resolution" depends on INPUT_TSDEV default "240" config INPUT_TSDEV_SCREEN_Y int "Vertical screen resolution" depends on INPUT_TSDEV default "320" config INPUT_EVDEV tristate "Event interface" depends on INPUT help Say Y here if you want your input device events be accessible under char device 13:64+ - /dev/input/eventX in a generic way. To compile this driver as a module, choose M here: the module will be called evdev. config INPUT_EVBUG tristate "Event debugging" depends on INPUT ---help--- Say Y here if you have a problem with the input subsystem and want all events (keypresses, mouse movements), to be output to the system log. While this is useful for debugging, it's also a security threat - your keypresses include your passwords, of course. If unsure, say N. To compile this driver as a module, choose M here: the module will be called evbug. comment "Input I/O drivers" config GAMECUBE_SI tristate "Gamecube SI driver" ---help--- Say Y here if you want to use the standard pads as joysticks or want to use a keyboard. Everything is autodetected. NOTE: Keyboard detection doesn't work 100%. Building this as a module is recommended, this way you can unload/load the driver to re-detect. source "drivers/input/gameport/Kconfig" source "drivers/input/serio/Kconfig" comment "Input Device Drivers" source "drivers/input/keyboard/Kconfig" source "drivers/input/mouse/Kconfig" source "drivers/input/joystick/Kconfig" source "drivers/input/touchscreen/Kconfig" source "drivers/input/misc/Kconfig" endmenu --- NEW FILE: Makefile --- # # Makefile for the input core drivers. # # Each configuration option enables a list of files. obj-$(CONFIG_INPUT) += input.o obj-$(CONFIG_INPUT_MOUSEDEV) += mousedev.o obj-$(CONFIG_INPUT_JOYDEV) += joydev.o obj-$(CONFIG_INPUT_EVDEV) += evdev.o obj-$(CONFIG_INPUT_TSDEV) += tsdev.o obj-$(CONFIG_INPUT_POWER) += power.o obj-$(CONFIG_INPUT_EVBUG) += evbug.o obj-$(CONFIG_INPUT_KEYBOARD) += keyboard/ obj-$(CONFIG_INPUT_MOUSE) += mouse/ obj-$(CONFIG_INPUT_JOYSTICK) += joystick/ obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/ obj-$(CONFIG_INPUT_MISC) += misc/ obj-$(CONFIG_GAMECUBE_SI) += gamecube_si.o --- NEW FILE: gamecube_keymap.h --- // keymap for a Datel adapater + US keyboard (not the normal keyboard) // not mapped: // printscreen / sysreq // scroll lcok // pause / break // numlock // windows key 1 // windows key 2 // windows menu key static unsigned char gamecube_keymap[] = { /* 00 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_HOME, KEY_END, /* 08 */ KEY_PAGEUP, KEY_PAGEDOWN, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 10 */ KEY_A, KEY_B, KEY_C, KEY_D, KEY_E, KEY_F, KEY_G, KEY_H, /* 18 */ KEY_I, KEY_J, KEY_K, KEY_L, KEY_M, KEY_N, KEY_O, KEY_P, /* 20 */ KEY_Q, KEY_R, KEY_S, KEY_T, KEY_U, KEY_V, KEY_W, KEY_X, /* 28 */ KEY_Y, KEY_Z, KEY_1, KEY_2, KEY_3, KEY_4, KEY_5, KEY_6, /* 30 */ KEY_7, KEY_8, KEY_9, KEY_0, KEY_MINUS, KEY_EQUAL, KEY_BACKSLASH, KEY_APOSTROPHE, /* 38 */ KEY_LEFTBRACE, KEY_EQUAL, KEY_KPASTERISK, KEY_RIGHTBRACE, KEY_COMMA, KEY_DOT, KEY_SLASH, KEY_RESERVED, /* 40 */ KEY_F1, KEY_F2, KEY_F3, KEY_F4, KEY_F5, KEY_F6, KEY_F7, KEY_F8, /* 48 */ KEY_F9, KEY_F10, KEY_F11, KEY_F12, KEY_ESC, KEY_INSERT, KEY_DELETE, KEY_GRAVE, /* 50 */ KEY_BACKSPACE, KEY_TAB, KEY_RESERVED, KEY_CAPSLOCK, KEY_LEFTSHIFT, KEY_RIGHTSHIFT, KEY_LEFTCTRL, KEY_LEFTALT, /* 58 */ KEY_RESERVED, KEY_SPACE, KEY_RESERVED, KEY_RESERVED, KEY_LEFT, KEY_DOWN, KEY_UP, KEY_RIGHT, /* 60 */ KEY_RESERVED, KEY_ENTER, KEY_RESERVED, KEY_RESERVED, KEY_SEMICOLON, KEY_KPPLUS, KEY_RESERVED, KEY_RESERVED, /* 68 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 70 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 78 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 80 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 88 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 90 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* 98 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* a0 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* a8 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* b0 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* b8 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* c0 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* c8 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* d0 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* d8 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* e0 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* e8 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* f0 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, /* f8 */ KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED, KEY_RESERVED }; --- NEW FILE: gamecube_si.c --- #include <linux/input.h> #include <linux/module.h> #include <linux/init.h> #include <linux/ioport.h> #include <linux/timer.h> #include <linux/delay.h> #include <asm/io.h> // this keymap is for a datel adapter + normal US keyboard, if you need somehitng else // copy the keymap, edit it and change the #include #include "gamecube_keymap.h" MODULE_AUTHOR ("Steven Looman <st...@kr...>"); MODULE_DESCRIPTION ("Nintendo Gamecube controller input driver"); MODULE_LICENSE ("GPL"); #define REFRESH_TIME HZ/100 #define SICOUTBUF(x) (0xCC006400 + x * 12) #define SICINBUFH(x) (0xCC006404 + x * 12) #define SICINBUFL(x) (0xCC006408 + x * 12) #define SIPOLL 0xCC006430 #define SICOMCSR 0xCC006434 #define SISR 0xCC006438 #define SIEXILK 0xCC00643C #define ID_PAD 0x0900 #define ID_KEYBOARD 0x0820 #define ID_GBA 0x0004 #define ID_GBA_NA 0x0800 #define ID_WAVEBIRD 0xa800 #define ID_WAVEBIRD_RCV 0xe960 #define PAD_START (1 << 28) #define PAD_Y (1 << 27) #define PAD_X (1 << 26) #define PAD_B (1 << 25) #define PAD_A (1 << 24) #define PAD_LT (1 << 22) #define PAD_RT (1 << 21) #define PAD_Z (1 << 20) #define PAD_UP (1 << 19) #define PAD_DOWN (1 << 18) #define PAD_RIGHT (1 << 17) #define PAD_LEFT (1 << 16) //#define GCSIDEBUG static struct resource resources = { "Gamecube SI", 0xCC006400, 0xCC006500, IORESOURCE_MEM|IORESOURCE_BUSY }; typedef struct { unsigned char key[3]; unsigned char old[3]; } keyboardStatus; struct { unsigned int id; unsigned int raw[2]; unsigned char errStat : 1; unsigned char errLatch : 1; struct input_dev inputDev; struct timer_list timer; union { keyboardStatus keyboard; }; char name[32]; // char phys[32]; } port[4]; static void resetSi (void) { int i; // clear si registers // SICOUTBUF for (i = 0; i < 4; ++i) writel (0, SICOUTBUF (i)); // SICINBUFH for (i = 0; i < 4; ++i) writel (0, SICINBUFH (i)); // SICINBUFL for (i = 0; i < 4; ++i) writel (0, SICINBUFL (i)); writel (0, SIPOLL); writel (0, SICOMCSR); writel (0, SISR); writel (0, 0xCC006480); writel (0, 0xCC006484); writel (0, 0xCC006488); writel (0, 0xCC00648c); writel (0, 0xCC006490); writel (0, 0xCC006494); writel (0, 0xCC006498); writel (0, 0xCC00649c); writel (0, 0xCC0064a0); writel (0, 0xCC0064a4); writel (0, 0xCC0064a8); writel (0, 0xCC0064ac); } static void waitTransferDone (void) { unsigned long transferDone; do { transferDone = readl (SICOMCSR) & (1 << 31); } while (!transferDone); writel (readl (SICOMCSR) |= (1 << 31), SICOMCSR); // mask IRQ } static unsigned long getControllerID (int port) { resetSi(); writel (0, SIPOLL); writel (0, SICOUTBUF (port)); writel (0x80000000, SISR); writel (0xD0010001 | port << 1, SICOMCSR); waitTransferDone(); return readl (0xCC006480); } static void setPolling (void) { unsigned long padBits = 0; int i; for (i = 0; i < 4; ++i) { switch (port[i].id) { case ID_PAD: writel (0x00400300, SICOUTBUF (i)); break; case ID_KEYBOARD: writel (0x00540000, SICOUTBUF (i)); break; } padBits |= 1 << (7 - i); } writel (0x00F70200 | padBits, SIPOLL); writel (0x80000000, SISR); writel (0xC0010801, SICOMCSR); waitTransferDone(); } static void gcSiTimer (unsigned long portNo) { int i; unsigned long raw[2]; raw[0] = readl (SICINBUFH (portNo)); raw[1] = readl (SICINBUFL (portNo)); switch (port[portNo].id) { case ID_PAD: // buttons input_report_key (&port[portNo].inputDev, BTN_A, raw[0] & PAD_A); input_report_key (&port[portNo].inputDev, BTN_B, raw[0] & PAD_B); input_report_key (&port[portNo].inputDev, BTN_X, raw[0] & PAD_X); input_report_key (&port[portNo].inputDev, BTN_Y, raw[0] & PAD_Y); input_report_key (&port[portNo].inputDev, BTN_Z, raw[0] & PAD_Z); input_report_key (&port[portNo].inputDev, BTN_TL, raw[0] & PAD_LT); input_report_key (&port[portNo].inputDev, BTN_TR, raw[0] & PAD_RT); input_report_key (&port[portNo].inputDev, BTN_START, raw[0] & PAD_START); // axis // a stick input_report_abs (&port[portNo].inputDev, ABS_X, raw[0] >> 8 & 0xFF); input_report_abs (&port[portNo].inputDev, ABS_Y, raw[0] >> 0 & 0xFF); // b pad if (raw[0] & PAD_RIGHT) input_report_abs (&port[portNo].inputDev, ABS_HAT0X, 1); else if (raw[0] & PAD_LEFT) input_report_abs (&port[portNo].inputDev, ABS_HAT0X, -1); else input_report_abs (&port[portNo].inputDev, ABS_HAT0X, 0); if (raw[0] & PAD_UP) input_report_abs (&port[portNo].inputDev, ABS_HAT0Y, 1); else if (raw[0] & PAD_DOWN) input_report_abs (&port[portNo].inputDev, ABS_HAT0Y, -1); else input_report_abs (&port[portNo].inputDev, ABS_HAT0Y, 0); // c stick input_report_abs (&port[portNo].inputDev, ABS_RX, raw[1] >> 24 & 0xFF); input_report_abs (&port[portNo].inputDev, ABS_RY, raw[1] >> 16 & 0xFF); // triggers input_report_abs (&port[portNo].inputDev, ABS_BRAKE, raw[1] >> 8 & 0xFF); input_report_abs (&port[portNo].inputDev, ABS_GAS, raw[1] >> 0 & 0xFF); break; case ID_KEYBOARD: port[portNo].keyboard.key[0] = (raw[0] >> 12) & 0xFF; port[portNo].keyboard.key[1] = (raw[0] >> 4) & 0xFF; port[portNo].keyboard.key[2] = (raw[0] << 4) & 0xFF; port[portNo].keyboard.key[2]|= (raw[1] << 28) & 0xFF; // check if anything was released for (i = 0; i < 3; ++i) { unsigned char key = port[portNo].keyboard.old[i]; if (key != port[portNo].keyboard.key[0] && key != port[portNo].keyboard.key[1] && key != port[portNo].keyboard.key[2]) input_report_key (&port[portNo].inputDev, gamecube_keymap[key], 0); } // reports keys for (i = 0; i < 3; ++i) { unsigned char key = port[portNo].keyboard.key[i]; if (key) input_report_key (&port[portNo].inputDev, gamecube_keymap[key], 1); port[portNo].keyboard.old[i] = port[portNo].keyboard.key[i]; } break; default: break; } input_sync(&port[portNo].inputDev); mod_timer (&port[portNo].timer, jiffies + REFRESH_TIME); } static int gcSiOpen (struct input_dev *inputDev) { int portNo = (int)inputDev->private; init_timer (&port[portNo].timer); port[portNo].timer.function = gcSiTimer; port[portNo].timer.data = (int)inputDev->private; port[portNo].timer.expires = jiffies + REFRESH_TIME; add_timer (&port[portNo].timer); return 0; } static void gcSiClose (struct input_dev *inputDev) { int portNo = (int)inputDev->private; del_timer (&port[portNo].timer); } static int __init gcSiInit(void) { int i; printk (KERN_WARNING "Gamecube SI: init\n"); if (request_resource (&iomem_resource, &resources) < 0) { printk (KERN_WARNING "Gamecube SI: resource busy\n"); return -EBUSY; } for (i = 0; i < 4; ++i) { int j; memset (&port[i], 0, sizeof (port[i])); // probe ports port[i].id = getControllerID(i) >> 16; #ifdef GCSIDEBUG printk (KERN_WARNING "Gamecube SI: port[%d] = 0x%x\n", i, port[i].id); #endif init_input_dev (&port[i].inputDev); port[i].inputDev.open = gcSiOpen; port[i].inputDev.close = gcSiClose; port[i].inputDev.private = (unsigned int *)i; printk (KERN_WARNING "Gamecube Si: Port %d: ", i); switch (port[i].id) { case ID_PAD: printk (KERN_WARNING "standard pad\n"); sprintf (port[i].name, "Gamecube standard pad"); port[i].inputDev.name = port[i].name; // sprintf (port[i].phys, "gcsi/port%d", i); // port[i].inputDev.phys = port[i].phys; set_bit (EV_KEY, port[i].inputDev.evbit); set_bit (EV_ABS, port[i].inputDev.evbit); set_bit (BTN_A, port[i].inputDev.keybit); set_bit (BTN_B, port[i].inputDev.keybit); set_bit (BTN_X, port[i].inputDev.keybit); set_bit (BTN_Y, port[i].inputDev.keybit); set_bit (BTN_Z, port[i].inputDev.keybit); set_bit (BTN_TL, port[i].inputDev.keybit); set_bit (BTN_TR, port[i].inputDev.keybit); set_bit (BTN_START, port[i].inputDev.keybit); // a stick set_bit (ABS_X, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_X] = 0; port[i].inputDev.absmax[ABS_X] = 255; port[i].inputDev.absfuzz[ABS_X] = 8; port[i].inputDev.absflat[ABS_X] = 8; set_bit (ABS_Y, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_Y] = 0; port[i].inputDev.absmax[ABS_Y] = 255; port[i].inputDev.absfuzz[ABS_Y] = 8; port[i].inputDev.absflat[ABS_Y] = 8; // b pad set_bit (ABS_HAT0X, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_HAT0X] = -1; port[i].inputDev.absmax[ABS_HAT0X] = 1; set_bit (ABS_HAT0Y, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_HAT0Y] = -1; port[i].inputDev.absmax[ABS_HAT0Y] = 1; // c stick set_bit (ABS_RX, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_RX] = 0; port[i].inputDev.absmax[ABS_RX] = 255; port[i].inputDev.absfuzz[ABS_RX] = 8; port[i].inputDev.absflat[ABS_RX] = 8; set_bit (ABS_RY, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_RY] = 0; port[i].inputDev.absmax[ABS_RY] = 255; port[i].inputDev.absfuzz[ABS_RY] = 8; port[i].inputDev.absflat[ABS_RY] = 8; // triggers set_bit (ABS_GAS, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_GAS] = -255; port[i].inputDev.absmax[ABS_GAS] = 255; port[i].inputDev.absfuzz[ABS_GAS] = 16; port[i].inputDev.absflat[ABS_GAS] = 16; set_bit (ABS_BRAKE, port[i].inputDev.absbit); port[i].inputDev.absmin[ABS_BRAKE] = -255; port[i].inputDev.absmax[ABS_BRAKE] = 255; port[i].inputDev.absfuzz[ABS_BRAKE] = 16; port[i].inputDev.absflat[ABS_BRAKE] = 16; input_register_device (&port[i].inputDev); break; case ID_KEYBOARD: printk (KERN_WARNING "keyboard\n"); set_bit (EV_KEY, port[i].inputDev.evbit); set_bit (EV_REP, port[i].inputDev.evbit); for (j = 0; j < 255; ++j) set_bit (gamecube_keymap[j], port[i].inputDev.keybit); input_register_device (&port[i].inputDev); break; default: // unknown device if (port[i].id) printk (KERN_WARNING "unknown device (%x)\n", port[i].id); else printk (KERN_WARNING "no device\n"); break; } } setPolling(); return 0; } static void __exit gcSiExit(void) { int i; printk (KERN_WARNING "Gamecube SI: exit\n"); for (i = 0; i < 4; ++i) if (port[i].id == ID_PAD || port[i].id == ID_KEYBOARD) input_unregister_device (&port[i].inputDev); release_resource (&resources); } module_init (gcSiInit); module_exit (gcSiExit); |
From: <he...@us...> - 2004-06-22 23:08:46
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26925 Modified Files: gc-rsw.c Log Message: Let the reset driver do something useful. Pressing the reset button once schedules a reboot in 3 seconds. If the reset button is pressed again before the 3 seconds timeout expires then the reboot is cancelled. If the reboot is not cancelled, and the reset button is pressed again, a emergency mode is entered. In the emergency mode, pressing 10 times the reset button causes a machine restart (or a kexec if CONFIG_KEXEC is defined and a kexec'able image is loaded). The emergency mode will be mainly useful for developers. Index: gc-rsw.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gc-rsw.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gc-rsw.c 16 Jun 2004 15:17:16 -0000 1.6 +++ gc-rsw.c 22 Jun 2004 23:08:36 -0000 1.7 @@ -2,6 +2,7 @@ /* gc-rsw.c GameCube Reset Switch Driver */ /* ------------------------------------------------------------------------- */ /* Copyright (C) 2004 Stefan Esser + Copyright (C) 2004 Albert Herranz This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -19,39 +20,161 @@ /* ------------------------------------------------------------------------- */ #include <linux/kernel.h> -#include <linux/ioport.h> #include <linux/module.h> +#include <linux/spinlock.h> #include <linux/delay.h> -#include <linux/slab.h> #include <linux/init.h> #include <linux/interrupt.h> -#include <linux/wait.h> +#include <linux/reboot.h> -#include <asm/irq.h> +#ifdef CONFIG_KEXEC +#include <linux/kexec.h> +#endif #define RSW_IRQ 1 -static irqreturn_t gc_rsw_handler(int this_irq, void *dev_id, struct pt_regs *regs) { +/* from kernel/sys.c */ +extern void ctrl_alt_del(void); + +#define GC_RSW_NORMAL_TIMEOUT 3 /* secs */ +#define GC_RSW_EMERGENCY_CLICKS 10 + +typedef enum { + IDLE = 0, /* nothing to do */ + NORMAL_RESET, /* reboot requested */ + EMERGENCY_RESET, /* try emergency reboot */ +} gc_rsw_state_t; + +struct gc_rsw_private { + gc_rsw_state_t state; + struct timer_list timer; + unsigned long jiffies; + int clicks; + int timeout; + spinlock_t lock; +}; + +static struct gc_rsw_private gc_rsw_private = { + .state = IDLE, + .timeout = GC_RSW_NORMAL_TIMEOUT, +}; + +static void gc_rsw_emergency_reset(void); +static void gc_rsw_normal_reset(unsigned long dummy); + +/** + * + */ +static irqreturn_t gc_rsw_handler(int this_irq, void *data, + struct pt_regs *regs) +{ + struct gc_rsw_private *priv = (struct gc_rsw_private *)data; + unsigned long flags; + + spin_lock_irqsave(priv->lock, flags); + + /* someone pressed the reset button */ + switch (priv->state) { + case IDLE: + priv->state = NORMAL_RESET; + printk(KERN_EMERG "Rebooting in %d seconds...\n", + priv->timeout); + printk(KERN_WARNING + "Press Reset button again to cancel reboot!\n"); + + /* schedule a reboot in a few seconds */ + init_timer(&priv->timer); + priv->timer.expires = jiffies + priv->timeout * HZ; + priv->timer.function = + (void (*)(unsigned long))gc_rsw_normal_reset; + add_timer(&priv->timer); + priv->jiffies = jiffies; + break; + case NORMAL_RESET: + if (time_before(jiffies, priv->jiffies + priv->timeout * HZ)) { + /* the reset button was hit again before deadline */ + del_timer(&priv->timer); + priv->state = IDLE; + printk(KERN_EMERG "Reboot cancelled!\n"); + } else { + /* + * Time expired. System should be now restarting. + * Go to emergency mode in case something goes bad. + */ + priv->state = EMERGENCY_RESET; + priv->clicks = 0; + printk(KERN_WARNING + "SWITCHED TO EMERGENCY RESET MODE!\n" + "Press %d times the Reset button to force" + " a hard reset!\n", GC_RSW_EMERGENCY_CLICKS); + } + break; + case EMERGENCY_RESET: + /* force a hard reset if the user insists ... */ + if (++priv->clicks >= GC_RSW_EMERGENCY_CLICKS) { + spin_unlock_irqrestore(priv->lock, flags); + gc_rsw_emergency_reset(); + return IRQ_HANDLED; + } else { + printk(KERN_INFO + "%d ...\n", + GC_RSW_EMERGENCY_CLICKS - priv->clicks); + } + break; + } + + spin_unlock_irqrestore(priv->lock, flags); - printk(KERN_ERR "gc_rsw: reset switch pressed\n"); return IRQ_HANDLED; } +/** + * + */ +static void gc_rsw_emergency_reset(void) +{ +#ifdef CONFIG_KEXEC + struct kimage *image; + image = xchg(&kexec_image, 0); + if (image) { + machine_kexec(image); + } +#endif + machine_restart(NULL); +} + +/** + * + */ +static void gc_rsw_normal_reset(unsigned long dummy) +{ + ctrl_alt_del(); +} +/** + * + */ static int gc_rsw_init(void) { int err; - err = request_irq(RSW_IRQ, gc_rsw_handler, 0, "GameCube Reset Switch", 0); + spin_lock_init(&gc_rsw_private.lock); + + err = + request_irq(RSW_IRQ, gc_rsw_handler, 0, "GameCube Reset Switch", + (void *)&gc_rsw_private); if (err) printk(KERN_ERR "gc_rsw: Request irq%d failed\n", RSW_IRQ); return err; } +/** + * + */ static void gc_rsw_exit(void) { - free_irq(RSW_IRQ, 0); + free_irq(RSW_IRQ, &gc_rsw_private); } MODULE_AUTHOR("Stefan Esser <se...@no...>"); |
From: <he...@us...> - 2004-06-22 21:47:24
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30874 Modified Files: howtodevelop.xml Log Message: Added missing title to the iparticle metainfo. Updated date. Index: howtodevelop.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/howtodevelop.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- howtodevelop.xml 22 Jun 2004 21:15:13 -0000 1.6 +++ howtodevelop.xml 22 Jun 2004 21:47:14 -0000 1.7 @@ -2,8 +2,9 @@ <?xml-stylesheet type="text/xsl" href="iparticle.xsl"?> <iparticle> <info> + <title>How to develop for GameCube Linux</title> <author>Michael Steil (updated by Albert Herranz)</author> - <date>13 June 2004</date> + <date>22 June 2004</date> </info> <p>Targetting the GameCube with your development is not as easy as targetting your Linux PC, because you have to do cross-development and explicitly upload the executables after compilation.</p> |
From: <mi...@us...> - 2004-06-22 21:15:21
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29704 Modified Files: howtodevelop.xml Log Message: fixed XML Index: howtodevelop.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/howtodevelop.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- howtodevelop.xml 22 Jun 2004 18:12:38 -0000 1.5 +++ howtodevelop.xml 22 Jun 2004 21:15:13 -0000 1.6 @@ -2,13 +2,7 @@ <?xml-stylesheet type="text/xsl" href="iparticle.xsl"?> <iparticle> <info> -<!-- wtf, the document is NOT formatted, why? --> -<h1> - <title>How to develop for GameCube Linux</title> -</h1> -<br/><i>by <author>Michael Steil (updated by Albert Herranz)</author> -</i>, <date>13 June 2004</date> </info> @@ -18,7 +12,7 @@ <p>Although you can run a compiler on the GameCube, you will prefer to develop and compile on your desktop computer - which is likely to be a lot faster anyway.</p> <p>The GameCube has a PowerPC CPU, so your development machine must be able to compile PowerPC binaries. If you have a Mac running Linux, this is easy: Your machine can already create executables for the GameCube.</p> - <p>If your development machine is an x86 PC or a Mac running Mac OS X, you need a cross-compiler. Arthur Othieno has contributed a ready-to-use cross-compiler for x86 available for download from the <a href="http://sourceforge.net/project/showfiles.php?group_id=98581&package_id=120824">SourceForge project files</a> page. You can of course also build your own cross-compiler from the GCC and binutils sources.</p> + <p>If your development machine is an x86 PC or a Mac running Mac OS X, you need a cross-compiler. Arthur Othieno has contributed a ready-to-use cross-compiler for x86 available for download from the <a href="http://sourceforge.net/project/showfiles.php?group_id=98581&package_id=120824">SourceForge project files</a> page. You can of course also build your own cross-compiler from the GCC and binutils sources.</p> <p>There are also cross-compilers for Linux, Windows and Mac OS X available at <a href="http://heliscar.com/greg/">http://heliscar.com/greg/</a> and <a href="http://www.hangar-eleven.de/en/">http://www.hangar-eleven.de/en/</a>. However, we have found problems compiling recent kernels with them.</p> <h2>Running Executables on the GameCube</h2> |
From: <he...@us...> - 2004-06-22 18:18:51
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv933 Modified Files: news.xml Log Message: Sync'ed cvs news with web site ones: - 22 Jun 04 - 18 May 04 - 5 Apr 04 Index: news.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/news.xml,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- news.xml 4 Apr 2004 08:38:02 -0000 1.16 +++ news.xml 22 Jun 2004 18:18:31 -0000 1.17 @@ -2,6 +2,21 @@ <?xml-stylesheet href="news.xsl" type="text/xsl"?> <news> <item> + <date>22 June 2004</date> + <title>GameCube Linux at Linuxtag</title> + <text>You will be able to see a GameCube running Linux at the Xbox Linux booth at the Linuxtag in Karlsruhe from Wednesday 23rd to Saturday 26th.</text> + </item> + <item> + <date>18 May 2004</date> + <title>Sound driver fixed</title> + <text>Groepaz fixed the sound driver. The new code is in the CVS.</text> + </item> + <item> + <date>5 April 2004</date> + <title>PSOload V2.0 for Linux/x86</title> + <text>Thanks to <a href="http://www.deadcoderssociety.tk/">Mr.Spiv</a>, the Linux version of <a href="http://www.gcdev.com">Costis</a>' PSOload V2.0 is available <a href="http://www.gcdev.com/download/PSOloadV2.0_Linux.zip">here</a>.</text> + </item> + <item> <date>4 April 2004</date> <title>PSOload V2.0 for Mac OS X</title> <text>Jouni 'Mr.Spiv' Korhonen has just finished porting the latest version of <a href="http://www.gcdev.com">Costis</a>' PSOload V2.0 for the Mac OS X operating system. Now Mac users will be able to use the latest version with all of its new features! Download the new build <a href="http://www.gcdev.com/download/PSOloadV2.0_OSX.zip">here</a> and visit Jouni 'Mr.Spiv' Korhonen's web-site <a href="http://www.deadcoderssociety.tk/">here</a>. A native Linux version of PSOload V2.0 will also be released within the next few days, once he has finished porting it.</text> |
From: <he...@us...> - 2004-06-22 18:12:48
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26344 Modified Files: howtodevelop.xml Log Message: Updated cross-compiler information. Updated information on PSOload availability for different platforms. UGLYHACK: I included manual formatting for the part of the iparticle metainfo as it seems that it is not correctly formatted by the transform function. Index: howtodevelop.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/howtodevelop.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- howtodevelop.xml 26 Jan 2004 00:37:44 -0000 1.4 +++ howtodevelop.xml 22 Jun 2004 18:12:38 -0000 1.5 @@ -2,33 +2,32 @@ <?xml-stylesheet type="text/xsl" href="iparticle.xsl"?> <iparticle> <info> +<!-- wtf, the document is NOT formatted, why? --> +<h1> <title>How to develop for GameCube Linux</title> - <author>Michael Steil</author> - <date>25 January 2004</date> +</h1> +<br/><i>by + <author>Michael Steil (updated by Albert Herranz)</author> +</i>, + <date>13 June 2004</date> </info> <p>Targetting the GameCube with your development is not as easy as targetting your Linux PC, because you have to do cross-development and explicitly upload the executables after compilation.</p> <h2>Cross Compiling</h2> - <p>You cannot run a compiler on the GameCube yet, so you need to develop and compile on your desktop computer - which is likely to be a lot faster anyway.</p> + <p>Although you can run a compiler on the GameCube, you will prefer to develop and compile on your desktop computer - which is likely to be a lot faster anyway.</p> <p>The GameCube has a PowerPC CPU, so your development machine must be able to compile PowerPC binaries. If you have a Mac running Linux, this is easy: Your machine can already create executables for the GameCube.</p> - <p>If your development machine is an x86 PC or a Mac running Mac OS X, you need a cross-compiler. <a href="http://heliscar.com/greg/">http://heliscar.com/greg/</a> and <a href="http://www.hangar-eleven.de/en/">http://www.hangar-eleven.de/en/</a> both host precompiled cross compilers for Linux, Windows and Mac OS X that can compile a GameCube Linux kernel. You can of course also build your own cross compiler from the GCC and binutils sources.</p> + <p>If your development machine is an x86 PC or a Mac running Mac OS X, you need a cross-compiler. Arthur Othieno has contributed a ready-to-use cross-compiler for x86 available for download from the <a href="http://sourceforge.net/project/showfiles.php?group_id=98581&package_id=120824">SourceForge project files</a> page. You can of course also build your own cross-compiler from the GCC and binutils sources.</p> + <p>There are also cross-compilers for Linux, Windows and Mac OS X available at <a href="http://heliscar.com/greg/">http://heliscar.com/greg/</a> and <a href="http://www.hangar-eleven.de/en/">http://www.hangar-eleven.de/en/</a>. However, we have found problems compiling recent kernels with them.</p> <h2>Running Executables on the GameCube</h2> - <p>The GameCube cannot read any CDs/DVDs that can be burnt. The only practicable way to run your code rigt now is the "PSOload" method.</p> + <p>The GameCube cannot read any CDs/DVDs that can be burnt. There are several methods to run your code on the GameCube, but we will show briefly only the "PSOload" method.</p> <p>The game "Phantasy Star Online" ("PSO", any version) tries to connect to a central server if you want to play an online game, in order to download an updated version of the game executable. This mechanism can be used to upload any code to the GameCube.</p> - <p>You need the game "PSO", a memory card, a broadband adapter and a Windows PC running the tool "PSOload", connected to the GameCube via Ethernet.</p> - <p>PSOload v2.0a can be downloaded <a href="http://www.gcdev.com/download/PSOloadV2.0a.zip">here</a>.</p> + <p>You need the game "PSO", a memory card, a broadband adapter and a PC running the tool "PSOload", connected to the GameCube via Ethernet.</p> + <p>PSOload v2.0a for Windows can be downloaded <a href="http://www.gcdev.com/download/PSOloadV2.0a.zip">here</a>.</p> + <p>PSOload v2.0 for Linux can be downloaded <a href="http://www.gcdev.com/download/PSOloadV2.0_Linux.zip">here</a> and for MAC OS X <a href="http://www.gcdev.com/download/PSOloadV2.0_OSX.zip">here</a>.</p> + <p>PSOload for Windows also works in Linux using a recent Wine version without the need of additional DLLs. If you have a really old Wine version, like Wine 20030508, Azalyn explains <a href="http://article.gmane.org/gmane.linux.ports.game-cube.devel/69">here</a> how to make it run.</p> - <p>PSOload also works in Linux with Wine. Azalyn got it running with Wine 20030508 and the following DLLs:</p> -<pre> -iphlpapi.dll ----- Win98SE DLL-Version -NTDLL.DLL ----- Win98 DLL-Version -netapi32.dll ----- Win98SE DLL-Version -dhcpcsvc.dll ----- Win98SE DLL-Version -ipcfgdll.dll ----- Win98SE DLL-Version -advapi32.dll ----- Win98SE DLL-Version</pre> -<p>Chances are, it will work with very different configurations as well. Read the details <a href="http://article.gmane.org/gmane.linux.ports.game-cube.devel/69">here</a>.</p> </iparticle> |
From: <aot...@us...> - 2004-06-16 17:31:36
|
Update of /cvsroot/gc-linux/linux/arch/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/arch/ppc Modified Files: Kconfig Log Message: Merged 2.6.7 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/Kconfig,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Kconfig 11 May 2004 17:48:34 -0000 1.14 +++ Kconfig 16 Jun 2004 17:30:42 -0000 1.15 @@ -548,6 +548,15 @@ <http://www.windriver.com/>, but the EST8260 cannot be found on it and has probably been discontinued or rebadged. +config SBC82xx + bool "SBC82xx" + ---help--- + SBC PowerQUICC II, single-board computer with MPC82xx CPU + Manufacturer: Wind River Systems, Inc. + Date of Release: May 2003 + End of Life: - + URL: <http://www.windriver.com/> + config SBS8260 bool "SBS8260" @@ -601,7 +610,7 @@ config 8260 bool "MPC8260 CPM Support" if WILLOW depends on 6xx - default y if TQM8260 || RPXSUPER || EST8260 || SBS8260 + default y if TQM8260 || RPXSUPER || EST8260 || SBS8260 || SBC82xx help The MPC8260 CPM (Communications Processor Module) is a typical embedded CPU made by Motorola. Selecting this option means that @@ -1114,6 +1123,30 @@ hex "Size of user task space" if TASK_SIZE_BOOL default "0x80000000" +config CONSISTENT_START_BOOL + bool "Set custom consistent memory pool address" + depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE + help + This option allows you to set the base virtual address + of the the consistent memory pool. This pool of virtual + memory is used to make consistent memory allocations. + +config CONSISTENT_START + hex "Base virtual address of consistent memory pool" if CONSISTENT_START_BOOL + default "0xff100000" if NOT_COHERENT_CACHE + +config CONSISTENT_SIZE_BOOL + bool "Set custom consistent memory pool size" + depends on ADVANCED_OPTIONS && NOT_COHERENT_CACHE + help + This option allows you to set the size of the the + consistent memory pool. This pool of virtual memory + is used to make consistent memory allocations. + +config CONSISTENT_SIZE + hex "Size of consistent memory pool" if CONSISTENT_SIZE_BOOL + default "0x00200000" if NOT_COHERENT_CACHE + config BOOT_LOAD_BOOL bool "Set the boot link/load address" depends on ADVANCED_OPTIONS && !PPC_MULTIPLATFORM @@ -1282,7 +1315,7 @@ bool "Support for early boot texts over serial port" depends on 4xx || GT64260 || LOPEC || PPLUS || PRPMC800 || PPC_GEN550 -config OCP +config PPC_OCP bool depends on IBM_OCP default y |
From: <aot...@us...> - 2004-06-16 17:31:36
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: Merged 2.6.7 Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- gamecube_defconfig 11 May 2004 17:48:35 -0000 1.17 +++ gamecube_defconfig 16 Jun 2004 17:30:42 -0000 1.18 @@ -86,6 +86,7 @@ # CONFIG_PAL4 is not set # CONFIG_GEMINI is not set # CONFIG_EST8260 is not set +# CONFIG_SBC82xx is not set # CONFIG_SBS8260 is not set # CONFIG_RPX6 is not set # CONFIG_TQM8260 is not set @@ -184,7 +185,6 @@ # # Fusion MPT device support # -# CONFIG_FUSION is not set # # IEEE 1394 (FireWire) support @@ -328,7 +328,6 @@ # CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set -# CONFIG_RCPCI is not set # CONFIG_SHAPER is not set # CONFIG_NETCONSOLE is not set @@ -456,6 +455,7 @@ # CONFIG_FB_PM2 is not set # CONFIG_FB_CYBER2000 is not set # CONFIG_FB_CT65550 is not set +# CONFIG_FB_ASILIANT is not set # CONFIG_FB_IMSTT is not set # CONFIG_FB_S3TRIO is not set # CONFIG_FB_VGA16 is not set @@ -648,7 +648,6 @@ # CONFIG_CIFS is not set # CONFIG_NCP_FS is not set # CONFIG_CODA_FS is not set -# CONFIG_INTERMEZZO_FS is not set # CONFIG_AFS_FS is not set # |
From: <aot...@us...> - 2004-06-16 17:31:35
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/arch/ppc/boot/simple Modified Files: Makefile embed_config.c Log Message: Merged 2.6.7 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 24 Apr 2004 18:31:43 -0000 1.5 +++ Makefile 16 Jun 2004 17:30:42 -0000 1.6 @@ -125,7 +125,7 @@ AFLAGS_head.o += $(cacheflag-y) # Linker args. This specifies where the image will be run at. -LD_ARGS := -T $(boot)/ld.script \ +LD_ARGS := -T $(srctree)/$(boot)/ld.script \ -Ttext $(CONFIG_BOOT_LOAD) -Bstatic OBJCOPY_ARGS := -O elf32-powerpc @@ -160,8 +160,8 @@ targets := dummy.o -$(obj)/zvmlinux: $(OBJS) $(LIBS) $(boot)/ld.script $(images)/vmlinux.gz \ - $(obj)/dummy.o +$(obj)/zvmlinux: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ + $(images)/vmlinux.gz $(obj)/dummy.o $(OBJCOPY) $(OBJCOPY_ARGS) \ --add-section=.image=$(images)/vmlinux.gz \ --set-section-flags=.image=contents,alloc,load,readonly,data \ @@ -170,7 +170,7 @@ $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ --change-addresses=-0x80000000 -R .comment -R .stab \ -R .stabstr -R .ramdisk -R .sysmap -$(obj)/zvmlinux.initrd: $(OBJS) $(LIBS) $(boot)/ld.script \ +$(obj)/zvmlinux.initrd: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ $(images)/vmlinux.gz $(obj)/dummy.o $(OBJCOPY) $(OBJCOPY_ARGS) \ --add-section=.ramdisk=$(images)/ramdisk.image.gz \ @@ -211,10 +211,10 @@ $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) \ $(ENTRYPOINT) -$(images)/zImage-PPLUS: $(obj)/zvmlinux $(utils)/mkprep $(MKBUGBOOT) +$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT) $(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.$(end-y) $(MKBUGBOOT) $(obj)/zvmlinux $(images)/zImage.bugboot -$(images)/zImage.initrd-PPLUS: $(obj)/zvmlinux.initrd $(utils)/mkprep $(MKBUGBOOT) +$(images)/zImage.initrd-PPLUS: $(obj)/zvmlinux.initrd $(MKPREP) $(MKBUGBOOT) $(MKPREP) -pbp $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(end-y) $(MKBUGBOOT) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.bugboot Index: embed_config.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/embed_config.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- embed_config.c 25 Apr 2004 18:57:10 -0000 1.3 +++ embed_config.c 16 Jun 2004 17:30:42 -0000 1.4 @@ -10,6 +10,7 @@ #include <linux/types.h> #include <linux/config.h> #include <linux/string.h> +#include <asm/reg.h> #ifdef CONFIG_8xx #include <asm/mpc8xx.h> #endif @@ -405,14 +406,18 @@ #ifdef CONFIG_8260 /* Compute 8260 clock values if the rom doesn't provide them. - * We can't compute the internal core frequency (I don't know how to - * do that). */ +static unsigned char bus2core_8260[] = { +/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ + 3, 2, 2, 2, 4, 4, 5, 9, 6, 11, 8, 10, 3, 12, 7, 2, + 6, 5, 13, 2, 14, 4, 15, 2, 3, 11, 8, 10, 16, 12, 7, 2, +}; + static void clk_8260(bd_t *bd) { uint scmr, vco_out, clkin; - uint plldf, pllmf, busdf, brgdf, cpmdf; + uint plldf, pllmf, corecnf; volatile immap_t *ip; ip = (immap_t *)IMAP_ADDR; @@ -426,8 +431,7 @@ */ plldf = (scmr >> 12) & 1; pllmf = scmr & 0xfff; - cpmdf = (scmr >> 16) & 0x0f; - busdf = (scmr >> 20) & 0x0f; + corecnf = (scmr >> 24) &0x1f; /* This is arithmetic from the 8260 manual. */ @@ -436,6 +440,7 @@ bd->bi_vco = vco_out; /* Save for later */ bd->bi_cpmfreq = vco_out / 2; /* CPM Freq, in MHz */ + bd->bi_intfreq = bd->bi_busfreq * bus2core_8260[corecnf] / 2; /* Set Baud rate divisor. The power up default is divide by 16, * but we set it again here in case it was changed. @@ -443,8 +448,79 @@ ip->im_clkrst.car_sccr = 1; /* DIV 16 BRG */ bd->bi_brgfreq = vco_out / 16; } + +static unsigned char bus2core_8280[] = { +/* 0 1 2 3 4 5 6 7 8 9 a b c d e f */ + 3, 2, 2, 2, 4, 4, 5, 9, 6, 11, 8, 10, 3, 12, 7, 2, + 6, 5, 13, 2, 14, 2, 15, 2, 3, 2, 2, 2, 16, 2, 2, 2, +}; + +static void +clk_8280(bd_t *bd) +{ + uint scmr, main_clk, clkin; + uint pllmf, corecnf; + volatile immap_t *ip; + + ip = (immap_t *)IMAP_ADDR; + scmr = ip->im_clkrst.car_scmr; + + /* The clkin is always bus frequency. + */ + clkin = bd->bi_busfreq; + + /* Collect the bits from the scmr. + */ + pllmf = scmr & 0xf; + corecnf = (scmr >> 24) & 0x1f; + + /* This is arithmetic from the 8280 manual. + */ + main_clk = clkin * (pllmf + 1); + + bd->bi_cpmfreq = main_clk / 2; /* CPM Freq, in MHz */ + bd->bi_intfreq = bd->bi_busfreq * bus2core_8280[corecnf] / 2; + + /* Set Baud rate divisor. The power up default is divide by 16, + * but we set it again here in case it was changed. + */ + ip->im_clkrst.car_sccr = (ip->im_clkrst.car_sccr & 0x3) | 0x1; + bd->bi_brgfreq = main_clk / 16; +} #endif +#ifdef CONFIG_SBC82xx +void +embed_config(bd_t **bdp) +{ + u_char *cp; + int i; + bd_t *bd; + unsigned long pvr; + + bd = *bdp; + + bd = &bdinfo; + *bdp = bd; + bd->bi_baudrate = 9600; + bd->bi_memsize = 256 * 1024 * 1024; /* just a guess */ + + cp = (void*)SBC82xx_MACADDR_NVRAM_SCC1; + memcpy(bd->bi_enetaddr, cp, 6); + + /* can busfreq be calculated? */ + pvr = mfspr(PVR); + if ((pvr & 0xffff0000) == 0x80820000) { + bd->bi_busfreq = 100000000; + clk_8280(bd); + } else { + bd->bi_busfreq = 66000000; + clk_8260(bd); + } + +} +#endif /* SBC82xx */ + #if defined(CONFIG_EST8260) || defined(CONFIG_TQM8260) void embed_config(bd_t **bdp) @@ -708,7 +784,7 @@ #ifdef CONFIG_IBM_OPENBIOS /* This could possibly work for all treeboot roms. */ -#if defined(CONFIG_ASH) || defined(CONFIG_BEECH) +#if defined(CONFIG_ASH) || defined(CONFIG_BEECH) || defined(CONFIG_BUBINGA) #define BOARD_INFO_VECTOR 0xFFF80B50 /* openbios 1.19 moved this vector down - armin */ #else #define BOARD_INFO_VECTOR 0xFFFE0B50 @@ -745,7 +821,7 @@ */ mtdcr(DCRN_MALCR(DCRN_MAL_BASE), MALCR_MMSR); /* 1st reset MAL */ while (mfdcr(DCRN_MALCR(DCRN_MAL_BASE)) & MALCR_MMSR) {}; /* wait for the reset */ - out_be32(EMAC0_BASE,0x20000000); /* then reset EMAC */ + out_be32((volatile u32*)EMAC0_BASE,0x20000000); /* then reset EMAC */ #endif bd = &bdinfo; |
From: <aot...@us...> - 2004-06-16 17:31:25
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/arch/ppc/platforms Modified Files: Makefile Log Message: Merged 2.6.7 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile 3 Jun 2004 13:52:03 -0000 1.10 +++ Makefile 16 Jun 2004 17:30:43 -0000 1.11 @@ -45,6 +45,7 @@ obj-$(CONFIG_PRPMC750) += prpmc750.o obj-$(CONFIG_PRPMC800) += prpmc800.o obj-$(CONFIG_SANDPOINT) += sandpoint.o +obj-$(CONFIG_SBC82xx) += sbc82xx.o obj-$(CONFIG_SPRUCE) += spruce.o obj-$(CONFIG_GAMECUBE) += gamecube.o gamecube_time.o obj-$(CONFIG_GAMECUBE_CONSOLE) += console.o |
From: <aot...@us...> - 2004-06-16 17:31:25
|
Update of /cvsroot/gc-linux/linux/drivers/input/keyboard In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/drivers/input/keyboard Modified Files: Kconfig Log Message: Merged 2.6.7 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/keyboard/Kconfig,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Kconfig 24 Apr 2004 18:31:44 -0000 1.2 +++ Kconfig 16 Jun 2004 17:30:44 -0000 1.3 @@ -62,7 +62,7 @@ Say Y here if you want to use the old IBM PC/XT keyboard (or compatible) on your system. This is only possible with a parallel port keyboard adapter, you cannot connect it to the - keyboard port on a PC that runs Linux. + keyboard port on a PC that runs Linux. To compile this driver as a module, choose M here: the module will be called xtkbd. @@ -92,7 +92,7 @@ depends on AMIGA && INPUT && INPUT_KEYBOARD help Say Y here if you are running Linux on any AMIGA and have a keyboard - attached. + attached. To compile this driver as a module, choose M here: the module will be called amikbd. @@ -103,7 +103,7 @@ select SERIO help Say Y here if you want to use the NEC PC-9801/PC-9821 keyboard (or - compatible) on your system. + compatible) on your system. To compile this driver as a module, choose M here: the module will be called 98kbd. |
From: <aot...@us...> - 2004-06-16 17:30:57
|
Update of /cvsroot/gc-linux/linux/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/init Modified Files: main.c Log Message: Merged 2.6.7 Index: main.c =================================================================== RCS file: /cvsroot/gc-linux/linux/init/main.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- main.c 11 May 2004 17:48:36 -0000 1.7 +++ main.c 16 Jun 2004 17:30:46 -0000 1.8 @@ -42,6 +42,7 @@ #include <linux/cpu.h> #include <linux/efi.h> #include <linux/unistd.h> +#include <linux/rmap.h> #include <asm/io.h> #include <asm/bugs.h> @@ -84,7 +85,7 @@ extern void buffer_init(void); extern void pidhash_init(void); extern void pidmap_init(void); -extern void pte_chain_init(void); +extern void prio_tree_init(void); extern void radix_tree_init(void); extern void free_initmem(void); extern void populate_rootfs(void); @@ -95,7 +96,8 @@ extern void tc_init(void); #endif -int system_state; /* SYSTEM_BOOTING/RUNNING/SHUTDOWN */ +enum system_states system_state; +EXPORT_SYMBOL(system_state); /* * Boot command-line arguments @@ -169,16 +171,14 @@ still work even if initially too large, it will just take slightly longer */ unsigned long loops_per_jiffy = (1<<12); -#ifndef __ia64__ EXPORT_SYMBOL(loops_per_jiffy); -#endif /* This is the number of bits of precision for the loops_per_jiffy. Each bit takes on average 1.5/HZ seconds. This (like the original) is a little better than 1% */ #define LPS_PREC 8 -void __init calibrate_delay(void) +void __devinit calibrate_delay(void) { unsigned long ticks, loopbit; int lps_precision = LPS_PREC; @@ -186,7 +186,7 @@ loops_per_jiffy = (1<<12); printk("Calibrating delay loop... "); - while (loops_per_jiffy <<= 1) { + while ((loops_per_jiffy <<= 1) != 0) { /* wait for "start of" clock tick */ ticks = jiffies; while (ticks == jiffies) @@ -351,20 +351,17 @@ static void __init smp_init(void) { unsigned int i; - unsigned j = 1; /* FIXME: This should be done in userspace --RR */ - for (i = 0; i < NR_CPUS; i++) { + for_each_present_cpu(i) { if (num_online_cpus() >= max_cpus) break; - if (cpu_possible(i) && !cpu_online(i)) { + if (!cpu_online(i)) cpu_up(i); - j++; - } } /* Any cleanup work */ - printk("Brought up %u CPUs\n", j); + printk("Brought up %ld CPUs\n", (long)num_online_cpus()); smp_cpus_done(max_cpus); #if 0 /* Get other processors into their bootup holding patterns. */ @@ -420,6 +417,13 @@ */ smp_prepare_boot_cpu(); + /* + * Set up the scheduler prior starting any interrupts (such as the + * timer interrupt). Full topology setup happens at smp_init() + * time - but meanwhile we still have a functioning scheduler. + */ + sched_init(); + build_all_zonelists(); page_alloc_init(); printk("Kernel command line: %s\n", saved_command_line); @@ -431,7 +435,7 @@ rcu_init(); init_IRQ(); pidhash_init(); - sched_init(); + init_timers(); softirq_init(); time_init(); @@ -460,7 +464,8 @@ calibrate_delay(); pidmap_init(); pgtable_cache_init(); - pte_chain_init(); + prio_tree_init(); + anon_vma_init(); #ifdef CONFIG_X86 if (efi_enabled) efi_enter_virtual_mode(); @@ -479,7 +484,6 @@ proc_root_init(); #endif check_bugs(); - printk("POSIX conformance testing by UNIFIX\n"); /* * We count on the initial thread going ok @@ -570,7 +574,6 @@ migration_init(); #endif - node_nr_running_init(); spawn_ksoftirqd(); } @@ -580,6 +583,24 @@ execve(init_filename, argv_init, envp_init); } +static inline void fixup_cpu_present_map(void) +{ +#ifdef CONFIG_SMP + int i; + + /* + * If arch is not hotplug ready and did not populate + * cpu_present_map, just make cpu_present_map same as cpu_possible_map + * for other cpu bringup code to function as normal. e.g smp_init() etc. + */ + if (cpus_empty(cpu_present_map)) { + for_each_cpu(i) { + cpu_set(i, cpu_present_map); + } + } +#endif +} + static int init(void * unused) { lock_kernel(); @@ -598,7 +619,9 @@ do_pre_smp_initcalls(); + fixup_cpu_present_map(); smp_init(); + sched_init_smp(); /* * Do this before initcalls, because some drivers want to access @@ -612,7 +635,7 @@ * check if there is an early userspace init. If yes, let it do all * the work */ - if (sys_access("/init", 0) == 0) + if (sys_access((const char __user *) "/init", 0) == 0) execute_command = "/init"; else prepare_namespace(); @@ -626,7 +649,7 @@ unlock_kernel(); system_state = SYSTEM_RUNNING; - if (sys_open("/dev/console", O_RDWR, 0) < 0) + if (sys_open((const char __user *) "/dev/console", O_RDWR, 0) < 0) printk("Warning: unable to open an initial console.\n"); (void) sys_dup(0); |
From: <aot...@us...> - 2004-06-16 17:30:57
|
Update of /cvsroot/gc-linux/linux/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/include/linux Modified Files: fb.h Log Message: Merged 2.6.7 Index: fb.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/linux/fb.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fb.h 24 Apr 2004 18:31:45 -0000 1.4 +++ fb.h 16 Jun 2004 17:30:46 -0000 1.5 @@ -516,7 +516,6 @@ struct fb_cmap cmap; /* Current cmap */ struct fb_ops *fbops; char *screen_base; /* Virtual address */ - struct vc_data *display_fg; /* Console visible on this display */ int currcon; /* Current VC. */ void *pseudo_palette; /* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING 0 |
From: <aot...@us...> - 2004-06-16 17:30:56
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/drivers/video Modified Files: Kconfig Makefile fbmem.c Log Message: Merged 2.6.7 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Kconfig,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Kconfig 11 May 2004 17:48:35 -0000 1.6 +++ Kconfig 16 Jun 2004 17:30:44 -0000 1.7 @@ -225,6 +225,10 @@ This is the frame buffer device driver for the Chips & Technologies 65550 graphics chip in PowerBooks. +config FB_ASILIANT + bool "Chips 69000 display support" + depends on FB && PCI + config FB_IMSTT bool "IMS Twin Turbo display support" depends on FB && PCI @@ -308,6 +312,14 @@ As this card technology is 15 years old, most people will answer N here. +config FB_HGA_ACCEL + bool "Hercules mono Acceleration functions (EXPERIMENTAL)" + depends on FB_HGA && EXPERIMENTAL + ---help--- + This will compile the Hercules mono graphics with + acceleration functions. + + config VIDEO_SELECT bool depends on FB && X86 @@ -319,6 +331,21 @@ help SGI Visual Workstation support for framebuffer graphics. +config FB_GBE + bool "SGI Graphics Backend frame buffer support" + depends on FB && (SGI_IP32 || X86_VISWS) + help + This is the frame buffer device driver for SGI Graphics Backend. + This chip is used in SGI O2 and Visual Workstation 320/540. + +config FB_GBE_MEM + int "Video memory size in MB" + depends on FB_GBE + default 8 + help + This is the amount of memory reserved for the framebuffer, + which can be any value between 1MB and 8MB. + config BUS_I2C bool depends on FB && VISWS @@ -743,6 +770,14 @@ To compile this driver as a module, choose M here: the module will be called tdfxfb. +config FB_3DFX_ACCEL + bool "3Dfx Banshee/Voodoo3 Acceleration functions (EXPERIMENTAL)" + depends on FB_3DFX && EXPERIMENTAL + ---help--- + This will compile the 3Dfx Banshee/Voodoo3 frame buffer device + with acceleration functions. + + config FB_VOODOO1 tristate "3Dfx Voodoo Graphics (sst1) support" depends on FB && PCI @@ -772,6 +807,14 @@ To compile this driver as a module, choose M here: the module will be called tridentfb. +config FB_TRIDENT_ACCEL + bool "Trident Acceleration functions (EXPERIMENTAL)" + depends on FB_TRIDENT && EXPERIMENTAL + ---help--- + This will compile the Trident frame buffer device with + acceleration functions. + + config FB_PM3 tristate "Permedia3 support" depends on FB && PCI && BROKEN @@ -781,6 +824,12 @@ similar boards, 3DLabs Permedia3 Create!, Appian Jeronimo 2000 and maybe other boards. +config FB_GAMECUBE + bool "GameCube frame buffer support" + depends on FB && GAMECUBE + help + GameCube frame buffer + config FB_SBUS bool "SBUS and UPA framebuffers" depends on FB && (SPARC32 || SPARC64) @@ -880,11 +929,36 @@ Say Y here if you want to support the built-in frame buffer of the Motorola 68328 CPU family. -config FB_GAMECUBE - bool "GameCube frame buffer support" - depends on FB && (GAMECUBE) - help - GameCube frame buffer +config FB_PXA + tristate "PXA LCD framebuffer support" + depends on FB && ARCH_PXA + ---help--- + Frame buffer driver for the built-in LCD controller in the Intel + PXA2x0 processor. + + This driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called vfb. If you want to compile it as a module, + say M here and read <file:Documentation/modules.txt>. + + If unsure, say N. + +config FB_PXA_PARAMETERS + bool "PXA LCD command line parameters" + default n + depends on FB_PXA + ---help--- + Enable the use of kernel command line or module parameters + to configure the physical properties of the LCD panel when + using the PXA LCD driver. + + This option allows you to override the panel parameters + supplied by the platform in order to support multiple + different models of flatpanel. If you will only be using a + single model of flatpanel then you can safely leave this + option disabled. + + Documentation/fb/pxafb.txt describes the available parameters. config FB_VIRTUAL tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 24 Apr 2004 18:31:44 -0000 1.5 +++ Makefile 16 Jun 2004 17:30:44 -0000 1.6 @@ -20,9 +20,9 @@ obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_Q40) += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_ATARI) += atafb.o -obj-$(CONFIG_FB_68328) += 68328fb.o +obj-$(CONFIG_FB_68328) += 68328fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_RADEON_OLD) += radeonfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o vgastate.o obj-$(CONFIG_FB_IGA) += igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CONTROL) += controlfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PLATINUM) += platinumfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -31,6 +31,7 @@ obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CYBER) += cyberfb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_GBE) += gbefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_SGIVW) += sgivwfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_3DFX) += tdfxfb.o cfbimgblt.o obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -72,6 +73,7 @@ obj-$(CONFIG_FB_PVR2) += pvr2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_KYRO) += kyro/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_ASILIANT) += asiliantfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_FFB) += ffb.o sbuslib.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_CG6) += cg6.o sbuslib.o cfbimgblt.o cfbcopyarea.o @@ -87,5 +89,5 @@ cfbfillrect.o obj-$(CONFIG_FB_LEO) += leo.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ cfbfillrect.o -obj-$(CONFIG_FB_GAMECUBE) += gamecubefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o - +obj-$(CONFIG_FB_PXA) += pxafb.o cfbimgblt.o cfbcopyarea.o cfbfillrect.o +obj-$(CONFIG_FB_GAMECUBE) += gamecubefb.o cfbimgblt.o cfbcopyarea.o cfbfillrect.o Index: fbmem.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/fbmem.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- fbmem.c 11 May 2004 17:48:35 -0000 1.7 +++ fbmem.c 16 Jun 2004 17:30:44 -0000 1.8 @@ -114,6 +114,8 @@ extern int chips_init(void); extern int g364fb_init(void); extern int sa1100fb_init(void); +extern int pxafb_init(void); +extern int pxafb_setup(char*); extern int fm2fb_init(void); extern int fm2fb_setup(char*); extern int q40fb_init(void); @@ -121,6 +123,8 @@ extern int sun3fb_setup(char *); extern int sgivwfb_init(void); extern int sgivwfb_setup(char*); +extern int gbefb_init(void); +extern int gbefb_setup(char*); extern int rivafb_init(void); extern int rivafb_setup(char*); extern int tdfxfb_init(void); @@ -166,6 +170,8 @@ extern int leo_setup(char*); extern int kyrofb_init(void); extern int kyrofb_setup(char*); +extern int mc68x328fb_init(void); +extern int mc68x328fb_setup(char *); extern int gamecubefb_init(void); extern int gamecubefb_setup(char*); @@ -309,6 +315,9 @@ #ifdef CONFIG_FB_SGIVW { "sgivwfb", sgivwfb_init, sgivwfb_setup }, #endif +#ifdef CONFIG_FB_GBE + { "gbefb", gbefb_init, gbefb_setup }, +#endif #ifdef CONFIG_FB_ACORN { "acornfb", acornfb_init, acornfb_setup }, #endif @@ -342,6 +351,9 @@ #ifdef CONFIG_FB_SA1100 { "sa1100fb", sa1100fb_init, NULL }, #endif +#ifdef CONFIG_FB_PXA + { "pxafb", pxafb_init, pxafb_setup }, +#endif #ifdef CONFIG_FB_SUN3 { "sun3fb", sun3fb_init, sun3fb_setup }, #endif @@ -369,12 +381,15 @@ #ifdef CONFIG_FB_VOODOO1 { "sstfb", sstfb_init, sstfb_setup }, #endif -#ifdef CONFIG_FB_GAMECUBE - { "gamecubefb", gamecubefb_init, gamecubefb_setup }, -#endif #ifdef CONFIG_FB_KYRO { "kyrofb", kyrofb_init, kyrofb_setup }, #endif +#ifdef CONFIG_FB_68328 + { "68328fb", mc68x328fb_init, mc68x328fb_setup }, +#endif +#ifdef CONFIG_FB_GAMECUBE + { "gamecubefb", gamecubefb_init, gamecubefb_setup }, +#endif /* * Generic drivers that don't use resource management (yet) @@ -416,12 +431,13 @@ /* * Drawing helpers. */ -u8 sys_inbuf(struct fb_info *info, u8 *src) -{ +static u8 fb_sys_inbuf(struct fb_info *info, u8 *src) +{ return *src; } -void sys_outbuf(struct fb_info *info, u8 *dst, u8 *src, unsigned int size) +static void fb_sys_outbuf(struct fb_info *info, u8 *dst, + u8 *src, unsigned int size) { memcpy(dst, src, size); } @@ -1018,7 +1034,7 @@ struct fb_con2fbmap con2fb; #endif struct fb_cmap cmap; - int i, rc; + int i; if (!fb) return -ENODEV; @@ -1060,9 +1076,9 @@ return 0; case FBIO_CURSOR: acquire_console_sem(); - rc = fb_cursor(info, (struct fb_cursor *) arg); + i = fb_cursor(info, (struct fb_cursor *) arg); release_console_sem(); - return rc; + return i; #ifdef CONFIG_FRAMEBUFFER_CONSOLE case FBIOGET_CON2FBMAP: if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) @@ -1183,8 +1199,7 @@ if (boot_cpu_data.x86 > 3) pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; #elif defined(__mips__) - pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK; - pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED; + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); #elif defined(__hppa__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; #elif defined(__ia64__) || defined(__arm__) || defined(__sh__) @@ -1291,14 +1306,15 @@ fb_info->pixmap.size = FBPIXMAPSIZE; fb_info->pixmap.buf_align = 1; fb_info->pixmap.scan_align = 1; + fb_info->pixmap.access_align = 4; fb_info->pixmap.flags = FB_PIXMAP_DEFAULT; } } fb_info->pixmap.offset = 0; if (fb_info->pixmap.outbuf == NULL) - fb_info->pixmap.outbuf = sys_outbuf; + fb_info->pixmap.outbuf = fb_sys_outbuf; if (fb_info->pixmap.inbuf == NULL) - fb_info->pixmap.inbuf = sys_inbuf; + fb_info->pixmap.inbuf = fb_sys_inbuf; if (fb_info->sprite.addr == NULL) { fb_info->sprite.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); @@ -1306,14 +1322,15 @@ fb_info->sprite.size = FBPIXMAPSIZE; fb_info->sprite.buf_align = 1; fb_info->sprite.scan_align = 1; + fb_info->sprite.access_align = 4; fb_info->sprite.flags = FB_PIXMAP_DEFAULT; } } fb_info->sprite.offset = 0; if (fb_info->sprite.outbuf == NULL) - fb_info->sprite.outbuf = sys_outbuf; + fb_info->sprite.outbuf = fb_sys_outbuf; if (fb_info->sprite.inbuf == NULL) - fb_info->sprite.inbuf = sys_inbuf; + fb_info->sprite.inbuf = fb_sys_inbuf; registered_fb[i] = fb_info; |
From: <aot...@us...> - 2004-06-16 17:30:55
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/drivers/block Modified Files: Kconfig Log Message: Merged 2.6.7 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Kconfig,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Kconfig 8 May 2004 09:51:54 -0000 1.4 +++ Kconfig 16 Jun 2004 17:30:43 -0000 1.5 @@ -339,12 +339,13 @@ thus say N here. config BLK_DEV_RAM_SIZE - int "Default RAM disk size" + int "Default RAM disk size (kbytes)" depends on BLK_DEV_RAM default "4096" help - The default value is 4096. Only change this if you know what are - you doing. If you are using IBM S/390, then set this to 8192. + The default value is 4096 kilobytes. Only change this if you know + what are you doing. If you are using IBM S/390, then set this to + 8192. config BLK_DEV_INITRD bool "Initial RAM disk (initrd) support" |
From: <aot...@us...> - 2004-06-16 17:30:55
|
Update of /cvsroot/gc-linux/linux/include/asm-ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/include/asm-ppc Modified Files: io.h Log Message: Merged 2.6.7 Index: io.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/asm-ppc/io.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- io.h 29 Apr 2004 19:08:07 -0000 1.1 +++ io.h 16 Jun 2004 17:30:45 -0000 1.2 @@ -388,43 +388,5 @@ return 0; } -#ifdef CONFIG_NOT_COHERENT_CACHE - -/* - * DMA-consistent mapping functions for PowerPCs that don't support - * cache snooping. These allocate/free a region of uncached mapped - * memory space for use with DMA devices. Alternatively, you could - * allocate the space "normally" and use the cache management functions - * to ensure it is consistent. - */ -extern void *consistent_alloc(int gfp, size_t size, dma_addr_t *handle); -extern void consistent_free(void *vaddr); -extern void consistent_sync(void *vaddr, size_t size, int rw); -extern void consistent_sync_page(struct page *page, unsigned long offset, - size_t size, int rw); - -#define dma_cache_inv(_start,_size) \ - invalidate_dcache_range(_start, (_start + _size)) -#define dma_cache_wback(_start,_size) \ - clean_dcache_range(_start, (_start + _size)) -#define dma_cache_wback_inv(_start,_size) \ - flush_dcache_range(_start, (_start + _size)) - -#else /* ! CONFIG_NOT_COHERENT_CACHE */ - -/* - * Cache coherent cores. - */ - -#define dma_cache_inv(_start,_size) do { } while (0) -#define dma_cache_wback(_start,_size) do { } while (0) -#define dma_cache_wback_inv(_start,_size) do { } while (0) - -#define consistent_alloc(gfp, size, handle) NULL -#define consistent_free(addr) do { } while (0) -#define consistent_sync(addr, size, rw) do { } while (0) -#define consistent_sync_page(pg, off, sz, rw) do { } while (0) - -#endif /* ! CONFIG_NOT_COHERENT_CACHE */ #endif /* _PPC_IO_H */ #endif /* __KERNEL__ */ |
From: <aot...@us...> - 2004-06-16 17:30:55
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/drivers/net Modified Files: Kconfig Makefile Log Message: Merged 2.6.7 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Kconfig,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Kconfig 11 May 2004 17:48:35 -0000 1.6 +++ Kconfig 16 Jun 2004 17:30:44 -0000 1.7 @@ -1216,6 +1216,39 @@ <file:Documentation/networking/net-modules.txt>. The module will be called ibmveth. +config IBM_EMAC + tristate "IBM PPC4xx EMAC driver support" + depends on 4xx + ---help--- + This driver supports the IBM PPC4xx EMAC family of on-chip + Ethernet controllers. + +config IBM_EMAC_ERRMSG + bool "Verbose error messages" + depends on IBM_EMAC + +config IBM_EMAC_RXB + int "Number of receive buffers" + depends on IBM_EMAC + default "128" if IBM_EMAC4 + default "64" + +config IBM_EMAC_TXB + int "Number of transmit buffers" + depends on IBM_EMAC + default "128" if IBM_EMAC4 + default "8" + +config IBM_EMAC_FGAP + int "Frame gap" + depends on IBM_EMAC + default "8" + +config IBM_EMAC_SKBRES + int "Skb reserve amount" + depends on IBM_EMAC + default "0" + config NET_PCI bool "EISA, VLB, PCI and on board controllers" depends on NET_ETHERNET && (ISA || EISA || PCI) @@ -1834,6 +1867,13 @@ Say Y here if you want to use the built-in 10/100 Fast ethernet controller on the Motorola ColdFire 5272 processor. +config NE_H8300 + tristate "NE2000 compatible support for H8/300" + depends on H8300 && NET_ETHERNET + help + Say Y here if you want to use the NE2000 compatible + controller on the Renesas H8/300 processor. + endmenu # @@ -2486,16 +2526,6 @@ To compile this driver as a module, choose M here: the module will be called iph5526. -config RCPCI - tristate "Red Creek Hardware VPN (EXPERIMENTAL)" - depends on NETDEVICES && EXPERIMENTAL && PCI && !64BIT - help - This is a driver for hardware which provides a Virtual Private - Network (VPN). Say Y if you have it. - - To compile this driver as a module, choose M here: the module - will be called rcpci. - config SHAPER tristate "Traffic Shaper (EXPERIMENTAL)" depends on NETDEVICES && EXPERIMENTAL Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 11 May 2004 17:48:35 -0000 1.6 +++ Makefile 16 Jun 2004 17:30:44 -0000 1.7 @@ -2,13 +2,12 @@ # Makefile for the Linux network (ethercard) device drivers. # -rcpci-objs := rcpci45.o rclanmtl.o - ifeq ($(CONFIG_ISDN_PPP),y) obj-$(CONFIG_ISDN) += slhc.o endif obj-$(CONFIG_E1000) += e1000/ +obj-$(CONFIG_IBM_EMAC) += ibm_emac/ obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_BONDING) += bonding/ @@ -32,7 +31,6 @@ obj-$(CONFIG_OAKNET) += oaknet.o 8390.o obj-$(CONFIG_DGRS) += dgrs.o -obj-$(CONFIG_RCPCI) += rcpci.o obj-$(CONFIG_VORTEX) += 3c59x.o obj-$(CONFIG_TYPHOON) += typhoon.o obj-$(CONFIG_NE2K_PCI) += ne2k-pci.o 8390.o @@ -95,6 +93,7 @@ obj-$(CONFIG_NET_SB1250_MAC) += sb1250-mac.o obj-$(CONFIG_B44) += b44.o obj-$(CONFIG_FORCEDETH) += forcedeth.o +obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o obj-$(CONFIG_PPP) += ppp_generic.o slhc.o obj-$(CONFIG_PPP_ASYNC) += ppp_async.o |
From: <aot...@us...> - 2004-06-16 17:30:54
|
Update of /cvsroot/gc-linux/linux/arch/ppc/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31080/arch/ppc/kernel Modified Files: cputable.c Log Message: Merged 2.6.7 Index: cputable.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/kernel/cputable.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- cputable.c 21 May 2004 20:21:55 -0000 1.1 +++ cputable.c 16 Jun 2004 17:30:43 -0000 1.2 @@ -218,7 +218,15 @@ 32, 32, __setup_cpu_750fx }, - + { /* 750GX */ + 0xffff0000, 0x70020000, "750GX", + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP | + CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS, + COMMON_PPC, + 32, 32, + __setup_cpu_750fx + }, { /* 740/750 (L2CR bit need fixup for 740) */ 0xffff0000, 0x00080000, "740/750", CPU_FTR_COMMON | @@ -351,6 +359,14 @@ 32, 32, __setup_cpu_603 }, + { /* 8280 is a G2_LE (603e core, plus some) */ + 0x7fff0000, 0x00820000, "8280", + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, + COMMON_PPC, + 32, 32, + __setup_cpu_603 + }, { /* default match, we assume split I/D cache & TB (non-601)... */ 0x00000000, 0x00000000, "(generic PPC)", CPU_FTR_COMMON | @@ -546,8 +562,8 @@ 32, 32, 0, /*__setup_cpu_440 */ }, - { /* 440GX Rev. B1 (2.1) */ - 0xf0000fff, 0x50000852, "440GX Rev. B1 (2.1)", + { /* 440GX Rev. C */ + 0xf0000fff, 0x50000892, "440GX Rev. C", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, |
From: <aot...@us...> - 2004-06-16 15:32:45
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8670/arch/ppc/platforms Modified Files: gc-dvdcover.c Log Message: - Don't re-enable an IRQ we didn't disable in the first place; from dmesg: "enable_irq(2) unbalanced" - Whitespace fixups. Index: gc-dvdcover.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gc-dvdcover.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gc-dvdcover.c 3 Jun 2004 15:19:44 -0000 1.3 +++ gc-dvdcover.c 16 Jun 2004 15:32:36 -0000 1.4 @@ -30,7 +30,6 @@ #include <linux/interrupt.h> #include <asm/io.h> -#include <asm/irq.h> #define DVD_IRQ 2 @@ -60,28 +59,27 @@ static int gc_dvdcover_init(void) { - unsigned long outval; + unsigned long outval; + int err; - /* clear pending DI interrupts and mask new ones */ - /* this prevents an annoying bug while we lack a complete DVD driver */ - outval = GC_DI_DISR_BRKINT | GC_DI_DISR_TCINT | - GC_DI_DISR_DEINT; - outval &= ~(GC_DI_DISR_BRKINTMASK | GC_DI_DISR_TCINTMASK | - GC_DI_DISR_DEINTMASK); - writel(outval, GC_DI_DISR); + /* clear pending DI interrupts and mask new ones */ + /* this prevents an annoying bug while we lack a complete DVD driver */ + outval = GC_DI_DISR_BRKINT | GC_DI_DISR_TCINT | GC_DI_DISR_DEINT; + outval &= ~(GC_DI_DISR_BRKINTMASK | GC_DI_DISR_TCINTMASK | + GC_DI_DISR_DEINTMASK); + writel(outval, GC_DI_DISR); + + err = request_irq(DVD_IRQ, gc_dvdcover_handler, 0, "GameCube DVD Cover", 0); + if (err) + return err; + + writel(readl(GAMECUBE_DICVR) | 2, GAMECUBE_DICVR); - if (request_irq(DVD_IRQ, gc_dvdcover_handler, 0, "GameCube DVD Cover", 0) < 0) { - printk(KERN_ERR "gc_dvdcover: Request irq%d failed\n", DVD_IRQ); - } else { - enable_irq(DVD_IRQ); - writel(readl(GAMECUBE_DICVR) | 2, GAMECUBE_DICVR); - } return 0; } static void gc_dvdcover_exit(void) { - disable_irq(DVD_IRQ); free_irq(DVD_IRQ, 0); } |
From: <aot...@us...> - 2004-06-16 15:17:25
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27172/arch/ppc/platforms Modified Files: gc-rsw.c Log Message: Don't re-enable an IRQ we didn't disable in the first place; from dmesg: "enable_irq(1) unbalanced" Index: gc-rsw.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gc-rsw.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gc-rsw.c 30 Jan 2004 14:13:16 -0000 1.5 +++ gc-rsw.c 16 Jun 2004 15:17:16 -0000 1.6 @@ -40,17 +40,17 @@ static int gc_rsw_init(void) { - if (request_irq(RSW_IRQ, gc_rsw_handler, 0, "GameCube Reset Switch", 0) < 0) { + int err; + + err = request_irq(RSW_IRQ, gc_rsw_handler, 0, "GameCube Reset Switch", 0); + if (err) printk(KERN_ERR "gc_rsw: Request irq%d failed\n", RSW_IRQ); - } else { - enable_irq(RSW_IRQ); - } - return 0; + + return err; } static void gc_rsw_exit(void) { - disable_irq(RSW_IRQ); free_irq(RSW_IRQ, 0); } |
From: <aot...@us...> - 2004-06-03 15:19:54
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24852/arch/ppc/platforms Modified Files: gamecube.h gc-dvdcover.c Log Message: - Kill remnants of GAMECUBE_(IN|OUT)() for (read|write)l() - Move gcdvd-specific #define's out of gamecube.h to where they belong. TODO: This has been pretty ugly for a while now. Rolling it up into a proper driver would be nice. Index: gamecube.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gamecube.h 3 Jun 2004 13:52:03 -0000 1.7 +++ gamecube.h 3 Jun 2004 15:19:44 -0000 1.8 @@ -30,20 +30,4 @@ */ #define GAMECUBE_RESET 0xCC003024 -/* - * Until a driver for gcdvd exists, these may seek refuge here. - */ -#define GAMECUBE_DICVR 0xcc006004 /* DI Cover Register */ -#define GC_DI_DISR 0xcc006000 /* DI Status Register */ -#define GC_DI_DISR_BRKINT (1<<6) -#define GC_DI_DISR_BRKINTMASK (1<<5) -#define GC_DI_DISR_TCINT (1<<4) -#define GC_DI_DISR_TCINTMASK (1<<3) -#define GC_DI_DISR_DEINT (1<<2) -#define GC_DI_DISR_DEINTMASK (1<<1) -#define GC_DI_DISR_BRK (1<<0) - -#define GAMECUBE_IN(a) (*(volatile unsigned long *)a) -#define GAMECUBE_OUT(a,d) (*(volatile unsigned long *)a = d) - #endif /* !__MACH_GAMECUBE_H */ Index: gc-dvdcover.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gc-dvdcover.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gc-dvdcover.c 8 Mar 2004 23:19:06 -0000 1.2 +++ gc-dvdcover.c 3 Jun 2004 15:19:44 -0000 1.3 @@ -24,34 +24,40 @@ * sometimes during kernel init. */ +#include <linux/init.h> #include <linux/kernel.h> -#include <linux/ioport.h> #include <linux/module.h> -#include <linux/delay.h> -#include <linux/slab.h> -#include <linux/init.h> #include <linux/interrupt.h> -#include <linux/wait.h> +#include <asm/io.h> #include <asm/irq.h> -#include "gamecube.h" -#define DVD_IRQ 2 +#define DVD_IRQ 2 + +#define GAMECUBE_DICVR 0xcc006004 /* DI Cover Register */ +#define GC_DI_DISR 0xcc006000 /* DI Status Register */ +#define GC_DI_DISR_BRKINT (1<<6) +#define GC_DI_DISR_BRKINTMASK (1<<5) +#define GC_DI_DISR_TCINT (1<<4) +#define GC_DI_DISR_TCINTMASK (1<<3) +#define GC_DI_DISR_DEINT (1<<2) +#define GC_DI_DISR_DEINTMASK (1<<1) +#define GC_DI_DISR_BRK (1<<0) + static irqreturn_t gc_dvdcover_handler(int this_irq, void *dev_id, struct pt_regs *regs) { - unsigned long reason = GAMECUBE_IN(GAMECUBE_DICVR); + unsigned long reason = readl(GAMECUBE_DICVR); // really a DVD cover interrupt? if (reason & 4) { - GAMECUBE_OUT(GAMECUBE_DICVR, reason | 4); - printk(KERN_ERR "gc_dvdcover: DVD cover was closed\n"); + writel(reason | 4, GAMECUBE_DICVR); + printk(KERN_INFO "gc_dvdcover: DVD cover was closed\n"); return IRQ_HANDLED; } return IRQ_NONE; } - static int gc_dvdcover_init(void) { unsigned long outval; @@ -62,13 +68,13 @@ GC_DI_DISR_DEINT; outval &= ~(GC_DI_DISR_BRKINTMASK | GC_DI_DISR_TCINTMASK | GC_DI_DISR_DEINTMASK); - GAMECUBE_OUT(GC_DI_DISR, outval); - + writel(outval, GC_DI_DISR); + if (request_irq(DVD_IRQ, gc_dvdcover_handler, 0, "GameCube DVD Cover", 0) < 0) { printk(KERN_ERR "gc_dvdcover: Request irq%d failed\n", DVD_IRQ); } else { enable_irq(DVD_IRQ); - GAMECUBE_OUT(GAMECUBE_DICVR, GAMECUBE_IN(GAMECUBE_DICVR) | 2); + writel(readl(GAMECUBE_DICVR) | 2, GAMECUBE_DICVR); } return 0; } |
From: <aot...@us...> - 2004-06-03 13:52:12
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4552/arch/ppc/platforms Modified Files: Makefile gamecube.c gamecube.h Removed Files: gamecube_pic.c Log Message: Move interrupt code back into arch/ppc/platforms/gamecube.c: - s/GAMECUBE_PIIC/FLIPPER_ICR/g - s/GAMECUBE_PIIM/FLIPPER_IMR/g - s/GAMECUBE_IRQS//g - Rename gekko_pic to flipper_pic - Rename gekko_*_irq() to flipper_*_irq() - Consolidate documentation into arch/ppc/platforms/gamecube.h Delete file arch/ppc/platforms/gamecube_pic.c Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile 11 May 2004 17:48:35 -0000 1.9 +++ Makefile 3 Jun 2004 13:52:03 -0000 1.10 @@ -46,7 +46,7 @@ obj-$(CONFIG_PRPMC800) += prpmc800.o obj-$(CONFIG_SANDPOINT) += sandpoint.o obj-$(CONFIG_SPRUCE) += spruce.o -obj-$(CONFIG_GAMECUBE) += gamecube.o gamecube_pic.o gamecube_time.o +obj-$(CONFIG_GAMECUBE) += gamecube.o gamecube_time.o obj-$(CONFIG_GAMECUBE_CONSOLE) += console.o obj-$(CONFIG_GAMECUBE_RESET_SWITCH) += gc-rsw.o obj-$(CONFIG_GAMECUBE_DVD_COVER) += gc-dvdcover.o Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- gamecube.c 24 May 2004 00:22:54 -0000 1.17 +++ gamecube.c 3 Jun 2004 13:52:03 -0000 1.18 @@ -5,29 +5,23 @@ #include <linux/init.h> #include <linux/config.h> #include <linux/console.h> +#include <linux/irq.h> #include <linux/initrd.h> #include <linux/seq_file.h> -#include <asm/machdep.h> -#include <asm/bootinfo.h> -#include <asm/time.h> #include <asm/io.h> +#include <asm/time.h> +#include <asm/bitops.h> +#include <asm/bootinfo.h> +#include <asm/machdep.h> #include "console.h" #include "gamecube.h" -extern void gamecube_init_IRQ(void); -extern int gamecube_get_irq(struct pt_regs *regs); - -extern long __init -gamecube_time_init(void); - -extern unsigned long -gamecube_get_rtc_time(void); - -extern int -gamecube_set_rtc_time(unsigned long nowtime); +extern long gamecube_time_init(void) __init; +extern unsigned long gamecube_get_rtc_time(void); +extern int gamecube_set_rtc_time(unsigned long nowtime); unsigned long gamecube_find_end_of_memory(void) { @@ -71,6 +65,62 @@ } static int +gamecube_get_irq(struct pt_regs *regs) +{ + int irq; + u_int irq_status, irq_test = 1; + + irq_status = readl(FLIPPER_ICR) & readl(FLIPPER_IMR); + if (irq_status == 0) + return -1; /* no more IRQs pending */ + + for (irq = 0; irq < 14; irq++, irq_test <<= 1) + if (irq_status & irq_test) + break; + + return irq; +} + +static void +flipper_mask_and_ack_irq(unsigned int irq) +{ + clear_bit(irq, FLIPPER_IMR); + set_bit(irq, FLIPPER_ICR); +} + +static void +flipper_mask_irq(unsigned int irq) +{ + clear_bit(irq, FLIPPER_IMR); +} + +static void +flipper_unmask_irq(unsigned int irq) +{ + set_bit(irq, FLIPPER_IMR); +} + +static struct hw_interrupt_type flipper_pic = { + .typename = " FLIPPER-PIC ", + .enable = flipper_unmask_irq, + .disable = flipper_mask_irq, + .ack = flipper_mask_and_ack_irq, +}; + +static void __init +gamecube_init_IRQ(void) +{ + int i; + + /* mask and ack all IRQs */ + writel(0x00000000, FLIPPER_IMR); + writel(0xffffffff, FLIPPER_ICR); + + for (i = 0; i < 14; i++) + irq_desc[i].handler = &flipper_pic; +} + +static int gamecube_show_cpuinfo(struct seq_file *m) { seq_printf(m, "vendor\t\t: IBM\n"); Index: gamecube.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- gamecube.h 1 May 2004 23:14:38 -0000 1.6 +++ gamecube.h 3 Jun 2004 13:52:03 -0000 1.7 @@ -15,12 +15,15 @@ #include <asm/ppcboot.h> /* - * We have a total of 14 IRQs. Each has a corresponding bit in both - * the Interrupt Cause (PIIC) and Interrupt Mask (PIIM) registers. + * There are 14 IRQs in total. Each has a corresponding bit in both + * the Interrupt Cause (ICR) and Interrupt Mask (IMR) registers. + * + * Enabling/disabling an interrupt line involves asserting/clearing + * the corresponding bit in IMR. ACK'ing a request simply involves + * asserting the corresponding bit in ICR. */ -#define GAMECUBE_IRQS 14 -#define GAMECUBE_PIIC ((volatile ulong *)0xCC003000) -#define GAMECUBE_PIIM ((volatile ulong *)0xCC003004) +#define FLIPPER_ICR ((volatile ulong *)0xcc003000) +#define FLIPPER_IMR ((volatile ulong *)0xcc003004) /* * Anything written here automagically puts us through reset. --- gamecube_pic.c DELETED --- |