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-08-08 23:20:06
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8277 Modified Files: gamecubefb.c Log Message: - Lindented source. - We now try to free resources if something goes wrong. - Changed the RGB to YCbYCr conversion code to make it more clear, specially because of the integer arithmetic tricks. - Implemented a faster output to screen without memory penalties. - Switched from RGB555 16bpp to RGB565 16bpp. This makes the console text white again, although not pure white because we still lack correct scaling for 5/6 bits to 8 bits r g b components. Index: gamecubefb.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/gamecubefb.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gamecubefb.c 5 Feb 2004 13:45:17 -0000 1.8 +++ gamecubefb.c 8 Aug 2004 23:19:57 -0000 1.9 @@ -20,42 +20,45 @@ #include <linux/init.h> #include <asm/io.h> -/* --------------------------------------------------------------------- */ -volatile static unsigned int *gamecube_video = (unsigned int*) 0xCC002000; +volatile static unsigned int *gamecube_video = (unsigned int *)0xCC002000; + static const unsigned int VIDEO_Mode640X480NtscYUV16[32] = { -0x0F060001, 0x476901AD, 0x02EA5140, 0x00030018, -0x00020019, 0x410C410C, 0x40ED40ED, 0x00435A4E, -0x00000000, 0x00435A4E, 0x00000000, 0x00000000, -0x110701AE, 0x10010001, 0x00010001, 0x00010001, -0x00000000, 0x00000000, 0x28500100, 0x1AE771F0, -0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF, -0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000, -0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF}; + 0x0F060001, 0x476901AD, 0x02EA5140, 0x00030018, + 0x00020019, 0x410C410C, 0x40ED40ED, 0x00435A4E, + 0x00000000, 0x00435A4E, 0x00000000, 0x00000000, + 0x110701AE, 0x10010001, 0x00010001, 0x00010001, + 0x00000000, 0x00000000, 0x28500100, 0x1AE771F0, + 0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF, + 0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000, + 0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF +}; + static const unsigned int VIDEO_Mode640X480Pal50YUV16[32] = { -0x11F50101, 0x4B6A01B0, 0x02F85640, 0x00010023, -0x00000024, 0x4D2B4D6D, 0x4D8A4D4C, 0x00435A4E, -0x00000000, 0x00435A4E, 0x00000000, 0x013C0144, -0x113901B1, 0x10010001, 0x00010001, 0x00010001, -0x00000000, 0x00000000, 0x28500100, 0x1AE771F0, -0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF, -0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000, -0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF}; + 0x11F50101, 0x4B6A01B0, 0x02F85640, 0x00010023, + 0x00000024, 0x4D2B4D6D, 0x4D8A4D4C, 0x00435A4E, + 0x00000000, 0x00435A4E, 0x00000000, 0x013C0144, + 0x113901B1, 0x10010001, 0x00010001, 0x00010001, + 0x00000000, 0x00000000, 0x28500100, 0x1AE771F0, + 0x0DB4A574, 0x00C1188E, 0xC4C0CBE2, 0xFCECDECF, + 0x13130F08, 0x00080C0F, 0x00FF0000, 0x00000000, + 0x02800000, 0x000000FF, 0x00FF00FF, 0x00FF00FF +}; -static struct fb_var_screeninfo gamecubefb_defined __initdata = { - .activate = FB_ACTIVATE_NOW, - .height = -1, - .width = -1, - .right_margin = 32, - .upper_margin = 16, - .lower_margin = 4, - .vsync_len = 4, - .vmode = FB_VMODE_NONINTERLACED, +static struct fb_var_screeninfo gcfb_defined __initdata = { + .activate = FB_ACTIVATE_NOW, + .height = -1, + .width = -1, + .right_margin = 32, + .upper_margin = 16, + .lower_margin = 4, + .vsync_len = 4, + .vmode = FB_VMODE_NONINTERLACED, }; -static struct fb_fix_screeninfo gamecubefb_fix __initdata = { - .id = "GameCube", - .type = FB_TYPE_PACKED_PIXELS, - .accel = FB_ACCEL_NONE, +static struct fb_fix_screeninfo gcfb_fix __initdata = { + .id = "GameCube", + .type = FB_TYPE_PACKED_PIXELS, + .accel = FB_ACCEL_NONE, }; #define TV_ENC_DETECT 0 @@ -63,155 +66,113 @@ #define TV_ENC_PAL 2 static int tv_encoding __initdata = TV_ENC_DETECT; -static struct fb_info fb_info; +static struct fb_info gcfb_info; static u32 pseudo_palette[17]; -static int ypan = 0; /* 0..nothing, 1..ypan, 2..ywrap */ -static unsigned short *pmi_base = 0; -static void (*pmi_start)(void); -static void (*pmi_pal)(void); - - -/* --------------------------------------------------------------------- */ -// This is Costis' RGB to YCbYCr conversion code. This looks like a bad -// hack, because we make the original cfbimgblit.c encode RGB 5:5:5 pixel -// data and convert it into YCbYCr on every write of an int into the -// framebuffer. But this is also quite good implementation, because YCbYCr -// means that two pixels are always encoded together and, while each one -// has its own luminance, they share the chrominance, so a putpixel() is -// not possible, and just hooking into settwopixels() solves all problems. -// -// What doesn't work correctly right now, is setting a single pixel, because -// the cfbimgblit.c code reads two pixels, assumes that it is RGB, changes -// one pixel, and we'll convert it into YCbYCr. This breaks the encoding. -// So we need to implement a 32 bit read from the framebuffer as well and -// return RGB encoded data. -#define CLAMP(x,l,h) ((x > h) ? h : ((x < l) ? l : x)) - -// 16:16 fixed point... hopefully not much accuracy is lost! -#define Ya 16843 // 0.257 -#define Yb 33030 // 0.504 -#define Yc 6423 // 0.098 -#define Yd 1048576 // 16.0 -#define Ye 32768 // 0.5 +static int ypan = 0; /* 0..nothing, 1..ypan, 2..ywrap */ -#define Cba -9699 // 0.148 -#define Cbb -19071 // 0.291 -#define Cbc 28770 // 0.439 -#define Cbd 8388608 // 128.0 -#define Cbe 32768 // 0.5 +/* + * RGB to YCbYCr conversion support bits. + * We are using here the ITU.BT-601 Y'CbCr standard. + * + * References: + * - "Colour Space Conversions" by Adrian Ford and Alan Roberts, 1998 + * (google for coloureq.pdf) + * + */ -#define Cra 28770 // 0.439 -#define Crb -24117 // 0.368 -#define Crc -4653 // 0.071 -#define Crd 8388608 // 128.0 -#define Cre 32768 // 0.5 +#define RGB2YUV_SHIFT 16 +#define RGB2YUV_LUMA 16 +#define RGB2YUV_CHROMA 128 -#if 0 -unsigned long GC_Video_RGBToYCbCrFixed (unsigned char r, unsigned char g, unsigned char b) -{ - unsigned long Y, Cb, Cr; +#define Yr ((int)( 0.299*(1<<RGB2YUV_SHIFT))) +#define Yg ((int)( 0.587*(1<<RGB2YUV_SHIFT))) +#define Yb ((int)( 0.114*(1<<RGB2YUV_SHIFT))) - Y = ((Ya * r) + (Yb * g) + (Yc * b) + Yd + Ye) >> 16; - Cb = ((Cba * r) + (Cbb * g) + (Cbc * b) + Cbd + Cre) >> 16; - Cr = ((Cra * r) + (Crb * g) + (Crc * b) + Crd + Cre) >> 16; +#define Ur ((int)(-0.169*(1<<RGB2YUV_SHIFT))) +#define Ug ((int)(-0.331*(1<<RGB2YUV_SHIFT))) +#define Ub ((int)( 0.500*(1<<RGB2YUV_SHIFT))) - // clamping isnt really needed - Y = CLAMP(Y , 16, 235); - Cb = CLAMP(Cb, 16, 240); - Cr = CLAMP(Cr, 16, 240); +#define Vr ((int)( 0.500*(1<<RGB2YUV_SHIFT))) /* same as Ub */ +#define Vg ((int)(-0.419*(1<<RGB2YUV_SHIFT))) +#define Vb ((int)(-0.081*(1<<RGB2YUV_SHIFT))) - return (unsigned long)(((unsigned char)Y << 24) | ((unsigned char)Cb << 16) | ((unsigned char)Y << 8) | (unsigned char)Cr); -} +#define clamp(x, y, z) ((z < x) ? x : ((z > y) ? y : z)) -void gamecubefb_writel(unsigned long color, int *address) +static inline uint32_t rgbrgb16toycbycr(uint16_t rgb1, uint16_t rgb2) { - unsigned char r, g, b; - unsigned long pa, pb; - - r = ((color >> 27) & 31) << 3; - g = ((color >> 22) & 31) << 3; - b = ((color >> 17) & 31) << 3; + register int Y1, Cb, Y2, Cr; + register int r1, g1, b1; + register int r2, g2, b2; + register int r, g, b; - pa = GC_Video_RGBToYCbCrFixed (r, g, b); + /* fast path, thanks to bohdy */ + if (!(rgb1 | rgb2)) { + return 0x00800080; /* black, black */ + } - r = ((color >> 11) & 31) << 3; - g = ((color >> 6) & 31) << 3; - b = ((color >> 1) & 31) << 3; + /* + * FIXME: + * The current scaling from 5 or 6 bits to 8 bits is not correct. + */ - pb = GC_Video_RGBToYCbCrFixed (r, g, b); + /* RGB565 */ + r1 = ((rgb1 >> 11) & 0x1f) << 3; + g1 = ((rgb1 >> 5) & 0x3f) << 2; + b1 = ((rgb1 >> 0) & 0x1f) << 3; - fb_writel_real((pa & 0xFF000000) | (pb & 0x0000FF00) | - ((((pa & 0x00FF0000) + (pb & 0x00FF0000)) >> 1) & 0x00FF0000) | - ((((pa & 0x000000FF) + (pb & 0x000000FF)) >> 1) & 0x000000FF), address); + Y1 = clamp(16, 235, ((Yr * r1 + Yg * g1 + Yb * b1) >> RGB2YUV_SHIFT) + + RGB2YUV_LUMA); + if (rgb1 == rgb2) { + /* this is just another fast path */ + Y2 = Y1; + r = r1; + g = g1; + b = b1; + } else { + /* RGB565 */ + r2 = ((rgb2 >> 11) & 0x1f) << 3; + g2 = ((rgb2 >> 5) & 0x3f) << 2; + b2 = ((rgb2 >> 0) & 0x1f) << 3; - //fb_writel_real((pa & 0xFF000000) | (pb & 0x0000FF00) | - // (((pa & 0x00FF0000) + (pb & 0x00FF0000)) >> 1) | - // (((pa & 0x000000FF) + (pb & 0x000000FF)) >> 1), address); -} -#endif + Y2 = clamp(16, 235, + ((Yr * r2 + Yg * g2 + Yb * b2) >> RGB2YUV_SHIFT) + + RGB2YUV_LUMA); -/* + r = (r1 + r2) / 2; + g = (g1 + g2) / 2; + b = (b1 + b2) / 2; + } - this one is a bit cleaner ... still some potential for optimizations left + Cb = clamp(16, 240, ((Ur * r + Ug * g + Ub * b) >> RGB2YUV_SHIFT) + + RGB2YUV_CHROMA); + Cr = clamp(16, 240, ((Vr * r + Vg * g + Vb * b) >> RGB2YUV_SHIFT) + + RGB2YUV_CHROMA); -*/ + return (((uint8_t) Y1) << 24) | (((uint8_t) Cb) << 16) | + (((uint8_t) Y2) << 8) | (((uint8_t) Cr) << 0); +} -void gamecubefb_writel(register unsigned long color, register int *address) +void gamecubefb_writel(register unsigned long rgbrgb, register int *address) { - register unsigned char r1, g1, b1; - register unsigned char r2, g2, b2; - register unsigned char r, g, b; - register unsigned char Y1, Cb, Y2, Cr; - - // mmh...arent we are loosing a bit much precision here? maybe - // a 5:6:5 format would be better ? - r1 = ((color >> 27) & 31) << 3; - g1 = ((color >> 22) & 31) << 3; - b1 = ((color >> 17) & 31) << 3; - - r2 = ((color >> 11) & 31) << 3; - g2 = ((color >> 6) & 31) << 3; - b2 = ((color >> 1) & 31) << 3; - - r=(((int)r1)+((int)r2))>>1; - g=(((int)g1)+((int)g2))>>1; - b=(((int)b1)+((int)b2))>>1; - - Y1 = (((Ya * r1) + (Yb * g1) + (Yc * b1) + Yd + Ye) >> 16); - Y2 = (((Ya * r2) + (Yb * g2) + (Yc * b2) + Yd + Ye) >> 16); - - Cb = (((Cba * r) + (Cbb * g) + (Cbc * b) + Cbd + Cre) >> 16); - Cr = (((Cra * r) + (Crb * g) + (Crc * b) + Crd + Cre) >> 16); - - // clamping isnt really needed, so we omit it... previous calculations - // should be adjusted so we dont get out-of-gamut values -/* - Y1 = CLAMP(Y , 16, 235); - Y2 = CLAMP(Y , 16, 235); - Cb = CLAMP(Cb, 16, 240); - Cr = CLAMP(Cr, 16, 240); -*/ - fb_writel_real(((((int)Y1)<<24)|(((int)Cb)<<16)|(((int)Y2)<<8)|(((int)Cr)<<0)),address); - + uint16_t *rgb = (uint16_t *) & rgbrgb; + fb_writel_real(rgbrgb16toycbycr(rgb[0], rgb[1]), address); } - -/* --------------------------------------------------------------------- */ - static int gamecubefb_pan_display(struct fb_var_screeninfo *var, - struct fb_info *info) + struct fb_info *info) { return 0; } -static void vesa_setpalette(int regno, unsigned red, unsigned green, unsigned blue) +static void vesa_setpalette(int regno, unsigned red, unsigned green, + unsigned blue) { } static int gamecubefb_setcolreg(unsigned regno, unsigned red, unsigned green, - unsigned blue, unsigned transp, - struct fb_info *info) + unsigned blue, unsigned transp, + struct fb_info *info) { /* * Set a single color register. The values supplied are @@ -225,67 +186,46 @@ switch (info->var.bits_per_pixel) { case 8: - vesa_setpalette(regno,red,green,blue); + vesa_setpalette(regno, red, green, blue); break; + case 15: case 16: if (info->var.red.offset == 10) { + /* XXX, not used currently */ /* 1:5:5:5 */ - ((u32*) (info->pseudo_palette))[regno] = - ((red & 0xf800) >> 1) | - ((green & 0xf800) >> 6) | - ((blue & 0xf800) >> 11); + ((u32 *) (info->pseudo_palette))[regno] = + ((red & 0xf800) >> 1) | + ((green & 0xf800) >> 6) | ((blue & 0xf800) >> 11); } else { /* 0:5:6:5 */ - ((u32*) (info->pseudo_palette))[regno] = - ((red & 0xf800) ) | - ((green & 0xfc00) >> 5) | - ((blue & 0xf800) >> 11); + ((u32 *) (info->pseudo_palette))[regno] = + ((red & 0xf800)) | + ((green & 0xfc00) >> 5) | ((blue & 0xf800) >> 11); } break; case 24: - red >>= 8; - green >>= 8; - blue >>= 8; - ((u32 *)(info->pseudo_palette))[regno] = - (red << info->var.red.offset) | - (green << info->var.green.offset) | - (blue << info->var.blue.offset); - break; case 32: - red >>= 8; + /* XXX, not used currently */ + red >>= 8; green >>= 8; - blue >>= 8; - ((u32 *)(info->pseudo_palette))[regno] = - (red << info->var.red.offset) | - (green << info->var.green.offset) | - (blue << info->var.blue.offset); + blue >>= 8; + ((u32 *) (info->pseudo_palette))[regno] = + (red << info->var.red.offset) | + (green << info->var.green.offset) | + (blue << info->var.blue.offset); break; - } - return 0; -} - -void gc_blit() { - printk("BLIT\n\n\n"); + } + return 0; } static struct fb_ops gamecubefb_ops = { - .owner = THIS_MODULE, -#if 0 - .fb_setcolreg = gc_blit, - .fb_pan_display = gc_blit, - .fb_fillrect = gc_blit, - .fb_copyarea = gc_blit, - .fb_imageblit = gc_blit, - .fb_cursor = gc_blit, -#endif -#if 1 - .fb_setcolreg = gamecubefb_setcolreg, - .fb_pan_display = gamecubefb_pan_display, - .fb_fillrect = cfb_fillrect, - .fb_copyarea = cfb_copyarea, - .fb_imageblit = cfb_imageblit, - .fb_cursor = soft_cursor, -#endif + .owner = THIS_MODULE, + .fb_setcolreg = gamecubefb_setcolreg, + .fb_pan_display = gamecubefb_pan_display, + .fb_fillrect = cfb_fillrect, + .fb_copyarea = cfb_copyarea, + .fb_imageblit = cfb_imageblit, + .fb_cursor = soft_cursor, }; int __init gamecubefb_setup(char *options) @@ -297,21 +237,22 @@ return 0; while ((this_opt = strsep(&options, ",")) != NULL) { - printk("this_opt = %s\n", this_opt); - if (!*this_opt) continue; + printk("this_opt = %s\n", this_opt); + if (!*this_opt) + continue; - if (! strcmp(this_opt, "redraw")) - ypan=0; - else if (! strcmp(this_opt, "ypan")) - ypan=1; - else if (! strcmp(this_opt, "ywrap")) - ypan=2; + if (!strcmp(this_opt, "redraw")) + ypan = 0; + else if (!strcmp(this_opt, "ypan")) + ypan = 1; + else if (!strcmp(this_opt, "ywrap")) + ypan = 2; else if (!strncmp(this_opt, "tv=", 3)) { - printk("detected \"tv=\"\n"); - printk("cmd line: %s\n", this_opt); - if(!strncmp(this_opt + 3, "PAL", 3)) + printk("detected \"tv=\"\n"); + printk("cmd line: %s\n", this_opt); + if (!strncmp(this_opt + 3, "PAL", 3)) tv_encoding = TV_ENC_PAL; - else if(!strncmp(this_opt + 3, "NTSC", 4)) + else if (!strncmp(this_opt + 3, "NTSC", 4)) tv_encoding = TV_ENC_NTSC; } } @@ -322,108 +263,155 @@ { int video_cmap_len; int i; + int err = 0; // detect current video mode if (tv_encoding == TV_ENC_DETECT) { tv_encoding = ((gamecube_video[0] >> 8) & 3) + 1; } - gamecubefb_defined.bits_per_pixel = 16; - gamecubefb_defined.xres = 640; - gamecubefb_defined.yres = (tv_encoding == TV_ENC_NTSC) ? 480 : 576; - gamecubefb_fix.line_length = gamecubefb_defined.xres * (gamecubefb_defined.bits_per_pixel/8); - gamecubefb_fix.smem_len = gamecubefb_fix.line_length * gamecubefb_defined.yres; - gamecubefb_fix.smem_start = (24*1024*1024)-gamecubefb_fix.smem_len; /* end of RAM */ - gamecubefb_fix.visual = (gamecubefb_defined.bits_per_pixel == 8) ? - FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; + gcfb_defined.bits_per_pixel = 16; + gcfb_defined.xres = 640; + gcfb_defined.yres = (tv_encoding == TV_ENC_NTSC) ? 480 : 576; - if (!request_mem_region(gamecubefb_fix.smem_start, gamecubefb_fix.smem_len, "gamecubefb")) { + gcfb_fix.line_length = + gcfb_defined.xres * (gcfb_defined.bits_per_pixel / 8); + gcfb_fix.smem_len = gcfb_fix.line_length * gcfb_defined.yres; + /* place XFB at end of RAM */ + gcfb_fix.smem_start = (24 * 1024 * 1024) - gcfb_fix.smem_len; + + gcfb_fix.visual = (gcfb_defined.bits_per_pixel == 8) ? + FB_VISUAL_PSEUDOCOLOR : FB_VISUAL_TRUECOLOR; + + if (!request_mem_region + (gcfb_fix.smem_start, gcfb_fix.smem_len, "gamecubefb")) { printk(KERN_WARNING - "gamecubefb: abort, cannot reserve video memory at 0x%lx\n", - gamecubefb_fix.smem_start); + "gamecubefb: abort, cannot reserve video memory at %p\n", + (void *)gcfb_fix.smem_start); /* We cannot make this fatal. Sometimes this comes from magic spaces our resource handlers simply don't know about */ } - fb_info.screen_base = ioremap(gamecubefb_fix.smem_start, gamecubefb_fix.smem_len); - if (!fb_info.screen_base) { - release_mem_region(gamecubefb_fix.smem_start, gamecubefb_fix.smem_len); + gcfb_info.screen_base = ioremap(gcfb_fix.smem_start, gcfb_fix.smem_len); + if (!gcfb_info.screen_base) { printk(KERN_ERR - "gamecubefb: abort, cannot ioremap video memory 0x%x @ 0x%lx\n", - gamecubefb_fix.smem_len, gamecubefb_fix.smem_start); - return -EIO; + "gamecubefb: abort, cannot ioremap video memory" + " at %p (%dk)\n", + (void *)gcfb_fix.smem_start, gcfb_fix.smem_len / 1024); + err = -EIO; + goto err_ioremap; } - printk(KERN_INFO "gamecubefb: framebuffer at 0x%lx, mapped to 0x%p, size %dk\n", - gamecubefb_fix.smem_start, fb_info.screen_base, gamecubefb_fix.smem_len/1024); - printk(KERN_INFO "gamecubefb: mode is %dx%dx%d, linelength=%d, pages=%d\n", - gamecubefb_defined.xres, gamecubefb_defined.yres, gamecubefb_defined.bits_per_pixel, gamecubefb_fix.line_length, 0); //screen_info.pages); + printk(KERN_INFO + "gamecubefb: framebuffer at 0x%p, mapped to 0x%p, size %dk\n", + (void *)gcfb_fix.smem_start, gcfb_info.screen_base, + gcfb_fix.smem_len / 1024); + printk(KERN_INFO + "gamecubefb: mode is %dx%dx%d, linelength=%d, pages=%d\n", + gcfb_defined.xres, gcfb_defined.yres, + gcfb_defined.bits_per_pixel, gcfb_fix.line_length, + 0 /*screen_info.pages */ ); - gamecubefb_defined.xres_virtual = gamecubefb_defined.xres; - gamecubefb_defined.yres_virtual = gamecubefb_defined.yres; + gcfb_defined.xres_virtual = gcfb_defined.xres; + gcfb_defined.yres_virtual = gcfb_defined.yres; ypan = 0; + /* FIXME! Please, use here *real* values */ /* some dummy values for timing to make fbset happy */ - gamecubefb_defined.pixclock = 10000000 / gamecubefb_defined.xres * 1000 / gamecubefb_defined.yres; - gamecubefb_defined.left_margin = (gamecubefb_defined.xres / 8) & 0xf8; - gamecubefb_defined.hsync_len = (gamecubefb_defined.xres / 8) & 0xf8; + gcfb_defined.pixclock = + 10000000 / gcfb_defined.xres * 1000 / gcfb_defined.yres; + gcfb_defined.left_margin = (gcfb_defined.xres / 8) & 0xf8; + gcfb_defined.hsync_len = (gcfb_defined.xres / 8) & 0xf8; - if (gamecubefb_defined.bits_per_pixel > 8) { - gamecubefb_defined.red.offset = 11; - gamecubefb_defined.red.length = 5; - gamecubefb_defined.green.offset = 6; - gamecubefb_defined.green.length = 5; - gamecubefb_defined.blue.offset = 1; - gamecubefb_defined.blue.length = 5; - gamecubefb_defined.transp.offset = 15; - gamecubefb_defined.transp.length = 1; + if (gcfb_defined.bits_per_pixel == 15) { + gcfb_defined.red.offset = 11; + gcfb_defined.red.length = 5; + gcfb_defined.green.offset = 6; + gcfb_defined.green.length = 5; + gcfb_defined.blue.offset = 1; + gcfb_defined.blue.length = 5; + gcfb_defined.transp.offset = 15; + gcfb_defined.transp.length = 1; + video_cmap_len = 16; + } else if (gcfb_defined.bits_per_pixel == 16) { + gcfb_defined.red.offset = 11; + gcfb_defined.red.length = 5; + gcfb_defined.green.offset = 5; + gcfb_defined.green.length = 6; + gcfb_defined.blue.offset = 0; + gcfb_defined.blue.length = 5; + gcfb_defined.transp.offset = 0; + gcfb_defined.transp.length = 0; video_cmap_len = 16; } else { - gamecubefb_defined.red.length = 6; - gamecubefb_defined.green.length = 6; - gamecubefb_defined.blue.length = 6; + gcfb_defined.red.length = 6; + gcfb_defined.green.length = 6; + gcfb_defined.blue.length = 6; video_cmap_len = 256; } - gamecubefb_fix.ypanstep = ypan ? 1 : 0; - gamecubefb_fix.ywrapstep = (ypan>1) ? 1 : 0; + gcfb_fix.ypanstep = ypan ? 1 : 0; + gcfb_fix.ywrapstep = (ypan > 1) ? 1 : 0; - fb_info.fbops = &gamecubefb_ops; - fb_info.var = gamecubefb_defined; - fb_info.fix = gamecubefb_fix; - fb_info.pseudo_palette = pseudo_palette; - fb_info.flags = FBINFO_FLAG_DEFAULT; + gcfb_info.fbops = &gamecubefb_ops; + gcfb_info.var = gcfb_defined; + gcfb_info.fix = gcfb_fix; + gcfb_info.pseudo_palette = pseudo_palette; + gcfb_info.flags = FBINFO_FLAG_DEFAULT; - fb_alloc_cmap(&fb_info.cmap, video_cmap_len, 0); + if (fb_alloc_cmap(&gcfb_info.cmap, video_cmap_len, 0)) { + err = -ENOMEM; + goto err_alloc_cmap; + } - if (register_framebuffer(&fb_info)<0) - return -EINVAL; + if (register_framebuffer(&gcfb_info) < 0) { + err = -EINVAL; + goto err_register_framebuffer; + } - unsigned int *VIDEO_Mode; + /* fill framebuffer memory with black color */ + int c = gcfb_defined.xres * gcfb_defined.yres / 2; + volatile unsigned long *p = (unsigned long *)gcfb_info.screen_base; + while (c--) + writel(0x00800080, p++); -// printk("tv_encoding = %i\n", tv_encoding); + unsigned int *VIDEO_Mode; if (tv_encoding == TV_ENC_NTSC) - VIDEO_Mode = VIDEO_Mode640X480NtscYUV16; + VIDEO_Mode = (unsigned int *)VIDEO_Mode640X480NtscYUV16; else - VIDEO_Mode = VIDEO_Mode640X480Pal50YUV16; + VIDEO_Mode = (unsigned int *)VIDEO_Mode640X480Pal50YUV16; - // initialize screen - for(i=0; i<32; i++) { + /* initialize video registers */ + for (i = 0; i < 7; i++) { + gamecube_video[i] = VIDEO_Mode[i]; + } + gamecube_video[8] = VIDEO_Mode[8]; + for (i = 10; i < 32; i++) { gamecube_video[i] = VIDEO_Mode[i]; } - gamecube_video[7] = 0x10000000 | (gamecubefb_fix.smem_start>>5); + gamecube_video[7] = 0x10000000 | (gcfb_fix.smem_start >> 5); - // setting both fields to same source means half the resolution, but - // reduces flickering a lot ...mmmh maybe worth a try as a last resort :/ - // gamecube_video[9] = 0x10000000 | (gamecubefb_fix.smem_start>>5); +// setting both fields to same source means half the resolution, but +// reduces flickering a lot ...mmmh maybe worth a try as a last resort :/ +// gamecube_video[9] = 0x10000000 | (gcfb_fix.smem_start>>5); - gamecube_video[9] = 0x10000000 | ((gamecubefb_fix.smem_start+gamecubefb_fix.line_length)>>5); + gamecube_video[9] = + 0x10000000 | ((gcfb_fix.smem_start + gcfb_fix.line_length) >> 5); printk(KERN_INFO "fb%d: %s frame buffer device\n", - fb_info.node, fb_info.fix.id); - return 0; + gcfb_info.node, gcfb_info.fix.id); + goto out; + +err_register_framebuffer: + fb_dealloc_cmap(&gcfb_info.cmap); +err_alloc_cmap: + iounmap(gcfb_info.screen_base); +err_ioremap: + release_mem_region(gcfb_fix.smem_start, gcfb_fix.smem_len); +out: + return err; } /* |
From: <aot...@us...> - 2004-07-30 21:06:59
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26574/arch/ppc/boot/simple Modified Files: Makefile Log Message: -0x80000000 is not a valid incremental value to objcopy --change-addresses. Fix that up while adding .dol-specific targets to consolidate things. We still need to generate the actual .dols, however. Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 16 Jun 2004 17:30:42 -0000 1.6 +++ Makefile 30 Jul 2004 21:06:51 -0000 1.7 @@ -113,6 +113,10 @@ entrypoint-$(CONFIG_SPRUCE) := 0x00800000 misc-$(CONFIG_SPRUCE) += misc-spruce.o + zimage-$(CONFIG_GAMECUBE) := zImage-DOL +zimageinitrd-$(CONFIG_GAMECUBE) := zImage.initrd-DOL + end-$(CONFIG_GAMECUBE) := dol + # SMP images should have a '.smp' suffix. end-$(CONFIG_SMP) := $(end-y).smp @@ -167,7 +171,7 @@ --set-section-flags=.image=contents,alloc,load,readonly,data \ $(obj)/dummy.o $(obj)/image.o $(LD) $(LD_ARGS) -o $@ $(OBJS) $(obj)/image.o $(LIBS) - $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ --change-addresses=-0x80000000 -R .comment -R .stab \ + $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab \ -R .stabstr -R .ramdisk -R .sysmap $(obj)/zvmlinux.initrd: $(OBJS) $(LIBS) $(srctree)/$(boot)/ld.script \ @@ -179,7 +183,7 @@ --set-section-flags=.image=contents,alloc,load,readonly,data \ $(obj)/dummy.o $(obj)/image.o $(LD) $(LD_ARGS) -o $@ $(OBJS) $(obj)/image.o $(LIBS) - $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ --change-addresses=-0x80000000 -R .comment -R .stab \ + $(OBJCOPY) $(OBJCOPY_ARGS) $@ $@ -R .comment -R .stab \ -R .stabstr -R .sysmap # Sort-of dummy rules, that let us format the image we want. @@ -218,3 +222,16 @@ $(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 + +# +# FIXME Must generate actual .dol's. All we're doing ATM is just adjusting +# VMA/LMA addresses of all sections in the respective images so we can just +# feed the result into `doltool'. Ick. +# +$(images)/zImage-DOL: $(obj)/zvmlinux + $(OBJCOPY) $(OBJCOPY_ARGS) $(obj)/zvmlinux $(obj)/zvmlinux \ + --change-addresses=0x80000000 + +$(images)/zImage.initrd-DOL: $(obj)/zvmlinux.initrd + $(OBJCOPY) $(OBJCOPY_ARGS) $(obj)/zvmlinux.initrd \ + $(obj)/zvmlinux.initrd --change-addresses=0x80000000 |
From: <aot...@us...> - 2004-07-30 19:41:21
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11028/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: Do away with the PCI subsystem and it's different dependencies as we're PCI/ISA-free. Saves approx. 40KB, as demonstrated in this transcript: hubb@mars:~/devel/kernel$ ls -l vmlinux{,-no-pci} -rwxr-xr-x 1 hubb hubb 2419088 Jul 30 17:32 vmlinux -rwxr-xr-x 1 hubb hubb 2355834 Jul 30 17:28 vmlinux-no-pci hubb@mars:~/devel/kernel$ powerpc-linux-uclibc-size vmlinux{,-no-pci} text data bss dec hex filename 1632547 220448 74656 1927651 1d69e3 vmlinux 1593243 214484 74400 1882127 1cb80f vmlinux-no-pci Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- gamecube_defconfig 30 Jul 2004 15:09:57 -0000 1.19 +++ gamecube_defconfig 30 Jul 2004 19:41:12 -0000 1.20 @@ -106,10 +106,7 @@ # Bus options # CONFIG_GENERIC_ISA_DMA=y -CONFIG_PCI=y -CONFIG_PCI_DOMAINS=y -# CONFIG_PCI_LEGACY_PROC is not set -# CONFIG_PCI_NAMES is not set +# CONFIG_PCI_DOMAINS is not set CONFIG_EXI=y # @@ -154,14 +151,9 @@ # CONFIG_BLK_DEV_FD is not set # CONFIG_GAMECUBE_ARAM is not set # CONFIG_GAMECUBE_MEMCARD is not set -# CONFIG_BLK_CPQ_DA is not set -# CONFIG_BLK_CPQ_CISS_DA is not set -# CONFIG_BLK_DEV_DAC960 is not set -# CONFIG_BLK_DEV_UMEM is not set CONFIG_BLK_DEV_LOOP=y # CONFIG_BLK_DEV_CRYPTOLOOP is not set # CONFIG_BLK_DEV_NBD is not set -# CONFIG_BLK_DEV_CARMEL is not set CONFIG_BLK_DEV_RAM=y CONFIG_BLK_DEV_RAM_SIZE=4096 CONFIG_BLK_DEV_INITRD=y @@ -194,7 +186,6 @@ # # I2O device support # -# CONFIG_I2O is not set # # Macintosh device drivers @@ -269,51 +260,24 @@ # CONFIG_TUN is not set # -# ARCnet devices -# -# CONFIG_ARCNET is not set - -# # Ethernet (10 or 100Mbit) # CONFIG_NET_ETHERNET=y # CONFIG_MII is not set CONFIG_GAMECUBE_NET=y # CONFIG_OAKNET is not set -# CONFIG_HAPPYMEAL is not set -# CONFIG_SUNGEM is not set -# CONFIG_NET_VENDOR_3COM is not set - -# -# Tulip family network device support -# -# CONFIG_NET_TULIP is not set -# CONFIG_HP100 is not set -# CONFIG_NET_PCI is not set # # Ethernet (1000 Mbit) # -# CONFIG_ACENIC is not set -# CONFIG_DL2K is not set -# CONFIG_E1000 is not set -# CONFIG_NS83820 is not set -# CONFIG_HAMACHI is not set -# CONFIG_YELLOWFIN is not set -# CONFIG_R8169 is not set -# CONFIG_SK98LIN is not set -# CONFIG_TIGON3 is not set # # Ethernet (10000 Mbit) # -# CONFIG_IXGB is not set -# CONFIG_S2IO is not set # # Token Ring devices # -# CONFIG_TR is not set # # Wireless LAN (non-hamradio) @@ -324,8 +288,6 @@ # Wan interfaces # # CONFIG_WAN is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set # CONFIG_PPP is not set # CONFIG_SLIP is not set # CONFIG_SHAPER is not set @@ -368,7 +330,6 @@ # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set -# CONFIG_SERIO_PCIPS2 is not set # # Input Device Drivers @@ -452,25 +413,9 @@ # Graphics support # CONFIG_FB=y -# 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 -# CONFIG_FB_RIVA is not set -# CONFIG_FB_MATROX is not set -# CONFIG_FB_RADEON_OLD is not set -# CONFIG_FB_RADEON is not set -# CONFIG_FB_ATY128 is not set -# CONFIG_FB_ATY is not set -# CONFIG_FB_SIS is not set -# CONFIG_FB_NEOMAGIC is not set -# CONFIG_FB_KYRO is not set -# CONFIG_FB_3DFX is not set -# CONFIG_FB_VOODOO1 is not set -# CONFIG_FB_TRIDENT is not set CONFIG_FB_GAMECUBE=y # CONFIG_FB_VIRTUAL is not set @@ -521,44 +466,6 @@ # CONFIG_SND_MPU401 is not set # -# PCI devices -# -# CONFIG_SND_ALI5451 is not set -# CONFIG_SND_ATIIXP is not set -# CONFIG_SND_AU8810 is not set -# CONFIG_SND_AU8820 is not set -# CONFIG_SND_AU8830 is not set -# CONFIG_SND_AZT3328 is not set -# CONFIG_SND_BT87X is not set -# CONFIG_SND_CS46XX is not set -# CONFIG_SND_CS4281 is not set -# CONFIG_SND_EMU10K1 is not set -# CONFIG_SND_KORG1212 is not set -# CONFIG_SND_MIXART is not set -# CONFIG_SND_NM256 is not set -# CONFIG_SND_RME32 is not set -# CONFIG_SND_RME96 is not set -# CONFIG_SND_RME9652 is not set -# CONFIG_SND_HDSP is not set -# CONFIG_SND_TRIDENT is not set -# CONFIG_SND_YMFPCI is not set -# CONFIG_SND_ALS4000 is not set -# CONFIG_SND_CMIPCI is not set -# CONFIG_SND_ENS1370 is not set -# CONFIG_SND_ENS1371 is not set -# CONFIG_SND_ES1938 is not set -# CONFIG_SND_ES1968 is not set -# CONFIG_SND_MAESTRO3 is not set -# CONFIG_SND_FM801 is not set -# CONFIG_SND_ICE1712 is not set -# CONFIG_SND_ICE1724 is not set -# CONFIG_SND_INTEL8X0 is not set -# CONFIG_SND_INTEL8X0M is not set -# CONFIG_SND_SONICVIBES is not set -# CONFIG_SND_VIA82XX is not set -# CONFIG_SND_VX222 is not set - -# # ALSA PowerMac devices # # CONFIG_SND_POWERMAC is not set @@ -572,7 +479,6 @@ # # USB support # -# CONFIG_USB is not set # # USB Gadget Support |
From: <aot...@us...> - 2004-07-30 19:41:21
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11028/arch/ppc/platforms Modified Files: gamecube.c Log Message: Do away with the PCI subsystem and it's different dependencies as we're PCI/ISA-free. Saves approx. 40KB, as demonstrated in this transcript: hubb@mars:~/devel/kernel$ ls -l vmlinux{,-no-pci} -rwxr-xr-x 1 hubb hubb 2419088 Jul 30 17:32 vmlinux -rwxr-xr-x 1 hubb hubb 2355834 Jul 30 17:28 vmlinux-no-pci hubb@mars:~/devel/kernel$ powerpc-linux-uclibc-size vmlinux{,-no-pci} text data bss dec hex filename 1632547 220448 74656 1927651 1d69e3 vmlinux 1593243 214484 74400 1882127 1cb80f vmlinux-no-pci Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- gamecube.c 3 Jun 2004 13:52:03 -0000 1.18 +++ gamecube.c 30 Jul 2004 19:41:12 -0000 1.19 @@ -18,6 +18,13 @@ #include "console.h" #include "gamecube.h" +/* + * We happen to be ISA/PCI-free, hence the !CONFIG_PCI. These + * are here only to avoid the accompanying compile breakage. + */ +unsigned long isa_io_base = 0; +unsigned long isa_mem_base = 0; +unsigned long pci_dram_offset = 0; extern long gamecube_time_init(void) __init; extern unsigned long gamecube_get_rtc_time(void); |
From: <aot...@us...> - 2004-07-30 19:41:21
|
Update of /cvsroot/gc-linux/linux/arch/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11028/arch/ppc Modified Files: Kconfig Log Message: Do away with the PCI subsystem and it's different dependencies as we're PCI/ISA-free. Saves approx. 40KB, as demonstrated in this transcript: hubb@mars:~/devel/kernel$ ls -l vmlinux{,-no-pci} -rwxr-xr-x 1 hubb hubb 2419088 Jul 30 17:32 vmlinux -rwxr-xr-x 1 hubb hubb 2355834 Jul 30 17:28 vmlinux-no-pci hubb@mars:~/devel/kernel$ powerpc-linux-uclibc-size vmlinux{,-no-pci} text data bss dec hex filename 1632547 220448 74656 1927651 1d69e3 vmlinux 1593243 214484 74400 1882127 1cb80f vmlinux-no-pci Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/Kconfig,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- Kconfig 16 Jun 2004 17:30:42 -0000 1.15 +++ Kconfig 30 Jul 2004 19:41:12 -0000 1.16 @@ -1007,7 +1007,7 @@ config PCI bool "PCI support" if 40x || 8260 - default y if !40x && !8260 && !8xx && !APUS + default y if !40x && !8260 && !8xx && !APUS && !GAMECUBE default PCI_PERMEDIA if !4xx && !8260 && !8xx && APUS default PCI_QSPAN if !4xx && !8260 && 8xx help |
From: <aot...@us...> - 2004-07-30 15:10:06
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27303/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: `make oldconfig' to include CONFIG_GAMECUBE_SI and remove now obsolete CONFIG_KEYBOARD_GAMECUBE. Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- gamecube_defconfig 16 Jun 2004 17:30:42 -0000 1.18 +++ gamecube_defconfig 30 Jul 2004 15:09:57 -0000 1.19 @@ -361,6 +361,7 @@ # # Input I/O drivers # +# CONFIG_GAMECUBE_SI is not set # CONFIG_GAMEPORT is not set CONFIG_SOUND_GAMEPORT=y CONFIG_SERIO=y @@ -378,7 +379,6 @@ # CONFIG_KEYBOARD_LKKBD is not set # CONFIG_KEYBOARD_XTKBD is not set # CONFIG_KEYBOARD_NEWTON is not set -CONFIG_KEYBOARD_GAMECUBE=y # CONFIG_INPUT_MOUSE is not set # CONFIG_INPUT_JOYSTICK is not set # CONFIG_INPUT_TOUCHSCREEN is not set |
From: <aot...@us...> - 2004-07-30 14:29:24
|
Update of /cvsroot/gc-linux/linux/Documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20198/Documentation Modified Files: exi.txt Log Message: Document exi_{get,set}_drvdata() Index: exi.txt =================================================================== RCS file: /cvsroot/gc-linux/linux/Documentation/exi.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- exi.txt 24 May 2004 00:58:58 -0000 1.3 +++ exi.txt 30 Jul 2004 14:29:15 -0000 1.4 @@ -71,3 +71,11 @@ exi_driver_unregister(&frob_driver); } +Device Private Data +------------------- + +The functions exi_set_drvdata()/exi_get_drvdata() are available for the +sole purpose of setting and getting driver private data for an EXI device. +These are simply helpers around the driver-model functions that do the +actual work. Use them. That way, you don't have to worry (or worry less) +about changes to the driver-model API. |
From: <he...@us...> - 2004-07-27 17:55:57
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14332 Modified Files: faq.xml Log Message: Fixed a typo, as suggested by Arthur Othieno. Updated a little bit more the FAQ with current information. Index: faq.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/faq.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- faq.xml 26 Jul 2004 17:51:00 -0000 1.3 +++ faq.xml 27 Jul 2004 17:55:46 -0000 1.4 @@ -7,7 +7,7 @@ <faq> <category>1 General</category> <question>Can I already run Linux on the GameCube?</question> - <answer>Yes. It is not much use yet, but you can see something on the screen and telnet into it.</answer> + <answer>Yes. You can use linux on the GameCube to watch videos, listen to music, play some games, ...</answer> </faq> <faq> <category>1 General</category> @@ -35,39 +35,38 @@ <answer>A good starting point is The Linux Documentation Project: <a href="http://www.tldp.org/">http://www.tldp.org/</a></answer> </faq> -<!-- ***** 2 Runnings Homebrew Code ***** --> +<!-- ***** 2 Running Homebrew Code ***** --> <faq> - <category>2 Runnings Homebrew Code</category> + <category>2 Running Homebrew Code</category> <question>Can I just burn a 8 cm CD/DVD and use it in the GameCube?</question> <answer> - No. The GameCube reads no CDs/DVDs. There is no way to produce a GameCube compatible optical media using a CD/DVD burner. + Not on a unmodified GameCube. The GameCube, as shipped, reads no CDs/DVDs. There is no way to produce a GameCube compatible optical media using unmodified CD/DVD burners. </answer> </faq> <faq> - <category>2 Runnings Homebrew Code</category> - <question>So do I run homebrew code on the GameCube?</question> + <category>2 Running Homebrew Code</category> + <question>So how do I run homebrew code on the GameCube?</question> <answer> - The <a href="http://www.gcdev.com/">PSOload</a> method is the only way. + The <a href="http://www.gcdev.com/">PSOload</a> method is one of the available ways. </answer> </faq> <faq> - <category>2 Runnings Homebrew Code</category> + <category>2 Running Homebrew Code</category> <question>What do I need in order to run homebrew code?</question> <answer> - A GameCube, any version of "Phantasy Star Online", a "Broadband Adapter", - a memory card, and <a href="http://www.gcdev.com/">PSOload</a>. + A GameCube, a supported version of "Phantasy Star Online" (see PSOload), a "Broadband Adapter", a memory card, and <a href="http://www.gcdev.com/">PSOload</a>. </answer> </faq> <faq> - <category>2 Runnings Homebrew Code</category> + <category>2 Running Homebrew Code</category> <question>Do I need a modchip?</question> <answer> No. </answer> </faq> <faq> - <category>2 Runnings Homebrew Code</category> + <category>2 Running Homebrew Code</category> <question>Will any of this disable the ability to play games?</question> <answer> No. |
From: <he...@us...> - 2004-07-26 17:51:10
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24460 Modified Files: faq.xml Log Message: Made a more suitable answer to one of the questions. Just in case the Origa Brothers ... Index: faq.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/faq.xml,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- faq.xml 3 Feb 2004 02:53:33 -0000 1.2 +++ faq.xml 26 Jul 2004 17:51:00 -0000 1.3 @@ -63,7 +63,7 @@ <category>2 Runnings Homebrew Code</category> <question>Do I need a modchip?</question> <answer> - There are no modchips. + No. </answer> </faq> <faq> |
From: <he...@us...> - 2004-07-25 22:17:23
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv386 Modified Files: status.xml Log Message: Updated status with current list of working/preliminary drivers. Index: status.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/status.xml,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- status.xml 3 Feb 2004 02:53:33 -0000 1.4 +++ status.xml 25 Jul 2004 22:17:15 -0000 1.5 @@ -3,13 +3,12 @@ <iparticle> <info> <title>Status/Contribute</title> - <author>Michael Steil</author> - <date>2 February 2004</date> + <author>Michael Steil (updated by Albert Herranz)</author> + <date>26 July 2004</date> </info> - <p>Linux has a working framebuffer for PAL and NTSC, a driver that intercepts the reset button, and a working network driver.</p> + <p>Linux has working drivers for PAL and NTSC framebuffers, the Broadband Adapter (network card), audio, ARAM, Real Time Clock, gamepad, keyboard and reset button. It has also preliminary support for memory cards.</p> <p>If you are interested in helping, please join the <a href="mailinglist.html">Mailing List</a> or email <a href="mailto:mi...@c6...?Subject=GameCube Linux Development">Michael</a>.</p> - - + </iparticle> |
From: <he...@us...> - 2004-07-21 21:09:24
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30343 Modified Files: news.xml Log Message: - 21 July 2004, Play Robby Roto on gc-linux! Index: news.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/news.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- news.xml 20 Jul 2004 22:21:56 -0000 1.20 +++ news.xml 21 Jul 2004 21:09:15 -0000 1.21 @@ -2,6 +2,11 @@ <?xml-stylesheet href="news.xsl" type="text/xsl"?> <news> <item> + <date>21 July 2004</date> + <title>Play Robby Roto on gc-linux!</title> + <text>Thanks to Steve_- you have <a href="http://www.gc-linux.org/down/mame-PoC.tar.bz2">here</a> a base system for playing Robby Roto. See the <a href="http://www.gc-linux.org/down/mame-PoC.txt">readme.txt</a> for rudimentary help.</text> + </item> + <item> <date>20 July 2004</date> <title>Simple Directmedia Layer gc-linux port</title> <text>The new <a href="http://www.gc-linux.org/docs/screenshots.html">screenshots</a> show you the GameCube running some interesting SDL applications.</text> |
From: <he...@us...> - 2004-07-20 22:22:05
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15606 Modified Files: news.xml Log Message: - 20 July 2004, SDL screenshots Index: news.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/news.xml,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- news.xml 16 Jul 2004 17:32:38 -0000 1.19 +++ news.xml 20 Jul 2004 22:21:56 -0000 1.20 @@ -2,6 +2,11 @@ <?xml-stylesheet href="news.xsl" type="text/xsl"?> <news> <item> + <date>20 July 2004</date> + <title>Simple Directmedia Layer gc-linux port</title> + <text>The new <a href="http://www.gc-linux.org/docs/screenshots.html">screenshots</a> show you the GameCube running some interesting SDL applications.</text> + </item> + <item> <date>15 July 2004</date> <title>kexec for the GameCube merged with main kexec</title> <text>The <a href="http://marc.theaimsgroup.com/?l=linux-kernel&m=108987224509611&w=2">kexec</a> port for the GameCube/ppc32 is now part of the official kexec patches.</text> |
From: <he...@us...> - 2004-07-20 20:26:12
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22178/xml/en Modified Files: screenshots.xml Log Message: Added new screenshots showing SDL proof of concept. Index: screenshots.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/screenshots.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- screenshots.xml 3 Mar 2004 12:25:17 -0000 1.6 +++ screenshots.xml 20 Jul 2004 20:26:03 -0000 1.7 @@ -3,15 +3,28 @@ <iparticle> <info> <title>Screenshots</title> - <author>Michael Steil</author> - <date>28 February 2004</date> + <author>Michael Steil (updated by Albert Herranz)</author> + <date>20 July 2004</date> </info> + <h2>GameCube Linux SDL port "Proof of Concept"(20 Jul 2004)</h2> + + <p>Thanks to the new <a href="http://www.libsdl.org/">SDL</a> port by isobel, we can now run, with right colors, graphical applications based on this library. This way, we managed to run <a href="http://www.mplayerhq.hu/">mplayer</a>, mame (<a href="http://advancemame.sourceforge.net/">AdvanceMAME</a>), doom (<a href="http://prboom.sourceforge.net/">prboom</a>), tetris (<a href="http://www.cs.berkeley.edu/~weimer/atris/">atris</a>), ...</p> + <p>The first picture shows AdvanceMAME playing the freely redistributable ROM robby.</p> + <p>The second picture is not Marilyn, but Lemmy Kilmister performing Probot's "Shake Your Blood" played with mplayer.</p> + <p>The third picture shows prboom in action.</p> + + <p> + <a href="../pic/robby.jpg"><img src="../pic/robby.jpg" width="160"/></a> + <a href="../pic/lemmy.jpg"><img src="../pic/lemmy.jpg" width="160"/></a> + <a href="../pic/prboom.jpg"><img src="../pic/prboom.jpg" width="160"/></a> + </p> + <h2>A full Linux system over NFS (28 Feb 2004)</h2> <p>Thanks to a fully functional (10 MBit only, so far) network driver, we can boot a full Linux system over NFS, i.e. another computer connected via Ethernet provides the full filesystem. This way, we can easily run many standard applications.</p> <p>The first picture shows an X Window session. All applications are running on another Linux computer, but the X server is running on the GameCube.</p> - <p>The second picture is not some work of art by Andy Warhol, but Marilyn Monroe starring in "Some like it hot" playing in MPlayer - with colours off.</p> + <p>The second picture is not some work of art by Andy Warhol, but Marilyn Monroe starring in "Some like it hot" playing in MPlayer - with colours off.</p> <p>The third picture shows an IRC session using IRSSI.</p> <p> |
From: <he...@us...> - 2004-07-20 20:26:12
|
Update of /cvsroot/gc-linux/htdocs/pic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22178/pic Added Files: lemmy.jpg prboom.jpg robby.jpg Log Message: Added new screenshots showing SDL proof of concept. --- NEW FILE: lemmy.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: prboom.jpg --- (This appears to be a binary file; contents omitted.) --- NEW FILE: robby.jpg --- (This appears to be a binary file; contents omitted.) |
From: <he...@us...> - 2004-07-20 17:59:23
|
Update of /cvsroot/gc-linux/linux/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21310 Modified Files: gamecube_si.c Log Message: Fixed wrong direction on Y axis. Index: gamecube_si.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/gamecube_si.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gamecube_si.c 24 Jun 2004 19:55:42 -0000 1.2 +++ gamecube_si.c 20 Jul 2004 17:59:14 -0000 1.3 @@ -210,8 +210,8 @@ // 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); + 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) |
From: <he...@us...> - 2004-07-16 17:32:47
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27653 Modified Files: news.xml Log Message: Changed my mind and used a different URL for the kexec keyword. Before it was pointing to an IBM article, already pointed in a previous new. Now it points to Eric Biederman's announce in the kml. Index: news.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/news.xml,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- news.xml 16 Jul 2004 17:16:19 -0000 1.18 +++ news.xml 16 Jul 2004 17:32:38 -0000 1.19 @@ -4,7 +4,7 @@ <item> <date>15 July 2004</date> <title>kexec for the GameCube merged with main kexec</title> - <text>The <a href="http://www-106.ibm.com/developerworks/linux/library/l-kexec.html">kexec</a> port for the GameCube/ppc32 is now part of the official kexec patches.</text> + <text>The <a href="http://marc.theaimsgroup.com/?l=linux-kernel&m=108987224509611&w=2">kexec</a> port for the GameCube/ppc32 is now part of the official kexec patches.</text> </item> <item> <date>25 June 2004</date> |
From: <he...@us...> - 2004-07-16 17:16:28
|
Update of /cvsroot/gc-linux/htdocs/xml/en In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24352 Modified Files: news.xml Log Message: Added three old news and a new: - 15 July 2004 - 25 June 2004 - 23 June 2004 - 16 May 2004 Index: news.xml =================================================================== RCS file: /cvsroot/gc-linux/htdocs/xml/en/news.xml,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- news.xml 22 Jun 2004 18:18:31 -0000 1.17 +++ news.xml 16 Jul 2004 17:16:19 -0000 1.18 @@ -2,6 +2,21 @@ <?xml-stylesheet href="news.xsl" type="text/xsl"?> <news> <item> + <date>15 July 2004</date> + <title>kexec for the GameCube merged with main kexec</title> + <text>The <a href="http://www-106.ibm.com/developerworks/linux/library/l-kexec.html">kexec</a> port for the GameCube/ppc32 is now part of the official kexec patches.</text> + </item> + <item> + <date>25 June 2004</date> + <title>(old news) New GameCube Broadband Adapter driver</title> + <text>isobel rewrote the network driver. The new driver performs better and fixes periodic resets due to the previously unmanaged challenge/response mechanism.</text> + </item> + <item> + <date>23 June 2004</date> + <title>(old news) New GameCube all-in-one input driver</title> + <text>Steve_- rewrote the SI driver. The new driver supports keyboards and standard GameCube controllers.</text> + </item> + <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> @@ -12,6 +27,11 @@ <text>Groepaz fixed the sound driver. The new code is in the CVS.</text> </item> <item> + <date>16 May 2004</date> + <title>(old news) kexec for the GameCube released</title> + <text>isobel has ported <a href="http://www-106.ibm.com/developerworks/linux/library/l-kexec.html">kexec</a> to the GameCube. Now it is possible to reboot gc-linux without using psoload. And <a href="http://www.gc-linux.org/down/isobel/kexec/initial_release/README_PLEASE">more</a>...</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> |
From: <he...@us...> - 2004-06-26 23:04:28
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20815 Modified Files: head.S Log Message: Fixed wrong ifdef. Do not use r4 where it says not to do so. Index: head.S =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/head.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- head.S 24 Apr 2004 18:31:43 -0000 1.2 +++ head.S 26 Jun 2004 23:04:20 -0000 1.3 @@ -69,12 +69,13 @@ /* The following functions we call must not modify r3 or r4..... */ -#ifdef CONFIG_GAMECUBE - lis r4, 0xcc00 +#ifdef CONFIG_GAMECUBE_CONSOLE + /* setup the framebuffer for the debug console */ + lis r8, 0xcc00 lis r5, 0x00c0 - stw r5, 0x201c(r4) + stw r5, 0x201c(r8) addi r5, r5, 1280 - stw r5, 0x2024(r4) + stw r5, 0x2024(r8) #endif #ifdef CONFIG_6xx /* On PReP we must look at the OpenFirmware pointer and sanity |
From: <he...@us...> - 2004-06-26 15:13:26
|
Update of /cvsroot/gc-linux/linux/sound/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4008 Modified Files: gamecube.c Log Message: Mainly quickfixes: - display debug messages only if compiled with DEBUG - handle sound driver related interrupts only - added some symbolic constants - Lindent Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/sound/ppc/gamecube.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gamecube.c 23 Jun 2004 14:13:24 -0000 1.5 +++ gamecube.c 26 Jun 2004 15:13:17 -0000 1.6 @@ -1,10 +1,14 @@ - /* 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. + 2004/06/24 - isobel + - diplay debug messages only if compiled with DEBUG + - handle sound driver related interrupts only + - added some symbolic constants + - Lindent */ @@ -19,26 +23,49 @@ #define SNDRV_GET_ID #include <sound/initval.h> +//#define DEBUG + +#ifdef DEBUG +# define DPRINTK(fmt, args...) \ + printk(KERN_ERR "%s: " fmt, __FUNCTION__ , ## args) +#else +# define DPRINTK(fmt, args...) +#endif + #define DSP_IRQ 6 -//#define GAMECUBE_AUDIO_DEBUG #define AUDIO_DSP_CONTROL *(volatile u_int16_t *)(0xCC00500a) +#define AI_CSR_RES (1<<0) +#define AI_CSR_PIINT (1<<1) +#define AI_CSR_HALT (1<<2) +#define AI_CSR_AIDINT (1<<3) +#define AI_CSR_AIDINTMASK (1<<4) +#define AI_CSR_ARINT (1<<5) +#define AI_CSR_ARINTMASK (1<<6) +#define AI_CSR_DSPINT (1<<7) +#define AI_CSR_DSPINTMASK (1<<8) +#define AI_CSR_DSPDMA (1<<9) +#define AI_CSR_RESETXXX (1<<11) #define AUDIO_IRQ_CAUSE *(volatile u_int16_t *)(0xCC005010) #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) +#define AI_DCL_PLAY (1<<15) + #define AUDIO_DMA_LEFT *(volatile u_int16_t *)(0xCC00503a) #define AUDIO_STREAM_STATUS *(volatile u_int32_t *)(0xCC006C00) +#define AI_AICR_RATE (1<<6) -#define LoadSample(addr, len) AUDIO_DMA_STARTH = addr >> 16; \ - AUDIO_DMA_STARTL = addr & 0xffff; \ - AUDIO_DMA_LENGTH = (AUDIO_DMA_LENGTH & 0x8000) | (len >> 5) -#define StartSample() AUDIO_DMA_LENGTH |= 0x8000 -#define StopSample() AUDIO_DMA_LENGTH &= 0x7fff -#define SetFreq32KHz() AUDIO_STREAM_STATUS |= 0x40 -#define SetFreq48KHz() AUDIO_STREAM_STATUS &= 0xffffffbf - +#define LoadSample(addr, len) \ + AUDIO_DMA_STARTH = (addr >> 16) & 0xffff; \ + AUDIO_DMA_STARTL = addr & 0xffff; \ + AUDIO_DMA_LENGTH = (AUDIO_DMA_LENGTH & AI_DCL_PLAY) | (len >> 5) +#define StartSample() AUDIO_DMA_LENGTH |= AI_DCL_PLAY +#define StopSample() AUDIO_DMA_LENGTH &= ~AI_DCL_PLAY +#define SetFreq32KHz() AUDIO_STREAM_STATUS |= AI_AICR_RATE +#define SetFreq48KHz() AUDIO_STREAM_STATUS &= ~AI_AICR_RATE MODULE_AUTHOR("me!"); MODULE_DESCRIPTION("GameCube sound stuff"); @@ -46,10 +73,8 @@ #define chip_t gamecube_t -static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ -static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ - -static unsigned long iobase; +static int index = SNDRV_DEFAULT_IDX1; /* Index 0-MAX */ +static char *id = SNDRV_DEFAULT_STR1; /* ID for this card */ typedef struct snd_gamecube { snd_card_t *card; @@ -68,37 +93,35 @@ static gamecube_t *gamecube_audio = NULL; static snd_pcm_hardware_t snd_gamecube_playback = { - .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | - SNDRV_PCM_INFO_BLOCK_TRANSFER | - SNDRV_PCM_INFO_MMAP_VALID), - .formats = SNDRV_PCM_FMTBIT_S16_BE, - .rates = /* SNDRV_PCM_RATE_8000_48000, */ - SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000, - .rate_min = 32000, - .rate_max = 48000, - .channels_min = 2, - .channels_max = 2, - .buffer_bytes_max = 32768, - .period_bytes_min = 32, - .period_bytes_max = 32768, - .periods_min = 1, - .periods_max = 1024, + .info = (SNDRV_PCM_INFO_MMAP | SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_BLOCK_TRANSFER | SNDRV_PCM_INFO_MMAP_VALID), + .formats = SNDRV_PCM_FMTBIT_S16_BE, + .rates = SNDRV_PCM_RATE_32000 | SNDRV_PCM_RATE_48000, + .rate_min = 32000, + .rate_max = 48000, + .channels_min = 2, + .channels_max = 2, + .buffer_bytes_max = 32768, + .period_bytes_min = 32, + .period_bytes_max = 32768, + .periods_min = 1, + .periods_max = 1024, }; -static int snd_gamecube_open(snd_pcm_substream_t *substream) +static int snd_gamecube_open(snd_pcm_substream_t * substream) { 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 + DPRINTK("pcm open\n"); chip->playback_substream = substream; runtime->hw = snd_gamecube_playback; /* 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); + 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); return 0; } @@ -107,50 +130,47 @@ { gamecube_t *chip = snd_pcm_substream_chip(substream); -#ifdef GAMECUBE_AUDIO_DEBUG - printk(KERN_ALERT "pcm close\n"); -#endif + DPRINTK("pcm close\n"); chip->playback_substream = NULL; return 0; } static int snd_gamecube_hw_params(snd_pcm_substream_t * substream, - snd_pcm_hw_params_t * hw_params) + snd_pcm_hw_params_t * hw_params) { - /* printk(KERN_ALERT "snd_gamecube_hw_params\n"); */ - return snd_pcm_lib_malloc_pages(substream, params_buffer_bytes(hw_params)); + DPRINTK("snd_gamecube_hw_params\n"); + return snd_pcm_lib_malloc_pages(substream, + params_buffer_bytes(hw_params)); } static int snd_gamecube_hw_free(snd_pcm_substream_t * substream) { - /* printk(KERN_ALERT "snd_gamecube_hw_free\n"); */ + DPRINTK("snd_gamecube_hw_free\n"); return snd_pcm_lib_free_pages(substream); } static int snd_gamecube_prepare(snd_pcm_substream_t * substream) { - gamecube_t *chip = snd_pcm_substream_chip(substream); + //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 + DPRINTK("snd_gamecube_prepare\n"); + DPRINTK("prepare: rate=%i, channels=%i, sample_bits=%i\n", + runtime->rate, runtime->channels, runtime->sample_bits); + DPRINTK("prepare: format=%i, access=%i\n", + runtime->format, runtime->access); /* set requested samplerate */ switch (runtime->rate) { - case 32000: - SetFreq32KHz(); - break; - case 48000: - SetFreq48KHz(); - break; - default: - printk("unsupported rate: %i!\n", runtime->rate); - return -EINVAL; + case 32000: + SetFreq32KHz(); + break; + case 48000: + SetFreq48KHz(); + break; + default: + DPRINTK("unsupported rate: %i!\n", runtime->rate); + return -EINVAL; } return 0; @@ -161,13 +181,11 @@ gamecube_t *chip = snd_pcm_substream_chip(substream); snd_pcm_runtime_t *runtime = substream->runtime; - /* printk(KERN_ALERT "snd_gamecube_trigger\n"); */ + DPRINTK("snd_gamecube_trigger\n"); 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 + DPRINTK("PCM_TRIGGER_START\n"); 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); @@ -176,23 +194,23 @@ 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", + DPRINTK("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 + DPRINTK("%i periods of %i bytes\n", chip->nperiods, + chip->period_size); - flush_dcache_range(runtime->dma_area, runtime->dma_area + chip->period_size); - LoadSample((u_int32_t) runtime->dma_area, chip->period_size); + flush_dcache_range((unsigned long)runtime->dma_area, + (unsigned long)(runtime->dma_area + + chip->period_size)); + LoadSample((u_int32_t) runtime->dma_area, + chip->period_size); StartSample(); } 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 + DPRINTK("PCM_TRIGGER_STOP\n"); chip->stop_play = 1; /* StopSample(); */ @@ -210,43 +228,43 @@ snd_pcm_runtime_t *runtime = substream->runtime; int left, bytes; - /* printk(KERN_ALERT "snd_gamecube_pointer\n"); */ + DPRINTK("snd_gamecube_pointer\n"); left = AUDIO_DMA_LEFT << 5; bytes = chip->period_size * (chip->cur_period + 1); /* bytes = snd_pcm_lib_buffer_bytes(substream); */ -#ifdef GAMECUBE_AUDIO_DEBUG - printk("pointer: %i of %i(%i) bytes left, period #%i\n", left, chip->period_size ,bytes, chip->cur_period); -#endif + DPRINTK("pointer: %i of %i(%i) bytes left, period #%i\n", left, + chip->period_size, bytes, chip->cur_period); + return bytes_to_frames(runtime, bytes - left); } -static irqreturn_t snd_gamecube_interrupt(int irq, void *dev, struct pt_regs *regs) +static irqreturn_t snd_gamecube_interrupt(int irq, void *dev, + struct pt_regs *regs) { gamecube_t *chip = (gamecube_t *) dev; - unsigned long val = AUDIO_DSP_CONTROL; - -// fixme: we should only handle dma-finish irq here + unsigned short val = AUDIO_DSP_CONTROL; -// if (val & 0x100) - { + if (val & AI_CSR_AIDINT) { u_int32_t addr; -#ifdef GAMECUBE_AUDIO_DEBUG - printk("DSP interrupt! period #%i\n", chip->cur_period); -#endif + DPRINTK("DSP interrupt! period #%i\n", chip->cur_period); + if (chip->start_play) { chip->start_play = 0; } else if (chip->stop_play) { StopSample(); } else { - StopSample(); - if (chip->cur_period < (chip->nperiods - 1)) { chip->cur_period++; - } else chip->cur_period = 0; + } else + chip->cur_period = 0; - addr = (u_int32_t) chip->playback_substream->runtime->dma_area + (chip->cur_period * chip->period_size); + addr = + (u_int32_t) chip->playback_substream->runtime-> + dma_area + (chip->cur_period * chip->period_size); + + StopSample(); flush_dcache_range(addr, addr + chip->period_size); LoadSample(addr, chip->period_size); @@ -256,43 +274,45 @@ snd_pcm_period_elapsed(chip->playback_substream); } + /* ack AI DMA interrupt */ + AUDIO_DSP_CONTROL |= AI_CSR_AIDINT; + return IRQ_HANDLED; } + //AUDIO_DSP_CONTROL |= (1<<5); // ARAM + //AUDIO_DSP_CONTROL |= (1<<7); // DSP - // 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; + return IRQ_NONE; } static snd_pcm_ops_t snd_gamecube_playback_ops = { - .open = snd_gamecube_open, - .close = snd_gamecube_close, - .ioctl = snd_pcm_lib_ioctl, - .hw_params = snd_gamecube_hw_params, - .hw_free = snd_gamecube_hw_free, - .prepare = snd_gamecube_prepare, - .trigger = snd_gamecube_trigger, - .pointer = snd_gamecube_pointer, + .open = snd_gamecube_open, + .close = snd_gamecube_close, + .ioctl = snd_pcm_lib_ioctl, + .hw_params = snd_gamecube_hw_params, + .hw_free = snd_gamecube_hw_free, + .prepare = snd_gamecube_prepare, + .trigger = snd_gamecube_trigger, + .pointer = snd_gamecube_pointer, }; -static int __devinit snd_gamecube_new_pcm(gamecube_t *chip) +static int __devinit snd_gamecube_new_pcm(gamecube_t * chip) { snd_pcm_t *pcm; int err; - if ((err = snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm)) < 0) + if ((err = + snd_pcm_new(chip->card, chip->card->shortname, 0, 1, 1, &pcm)) < 0) return err; - snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_gamecube_playback_ops); + 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), - 64 * 1024, 64 * 1024); + snd_dma_continuous_data + (GFP_KERNEL), 64 * 1024, + 64 * 1024); pcm->info_flags = 0; pcm->private_data = chip; @@ -316,7 +336,7 @@ if (card == NULL) return -ENOMEM; - gamecube_audio = (gamecube_t *)card->private_data; + gamecube_audio = (gamecube_t *) card->private_data; if (gamecube_audio == NULL) return -ENOMEM; @@ -328,30 +348,35 @@ strcpy(card->shortname, "GameCube audio"); sprintf(card->longname, "GameCube audio"); - 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); + if (request_irq + (DSP_IRQ, snd_gamecube_interrupt, SA_SHIRQ, 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 + /* enable AI DMA interrupt */ + AUDIO_DSP_CONTROL |= AI_CSR_AIDINTMASK; + //AUDIO_DSP_CONTROL |= (1<<6); // ARAM + //AUDIO_DSP_CONTROL |= (1<<8); // DSP - AUDIO_DSP_CONTROL |= (1<<1); // enable any DSP irqs (?) + /* enable any DSP interrupts */ + AUDIO_DSP_CONTROL |= AI_CSR_PIINT; } #if 0 - if (request_region(AUDIO_INTERFACE_ADDR, 0x200, card->shortname) == NULL) { + if (request_region(AUDIO_INTERFACE_ADDR, 0x200, card->shortname) == + NULL) { printk("unable to grab memory region 0x%lx-0x%lx\n", - AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); + AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); return -EBUSY; } - if ((iobase = (unsigned long) ioremap(AUDIO_INTERFACE_ADDR, 0x200)) == 0) { + if ((iobase = (unsigned long)ioremap(AUDIO_INTERFACE_ADDR, 0x200)) == 0) { printk("unable to remap memory region 0x%lx-0x%lx\n", - AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); + AUDIO_INTERFACE_ADDR, AUDIO_INTERFACE_ADDR + 0x200 - 1); return -ENOMEM; } @@ -368,23 +393,22 @@ goto fail; if ((err = snd_card_register(card)) == 0) { - printk( KERN_INFO "GameCube audio support initialized\n" ); + printk(KERN_INFO "GameCube audio support initialized\n"); return 0; } -fail: + fail: snd_card_free(card); return err; } static void __exit alsa_card_gamecube_exit(void) { - printk(KERN_ALERT "Goodbye, cruel world\n"); + DPRINTK("Goodbye, cruel world\n"); free_irq(DSP_IRQ, gamecube_audio); snd_card_free(gamecube_audio->card); } -module_init(alsa_card_gamecube_init) -module_exit(alsa_card_gamecube_exit) - +module_init(alsa_card_gamecube_init); +module_exit(alsa_card_gamecube_exit); |
From: <he...@us...> - 2004-06-26 15:09:33
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3360 Modified Files: gc_aram.c Log Message: Mainly quickfixes: - avoid registering interrupt handlers for nothing - mask ARAM DMA interrupt as we are not going to handle it - fix compiler warnings - fix explicit cache handling code Index: gc_aram.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/gc_aram.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- gc_aram.c 6 Mar 2004 04:19:55 -0000 1.7 +++ gc_aram.c 26 Jun 2004 15:09:24 -0000 1.8 @@ -11,6 +11,13 @@ cat /dev/aram | wc -c */ +/* + 2004/06/26 - isobel + - avoid registering interrupt handlers for nothing + - mask ARAM DMA interrupt as we are not going to handle it + - fix compiler warnings + - fix explicit cache handling code +*/ #define DEVICE_NAME "ARAM" @@ -108,7 +115,7 @@ if (start + len > ARAM_BUFFERSIZE) { printk( KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", - req->sector, req->current_nr_sectors); + (unsigned long)req->sector, req->current_nr_sectors); end_request(req, 0); continue; } @@ -122,9 +129,10 @@ #else if (rq_data_dir(req) == READ) { //memset(req->buffer,0,len); - flush_dcache_range((unsigned long)req->buffer,(unsigned long)req->buffer + len); + //flush_dcache_range((unsigned long)req->buffer,(unsigned long)req->buffer + len); ARAM_StartDMA((unsigned long)req->buffer,start+ARAM_SOUNDMEMORYOFFSET, len,ARAM_READ); - flush_dcache_range((unsigned long)req->buffer,(unsigned long)req->buffer + len); + //flush_dcache_range((unsigned long)req->buffer,(unsigned long)req->buffer + len); + invalidate_dcache_range((unsigned long)req->buffer,(unsigned long)req->buffer + len); } else { flush_dcache_range((unsigned long)req->buffer,(unsigned long)req->buffer + len); ARAM_StartDMA((unsigned long)req->buffer,start+ARAM_SOUNDMEMORYOFFSET, len,ARAM_WRITE); @@ -234,11 +242,13 @@ static struct request_queue *aram_queue; +#if 0 static irqreturn_t aram_interrupt(int irq, void *dev_id, struct pt_regs * regs) { printk("interrupt received\n"); return 0; } +#endif int __init aram_init(void) { @@ -267,12 +277,18 @@ add_disk(aram_gendisk); spin_lock_init(&aram_lock); - + +#if 0 ret = request_irq(5, aram_interrupt, 0,aram_gendisk->disk_name, aram_gendisk); if (ret) { //BBA_DBG(KERN_ERR "%s: unable to get IRQ %d\n", dev->name, dev->irq); return ret; } +#endif + +#define AUDIO_DSP_CONTROL *(volatile u_int16_t *)(0xCC00500a) +#define AI_CSR_ARINTMASK (1<<6) + AUDIO_DSP_CONTROL &= ~AI_CSR_ARINTMASK; #ifdef RAMDISK RAMDISKBuffer = kmalloc(ARAM_BUFFERSIZE,GFP_KERNEL); |
From: <he...@us...> - 2004-06-25 16:47:49
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3247 Added Files: gc-net.c Log Message: Added new gc-net driver. The new driver has a known race with the existing time driver. The cause is the duplicated exi handling routines, and the fact that the routines that the time driver uses are not correctly protected. |
From: <he...@us...> - 2004-06-25 16:43:59
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3016 Removed Files: exi.h gc-net.c Log Message: Removed old gc-net driver. --- exi.h DELETED --- --- gc-net.c DELETED --- |
From: <st...@us...> - 2004-06-24 19:55:51
|
Update of /cvsroot/gc-linux/linux/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32317 Modified Files: gamecube_si.c Log Message: - Added rumbling for standard pads as forcefeedback effect. Index: gamecube_si.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/gamecube_si.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gamecube_si.c 23 Jun 2004 14:01:47 -0000 1.1 +++ gamecube_si.c 24 Jun 2004 19:55:42 -0000 1.2 @@ -65,7 +65,6 @@ typedef struct { - unsigned char key[3]; unsigned char old[3]; } keyboardStatus; @@ -177,10 +176,22 @@ +static void setRumbling (unsigned char portNo, unsigned char rumble) { + if (rumble) { + writel (0x00400001, SICOUTBUF (portNo)); + writel (0x80000000, SISR); + } else { + writel (0x00400000, SICOUTBUF (portNo)); + writel (0x80000000, SISR); + } +} + + static void gcSiTimer (unsigned long portNo) { int i; unsigned long raw[2]; + unsigned char key[3]; raw[0] = readl (SICINBUFH (portNo)); raw[1] = readl (SICINBUFL (portNo)); @@ -228,28 +239,26 @@ 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; + key[0] = (raw[0] >> 12) & 0xFF; + key[1] = (raw[0] >> 4) & 0xFF; + key[2] = (raw[0] << 4) & 0xFF; + 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); + unsigned char oldKey = port[portNo].keyboard.old[i]; + if (oldKey != key[0] && + oldKey != key[1] && + oldKey != key[2]) + input_report_key (&port[portNo].inputDev, gamecube_keymap[oldKey], 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); + if (key[i]) + input_report_key (&port[portNo].inputDev, gamecube_keymap[key[i]], 1); - port[portNo].keyboard.old[i] = port[portNo].keyboard.key[i]; + port[portNo].keyboard.old[i] = key[i]; } break; @@ -287,6 +296,18 @@ +static int gcSiEvent (struct input_dev *dev, unsigned int type, unsigned int code, int value) { + int portNo = (int)dev->private; + + if (type == EV_FF) + if (code == FF_RUMBLE) + setRumbling (portNo, value); + + return value; +} + + + static int __init gcSiInit(void) { int i; @@ -319,7 +340,7 @@ 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; @@ -328,6 +349,7 @@ set_bit (EV_KEY, port[i].inputDev.evbit); set_bit (EV_ABS, port[i].inputDev.evbit); + set_bit (EV_FF, port[i].inputDev.evbit); set_bit (BTN_A, port[i].inputDev.keybit); set_bit (BTN_B, port[i].inputDev.keybit); @@ -386,6 +408,12 @@ port[i].inputDev.absfuzz[ABS_BRAKE] = 16; port[i].inputDev.absflat[ABS_BRAKE] = 16; + // rumbling + set_bit (FF_RUMBLE, port[i].inputDev.ffbit); + port[i].inputDev.event = gcSiEvent; + + port[i].inputDev.ff_effects_max = 1; + input_register_device (&port[i].inputDev); break; |
From: <st...@us...> - 2004-06-23 19:58:50
|
Update of /cvsroot/gc-linux/linux/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19212 Modified Files: Kconfig Log Message: Fixed space/tab mess Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/Kconfig,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Kconfig 23 Jun 2004 14:01:47 -0000 1.1 +++ Kconfig 23 Jun 2004 19:58:25 -0000 1.2 @@ -137,14 +137,14 @@ comment "Input I/O drivers" config GAMECUBE_SI - tristate "Gamecube SI driver" + 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. + 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. + 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" |
From: <he...@us...> - 2004-06-23 17:59:04
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27159 Modified Files: util.S Log Message: Commented GameCube specific code. Removed unused commented-out code and non-visited code. Index: util.S =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/common/util.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- util.S 24 Apr 2004 18:31:43 -0000 1.2 +++ util.S 23 Jun 2004 17:58:55 -0000 1.3 @@ -47,35 +47,56 @@ #endif #ifdef CONFIG_GAMECUBE -// li r8, MSR_IP|MSR_FP -// mtsrr1 r8 -// lis r8, mmu_disabled@h -// ori r8, r8, mmu_disabled@l -// clrlwi r8, r8, 2 -// mtsrr0 r8 -// rfi +/* + * The code itself seems to be a kind of signature from tmbinc, + * as all this stuff is strictly not needed... + * I've rearranged the code a little bit for readability purposes. + * --Albert Herranz + */ + /* + * To disable the MMU the author executes a System Call (sc) which + * sets MSR[IR] = MSR[DR] = 0, effectively disabling the MMU. + * + * In order to return from the system call he setups a dummy System + * Call Exception vector with an absolute branch back to his code. + * + * NOTE: The vector contains *code* not *address of code* !!! + * + */ -// mmu_disabled: + /* save for later... */ + mflr r8 - lis r9, 0x8000 - ori r9, r9, 0xc00 - mflr r8 - bl 1f + /* calculate address of label 2: to jump to */ + bl 1f 1: - mflr r7 - clrlwi r7, r7, 3 - addi r7, r7, 2f - 1b - oris r7, r7, 0x4800 - ori r7, r7, 2 - stw r7, 0(r9) - dcbf r0, r9 - icbi r0, r9 + mflr r7 + addi r7, r7, 2f - 1b + + /* convert it to physical layout (in sc context the mmu will be off) */ + clrlwi r7, r7, 3 + + /* convert it to an absolute branch instruction */ + oris r7, r7, 0x4800 + ori r7, r7, 2 + + /* System Call Exception vector effective address is 0x80000c00 */ + lis r9, 0x8000 + ori r9, r9, 0x0c00 + + /* store branch at System Call Exception vector and flush caches */ + stw r7, 0(r9) + dcbf 0, r9 + icbi 0, r9 sync isync + + /* switch MMU off and jump to 2: */ sc 2: + /* restore Link Register in physical address layout */ + clrlwi r8, r8, 3 mtlr r8 -// isync #endif /* Clear BATs */ @@ -121,18 +142,13 @@ addi r8,r8,0x111 /* increment VSID */ addis r10,r10,0x1000 /* address of next segment */ bdnz 3b -#ifdef CONFIG_GAMECUBE - mflr r8 - clrlwi r8, r8, 3 - mtlr r8 -#endif blr .globl disable_6xx_l1cache disable_6xx_l1cache: /* Enable, invalidate and then disable the L1 icache/dcache. */ li r8,0 - ori r8,r8,(HID0_ICE|HID0_DCE|HID0_ICFI|HID0_DCI |HID0_DLOCK) + ori r8,r8,(HID0_ICE|HID0_DCE|HID0_ICFI|HID0_DCI) mfspr r11,HID0 or r11,r11,r8 andc r10,r11,r8 @@ -144,19 +160,6 @@ sync isync blr -#ifdef CONFIG_GAMECUBE - sync - mfspr r8, HID0 - li r11, HID0_DCI|HID0_DLOCK - andc r8, r8, r11 - mtspr HID0, r8 /* no invalidate, unlock */ - li r5, HID0_DCE|HID0_DCI - andc r8, r8, r11 /* no enable, no invalidate */ - mtspr HID0, r8 - sync - isync - blr -#endif .globl _setup_L2CR _setup_L2CR: |