From: <he...@us...> - 2005-01-06 19:58:09
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25422/arch/ppc/platforms Modified Files: gamecube.c gamecube.h Log Message: We use now the new generic hard irq subsystem, thus we need to add the necessary irq hooks. Add new __iomem anotations to avoid compiler warnings. Do not use a potentially dangerous changing memory map due to changes in the size (number of lines) of the framebuffer. Do not reserve memory for non configured options. Update copyright dates. Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- gamecube.c 4 Jan 2005 23:30:44 -0000 1.27 +++ gamecube.c 6 Jan 2005 19:57:53 -0000 1.28 @@ -2,7 +2,7 @@ * arch/ppc/platforms/gamecube.c * * Nintendo GameCube board-specific support - * Copyright (C) 2004 The GameCube Linux Team + * Copyright (C) 2004-2005 The GameCube Linux Team * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -105,11 +105,19 @@ set_bit(irq, FLIPPER_IMR); } +static void flipper_end_irq(unsigned int irq) +{ + if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)) + && irq_desc[irq].action) + flipper_unmask_irq(irq); +} + static struct hw_interrupt_type flipper_pic = { .typename = " FLIPPER-PIC ", .enable = flipper_unmask_irq, .disable = flipper_mask_irq, .ack = flipper_mask_and_ack_irq, + .end = flipper_end_irq, }; static void __init gamecube_init_IRQ(void) Index: gamecube.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- gamecube.h 4 Jan 2005 23:30:44 -0000 1.11 +++ gamecube.h 6 Jan 2005 19:57:53 -0000 1.12 @@ -2,7 +2,7 @@ * arch/ppc/platforms/gamecube.h * * Nintendo GameCube board-specific definitions - * Copyright (C) 2004 The GameCube Linux Team + * Copyright (C) 2004-2005 The GameCube Linux Team * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -25,13 +25,13 @@ * asserting the corresponding bit in ICR. */ #define FLIPPER_NR_IRQS (14) -#define FLIPPER_ICR ((volatile ulong *)0xcc003000) -#define FLIPPER_IMR ((volatile ulong *)0xcc003004) +#define FLIPPER_ICR ((void __iomem *)0xcc003000) +#define FLIPPER_IMR ((void __iomem *)0xcc003004) /* * Anything written here automagically puts us through reset. */ -#define FLIPPER_RESET ((volatile ulong *)0xcc003024) +#define FLIPPER_RESET ((void __iomem *)0xcc003024) /* * This is the current memory layout for the GameCube Linux port. @@ -44,7 +44,7 @@ * . . * . . * +------------------------------+ GCN_XFB_START - * | GX Fifo reserved 256k | GCN_GX_FIFO_END + * | GX FIFO reserved 256k | GCN_GX_FIFO_END * . . * +------------------------------+ GCN_GX_FIFO_START * | kexec reserved 4x4096 bytes | GCN_KXC_END @@ -64,18 +64,44 @@ */ /* - * Some useful sizes + * XXX + * It seems not a good idea to hot change the memory map by simply + * changing a video register. + * Be conservative here, and assume we're using (or will use) the bigger + * of the two framebuffer sizes supported. + */ +//#define GCN_VIDEO_REG (*((volatile u16*)0xCC002002)) +//#define GCN_VIDEO_LINES (((GCN_VIDEO_REG >> 8) & 3) ? 576 : 480) +#define GCN_VIDEO_LINES 576 + +/* + * Total amount of RAM found in the system */ -#define GCN_VIDEO_REG (*((volatile u16*)0xCC002002)) -#define GCN_VIDEO_LINES (((GCN_VIDEO_REG >> 8) & 3) ? 576 : 480) -#define GCN_GX_FIFO_SIZE (256*1024) #define GCN_RAM_SIZE (24*1024*1024) /* 24 MB */ -#define GCN_XFB_SIZE (640*GCN_VIDEO_LINES*4) /* framebuffer */ + +/* + * Size of reserved memory for the video subsystem + */ +#ifdef CONFIG_FB_GAMECUBE + #define GCN_XFB_SIZE (2*640*GCN_VIDEO_LINES*2) /* framebuffer */ + #define GCN_GX_FIFO_SIZE (256*1024) +#else + #define GCN_XFB_SIZE (0) + #define GCN_GX_FIFO_SIZE (0) +#endif + +/* + * Size of reserved memory for kexec compatibility with some homebrew DOLs + */ #ifdef CONFIG_KEXEC #define GCN_KXC_SIZE (4*4096) /* PAGE_ALIGN(GCN_PRESERVE_SIZE) */ #else #define GCN_KXC_SIZE (0) #endif + +/* + * Amount of useable memory + */ #define GCN_MEM_SIZE (GCN_MEM_END+1) /* @@ -102,8 +128,8 @@ /* * These registers control where the visible framebuffer is located. */ -#define GCN_VI_TFBL 0xcc00201c -#define GCN_VI_BFBL 0xcc002024 +#define GCN_VI_TFBL ((void __iomem *)0xcc00201c) +#define GCN_VI_BFBL ((void __iomem *)0xcc002024) /* arch/ppc/platforms/gcn-time.c */ |