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-10-19 23:55:53
|
Update of /cvsroot/gc-linux/linux/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2920/drivers/input Modified Files: Kconfig Makefile Added Files: gcn-keymap.h gcn-si.c Removed Files: gamecube_keymap.h gamecube_si.c Log Message: - Made the Serial Interface driver depend on GAMECUBE. - Renamed gamecube_keymap.h as gcn-keymap.h. - Renamed gamecube_si.c as gcn-si.c. Also renamed parts of the code accordingly and sanitized comments. Changed slightly the way input devices are reported on init. --- NEW FILE: gcn-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: gcn-si.c --- /* * drivers/input/gcn-si.c * * Nintendo GameCube Serial Interface driver * Copyright (C) 2004 Steven Looman * Copyright (C) 2004 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 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ /* #define SI_DEBUG */ #include <linux/module.h> #include <linux/init.h> #include <linux/input.h> #include <linux/ioport.h> #include <linux/timer.h> #include <linux/delay.h> #include <asm/io.h> #ifdef SI_DEBUG # define DPRINTK(fmt, args...) \ printk(KERN_ERR "%s: " fmt, __FUNCTION__ , ## args) #else # define DPRINTK(fmt, args...) #endif #define DRV_MODULE_NAME "gcn-si" #define DRV_DESCRIPTION "Nintendo GameCube Serial Interface driver" #define DRV_AUTHOR "Steven Looman <st...@kr...>" MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_AUTHOR(DRV_AUTHOR); MODULE_LICENSE(GPL); #define PFX DRV_MODULE_NAME ": " #define si_printk(level, format, arg...) \ printk(level PFX format , ## arg) /* * This keymap is for a datel adapter + normal US keyboard. */ #include "gcn-keymap.h" #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) static struct resource gcn_si_resources = { "GCN SI", 0xcc006400, 0xcc006500, IORESOURCE_MEM | IORESOURCE_BUSY }; typedef struct { unsigned char old[3]; } keyboard_status; struct { unsigned int id; unsigned int raw[2]; #if 0 unsigned char errStat:1; unsigned char errLatch:1; #endif struct input_dev idev; struct timer_list timer; union { keyboard_status keyboard; }; char name[32]; /* char phys[32]; */ } port[4]; /** * */ static void gcn_si_reset(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 gcn_si_wait_transfer_done(void) { unsigned long transfer_done; do { transfer_done = readl(SICOMCSR) & (1 << 31); } while (!transfer_done); writel(readl(SICOMCSR) |= (1 << 31), SICOMCSR); /* ack IRQ */ } /** * */ static unsigned long gcn_si_get_controller_id(int port) { gcn_si_reset(); writel(0, SIPOLL); writel(0, SICOUTBUF(port)); writel(0x80000000, SISR); writel(0xd0010001 | port << 1, SICOMCSR); gcn_si_wait_transfer_done(); return readl(0xcc006480); } /** * */ static void gcn_si_set_polling(void) { unsigned long pad_bits = 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; } pad_bits |= 1 << (7 - i); } writel(0x00F70200 | pad_bits, SIPOLL); writel(0x80000000, SISR); writel(0xC0010801, SICOMCSR); gcn_si_wait_transfer_done(); } /** * */ static void gcn_si_set_rumbling(int portno, int rumble) { if (rumble) { writel(0x00400001, SICOUTBUF(portno)); writel(0x80000000, SISR); } else { writel(0x00400000, SICOUTBUF(portno)); writel(0x80000000, SISR); } } /** * */ static void gcn_si_timer(unsigned long portno) { unsigned long raw[2]; unsigned char key[3]; unsigned char oldkey; int i; raw[0] = readl(SICINBUFH(portno)); raw[1] = readl(SICINBUFL(portno)); switch (port[portno].id) { case ID_PAD: /* buttons */ input_report_key(&port[portno].idev, BTN_A, raw[0] & PAD_A); input_report_key(&port[portno].idev, BTN_B, raw[0] & PAD_B); input_report_key(&port[portno].idev, BTN_X, raw[0] & PAD_X); input_report_key(&port[portno].idev, BTN_Y, raw[0] & PAD_Y); input_report_key(&port[portno].idev, BTN_Z, raw[0] & PAD_Z); input_report_key(&port[portno].idev, BTN_TL, raw[0] & PAD_LT); input_report_key(&port[portno].idev, BTN_TR, raw[0] & PAD_RT); input_report_key(&port[portno].idev, BTN_START, raw[0] & PAD_START); /* axis */ /* a stick */ input_report_abs(&port[portno].idev, ABS_X, (raw[0] >> 8) & 0xFF); input_report_abs(&port[portno].idev, ABS_Y, -(raw[0] >> 0) & 0xFF); /* b pad */ if (raw[0] & PAD_RIGHT) input_report_abs(&port[portno].idev, ABS_HAT0X, 1); else if (raw[0] & PAD_LEFT) input_report_abs(&port[portno].idev, ABS_HAT0X, -1); else input_report_abs(&port[portno].idev, ABS_HAT0X, 0); if (raw[0] & PAD_UP) input_report_abs(&port[portno].idev, ABS_HAT0Y, 1); else if (raw[0] & PAD_DOWN) input_report_abs(&port[portno].idev, ABS_HAT0Y, -1); else input_report_abs(&port[portno].idev, ABS_HAT0Y, 0); /* c stick */ input_report_abs(&port[portno].idev, ABS_RX, raw[1] >> 24 & 0xFF); input_report_abs(&port[portno].idev, ABS_RY, raw[1] >> 16 & 0xFF); /* triggers */ input_report_abs(&port[portno].idev, ABS_BRAKE, raw[1] >> 8 & 0xFF); input_report_abs(&port[portno].idev, ABS_GAS, raw[1] >> 0 & 0xFF); break; case ID_KEYBOARD: 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) { oldkey = port[portno].keyboard.old[i]; if (oldkey != key[0] && oldkey != key[1] && oldkey != key[2]) input_report_key(&port[portno].idev, gamecube_keymap[oldkey], 0); } /* report keys */ for (i = 0; i < 3; ++i) { if (key[i]) input_report_key(&port[portno].idev, gamecube_keymap[key[i]], 1); port[portno].keyboard.old[i] = key[i]; } break; default: break; } input_sync(&port[portno].idev); mod_timer(&port[portno].timer, jiffies + REFRESH_TIME); } /** * */ static int gcn_si_open(struct input_dev *idev) { int portno = (int)idev->private; init_timer(&port[portno].timer); port[portno].timer.function = gcn_si_timer; port[portno].timer.data = (int)idev->private; port[portno].timer.expires = jiffies + REFRESH_TIME; add_timer(&port[portno].timer); return 0; } /** * */ static void gcn_si_close(struct input_dev *idev) { int portno = (int)idev->private; del_timer(&port[portno].timer); } /** * */ static int gcn_si_event(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) { gcn_si_set_rumbling(portno, value); } } return value; } /** * */ static int __init gcn_si_init(void) { int i; si_printk(KERN_INFO, "%s\n", DRV_DESCRIPTION); if (request_resource(&iomem_resource, &gcn_si_resources) < 0) { printk(KERN_WARNING PFX "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 = gcn_si_get_controller_id(i) >> 16; DPRINTK("port[%d] = 0x%x\n", i, port[i].id); init_input_dev(&port[i].idev); port[i].idev.open = gcn_si_open; port[i].idev.close = gcn_si_close; port[i].idev.private = (unsigned int *)i; switch (port[i].id) { case ID_PAD: sprintf(port[i].name, "standard pad"); /* sprintf (port[i].phys, "gcsi/port%d", i); */ /* port[i].idev.phys = port[i].phys; */ set_bit(EV_KEY, port[i].idev.evbit); set_bit(EV_ABS, port[i].idev.evbit); set_bit(EV_FF, port[i].idev.evbit); set_bit(BTN_A, port[i].idev.keybit); set_bit(BTN_B, port[i].idev.keybit); set_bit(BTN_X, port[i].idev.keybit); set_bit(BTN_Y, port[i].idev.keybit); set_bit(BTN_Z, port[i].idev.keybit); set_bit(BTN_TL, port[i].idev.keybit); set_bit(BTN_TR, port[i].idev.keybit); set_bit(BTN_START, port[i].idev.keybit); /* a stick */ set_bit(ABS_X, port[i].idev.absbit); port[i].idev.absmin[ABS_X] = 0; port[i].idev.absmax[ABS_X] = 255; port[i].idev.absfuzz[ABS_X] = 8; port[i].idev.absflat[ABS_X] = 8; set_bit(ABS_Y, port[i].idev.absbit); port[i].idev.absmin[ABS_Y] = 0; port[i].idev.absmax[ABS_Y] = 255; port[i].idev.absfuzz[ABS_Y] = 8; port[i].idev.absflat[ABS_Y] = 8; /* b pad */ set_bit(ABS_HAT0X, port[i].idev.absbit); port[i].idev.absmin[ABS_HAT0X] = -1; port[i].idev.absmax[ABS_HAT0X] = 1; set_bit(ABS_HAT0Y, port[i].idev.absbit); port[i].idev.absmin[ABS_HAT0Y] = -1; port[i].idev.absmax[ABS_HAT0Y] = 1; /* c stick */ set_bit(ABS_RX, port[i].idev.absbit); port[i].idev.absmin[ABS_RX] = 0; port[i].idev.absmax[ABS_RX] = 255; port[i].idev.absfuzz[ABS_RX] = 8; port[i].idev.absflat[ABS_RX] = 8; set_bit(ABS_RY, port[i].idev.absbit); port[i].idev.absmin[ABS_RY] = 0; port[i].idev.absmax[ABS_RY] = 255; port[i].idev.absfuzz[ABS_RY] = 8; port[i].idev.absflat[ABS_RY] = 8; /* triggers */ set_bit(ABS_GAS, port[i].idev.absbit); port[i].idev.absmin[ABS_GAS] = -255; port[i].idev.absmax[ABS_GAS] = 255; port[i].idev.absfuzz[ABS_GAS] = 16; port[i].idev.absflat[ABS_GAS] = 16; set_bit(ABS_BRAKE, port[i].idev.absbit); port[i].idev.absmin[ABS_BRAKE] = -255; port[i].idev.absmax[ABS_BRAKE] = 255; port[i].idev.absfuzz[ABS_BRAKE] = 16; port[i].idev.absflat[ABS_BRAKE] = 16; /* rumbling */ set_bit(FF_RUMBLE, port[i].idev.ffbit); port[i].idev.event = gcn_si_event; port[i].idev.ff_effects_max = 1; input_register_device(&port[i].idev); break; case ID_KEYBOARD: sprintf(port[i].name, "keyboard"); set_bit(EV_KEY, port[i].idev.evbit); set_bit(EV_REP, port[i].idev.evbit); for (j = 0; j < 255; ++j) set_bit(gamecube_keymap[j], port[i].idev.keybit); input_register_device(&port[i].idev); break; default: /* unknown device */ if (port[i].id) sprintf(port[i].name, "unknown (%x)", port[i].id); else sprintf(port[i].name, "not present"); break; } port[i].idev.name = port[i].name; si_printk(KERN_INFO, "Port %d: %s\n", i, port[i].name); } gcn_si_set_polling(); return 0; } /** * */ static void __exit gcn_si_exit(void) { int i; si_printk(KERN_INFO, "exit\n"); for (i = 0; i < 4; ++i) { if (port[i].id == ID_PAD || port[i].id == ID_KEYBOARD) { input_unregister_device(&port[i].idev); } } release_resource(&gcn_si_resources); } module_init(gcn_si_init); module_exit(gcn_si_exit); Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/Kconfig,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Kconfig 23 Jun 2004 19:58:25 -0000 1.2 +++ Kconfig 19 Oct 2004 23:55:27 -0000 1.3 @@ -137,7 +137,8 @@ comment "Input I/O drivers" config GAMECUBE_SI - tristate "Gamecube SI driver" + tristate "Nintendo GameCube Serial Interface" + depends on GAMECUBE ---help--- Say Y here if you want to use the standard pads as joysticks or want to use a keyboard. Everything is autodetected. Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/input/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 23 Jun 2004 14:01:47 -0000 1.1 +++ Makefile 19 Oct 2004 23:55:42 -0000 1.2 @@ -18,4 +18,4 @@ obj-$(CONFIG_INPUT_TOUCHSCREEN) += touchscreen/ obj-$(CONFIG_INPUT_MISC) += misc/ -obj-$(CONFIG_GAMECUBE_SI) += gamecube_si.o +obj-$(CONFIG_GAMECUBE_SI) += gcn-si.o --- gamecube_keymap.h DELETED --- --- gamecube_si.c DELETED --- |
From: <he...@us...> - 2004-10-19 23:47:19
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1330/drivers/block Modified Files: Kconfig Makefile Added Files: gcn-aram.c gcn-memcard.c Removed Files: gc_aram.c gc_memcard.c Log Message: - Basically renamed gc_aram.c to gcn-aram.c and gc_memcard.c to gcn-memcard.c. --- NEW FILE: gcn-aram.c --- /* * drivers/block/gcn-aram.c * * Nintendo GameCube ARAM block device * Copyright (C) 2004 The GameCube Linux Team * * Based on previous work by Franz Lehner, apparently inspired on: * z2ram.c * Copyright (C) 1994 by Ingo Wilken (Ing...@in...) * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #define DEVICE_NAME "ARAM" #include <linux/major.h> #include <linux/vmalloc.h> #include <linux/init.h> #include <linux/module.h> #include <linux/blkdev.h> #include <linux/delay.h> #include <asm/setup.h> #include <asm/bitops.h> #include <asm/pgtable.h> #include <asm/cacheflush.h> #include <linux/interrupt.h> #include <linux/fcntl.h> /* O_ACCMODE */ #include <linux/hdreg.h> /* HDIO_GETGEO */ #define ARAM_MAJOR Z2RAM_MAJOR #define TRUE (1) #define FALSE (0) //#define ARAM_DBG printk #define ARAM_DBG(format, arg...); { } //#define RAMDISK #undef RAMDISK #ifdef RAMDISK unsigned char *RAMDISKBuffer; #define ARAM_BUFFERSIZE 10*1024 #else #define ARAM_BUFFERSIZE 14*1024*1024 #define ARAM_SOUNDMEMORYOFFSET 1024*1024 //#define ARAM_BLOCKSIZE 1024 #endif static int current_device = -1; static spinlock_t aram_lock = SPIN_LOCK_UNLOCKED; extern void flush_cache(void *start, unsigned int len); static struct block_device_operations aram_fops; static struct gendisk *aram_gendisk; #define AR_DMA_MMADDR_H *(unsigned short*)0xCC005020 #define AR_DMA_MMADDR_L *(unsigned short*)0xCC005022 #define AR_DMA_ARADDR_H *(unsigned short*)0xCC005024 #define AR_DMA_ARADDR_L *(unsigned short*)0xCC005026 #define AR_DMA_CNT_H *(unsigned short*)0xCC005028 #define AR_DMA_CNT_L *(unsigned short*)0xCC00502A #define AI_DSP_STATUS *(volatile unsigned short*)0xCC00500A #define ARAM_READ 1 #define ARAM_WRITE 0 void ARAM_StartDMA(unsigned long mmAddr, unsigned long arAddr, unsigned long length, unsigned long type) { //printk("ARAM DMA copy -> %08x - %08x - %d %d\n",mmAddr,arAddr,length,type); AR_DMA_MMADDR_H = mmAddr >> 16; AR_DMA_MMADDR_L = mmAddr & 0xFFFF; AR_DMA_ARADDR_H = arAddr >> 16; AR_DMA_ARADDR_L = arAddr & 0xFFFF; AR_DMA_CNT_H = (type << 15) | (length >> 16); AR_DMA_CNT_L = length & 0xFFFF; // We wait, until DMA finished while (AI_DSP_STATUS & 0x200) ; } /* echo YUHUUhello1234567890hello12345678901234567890CCC > /dev/aram dd if=/dev/aram cat /dev/aram | wc -c */ static void do_aram_request(request_queue_t * q) { struct request *req; blk_stop_queue(q); spin_lock(&aram_lock); while ((req = elv_next_request(q)) != NULL) { unsigned long start = req->sector << 9; unsigned long len = req->current_nr_sectors << 9; if (start + len > ARAM_BUFFERSIZE) { printk(KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", (unsigned long)req->sector, req->current_nr_sectors); end_request(req, 0); continue; } #ifdef RAMDISK if (rq_data_dir(req) == READ) { memcpy(req->buffer, (char *)&RAMDISKBuffer[start], len); } else { memcpy((char *)&RAMDISKBuffer[start], req->buffer, len); } #else if (rq_data_dir(req) == READ) { //memset(req->buffer,0,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); 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); } #endif end_request(req, 1); } spin_unlock(&aram_lock); blk_start_queue(q); } static int aram_open(struct inode *inode, struct file *filp) { ARAM_DBG("A-RAM Open device\n"); int device; int rc = -ENOMEM; device = iminor(inode); if (current_device != -1 && current_device != device) { rc = -EBUSY; goto err_out; } #ifdef RAMDISK if (current_device == -1) { current_device = device; set_capacity(aram_gendisk, ARAM_BUFFERSIZE >> 9); } #endif return 0; err_out: ARAM_DBG("A-RAM Open device Error %d\n", rc); return rc; } /* mkfs.minix /dev/aram mount -t minix /dev/aram /mnt/ dd if=/dev/urandom bs=1M count=10 > /mnt/test.bin dd if=/dev/urandom bs=1M count=1 > /mnt/test1.bin */ static int aram_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { ARAM_DBG("A-RAM IOCTL\n"); if (cmd == HDIO_GETGEO) { struct hd_geometry geo; /* * get geometry: we have to fake one... trim the size to a * multiple of 2048 (1M): tell we have 32 sectors, 64 heads, * whatever cylinders. */ geo.heads = 64; geo.sectors = 32; geo.start = 0; geo.cylinders = ARAM_BUFFERSIZE / (geo.heads * geo.sectors); if (copy_to_user((void *)arg, &geo, sizeof(geo))) return -EFAULT; return 0; } return -EINVAL; } static int aram_release(struct inode *inode, struct file *filp) { ARAM_DBG("A-RAM Close device\n"); if (current_device == -1) return 0; return 0; } static int aram_revalidate(struct gendisk *disk) { set_capacity(disk, ARAM_BUFFERSIZE >> 9); return 0; } static struct block_device_operations aram_fops = { .owner = THIS_MODULE, .open = aram_open, .release = aram_release, .revalidate_disk = aram_revalidate, .ioctl = aram_ioctl, }; 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) { int ret; printk("A-Ram Block Device Driver Init\n"); ret = -EBUSY; if (register_blkdev(ARAM_MAJOR, DEVICE_NAME)) goto err; ret = -ENOMEM; aram_gendisk = alloc_disk(1); if (!aram_gendisk) goto out_disk; aram_queue = blk_init_queue(do_aram_request, &aram_lock); if (!aram_queue) goto out_queue; aram_gendisk->major = ARAM_MAJOR; aram_gendisk->first_minor = 0; aram_gendisk->fops = &aram_fops; sprintf(aram_gendisk->disk_name, "aram"); strcpy(aram_gendisk->devfs_name, aram_gendisk->disk_name); aram_gendisk->queue = aram_queue; set_capacity(aram_gendisk, ARAM_BUFFERSIZE >> 9); 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); #endif return 0; out_queue: put_disk(aram_gendisk); out_disk: unregister_blkdev(ARAM_MAJOR, DEVICE_NAME); err: return ret; } void __exit aram_cleanup(void) { blk_unregister_region(MKDEV(ARAM_MAJOR, 0), 256); if (unregister_blkdev(ARAM_MAJOR, DEVICE_NAME) != 0) printk(KERN_ERR DEVICE_NAME ": unregister of device failed\n"); del_gendisk(aram_gendisk); put_disk(aram_gendisk); blk_cleanup_queue(aram_queue); #ifdef RAMDISK kfree(RAMDISKBuffer); #endif return; } MODULE_LICENSE("GPL"); module_init(aram_init); module_exit(aram_cleanup); --- NEW FILE: gcn-memcard.c --- /* * drivers/block/gcn-memcard.c * * Nintendo GameCube Memory Card block driver * Copyright (C) 2004 The GameCube Linux Team * * Based on work from Torben Nielsen. * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #define DEVICE_NAME "memcard" #include <linux/major.h> #include <linux/vmalloc.h> #include <linux/init.h> #include <linux/module.h> #include <linux/moduleparam.h> #include <linux/blkdev.h> #include <linux/delay.h> #include <linux/interrupt.h> #include <linux/fcntl.h> /* O_ACCMODE */ #include <linux/hdreg.h> /* HDIO_GETGEO */ #include <linux/exi.h> #include <asm/setup.h> #include <asm/bitops.h> #include <asm/pgtable.h> #include <asm/cacheflush.h> #define MEMCARD_MAX_UNITS 2 static int major_num = 0; module_param(major_num, int, 0); #define TRUE (1) #define FALSE (0) static int curr_card_sector[MEMCARD_MAX_UNITS] = { -1, -1 }; static int card_sector_mask[MEMCARD_MAX_UNITS] = { 0, 0 }; static int current_device = -1; static spinlock_t memcard_lock = SPIN_LOCK_UNLOCKED; static struct block_device_operations memcard_fops; static struct gendisk *memcard_gendisk[MEMCARD_MAX_UNITS]; static unsigned char *card_sector_buffer[MEMCARD_MAX_UNITS]; #define MEMCARD_READ 1 #define MEMCARD_WRITE 0 #define ALLOW_WRITE #define CARD_SECTOR_SIZE 0x2000 /*#define CARD_DBG printk*/ #define CARD_DBG(format, arg...); { } /* MemCard commands originally by Costis */ #define CARD_FILENAME 32 #define CARD_MAXFILES 127 #define CARD_MAXICONS 8 #define CARD_READSIZE 512 #define CARD_SECTORSIZE 8192 #define CARD_SLOTA 0 #define CARD_SLOTB 1 #define CARD_SYSAREA 5 #define CARD_WRITESIZE 128 #define EXI_CONTROL_TYPE_READ 0 #define EXI_CONTROL_TYPE_WRITE 1 #define EXI_STATUS0 *(unsigned long*)0xCC006800 #define EXI_DMABUF0 *(unsigned long*)0xCC006804 #define EXI_DMALEN0 *(unsigned long*)0xCC006808 #define EXI_DMACNT0 *(unsigned long*)0xCC00680C #define EXI_CONTROL_DMA 2 #define EXI_CONTROL_ENABLE 1 static int exi_probe(unsigned long channel) { if (*(unsigned long *) (&EXI_STATUS0 + (channel * 5)) & 0x1000) return 1; else return 0; } static unsigned long exi_retrieve_id(unsigned long channel, unsigned long device) { unsigned long tID; if (exi_probe(channel)) { /* Select the specified EXI channel and device. */ exi_select(channel, device, 0); /* Send the EXI ID command (0x0000) */ tID = 0; exi_write(channel, (unsigned char *) &tID, 2); /* Read the actual ID data (4 bytes) */ exi_read(channel, (unsigned char *) &tID, 4); /* Deselect the selected EXI device. */ exi_deselect(channel); return tID; } else { return 0; } } /* Determines if a memcard is present in the given slot. */ static int card_is_present(unsigned long channel) { unsigned long id; id = exi_retrieve_id(channel, 0); if (id & 0xffff0000 || id & 3) return 0; return id; } /** Channel must be from 0 to 2. Buffer must be aligned to a 32-bit offset. Size must be a multiple of 32 bytes. Type must be either EXI_CONTROL_TYPE_READ or EXI_CONTROL_TYPE_WRITE. */ static void exi_dma(unsigned long channel, unsigned char *abuffer, unsigned long size, unsigned long type) { /* EXI DMA Operation */ *(unsigned long *) (&EXI_DMABUF0 + (channel * 5)) = (unsigned long) abuffer & 0x3FFFFE0; *(unsigned long *) (&EXI_DMALEN0 + (channel * 5)) = size & 0x3FFFFE0; *(unsigned long *) (&EXI_DMACNT0 + (channel * 5)) = EXI_CONTROL_ENABLE | EXI_CONTROL_DMA | (type << 2); /* Wait until the EXI DMA operation has been completed. */ while (*(volatile unsigned long *) (&EXI_DMACNT0 + channel * 5) & EXI_CONTROL_ENABLE); return; } static unsigned char card_read_status(unsigned long channel) { unsigned char cbuf[4]; /* Select the specified EXI channel and device. */ exi_select(channel, 0, 4); /* Send the EXI ID command (0x83xx) */ cbuf[0] = 0x83; /* Command Byte */ cbuf[1] = 0x00; exi_write(channel, cbuf, 2); /* Read the actual ID data (2 bytes) */ exi_read(channel, cbuf, 1); /* Deselect the selected EXI device. */ exi_deselect(channel); return cbuf[0]; } static void card_read_array(unsigned long channel, unsigned char *abuf, unsigned long address, unsigned long size) { int i; unsigned char cbuf[4]; unsigned char *bbuf = abuf; for (i = 0; i < size / CARD_READSIZE; i++) { /* Check if the card is ready */ while (!(card_read_status(channel) & 1)); /* Select the specified EXI channel and device. */ exi_select(channel, 0, 4); /* Send the EXI Sector Read command (0x52xxxxxx) */ cbuf[0] = 0x52; /* Command Byte */ cbuf[1] = (address >> 17) & 0x3F; cbuf[2] = (address >> 9) & 0xFF; cbuf[3] = (address >> 7) & 3; exi_write(channel, cbuf, 4); cbuf[0] = address & 0x7F; exi_write(channel, cbuf, 1); cbuf[0] = 0; cbuf[1] = 0; cbuf[2] = 0; cbuf[3] = 0; exi_write(channel, cbuf, 4); exi_dma(channel, bbuf, CARD_READSIZE, EXI_CONTROL_TYPE_READ); /* Deselect the selected EXI device. */ exi_deselect(channel); address += CARD_READSIZE; bbuf += CARD_READSIZE; } } static void card_sector_erase(unsigned long channel, unsigned long sector) { unsigned char cbuf[3]; /* Check if the card is ready */ while (!(card_read_status(channel) & 1)); /* Select the specified EXI channel and device. */ exi_select(channel, 0, 4); /* Send the EXI Sector Erase command (0xF1xxxx) */ cbuf[0] = 0xF1; // Command Byte cbuf[1] = (sector >> 17) & 0x7F; cbuf[2] = (sector >> 9) & 0xFF; exi_write(channel, cbuf, 3); /* Deselect the selected EXI device. */ exi_deselect(channel); /* Wait till the erase is finished */ while (card_read_status(channel) & 0x8000); } static void card_sector_program(unsigned long channel, unsigned char *abuf, unsigned long address, unsigned long size) { int i; unsigned char cbuf[4]; unsigned char *bbuf = abuf; for (i = 0; i < size / CARD_WRITESIZE; i++) { /* Check if the card is ready */ while (!(card_read_status(channel) & 1)); /* Select the specified EXI channel and device. */ exi_select(channel, 0, 4); /* Send the EXI Sector Program command (0xF2xxxxxx) */ cbuf[0] = 0xF2; /* Command Byte */ cbuf[1] = (address >> 17) & 0x3F; cbuf[2] = (address >> 9) & 0xFF; cbuf[3] = (address >> 7) & 3; exi_write(channel, cbuf, 4); cbuf[0] = address & 0x7F; exi_write(channel, cbuf, 1); exi_dma(channel, bbuf, CARD_WRITESIZE, EXI_CONTROL_TYPE_WRITE); /* Deselect the selected EXI device. */ exi_deselect(channel); /* Wait till the write is finished */ while (card_read_status(channel) & 0x8000); address += CARD_WRITESIZE; bbuf += CARD_WRITESIZE; } } /** Block device handling */ static int memcard_buffersize(int channel) { return card_is_present(channel) << 17; } static void card_flush(int channel) { int i, mask; unsigned long start = curr_card_sector[channel] * CARD_SECTOR_SIZE; CARD_DBG("card_flush(%d)\n", channel); if (curr_card_sector[channel] == -1) return; CARD_DBG("Flush channel = %d mask = %x\n", channel, card_sector_mask[channel]); for (i = 0, mask = ~card_sector_mask[channel]; i < 16; i++) { if (mask & 1) { CARD_DBG("card_flush: read block %d\n", i); } } CARD_DBG("card_flush: writing out ch = %d, start = %08lx\n", channel, start); flush_dcache_range((unsigned long) card_sector_buffer[channel], (unsigned long) card_sector_buffer[channel] + CARD_SECTOR_SIZE); card_sector_erase(channel, start); card_sector_program(channel, card_sector_buffer[channel], start, CARD_SECTOR_SIZE); card_sector_mask[channel] = 0; curr_card_sector[channel] = -1; } static void do_memcard_request(request_queue_t * q) { struct request *req; blk_stop_queue(q); spin_lock(&memcard_lock); while ((req = elv_next_request(q)) != NULL) { unsigned long start = req->sector << 9; unsigned long len = req->current_nr_sectors << 9; int channel = req->rq_disk->first_minor; if (start + len > memcard_buffersize(channel)) { printk(KERN_ERR DEVICE_NAME ": bad access: block=%lu, count=%u\n", (unsigned long) req->sector, req->current_nr_sectors); end_request(req, 0); continue; } if (rq_data_dir(req) == READ) { CARD_DBG ("do_memcard_request: READ(%s,%lu,%lu), channel = %d\n", req->rq_disk->disk_name, (unsigned long) req->sector, (unsigned long) req->current_nr_sectors, channel); card_flush(channel); flush_dcache_range((unsigned long) req->buffer, (unsigned long) req->buffer + len); card_read_array(channel, req->buffer, start, len); invalidate_dcache_range((unsigned long) req-> buffer, (unsigned long) req-> buffer + len); } else { int i; CARD_DBG ("do_memcard_request: WRITE channel = %d\n", channel); for (i = 0; i < req->current_nr_sectors; i++) { int new_card_sector = (req->sector + i) >> 4; int card_sector_idx = (req->sector + i) & 0xf; if (new_card_sector != curr_card_sector[channel]) { card_flush(channel); curr_card_sector[channel] = new_card_sector; } card_sector_mask[channel] |= 1 << card_sector_idx; CARD_DBG("update block %d, sector %d\n", card_sector_idx, new_card_sector); memcpy(card_sector_buffer[channel] + (card_sector_idx << 9), req->buffer + (i << 9), 1 << 9); if (card_sector_idx == 0xF) card_flush(channel); } } end_request(req, 1); } spin_unlock(&memcard_lock); blk_start_queue(q); } static int memcard_open(struct inode *inode, struct file *filp) { CARD_DBG("MEMCARD Open device\n"); int device; int rc = -ENOMEM; device = iminor(inode); if (current_device != -1 && current_device != device) { rc = -EBUSY; goto err_out; } if (memcard_buffersize(device) == 0) { rc = -ENODEV; goto err_out; } return 0; err_out: CARD_DBG("MEMCARD Open device Error %d\n", rc); return rc; } static int memcard_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) { CARD_DBG("MEMCARD IOCTL\n"); if (cmd == HDIO_GETGEO) { long size; struct hd_geometry geo; /* * get geometry: we have to fake one... trim the size to a * multiple of 1024 (0.5M): tell we have 32 sectors, 32 heads, * whatever cylinders. */ size = memcard_buffersize(iminor(inode)); geo.heads = 32; geo.sectors = 32; geo.start = 0; geo.cylinders = size / (geo.heads * geo.sectors); if (copy_to_user((void *) arg, &geo, sizeof(geo))) return -EFAULT; return 0; } return -EINVAL; } static int memcard_release(struct inode *inode, struct file *filp) { CARD_DBG("MEMCARD Close device\n"); card_flush(iminor(inode)); if (current_device == -1) return 0; return 0; } static int memcard_revalidate(struct gendisk *disk) { CARD_DBG("MEMCARD Revalidate\n"); set_capacity(disk, memcard_buffersize(disk->first_minor) >> 9); return 0; } static struct block_device_operations memcard_fops = { .owner = THIS_MODULE, .open = memcard_open, .release = memcard_release, .revalidate_disk = memcard_revalidate, .ioctl = memcard_ioctl, }; static struct request_queue *memcard_queue[MEMCARD_MAX_UNITS]; int __init memcard_init(void) { int ret; int i; CARD_DBG("MemCard Block Device Driver Init\n"); ret = -EBUSY; major_num = register_blkdev(major_num, DEVICE_NAME); if (major_num <= 0) goto err; ret = -ENOMEM; for (i = 0; i < MEMCARD_MAX_UNITS; i++) { memcard_gendisk[i] = alloc_disk(1); if (!memcard_gendisk[i]) goto out_disk; } for (i = 0; i < MEMCARD_MAX_UNITS; i++) { memcard_queue[i] = blk_init_queue(do_memcard_request, &memcard_lock); if (!memcard_queue[i]) goto out_queue; } for (i = 0; i < MEMCARD_MAX_UNITS; i++) { memcard_gendisk[i]->major = major_num; memcard_gendisk[i]->first_minor = i; memcard_gendisk[i]->fops = &memcard_fops; sprintf(memcard_gendisk[i]->disk_name, "memcard%d", i); strcpy(memcard_gendisk[i]->devfs_name, memcard_gendisk[i]->disk_name); memcard_gendisk[i]->queue = memcard_queue[i]; set_capacity(memcard_gendisk[i], memcard_buffersize(i) >> 9); add_disk(memcard_gendisk[i]); } spin_lock_init(&memcard_lock); for (i = 0; i < MEMCARD_MAX_UNITS; i++) { card_sector_buffer[i] = kmalloc(CARD_SECTOR_SIZE, GFP_KERNEL); } return 0; out_queue: for (i = 0; i < MEMCARD_MAX_UNITS; i++) put_disk(memcard_gendisk[i]); out_disk: unregister_blkdev(major_num, DEVICE_NAME); err: return ret; } void __exit memcard_cleanup(void) { int i; blk_unregister_region(MKDEV(major_num, 0), 256); for (i = 0; i < MEMCARD_MAX_UNITS; i++) { del_gendisk(memcard_gendisk[i]); put_disk(memcard_gendisk[i]); } if (unregister_blkdev(major_num, DEVICE_NAME) != 0) printk(KERN_ERR DEVICE_NAME ": unregister of device failed\n"); for (i = 0; i < MEMCARD_MAX_UNITS; i++) { blk_cleanup_queue(memcard_queue[i]); kfree(card_sector_buffer[i]); } CARD_DBG("Removed gc_memcard\n"); return; } MODULE_LICENSE("GPL"); MODULE_AUTHOR("Torben Nielsen"); module_init(memcard_init); module_exit(memcard_cleanup); Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Kconfig,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Kconfig 19 Oct 2004 09:46:09 -0000 1.7 +++ Kconfig 19 Oct 2004 23:47:09 -0000 1.8 @@ -62,22 +62,26 @@ module will be called z2ram. config GAMECUBE_ARAM - tristate "GameCube ARAM ramdisk support" + tristate "Nintendo GameCube ARAM" depends on GAMECUBE help - This enables support for using the GameCube's 16 MB of ARAM as a - ramdisk or as a swap partition. Say Y if you want to include this - driver in the kernel. - + This enables support for using the 16MB of ARAM found in the + Nintendo GameCube as a ramdisk or as a swap partition. + Say Y if you want to include this driver in the kernel. + To compile this driver as a module, choose M here: the - module will be called gc_aram. + module will be called gcn-aram. config GAMECUBE_MEMCARD - bool "GameCube memory card support" - depends on GAMECUBE + tristate "Nintendo GameCube memory card (EXPERIMENTAL)" + depends on GAMECUBE && EXI && EXPERIMENTAL help - This enables support for using the GameCube's memory cards. - Say Y if you want to include this driver in the kernel. + This enables support for using memory cards compatible with the + Nintendo GameCube. + Say Y if you want to include this driver in the kernel. + + To compile this driver as a module, choose M here: the + module will be called gcn-memcard. config ATARI_ACSI tristate "Atari ACSI support" Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 19 Oct 2004 09:46:09 -0000 1.7 +++ Makefile 19 Oct 2004 23:47:09 -0000 1.8 @@ -28,8 +28,8 @@ obj-$(CONFIG_ATARI_ACSI) += acsi.o obj-$(CONFIG_ATARI_SLM) += acsi_slm.o obj-$(CONFIG_AMIGA_Z2RAM) += z2ram.o -obj-$(CONFIG_GAMECUBE_ARAM) += gc_aram.o -obj-$(CONFIG_GAMECUBE_MEMCARD) += gc_memcard.o +obj-$(CONFIG_GAMECUBE_ARAM) += gcn-aram.o +obj-$(CONFIG_GAMECUBE_MEMCARD) += gcn-memcard.o obj-$(CONFIG_BLK_DEV_RAM) += rd.o obj-$(CONFIG_BLK_DEV_LOOP) += loop.o obj-$(CONFIG_BLK_DEV_PS2) += ps2esdi.o --- gc_aram.c DELETED --- --- gc_memcard.c DELETED --- |
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29422/arch/ppc/platforms Modified Files: Makefile Added Files: gcn-con.c gcn-con.h gcn-dvdcover.c gcn-rsw.c Removed Files: console.c console.h gc-dvdcover.c gc-rsw.c Log Message: - Transformed console.{c,h} into gcn-con.{c,h} Renamed consistenly parts of the code, and rearranged it a little bit. Remember that this is not a fully functional console but a console suitable for early debugging as it is available as soon as the setup arch code is run. - Moved gc-dvdcover.c to gcn-dvdcover.c. Renamed consistenly parts of the code. - Moved gc-rsw.c to gcn-rsw.c. Renamed consistenly parts of the code. - Added copyright headers to files. --- NEW FILE: gcn-con.c --- /* * arch/ppc/platforms/gcn-con.c * * Nintendo GameCube early debug console * Copyright (C) 2004 The GameCube Linux Team * * Based on console.c by tmbinc. * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #include <linux/string.h> #include <linux/console.h> #include <linux/font.h> #include <linux/cache.h> #include "gamecube.h" #include "gcn-con.h" extern struct font_desc font_vga_8x16; #define FONT_XSIZE 8 #define FONT_YSIZE 16 #define FONT_XFACTOR 1 #define FONT_YFACTOR 1 #define FONT_XGAP 2 #define FONT_YGAP 0 #define COLOR_WHITE 0xFF80FF80 #define COLOR_BLACK 0x00800080 struct console_data_s { unsigned char *framebuffer; int xres, yres, stride; unsigned char *font; int cursor_x, cursor_y; int foreground, background; int border_left, border_right, border_top, border_bottom; int scrolled_lines; }; static struct console_data_s *default_console; #if 0 static int console_set_color(int background, int foreground) { default_console->foreground = foreground; default_console->background = background; return 0; } #endif static void console_drawc(struct console_data_s *con, int x, int y, unsigned char c) { x >>= 1; int ax, ay; unsigned long *ptr = (unsigned long *)(con->framebuffer + con->stride * y + x * 4); for (ay = 0; ay < FONT_YSIZE; ay++) { #if FONT_XFACTOR == 2 for (ax = 0; ax < 8; ax++) { unsigned long color; if ((con->font[c * FONT_YSIZE + ay] << ax) & 0x80) color = con->foreground; else color = con->background; #if FONT_YFACTOR == 2 // pixel doubling: we write u32 ptr[ay * 2 * con->stride / 4 + ax] = color; // line doubling ptr[(ay * 2 + 1) * con->stride / 4 + ax] = color; #else ptr[ay * con->stride / 4 + ax] = color; #endif } #else for (ax = 0; ax < 4; ax++) { unsigned long color[2]; int bits = (con->font[c * FONT_YSIZE + ay] << (ax * 2)); if (bits & 0x80) color[0] = con->foreground; else color[0] = con->background; if (bits & 0x40) color[1] = con->foreground; else color[1] = con->background; ptr[ay * con->stride / 4 + ax] = (color[0] & 0xFFFF00FF) | (color[1] & 0x0000FF00); } #endif } } static void console_putc(struct console_data_s *con, char c) { switch (c) { case '\n': con->cursor_y += FONT_YSIZE * FONT_YFACTOR + FONT_YGAP; con->cursor_x = con->border_left; break; default: console_drawc(con, con->cursor_x, con->cursor_y, c); con->cursor_x += FONT_XSIZE * FONT_XFACTOR + FONT_XGAP; if ((con->cursor_x + (FONT_XSIZE * FONT_XFACTOR)) > con->border_right) { con->cursor_y += FONT_YSIZE * FONT_YFACTOR + FONT_YGAP; con->cursor_x = con->border_left; } } if ((con->cursor_y + FONT_YSIZE * FONT_YFACTOR) >= con->border_bottom) { memcpy(con->framebuffer, con->framebuffer + con->stride * (FONT_YSIZE * FONT_YFACTOR + FONT_YGAP), con->stride * con->yres - FONT_YSIZE); int cnt = (con->stride * (FONT_YSIZE * FONT_YFACTOR + FONT_YGAP)) / 4; unsigned long *ptr = (unsigned long *)(con->framebuffer + con->stride * (con->yres - FONT_YSIZE)); while (cnt--) *ptr++ = con->background; con->cursor_y -= FONT_YSIZE * FONT_YFACTOR + FONT_YGAP; } flush_dcache_range((unsigned long)con->framebuffer, (unsigned long)(con->framebuffer + con->stride * con->yres)); } static void console_puts(struct console_data_s *con, const char *string) { while (*string) console_putc(con, *string++); } static void console_init(struct console_data_s *con, void *framebuffer, int xres, int yres, int stride) { int c; unsigned long *p; con->framebuffer = framebuffer; con->xres = xres; con->yres = yres; con->border_left = 0; con->border_top = 0; con->border_right = con->xres; con->border_bottom = con->yres; con->stride = stride; con->cursor_x = con->cursor_y = 0; con->font = font_vga_8x16.data; con->foreground = COLOR_WHITE; con->background = COLOR_BLACK; con->scrolled_lines = 0; c = con->xres * con->yres / 2; p = (unsigned long *)con->framebuffer; while (c--) *p++ = con->background; default_console = con; } static struct console_data_s gcn_con_data; static struct console gcn_con = { .name = "gcn-con", .flags = CON_PRINTBUFFER, .index = -1, }; /** * */ void gcn_con_puts(const char *s) { if (!default_console) gcn_con_init(); console_puts(default_console, s); } /** * */ void gcn_con_putc(char c) { if (!default_console) gcn_con_init(); console_putc(default_console, c); } /** * */ static void gcn_con_write(struct console *co, const char *b, unsigned int count) { while (count--) console_putc(default_console, *b++); } /** * */ void gcn_con_init(void) { console_init(&gcn_con_data, (void *)(0xd0000000 | GCN_XFB_START), 640, 576, 640 * 2); gcn_con_puts("gcn-con: console initialized.\n"); gcn_con.write = gcn_con_write; register_console(&gcn_con); } --- NEW FILE: gcn-con.h --- /* * arch/ppc/platforms/gcn-con.h * * Nintendo GameCube early debug console definitions * Copyright (C) 2004 The GameCube Linux Team * * Based on console.h by tmbinc. * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #ifndef __GCN_CON_H #define __GCN_CON_H void gcn_con_init(void); void gcn_con_puts(const char *); void gcn_con_putc(char); #endif /* __GCN_CON_H */ --- NEW FILE: gcn-dvdcover.c --- /* * arch/ppc/platforms/gcn-dvdcover.c * * Nintendo GameCube DVD cover driver * Copyright (C) 2004 Stefan Esser * Copyright (C) 2004 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 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/interrupt.h> #include <asm/io.h> #define DVD_IRQ 2 #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) #define DI_DICMDBUF0 0xcc006008 /* DI Command Buffer 0 */ #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) #define DRV_MODULE_NAME "gcn-dvdcover" #define DRV_DESCRIPTION "Nintendo GameCube DVD cover driver" #define DRV_AUTHOR "Stefan Esser <se...@no...>" MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_AUTHOR(DRV_AUTHOR); MODULE_LICENSE(GPL); #define PFX DRV_MODULE_NAME ": " #define di_printk(level, format, arg...) \ printk(level PFX format , ## arg) /** * */ static irqreturn_t gcn_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); di_printk(KERN_INFO, "DVD cover was %s.\n", (reason & DI_DICVR_CVR) ? "opened" : "closed"); return IRQ_HANDLED; } return IRQ_NONE; } /** * */ static int gcn_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 = DI_DISR_BRKINT | DI_DISR_TCINT | DI_DISR_DEINT; outval &= ~(DI_DISR_BRKINTMASK | DI_DISR_TCINTMASK | DI_DISR_DEINTMASK); writel(outval, DI_DISR); /* stop DVD motor */ writel(DI_CMD_STOP << 24, DI_DICMDBUF0); writel(DI_DICR_TSTART, DI_DICR); err = request_irq(DVD_IRQ, gcn_dvdcover_handler, 0, "Nintendo GameCube DVD", 0); if (err) { di_printk(KERN_ERR, "request of irq%d failed\n", DVD_IRQ); return err; } /* enable DVD cover interrupts */ writel(readl(DI_DICVR) | DI_DICVR_CVRINTMASK, DI_DICVR); return 0; } /** * */ static void gcn_dvdcover_exit(void) { free_irq(DVD_IRQ, 0); } module_init(gcn_dvdcover_init); module_exit(gcn_dvdcover_exit); --- NEW FILE: gcn-rsw.c --- /* * arch/ppc/platforms/gcn-rsw.c * * Nintendo GameCube reset switch driver * Copyright (C) 2004 Stefan Esser * Copyright (C) 2004 Albert Herranz * Copyright (C) 2004 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 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #include <linux/kernel.h> #include <linux/module.h> #include <linux/init.h> #include <linux/interrupt.h> #include <linux/spinlock.h> #include <linux/delay.h> #include <linux/reboot.h> #ifdef CONFIG_KEXEC #include <linux/kexec.h> #endif #define RSW_IRQ 1 #define RSW_NORMAL_TIMEOUT 3 /* seconds */ #define RSW_EMERGENCY_PUSHES 10 typedef enum { IDLE = 0, /* nothing to do */ NORMAL_RESET, /* reboot requested */ EMERGENCY_RESET, /* try emergency reboot */ } gcn_rsw_state_t; struct gcn_rsw_private { gcn_rsw_state_t state; struct timer_list timer; unsigned long jiffies; int pushes; int timeout; spinlock_t lock; }; #define DRV_MODULE_NAME "gcn-rsw" #define DRV_DESCRIPTION "Nintendo GameCube reset switch driver" #define DRV_AUTHOR "Stefan Esser <se...@no...>" MODULE_DESCRIPTION(DRV_DESCRIPTION); MODULE_AUTHOR(DRV_AUTHOR); MODULE_LICENSE(GPL); #define PFX DRV_MODULE_NAME ": " #define rsw_printk(level, format, arg...) \ printk(level PFX format , ## arg) /* from kernel/sys.c */ extern void ctrl_alt_del(void); static struct gcn_rsw_private gcn_rsw_private = { .state = IDLE, .timeout = RSW_NORMAL_TIMEOUT, }; /** * */ static void gcn_rsw_normal_reset(unsigned long dummy) { ctrl_alt_del(); } /** * */ static void gcn_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 irqreturn_t gcn_rsw_handler(int this_irq, void *data, struct pt_regs *regs) { struct gcn_rsw_private *priv = (struct gcn_rsw_private *)data; unsigned long flags; spin_lock_irqsave(priv->lock, flags); /* someone pushed 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 "Push the 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))gcn_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->pushes = 0; printk(KERN_WARNING "SWITCHED TO EMERGENCY RESET MODE!\n" "Push %d times the Reset button to force" " a hard reset!\n" "NOTE THAT THIS COULD CAUSE DATA LOSS!\n", RSW_EMERGENCY_PUSHES); } break; case EMERGENCY_RESET: /* force a hard reset if the user insists ... */ if (++priv->pushes >= RSW_EMERGENCY_PUSHES) { spin_unlock_irqrestore(priv->lock, flags); gcn_rsw_emergency_reset(); return IRQ_HANDLED; } else { printk(KERN_INFO "%d/%d\n", priv->pushes, RSW_EMERGENCY_PUSHES); } break; } spin_unlock_irqrestore(priv->lock, flags); return IRQ_HANDLED; } /** * */ static int gcn_rsw_init(void) { int err; spin_lock_init(&gcn_rsw_private.lock); err = request_irq(RSW_IRQ, gcn_rsw_handler, 0, "Nintendo GameCube reset switch", (void *)&gcn_rsw_private); if (err) { rsw_printk(KERN_ERR, "request of irq%d failed\n", RSW_IRQ); } return err; } /** * */ static void gcn_rsw_exit(void) { free_irq(RSW_IRQ, &gcn_rsw_private); } module_init(gcn_rsw_init); module_exit(gcn_rsw_exit); Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/Makefile,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- Makefile 19 Oct 2004 22:58:36 -0000 1.14 +++ Makefile 19 Oct 2004 23:36:54 -0000 1.15 @@ -41,9 +41,9 @@ obj-$(CONFIG_SPRUCE) += spruce.o obj-$(CONFIG_LITE5200) += lite5200.o mpc5200.o obj-$(CONFIG_GAMECUBE) += gamecube.o gcn-rtc.o -obj-$(CONFIG_GAMECUBE_CONSOLE) += console.o -obj-$(CONFIG_GAMECUBE_RESET_SWITCH) += gc-rsw.o -obj-$(CONFIG_GAMECUBE_DVD_COVER) += gc-dvdcover.o +obj-$(CONFIG_GAMECUBE_CONSOLE) += gcn-con.o +obj-$(CONFIG_GAMECUBE_RESET) += gcn-rsw.o +obj-$(CONFIG_GAMECUBE_DVDCOVER) += gcn-dvdcover.o ifeq ($(CONFIG_SMP),y) obj-$(CONFIG_PPC_PMAC) += pmac_smp.o --- console.c DELETED --- --- console.h DELETED --- --- gc-dvdcover.c DELETED --- --- gc-rsw.c DELETED --- |
From: <he...@us...> - 2004-10-19 23:37:04
|
Update of /cvsroot/gc-linux/linux/arch/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29422/arch/ppc Modified Files: Kconfig Log Message: - Transformed console.{c,h} into gcn-con.{c,h} Renamed consistenly parts of the code, and rearranged it a little bit. Remember that this is not a fully functional console but a console suitable for early debugging as it is available as soon as the setup arch code is run. - Moved gc-dvdcover.c to gcn-dvdcover.c. Renamed consistenly parts of the code. - Moved gc-rsw.c to gcn-rsw.c. Renamed consistenly parts of the code. - Added copyright headers to files. Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/Kconfig,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- Kconfig 19 Oct 2004 09:46:07 -0000 1.18 +++ Kconfig 19 Oct 2004 23:36:53 -0000 1.19 @@ -549,7 +549,7 @@ config GAMECUBE bool "Nintendo-GameCube" help - Select GameCube if configuring for the Nintendo GameCube. + Select GAMECUBE if configuring for the Nintendo GameCube. More information at: <http://gc-linux.sourceforge.net/> config ADIR @@ -623,25 +623,41 @@ depends on ADS8272 default y -config GAMECUBE_RESET_SWITCH - bool "GameCube Reset button" - default n - ---help--- - If you say yes to this option, support will be included for the - reset switch of the GameCube. - - This driver can also be built as a module. If so, the module - will be called gc-rsw. +config GAMECUBE_CONSOLE + bool "Nintendo GameCube debug console" + depends on GAMECUBE + default n + help + This option enables an early minimal console suitable for debugging + purposes. + + If in doubt, say N here. -config GAMECUBE_DVD_COVER - bool "GameCube DVD Cover" - default n - ---help--- - If you say yes to this option, support will be included for the - reset switch of the GameCube. - - This driver can also be built as a module. If so, the module - will be called gc-dvdcover. +config GAMECUBE_RESET + tristate "Nintendo GameCube reset button" + depends on GAMECUBE + default y + help + If you say yes to this option, support will be included for the + reset button of the Nintendo GameCube. + + This driver can also be built as a module. If so, the module + will be called gcn-rsw. + + If in doubt, say Y here. + +config GAMECUBE_DVDCOVER + tristate "Nintendo GameCube DVD cover" + depends on GAMECUBE + default y + help + If you say yes to this option, support will be included for the + DVD cover of the Nintendo GameCube. + + This driver can also be built as a module. If so, the module + will be called gcn-dvdcover. + + If in doubt, say Y here. config TQM8xxL bool @@ -825,12 +841,6 @@ depends on SMP default "4" -config GAMECUBE_CONSOLE - bool "GameCube Minimal Screen Console" - depends on GAMECUBE - ---help--- - ... - config PREEMPT bool "Preemptible Kernel" help |
From: <he...@us...> - 2004-10-19 23:18:50
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25384/arch/ppc/boot/common Modified Files: util.S Log Message: - Simplified the disable mmu code (the old code was a hack). - Removed hardcoded values to calculate the available memory. - Added some code to keep the compiler happy. Index: util.S =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/common/util.S,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- util.S 19 Oct 2004 09:46:07 -0000 1.4 +++ util.S 19 Oct 2004 23:18:39 -0000 1.5 @@ -44,60 +44,32 @@ srwi r10,r10,16 cmpwi 0,r10,1 /* 601 ? */ beq .clearbats_601 -#endif - -#ifdef CONFIG_GAMECUBE -/* - * 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* !!! - * - */ - - /* save for later... */ +#else + /* save the Link Register for later... */ mflr r8 - /* calculate address of label 2: to jump to */ + /* load in r11 the MSR with address translation bits off */ + li r10, MSR_IR|MSR_DR + mfmsr r11 + andc r11, r11, r10 + + /* load in r10 the address of label 2: in physical layout */ bl 1f 1: - 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 + mflr r10 + addi r10, r10, 2f - 1b + clrlwi r10, r10, 3 /* virt to phys in our current address space */ - /* store branch at System Call Exception vector and flush caches */ - stw r7, 0(r9) - dcbf 0, r9 - icbi 0, r9 + /* this will disable the MMU and jump to 2: */ + mtspr SRR1, r11 + mtspr SRR0, r10 sync - isync - - /* switch MMU off and jump to 2: */ - sc + rfi 2: - /* restore Link Register in physical address layout */ + /* restore, and fix up, the Link Register */ clrlwi r8, r8, 3 mtlr r8 -#endif +#endif /* !CONFIG_GAMECUBE */ /* Clear BATs */ li r8,0 @@ -121,17 +93,6 @@ isync sync sync - -#ifndef CONFIG_GAMECUBE - li r8, 0x1fff - mtspr DBAT0U, r8 - li r8, 0x2a - mtspr DBAT0L, r8 - - mfmsr r8 - ori r8, r8, 0x10 - mtmsr r8 -#endif /* Set segment registers */ li r8,16 /* load up segment register values */ |
From: <he...@us...> - 2004-10-19 23:18:49
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25384/arch/ppc/boot/simple Modified Files: embed_config.c head.S misc-embedded.c Log Message: - Simplified the disable mmu code (the old code was a hack). - Removed hardcoded values to calculate the available memory. - Added some code to keep the compiler happy. Index: embed_config.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/embed_config.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- embed_config.c 15 Aug 2004 22:33:03 -0000 1.5 +++ embed_config.c 19 Oct 2004 23:18:39 -0000 1.6 @@ -987,16 +987,23 @@ void embed_config(bd_t **bdp) { + u_char *cp; + int i; bd_t *bd; bd = &bdinfo; *bdp = bd; - bd->bi_memsize = 24 * 1024 * 1024; + bd->bi_memsize = GCN_MEM_SIZE; bd->bi_tbfreq = 200 * 1000 * 1000; bd->bi_intfreq = 200000000; bd->bi_busfreq = 100000000; timebase_period_ns = 1000000000 / bd->bi_tbfreq; - } - #endif + /* this is mainly to shut up compiler, we won't use this */ + cp = (u_char *)def_enet_addr; + for (i=0; i<6; i++) { + bd->bi_enetaddr[i] = *cp++; + } +} +#endif /* CONFIG_GAMECUBE */ Index: head.S =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/head.S,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- head.S 11 Oct 2004 22:04:28 -0000 1.5 +++ head.S 19 Oct 2004 23:18:39 -0000 1.6 @@ -101,23 +101,14 @@ bl disable_6xx_mmu #endif -#ifdef CONFIG_GAMECUBE - /* convert our starting address to physical layout format */ - clrlwi r3, r3, 3 -#else +#ifndef CONFIG_GAMECUBE bl disable_6xx_l1cache CLEAR_CACHES -#endif /* CONFIG_GAMECUBE */ - -#ifdef CONFIG_GAMECUBE_CONSOLE - /* setup the framebuffer address for the early debug console */ - lis r8, 0xcc00 - lis r5, 0x00c0 - stw r5, 0x201c(r8) - addi r5, r5, 1280 - stw r5, 0x2024(r8) -#endif /* CONFIG_GAMECUBE_CONSOLE */ +#else + /* convert our starting address to physical layout format */ + clrlwi r3, r3, 3 +#endif /* !CONFIG_GAMECUBE */ #endif Index: misc-embedded.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/misc-embedded.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- misc-embedded.c 19 Oct 2004 09:46:08 -0000 1.5 +++ misc-embedded.c 19 Oct 2004 23:18:39 -0000 1.6 @@ -213,6 +213,10 @@ } udelay(1000); /* 1 msec */ } +#else + /* shut up compiler */ + timer = 0; + ch = 0; #endif *cp = 0; puts("\nUncompressing Linux..."); |
From: <he...@us...> - 2004-10-19 23:07:39
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21784/arch/ppc/platforms Modified Files: gamecube.c gamecube.h Log Message: - Removed init/main.c as it is not needed anymore (the console initialization function that was there has been integrated in gamecube.c's setup arch func). - Renamed functions named gamecube_* to gcn_* (which is the official short name of the Nintendo GameCube at least in Europe). - Moved some definitions between gamecube.h and gamecube.c files. - Added some interesting constants and the current memory map to gamecube.h. Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- gamecube.c 19 Oct 2004 09:49:50 -0000 1.21 +++ gamecube.c 19 Oct 2004 23:07:13 -0000 1.22 @@ -1,5 +1,14 @@ /* * arch/ppc/platforms/gamecube.c + * + * Nintendo GameCube board-specific support + * Copyright (C) 2004 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 + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * */ #include <linux/init.h> @@ -16,8 +25,31 @@ #include <asm/machdep.h> #include <asm/pgtable.h> -#include "console.h" #include "gamecube.h" +#include "gcn-con.h" + +/* + * 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 FLIPPER_NR_IRQS 14 +#define FLIPPER_ICR ((volatile ulong *)0xcc003000) +#define FLIPPER_IMR ((volatile ulong *)0xcc003004) + +/* + * Anything written here automagically puts us through reset. + */ +#define GCN_PI_RESET 0xcc003024 + +/* + * These registers control where the visible framebuffer is located. + */ +#define GCN_VI_TFBL 0xcc00201c +#define GCN_VI_BFBL 0xcc002024 /* * We happen to be ISA/PCI-free, hence the !CONFIG_PCI. These @@ -27,43 +59,51 @@ 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); -extern int gamecube_set_rtc_time(unsigned long nowtime); -unsigned long gamecube_find_end_of_memory(void) +/* from arch/ppc/platforms/gcn-time.c */ +extern long gcn_time_init(void) __init; +extern unsigned long gcn_get_rtc_time(void); +extern int gcn_set_rtc_time(unsigned long nowtime); + + +unsigned long +gcn_find_end_of_memory(void) { - return 24*1024*1024 - (640*576*2); /* 24 MB minus max. framebuffer */ + return GCN_MEM_SIZE; } void __init -gamecube_map_io(void) +gcn_map_io(void) { + /* all RAM and more ??? */ io_block_mapping(0xd0000000, 0, 0x02000000, _PAGE_IO); - io_block_mapping(0xcc000000, 0x0c000000, 0x00100000, _PAGE_IO); /* GC IO */ + + /* access to hardware registers */ + io_block_mapping(0xcc000000, 0x0c000000, 0x00100000, _PAGE_IO); } static void -gamecube_restart(char *cmd) +gcn_restart(char *cmd) { local_irq_disable(); - writeb(0x00, GAMECUBE_RESET); + writeb(0x00, GCN_PI_RESET); } static void -gamecube_power_off(void) +gcn_power_off(void) { local_irq_disable(); for (;;); /* Wait until power button depressed */ } static void -gamecube_halt(void) +gcn_halt(void) { - gamecube_restart(NULL); + gcn_restart(NULL); } -void __init gamecube_calibrate_decr(void) +void __init +gcn_calibrate_decr(void) { int freq, divisor; freq = 162000000; @@ -73,7 +113,7 @@ } static int -gamecube_get_irq(struct pt_regs *regs) +gcn_get_irq(struct pt_regs *regs) { int irq; u_int irq_status, irq_test = 1; @@ -82,7 +122,7 @@ if (irq_status == 0) return -1; /* no more IRQs pending */ - for (irq = 0; irq < 14; irq++, irq_test <<= 1) + for (irq = 0; irq < FLIPPER_NR_IRQS; irq++, irq_test <<= 1) if (irq_status & irq_test) break; @@ -116,7 +156,7 @@ }; static void __init -gamecube_init_IRQ(void) +gcn_init_IRQ(void) { int i; @@ -124,12 +164,12 @@ writel(0x00000000, FLIPPER_IMR); writel(0xffffffff, FLIPPER_ICR); - for (i = 0; i < 14; i++) + for (i = 0; i < FLIPPER_NR_IRQS; i++) irq_desc[i].handler = &flipper_pic; } static int -gamecube_show_cpuinfo(struct seq_file *m) +gcn_show_cpuinfo(struct seq_file *m) { seq_printf(m, "vendor\t\t: IBM\n"); seq_printf(m, "machine\t\t: Nintendo GameCube\n"); @@ -138,8 +178,16 @@ } static void __init -gamecube_setup_arch(void) +gcn_setup_arch(void) { +#ifdef CONFIG_GAMECUBE_CONSOLE +#if (GCN_XFB_START <= 0x00fffe00) + #error Sorry, debug console needs the framebuffer at a higher address. +#endif + writel(0x10000000 | (GCN_XFB_START>>5), GCN_VI_TFBL); + writel(0x10000000 | ((GCN_XFB_START+2*640)>>5), GCN_VI_BFBL); + gcn_con_init(); +#endif } void __init @@ -156,22 +204,23 @@ } #endif - ppc_md.setup_arch = gamecube_setup_arch; - ppc_md.show_cpuinfo = gamecube_show_cpuinfo; + ppc_md.setup_arch = gcn_setup_arch; + ppc_md.show_cpuinfo = gcn_show_cpuinfo; - ppc_md.init_IRQ = gamecube_init_IRQ; - ppc_md.get_irq = gamecube_get_irq; + ppc_md.init_IRQ = gcn_init_IRQ; + ppc_md.get_irq = gcn_get_irq; - ppc_md.restart = gamecube_restart; - ppc_md.power_off = gamecube_power_off; - ppc_md.halt = gamecube_halt; + ppc_md.restart = gcn_restart; + ppc_md.power_off = gcn_power_off; + ppc_md.halt = gcn_halt; - ppc_md.calibrate_decr = gamecube_calibrate_decr; + ppc_md.calibrate_decr = gcn_calibrate_decr; - ppc_md.find_end_of_memory = gamecube_find_end_of_memory; - ppc_md.setup_io_mappings = gamecube_map_io; + ppc_md.find_end_of_memory = gcn_find_end_of_memory; + ppc_md.setup_io_mappings = gcn_map_io; - ppc_md.time_init = gamecube_time_init; - ppc_md.set_rtc_time = gamecube_set_rtc_time; - ppc_md.get_rtc_time = gamecube_get_rtc_time; + ppc_md.time_init = gcn_time_init; + ppc_md.set_rtc_time = gcn_set_rtc_time; + ppc_md.get_rtc_time = gcn_get_rtc_time; } + Index: gamecube.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.h,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- gamecube.h 3 Jun 2004 15:19:44 -0000 1.8 +++ gamecube.h 19 Oct 2004 23:07:28 -0000 1.9 @@ -1,12 +1,14 @@ /* * arch/ppc/platforms/gamecube.h * - * Nintendo GameCube board-specific definitions. + * Nintendo GameCube board-specific definitions + * Copyright (C) 2004 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 + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #ifndef __MACH_GAMECUBE_H @@ -15,19 +17,59 @@ #include <asm/ppcboot.h> /* - * There are 14 IRQs in total. Each has a corresponding bit in both - * the Interrupt Cause (ICR) and Interrupt Mask (IMR) registers. + * This is the current memory layout for the GameCube Linux port. + * + * +------------------------------+ + * | framebuffer 640x576x2 bytes | GCN_XFB_END + * . . + * . . + * +------------------------------+ GCN_XFB_START + * | kexec reserved 4x4096 bytes | GCN_KXC_END + * . . + * +------------------------------+ GCN_KXC_START + * | memory remaining bytes | GCN_MEM_END + * . . + * . . + * . . + * +- - - - - - - - - - - - - - - + + * | Dolphin OS 12544 bytes | + * | globals, pre-kernel | + * | | + * | | + * +------------------------------+ GCN_MEM_START * - * 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 FLIPPER_ICR ((volatile ulong *)0xcc003000) -#define FLIPPER_IMR ((volatile ulong *)0xcc003004) /* - * Anything written here automagically puts us through reset. + * Some useful sizes */ -#define GAMECUBE_RESET 0xCC003024 +#define GCN_RAM_SIZE (24*1024*1024) /* 24 MB */ +#define GCN_XFB_SIZE (640*576*2) /* pal framebuffer */ +#ifdef CONFIG_KEXEC + #define GCN_KXC_SIZE (4*4096) /* PAGE_ALIGN(GCN_PRESERVE_SIZE) */ +#else + #define GCN_KXC_SIZE (0) +#endif +#define GCN_MEM_SIZE (GCN_MEM_END+1) + +/* + * Start and end of several regions + */ +#define GCN_XFB_END (GCN_RAM_SIZE-1) +#define GCN_XFB_START (GCN_XFB_END-GCN_XFB_SIZE+1) +#define GCN_KXC_END (GCN_XFB_START-1) +#define GCN_KXC_START (GCN_KXC_END-GCN_KXC_SIZE+1) +#define GCN_MEM_END (GCN_KXC_START-1) +#define GCN_MEM_START (0x00000000) + +/* + * Some memory regions will be preserved across kexec reboots, if enabled. + */ +#define GCN_PRESERVE_START (0x00000000) +#define GCN_PRESERVE_END (0x000030ff) +#define GCN_PRESERVE_FROM (GCN_PRESERVE_START) +#define GCN_PRESERVE_TO (GCN_KXC_START) +#define GCN_PRESERVE_SIZE (GCN_PRESERVE_END+1) #endif /* !__MACH_GAMECUBE_H */ + |
From: <he...@us...> - 2004-10-19 23:07:37
|
Update of /cvsroot/gc-linux/linux/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21784/init Removed Files: main.c Log Message: - Removed init/main.c as it is not needed anymore (the console initialization function that was there has been integrated in gamecube.c's setup arch func). - Renamed functions named gamecube_* to gcn_* (which is the official short name of the Nintendo GameCube at least in Europe). - Moved some definitions between gamecube.h and gamecube.c files. - Added some interesting constants and the current memory map to gamecube.h. --- main.c DELETED --- |
From: <he...@us...> - 2004-10-19 22:58:45
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19762/arch/ppc/platforms Modified Files: Makefile Added Files: gcn-rtc.c Removed Files: gamecube_time.c Log Message: Moved Real Time Clock functions to gcn-rtc.c file. Used the gcn-exi-lite framework to access both SRAM and RTC. --- NEW FILE: gcn-rtc.c --- /* * arch/ppc/platforms/gcn-rtc.c * * Nintendo GameCube RTC functions * Copyright (C) 2004 The GameCube Linux Team * * Based on gamecube_time.c from Torben Nielsen. * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #include <linux/init.h> #include <linux/time.h> #include <linux/exi.h> #ifndef EXI_LITE #error Sorry, this driver needs currently the gcn-exi-lite framework. #endif /* * The EXI functions that we use are guaranteed to work by the gcn-exi-lite * framework even if exi_lite_init() has not been called. */ #define RTC_OFFSET 946684800L static int bias = 0; static void read_sram(unsigned char *abuf) { unsigned long a; /* select the SRAM device */ exi_select(0, 1, 3); /* send the appropriate command */ a = 0x20000100; exi_write(0, &a, 4); /* read the SRAM data */ exi_read(0, abuf, 64); /* deselect the SRAM device */ exi_deselect(0); return; } static unsigned long get_rtc(void) { unsigned long a = 0L; /* select the RTC device */ exi_select(0, 1, 3); /* send the appropriate command */ a = 0x20000000; exi_write(0, &a, 4); /* read the time and date value */ exi_read(0, &a, 4); /* deselect the RTC device */ exi_deselect(0); return a; } static void set_rtc(unsigned long aval) { unsigned long a; /* select the RTC device */ exi_select(0, 1, 3); /* send the appropriate command */ a = 0xA0000000; exi_write(0, &a, 4); /* Set the new time and date value */ exi_write(0, &aval, 4); /* Deselect the RTC device */ exi_deselect(0); } /** * */ long __init gcn_time_init(void) { char sram[64]; int *pbias = (int *)&sram[0xC]; read_sram(sram); bias = *pbias; return 0; } /** * */ unsigned long gcn_get_rtc_time(void) { return get_rtc() + bias + RTC_OFFSET; } /** * */ int gcn_set_rtc_time(unsigned long nowtime) { set_rtc(nowtime - RTC_OFFSET - bias); return 1; } Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile 19 Oct 2004 09:46:08 -0000 1.13 +++ Makefile 19 Oct 2004 22:58:36 -0000 1.14 @@ -40,7 +40,7 @@ obj-$(CONFIG_SBC82xx) += sbc82xx.o obj-$(CONFIG_SPRUCE) += spruce.o obj-$(CONFIG_LITE5200) += lite5200.o mpc5200.o -obj-$(CONFIG_GAMECUBE) += gamecube.o gamecube_time.o +obj-$(CONFIG_GAMECUBE) += gamecube.o gcn-rtc.o obj-$(CONFIG_GAMECUBE_CONSOLE) += console.o obj-$(CONFIG_GAMECUBE_RESET_SWITCH) += gc-rsw.o obj-$(CONFIG_GAMECUBE_DVD_COVER) += gc-dvdcover.o --- gamecube_time.c DELETED --- |
From: <he...@us...> - 2004-10-19 22:49:51
|
Update of /cvsroot/gc-linux/linux/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17258/include/linux Modified Files: exi.h Log Message: Centralized most of the EXI low level code in a common place. Moved out tmbinc EXI code to its own file (which contains copy/pasted code). Index: exi.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/linux/exi.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- exi.h 24 May 2004 01:16:24 -0000 1.5 +++ exi.h 19 Oct 2004 22:49:41 -0000 1.6 @@ -1,12 +1,24 @@ -#ifndef __EXI_H -#define __EXI_H - /* * include/linux/exi.h + * + * Nintendo GameCube EXpansion Interface definitions + * Copyright (C) 2004 Arthur Othieno <a.o...@bl...> + * Copyright (C) 2004 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 + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * */ +#ifndef __EXI_H +#define __EXI_H #include <linux/device.h> +/* while the real framework gets finished, we'll use the lite version */ +#include <../drivers/exi/gcn-exi-lite.h> + struct exi_dev { unsigned long id; |
From: <he...@us...> - 2004-10-19 22:49:51
|
Update of /cvsroot/gc-linux/linux/drivers/exi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17258/drivers/exi Modified Files: Makefile exi-driver.c Added Files: gcn-exi-lite-tmbinc-exi_c.c gcn-exi-lite.c gcn-exi-lite.h Log Message: Centralized most of the EXI low level code in a common place. Moved out tmbinc EXI code to its own file (which contains copy/pasted code). --- NEW FILE: gcn-exi-lite-tmbinc-exi_c.c --- /* exi_select: enable chip select, set speed */ void exi_select(int channel, int device, int freq) { volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; long d; // exi_select d = exi[channel * 5]; d &= 0x405; d |= ((1<<device)<<7) | (freq << 4); exi[channel*5] = d; } /* disable chipselect */ void exi_deselect(int channel) { volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; exi[channel * 5] &= 0x405; } /* dirty way for asynchronous reads */ static void *exi_last_addr; static int exi_last_len; /* mode?Read:Write len bytes to/from channel */ /* when read, data will be written back in exi_sync */ void exi_imm(int channel, void *data, int len, int mode, int zero) { volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; if (mode == EXI_WRITE) exi[channel * 5 + 4] = *(unsigned long*)data; exi[channel * 5 + 3] = ((len-1)<<4)|(mode<<2)|1; if (mode == EXI_READ) { exi_last_addr = data; exi_last_len = len; } else { exi_last_addr = 0; exi_last_len = 0; } } /* Wait until transfer is done, write back data */ void exi_sync(int channel) { volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; while (exi[channel * 5 + 3] & 1); if (exi_last_addr) { int i; unsigned long d; d = exi[channel * 5 + 4]; for (i=0; i<exi_last_len; ++i) ((unsigned char*)exi_last_addr)[i] = (d >> ((3-i)*8)) & 0xFF; } } /* simple wrapper for transfers > 4bytes */ void exi_imm_ex(int channel, void *data, int len, int mode) { unsigned char *d = (unsigned char*)data; while (len) { int tc = len; if (tc > 4) tc = 4; exi_imm(channel, d, tc, mode, 0); exi_sync(channel); len-=tc; d+=tc; } } --- NEW FILE: gcn-exi-lite.c --- /* * drivers/exi/gcn_exi_lite.c * * Nintendo GameCube EXpansion Interface support, "lite" version. * Copyright (C) 2004 The GameCube Linux Team * * Partly, depends on existing work by tmbinc. * This code will be replaced by apgo's EXI framework, when available. * * 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 the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ /* * We guarantee that the following functions work even if the exi_lite_init * initialization function has not been called: * exi_select, exi_deselect, exi_read, exi_write */ #define EXI_DEBUG #include <linux/config.h> #include <linux/module.h> #include <linux/kernel.h> #include <linux/types.h> #include <linux/interrupt.h> #include <asm/io.h> #include "gcn-exi-lite.h" #ifdef EXI_DEBUG # define DPRINTK(fmt, args...) \ printk(KERN_ERR "%s: " fmt, __FUNCTION__ , ## args) #else # define DPRINTK(fmt, args...) #endif #define exi_printk(level, format, arg...) \ printk(level "exi: " format , ## arg) #define EXI_IRQ 4 #define EXI_MAX_CHANNELS 3 /* channels on the EXI bus */ #define EXI_MAX_EVENTS 3 /* types of events on the EXI bus */ #define EXI_READ 0 #define EXI_WRITE 1 #define EXI_CSR_BASE 0xcc006800 /* EXI Channel Status Register */ #define EXI_CSR_EXT (1<<12) #define EXI_CSR_EXTINT (1<<11) #define EXI_CSR_EXTINTMASK (1<<10) #define EXI_CSR_CSMASK (0x7<<7) #define EXI_CSR_CS_0 (0x1<<7) /* Chip Select 001 */ #define EXI_CSR_CS_1 (0x2<<7) /* Chip Select 010 */ #define EXI_CSR_CS_2 (0x4<<7) /* Chip Select 100 */ #define EXI_CSR_CLKMASK (0x7<<4) #define EXI_CSR_CLK_1MHZ (0x0<<4) #define EXI_CSR_CLK_2MHZ (0x1<<4) #define EXI_CSR_CLK_4MHZ (0x2<<4) #define EXI_CSR_CLK_8MHZ (0x3<<4) #define EXI_CSR_CLK_16MHZ (0x4<<4) #define EXI_CSR_CLK_32MHZ (0x5<<4) #define EXI_CSR_TCINT (1<<3) #define EXI_CSR_TCINTMASK (1<<2) #define EXI_CSR_EXIINT (1<<1) #define EXI_CSR_EXIINTMASK (1<<0) #define EXI0_CSR (EXI_CSR_BASE + 0*0x14) /* Channel 0 CSR */ #define EXI1_CSR (EXI_CSR_BASE + 1*0x14) /* Channel 1 CSR */ #define EXI2_CSR (EXI_CSR_BASE + 2*0x14) /* Channel 2 CSR */ struct exi_dev_event { int (*handler) (int, int, void *); void *data; }; struct exi_private { spinlock_t lock; spinlock_t select_lock; unsigned long select_flags; struct exi_dev_event events[EXI_MAX_CHANNELS][EXI_MAX_EVENTS]; }; static struct exi_private __exi_private = { .lock = SPIN_LOCK_UNLOCKED, .select_lock = SPIN_LOCK_UNLOCKED, }; #define exi_priv() (&__exi_private) /* --------8<--------8<--------8<--------8<--------8<--------8<-------- */ /* * Here follows some glue to the external code. * --Albert Herranz */ /* * These functions should be static, but let's not touch a bit of * the external copy'n'pasted code... */ void __exi_select(int, int, int); void __exi_deselect(int); void __exi_imm(int, void *, int, int, int); void __exi_sync(int); void __exi_imm_ex(int, void *, int, int); /* we won't let the external code alter our namespace too much */ #define exi_select __exi_select #define exi_deselect __exi_deselect #define exi_imm __exi_imm #define exi_sync __exi_sync #define exi_imm_ex __exi_imm_ex /* * The included code comes directly from tmbinc's ipl replacement */ #include "gcn-exi-lite-tmbinc-exi_c.c" /* final namespace cleanup */ #undef exi_select #undef exi_deselect #undef exi_imm #undef exi_sync #undef exi_imm_ex /* --------8<--------8<--------8<--------8<--------8<--------8<-------- */ /** * */ static void inline exi_read_or_write(int channel, void *data, int len, int mode) { if (__builtin_constant_p(len)) { switch(len) { case 1: case 2: case 3: case 4: __exi_imm(channel, data, len, mode, 0); __exi_sync(channel); break; default: __exi_imm_ex(channel, data, len, mode); break; } } else { __exi_imm_ex(channel, data, len, mode); } } /** * */ void exi_select(int channel, int device, int freq) { struct exi_private *priv = exi_priv(); spin_lock_irqsave(priv->select_lock, priv->select_flags); __exi_select(channel, device, freq); } /** * */ void exi_deselect(int channel) { struct exi_private *priv = exi_priv(); __exi_deselect(channel); spin_unlock_irqrestore(priv->select_lock, priv->select_flags); } /** * */ void exi_read(int channel, void *data, int len) { exi_read_or_write(channel, data, len, EXI_READ); } /** * */ void exi_write(int channel, void *data, int len) { exi_read_or_write(channel, data, len, EXI_WRITE); } /** * */ static inline int exi_trigger_event(int channel, int event_id) { struct exi_private *priv = exi_priv(); struct exi_dev_event *event; if (!priv) return -EINVAL; event = &priv->events[channel][event_id]; if (event->handler) { return event->handler(channel, event_id, event->data); } return 0; } /** * */ int exi_register_event(int channel, int event_id, int (*handler) (int, int, void *), void *data) { struct exi_private *priv = exi_priv(); struct exi_dev_event *event; if (channel < 0 || channel >= EXI_MAX_CHANNELS) return -EINVAL; if (event_id < 0 || event_id >= EXI_MAX_EVENTS) return -EINVAL; if (!priv) return -EINVAL; /* register event if free */ event = &priv->events[channel][event_id]; if (event->handler) { return -EBUSY; } event->handler = handler; event->data = data; /* ack and enable interrupts */ unsigned long reg = EXI_CSR_BASE + channel * 0x14; unsigned long csr = readl(reg); switch (event_id) { case EXI_EVENT_INSERT: writel(csr | (EXI_CSR_EXTINT | EXI_CSR_EXTINTMASK), reg); break; case EXI_EVENT_TC: writel(csr | (EXI_CSR_TCINT | EXI_CSR_TCINTMASK), reg); break; case EXI_EVENT_IRQ: writel(csr | (EXI_CSR_EXIINT | EXI_CSR_EXIINTMASK), reg); break; } return 0; } /** * */ int exi_unregister_event(int channel, int event_id) { struct exi_private *priv = exi_priv(); struct exi_dev_event *event; if (channel < 0 || channel >= EXI_MAX_CHANNELS) return -EINVAL; if (event_id < 0 || event_id >= EXI_MAX_EVENTS) return -EINVAL; if (!priv) return -EINVAL; /* unregister event */ event = &priv->events[channel][event_id]; event->handler = 0; event->data = 0; /* ack and disable interrupts */ unsigned long reg = EXI_CSR_BASE + channel * 0x14; unsigned long csr = readl(reg); switch (event_id) { case EXI_EVENT_INSERT: writel((csr | EXI_CSR_EXTINT) & ~EXI_CSR_EXTINTMASK, reg); break; case EXI_EVENT_TC: writel((csr | EXI_CSR_TCINT) & ~EXI_CSR_TCINTMASK, reg); break; case EXI_EVENT_IRQ: writel((csr | EXI_CSR_EXIINT) & ~EXI_CSR_EXIINTMASK, reg); break; } return 0; } /** * exi_irq_handler - handle interrupts from EXI devices * @irq: interrupt line * @dev_id: device from where the interrupt comes * @regs: processor register set * * Handles External Interface interrupts from EXI devices. */ static irqreturn_t exi_irq_handler(int irq, void *dev_id, struct pt_regs *regs) { struct exi_private *priv = exi_priv(); register unsigned long reg, csr, status, mask; register int channel; spin_lock(&priv->lock); for (channel = 0; channel < EXI_MAX_CHANNELS; channel++) { reg = EXI_CSR_BASE + channel * 0x14; csr = readl(reg); mask = csr & (EXI_CSR_EXTINTMASK | EXI_CSR_TCINTMASK | EXI_CSR_EXIINTMASK); status = csr & (mask << 1); if (!status) continue; writel(csr | status, reg); /* ack all for this channel */ if (status & EXI_CSR_EXTINT) exi_trigger_event(channel, EXI_EVENT_INSERT); if (status & EXI_CSR_TCINT) exi_trigger_event(channel, EXI_EVENT_TC); if (status & EXI_CSR_EXIINT) exi_trigger_event(channel, EXI_EVENT_IRQ); } spin_unlock(&priv->lock); return IRQ_HANDLED; } /** * */ int exi_lite_init() { struct exi_private *priv = exi_priv(); int err = 0; spin_lock_init(priv->lock); spin_lock_init(priv->select_lock); err = request_irq(EXI_IRQ, exi_irq_handler, SA_SHIRQ, "exi", NULL); if (err) { exi_printk(KERN_ERR, "request of irq%d failed\n", EXI_IRQ); } return err; } /** * */ void exi_lite_exit(void) { free_irq(EXI_IRQ, NULL); } --- NEW FILE: gcn-exi-lite.h --- /* * drivers/exi/gcn_exi_lite.h * * Nintendo GameCube EXpansion Interface support, "lite" version. * Copyright (C) 2004 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 * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * */ #ifndef __GCN_EXI_LITE_H #define __GCN_EXI_LITE_H #define MISSING_APGO_EXI_FRAMEWORK 1 #define EXI_LITE 1 int exi_lite_init(void); void exi_lite_exit(void); void exi_select(int channel, int device, int freq); void exi_deselect(int channel); void exi_read(int channel, void *data, int len); void exi_write(int channel, void *data, int len); #define EXI_EVENT_IRQ 0 #define EXI_EVENT_INSERT 1 #define EXI_EVENT_TC 2 int exi_register_event(int channel, int event_id, int (*handler) (int, int, void *), void *dev); int exi_unregister_event(int channel, int event_id); #endif /* __GCN_EXI_LITE_H */ Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 27 Feb 2004 12:26:02 -0000 1.1 +++ Makefile 19 Oct 2004 22:49:40 -0000 1.2 @@ -2,4 +2,4 @@ # Makefile for the EXI bus core. # -obj-$(CONFIG_EXI) += exi-driver.o +obj-$(CONFIG_EXI) += exi-driver.o gcn-exi-lite.o Index: exi-driver.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/exi-driver.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- exi-driver.c 19 Oct 2004 09:52:15 -0000 1.5 +++ exi-driver.c 19 Oct 2004 22:49:40 -0000 1.6 @@ -2,12 +2,14 @@ * drivers/exi/exi-driver.c * * Nintendo GameCube Expansion Interface support. Driver model routines. - * Copyright (C) 2004 Arthur Othieno <a.o...@bl...> + * Copyright (C) 2004 Arthur Othieno <a.o...@bl...> + * Copyright (C) 2004 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 + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. * - * 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 - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. */ #define DEBUG |
From: <aot...@us...> - 2004-10-19 09:52:24
|
Update of /cvsroot/gc-linux/linux/drivers/exi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10464/drivers/exi Modified Files: exi-driver.c Log Message: driver-model core already tests if a driver is bound to the device, and NULLifies dev->driver if so. Index: exi-driver.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/exi-driver.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- exi-driver.c 24 May 2004 00:58:58 -0000 1.4 +++ exi-driver.c 19 Oct 2004 09:52:15 -0000 1.5 @@ -36,11 +36,8 @@ struct exi_dev *exi_dev = to_exi_dev(dev); struct exi_driver *drv = to_exi_driver(dev->driver); - if (drv) { - if (drv->remove) - drv->remove(exi_dev); - exi_dev->dev.driver = NULL; - } + if (drv->remove) + drv->remove(exi_dev); return 0; } |
From: <aot...@us...> - 2004-10-19 09:50:12
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10004/arch/ppc/platforms Modified Files: gamecube.c Log Message: Don't manually set console switch. Already done in arch/ppc/kernel/setup.c Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- gamecube.c 19 Oct 2004 09:46:08 -0000 1.20 +++ gamecube.c 19 Oct 2004 09:49:50 -0000 1.21 @@ -140,9 +140,6 @@ static void __init gamecube_setup_arch(void) { -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif } void __init |
From: <aot...@us...> - 2004-10-19 09:46:56
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/arch/ppc/boot/simple Modified Files: Makefile misc-embedded.c Log Message: Merged 2.6.9 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 15 Aug 2004 22:33:03 -0000 1.8 +++ Makefile 19 Oct 2004 09:46:08 -0000 1.9 @@ -64,6 +64,7 @@ zimageinitrd-$(CONFIG_OCOTEA) := zImage.initrd-TREE end-$(CONFIG_OCOTEA) := ocotea entrypoint-$(CONFIG_OCOTEA) := 0x01000000 + extra.o-$(CONFIG_OCOTEA) := pibs.o extra.o-$(CONFIG_EV64260) := direct.o misc-ev64260.o end-$(CONFIG_EV64260) := ev64260 @@ -73,7 +74,7 @@ zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF end-$(CONFIG_GEMINI) := gemini - extra.o-$(CONFIG_K2) := legacy.o + extra.o-$(CONFIG_K2) := prepmap.o end-$(CONFIG_K2) := k2 cacheflag-$(CONFIG_K2) := -include $(clear_L2_L3) @@ -89,7 +90,7 @@ end-$(motorola) := pplus # Overrides previous assingment - extra.o-$(CONFIG_PPLUS) := legacy.o + extra.o-$(CONFIG_PPLUS) := prepmap.o extra.o-$(CONFIG_LOPEC) := mpc10x_memory.o zimage-$(pcore) := zImage-STRIPELF @@ -100,7 +101,7 @@ zimage-$(CONFIG_PPC_PREP) := zImage-PPLUS zimageinitrd-$(CONFIG_PPC_PREP) := zImage.initrd-PPLUS - extra.o-$(CONFIG_PPC_PREP) := legacy.o + extra.o-$(CONFIG_PPC_PREP) := prepmap.o misc-$(CONFIG_PPC_PREP) += misc-prep.o mpc10x_memory.o end-$(CONFIG_PPC_PREP) := prep Index: misc-embedded.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/misc-embedded.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- misc-embedded.c 15 Aug 2004 22:33:03 -0000 1.4 +++ misc-embedded.c 19 Oct 2004 09:46:08 -0000 1.5 @@ -24,7 +24,6 @@ #endif #include "nonstdio.h" -#include "zlib.h" /* The linker tells us where the image is. */ extern char __image_begin, __image_end; @@ -74,6 +73,14 @@ extern void gunzip(void *, int, unsigned char *, int *); extern void embed_config(bd_t **bp); +/* Weak function for boards which don't need to build the + * board info struct because they are using PPCBoot/U-Boot. + */ +void __attribute__ ((weak)) +embed_config(bd_t **bdp) +{ +} + unsigned long load_kernel(unsigned long load_addr, int num_words, unsigned long cksum, bd_t *bp) { |
From: <aot...@us...> - 2004-10-19 09:46:56
|
Update of /cvsroot/gc-linux/linux/arch/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/arch/ppc Modified Files: Kconfig Log Message: Merged 2.6.9 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/Kconfig,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- Kconfig 15 Aug 2004 22:33:02 -0000 1.17 +++ Kconfig 19 Oct 2004 09:46:07 -0000 1.18 @@ -49,7 +49,7 @@ There are four types of PowerPC chips supported. The more common types (601, 603, 604, 740, 750, 7400), the Motorola embedded versions (821, 823, 850, 855, 860, 52xx, 8260), the IBM embedded - versions (403 and 405) and the high end 64 bit Power processors + versions (403 and 405) and the high end 64 bit Power processors (POWER 3, POWER4, and IBM 970 also known as G5) Unless you are building a kernel for one of the embedded processor systems, 64 bit IBM RS/6000 or an Apple G5, choose 6xx. @@ -652,7 +652,7 @@ bool depends on 8xx || 8260 || GAMECUBE default y - + config PPC_MPC52xx bool @@ -711,7 +711,8 @@ config PPC_GEN550 bool - depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || PRPMC750 || K2 || PRPMC800 + depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || \ + PRPMC750 || K2 || PRPMC800 || LOPEC default y config FORCE @@ -843,10 +844,6 @@ config HIGHMEM bool "High memory support" -config KERNEL_ELF - bool - default y - source "fs/Kconfig.binfmt" config PROC_DEVICETREE @@ -864,10 +861,11 @@ Some PReP systems have residual data passed to the kernel by the firmware. This allows detection of memory size, devices present and other useful pieces of information. Sometimes this information is - not present or incorrect. + not present or incorrect, in which case it could lead to the machine + behaving incorrectly. If this happens, either disable PREP_RESIDUAL + or pass the 'noresidual' option to the kernel. - Unless you expect to boot on a PReP system, there is no need to - select Y. + If you are running a PReP system, say Y here, otherwise say N. config PROC_PREPRESIDUAL bool "Support for reading of PReP Residual Data in /proc" @@ -1075,13 +1073,13 @@ bool depends on PCI && 8260 && !8272 default y - + config 8260_PCI9 bool " Enable workaround for MPC826x erratum PCI 9" depends on PCI_8260 default y -choice +choice prompt " IDMA channel for PCI 9 workaround" depends on 8260_PCI9 @@ -1272,128 +1270,7 @@ source "arch/ppc/oprofile/Kconfig" -menu "Kernel hacking" - -config DEBUG_KERNEL - bool "Kernel debugging" - -config DEBUG_SLAB - bool "Debug memory allocations" - depends on DEBUG_KERNEL - -config MAGIC_SYSRQ - bool "Magic SysRq key" - depends on DEBUG_KERNEL - help - If you say Y here, you will have some control over the system even - if the system crashes for example during kernel debugging (e.g., you - will be able to flush the buffer cache to disk, reboot the system - immediately or dump some status information). This is accomplished - by pressing various keys while holding SysRq (Alt+PrintScreen). It - also works on a serial console (on PC hardware at least), if you - send a BREAK and then within 5 seconds a command keypress. The - keys are documented in <file:Documentation/sysrq.txt>. Don't say Y - unless you really know what this hack does. - -config DEBUG_SPINLOCK - bool "Spinlock debugging" - depends on DEBUG_KERNEL - help - Say Y here and to CONFIG_SMP to include code to check for missing - spinlock initialization and some other common spinlock errors. - -config DEBUG_HIGHMEM - bool "Highmem debugging" - depends on DEBUG_KERNEL && HIGHMEM - help - This options enables additional error checking for high memory - systems. Disable for production systems. - -config DEBUG_SPINLOCK_SLEEP - bool "Sleep-inside-spinlock checking" - depends on DEBUG_KERNEL - help - If you say Y here, various routines which may sleep will become very - noisy if they are called with a spinlock held. - -config KGDB - bool "Include kgdb kernel debugger" - depends on DEBUG_KERNEL && (BROKEN || PPC_GEN550 || 4xx) - select DEBUG_INFO - help - Include in-kernel hooks for kgdb, the Linux kernel source level - debugger. See <http://kgdb.sourceforge.net/> for more information. - Unless you are intending to debug the kernel, say N here. - -choice - prompt "Serial Port" - depends on KGDB - default KGDB_TTYS1 - -config KGDB_TTYS0 - bool "ttyS0" - -config KGDB_TTYS1 - bool "ttyS1" - -config KGDB_TTYS2 - bool "ttyS2" - -config KGDB_TTYS3 - bool "ttyS3" - -endchoice - -config KGDB_CONSOLE - bool "Enable serial console thru kgdb port" - depends on KGDB && 8xx || CPM2 - help - If you enable this, all serial console messages will be sent - over the gdb stub. - If unsure, say N. - -config XMON - bool "Include xmon kernel debugger" - depends on DEBUG_KERNEL - help - Include in-kernel hooks for the xmon kernel monitor/debugger. - Unless you are intending to debug the kernel, say N here. - -config BDI_SWITCH - bool "Include BDI-2000 user context switcher" - depends on DEBUG_KERNEL - help - Include in-kernel support for the Abatron BDI2000 debugger. - Unless you are intending to debug the kernel with one of these - machines, say N here. - -config DEBUG_INFO - bool "Compile the kernel with debug info" - depends on DEBUG_KERNEL - help - If you say Y here the resulting kernel image will include - debugging info resulting in a larger kernel image. - Say Y here only if you plan to use some sort of debugger to - debug the kernel. - If you don't debug the kernel, you can say N. - -config BOOTX_TEXT - bool "Support for early boot text console (BootX or OpenFirmware only)" - depends PPC_OF - help - Say Y here to see progress messages from the boot firmware in text - mode. Requires either BootX or Open Firmware. - -config SERIAL_TEXT_DEBUG - bool "Support for early boot texts over serial port" - depends on 4xx || GT64260 || LOPEC || PPLUS || PRPMC800 || PPC_GEN550 || PPC_MPC52xx - -config PPC_OCP - bool - depends on IBM_OCP || FSL_OCP - default y - -endmenu +source "arch/ppc/Kconfig.debug" source "security/Kconfig" |
From: <aot...@us...> - 2004-10-19 09:46:55
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: Merged 2.6.9 Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- gamecube_defconfig 15 Aug 2004 22:33:03 -0000 1.21 +++ gamecube_defconfig 19 Oct 2004 09:46:08 -0000 1.22 @@ -1,5 +1,7 @@ # # Automatically generated make config: don't edit +# Linux kernel version: 2.6.9 +# Tue Oct 19 05:43:13 2004 # CONFIG_MMU=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y @@ -18,6 +20,7 @@ # # General setup # +CONFIG_LOCALVERSION="" CONFIG_SWAP=y CONFIG_SYSVIPC=y # CONFIG_POSIX_MQUEUE is not set @@ -37,6 +40,8 @@ CONFIG_IOSCHED_DEADLINE=y CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set +CONFIG_SHMEM=y +# CONFIG_TINY_SHMEM is not set # # Loadable module support @@ -99,7 +104,6 @@ # CONFIG_GAMECUBE_CONSOLE is not set # CONFIG_PREEMPT is not set # CONFIG_HIGHMEM is not set -CONFIG_KERNEL_ELF=y CONFIG_BINFMT_ELF=y CONFIG_BINFMT_MISC=m CONFIG_CMDLINE_BOOL=y @@ -221,6 +225,7 @@ # CONFIG_INET_AH is not set # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set +# CONFIG_INET_TUNNEL is not set # CONFIG_IPV6 is not set # CONFIG_NETFILTER is not set @@ -333,6 +338,7 @@ # CONFIG_SERIO_I8042 is not set # CONFIG_SERIO_SERPORT is not set # CONFIG_SERIO_CT82C710 is not set +# CONFIG_SERIO_RAW is not set # # Input Device Drivers @@ -367,7 +373,6 @@ CONFIG_UNIX98_PTYS=y CONFIG_LEGACY_PTYS=y CONFIG_LEGACY_PTY_COUNT=256 -# CONFIG_QIC02_TAPE is not set # # IPMI @@ -419,6 +424,7 @@ # Graphics support # CONFIG_FB=y +CONFIG_FB_MODE_HELPERS=y # CONFIG_FB_CT65550 is not set # CONFIG_FB_VGA16 is not set CONFIG_FB_GAMECUBE=y @@ -428,7 +434,6 @@ # Console display driver support # # CONFIG_VGA_CONSOLE is not set -# CONFIG_MDA_CONSOLE is not set CONFIG_DUMMY_CONSOLE=y CONFIG_FRAMEBUFFER_CONSOLE=y # CONFIG_FONTS is not set |
From: <aot...@us...> - 2004-10-19 09:46:51
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/common In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/arch/ppc/boot/common Modified Files: util.S Log Message: Merged 2.6.9 Index: util.S =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/common/util.S,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- util.S 23 Jun 2004 17:58:55 -0000 1.3 +++ util.S 19 Oct 2004 09:46:07 -0000 1.4 @@ -42,7 +42,7 @@ /* Test for a 601 */ mfpvr r10 srwi r10,r10,16 - cmpi 0,r10,1 /* 601 ? */ + cmpwi 0,r10,1 /* 601 ? */ beq .clearbats_601 #endif @@ -183,9 +183,9 @@ /* Wait for the invalidation to complete */ mfspr r8,PVR srwi r8,r8,16 - cmpli cr0,r8,0x8000 /* 7450 */ - cmpli cr1,r8,0x8001 /* 7455 */ - cmpli cr2,r8,0x8002 /* 7457 */ + cmplwi cr0,r8,0x8000 /* 7450 */ + cmplwi cr1,r8,0x8001 /* 7455 */ + cmplwi cr2,r8,0x8002 /* 7457 */ cror 4*cr0+eq,4*cr0+eq,4*cr1+eq /* Now test if any are true. */ cror 4*cr0+eq,4*cr0+eq,4*cr2+eq bne 2f @@ -256,7 +256,7 @@ udelay: mfspr r4,PVR srwi r4,r4,16 - cmpi 0,r4,1 /* 601 ? */ + cmpwi 0,r4,1 /* 601 ? */ bne .udelay_not_601 00: li r0,86 /* Instructions / microsecond? */ mtctr r0 @@ -279,16 +279,16 @@ 1: mftbu r5 mftb r6 mftbu r7 - cmp 0,r5,r7 + cmpw 0,r5,r7 bne 1b /* Get [synced] base time */ addc r9,r6,r4 /* Compute end time */ addze r8,r5 2: mftbu r5 - cmp 0,r5,r8 + cmpw 0,r5,r8 blt 2b bgt 3f mftb r6 - cmp 0,r6,r9 + cmpw 0,r6,r9 blt 2b 3: blr |
From: <aot...@us...> - 2004-10-19 09:46:50
|
Update of /cvsroot/gc-linux/linux/arch/ppc/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/arch/ppc/kernel Modified Files: cputable.c Log Message: Merged 2.6.9 Index: cputable.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/kernel/cputable.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- cputable.c 15 Aug 2004 22:33:03 -0000 1.3 +++ cputable.c 19 Oct 2004 09:46:08 -0000 1.4 @@ -55,7 +55,7 @@ #endif /* We need to mark all pages as being coherent if we're SMP or we - * have a 754x and an MPC107 host bridge. + * have a 74[45]x and an MPC107 host bridge. */ #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT @@ -63,6 +63,17 @@ #define CPU_FTR_COMMON 0 #endif +/* The powersave features NAP & DOZE seems to confuse BDI when + debugging. So if a BDI is used, disable theses + */ +#ifndef CONFIG_BDI_SWITCH +#define CPU_FTR_MAYBE_CAN_DOZE CPU_FTR_CAN_DOZE +#define CPU_FTR_MAYBE_CAN_NAP CPU_FTR_CAN_NAP +#else +#define CPU_FTR_MAYBE_CAN_DOZE 0 +#define CPU_FTR_MAYBE_CAN_NAP 0 +#endif + struct cpu_spec cpu_specs[] = { #if CLASSIC_PPC { /* 601 */ @@ -76,8 +87,8 @@ { /* 603 */ 0xffff0000, 0x00030000, "603", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | - CPU_FTR_CAN_NAP, + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_603 @@ -85,8 +96,8 @@ { /* 603e */ 0xffff0000, 0x00060000, "603e", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | - CPU_FTR_CAN_NAP, + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_603 @@ -94,8 +105,8 @@ { /* 603ev */ 0xffff0000, 0x00070000, "603ev", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | - CPU_FTR_CAN_NAP, + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_603 @@ -139,8 +150,8 @@ { /* 750CX (80100 and 8010x?) */ 0xfffffff0, 0x00080100, "750CX", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750cx @@ -148,8 +159,8 @@ { /* 750CX (82201 and 82202) */ 0xfffffff0, 0x00082200, "750CX", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750cx @@ -157,8 +168,8 @@ { /* 750CXe (82214) */ 0xfffffff0, 0x00082210, "750CXe", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750cx @@ -166,8 +177,8 @@ { /* 750CXe (83214) */ 0xffffffff, 0x00083214, "750CXe (Gekko)", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750cx @@ -175,8 +186,8 @@ { /* 740/750 (0x4202, don't support TAU ?) */ 0xffffffff, 0x00084202, "740/750", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | - CPU_FTR_L2CR | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP, + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750 @@ -184,8 +195,8 @@ { /* 745/755 */ 0xfffff000, 0x00083000, "745/755", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750 @@ -193,8 +204,8 @@ { /* 750FX rev 1.x */ 0xffffff00, 0x70000100, "750FX", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_NO_DPM, COMMON_PPC, 32, 32, @@ -203,8 +214,8 @@ { /* 750FX rev 2.0 must disable HID0[DPM] */ 0xffffffff, 0x70000200, "750FX", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_NO_DPM, COMMON_PPC, 32, 32, @@ -213,8 +224,8 @@ { /* 750FX (All revs except 2.0) */ 0xffff0000, 0x70000000, "750FX", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS, COMMON_PPC, 32, 32, @@ -222,8 +233,8 @@ }, { /* 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS, COMMON_PPC, 32, 32, @@ -232,8 +243,8 @@ { /* 740/750 (L2CR bit need fixup for 740) */ 0xffff0000, 0x00080000, "740/750", CPU_FTR_COMMON | - 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_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_HPTE_TABLE | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_750 @@ -241,9 +252,9 @@ { /* 7400 rev 1.1 ? (no TAU) */ 0xffffffff, 0x000c1101, "7400 (1.1)", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | - CPU_FTR_CAN_NAP, + CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_7400 @@ -251,9 +262,9 @@ { /* 7400 */ 0xffff0000, 0x000c0000, "7400", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | - CPU_FTR_CAN_NAP, + CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_7400 @@ -261,9 +272,9 @@ { /* 7410 */ 0xffff0000, 0x800c0000, "7410", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | - CPU_FTR_CAN_NAP, + CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_7410 @@ -281,7 +292,7 @@ { /* 7450 2.1 */ 0xffffffff, 0x80000201, "7450", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | CPU_FTR_NEED_COHERENT, @@ -292,7 +303,7 @@ { /* 7450 2.3 and newer */ 0xffff0000, 0x80000000, "7450", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_NEED_COHERENT, @@ -314,7 +325,7 @@ { /* 7455 rev 2.0 */ 0xffffffff, 0x80010200, "7455", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_L3_DISABLE_NAP | CPU_FTR_NEED_COHERENT | CPU_FTR_HAS_HIGH_BATS, @@ -325,7 +336,7 @@ { /* 7455 others */ 0xffff0000, 0x80010000, "7455", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, @@ -336,7 +347,7 @@ { /* 7447/7457 Rev 1.0 */ 0xffffffff, 0x80020100, "7447/7457", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC, @@ -347,7 +358,7 @@ { /* 7447/7457 Rev 1.1 */ 0xffffffff, 0x80020101, "7447/7457", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT | CPU_FTR_NO_BTIC, @@ -358,7 +369,7 @@ { /* 7447/7457 Rev 1.2 and later */ 0xffff0000, 0x80020000, "7447/7457", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, @@ -369,7 +380,7 @@ { /* 7447A */ 0xffff0000, 0x80030000, "7447A", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR | CPU_FTR_HAS_HIGH_BATS | CPU_FTR_NEED_COHERENT, @@ -380,15 +391,15 @@ { /* 82xx (8240, 8245, 8260 are all 603e cores) */ 0x7fff0000, 0x00810000, "82xx", CPU_FTR_COMMON | - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB, + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB, COMMON_PPC, 32, 32, __setup_cpu_603 }, { /* All G2_LE (603e core, plus some) have the same pvr */ 0x7fff0000, 0x00820000, "G2_LE", - CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | - CPU_FTR_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_MAYBE_CAN_DOZE | CPU_FTR_USE_TB | + CPU_FTR_MAYBE_CAN_NAP | CPU_FTR_HAS_HIGH_BATS, COMMON_PPC, 32, 32, __setup_cpu_603 @@ -449,7 +460,16 @@ 0xffff0000, 0x00390000, "PPC970", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | - CPU_FTR_ALTIVEC_COMP | CPU_FTR_CAN_NAP, + CPU_FTR_ALTIVEC_COMP | CPU_FTR_MAYBE_CAN_NAP, + COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_ALTIVEC_COMP, + 128, 128, + __setup_cpu_ppc970 + }, + { /* PPC970FX */ + 0xffff0000, 0x003c0000, "PPC970FX", + CPU_FTR_COMMON | + CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE | + CPU_FTR_ALTIVEC_COMP | CPU_FTR_MAYBE_CAN_NAP, COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_ALTIVEC_COMP, 128, 128, __setup_cpu_ppc970 @@ -458,7 +478,8 @@ #ifdef CONFIG_8xx { /* 8xx */ 0xffff0000, 0x00500000, "8xx", - /* CPU_FTR_CAN_DOZE is possible, if the 8xx code is there.... */ + /* CPU_FTR_MAYBE_CAN_DOZE is possible, + * if the 8xx code is there.... */ CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 16, 16, @@ -599,7 +620,7 @@ #ifdef CONFIG_E500 { /* e500 */ 0xffff0000, 0x80200000, "e500", - /* xxx - galak: add CPU_FTR_CAN_DOZE */ + /* xxx - galak: add CPU_FTR_MAYBE_CAN_DOZE */ CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, |
From: <aot...@us...> - 2004-10-19 09:46:27
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/drivers/video Modified Files: Kconfig Makefile fbmem.c gamecubefb.c Log Message: Merged 2.6.9 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Kconfig,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Kconfig 15 Aug 2004 22:33:04 -0000 1.8 +++ Kconfig 19 Oct 2004 09:46:09 -0000 1.9 @@ -38,6 +38,17 @@ (e.g. an accelerated X server) and that are not frame buffer device-aware may cause unexpected results. If unsure, say N. +config FB_MODE_HELPERS + bool "Enable Video Mode Handling Helpers" + depends on FB + default y + ---help--- + This enables functions for handling video modes using the + Generalized Timing Formula and the EDID parser. A few drivers rely + on this feature such as the radeonfb, rivafb, and the i810fb. If + your driver does not take advantage of this feature, choosing Y will + just increase the kernel size by about 5K. + config FB_CIRRUS tristate "Cirrus Logic support" depends on FB && (ZORRO || PCI) @@ -68,6 +79,19 @@ help Support the Permedia2 FIFO disconnect feature (see CONFIG_FB_PM2). +config FB_ARMCLCD + tristate "ARM PrimeCell PL110 support" + depends on FB && ARM && ARM_AMBA + help + This framebuffer device driver is for the ARM PrimeCell PL110 + Colour LCD controller. ARM PrimeCells provide the building + blocks for System on a Chip devices. + + If you want to compile this as a module (=code which can be + inserted into and removed from the running kernel), say M + here and read <file:Documentation/modules.txt>. The module + will be called amba-clcd. + config FB_ACORN bool "Acorn VIDC support" depends on FB && ARM && ARCH_ACORN @@ -392,40 +416,21 @@ (<file:drivers/video/pvr2fb.c>). Please see the file <file:Documentation/fb/pvr2fb.txt>. -config FB_E1355 +config FB_EPSON1355 bool "Epson 1355 framebuffer support" - depends on FB && SUPERH + depends on FB && (SUPERH || ARCH_CEIVA) help Build in support for the SED1355 Epson Research Embedded RAMDAC LCD/CRT Controller (since redesignated as the S1D13505) as a framebuffer. Product specs at <http://www.erd.epson.com/vdc/html/products.htm>. -config E1355_REG_BASE - hex "Register Base Address" - depends on FB_E1355 - default "a8000000" - help - Epson SED1355/S1D13505 LCD/CRT controller register base address. - See the manuals at - <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for - discussion. - -config E1355_FB_BASE - hex "Framebuffer Base Address" - depends on FB_E1355 - default "a8200000" - help - Epson SED1355/S1D13505 LCD/CRT controller memory base address. See - the manuals at - <http://www.erd.epson.com/vdc/html/contents/S1D13505.htm> for - discussion. - config FB_RIVA tristate "nVidia Riva support" depends on FB && PCI select I2C_ALGOBIT if FB_RIVA_I2C select I2C if FB_RIVA_I2C + select FB_MODE_HELPERS help This driver supports graphics boards with the nVidia Riva/Geforce chips. @@ -457,7 +462,10 @@ config FB_I810 tristate "Intel 810/815 support (EXPERIMENTAL)" - depends on FB && AGP && AGP_INTEL && EXPERIMENTAL && PCI + depends on FB && EXPERIMENTAL && PCI && X86 && !X86_64 + select AGP + select AGP_INTEL + select FB_MODE_HELPERS help This driver supports the on-board graphics built in to the Intel 810 and 815 chipsets. Say Y if you have and plan to use such a board. @@ -661,6 +669,7 @@ depends on FB && PCI select I2C_ALGOBIT if FB_RADEON_I2C select I2C if FB_RADEON_I2C + select FB_MODE_HELPERS help Choose this option if you want to use an ATI Radeon graphics card as a framebuffer device. There are both PCI and AGP versions. You @@ -766,6 +775,7 @@ config FB_NEOMAGIC tristate "NeoMagic display support" depends on FB && PCI + select FB_MODE_HELPERS help This driver supports notebooks with NeoMagic PCI chips. Say Y if you have such a graphics card. Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Makefile,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- Makefile 15 Aug 2004 22:33:04 -0000 1.7 +++ Makefile 19 Oct 2004 09:46:09 -0000 1.8 @@ -13,81 +13,89 @@ obj-$(CONFIG_PPC) += macmodes.o endif -obj-$(CONFIG_FB_ACORN) += acornfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +# Hardware specific drivers go first +obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o obj-$(CONFIG_FB_AMIGA) += amifb.o c2p.o +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_PM2) += pm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PM3) += pm3fb.o -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 cfbfillrect.o cfbcopyarea.o cfbimgblt.o + +obj-$(CONFIG_FB_MATROX) += matrox/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_RIVA) += riva/ cfbimgblt.o vgastate.o +obj-$(CONFIG_FB_ATY) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o +obj-$(CONFIG_FB_ATY128) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o +obj-$(CONFIG_FB_RADEON) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o +obj-$(CONFIG_FB_SIS) += sis/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o +obj-$(CONFIG_FB_KYRO) += kyro/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o + +obj-$(CONFIG_FB_I810) += cfbcopyarea.o cfbfillrect.o cfbimgblt.o \ + vgastate.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 vgastate.o -obj-$(CONFIG_FB_IGA) += igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_VIRGE) += virgefb.o +obj-$(CONFIG_FB_3DFX) += tdfxfb.o cfbimgblt.o +ifneq ($(CONFIG_FB_3DFX_ACCEL),y) +obj-$(CONFIG_FB_3DFX) += cfbfillrect.o cfbcopyarea.o +endif 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 obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_CT65550) += chipsfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -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 -obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_IMSTT) += imsttfb.o cfbimgblt.o -obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o -obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o -obj-$(CONFIG_FB_TRIDENT) += tridentfb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_S3TRIO) += S3triofb.o -obj-$(CONFIG_FB_TGA) += tgafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VGA16) += vga16fb.o cfbfillrect.o cfbcopyarea.o \ - cfbimgblt.o vgastate.o -obj-$(CONFIG_FB_VIRGE) += virgefb.o -obj-$(CONFIG_FB_G364) += g364fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_FM2) += fm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_TRIDENT) += tridentfb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_STI) += stifb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_TX3912) += tx3912fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o - -obj-$(CONFIG_FB_MATROX) += matrox/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_RIVA) += riva/ cfbimgblt.o vgastate.o -obj-$(CONFIG_FB_SIS) += sis/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_ATY) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_ATY128) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_RADEON) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_I810) += i810/ cfbfillrect.o cfbcopyarea.o \ - cfbimgblt.o vgastate.o - -obj-$(CONFIG_FB_SUN3) += sun3fb.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 +obj-$(CONFIG_FB_CG3) += cg3.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_BW2) += bw2.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_CG14) += cg14.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_P9100) += p9100.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_TCX) += tcx.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_LEO) += leo.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ + cfbfillrect.o +obj-$(CONFIG_FB_SGIVW) += sgivwfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_ACORN) += acornfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_ATARI) += atafb.o +obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_HGA) += hgafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_IGA) += igafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +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_TGA) += tgafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o +obj-$(CONFIG_FB_G364) += g364fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_SA1100) += sa1100fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_SUN3) += sun3fb.o obj-$(CONFIG_FB_HIT) += hitfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_E1355) += epson1355fb.o +obj-$(CONFIG_FB_TX3912) += tx3912fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_EPSON1355) += epson1355fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o 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_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_ARMCLCD) += amba-clcd.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_68328) += 68328fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_GBE) += gbefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_CIRRUS) += cirrusfb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o obj-$(CONFIG_FB_ASILIANT) += asiliantfb.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 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 -obj-$(CONFIG_FB_CG3) += cg3.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ - cfbfillrect.o -obj-$(CONFIG_FB_BW2) += bw2.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ - cfbfillrect.o -obj-$(CONFIG_FB_CG14) += cg14.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ - cfbfillrect.o -obj-$(CONFIG_FB_P9100) += p9100.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ - cfbfillrect.o -obj-$(CONFIG_FB_TCX) += tcx.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ - cfbfillrect.o -obj-$(CONFIG_FB_LEO) += leo.o sbuslib.o cfbimgblt.o cfbcopyarea.o \ - cfbfillrect.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 +# Platform or fallback drivers go here +obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o +obj-$(CONFIG_FB_VGA16) += vga16fb.o cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o vgastate.o +obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblt.o cfbcopyarea.o + +# the test framebuffer is last +obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o Index: fbmem.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/fbmem.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fbmem.c 15 Aug 2004 22:33:04 -0000 1.9 +++ fbmem.c 19 Oct 2004 09:46:09 -0000 1.10 @@ -47,390 +47,34 @@ #include <linux/fb.h> -#ifdef CONFIG_FRAMEBUFFER_CONSOLE -#include "console/fbcon.h" -#endif /* * Frame buffer device initialization and setup routines */ -extern int acornfb_init(void); [...1008 lines suppressed...] } - /* - * If we get here no fb was specified. - * We consider the argument to be a global video mode option. - */ - global_mode_option = options; return 0; } - __setup("video=", video_setup); /* @@ -1616,5 +1393,6 @@ EXPORT_SYMBOL(fb_set_suspend); EXPORT_SYMBOL(fb_register_client); EXPORT_SYMBOL(fb_unregister_client); +EXPORT_SYMBOL(fb_get_options); MODULE_LICENSE("GPL"); Index: gamecubefb.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/gamecubefb.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- gamecubefb.c 10 Aug 2004 20:12:02 -0000 1.10 +++ gamecubefb.c 19 Oct 2004 09:46:09 -0000 1.11 @@ -262,11 +262,16 @@ return 0; } -int __init gamecubefb_init(void) +static int __init gamecubefb_init(void) { int video_cmap_len; int i; int err = 0; + char *option = NULL; + + if (fb_get_options("gamecubefb", &option)) + return -ENODEV; + gamecubefb_setup(option); // detect current video mode if (tv_encoding == TV_ENC_DETECT) { @@ -417,6 +422,14 @@ return err; } +static void __exit gamecubefb_exit(void) +{ + release_mem_region(gcfb_fix.smem_start, gcfb_fix.smem_len); + iounmap(gcfb_info.screen_base); + fb_dealloc_cmap(&gcfb_info.cmap); + unregister_framebuffer(&gcfb_info); +} + /* * Overrides for Emacs so that we follow Linus's tabbing style. * --------------------------------------------------------------------------- @@ -425,4 +438,6 @@ * End: */ +module_init(gamecubefb_init); +module_exit(gamecubefb_exit); MODULE_LICENSE("GPL"); |
From: <aot...@us...> - 2004-10-19 09:46:27
|
Update of /cvsroot/gc-linux/linux/include/asm-ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/include/asm-ppc Modified Files: io.h ppcboot.h Log Message: Merged 2.6.9 Index: io.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/asm-ppc/io.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- io.h 15 Aug 2004 22:33:05 -0000 1.3 +++ io.h 19 Oct 2004 09:46:10 -0000 1.4 @@ -4,7 +4,6 @@ #include <linux/config.h> #include <linux/types.h> -#include <linux/mm.h> #include <asm/page.h> #include <asm/byteorder.h> @@ -399,6 +398,79 @@ return 0; } +/* + * Here comes the ppc implementation of the IOMAP + * interfaces. + */ +static inline unsigned int ioread8(void __iomem *addr) +{ + return readb(addr); +} + +static inline unsigned int ioread16(void __iomem *addr) +{ + return readw(addr); +} + +static inline unsigned int ioread32(void __iomem *addr) +{ + return readl(addr); +} + +static inline void iowrite8(u8 val, void __iomem *addr) +{ + writeb(val, addr); +} + +static inline void iowrite16(u16 val, void __iomem *addr) +{ + writew(val, addr); +} + +static inline void iowrite32(u32 val, void __iomem *addr) +{ + writel(val, addr); +} + +static inline void ioread8_rep(void __iomem *addr, void *dst, unsigned long count) +{ + _insb((u8 __force *) addr, dst, count); +} + +static inline void ioread16_rep(void __iomem *addr, void *dst, unsigned long count) +{ + _insw_ns((u16 __force *) addr, dst, count); +} + +static inline void ioread32_rep(void __iomem *addr, void *dst, unsigned long count) +{ + _insl_ns((u32 __force *) addr, dst, count); +} + +static inline void iowrite8_rep(void __iomem *addr, const void *src, unsigned long count) +{ + _outsb((u8 __force *) addr, src, count); +} + +static inline void iowrite16_rep(void __iomem *addr, const void *src, unsigned long count) +{ + _outsw_ns((u16 __force *) addr, src, count); +} + +static inline void iowrite32_rep(void __iomem *addr, const void *src, unsigned long count) +{ + _outsl_ns((u32 __force *) addr, src, count); +} + +/* Create a virtual mapping cookie for an IO port range */ +extern void __iomem *ioport_map(unsigned long port, unsigned int nr); +extern void ioport_unmap(void __iomem *); + +/* Create a virtual mapping cookie for a PCI BAR (memory or IO) */ +struct pci_dev; +extern void __iomem *pci_iomap(struct pci_dev *dev, int bar, unsigned long max); +extern void pci_iounmap(struct pci_dev *dev, void __iomem *); + #endif /* _PPC_IO_H */ #ifdef CONFIG_8260_PCI9 Index: ppcboot.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/asm-ppc/ppcboot.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- ppcboot.h 15 Aug 2004 22:33:05 -0000 1.2 +++ ppcboot.h 19 Oct 2004 09:46:10 -0000 1.3 @@ -30,20 +30,6 @@ #ifndef __ASSEMBLY__ #include <linux/types.h> -typedef void (interrupt_handler_t)(void *); - -typedef struct monitor_functions { - int (*getc)(void); - int (*tstc)(void); - void (*putc)(const char c); - void (*puts)(const char *s); - void (*printf)(const char *fmt, ...); - void (*install_hdlr)(int, interrupt_handler_t *, void *); - void (*free_hdlr)(int); - void *(*malloc)(size_t); - void (*free)(void *); -} mon_fnc_t; - typedef struct bd_info { unsigned long bi_memstart; /* start of DRAM memory */ unsigned long bi_memsize; /* size of DRAM memory in bytes */ @@ -78,7 +64,7 @@ unsigned long bi_pcifreq; /* PCI Bus Freq, in MHz */ #endif unsigned long bi_baudrate; /* Console Baudrate */ -#if defined(CONFIG_405GP) +#if defined(CONFIG_4xx) unsigned char bi_s_version[4]; /* Version of this structure */ unsigned char bi_r_version[32]; /* Version of the ROM (IBM) */ unsigned int bi_procfreq; /* CPU (Internal) Freq, in Hz */ @@ -89,12 +75,26 @@ #if defined(CONFIG_HYMOD) hymod_conf_t bi_hymod_conf; /* hymod configuration information */ #endif -#if defined(CONFIG_EVB64260) || defined(CONFIG_85xx) - /* the board has three onboard ethernet ports */ +#if defined(CONFIG_EVB64260) || defined(CONFIG_44x) || defined(CONFIG_85xx) + /* second onboard ethernet port */ unsigned char bi_enet1addr[6]; +#endif +#if defined(CONFIG_EVB64260) || defined(CONFIG_440GX) || defined(CONFIG_85xx) + /* third onboard ethernet ports */ unsigned char bi_enet2addr[6]; #endif - mon_fnc_t *bi_mon_fnc; /* Pointer to monitor functions */ +#if defined(CONFIG_440GX) + /* fourth onboard ethernet ports */ + unsigned char bi_enet3addr[6]; +#endif +#if defined(CONFIG_4xx) + unsigned int bi_opbfreq; /* OB clock in Hz */ + int bi_iic_fast[2]; /* Use fast i2c mode */ +#endif +#if defined(CONFIG_440GX) + int bi_phynum[4]; /* phy mapping */ + int bi_phymode[4]; /* phy mode */ +#endif } bd_t; #endif /* __ASSEMBLY__ */ |
From: <aot...@us...> - 2004-10-19 09:46:27
|
Update of /cvsroot/gc-linux/linux/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/include/linux Modified Files: fb.h Log Message: Merged 2.6.9 Index: fb.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/linux/fb.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fb.h 15 Aug 2004 22:33:05 -0000 1.6 +++ fb.h 19 Oct 2004 09:46:10 -0000 1.7 @@ -158,6 +158,7 @@ #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ #define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/ +#define FB_ACTIVATE_INV_MODE 256 /* invalidate videomode */ #define FB_ACCELF_TEXT 1 /* (OBSOLETE) see fb_info.flags and vc_mode */ @@ -241,73 +242,6 @@ #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 -/* Definitions below are used in the parsed monitor specs */ -#define FB_DPMS_ACTIVE_OFF 1 -#define FB_DPMS_SUSPEND 2 -#define FB_DPMS_STANDBY 4 - -#define FB_DISP_DDI 1 -#define FB_DISP_ANA_700_300 2 -#define FB_DISP_ANA_714_286 4 -#define FB_DISP_ANA_1000_400 8 -#define FB_DISP_ANA_700_000 16 - -#define FB_DISP_MONO 32 -#define FB_DISP_RGB 64 -#define FB_DISP_MULTI 128 -#define FB_DISP_UNKNOWN 256 - -#define FB_SIGNAL_NONE 0 -#define FB_SIGNAL_BLANK_BLANK 1 -#define FB_SIGNAL_SEPARATE 2 -#define FB_SIGNAL_COMPOSITE 4 -#define FB_SIGNAL_SYNC_ON_GREEN 8 -#define FB_SIGNAL_SERRATION_ON 16 - -#define FB_MISC_PRIM_COLOR 1 -#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ - -struct fb_chroma { - __u32 redx; /* in fraction of 1024 */ - __u32 greenx; - __u32 bluex; - __u32 whitex; - __u32 redy; - __u32 greeny; - __u32 bluey; - __u32 whitey; -}; - -struct fb_monspecs { - struct fb_chroma chroma; - struct fb_videomode *modedb; /* mode database */ - __u8 manufacturer[4]; /* Manufacturer */ - __u8 monitor[14]; /* Monitor String */ - __u8 serial_no[14]; /* Serial Number */ - __u8 ascii[14]; /* ? */ - __u32 modedb_len; /* mode database length */ - __u32 model; /* Monitor Model */ - __u32 serial; /* Serial Number - Integer */ - __u32 year; /* Year manufactured */ - __u32 week; /* Week Manufactured */ - __u32 hfmin; /* hfreq lower limit (Hz) */ - __u32 hfmax; /* hfreq upper limit (Hz) */ - __u32 dclkmin; /* pixelclock lower limit (Hz) */ - __u32 dclkmax; /* pixelclock upper limit (Hz) */ - __u16 input; /* display type - see FB_DISP_* */ - __u16 dpms; /* DPMS support - see FB_DPMS_ */ - __u16 signal; /* Signal Type - see FB_SIGNAL_* */ - __u16 vfmin; /* vfreq lower limit (Hz) */ - __u16 vfmax; /* vfreq upper limit (Hz) */ - __u16 gamma; /* Gamma - in fractions of 100 */ - __u16 gtf : 1; /* supports GTF */ - __u16 misc; /* Misc flags - see FB_MISC_* */ - __u8 version; /* EDID version... */ - __u8 revision; /* ...and revision */ - __u8 max_x; /* Maximum horizontal size (cm) */ - __u8 max_y; /* Maximum vertical size (cm) */ -}; - #define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ #define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */ #define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */ @@ -383,6 +317,8 @@ const char *mask; /* cursor mask bits */ struct fbcurpos hot; /* cursor hot spot */ struct fb_image image; /* Cursor image */ +/* all fields below are for fbcon use only */ + char *data; /* copy of bitmap */ }; #ifdef __KERNEL__ @@ -394,6 +330,7 @@ #include <linux/workqueue.h> #include <linux/devfs_fs_kernel.h> #include <linux/notifier.h> +#include <linux/list.h> #include <asm/io.h> struct vm_area_struct; @@ -401,6 +338,72 @@ struct device; struct file; +/* Definitions below are used in the parsed monitor specs */ +#define FB_DPMS_ACTIVE_OFF 1 +#define FB_DPMS_SUSPEND 2 +#define FB_DPMS_STANDBY 4 + +#define FB_DISP_DDI 1 +#define FB_DISP_ANA_700_300 2 +#define FB_DISP_ANA_714_286 4 +#define FB_DISP_ANA_1000_400 8 +#define FB_DISP_ANA_700_000 16 + +#define FB_DISP_MONO 32 +#define FB_DISP_RGB 64 +#define FB_DISP_MULTI 128 +#define FB_DISP_UNKNOWN 256 + +#define FB_SIGNAL_NONE 0 +#define FB_SIGNAL_BLANK_BLANK 1 +#define FB_SIGNAL_SEPARATE 2 +#define FB_SIGNAL_COMPOSITE 4 +#define FB_SIGNAL_SYNC_ON_GREEN 8 +#define FB_SIGNAL_SERRATION_ON 16 + +#define FB_MISC_PRIM_COLOR 1 +#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ +struct fb_chroma { + __u32 redx; /* in fraction of 1024 */ + __u32 greenx; + __u32 bluex; + __u32 whitex; + __u32 redy; + __u32 greeny; + __u32 bluey; + __u32 whitey; +}; + +struct fb_monspecs { + struct fb_chroma chroma; + struct fb_videomode *modedb; /* mode database */ + __u8 manufacturer[4]; /* Manufacturer */ + __u8 monitor[14]; /* Monitor String */ + __u8 serial_no[14]; /* Serial Number */ + __u8 ascii[14]; /* ? */ + __u32 modedb_len; /* mode database length */ + __u32 model; /* Monitor Model */ + __u32 serial; /* Serial Number - Integer */ + __u32 year; /* Year manufactured */ + __u32 week; /* Week Manufactured */ + __u32 hfmin; /* hfreq lower limit (Hz) */ + __u32 hfmax; /* hfreq upper limit (Hz) */ + __u32 dclkmin; /* pixelclock lower limit (Hz) */ + __u32 dclkmax; /* pixelclock upper limit (Hz) */ + __u16 input; /* display type - see FB_DISP_* */ + __u16 dpms; /* DPMS support - see FB_DPMS_ */ + __u16 signal; /* Signal Type - see FB_SIGNAL_* */ + __u16 vfmin; /* vfreq lower limit (Hz) */ + __u16 vfmax; /* vfreq upper limit (Hz) */ + __u16 gamma; /* Gamma - in fractions of 100 */ + __u16 gtf : 1; /* supports GTF */ + __u16 misc; /* Misc flags - see FB_MISC_* */ + __u8 version; /* EDID version... */ + __u8 revision; /* ...and revision */ + __u8 max_x; /* Maximum horizontal size (cm) */ + __u8 max_y; /* Maximum vertical size (cm) */ +}; + struct fb_cmap_user { __u32 start; /* First entry */ __u32 len; /* Number of entries */ @@ -445,6 +448,21 @@ * if you own it */ #define FB_EVENT_RESUME 0x03 +/* An entry from the modelist was removed */ +#define FB_EVENT_MODE_DELETE 0x04 +/* A driver registered itself */ +#define FB_EVENT_FB_REGISTERED 0x05 +/* get console to framebuffer mapping */ +#define FB_EVENT_GET_CONSOLE_MAP 0x06 +/* set console to framebuffer mapping */ +#define FB_EVENT_SET_CONSOLE_MAP 0x07 + + +struct fb_event { + struct fb_info *info; + void *data; +}; + extern int fb_register_client(struct notifier_block *nb); extern int fb_unregister_client(struct notifier_block *nb); @@ -581,8 +599,10 @@ struct fb_pixmap pixmap; /* Image hardware mapper */ struct fb_pixmap sprite; /* Cursor hardware mapper */ struct fb_cmap cmap; /* Current cmap */ + struct list_head modelist; /* mode list */ struct fb_ops *fbops; - char *screen_base; /* Virtual address */ + char __iomem *screen_base; /* Virtual address */ + unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */ int currcon; /* Current VC. */ void *pseudo_palette; /* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING 0 @@ -692,6 +712,8 @@ u32 height); extern void fb_load_cursor_image(struct fb_info *); extern void fb_set_suspend(struct fb_info *info, int state); +extern int fb_get_color_depth(struct fb_info *info); +extern int fb_get_options(char *name, char **option); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; @@ -713,6 +735,7 @@ #define FB_MODE_IS_VESA 4 #define FB_MODE_IS_CALCULATED 8 #define FB_MODE_IS_FIRST 16 +#define FB_MODE_IS_FROM_VAR 32 extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, const struct fb_info *fb_info); @@ -731,6 +754,22 @@ /* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34 extern const struct fb_videomode vesa_modes[]; +extern void fb_var_to_videomode(struct fb_videomode *mode, + struct fb_var_screeninfo *var); +extern void fb_videomode_to_var(struct fb_var_screeninfo *var, + struct fb_videomode *mode); +extern int fb_mode_is_equal(struct fb_videomode *mode1, + struct fb_videomode *mode2); +extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); +extern void fb_delete_videomode(struct fb_videomode *mode, + struct list_head *head); +extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, + struct list_head *head); +extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, + struct list_head *head); +extern void fb_destroy_modelist(struct list_head *head); +extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, + struct list_head *head); /* drivers/video/fbcmap.c */ extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); @@ -759,6 +798,11 @@ u32 flag; }; +struct fb_modelist { + struct list_head list; + struct fb_videomode mode; +}; + extern int fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info, const char *mode_option, const struct fb_videomode *db, |
From: <aot...@us...> - 2004-10-19 09:46:26
|
Update of /cvsroot/gc-linux/linux/sound/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/sound/ppc Modified Files: Kconfig Makefile Log Message: Merged 2.6.9 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/sound/ppc/Kconfig,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Kconfig 15 Aug 2004 22:33:05 -0000 1.4 +++ Kconfig 19 Oct 2004 09:46:10 -0000 1.5 @@ -6,9 +6,12 @@ comment "ALSA PowerMac requires I2C" depends on SND && I2C=n +comment "ALSA PowerMac requires INPUT" + depends on SND && INPUT=n + config SND_POWERMAC tristate "PowerMac (AWACS, DACA, Burgundy, Tumbler, Keywest)" - depends on SND && I2C + depends on SND && I2C && INPUT select SND_PCM config SND_GAMECUBE Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/sound/ppc/Makefile,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Makefile 4 Feb 2004 23:53:26 -0000 1.1 +++ Makefile 19 Oct 2004 09:46:10 -0000 1.2 @@ -3,7 +3,7 @@ # Copyright (c) 2001 by Jaroslav Kysela <pe...@su...> # -snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o +snd-powermac-objs := powermac.o pmac.o awacs.o burgundy.o daca.o tumbler.o keywest.o beep.o snd-gamecube-objs := gamecube.o # Toplevel Module Dependency |
From: <aot...@us...> - 2004-10-19 09:46:26
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/drivers/net Modified Files: Kconfig Makefile Log Message: Merged 2.6.9 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Kconfig,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Kconfig 15 Aug 2004 22:33:04 -0000 1.8 +++ Kconfig 19 Oct 2004 09:46:09 -0000 1.9 @@ -206,7 +206,7 @@ config MACE tristate "MACE (Power Mac ethernet) support" - depends on NET_ETHERNET && PPC_PMAC + depends on NET_ETHERNET && PPC_PMAC && PPC32 select CRC32 help Power Macintoshes and clones with Ethernet built-in on the @@ -229,7 +229,7 @@ config BMAC tristate "BMAC (G3 ethernet) support" - depends on NET_ETHERNET && PPC_PMAC + depends on NET_ETHERNET && PPC_PMAC && PPC32 select CRC32 help Say Y for support of BMAC Ethernet interfaces. These are used on G3 @@ -823,7 +823,7 @@ tristate "SMC 91C9x/91C1xxx support" select CRC32 select MII - depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6) + depends on NET_ETHERNET && (ARM || REDWOOD_5 || REDWOOD_6 || M32R) help This is a driver for SMC's 91x series of Ethernet chipsets, including the SMC91C94 and the SMC91C111. Say Y if you want it @@ -1081,7 +1081,7 @@ config NE2000 tristate "NE2000/NE1000 support" - depends on NET_ISA || (Q40 && m) + depends on NET_ISA || (Q40 && m) || M32R select CRC32 ---help--- If you have a network (Ethernet) card of this type, say Y and read @@ -1359,7 +1359,7 @@ config CS89x0 tristate "CS89x0 support" - depends on NET_PCI && ISA + depends on NET_PCI && (ISA || ARCH_IXDP2X01) ---help--- Support for CS89x0 chipset based Ethernet cards. If you have a network (Ethernet) card of this type, say Y and read the @@ -1752,12 +1752,13 @@ tristate "VIA Velocity support" depends on NET_PCI && PCI select CRC32 + select CRC_CCITT select MII help If you have a VIA "Velocity" based network card say Y here. To compile this driver as a module, choose M here. The module - will be called via-rhine. + will be called via-velocity. config LAN_SAA9730 bool "Philips SAA9730 Ethernet support (EXPERIMENTAL)" @@ -2049,6 +2050,23 @@ To compile this driver as a module, choose M here: the module will be called r8169. This is recommended. +config R8169_NAPI + bool "Use Rx and Tx Polling (NAPI) (EXPERIMENTAL)" + depends on R8169 && EXPERIMENTAL + help + NAPI is a new driver API designed to reduce CPU and interrupt load + when the driver is receiving lots of packets from the card. It is + still somewhat experimental and thus not yet enabled by default. + + If your estimated Rx load is 10kpps or more, or if the card will be + deployed on potentially unfriendly networks (e.g. in a firewall), + then say Y here. + + See <file:Documentation/networking/NAPI_HOWTO.txt> for more + information. + + If in doubt, say N. + config SK98LIN tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" depends on PCI @@ -2137,6 +2155,45 @@ To compile this driver as a module, choose M here: the module will be called tg3. This is recommended. +config GIANFAR + tristate "Gianfar Ethernet" + depends on 85xx + help + This driver supports the Gigabit TSEC on the MPC85xx + family of chips, and the FEC on the 8540 + +config GFAR_NAPI + bool "NAPI Support" + depends on GIANFAR + +config MV643XX_ETH + tristate "MV-643XX Ethernet support" + depends on MOMENCO_OCELOT_C || MOMENCO_JAGUAR_ATX + help + This driver supports the gigabit Ethernet on the Marvell MV643XX + chipset which is used in the Momenco Ocelot C and Jaguar ATX. + +config MV643XX_ETH_0 + bool "MV-643XX Port 0" + depends on MV643XX_ETH + help + This enables support for Port 0 of the Marvell MV643XX Gigabit + Ethernet. + +config MV643XX_ETH_1 + bool "MV-643XX Port 1" + depends on MV643XX_ETH + help + This enables support for Port 1 of the Marvell MV643XX Gigabit + Ethernet. + +config MV643XX_ETH_2 + bool "MV-643XX Port 2" + depends on MV643XX_ETH + help + This enables support for Port 2 of the Marvell MV643XX Gigabit + Ethernet. + endmenu # Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 15 Aug 2004 22:33:04 -0000 1.8 +++ Makefile 19 Oct 2004 09:46:09 -0000 1.9 @@ -10,6 +10,9 @@ obj-$(CONFIG_IBM_EMAC) += ibm_emac/ obj-$(CONFIG_IXGB) += ixgb/ obj-$(CONFIG_BONDING) += bonding/ +obj-$(CONFIG_GIANFAR) += gianfar_driver.o + +gianfar_driver-objs := gianfar.o gianfar_ethtool.o gianfar_phy.o # # link order important here @@ -95,6 +98,8 @@ obj-$(CONFIG_FORCEDETH) += forcedeth.o obj-$(CONFIG_NE_H8300) += ne-h8300.o 8390.o +obj-$(CONFIG_MV643XX_ETH) += mv643xx_eth.o + obj-$(CONFIG_PPP) += ppp_generic.o slhc.o obj-$(CONFIG_PPP_ASYNC) += ppp_async.o obj-$(CONFIG_PPP_SYNC_TTY) += ppp_synctty.o |
From: <aot...@us...> - 2004-10-19 09:46:26
|
Update of /cvsroot/gc-linux/linux/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/init Modified Files: main.c Log Message: Merged 2.6.9 Index: main.c =================================================================== RCS file: /cvsroot/gc-linux/linux/init/main.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- main.c 15 Aug 2004 22:33:05 -0000 1.9 +++ main.c 19 Oct 2004 09:46:10 -0000 1.10 @@ -31,6 +31,7 @@ #include <linux/tty.h> #include <linux/gfp.h> #include <linux/percpu.h> +#include <linux/kmod.h> #include <linux/kernel_stat.h> #include <linux/security.h> #include <linux/workqueue.h> @@ -93,6 +94,11 @@ extern void populate_rootfs(void); extern void driver_init(void); extern void prepare_namespace(void); +#ifdef CONFIG_ACPI +extern void acpi_early_init(void); +#else +static inline void acpi_early_init(void) { } +#endif #ifdef CONFIG_TC extern void tc_init(void); @@ -104,8 +110,8 @@ /* * Boot command-line arguments */ -#define MAX_INIT_ARGS 8 -#define MAX_INIT_ENVS 8 +#define MAX_INIT_ARGS 32 +#define MAX_INIT_ENVS 32 extern void time_init(void); /* Default late time init is NULL. archs can override this later. */ @@ -150,8 +156,6 @@ char * envp_init[MAX_INIT_ENVS+2] = { "HOME=/", "TERM=linux", NULL, }; static const char *panic_later, *panic_param; -__setup("profile=", profile_setup); - static int __init obsolete_checksetup(char *line) { struct obs_kernel_param *p; @@ -178,15 +182,28 @@ return 0; } -/* this should be approx 2 Bo*oMips to start (note initial shift), and will - still work even if initially too large, it will just take slightly longer */ +static unsigned long preset_lpj; +static int __init lpj_setup(char *str) +{ + preset_lpj = simple_strtoul(str,NULL,0); + return 1; +} + +__setup("lpj=", lpj_setup); + +/* + * This should be approx 2 Bo*oMips to start (note initial shift), and will + * still work even if initially too large, it will just take slightly longer + */ unsigned long loops_per_jiffy = (1<<12); EXPORT_SYMBOL(loops_per_jiffy); -/* 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% */ +/* + * 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 __devinit calibrate_delay(void) @@ -194,40 +211,53 @@ unsigned long ticks, loopbit; int lps_precision = LPS_PREC; - loops_per_jiffy = (1<<12); + if (preset_lpj) { + loops_per_jiffy = preset_lpj; + printk("Calibrating delay loop (skipped)... " + "%lu.%02lu BogoMIPS preset\n", + loops_per_jiffy/(500000/HZ), + (loops_per_jiffy/(5000/HZ)) % 100); + } else { + loops_per_jiffy = (1<<12); - printk("Calibrating delay loop... "); - while ((loops_per_jiffy <<= 1) != 0) { - /* wait for "start of" clock tick */ - ticks = jiffies; - while (ticks == jiffies) - /* nothing */; - /* Go .. */ - ticks = jiffies; - __delay(loops_per_jiffy); - ticks = jiffies - ticks; - if (ticks) - break; - } + printk(KERN_DEBUG "Calibrating delay loop... "); + while ((loops_per_jiffy <<= 1) != 0) { + /* wait for "start of" clock tick */ + ticks = jiffies; + while (ticks == jiffies) + /* nothing */; + /* Go .. */ + ticks = jiffies; + __delay(loops_per_jiffy); + ticks = jiffies - ticks; + if (ticks) + break; + } -/* Do a binary approximation to get loops_per_jiffy set to equal one clock - (up to lps_precision bits) */ - loops_per_jiffy >>= 1; - loopbit = loops_per_jiffy; - while ( lps_precision-- && (loopbit >>= 1) ) { - loops_per_jiffy |= loopbit; - ticks = jiffies; - while (ticks == jiffies); - ticks = jiffies; - __delay(loops_per_jiffy); - if (jiffies != ticks) /* longer than 1 tick */ - loops_per_jiffy &= ~loopbit; + /* + * Do a binary approximation to get loops_per_jiffy set to + * equal one clock (up to lps_precision bits) + */ + loops_per_jiffy >>= 1; + loopbit = loops_per_jiffy; + while (lps_precision-- && (loopbit >>= 1)) { + loops_per_jiffy |= loopbit; + ticks = jiffies; + while (ticks == jiffies) + /* nothing */; + ticks = jiffies; + __delay(loops_per_jiffy); + if (jiffies != ticks) /* longer than 1 tick */ + loops_per_jiffy &= ~loopbit; + } + + /* Round the value and print it */ + printk("%lu.%02lu BogoMIPS (lpj=%lu)\n", + loops_per_jiffy/(500000/HZ), + (loops_per_jiffy/(5000/HZ)) % 100, + loops_per_jiffy); } -/* Round the value and print it */ - printk("%lu.%02lu BogoMIPS\n", - loops_per_jiffy/(500000/HZ), - (loops_per_jiffy/(5000/HZ)) % 100); } static int __init debug_kernel(char *str) @@ -249,20 +279,26 @@ __setup("debug", debug_kernel); __setup("quiet", quiet_kernel); -/* Unknown boot options get handed to init, unless they look like - failed parameters */ +/* + * Unknown boot options get handed to init, unless they look like + * failed parameters + */ static int __init unknown_bootoption(char *param, char *val) { /* Change NUL term back to "=", to make "param" the whole string. */ - if (val) - val[-1] = '='; + if (val) { + if (val[-1] == '"') val[-2] = '='; + else val[-1] = '='; + } /* Handle obsolete-style parameters */ if (obsolete_checksetup(param)) return 0; - /* Preemptive maintenance for "why didn't my mispelled command - line work?" */ + /* + * Preemptive maintenance for "why didn't my mispelled command + * line work?" + */ if (strchr(param, '.') && (!val || strchr(param, '.') < val)) { printk(KERN_ERR "Unknown boot option `%s': ignoring\n", param); return 0; @@ -302,7 +338,8 @@ unsigned int i; execute_command = str; - /* In case LILO is going to boot us with default command line, + /* + * In case LILO is going to boot us with default command line, * it prepends "auto" before the whole cmdline which makes * the shell think it should execute a script with such name. * So we ignore all arguments entered _before_ init=... [MJ] @@ -468,7 +505,6 @@ * 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); @@ -533,12 +569,7 @@ #endif check_bugs(); - /* - * We count on the initial thread going ok - * Like idlers init is an unlocked kernel thread, which will - * make syscalls (and thus be locked). - */ - init_idle(current, smp_processor_id()); + acpi_early_init(); /* before LAPIC and SMP init */ /* Do the rest non-__init'ed, we're now alive */ rest_init(); @@ -601,6 +632,10 @@ */ static void __init do_basic_setup(void) { + /* drivers will send hotplug events */ + init_workqueues(); + usermodehelper_init(); + driver_init(); #ifdef CONFIG_SYSCTL @@ -610,7 +645,6 @@ /* Networking initialization needs a process context */ sock_init(); - init_workqueues(); do_initcalls(); } |
From: <aot...@us...> - 2004-10-19 09:46:25
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9216/drivers/block Modified Files: Kconfig Makefile Log Message: Merged 2.6.9 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Kconfig,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Kconfig 15 Aug 2004 22:33:04 -0000 1.6 +++ Kconfig 19 Oct 2004 09:46:09 -0000 1.7 @@ -184,7 +184,7 @@ config CISS_SCSI_TAPE bool "SCSI tape drive support for Smart Array 5xxx" - depends on BLK_CPQ_CISS_DA && SCSI + depends on BLK_CPQ_CISS_DA && SCSI && PROC_FS help When enabled (Y), this option allows SCSI tape drives and SCSI medium changers (tape robots) to be accessed via a Compaq 5xxx array @@ -319,6 +319,15 @@ Use devices /dev/sx8/$N and /dev/sx8/$Np$M. +config BLK_DEV_UB + tristate "Low Performance USB Block driver" + depends on USB + help + This driver supports certain USB attached storage devices + such as flash keys. + + If unsure, say N. + config BLK_DEV_RAM tristate "RAM disk support" ---help--- Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Makefile,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- Makefile 15 Aug 2004 22:33:04 -0000 1.6 +++ Makefile 19 Oct 2004 09:46:09 -0000 1.7 @@ -44,4 +44,5 @@ obj-$(CONFIG_VIODASD) += viodasd.o obj-$(CONFIG_BLK_DEV_SX8) += sx8.o +obj-$(CONFIG_BLK_DEV_UB) += ub.o |