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: <aot...@us...> - 2004-06-01 14:23:22
|
Update of /cvsroot/gc-linux/linux/include/sound In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31248/include/sound Removed Files: asound.h Log Message: Icky compiler workarounds. Avoided by using a non-broken compiler/toolchain. --- asound.h DELETED --- |
From: <sve...@us...> - 2004-05-25 20:27:16
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19661 Modified Files: gamecube_time.c Log Message: Reordered functions to avoid forward references Index: gamecube_time.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube_time.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- gamecube_time.c 1 May 2004 19:10:37 -0000 1.2 +++ gamecube_time.c 25 May 2004 20:27:06 -0000 1.3 @@ -2,95 +2,6 @@ #include <linux/time.h> - -#define RTC_OFFSET 946684800L - -static int bias = 0; - -long __init gamecube_time_init(void) -{ - char sram[64]; - int *pbias = &sram[0xC]; - read_sram(sram); - bias = *pbias; - return 0; -} - -unsigned long gamecube_get_rtc_time(void) -{ - return get_rtc() + bias + RTC_OFFSET; -} - -int gamecube_set_rtc_time(unsigned long nowtime) -{ - set_rtc(nowtime - RTC_OFFSET - bias); - - return 1; -} - - -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_imm(0, &a, 4, 1, 0); - exi_sync(0); - // Read the time and date value! - exi_imm(0, &a, 4, 0, 0); - exi_sync(0); - - // 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_imm(0, &a, 4, 1, 0); - exi_sync(0); - - // Set the new time and date value! - exi_imm(0, &aval, 4, 1, 0); - exi_sync(0); - - // Deselect the RTC device. - exi_deselect(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_imm(0, &a, 4, 1, 0); - exi_sync(0); - - // Read the SRAM data! - exi_imm_ex(0, abuf, 64, 0); - - // Deselect the SRAM device. - exi_deselect(0); - - return; -} - /////////////////////////////////////////////////////////////////////////////////////////////////////// // must be MOVED LATER /////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -179,3 +90,93 @@ d += tc; } } + +///////////////////////////////////////////////////////////7 + +#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_imm(0, &a, 4, 1, 0); + exi_sync(0); + + // Read the SRAM data! + exi_imm_ex(0, abuf, 64, 0); + + // Deselect the SRAM device. + exi_deselect(0); + + return; +} + +long __init gamecube_time_init(void) +{ + char sram[64]; + int *pbias = (int *)&sram[0xC]; + read_sram(sram); + bias = *pbias; + return 0; +} + +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_imm(0, &a, 4, 1, 0); + exi_sync(0); + // Read the time and date value! + exi_imm(0, &a, 4, 0, 0); + exi_sync(0); + + // 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_imm(0, &a, 4, 1, 0); + exi_sync(0); + + // Set the new time and date value! + exi_imm(0, &aval, 4, 1, 0); + exi_sync(0); + + // Deselect the RTC device. + exi_deselect(0); +} + +unsigned long gamecube_get_rtc_time(void) +{ + return get_rtc() + bias + RTC_OFFSET; +} + +int gamecube_set_rtc_time(unsigned long nowtime) +{ + set_rtc(nowtime - RTC_OFFSET - bias); + + return 1; +} + |
From: <aot...@us...> - 2004-05-24 01:16:36
|
Update of /cvsroot/gc-linux/linux/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7253/include/linux Modified Files: exi.h Log Message: Add exi_{get,set}_drvdata(); use these to manipulate driver-private data. Index: exi.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/linux/exi.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- exi.h 24 May 2004 00:58:59 -0000 1.4 +++ exi.h 24 May 2004 01:16:24 -0000 1.5 @@ -40,4 +40,14 @@ extern int exi_driver_register(struct exi_driver *drv); extern void exi_driver_unregister(struct exi_driver *drv); +static inline void *exi_get_drvdata(struct exi_dev *exi_dev) +{ + return dev_get_drvdata(&exi_dev->dev); +} + +static inline void exi_set_drvdata(struct exi_dev *exi_dev, void *data) +{ + dev_set_drvdata(&exi_dev->dev, data); +} + #endif /* !__EXI_H */ |
From: <aot...@us...> - 2004-05-24 00:59:09
|
Update of /cvsroot/gc-linux/linux/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3839/include/linux Modified Files: exi.h Log Message: - Add (generic) ->probe() and ->remove() callbacks. - Fixup documentation accordingly. Index: exi.h =================================================================== RCS file: /cvsroot/gc-linux/linux/include/linux/exi.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- exi.h 2 Mar 2004 23:43:24 -0000 1.3 +++ exi.h 24 May 2004 00:58:59 -0000 1.4 @@ -1,10 +1,10 @@ +#ifndef __EXI_H +#define __EXI_H + /* * include/linux/exi.h */ -#ifndef __EXI_H -#define __EXI_H - #include <linux/device.h> @@ -25,6 +25,9 @@ char *name; struct exi_device_id *id_table; + int (*probe) (struct exi_dev *dev); + void (*remove) (struct exi_dev *dev); + struct device_driver driver; }; |
From: <aot...@us...> - 2004-05-24 00:59:09
|
Update of /cvsroot/gc-linux/linux/drivers/exi In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3839/drivers/exi Modified Files: exi-driver.c Log Message: - Add (generic) ->probe() and ->remove() callbacks. - Fixup documentation accordingly. Index: exi-driver.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/exi/exi-driver.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- exi-driver.c 2 Mar 2004 23:43:24 -0000 1.3 +++ exi-driver.c 24 May 2004 00:58:58 -0000 1.4 @@ -1,18 +1,50 @@ /* * drivers/exi/exi-driver.c * + * Nintendo GameCube Expansion Interface support. Driver model routines. * Copyright (C) 2004 Arthur Othieno <a.o...@bl...> + * + * 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 #include <linux/init.h> +#include <linux/errno.h> #include <linux/kernel.h> #include <linux/device.h> - #include <linux/exi.h> +static int exi_device_probe(struct device *dev) +{ + struct exi_dev *exi_dev = to_exi_dev(dev); + struct exi_driver *drv = to_exi_driver(dev->driver); + int err = -ENODEV; + + if (drv->probe) + err = drv->probe(exi_dev); + + return err; +} + +static int exi_device_remove(struct device *dev) +{ + 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; + } + + return 0; +} + /** * exi_driver_register - register an EXI device driver. * @drv: driver structure to register. @@ -24,10 +56,14 @@ { drv->driver.name = drv->name; drv->driver.bus = &exi_bus_type; + drv->driver.probe = exi_device_probe; + drv->driver.remove = exi_device_remove; return driver_register(&drv->driver); } +EXPORT_SYMBOL(exi_driver_register); + /** * exi_driver_unregister - unregister an EXI device driver. * @drv: driver structure to unregister. @@ -40,17 +76,9 @@ driver_unregister(&drv->driver); } -/** - * exi_bus_match - attach a driver to a device. - * @dev: device structure to match. - * @drv: driver structure to match against. - * - * Attaches a driver to a device by matching the device IDs - * the driver claims to support with the actual device ID of - * a particular device. - * - * Returns 1 when driver is attached, 0 otherwise. - */ +EXPORT_SYMBOL(exi_driver_unregister); + + static int exi_bus_match(struct device *dev, struct device_driver *drv) { struct exi_dev *exi_dev = to_exi_dev(dev); @@ -69,15 +97,18 @@ return 0; } +struct bus_type exi_bus_type = { + .name = "exi", + .match = exi_bus_match, +}; + +EXPORT_SYMBOL(exi_bus_type); struct device exi_bus_dev = { .bus_id = "exi0", }; -struct bus_type exi_bus_type = { - .name = "exi", - .match = exi_bus_match, -}; +EXPORT_SYMBOL(exi_bus_dev); static int __init exi_driver_init(void) { @@ -92,8 +123,3 @@ } postcore_initcall(exi_driver_init); - -EXPORT_SYMBOL(exi_bus_dev); -EXPORT_SYMBOL(exi_bus_type); -EXPORT_SYMBOL(exi_driver_register); -EXPORT_SYMBOL(exi_driver_unregister); |
From: <aot...@us...> - 2004-05-24 00:59:08
|
Update of /cvsroot/gc-linux/linux/Documentation In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3839/Documentation Modified Files: exi.txt Log Message: - Add (generic) ->probe() and ->remove() callbacks. - Fixup documentation accordingly. Index: exi.txt =================================================================== RCS file: /cvsroot/gc-linux/linux/Documentation/exi.txt,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- exi.txt 15 Mar 2004 00:06:56 -0000 1.2 +++ exi.txt 24 May 2004 00:58:58 -0000 1.3 @@ -4,40 +4,55 @@ [Introductory information goes here...] -Device drivers. ---------------- +Device drivers +-------------- -When writing drivers for devices attached to the EXI bus, do not bother with -device probing, removal and hotplug events. The bus driver already takes care -of this. +Outlined below is the recommended practice when writing EXI device drivers. +The bus driver already handles quite an amount of stuff, although some of +it might have to be implemented by individual device drivers. If in doubt, +see include/linux/exi.h. -Registration: -------------- -Drivers should declare a struct exi_driver. They must initialize both the -`name' and `id_table' fields. +Registration +------------ -`name' distinguishes the driver from others registered with the bus. It -should be short, unique, yet remain informative. +Declare a struct exi_driver. Initialize at least the name, id_table, +probe and remove fields: -`id_table' is a list of device IDs the driver claims to support. These -should be taken from include/linux/exi_ids.h: - static struct exi_device_id frob_id_table[] = { - { EXI_ID_FROB0 }, - { EXI_ID_FROB1 }, + static struct exi_device_id frob_id_tbl[] __devinitdata = { + { .dev_id = EXI_ID_FROB0, }, + { .dev_id = EXI_ID_FROB1, }, + { .dev_id = EXI_ID_FROB2, }, }; static struct exi_driver frob_driver = { .name = "frob", - .id_table = frob_id_table, + .id_table = frob_id_tbl, + .probe = frob_probe, + .remove = __devexit_p(frob_remove), }; +`name' distinguishes the driver from others registered with the bus. +It should be short, unique, yet remain informative. + +`id_table' is a pointer to a table of device IDs the driver claims to +support. These should be taken directly from include/linux/exi_ids.h. +This table should be marked __devinitdata. + +`probe' is a pointer to a function that's called once the driver is bound +to a device it claims to support. This should be marked __devinit. + +`remove' is a pointer to a function that's called when either the driver +unregisters with the bus, or a device bound to that specific driver is +physically unplugged from the bus. This should be marked __devexit and +created with __devexit_p(). + From within the driver's initialization function, register the driver with the bus by calling exi_driver_register() with the driver structure declared -previously, like so: +previously: static int __init frob_init(void) { @@ -45,8 +60,11 @@ } -If the driver may be compiled as a loadable kernel module, -call exi_driver_unregister() in the driver's exit function: +Deregistration +-------------- + +If the driver may be compiled as a loadable kernel module, then all you +have to do is call exi_driver_unregister() in the driver's exit function: static void __exit frob_exit(void) { |
From: <a.o...@bl...> - 2004-05-24 00:56:29
|
On Sat, Apr 17, 2004 at 01:53:38AM -0700, sve...@us... wrote: > Update of /cvsroot/gc-linux/linux/arch/ppc/platforms > In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19046 > > Added Files: > gamecube_time.c > Log Message: > Created $ touch arch/ppc/platforms/gamecube_time.c $ make arch/ppc/platforms/gamecube_time.o \ > 2>&1 >/dev/null | wc -l 57 $ Ick. |
From: <aot...@us...> - 2004-05-24 00:23:03
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28256/arch/ppc/platforms Modified Files: gamecube.c Log Message: Move console switch into ->setup_arch() Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gamecube.c 16 May 2004 21:05:57 -0000 1.16 +++ gamecube.c 24 May 2004 00:22:54 -0000 1.17 @@ -29,11 +29,6 @@ extern int gamecube_set_rtc_time(unsigned long nowtime); -void __init -gamecube_setup_arch(void) -{ -} - unsigned long gamecube_find_end_of_memory(void) { return 24*1024*1024 - (640*576*2); /* 24 MB minus max. framebuffer */ @@ -84,6 +79,14 @@ return 0; } +static void __init +gamecube_setup_arch(void) +{ +#ifdef CONFIG_DUMMY_CONSOLE + conswitchp = &dummy_con; +#endif +} + void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) @@ -116,7 +119,4 @@ 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; -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif } |
From: <aot...@us...> - 2004-05-21 20:22:05
|
Update of /cvsroot/gc-linux/linux/arch/ppc/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8690/arch/ppc/kernel Added Files: cputable.c Log Message: Add support for 750CXe (Gekko; PVR 0x00083214) --- NEW FILE: cputable.c --- /* * arch/ppc/kernel/cputable.c * * Copyright (C) 2001 Ben. Herrenschmidt (be...@ke...) * * 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/config.h> #include <linux/string.h> #include <linux/sched.h> #include <linux/threads.h> #include <linux/init.h> #include <asm/cputable.h> struct cpu_spec* cur_cpu_spec[NR_CPUS]; extern void __setup_cpu_601(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_603(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_604(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_750(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_750cx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_750fx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_7400(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_7410(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_745x(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_power3(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_power4(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_ppc970(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_8xx(unsigned long offset, int cpu_nr, struct cpu_spec* spec); extern void __setup_cpu_generic(unsigned long offset, int cpu_nr, struct cpu_spec* spec); #define CLASSIC_PPC (!defined(CONFIG_8xx) && !defined(CONFIG_4xx) && \ !defined(CONFIG_POWER3) && !defined(CONFIG_POWER4)) /* This table only contains "desktop" CPUs, it need to be filled with embedded * ones as well... */ #define COMMON_PPC (PPC_FEATURE_32 | PPC_FEATURE_HAS_FPU | \ PPC_FEATURE_HAS_MMU) /* We only set the altivec features if the kernel was compiled with altivec * support */ #ifdef CONFIG_ALTIVEC #define CPU_FTR_ALTIVEC_COMP CPU_FTR_ALTIVEC #define PPC_FEATURE_ALTIVEC_COMP PPC_FEATURE_HAS_ALTIVEC #else #define CPU_FTR_ALTIVEC_COMP 0 #define PPC_FEATURE_ALTIVEC_COMP 0 #endif /* We need to mark all pages as being coherent if we're SMP or we * have a 754x and an MPC107 host bridge. */ #if defined(CONFIG_SMP) || defined(CONFIG_MPC10X_BRIDGE) #define CPU_FTR_COMMON CPU_FTR_NEED_COHERENT #else #define CPU_FTR_COMMON 0 #endif struct cpu_spec cpu_specs[] = { #if CLASSIC_PPC { /* 601 */ 0xffff0000, 0x00010000, "601", CPU_FTR_COMMON | CPU_FTR_601 | CPU_FTR_HPTE_TABLE, COMMON_PPC | PPC_FEATURE_601_INSTR | PPC_FEATURE_UNIFIED_CACHE, 32, 32, __setup_cpu_601 }, { /* 603 */ 0xffff0000, 0x00030000, "603", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_603 }, { /* 603e */ 0xffff0000, 0x00060000, "603e", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_603 }, { /* 603ev */ 0xffff0000, 0x00070000, "603ev", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_CAN_NAP, COMMON_PPC, 32, 32, __setup_cpu_603 }, { /* 604 */ 0xffff0000, 0x00040000, "604", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE, COMMON_PPC, 32, 32, __setup_cpu_604 }, { /* 604e */ 0xfffff000, 0x00090000, "604e", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE, COMMON_PPC, 32, 32, __setup_cpu_604 }, { /* 604r */ 0xffff0000, 0x00090000, "604r", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE, COMMON_PPC, 32, 32, __setup_cpu_604 }, { /* 604ev */ 0xffff0000, 0x000a0000, "604ev", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_604_PERF_MON | CPU_FTR_HPTE_TABLE, COMMON_PPC, 32, 32, __setup_cpu_604 }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_750cx }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_750cx }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_750cx }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_750cx }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_750 }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_750 }, { /* 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_DUAL_PLL_750FX | CPU_FTR_NO_DPM, COMMON_PPC, 32, 32, __setup_cpu_750 }, { /* 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_NO_DPM, COMMON_PPC, 32, 32, __setup_cpu_750 }, { /* 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_DUAL_PLL_750FX | CPU_FTR_HAS_HIGH_BATS, COMMON_PPC, 32, 32, __setup_cpu_750fx }, { /* 740/750 (L2CR bit need fixup for 740) */ 0xffff0000, 0x00080000, "740/750", CPU_FTR_COMMON | 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, COMMON_PPC, 32, 32, __setup_cpu_750 }, { /* 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_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_7400 }, { /* 7400 */ 0xffff0000, 0x000c0000, "7400", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_7400 }, { /* 7410 */ 0xffff0000, 0x800c0000, "7410", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_CAN_DOZE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_TAU | CPU_FTR_ALTIVEC_COMP | CPU_FTR_HPTE_TABLE | CPU_FTR_CAN_NAP, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_7410 }, { /* 7450 2.0 - no doze/nap */ 0xffffffff, 0x80000200, "7450", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 7450 2.1 */ 0xffffffff, 0x80000201, "7450", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_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, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 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_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_NAP_DISABLE_L2_PR, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 7455 rev 1.x */ 0xffffff00, 0x80010100, "7455", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_L2CR | CPU_FTR_ALTIVEC_COMP | CPU_FTR_L3CR | CPU_FTR_HPTE_TABLE | CPU_FTR_SPEC7450 | CPU_FTR_HAS_HIGH_BATS, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 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_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_HAS_HIGH_BATS, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 7455 others */ 0xffff0000, 0x80010000, "7455", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_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, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 7457 */ 0xffff0000, 0x80020000, "7457", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_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, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 7447A */ 0xffff0000, 0x80030000, "7447A", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_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, COMMON_PPC | PPC_FEATURE_ALTIVEC_COMP, 32, 32, __setup_cpu_745x }, { /* 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, COMMON_PPC, 32, 32, __setup_cpu_603 }, { /* default match, we assume split I/D cache & TB (non-601)... */ 0x00000000, 0x00000000, "(generic PPC)", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, COMMON_PPC, 32, 32, __setup_cpu_generic }, #endif /* CLASSIC_PPC */ #ifdef CONFIG_PPC64BRIDGE { /* Power3 */ 0xffff0000, 0x00400000, "Power3 (630)", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, COMMON_PPC | PPC_FEATURE_64, 128, 128, __setup_cpu_power3 }, { /* Power3+ */ 0xffff0000, 0x00410000, "Power3 (630+)", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, COMMON_PPC | PPC_FEATURE_64, 128, 128, __setup_cpu_power3 }, { /* I-star */ 0xffff0000, 0x00360000, "I-star", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, COMMON_PPC | PPC_FEATURE_64, 128, 128, __setup_cpu_power3 }, { /* S-star */ 0xffff0000, 0x00370000, "S-star", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, COMMON_PPC | PPC_FEATURE_64, 128, 128, __setup_cpu_power3 }, #endif /* CONFIG_PPC64BRIDGE */ #ifdef CONFIG_POWER4 { /* Power4 */ 0xffff0000, 0x00350000, "Power4", CPU_FTR_COMMON | CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB | CPU_FTR_HPTE_TABLE, COMMON_PPC | PPC_FEATURE_64, 128, 128, __setup_cpu_power4 }, { /* PPC970 */ 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, COMMON_PPC | PPC_FEATURE_64 | PPC_FEATURE_ALTIVEC_COMP, 128, 128, __setup_cpu_ppc970 }, #endif /* CONFIG_POWER4 */ #ifdef CONFIG_8xx { /* 8xx */ 0xffff0000, 0x00500000, "8xx", /* CPU_FTR_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, __setup_cpu_8xx /* Empty */ }, #endif /* CONFIG_8xx */ #ifdef CONFIG_40x { /* 403GC */ 0xffffff00, 0x00200200, "403GC", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 16, 16, 0, /*__setup_cpu_403 */ }, { /* 403GCX */ 0xffffff00, 0x00201400, "403GCX", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 16, 16, 0, /*__setup_cpu_403 */ }, { /* 403G ?? */ 0xffff0000, 0x00200000, "403G ??", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 16, 16, 0, /*__setup_cpu_403 */ }, { /* 405GP */ 0xffff0000, 0x40110000, "405GP", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* STB 03xxx */ 0xffff0000, 0x40130000, "STB03xxx", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* STB 04xxx */ 0xffff0000, 0x41810000, "STB04xxx", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* NP405L */ 0xffff0000, 0x41610000, "NP405L", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* NP4GS3 */ 0xffff0000, 0x40B10000, "NP4GS3", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* NP405H */ 0xffff0000, 0x41410000, "NP405H", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* 405GPr */ 0xffff0000, 0x50910000, "405GPr", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* STBx25xx */ 0xffff0000, 0x51510000, "STBx25xx", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, { /* 405LP */ 0xffff0000, 0x41F10000, "405LP", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, 0, /*__setup_cpu_405 */ }, { /* Xilinx Virtex-II Pro */ 0xffff0000, 0x20010000, "Virtex-II Pro", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU | PPC_FEATURE_HAS_4xxMAC, 32, 32, 0, /*__setup_cpu_405 */ }, #endif /* CONFIG_40x */ #ifdef CONFIG_44x { /* 440GP Rev. B */ 0xf0000fff, 0x40000440, "440GP Rev. B", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, 0, /*__setup_cpu_440 */ }, { /* 440GP Rev. C */ 0xf0000fff, 0x40000481, "440GP Rev. C", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, 0, /*__setup_cpu_440 */ }, { /* 440GX Rev. A */ 0xf0000fff, 0x50000850, "440GX Rev. A", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, 0, /*__setup_cpu_440 */ }, { /* 440GX Rev. B */ 0xf0000fff, 0x50000851, "440GX Rev. B", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, 0, /*__setup_cpu_440 */ }, { /* 440GX Rev. B1 (2.1) */ 0xf0000fff, 0x50000852, "440GX Rev. B1 (2.1)", CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB, PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU, 32, 32, 0, /*__setup_cpu_440 */ }, #endif /* CONFIG_44x */ #if !CLASSIC_PPC { /* default match */ 0x00000000, 0x00000000, "(generic PPC)", CPU_FTR_COMMON, PPC_FEATURE_32, 32, 32, 0, } #endif /* !CLASSIC_PPC */ }; |
From: <aot...@us...> - 2004-05-21 20:16:26
|
Update of /cvsroot/gc-linux/linux/arch/ppc/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7360/arch/ppc/kernel Log Message: Directory /cvsroot/gc-linux/linux/arch/ppc/kernel added to the repository |
From: <aot...@us...> - 2004-05-18 13:37:28
|
Update of /cvsroot/gc-linux/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29849 Removed Files: Makefile Log Message: This is toolchain biased. You should now do one of: $ export ARCH=ppc CROSS_COMPILE=$my-powerpc-toolchain- $ make or: $ make ARCH=ppc CROSS_COMPILE=$my-powerpc-toolchain- or just edit your top-level Makefile to match your setup. --- Makefile DELETED --- |
From: <aot...@us...> - 2004-05-16 21:06:09
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26458/arch/ppc/platforms Modified Files: gamecube.c Log Message: - Disable IRQs before halt/poweroff/reboot. - Kill off another instance of GAMECUBE_OUT() for writeb(). Index: gamecube.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- gamecube.c 25 Apr 2004 18:57:12 -0000 1.15 +++ gamecube.c 16 May 2004 21:05:57 -0000 1.16 @@ -49,14 +49,15 @@ static void gamecube_restart(char *cmd) { - printk("gamecube_restart()\n"); - GAMECUBE_OUT(GAMECUBE_RESET, 0); + local_irq_disable(); + writeb(0x00, GAMECUBE_RESET); } static void gamecube_power_off(void) { - for(;;); + local_irq_disable(); + for (;;); /* Wait until power button depressed */ } static void |
From: <aot...@us...> - 2004-05-11 17:48:45
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/drivers/video Modified Files: Kconfig fbmem.c Log Message: Merged 2.6.6 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Kconfig,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Kconfig 24 Apr 2004 18:31:44 -0000 1.5 +++ Kconfig 11 May 2004 17:48:35 -0000 1.6 @@ -55,7 +55,7 @@ config FB_PM2 tristate "Permedia2 support" - depends on FB && (AMIGA || PCI) + depends on FB && ((AMIGA && BROKEN) || PCI) help This is the frame buffer device driver for the Permedia2 AGP frame buffer card from ASK, aka `Graphic Blaster Exxtreme'. There is a Index: fbmem.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/fbmem.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fbmem.c 24 Apr 2004 18:31:44 -0000 1.6 +++ fbmem.c 11 May 2004 17:48:35 -0000 1.7 @@ -32,6 +32,9 @@ #include <linux/kmod.h> #endif #include <linux/devfs_fs_kernel.h> +#include <linux/err.h> +#include <linux/kernel.h> +#include <linux/device.h> #if defined(__mc68000__) || defined(CONFIG_APUS) #include <asm/setup.h> @@ -916,7 +919,7 @@ return -ENOMEM; } - if (copy_from_user(&cursor.image.data, sprite->image.data, size) || + if (copy_from_user(cursor.image.data, sprite->image.data, size) || copy_from_user(cursor.mask, sprite->mask, size)) { kfree(cursor.image.data); kfree(cursor.mask); @@ -1043,7 +1046,7 @@ case FBIOGETCMAP: if (copy_from_user(&cmap, (void *) arg, sizeof(cmap))) return -EFAULT; - return (fb_copy_cmap(&info->cmap, &cmap, 0)); + return (fb_copy_cmap(&info->cmap, &cmap, 2)); case FBIOPAN_DISPLAY: if (copy_from_user(&var, (void *) arg, sizeof(var))) return -EFAULT; @@ -1250,6 +1253,8 @@ #endif }; +static struct class_simple *fb_class; + /** * register_framebuffer - registers a frame buffer device * @fb_info: frame buffer info structure @@ -1264,6 +1269,7 @@ register_framebuffer(struct fb_info *fb_info) { int i; + struct class_device *c; if (num_registered_fb == FB_MAX) return -ENXIO; @@ -1272,6 +1278,12 @@ if (!registered_fb[i]) break; fb_info->node = i; + + c = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), NULL, "fb%d", i); + if (IS_ERR(c)) { + /* Not fatal */ + printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(c)); + } if (fb_info->pixmap.addr == NULL) { fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); @@ -1337,6 +1349,7 @@ kfree(fb_info->sprite.addr); registered_fb[i]=NULL; num_registered_fb--; + class_simple_device_remove(MKDEV(FB_MAJOR, i)); return 0; } @@ -1398,6 +1411,12 @@ if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) printk("unable to get major %d for fb devs\n", FB_MAJOR); + fb_class = class_simple_create(THIS_MODULE, "graphics"); + if (IS_ERR(fb_class)) { + printk(KERN_WARNING "Unable to create fb class; errno = %ld\n", PTR_ERR(fb_class)); + fb_class = NULL; + } + #ifdef CONFIG_FB_OF if (ofonly) { offb_init(); |
From: <aot...@us...> - 2004-05-11 17:48:45
|
Update of /cvsroot/gc-linux/linux/init In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/init Modified Files: main.c Log Message: Merged 2.6.6 Index: main.c =================================================================== RCS file: /cvsroot/gc-linux/linux/init/main.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- main.c 24 Apr 2004 18:31:45 -0000 1.6 +++ main.c 11 May 2004 17:48:36 -0000 1.7 @@ -89,16 +89,13 @@ extern void free_initmem(void); extern void populate_rootfs(void); extern void driver_init(void); +extern void prepare_namespace(void); #ifdef CONFIG_TC extern void tc_init(void); #endif -/* - * Are we up and running (ie do we have all the infrastructure - * set up) - */ -int system_running; +int system_state; /* SYSTEM_BOOTING/RUNNING/SHUTDOWN */ /* * Boot command-line arguments @@ -478,7 +475,6 @@ signals_init(); /* rootfs populating might need page-writeback */ page_writeback_init(); - populate_rootfs(); #ifdef CONFIG_PROC_FS proc_root_init(); #endif @@ -584,8 +580,6 @@ execve(init_filename, argv_init, envp_init); } -extern void prepare_namespace(void); - static int init(void * unused) { lock_kernel(); @@ -605,9 +599,23 @@ do_pre_smp_initcalls(); smp_init(); + + /* + * Do this before initcalls, because some drivers want to access + * firmware files. + */ + populate_rootfs(); + do_basic_setup(); - prepare_namespace(); + /* + * check if there is an early userspace init. If yes, let it do all + * the work + */ + if (sys_access("/init", 0) == 0) + execute_command = "/init"; + else + prepare_namespace(); /* * Ok, we have completed the initial bootup, and @@ -616,7 +624,7 @@ */ free_initmem(); unlock_kernel(); - system_running = 1; + system_state = SYSTEM_RUNNING; if (sys_open("/dev/console", O_RDWR, 0) < 0) printk("Warning: unable to open an initial console.\n"); |
From: <aot...@us...> - 2004-05-11 17:48:45
|
Update of /cvsroot/gc-linux/linux/drivers/net In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/drivers/net Modified Files: Kconfig Makefile Log Message: Merged 2.6.6 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Kconfig,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Kconfig 24 Apr 2004 18:31:44 -0000 1.5 +++ Kconfig 11 May 2004 17:48:35 -0000 1.6 @@ -21,10 +21,6 @@ If unsure, say Y. -if NETDEVICES - source "drivers/net/arcnet/Kconfig" -endif - config DUMMY tristate "Dummy net driver support" depends on NETDEVICES @@ -155,6 +151,10 @@ If you don't have this card, of course say N. +if NETDEVICES + source "drivers/net/arcnet/Kconfig" +endif + # # Ethernet # @@ -477,11 +477,32 @@ bool "SGI IOC3 Ethernet" depends on NET_ETHERNET && SGI_IP27 select CRC32 + select MII help If you have a network (Ethernet) card of this type, say Y and read the Ethernet-HOWTO, available from <http://www.tldp.org/docs.html#howto>. +config SGI_IOC3_ETH_HW_RX_CSUM + bool "Receive hardware checksums" + depends on SGI_IOC3_ETH && INET + default y + help + The SGI IOC3 network adapter supports TCP and UDP checksums in + hardware to offload processing of these checksums from the CPU. At + the moment only acceleration of IPv4 is supported. This option + enables offloading for checksums on receive. If unsure, say Y. + +config SGI_IOC3_ETH_HW_TX_CSUM + bool "Transmit hardware checksums" + depends on SGI_IOC3_ETH && INET + default y + help + The SGI IOC3 network adapter supports TCP and UDP checksums in + hardware to offload processing of these checksums from the CPU. At + the moment only acceleration of IPv4 is supported. This option + enables offloading for checksums on transmit. If unsure, say Y. + config SGI_O2MACE_ETH tristate "SGI O2 MACE Fast Ethernet support" depends on NET_ETHERNET && SGI_IP32=y @@ -1170,7 +1191,7 @@ config IBMLANA tristate "IBM LAN Adapter/A support" - depends on NET_ETHERNET && MCA + depends on NET_ETHERNET && MCA && MCA_LEGACY ---help--- This is a Micro Channel Ethernet adapter. You need to set CONFIG_MCA to use this driver. It is both available as an in-kernel @@ -1184,6 +1205,17 @@ boards with this driver should be possible, but has not been tested up to now due to lack of hardware. +config IBMVETH + tristate "IBM LAN Virtual Ethernet support" + depends on NETDEVICES && NET_ETHERNET && PPC_PSERIES + ---help--- + This driver supports virtual ethernet adapters on newer IBM iSeries + and pSeries systems. + + To compile this driver as a module, choose M here and read + <file:Documentation/networking/net-modules.txt>. The module will + be called ibmveth. + config NET_PCI bool "EISA, VLB, PCI and on board controllers" depends on NET_ETHERNET && (ISA || EISA || PCI) @@ -1225,6 +1257,9 @@ To compile this driver as a module, choose M here and read <file:Documentation/networking/net-modules.txt>. The module will be called amd8111e. +config AMD8111E_NAPI + bool "Enable NAPI support" + depends on AMD8111_ETH config ADAPTEC_STARFIRE tristate "Adaptec Starfire/DuraLAN support" @@ -1280,6 +1315,7 @@ config B44 tristate "Broadcom 4400 ethernet support (EXPERIMENTAL)" depends on NET_PCI && PCI && EXPERIMENTAL + select MII help If you have a network (Ethernet) controller of this type, say Y and read the Ethernet-HOWTO, available from @@ -1589,24 +1625,6 @@ experience problems, you can enable this option to restore the old RX-reset behavior. If unsure, say N. -config 8139_RXBUF_IDX - int "Receive ring size (0 => 8K, 1 => 16K, 2 => 32K, 3 => 64K)" - depends on 8139TOO - range 0 3 - default 1 if EMBEDDED || SH_DREAMCAST - default 2 - help - The 8139too driver has a fixed area of memory for receiving data. - The default value is adequate for most systems. The 64KB - ring size has hardware issues that may cause problems. - Values: - 0 => 8 KB - 1 => 16 KB embedded systems - 2 => 32 KB default for most systems - 3 => 64 KB - If unsure, use the default 2. - - config SIS900 tristate "SiS 900/7016 PCI Fast Ethernet Adapter support" depends on NET_PCI && PCI @@ -1787,7 +1805,7 @@ config DECLANCE tristate "DEC LANCE ethernet controller support" - depends on NET_ETHERNET && DECSTATION + depends on NET_ETHERNET && MACH_DECSTATION select CRC32 help This driver is for the series of Ethernet controllers produced by @@ -1968,16 +1986,6 @@ To compile this driver as a module, choose M here: the module will be called r8169. This is recommended. -config SIS190 - tristate "SiS190 gigabit ethernet support (EXPERIMENTAL)" - depends on PCI && EXPERIMENTAL - select CRC32 - ---help--- - Say Y here if you have a SiS 190 PCI Gigabit Ethernet adapter. - - To compile this driver as a module, choose M here: the module - will be called sis190. This is recommended. - config SK98LIN tristate "Marvell Yukon Chipset / SysKonnect SK-98xx Support" depends on PCI @@ -2107,10 +2115,33 @@ bool "Use Rx Polling (NAPI) (EXPERIMENTAL)" depends on IXGB && EXPERIMENTAL +config S2IO + tristate "S2IO 10Gbe XFrame NIC" + depends on PCI + ---help--- + This driver supports the 10Gbe XFrame NIC of S2IO. + For help regarding driver compilation, installation and + tuning please look into ~/drivers/net/s2io/README.txt. + +config S2IO_NAPI + bool "Use Rx Polling (NAPI) (EXPERIMENTAL)" + depends on S2IO && EXPERIMENTAL + endmenu +source "drivers/net/tokenring/Kconfig" -config VETH +source "drivers/net/wireless/Kconfig" + +source "drivers/net/pcmcia/Kconfig" + +source "drivers/net/wan/Kconfig" + +source "drivers/atm/Kconfig" + +source "drivers/s390/net/Kconfig" + +config ISERIES_VETH tristate "iSeries Virtual Ethernet driver support" depends on NETDEVICES && PPC_ISERIES @@ -2176,17 +2207,6 @@ under Linux, say Y here (you must also remember to enable the driver for your HIPPI card below). Most people will say N here. -config IBMVETH - tristate "IBM LAN Virtual Ethernet support" - depends on NETDEVICES && NET_ETHERNET && PPC_PSERIES - ---help--- - This driver supports virtual ethernet adapters on newer IBM iSeries - and pSeries systems. - - To compile this driver as a module, choose M here and read - <file:Documentation/networking/net-modules.txt>. The module will - be called ibmveth. - config ROADRUNNER tristate "Essential RoadRunner HIPPI PCI adapter support (EXPERIMENTAL)" depends on HIPPI && PCI @@ -2444,10 +2464,6 @@ end of the link as well. It's good enough, for example, to run IP over the async ports of a Camtec JNT Pad. If unsure, say N. -source "drivers/net/wireless/Kconfig" - -source "drivers/net/tokenring/Kconfig" - config NET_FC bool "Fibre Channel driver support" depends on NETDEVICES && SCSI && PCI @@ -2507,11 +2523,3 @@ ---help--- If you want to log kernel messages over the network, enable this. See Documentation/networking/netconsole.txt for details. - -source "drivers/net/wan/Kconfig" - -source "drivers/net/pcmcia/Kconfig" - -source "drivers/atm/Kconfig" - -source "drivers/s390/net/Kconfig" Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/net/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 24 Apr 2004 18:31:44 -0000 1.5 +++ Makefile 11 May 2004 17:48:35 -0000 1.6 @@ -41,10 +41,10 @@ obj-$(CONFIG_E100) += e100.o obj-$(CONFIG_TLAN) += tlan.o obj-$(CONFIG_EPIC100) += epic100.o -obj-$(CONFIG_SIS190) += sis190.o obj-$(CONFIG_SIS900) += sis900.o obj-$(CONFIG_YELLOWFIN) += yellowfin.o obj-$(CONFIG_ACENIC) += acenic.o +obj-$(CONFIG_ISERIES_VETH) += iseries_veth.o obj-$(CONFIG_NATSEMI) += natsemi.o obj-$(CONFIG_NS83820) += ns83820.o obj-$(CONFIG_STNIC) += stnic.o 8390.o @@ -175,6 +175,7 @@ obj-$(CONFIG_R8169) += r8169.o obj-$(CONFIG_AMD8111_ETH) += amd8111e.o obj-$(CONFIG_IBMVETH) += ibmveth.o +obj-$(CONFIG_S2IO) += s2io.o obj-$(CONFIG_GAMECUBE_NET) += gc-net.o obj-$(CONFIG_ARM) += arm/ |
From: <aot...@us...> - 2004-05-11 17:48:44
|
Update of /cvsroot/gc-linux/linux/arch/ppc/configs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/arch/ppc/configs Modified Files: gamecube_defconfig Log Message: Merged 2.6.6 Index: gamecube_defconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/configs/gamecube_defconfig,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- gamecube_defconfig 24 Apr 2004 18:31:43 -0000 1.16 +++ gamecube_defconfig 11 May 2004 17:48:35 -0000 1.17 @@ -21,12 +21,13 @@ # CONFIG_SWAP=y CONFIG_SYSVIPC=y +# CONFIG_POSIX_MQUEUE is not set # CONFIG_BSD_PROCESS_ACCT is not set CONFIG_SYSCTL=y +# CONFIG_AUDIT is not set CONFIG_LOG_BUF_SHIFT=14 # CONFIG_HOTPLUG is not set -CONFIG_IKCONFIG=y -CONFIG_IKCONFIG_PROC=y +# CONFIG_IKCONFIG is not set # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y CONFIG_FUTEX=y @@ -34,6 +35,7 @@ CONFIG_IOSCHED_NOOP=y CONFIG_IOSCHED_AS=y CONFIG_IOSCHED_DEADLINE=y +CONFIG_IOSCHED_CFQ=y # CONFIG_CC_OPTIMIZE_FOR_SIZE is not set # @@ -58,8 +60,6 @@ # CONFIG_ALTIVEC is not set # CONFIG_TAU is not set # CONFIG_CPU_FREQ is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set CONFIG_EMBEDDEDBOOT=y CONFIG_PPC_STD_MMU=y @@ -114,16 +114,16 @@ # # Advanced setup # -CONFIG_ADVANCED_OPTIONS=y +# CONFIG_ADVANCED_OPTIONS is not set + +# +# Default settings for advanced configuration options are used +# CONFIG_HIGHMEM_START=0xfe000000 -# CONFIG_LOWMEM_SIZE_BOOL is not set CONFIG_LOWMEM_SIZE=0x30000000 -# CONFIG_KERNEL_START_BOOL is not set CONFIG_KERNEL_START=0xc0000000 -# CONFIG_TASK_SIZE_BOOL is not set CONFIG_TASK_SIZE=0x80000000 -CONFIG_BOOT_LOAD_BOOL=y -CONFIG_BOOT_LOAD=0x400000 +CONFIG_BOOT_LOAD=0x00800000 # # Device Drivers @@ -152,6 +152,7 @@ # # CONFIG_BLK_DEV_FD is not set # CONFIG_GAMECUBE_ARAM is not set +# CONFIG_GAMECUBE_MEMCARD is not set # CONFIG_BLK_CPQ_DA is not set # CONFIG_BLK_CPQ_CISS_DA is not set # CONFIG_BLK_DEV_DAC960 is not set @@ -226,8 +227,6 @@ # CONFIG_INET_ESP is not set # CONFIG_INET_IPCOMP is not set # CONFIG_IPV6 is not set -# CONFIG_DECNET is not set -# CONFIG_BRIDGE is not set # CONFIG_NETFILTER is not set # @@ -235,7 +234,9 @@ # # CONFIG_IP_SCTP is not set # CONFIG_ATM is not set +# CONFIG_BRIDGE is not set # CONFIG_VLAN_8021Q is not set +# CONFIG_DECNET is not set # CONFIG_LLC2 is not set # CONFIG_IPX is not set # CONFIG_ATALK is not set @@ -256,16 +257,21 @@ # Network testing # # CONFIG_NET_PKTGEN is not set +# CONFIG_NETPOLL is not set +# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_HAMRADIO is not set +# CONFIG_IRDA is not set +# CONFIG_BT is not set CONFIG_NETDEVICES=y +# CONFIG_DUMMY is not set +# CONFIG_BONDING is not set +# CONFIG_EQUALIZER is not set +# CONFIG_TUN is not set # # ARCnet devices # # CONFIG_ARCNET is not set -# CONFIG_DUMMY is not set -# CONFIG_BONDING is not set -# CONFIG_EQUALIZER is not set -# CONFIG_TUN is not set # # Ethernet (10 or 100Mbit) @@ -295,7 +301,6 @@ # CONFIG_HAMACHI is not set # CONFIG_YELLOWFIN is not set # CONFIG_R8169 is not set -# CONFIG_SIS190 is not set # CONFIG_SK98LIN is not set # CONFIG_TIGON3 is not set @@ -303,45 +308,29 @@ # Ethernet (10000 Mbit) # # CONFIG_IXGB is not set -# CONFIG_FDDI is not set -# CONFIG_HIPPI is not set -# CONFIG_PPP is not set -# CONFIG_SLIP is not set - -# -# Wireless LAN (non-hamradio) -# -# CONFIG_NET_RADIO is not set +# CONFIG_S2IO is not set # # Token Ring devices # # CONFIG_TR is not set -# CONFIG_RCPCI is not set -# CONFIG_SHAPER is not set -# CONFIG_NETCONSOLE is not set - -# -# Wan interfaces -# -# CONFIG_WAN is not set - -# -# Amateur Radio support -# -# CONFIG_HAMRADIO is not set # -# IrDA (infrared) support +# Wireless LAN (non-hamradio) # -# CONFIG_IRDA is not set +# CONFIG_NET_RADIO is not set # -# Bluetooth support +# Wan interfaces # -# CONFIG_BT is not set -# CONFIG_NETPOLL is not set -# CONFIG_NET_POLL_CONTROLLER is not set +# CONFIG_WAN is not set +# CONFIG_FDDI is not set +# CONFIG_HIPPI is not set +# CONFIG_PPP is not set +# CONFIG_SLIP is not set +# CONFIG_RCPCI is not set +# CONFIG_SHAPER is not set +# CONFIG_NETCONSOLE is not set # # ISDN subsystem @@ -625,6 +614,7 @@ # CONFIG_PROC_FS=y CONFIG_PROC_KCORE=y +CONFIG_SYSFS=y # CONFIG_DEVFS_FS is not set # CONFIG_DEVPTS_FS_XATTR is not set CONFIG_TMPFS=y @@ -714,6 +704,7 @@ # Library routines # # CONFIG_CRC32 is not set +# CONFIG_LIBCRC32C is not set # # Kernel hacking |
From: <aot...@us...> - 2004-05-11 17:48:44
|
Update of /cvsroot/gc-linux/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801 Modified Files: Makefile Log Message: Merged 2.6.6 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/Makefile,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- Makefile 24 Apr 2004 18:31:42 -0000 1.5 +++ Makefile 11 May 2004 17:48:34 -0000 1.6 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 5 +SUBLEVEL = 6 EXTRAVERSION = NAME=Zonked Quokka @@ -55,6 +55,19 @@ KBUILD_CHECKSRC = 0 endif +# Use make M=dir to specify direcotry of external module to build +# Old syntax make ... SUBDIRS=$PWD is still supported +# Setting the environment variable KBUILD_EXTMOD take precedence +ifdef SUBDIRS + KBUILD_EXTMOD ?= $(SUBDIRS) +endif +ifdef M + ifeq ("$(origin M)", "command line") + KBUILD_EXTMOD := $(M) + endif +endif + + # kbuild supports saving output files in a separate directory. # To locate output files in a separate directory two syntax'es are supported. # In both cases the working directory must be the root of the kernel src. @@ -83,9 +96,9 @@ endif # That's our default target when none is given on the command line -.PHONY: all -all: - +.PHONY: _all +_all: + ifneq ($(KBUILD_OUTPUT),) # Invoke a second make in the output directory, passing relevant variables # check that the output directory actually exists @@ -96,10 +109,11 @@ .PHONY: $(MAKECMDGOALS) -$(filter-out all,$(MAKECMDGOALS)) all: +$(filter-out _all,$(MAKECMDGOALS)) _all: $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ - KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ - KBUILD_CHECK=$(KBUILD_CHECK) -f $(CURDIR)/Makefile $@ + KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ + KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD=$(KBUILD_EXTMOD) \ + -f $(CURDIR)/Makefile $@ # Leave processing to above invocation of make skip-makefile := 1 @@ -109,6 +123,15 @@ # We process the rest of the Makefile if this is the final invocation of make ifeq ($(skip-makefile),) +# If building an external module we do not care about the all: rule +# but instead _all depend on modules +.PHONY: all +ifeq ($(KBUILD_EXTMOD),) +_all: all +else +_all: modules +endif + # Make sure we're not wasting cpu-cycles doing locale handling, yet do make # sure error messages appear in the user-desired language ifdef LC_ALL @@ -196,7 +219,7 @@ # in addition to whatever we do anyway. # Just "make" or "make all" shall build modules as well -ifneq ($(filter all modules,$(MAKECMDGOALS)),) +ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) KBUILD_MODULES := 1 endif @@ -205,7 +228,7 @@ endif export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE -export KBUILD_CHECKSRC KBUILD_SRC +export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD # Beautify output # --------------------------------------------------------------------------- @@ -301,7 +324,10 @@ export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE -export MODVERDIR := .tmp_versions +# When compiling out-of-tree modules, put MODVERDIR in the module +# tree rather than in the kernel tree. The kernel tree might +# even be read-only. +export MODVERDIR := $(if $(KBUILD_EXTMOD),$(KBUILD_EXTMOD)/).tmp_versions # The temporary file to save gcc -MD generated dependencies must not # contain a comma @@ -342,11 +368,13 @@ endif endif -ifneq ($(filter config %config,$(MAKECMDGOALS)),) - config-targets := 1 - ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) - mixed-targets := 1 - endif +ifeq ($(KBUILD_EXTMOD),) + ifneq ($(filter config %config,$(MAKECMDGOALS)),) + config-targets := 1 + ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) + mixed-targets := 1 + endif + endif endif ifeq ($(mixed-targets),1) @@ -373,6 +401,7 @@ # Build targets only - this includes vmlinux, arch specific targets, clean # targets and others. In general all targets except *config targets. +ifeq ($(KBUILD_EXTMOD),) # Additional helpers built in scripts/ # Carefully list dependencies so we do not try to build scripts twice # in parrallel @@ -395,7 +424,7 @@ net-y := net/ libs-y := lib/ core-y := usr/ -SUBDIRS := +endif # KBUILD_EXTMOD ifeq ($(dot-config),1) # In this section, we need .config @@ -422,33 +451,6 @@ include $(srctree)/arch/$(ARCH)/Makefile -# Let architecture Makefiles change CPPFLAGS if needed -CFLAGS := $(CPPFLAGS) $(CFLAGS) -AFLAGS := $(CPPFLAGS) $(AFLAGS) - -core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ - -SUBDIRS += $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ - $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) - -ALL_SUBDIRS := $(sort $(SUBDIRS) $(patsubst %/,%,$(filter %/, \ - $(init-n) $(init-) \ - $(core-n) $(core-) $(drivers-n) $(drivers-) \ - $(net-n) $(net-) $(libs-n) $(libs-)))) - -init-y := $(patsubst %/, %/built-in.o, $(init-y)) -core-y := $(patsubst %/, %/built-in.o, $(core-y)) -drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) -net-y := $(patsubst %/, %/built-in.o, $(net-y)) -libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) -libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) -libs-y := $(libs-y1) $(libs-y2) - -# Here goes the main Makefile -# --------------------------------------------------------------------------- - - ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE CFLAGS += -Os else @@ -482,6 +484,27 @@ MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) export MODLIB + +ifeq ($(KBUILD_EXTMOD),) +core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ + +vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ + $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ + $(net-y) $(net-m) $(libs-y) $(libs-m))) + +vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ + $(init-n) $(init-) \ + $(core-n) $(core-) $(drivers-n) $(drivers-) \ + $(net-n) $(net-) $(libs-n) $(libs-)))) + +init-y := $(patsubst %/, %/built-in.o, $(init-y)) +core-y := $(patsubst %/, %/built-in.o, $(core-y)) +drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) +net-y := $(patsubst %/, %/built-in.o, $(net-y)) +libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) +libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) +libs-y := $(libs-y1) $(libs-y2) + # Build vmlinux # --------------------------------------------------------------------------- @@ -570,12 +593,12 @@ # The actual objects are generated when descending, # make sure no implicit rule kicks in -$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(SUBDIRS) ; +$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ; -# Handle descending into subdirectories listed in $(SUBDIRS) +# Handle descending into subdirectories listed in $(vmlinux-dirs) -.PHONY: $(SUBDIRS) -$(SUBDIRS): prepare-all scripts +.PHONY: $(vmlinux-dirs) +$(vmlinux-dirs): prepare-all scripts $(Q)$(MAKE) $(build)=$@ # Things we need to do before we recursively start building the kernel @@ -603,15 +626,10 @@ endif prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER -ifdef KBUILD_MODULES -ifeq ($(origin SUBDIRS),file) +ifneq ($(KBUILD_MODULES),) $(Q)rm -rf $(MODVERDIR) -else - @echo '*** Warning: Overriding SUBDIRS on the command line can cause' - @echo '*** inconsistencies' -endif + $(Q)mkdir -p $(MODVERDIR) endif - $(if $(CONFIG_MODULES),$(Q)mkdir -p $(MODVERDIR)) # All the preparing.. prepare-all: prepare0 prepare @@ -695,12 +713,16 @@ # Build modules .PHONY: modules -modules: $(SUBDIRS) $(if $(KBUILD_BUILTIN),vmlinux) +modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) @echo ' Building modules, stage 2.'; $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost -# Install modules +# Target to prepare building external modules +.PHONY: modules_prepare +modules_prepare: prepare-all scripts + +# Target to install modules .PHONY: modules_install modules_install: _modinst_ _modinst_post @@ -768,39 +790,32 @@ ### # Cleaning is done on three levels. -# make clean Delete all automatically generated files, including -# tools and firmware. -# make mrproper Delete the current configuration, and related files -# Any core files spread around are deleted as well +# make clean Delete most generated files +# Leave enough to build external modules +# make mrproper Delete the current configuration, and all generated files # make distclean Remove editor backup files, patch leftover files and the like # Directories & files removed with 'make clean' -CLEAN_DIRS += $(MODVERDIR) include/config include2 -CLEAN_FILES += vmlinux System.map \ - include/linux/autoconf.h include/linux/version.h \ - include/asm include/linux/modversions.h \ - kernel.spec .tmp* +CLEAN_DIRS += $(MODVERDIR) +CLEAN_FILES += vmlinux System.map kernel.spec \ + .tmp_kallsyms* .tmp_version .tmp_vmlinux* -# Files removed with 'make mrproper' -MRPROPER_FILES += .version .config .config.old tags TAGS cscope* +# Directories & files removed with 'make mrproper' +MRPROPER_DIRS += include/config include2 +MRPROPER_FILES += .config .config.old include/asm .version \ + include/linux/autoconf.h include/linux/version.h \ + Module.symvers tags TAGS cscope* -# clean - Delete all intermediate files +# clean - Delete most, but leave enough to build external modules # -clean-dirs += $(addprefix _clean_,$(ALL_SUBDIRS) Documentation/DocBook scripts) -.PHONY: $(clean-dirs) clean archclean mrproper archmrproper distclean +clean: rm-dirs := $(CLEAN_DIRS) +clean: rm-files := $(CLEAN_FILES) +clean-dirs := $(addprefix _clean_,$(vmlinux-alldirs)) + +.PHONY: $(clean-dirs) clean archclean $(clean-dirs): $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) -clean: rm-dirs := $(wildcard $(CLEAN_DIRS)) -mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) -quiet_cmd_rmdirs = $(if $(rm-dirs),CLEAN $(rm-dirs)) - cmd_rmdirs = rm -rf $(rm-dirs) - -clean: rm-files := $(wildcard $(CLEAN_FILES)) -mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) -quiet_cmd_rmfiles = $(if $(rm-files),CLEAN $(rm-files)) - cmd_rmfiles = rm -rf $(rm-files) - clean: archclean $(clean-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) @@ -809,12 +824,25 @@ -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ -type f -print | xargs rm -f -# mrproper +# mrproper - Delete all generated files, including .config # -distclean: mrproper -mrproper: clean archmrproper +mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) +mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) +mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) + +.PHONY: $(mrproper-dirs) mrproper archmrproper +$(mrproper-dirs): + $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) + +mrproper: clean archmrproper $(mrproper-dirs) $(call cmd,rmdirs) $(call cmd,rmfiles) + +# distclean +# +.PHONY: distclean + +distclean: mrproper @find . $(RCS_FIND_IGNORE) \ \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ @@ -822,52 +850,6 @@ -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ -type f -print | xargs rm -f -# Generate tags for editors -# --------------------------------------------------------------------------- - -define all-sources - ( find . $(RCS_FIND_IGNORE) \ - \( -name include -o -name arch \) -prune -o \ - -name '*.[chS]' -print; \ - find arch/$(ARCH) $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print; \ - find include $(RCS_FIND_IGNORE) \ - \( -name config -o -name 'asm-*' \) -prune \ - -o -name '*.[chS]' -print; \ - find include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print; \ - find include/asm-generic $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print ) -endef - -quiet_cmd_cscope-file = FILELST cscope.files - cmd_cscope-file = $(all-sources) > cscope.files - -quiet_cmd_cscope = MAKE cscope.out - cmd_cscope = cscope -k -b -q - -cscope: FORCE - $(call cmd,cscope-file) - $(call cmd,cscope) - -quiet_cmd_TAGS = MAKE $@ -cmd_TAGS = $(all-sources) | etags - - -# Exuberant ctags works better with -I - -quiet_cmd_tags = MAKE $@ -define cmd_tags - rm -f $@; \ - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ - $(all-sources) | xargs ctags $$CTAGSF -a -endef - -TAGS: FORCE - $(call cmd,TAGS) - -tags: FORCE - $(call cmd,tags) - # RPM target # --------------------------------------------------------------------------- @@ -947,9 +929,118 @@ # Documentation targets # --------------------------------------------------------------------------- -%docs: scripts FORCE +%docs: scripts_basic FORCE $(Q)$(MAKE) $(build)=Documentation/DocBook $@ +else # KBUILD_EXTMOD + +### +# External module support. +# When building external modules the kernel used as basis is considered +# read-only, and no consistency checks are made and the make +# system is not used on the basis kernel. If updates are required +# in the basis kernel ordinary make commands (without M=...) must +# be used. +# +# The following are the only valid targets when building external +# modules. +# make M=dir clean Delete all automatically generated files +# make M=dir modules Make all modules in specified dir +# make M=dir Same as 'make M=dir modules' +# make M=dir modules_install +# Install the modules build in the module directory +# Assumes install directory is already created + +# We are always building modules +KBUILD_MODULES := 1 +.PHONY: crmodverdir +crmodverdir: FORCE + $(Q)mkdir -p $(MODVERDIR) + +.PHONY: $(KBUILD_EXTMOD) +$(KBUILD_EXTMOD): crmodverdir FORCE + $(Q)$(MAKE) $(build)=$@ + +.PHONY: modules +modules: $(KBUILD_EXTMOD) + @echo ' Building modules, stage 2.'; + $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost + +.PHONY: modules_install +modules_install: + $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst + +clean-dirs := _clean_$(KBUILD_EXTMOD) + +.PHONY: $(clean-dirs) clean +$(clean-dirs): + $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) + +clean: rm-dirs := $(MODVERDIR) +clean: $(clean-dirs) + $(call cmd,rmdirs) + @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ + \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ + -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ + -type f -print | xargs rm -f + +help: + @echo ' Building external modules.' + @echo ' Syntax: make -C path/to/kernel/src M=$$PWD target' + @echo '' + @echo ' modules - default target, build the module(s)' + @echo ' modules_install - install the module' + @echo ' clean - remove generated files in module directory only' + @echo '' +endif # KBUILD_EXTMOD + +# Generate tags for editors +# --------------------------------------------------------------------------- + +define all-sources + ( find . $(RCS_FIND_IGNORE) \ + \( -name include -o -name arch \) -prune -o \ + -name '*.[chS]' -print; \ + find arch/$(ARCH) $(RCS_FIND_IGNORE) \ + -name '*.[chS]' -print; \ + find include $(RCS_FIND_IGNORE) \ + \( -name config -o -name 'asm-*' \) -prune \ + -o -name '*.[chS]' -print; \ + find include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ + -name '*.[chS]' -print; \ + find include/asm-generic $(RCS_FIND_IGNORE) \ + -name '*.[chS]' -print ) +endef + +quiet_cmd_cscope-file = FILELST cscope.files + cmd_cscope-file = $(all-sources) > cscope.files + +quiet_cmd_cscope = MAKE cscope.out + cmd_cscope = cscope -k -b -q + +cscope: FORCE + $(call cmd,cscope-file) + $(call cmd,cscope) + +quiet_cmd_TAGS = MAKE $@ +cmd_TAGS = $(all-sources) | etags - + +# Exuberant ctags works better with -I + +quiet_cmd_tags = MAKE $@ +define cmd_tags + rm -f $@; \ + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ + $(all-sources) | xargs ctags $$CTAGSF -a +endef + +TAGS: FORCE + $(call cmd,TAGS) + +tags: FORCE + $(call cmd,tags) + + # Scripts to check various things for consistency # --------------------------------------------------------------------------- @@ -974,6 +1065,13 @@ # FIXME Should go into a make.lib or something # =========================================================================== +quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) + cmd_rmdirs = rm -rf $(rm-dirs) + +quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) + cmd_rmfiles = rm -f $(rm-files) + + a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ $(NOSTDINC_FLAGS) $(CPPFLAGS) \ $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) |
From: <aot...@us...> - 2004-05-11 17:48:44
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/arch/ppc/platforms Modified Files: Makefile Log Message: Merged 2.6.6 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/Makefile,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Makefile 24 Apr 2004 18:31:43 -0000 1.8 +++ Makefile 11 May 2004 17:48:35 -0000 1.9 @@ -33,17 +33,17 @@ obj-$(CONFIG_TQM8260) += tqm8260_setup.o obj-$(CONFIG_EV64260) += ev64260_setup.o obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o -obj-$(CONFIG_K2) += k2_setup.o k2_pci.o +obj-$(CONFIG_K2) += k2.o obj-$(CONFIG_LOPEC) += lopec_setup.o lopec_pci.o -obj-$(CONFIG_MCPN765) += mcpn765_setup.o mcpn765_pci.o +obj-$(CONFIG_MCPN765) += mcpn765.o obj-$(CONFIG_MENF1) += menf1_setup.o menf1_pci.o obj-$(CONFIG_MVME5100) += mvme5100_setup.o mvme5100_pci.o obj-$(CONFIG_PAL4) += pal4_setup.o pal4_pci.o -obj-$(CONFIG_PCORE) += pcore_setup.o pcore_pci.o +obj-$(CONFIG_PCORE) += pcore.o obj-$(CONFIG_POWERPMC250) += powerpmc250.o obj-$(CONFIG_PPLUS) += pplus.o -obj-$(CONFIG_PRPMC750) += prpmc750_setup.o prpmc750_pci.o -obj-$(CONFIG_PRPMC800) += prpmc800_setup.o prpmc800_pci.o +obj-$(CONFIG_PRPMC750) += prpmc750.o +obj-$(CONFIG_PRPMC800) += prpmc800.o obj-$(CONFIG_SANDPOINT) += sandpoint.o obj-$(CONFIG_SPRUCE) += spruce.o obj-$(CONFIG_GAMECUBE) += gamecube.o gamecube_pic.o gamecube_time.o |
From: <aot...@us...> - 2004-05-11 17:48:44
|
Update of /cvsroot/gc-linux/linux/arch/ppc/boot/simple In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/arch/ppc/boot/simple Modified Files: misc-embedded.c Log Message: Merged 2.6.6 Index: misc-embedded.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/boot/simple/misc-embedded.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- misc-embedded.c 25 Apr 2004 18:57:11 -0000 1.2 +++ misc-embedded.c 11 May 2004 17:48:35 -0000 1.3 @@ -8,7 +8,6 @@ #include <linux/config.h> #include <linux/types.h> -#include <linux/elf.h> #include <linux/string.h> #include <asm/bootinfo.h> #include <asm/mmu.h> |
From: <aot...@us...> - 2004-05-11 17:48:44
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/drivers/block Modified Files: Makefile Log Message: Merged 2.6.6 Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Makefile,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- Makefile 8 May 2004 09:51:54 -0000 1.4 +++ Makefile 11 May 2004 17:48:35 -0000 1.5 @@ -18,6 +18,7 @@ obj-$(CONFIG_IOSCHED_NOOP) += noop-iosched.o obj-$(CONFIG_IOSCHED_AS) += as-iosched.o obj-$(CONFIG_IOSCHED_DEADLINE) += deadline-iosched.o +obj-$(CONFIG_IOSCHED_CFQ) += cfq-iosched.o obj-$(CONFIG_MAC_FLOPPY) += swim3.o obj-$(CONFIG_BLK_DEV_FD) += floppy.o obj-$(CONFIG_BLK_DEV_FD98) += floppy98.o |
From: <aot...@us...> - 2004-05-11 17:48:43
|
Update of /cvsroot/gc-linux/linux/arch/ppc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26801/arch/ppc Modified Files: Kconfig Log Message: Merged 2.6.6 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/Kconfig,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Kconfig 27 Apr 2004 20:18:11 -0000 1.13 +++ Kconfig 11 May 2004 17:48:34 -0000 1.14 @@ -635,7 +635,7 @@ config PPC_GEN550 bool - depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS + depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || PRPMC750 || K2 || PRPMC800 default y config FORCE @@ -648,19 +648,37 @@ depends on EV64260 default y +config NONMONARCH_SUPPORT + bool "Enable Non-Monarch Support" + depends on PRPMC800 + +config HARRIER + bool + depends on PRPMC800 + default y + config EPIC_SERIAL_MODE bool depends on 6xx && (LOPEC || SANDPOINT) default y +config MPC10X_BRIDGE + bool + depends on PCORE || POWERPMC250 || LOPEC || SANDPOINT + default y + config MPC10X_STORE_GATHERING bool "Enable MPC10x store gathering" - depends on FORCE || SANDPOINT + depends on MPC10X_BRIDGE config CPC710_DATA_GATHERING bool "Enable CPC710 data gathering" depends on K2 +config HARRIER_STORE_GATHERING + bool "Enable Harrier store gathering" + depends on HARRIER + config MVME5100_IPMC761_PRESENT bool "MVME5100 configured with an IPMC761" depends on MVME5100 |
From: <sve...@us...> - 2004-05-08 09:52:04
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24281 Modified Files: Makefile Kconfig Log Message: Memorycard block device added Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 24 Apr 2004 18:31:44 -0000 1.3 +++ Makefile 8 May 2004 09:51:54 -0000 1.4 @@ -28,6 +28,7 @@ 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_BLK_DEV_RAM) += rd.o obj-$(CONFIG_BLK_DEV_LOOP) += loop.o obj-$(CONFIG_BLK_DEV_PS2) += ps2esdi.o Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/block/Kconfig,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Kconfig 24 Apr 2004 18:31:44 -0000 1.3 +++ Kconfig 8 May 2004 09:51:54 -0000 1.4 @@ -72,6 +72,13 @@ To compile this driver as a module, choose M here: the module will be called gc_aram. +config GAMECUBE_MEMCARD + bool "GameCube memory card support" + depends on GAMECUBE + help + This enables support for using the GameCube's memory cards. + Say Y if you want to include this driver in the kernel. + config ATARI_ACSI tristate "Atari ACSI support" depends on ATARI && BROKEN |
From: <sve...@us...> - 2004-05-08 09:51:25
|
Update of /cvsroot/gc-linux/linux/drivers/block In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24178 Added Files: gc_memcard.c Log Message: Created --- NEW FILE: gc_memcard.c --- #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 <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 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 extern void exi_select(int channel, int device, int freq); extern void exi_deselect(int channel); extern void exi_imm(int channel, void *data, int len, int mode, int zero); extern void exi_sync(int channel); 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_imm(channel, (unsigned char *) &tID, 2, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); /* Read the actual ID data (4 bytes) */ exi_imm(channel, (unsigned char *) &tID, 4, EXI_CONTROL_TYPE_READ, 0); exi_sync(channel); /* 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_imm(channel, cbuf, 2, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); /* Read the actual ID data (2 bytes) */ exi_imm(channel, cbuf, 1, EXI_CONTROL_TYPE_READ, 0); exi_sync(channel); /* 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_imm(channel, cbuf, 4, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); cbuf[0] = address & 0x7F; exi_imm(channel, cbuf, 1, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); cbuf[0] = 0; cbuf[1] = 0; cbuf[2] = 0; cbuf[3] = 0; exi_imm(channel, cbuf, 4, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); 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_imm(channel, cbuf, 3, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); /* 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_imm(channel, cbuf, 4, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); cbuf[0] = address & 0x7F; exi_imm(channel, cbuf, 1, EXI_CONTROL_TYPE_WRITE, 0); exi_sync(channel); 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); |
From: <aot...@us...> - 2004-05-01 23:15:02
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21481/arch/ppc/platforms Modified Files: gamecube.h gamecube_pic.c Log Message: - Properly acknowledge interrupt requests in ->ack(): # cat /proc/interrupts Before: CPU0 1: 29 GC-PIC Edge GameCube Reset Switch 2: 33 GC-PIC Edge GameCube DVD Cover 4: 83412 GC-PIC Edge eth0 6: 0 GC-PIC Edge GameCube audio BAD: 83400 After: CPU0 1: 131 GEKKO-PIC Edge GameCube Reset Switch 2: 74 GEKKO-PIC Edge GameCube DVD Cover 4: 241964 GEKKO-PIC Edge eth0 6: 0 GEKKO-PIC Edge GameCube audio BAD: 0 - Remove test for irq < GAMECUBE_IRQS in ->enable(), ->disable() & ->ack(). - Eliminate GAMECUBE_{IN,OUT}() usage in favour of {set,clear}_bit() and {read,write}{b,w,l}(). - Rename gamecube_pic to gekko_pic. - Rename gamecube_*_irq() callbacks to gekko_*_irq(). - Remove debug printk's. Index: gamecube.h =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- gamecube.h 25 Apr 2004 18:57:28 -0000 1.5 +++ gamecube.h 1 May 2004 23:14:38 -0000 1.6 @@ -1,20 +1,12 @@ /* * arch/ppc/platforms/gamecube.h * - * We steal here - * Macros, definitions, and data structures specific to the IBM PowerPC - * STB03xxx "Redwood" evaluation board. - * - * Author: Armin Kuster <ak...@mv...> - * - * Albert Herranz - * GAMECUBE - * - Added some defines for DI interrupt handling. + * Nintendo GameCube board-specific definitions. * - * 2001 (c) MontaVista, Software, Inc. This file is licensed under - * the terms of the GNU General Public License version 2. This program - * is licensed "as is" without any warranty of any kind, whether express - * or implied. + * 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 @@ -22,12 +14,23 @@ #include <asm/ppcboot.h> +/* + * We have a total of 14 IRQs. Each has a corresponding bit in both + * the Interrupt Cause (PIIC) and Interrupt Mask (PIIM) registers. + */ +#define GAMECUBE_IRQS 14 +#define GAMECUBE_PIIC ((volatile ulong *)0xCC003000) +#define GAMECUBE_PIIM ((volatile ulong *)0xCC003004) -#define GAMECUBE_PIIC 0xcc003000 /* PI interrupt cause */ -#define GAMECUBE_PIIM 0xcc003004 /* PI interrupt mask */ -#define GAMECUBE_RESET 0xcc003024 /* RESET */ -#define GAMECUBE_DICVR 0xcc006004 /* DI Cover Register */ +/* + * Anything written here automagically puts us through reset. + */ +#define GAMECUBE_RESET 0xCC003024 +/* + * Until a driver for gcdvd exists, these may seek refuge here. + */ +#define GAMECUBE_DICVR 0xcc006004 /* DI Cover Register */ #define GC_DI_DISR 0xcc006000 /* DI Status Register */ #define GC_DI_DISR_BRKINT (1<<6) #define GC_DI_DISR_BRKINTMASK (1<<5) @@ -40,6 +43,4 @@ #define GAMECUBE_IN(a) (*(volatile unsigned long *)a) #define GAMECUBE_OUT(a,d) (*(volatile unsigned long *)a = d) -#define GAMECUBE_IRQS 14 - #endif /* !__MACH_GAMECUBE_H */ Index: gamecube_pic.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube_pic.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- gamecube_pic.c 1 May 2004 15:22:49 -0000 1.3 +++ gamecube_pic.c 1 May 2004 23:14:38 -0000 1.4 @@ -2,69 +2,48 @@ * arch/ppc/platforms/gamecube_pic.c */ -#undef DEBUG - - #include <linux/irq.h> #include <linux/init.h> -#include <linux/kernel.h> #include <asm/io.h> +#include <asm/bitops.h> #include "gamecube.h" -static void gamecube_mask_and_ack_irq(unsigned int irq) +static void gekko_mask_and_ack_irq(unsigned int irq) { - pr_debug("mask_and_ack(): %x, %x\n", GAMECUBE_IN(GAMECUBE_PIIM), - GAMECUBE_IN(GAMECUBE_PIIC)); - if (irq < GAMECUBE_IRQS) { - GAMECUBE_OUT(GAMECUBE_PIIM, GAMECUBE_IN(GAMECUBE_PIIM) & - ~(1 << irq)); /* mask */ - GAMECUBE_OUT(GAMECUBE_PIIC, 1 << irq); /* ack */ - } - pr_debug("after mask_and_ack(): %x, %x\n", GAMECUBE_IN(GAMECUBE_PIIM), - GAMECUBE_IN(GAMECUBE_PIIC)); + clear_bit(irq, GAMECUBE_PIIM); + set_bit(irq, GAMECUBE_PIIC); } -static void gamecube_mask_irq(unsigned int irq) +static void gekko_mask_irq(unsigned int irq) { - pr_debug("mask(): %x, %x\n", GAMECUBE_IN(GAMECUBE_PIIM), - GAMECUBE_IN(GAMECUBE_PIIC)); - if (irq < GAMECUBE_IRQS) - GAMECUBE_OUT(GAMECUBE_PIIM, GAMECUBE_IN(GAMECUBE_PIIM) & - ~(1 << irq)); /* mask */ + clear_bit(irq, GAMECUBE_PIIM); } -static void -gamecube_unmask_irq(unsigned int irq) +static void gekko_unmask_irq(unsigned int irq) { - pr_debug(" before unmask(): %x, %x\n", GAMECUBE_IN(GAMECUBE_PIIM), - GAMECUBE_IN(GAMECUBE_PIIC)); - if (irq < GAMECUBE_IRQS) - GAMECUBE_OUT(GAMECUBE_PIIM, GAMECUBE_IN(GAMECUBE_PIIM) | - (1 << irq)); - pr_debug("after unmask(): %x, %x\n", GAMECUBE_IN(GAMECUBE_PIIM), - GAMECUBE_IN(GAMECUBE_PIIC)); + set_bit(irq, GAMECUBE_PIIM); } - -static struct hw_interrupt_type gamecube_pic = { - .typename = " GC-PIC ", - .enable = gamecube_unmask_irq, - .disable = gamecube_mask_irq, - .ack = gamecube_mask_and_ack_irq, +static struct hw_interrupt_type gekko_pic = { + .typename = " GEKKO-PIC ", + .enable = gekko_unmask_irq, + .disable = gekko_mask_irq, + .ack = gekko_mask_and_ack_irq, }; void __init gamecube_init_IRQ(void) { int i; - GAMECUBE_OUT(GAMECUBE_PIIM, 0); /* disable all irqs */ - GAMECUBE_OUT(GAMECUBE_PIIC, 0xffffffff); /* ack all irqs */ + /* mask and ack all IRQs */ + writel(0x00000000, GAMECUBE_PIIM); + writel(0xffffffff, GAMECUBE_PIIC); for (i = 0; i < GAMECUBE_IRQS; i++) - irq_desc[i].handler = &gamecube_pic; + irq_desc[i].handler = &gekko_pic; } /* |
From: <sve...@us...> - 2004-05-01 19:10:45
|
Update of /cvsroot/gc-linux/linux/arch/ppc/platforms In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8629 Modified Files: gamecube_time.c Log Message: exi_sync was missing in set_rtc Index: gamecube_time.c =================================================================== RCS file: /cvsroot/gc-linux/linux/arch/ppc/platforms/gamecube_time.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- gamecube_time.c 17 Apr 2004 08:53:36 -0000 1.1 +++ gamecube_time.c 1 May 2004 19:10:37 -0000 1.2 @@ -1,11 +1,3 @@ -/*#include <linux/config.h> -#include <linux/errno.h> -#include <linux/sched.h> -#include <linux/kernel.h> -#include <linux/param.h> -#include <linux/string.h> -*/ -//#include <linux/mm.h> #include <linux/init.h> #include <linux/time.h> @@ -15,88 +7,88 @@ static int bias = 0; -long __init -gamecube_time_init(void) +long __init gamecube_time_init(void) { - char sram[64]; - int *pbias = &sram[0xC]; - read_sram(sram); - bias = *pbias; - printk("gamecube_time_init\n"); - return 0; + char sram[64]; + int *pbias = &sram[0xC]; + read_sram(sram); + bias = *pbias; + return 0; } unsigned long gamecube_get_rtc_time(void) { - return get_rtc() + bias + RTC_OFFSET; + return get_rtc() + bias + RTC_OFFSET; } int gamecube_set_rtc_time(unsigned long nowtime) { - set_rtc(nowtime - RTC_OFFSET - bias); + set_rtc(nowtime - RTC_OFFSET - bias); - return 1; + return 1; } -static unsigned long get_rtc (void) +static unsigned long get_rtc(void) { - unsigned long a = 0L; + unsigned long a = 0L; - // Select the RTC device. - exi_select (0, 1, 3); + // Select the RTC device. + exi_select(0, 1, 3); - // Send the appropriate command. - a = 0x20000000; - exi_imm (0, &a, 4, 1, 0); - exi_sync(0); - // Read the time and date value! - exi_imm (0, &a, 4, 0, 0); - exi_sync(0); + // Send the appropriate command. + a = 0x20000000; + exi_imm(0, &a, 4, 1, 0); + exi_sync(0); + // Read the time and date value! + exi_imm(0, &a, 4, 0, 0); + exi_sync(0); - // Deselect the RTC device. - exi_deselect (0); + // Deselect the RTC device. + exi_deselect(0); - return a; + return a; } -static void set_rtc (unsigned long aval) +static void set_rtc(unsigned long aval) { - unsigned long a; + unsigned long a; - // Select the RTC device. - exi_select (0, 1, 3); + // Select the RTC device. + exi_select(0, 1, 3); - // Send the appropriate command. - a = 0xA0000000; - exi_imm (0, &a, 4, 1, 0); + // Send the appropriate command. + a = 0xA0000000; + exi_imm(0, &a, 4, 1, 0); + exi_sync(0); - // Set the new time and date value! - exi_imm (0, &aval, 4, 1, 0); + // Set the new time and date value! + exi_imm(0, &aval, 4, 1, 0); + exi_sync(0); - // Deselect the RTC device. - exi_deselect (0); + // Deselect the RTC device. + exi_deselect(0); } -static void read_sram (unsigned char *abuf) +static void read_sram(unsigned char *abuf) { - unsigned long a; + unsigned long a; - // Select the SRAM device. - exi_select (0, 1, 3); + // Select the SRAM device. + exi_select(0, 1, 3); - // Send the appropriate command. - a = 0x20000100; - exi_imm (0, &a, 4, 1, 0); - exi_sync(0); + // Send the appropriate command. + a = 0x20000100; + exi_imm(0, &a, 4, 1, 0); + exi_sync(0); - // Read the SRAM data! - exi_imm_ex (0, abuf, 64, 0); + // Read the SRAM data! + exi_imm_ex(0, abuf, 64, 0); - // Deselect the SRAM device. - exi_deselect (0); + // Deselect the SRAM device. + exi_deselect(0); - return; + return; } /////////////////////////////////////////////////////////////////////////////////////////////////////// @@ -110,22 +102,24 @@ static int selected = 0; static void exi_select(int channel, int device, int freq) { - volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; - selected ++; + volatile unsigned long *exi = + (volatile unsigned long *) 0xCC006800; + selected++; if (selected != 1) panic("-------- select while selected!\n"); long d; // exi_select d = exi[channel * 5]; d &= 0x405; - d |= ((1<<device)<<7) | (freq << 4); - exi[channel*5] = d; + d |= ((1 << device) << 7) | (freq << 4); + exi[channel * 5] = d; } /* disable chipselect */ static void exi_deselect(int channel) { - volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; + volatile unsigned long *exi = + (volatile unsigned long *) 0xCC006800; selected--; if (selected) panic("deselect broken!"); @@ -134,22 +128,21 @@ /* dirty way for asynchronous reads */ static void *exi_last_addr; -static int exi_last_len; +static int exi_last_len; /* mode?Read:Write len bytes to/from channel */ /* when read, data will be written back in exi_sync */ static void exi_imm(int channel, void *data, int len, int mode, int zero) { - volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; + 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[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 - { + } else { exi_last_addr = 0; exi_last_len = 0; } @@ -158,30 +151,31 @@ /* Wait until transfer is done, write back data */ static void exi_sync(int channel) { - volatile unsigned long *exi = (volatile unsigned long *)0xCC006800; + volatile unsigned long *exi = + (volatile unsigned long *) 0xCC006800; while (exi[channel * 5 + 3] & 1); - if (exi_last_addr) - { + 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; + for (i = 0; i < exi_last_len; ++i) + ((unsigned char *) exi_last_addr)[i] = + (d >> ((3 - i) * 8)) & 0xFF; } } /* simple wrapper for transfers > 4bytes */ static void exi_imm_ex(int channel, void *data, int len, int mode) { - unsigned char *d = (unsigned char*)data; - while (len) - { + unsigned char *d = (unsigned char *) data; + while (len) { int tc = len; - if (tc > 4) tc = 4; + if (tc > 4) + tc = 4; exi_imm(channel, d, tc, mode, 0); exi_sync(channel); - len-=tc; - d+=tc; + len -= tc; + d += tc; } } |