Commit df72ed19 authored by Linus Torvalds's avatar Linus Torvalds

Import 2.3.23pre6

parent 4d1ceac2
......@@ -860,7 +860,7 @@ S: Germany
N: David Hinds
E: dhinds@zen.stanford.edu
W: http://hyper.stanford.edu/~dhinds
W: http://tao.stanford.edu/~dhinds
D: PCMCIA and CardBus stuff, PCMCIA-HOWTO, PCMCIA client drivers
S: 2019 W. Middlefield Rd #1
S: Mountain View, CA 94043
......@@ -1323,11 +1323,11 @@ S: 198 00 Praha 9
S: Czech Republic
N: Paul Mackerras
E: paulus@cs.anu.edu.au
E: paulus@linuxcare.com
D: Linux port for PCI Power Macintosh
S: Dept. of Computer Science
S: Australian National University
S: Canberra ACT 0200
S: Linuxcare, Inc.
S: 24 Marcus Clarke Street
S: Canberra ACT 2601
S: Australia
N: Pat Mackinlay
......
......@@ -60,7 +60,7 @@ running, the suggested command should tell you.
- NFS 2.2beta40 ; showmount --version
- Bash 1.14.7 ; bash -version
- Ncpfs 2.2.0 ; ncpmount -v
- Pcmcia-cs 3.0.7 ; cardmgr -V
- Pcmcia-cs 3.1.2 ; cardmgr -V
- PPP 2.3.9 ; pppd --version
- Util-linux 2.9i ; chsh -v
......@@ -684,8 +684,8 @@ ftp://ftp.samba.org/pub/samba/samba-2.0.0.tar.gz
Pcmcia-cs
=========
The 3.0.7 release:
ftp://hyper.stanford.edu/pub/pcmcia/pcmcia-cs.3.0.7.tar.gz
The 3.1.2 release:
ftp://sourceforge.org/pcmcia/pcmcia-cs-3.1.2.tar.gz
Setserial
=========
......
......@@ -1832,20 +1832,41 @@ CONFIG_ISAPNP
If unsure, say Y.
PCMCIA/Cardbus support
PCMCIA/CardBus support
CONFIG_PCMCIA
Say Y here if you want to attach PCMCIA's (PC-cards) to your Linux
computer. These are credit-card size devices such as network cards,
modems or hard drives popular with laptops.
Include kernel support for PCMCIA and CardBus devices. Because
PCMCIA support requires additional components that are not part of
the kernel (i.e., the pcmcia-cs package), building PCMCIA into the
kernel is generally not recommended unless you have a specific
need. If unsure, say N.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
When compiled this way, there will be modules called pcmcia_core.o
and ds.o. If you want to compile it as a module, say M here and
read Documentation/modules.txt.
You will also need David Hinds' pcmcia-cs package (see the file
Documentation/Changes for location).
Documentation/Changes for location). For more information, see the
PCMCIA-HOWTO.
CardBus support
CONFIG_CARDBUS
CardBus is a bus mastering architecture for PC-cards (it allows
PC-cards to talk to the rest of the stuff inside your computer). If
unsure, say Y.
There are two types of PCMCIA devices: 16-bit PC Cards, and higher
performance 32-bit CardBus devices. Use this option to include
support for CardBus devices. If unsure, say Y.
i82365/Yenta compatible bridge support
CONFIG_I82365
Include support for PCMCIA and CardBus host bridges that are
register compatible with the Intel i82365 and/or the Yenta
specification: this includes virtually all modern PCMCIA bridges.
If unsure, say Y.
Databook TCIC host bridge support
CONFIG_TCIC
Include support for the Databook TCIC family of PCMCIA host bridges.
These are only found on a handful of old systems. If unsure, say N.
System V IPC
CONFIG_SYSVIPC
......@@ -5478,10 +5499,48 @@ CONFIG_X25_ASY
say M here and read Documentation/modules.txt. The module will be
called x25_asy.o. If unsure, say N.
PCMCIA ethernet cards (NE2000 compatibles: DE-650, ...)
PCMCIA network device support
CONFIG_NET_PCMCIA
Say Y if you would like to include support for any PCMCIA network
adapters. If unsure, say N.
3Com 3c589 PCMCIA support
CONFIG_PCMCIA_3C589
Say Y here if you intend to attach a 3Com 3c589 or compatible PCMCIA
(PC-card) Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called 3c589_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
3Com 3c574 PCMCIA support
CONFIG_PCMCIA_3C574
Say Y here if you intend to attach a 3Com 3c574 or compatible PCMCIA
(PC-card) Fast Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called 3c574_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
Fujitsu FMV-J18x PCMCIA support
CONFIG_PCMCIA_FMVJ18X
Say Y here if you intend to attach a Fujitsu FMV-J18x or compatible
PCMCIA (PC-card) Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called fmvj18x_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
NE2000 compatible PCMCIA support
CONFIG_PCMCIA_PCNET
Say Y here if you intend to attach an NE2000 compatible PCMCIA
(PC-card) Ethernet networking card to your computer.
(PC-card) Ethernet or Fast Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
......@@ -5489,18 +5548,40 @@ CONFIG_PCMCIA_PCNET
module, say M here and read Documentation/modules.txt. If unsure,
say N.
3Com 3c589 PCMCIA card
CONFIG_PCMCIA_3C589
Say Y here if you intend to attach a 3Com 3c589 PCMCIA
(PC-card) Ethernet networking card to your computer.
New Media PCMCIA support
CONFIG_PCMCIA_NMCLAN
Say Y here if you intend to attach a New Media Ethernet or LiveWire
PCMCIA (PC-card) Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called 3c589_cs.o. If you want to compile it as a
The module will be called nmclan_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
SMC 91Cxx PCMCIA support
CONFIG_PCMCIA_SMC91C92
Say Y here if you intend to attach an SMC 91Cxx compatible PCMCIA
(PC-card) Ethernet or Fast Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called smc91c92_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
Xircom 16-bit PCMCIA support
CONFIG_PCMCIA_XIRC2PS
Say Y here if you intend to attach a Xircom 16-bit PCMCIA
(PC-card) Ethernet or Fast Ethernet card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called xirc2ps_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
Aviator/Raytheon 2.4MHz wireless
Aviator/Raytheon 2.4MHz wireless support
CONFIG_PCMCIA_RAYCS
Say Y here if you intend to attach an Aviator/Raytheon PCMCIA
(PC-card) wireless Ethernet networking card to your computer.
......@@ -5511,6 +5592,29 @@ CONFIG_PCMCIA_RAYCS
module, say M here and read Documentation/modules.txt. If unsure,
say N.
Xircom Netwave AirSurfer wireless support
CONFIG_PCMCIA_NETWAVE
Say Y here if you intend to attach a Xircom Netwave AirSurfer PCMCIA
(PC-card) wireless Ethernet networking card to your computer.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called netwave_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
AT&T/Lucent Wavelan wireless support
CONFIG_PCMCIA_WAVELAN
Say Y here if you intend to attach an AT&T/Lucent Wavelan PCMCIA
(PC-card) wireless Ethernet networking card to your computer. This
driver is for the non-IEEE-802.11 Wavelan cards.
This driver is also available as a module ( = code which can be
inserted in and removed from the running kernel whenever you want).
The module will be called wavelan_cs.o. If you want to compile it as a
module, say M here and read Documentation/modules.txt. If unsure,
say N.
PLIP (parallel port) support
CONFIG_PLIP
PLIP (Parallel Line Internet Protocol) is used to create a
......
......@@ -396,6 +396,12 @@ M: mikulas@artax.karlin.mff.cuni.cz
W: http://artax.karlin.mff.cuni.cz/~mikulas/vyplody/hpfs/index-e.cgi
S: Maintained
i386 BOOT CODE
P: Riley H. Williams
M: rhw@memalpha.cx
L: Linux-Kernel@vger.rutgers.edu
S: Maintained
IBM MCA SCSI SUBSYSTEM DRIVER
P: Michael Lang
M: langa2@kph.uni-mainz.de
......@@ -502,8 +508,9 @@ S: Maintained
LINUX FOR POWER MACINTOSH
P: Paul Mackerras
M: paulus@cs.anu.edu.au
L: linux-pmac@samba.anu.edu.au
M: paulus@linuxcare.com
W: http://www.linuxppc.org/
L: linuxppc-dev@lists.linuxppc.org
S: Maintained
M68K
......@@ -687,6 +694,7 @@ PCMCIA SUBSYSTEM
P: David Hinds
M: dhinds@zen.stanford.edu
L: linux-kernel@vger.rutgers.edu
W: http://pcmcia.sourceforge.org
S: Maintained
PCNET32 NETWORK DRIVER
......
......@@ -295,7 +295,7 @@ decompress_kernel(ulg output_start, ulg free_mem_ptr_p, ulg free_mem_ptr_end_p,
makecrc();
puts("Uncompressing Linux...");
gunzip();
puts("done.\nNow booting the kernel\n");
puts(" done, booting the kernel.\n");
return output_ptr;
}
#else
......
......@@ -97,27 +97,38 @@ pte_t __bad_page(void)
void show_mem(void)
{
extern void show_net_buffers(void);
int i,free = 0,total = 0,reserved = 0;
int shared = 0;
int free = 0, total = 0, reserved = 0;
int shared = 0, cached = 0;
struct page *page, *end;
printk("Mem-info:\n");
show_free_areas();
printk("Free swap: %6dkB\n",nr_swap_pages<<(PAGE_SHIFT-10));
i = MAP_NR(high_memory);
while (i-- > 0) {
for (page = mem_map, end = mem_map + max_mapnr;
page < end; page++) {
if (PageSkip(page)) {
if (page->next_hash < page)
break;
page = page->next_hash;
}
total++;
if (PageReserved(mem_map+i))
if (PageReserved(page))
reserved++;
else if (!atomic_read(&mem_map[i].count))
else if (PageSwapCache(page))
cached++;
else if (!atomic_read(&page->count))
free++;
else
shared += atomic_read(&mem_map[i].count) - 1;
shared += atomic_read(&page->count) - 1;
}
printk("%d pages of RAM\n",total);
printk("%d free pages\n",free);
printk("%d reserved pages\n",reserved);
printk("%d pages shared\n",shared);
printk("%d pages of RAM\n", total);
printk("%d free pages\n", free);
printk("%d reserved pages\n", reserved);
printk("%d pages shared\n", shared);
printk("%d pages swap cached\n", cached);
#ifndef CONFIG_NO_PGT_CACHE
printk("%ld page tables cached\n", pgtable_cache_size);
#endif
show_buffers();
#ifdef CONFIG_NET
show_net_buffers();
......
......@@ -54,10 +54,12 @@ CONFIG_PCI_DIRECT=y
# CONFIG_MCA is not set
#
# PCMCIA/Cardbus support
# PCMCIA/CardBus support
#
CONFIG_PCMCIA=y
CONFIG_CARDBUS=y
CONFIG_I82365=y
# CONFIG_TCIC is not set
CONFIG_SYSVIPC=y
# CONFIG_BSD_PROCESS_ACCT is not set
CONFIG_SYSCTL=y
......@@ -284,11 +286,19 @@ CONFIG_EEXPRESS_PRO100=y
# CONFIG_WAN is not set
#
# PCMCIA network devices
# PCMCIA network device support
#
CONFIG_PCMCIA_PCNET=y
CONFIG_NET_PCMCIA=y
# CONFIG_PCMCIA_3C589 is not set
# CONFIG_PCMCIA_3C574 is not set
# CONFIG_PCMCIA_FMVJ18X is not set
CONFIG_PCMCIA_PCNET=y
# CONFIG_PCMCIA_NMCLAN is not set
# CONFIG_PCMCIA_SMC91C92 is not set
# CONFIG_PCMCIA_XIRC2PS is not set
CONFIG_PCMCIA_RAYCS=y
# CONFIG_PCMCIA_NETWAVE is not set
# CONFIG_PCMCIA_WAVELAN is not set
CONFIG_PCMCIA_NETCARD=y
#
......
......@@ -402,7 +402,11 @@ void __init add_memory_region(unsigned long start,
} /* add_memory_region */
#define LOWMEMSIZE() ((*(unsigned short *)__va(0x413)) * 1024)
/*
* Do NOT EVER look at the BIOS memory size location.
* It does not work on many machines.
*/
#define LOWMEMSIZE() (0x9f000)
void __init setup_memory_region(void)
{
......
......@@ -255,8 +255,7 @@ struct pci_bus * __init pci_scan_peer_bridge(int bus)
/*********************************************************** SETUP */
/* From arch/m68k/kernel/setup.c. */
void __init apus_setup_arch(unsigned long * memory_start_p,
unsigned long * memory_end_p)
void __init apus_setup_arch(void)
{
#ifdef CONFIG_APUS
extern char cmd_line[];
......
......@@ -36,6 +36,7 @@
#include <linux/version.h>
#include <linux/adb.h>
#include <linux/module.h>
#include <linux/delay.h>
#include <asm/mmu.h>
#include <asm/processor.h>
......@@ -226,7 +227,7 @@ static void __init sio_init(void)
void __init
chrp_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
chrp_setup_arch(void)
{
extern char cmd_line[];
struct device_node *device;
......@@ -277,7 +278,7 @@ chrp_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
*memory_start_p = pmac_find_bridges(*memory_start_p, *memory_end_p);
pmac_find_bridges();
/* Get the event scan rate for the rtas so we know how
* often it expects a heartbeat. -- Cort
......@@ -362,10 +363,7 @@ int chrp_get_irq( struct pt_regs *regs )
irq = *chrp_int_ack_special;
else
irq = i8259_irq( smp_processor_id() );
/*
* Acknowledge as soon as possible to allow i8259
* interrupt nesting */
openpic_eoi( smp_processor_id() );
openpic_eoi( smp_processor_id() );
}
if (irq == OPENPIC_VEC_SPURIOUS)
/*
......@@ -373,6 +371,11 @@ int chrp_get_irq( struct pt_regs *regs )
* acknowledged
*/
irq = -1;
/*
* I would like to openpic_eoi here but there seem to be timing problems
* between the openpic ack and the openpic eoi.
* -- Cort
*/
return irq;
}
......@@ -381,89 +384,15 @@ void chrp_post_irq(int irq)
/*
* If it's an i8259 irq then we've already done the
* openpic irq. So we just check to make sure the controller
* is an openpic and if it is then eoi -- Cort
* is an openpic and if it is then eoi
*
* We do it this way since our irq_desc[irq].ctl can change
* with RTL and no longer be open_pic -- Cort
*/
if ( irq_desc[irq].ctl == &open_pic )
if ( irq >= open_pic.irq_offset)
openpic_eoi( smp_processor_id() );
}
#if 0
void
chrp_do_IRQ(struct pt_regs *regs,
int cpu,
int isfake)
{
int irq;
unsigned long bits = 0;
int openpic_eoi_done = 0;
#ifdef __SMP__
{
unsigned int loops = 1000000;
while (test_bit(0, &global_irq_lock)) {
if (smp_processor_id() == global_irq_holder) {
printk("uh oh, interrupt while we hold global irq lock!\n");
#ifdef CONFIG_XMON
xmon(0);
#endif
break;
}
if (loops-- == 0) {
printk("do_IRQ waiting for irq lock (holder=%d)\n", global_irq_holder);
#ifdef CONFIG_XMON
xmon(0);
#endif
}
}
}
#endif /* __SMP__ */
irq = openpic_irq(0);
if (irq == IRQ_8259_CASCADE)
{
/*
* This magic address generates a PCI IACK cycle.
*
* This should go in the above mask/ack code soon. -- Cort
*/
if ( chrp_int_ack_special )
irq = *chrp_int_ack_special;
else
irq = i8259_irq(0);
/*
* Acknowledge as soon as possible to allow i8259
* interrupt nesting */
openpic_eoi(0);
openpic_eoi_done = 1;
}
if (irq == OPENPIC_VEC_SPURIOUS)
{
/*
* Spurious interrupts should never be
* acknowledged
*/
ppc_spurious_interrupts++;
openpic_eoi_done = 1;
goto out;
}
bits = 1UL << irq;
if (irq < 0)
{
printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
irq, regs->nip);
ppc_spurious_interrupts++;
}
else
{
ppc_irq_dispatch_handler( regs, irq );
}
out:
if (!openpic_eoi_done)
openpic_eoi(0);
}
#endif
void __init chrp_init_IRQ(void)
{
struct device_node *np;
......
......@@ -134,7 +134,7 @@ extern int root_mountflags;
extern char cmd_line[];
void __init gemini_setup_arch(unsigned long *memstart, unsigned long *memend)
void __init gemini_setup_arch(void)
{
unsigned int cpu;
extern char cmd_line[];
......
/*
* $Id: idle.c,v 1.67 1999/09/10 05:05:47 paulus Exp $
* $Id: idle.c,v 1.68 1999/10/15 18:16:03 cort Exp $
*
* Idle daemon for PowerPC. Idle daemon will handle any action
* that needs to be taken when the system becomes idle.
......@@ -293,11 +293,8 @@ void power_save(void)
/* set the POW bit in the MSR, and enable interrupts
* so we wake up sometime! */
__sti(); /* this keeps rtl from getting confused -- Cort */
_nmask_and_or_msr(0, MSR_POW | MSR_EE);
/* Disable interrupts again so restore_flags will
* work. */
_nmask_and_or_msr(MSR_EE, 0);
}
restore_flags(msr);
default:
......
......@@ -296,15 +296,19 @@ asmlinkage void do_IRQ(struct pt_regs *regs, int isfake)
irq = ppc_md.get_irq( regs );
if ( irq < 0 )
{
printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
irq, regs->nip);
ppc_spurious_interrupts++;
return;
/* -2 means ignore, already handled */
if (irq != -2) {
printk(KERN_DEBUG "Bogus interrupt %d from PC = %lx\n",
irq, regs->nip);
ppc_spurious_interrupts++;
}
goto out;
}
ppc_irq_dispatch_handler( regs, irq );
if ( ppc_md.post_irq )
ppc_md.post_irq( irq );
out:
hardirq_exit( cpu );
}
......
......@@ -33,6 +33,7 @@
#include <linux/blk.h>
#include <linux/ioport.h>
#include <linux/ide.h>
#include <linux/bootmem.h>
#include <asm/mmu.h>
#include <asm/processor.h>
......@@ -83,13 +84,12 @@ void __init adbdev_init(void)
}
void __init
m8xx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
m8xx_setup_arch(void)
{
int cpm_page;
extern char cmd_line[];
cpm_page = *memory_start_p;
*memory_start_p += PAGE_SIZE;
cpm_page = (int) alloc_bootmem_pages(PAGE_SIZE);
printk("Boot arguments: %s\n", cmd_line);
......@@ -108,6 +108,9 @@ m8xx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
rd_doload = 1;
rd_image_start = 0;
#endif
#if 0 /* XXX this may need to be updated for the new bootmem stuff,
or possibly just deleted (see set_phys_avail() in init.c).
- paulus. */
/* initrd_start and size are setup by boot/head.S and kernel/head.S */
if ( initrd_start )
{
......@@ -120,6 +123,7 @@ m8xx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
}
}
#endif
#endif
}
void
......
......@@ -76,13 +76,12 @@ void __init adbdev_init(void)
}
void __init
mbx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
mbx_setup_arch(void)
{
int cpm_page;
extern char cmd_line[];
cpm_page = *memory_start_p;
*memory_start_p += PAGE_SIZE;
cpm_page = (int) alloc_bootmem_pages(PAGE_SIZE);
sprintf(cmd_line,
"%s root=/dev/nfs nfsroot=/sys/mbxroot",
......@@ -104,6 +103,9 @@ mbx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
rd_doload = 1;
rd_image_start = 0;
#endif
#if 0 /* XXX this may need to be updated for the new bootmem stuff,
or possibly just deleted (see set_phys_avail() in init.c).
- paulus. */
/* initrd_start and size are setup by boot/head.S and kernel/head.S */
if ( initrd_start )
{
......@@ -116,6 +118,7 @@ mbx_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
}
}
#endif
#endif
#ifdef notdef
request_region(0x20,0x20,"pic1");
......
......@@ -235,9 +235,9 @@ _GLOBAL(flush_dcache_range)
* snoop from the data cache.
* This is a no-op on the 601 which has a unified cache.
*
* void flush_page_to_ram(void *page)
* void __flush_page_to_ram(void *page)
*/
_GLOBAL(flush_page_to_ram)
_GLOBAL(__flush_page_to_ram)
mfspr r5,PVR
rlwinm r5,r5,16,16,31
cmpi 0,r5,1
......
......@@ -146,3 +146,25 @@ int pcibios_assign_resource(struct pci_dev *pdev, int resource)
{
return 0;
}
/* the next two are stolen from the alpha port... */
void __init
pcibios_update_resource(struct pci_dev *dev, struct resource *root,
struct resource *res, int resource)
{
unsigned long where, size;
u32 reg;
where = PCI_BASE_ADDRESS_0 + (resource * 4);
size = res->end - res->start;
pci_read_config_dword(dev, where, &reg);
reg = (reg & size) | (((u32)(res->start - root->start)) & ~size);
pci_write_config_dword(dev, where, reg);
}
void __init
pcibios_update_irq(struct pci_dev *dev, int irq)
{
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq);
/* XXX FIXME - update OF device tree node interrupt property */
}
......@@ -17,6 +17,7 @@
#include <linux/delay.h>
#include <linux/string.h>
#include <linux/init.h>
#include <linux/bootmem.h>
#include <asm/init.h>
#include <asm/io.h>
......@@ -30,7 +31,7 @@
struct bridge_data **bridges, *bridge_list;
static int max_bus;
static void add_bridges(struct device_node *dev, unsigned long *mem_ptr);
static void add_bridges(struct device_node *dev);
/*
* Magic constants for enabling cache coherency in the bandit/PSX bridge.
......@@ -362,24 +363,22 @@ static void __init init_bandit(struct bridge_data *bp)
bp->io_base);
}
unsigned long __init pmac_find_bridges(unsigned long mem_start, unsigned long mem_end)
void __init pmac_find_bridges(void)
{
int bus;
struct bridge_data *bridge;
bridge_list = 0;
max_bus = 0;
add_bridges(find_devices("bandit"), &mem_start);
add_bridges(find_devices("chaos"), &mem_start);
add_bridges(find_devices("pci"), &mem_start);
bridges = (struct bridge_data **) mem_start;
mem_start += (max_bus + 1) * sizeof(struct bridge_data *);
add_bridges(find_devices("bandit"));
add_bridges(find_devices("chaos"));
add_bridges(find_devices("pci"));
bridges = (struct bridge_data **)
alloc_bootmem((max_bus + 1) * sizeof(struct bridge_data *));
memset(bridges, 0, (max_bus + 1) * sizeof(struct bridge_data *));
for (bridge = bridge_list; bridge != NULL; bridge = bridge->next)
for (bus = bridge->bus_number; bus <= bridge->max_bus; ++bus)
bridges[bus] = bridge;
return mem_start;
}
/*
......@@ -387,7 +386,7 @@ unsigned long __init pmac_find_bridges(unsigned long mem_start, unsigned long me
* "pci" (a MPC106) and no bandit or chaos bridges, and contrariwise,
* if we have one or more bandit or chaos bridges, we don't have a MPC106.
*/
static void __init add_bridges(struct device_node *dev, unsigned long *mem_ptr)
static void __init add_bridges(struct device_node *dev)
{
int *bus_range;
int len;
......@@ -413,8 +412,7 @@ static void __init add_bridges(struct device_node *dev, unsigned long *mem_ptr)
printk(KERN_INFO "PCI buses %d..%d", bus_range[0],
bus_range[1]);
printk(" controlled by %s at %x\n", dev->name, addr->address);
bp = (struct bridge_data *) *mem_ptr;
*mem_ptr += sizeof(struct bridge_data);
bp = (struct bridge_data *) alloc_bootmem(sizeof(*bp));
if (strcmp(dev->name, "pci") != 0) {
bp->cfg_addr = (volatile unsigned int *)
ioremap(addr->address + 0x800000, 0x1000);
......
......@@ -225,7 +225,7 @@ pmac_get_irq(struct pt_regs *regs)
xmon(regs);
#endif
smp_message_recv();
return -1;
return -2; /* ignore, already handled */
}
{
......@@ -374,7 +374,7 @@ pmac_pic_init(void)
}
/* get addresses of second controller */
irqctrler = (irqctrler->next) ? irqctrler->next : NULL;
irqctrler = irqctrler->next;
if (irqctrler && irqctrler->n_addrs > 0) {
addr = (unsigned long)
ioremap(irqctrler->addrs[0].address, 0x40);
......@@ -382,6 +382,11 @@ pmac_pic_init(void)
pmac_irq_hw[i] = (volatile struct pmac_irq_hw*)
(addr + (4 - i) * 0x10);
}
} else {
/* older powermacs have a GC (grand central) or ohare at
f3000000, with interrupt control registers at f3000020. */
addr = (unsigned long) ioremap(0xf3000000, 0x40);
pmac_irq_hw[0] = (volatile struct pmac_irq_hw *) (addr + 0x20);
}
/* disable all interrupts in all controllers */
......
......@@ -238,7 +238,7 @@ pmac_mksound(unsigned int hz, unsigned int ticks)
static volatile u32 *sysctrl_regs;
void __init
pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p)
pmac_setup_arch(void)
{
struct device_node *cpu;
int *fp;
......@@ -269,7 +269,7 @@ pmac_setup_arch(unsigned long *memory_start_p, unsigned long *memory_end_p)
__ioremap(0xffc00000, 0x400000, pgprot_val(PAGE_READONLY));
ohare_init();
*memory_start_p = pmac_find_bridges(*memory_start_p, *memory_end_p);
pmac_find_bridges();
init_p2pbridge();
/* Checks "l2cr-value" property in the registry */
......
......@@ -60,7 +60,6 @@ EXPORT_SYMBOL(do_signal);
EXPORT_SYMBOL(syscall_trace);
EXPORT_SYMBOL(transfer_to_handler);
EXPORT_SYMBOL(do_IRQ);
EXPORT_SYMBOL(init_task_union);
EXPORT_SYMBOL(MachineCheckException);
EXPORT_SYMBOL(AlignmentException);
EXPORT_SYMBOL(ProgramCheckException);
......
......@@ -210,7 +210,7 @@ prep_get_cpuinfo(char *buffer)
}
void __init
prep_setup_arch(unsigned long * memory_start_p, unsigned long * memory_end_p)
prep_setup_arch()
{
extern char cmd_line[];
unsigned char reg;
......
......@@ -539,14 +539,12 @@ void __init ppc_init(void)
}
}
void __init setup_arch(char **cmdline_p,
unsigned long * memory_start_p, unsigned long * memory_end_p)
void __init setup_arch(char **cmdline_p)
{
extern int panic_timeout;
extern char _etext[], _edata[];
extern char *klimit;
extern unsigned long find_available_memory(void);
extern unsigned long *end_of_DRAM;
extern void do_init_bootmem(void);
#ifdef CONFIG_XMON
extern void xmon_map_scc(void);
......@@ -555,22 +553,22 @@ void __init setup_arch(char **cmdline_p,
xmon(0);
#endif /* CONFIG_XMON */
/* reboot on panic */
/* reboot on panic */
panic_timeout = 180;
init_mm.start_code = PAGE_OFFSET;
init_mm.end_code = (unsigned long) _etext;
init_mm.end_data = (unsigned long) _edata;
init_mm.brk = (unsigned long) klimit;
init_mm.brk = (unsigned long) klimit;
/* Save unparsed command line copy for /proc/cmdline */
strcpy(saved_command_line, cmd_line);
*cmdline_p = cmd_line;
*memory_start_p = find_available_memory();
*memory_end_p = (unsigned long) end_of_DRAM;
/* set up the bootmem stuff with available memory */
do_init_bootmem();
ppc_md.setup_arch(memory_start_p, memory_end_p);
ppc_md.setup_arch();
/* clear the progress line */
if ( ppc_md.progress ) ppc_md.progress("arch: exit", 0x3eab);
}
......
This diff is collapsed.
......@@ -288,7 +288,6 @@ icside_build_dmatable(ide_drive_t *drive, int reading)
static int
icside_config_drive(ide_drive_t *drive, int mode)
{
ide_hwif_t *hwif = HWIF(drive);
int speed, err;
if (mode == 2) {
......
......@@ -704,8 +704,9 @@ void __init initrd_load(void)
#define OF(args) args
#ifndef memzero
#define memzero(s, n) memset ((s), 0, (n))
#endif
typedef unsigned char uch;
typedef unsigned short ush;
......
......@@ -5,7 +5,7 @@
*
* Maintainer unknown.
*
* Drive tuning added from Corel Computer's kernel sources
* Drive tuning added from Rebel.com's kernel sources
* -- Russell King (15/11/98) linux@arm.linux.org.uk
*/
......
......@@ -158,6 +158,9 @@ static inline unsigned long pgprot_noncached(unsigned long prot)
prot = (prot & _CACHEMASK040) | _PAGE_NOCACHE_S;
#elif defined(__mips__)
prot = (prot & ~_CACHE_MASK) | _CACHE_UNCACHED;
#elif defined(__arm__) && defined(CONFIG_CPU_32)
/* Turn off caching for all I/O areas */
prot &= ~(L_PTE_CACHEABLE | L_PTE_BUFFERABLE);
#endif
return prot;
......
......@@ -61,7 +61,7 @@ struct vt_struct *vt_cons[MAX_NR_CONSOLES];
*/
unsigned char keyboard_type = KB_101;
#ifndef __alpha__
#if !defined(__alpha__) && !defined(__arm__)
asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on);
#endif
......@@ -89,7 +89,8 @@ unsigned int video_scan_lines;
*/
#if defined(__i386__) || defined(__alpha__) || defined(__powerpc__) \
|| (defined(__mips__) && !defined(CONFIG_SGI))
|| (defined(__mips__) && !defined(CONFIG_SGI)) \
|| (defined(__arm__) && defined(CONFIG_HOST_FOOTBRIDGE))
static void
kd_nosound(unsigned long ignored)
......@@ -470,7 +471,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
ucval = keyboard_type;
goto setchar;
#ifndef __alpha__
#if !defined(__alpha__) && !defined(__arm__)
/*
* These cannot be implemented on any machine that implements
* ioperm() in user level (such as Alpha PCs).
......
This diff is collapsed.
......@@ -92,6 +92,13 @@ struct mac_zschannel {
struct mac_serial* parent;
};
struct mac_dma {
volatile struct dbdma_regs dma;
volatile unsigned short res_count;
volatile unsigned short command;
volatile unsigned int buf_addr;
};
struct mac_serial {
struct mac_serial *zs_next; /* For IRQ servicing chain */
struct mac_zschannel *zs_channel; /* Channel registers */
......@@ -156,6 +163,28 @@ struct mac_serial {
struct termios callout_termios;
wait_queue_head_t open_wait;
wait_queue_head_t close_wait;
volatile struct dbdma_regs *tx_dma;
int tx_dma_irq;
volatile struct dbdma_cmd *tx_cmds;
volatile struct mac_dma *rx;
int rx_dma_irq;
volatile struct dbdma_cmd **rx_cmds;
unsigned char **rx_char_buf;
unsigned char **rx_flag_buf;
#define RX_BUF_SIZE 256
int rx_nbuf;
int rx_done_bytes;
int rx_ubuf;
int rx_fbuf;
#define RX_NO_FBUF (-1)
int rx_cbuf;
spinlock_t rx_dma_lock;
int has_dma;
int dma_initted;
void *dma_priv;
struct timer_list poll_dma_timer;
#define RX_DMA_TIMER (jiffies + 10*HZ/1000)
};
......@@ -226,9 +255,9 @@ struct mac_serial {
#define INT_ALL_Rx 0x10 /* Int on all Rx Characters or error */
#define INT_ERR_Rx 0x18 /* Int on error only */
#define WT_RDY_RT 0x20 /* Wait/Ready on R/T */
#define WT_FN_RDYFN 0x40 /* Wait/FN/Ready FN */
#define WT_RDY_ENAB 0x80 /* Wait/Ready Enable */
#define WT_RDY_RT 0x20 /* W/Req reflects recv if 1, xmit if 0 */
#define WT_FN_RDYFN 0x40 /* W/Req pin is DMA request if 1, wait if 0 */
#define WT_RDY_ENAB 0x80 /* Enable W/Req pin */
/* Write Register #2 (Interrupt Vector) */
......@@ -286,6 +315,9 @@ struct mac_serial {
/* Write Register 7 (Sync bits 8-15/SDLC 01111110) */
/* Write Register 7' (Some enhanced feature control) */
#define ENEXREAD 0x40 /* Enable read of some write registers */
/* Write Register 8 (transmit buffer) */
/* Write Register 9 (Master interrupt control) */
......@@ -346,7 +378,9 @@ struct mac_serial {
#define SNRZI 0xe0 /* Set NRZI mode */
/* Write Register 15 (external/status interrupt control) */
#define EN85C30 1 /* Enable some 85c30-enhanced registers */
#define ZCIE 2 /* Zero count IE */
#define ENSTFIFO 4 /* Enable status FIFO (SDLC) */
#define DCDIE 8 /* DCD IE */
#define SYNCIE 0x10 /* Sync/hunt IE */
#define CTSIE 0x20 /* CTS IE */
......@@ -382,6 +416,15 @@ struct mac_serial {
#define END_FR 0x80 /* End of Frame (SDLC) */
/* Read Register 2 (channel b only) - Interrupt vector */
#define CHB_Tx_EMPTY 0x00
#define CHB_EXT_STAT 0x02
#define CHB_Rx_AVAIL 0x04
#define CHB_SPECIAL 0x06
#define CHA_Tx_EMPTY 0x08
#define CHA_EXT_STAT 0x0a
#define CHA_Rx_AVAIL 0x0c
#define CHA_SPECIAL 0x0e
#define STATUS_MASK 0x06
/* Read Register 3 (interrupt pending register) ch a only */
#define CHBEXT 0x1 /* Channel B Ext/Stat IP */
......
......@@ -246,18 +246,18 @@ static int __init acpi_map_tables(void)
struct acpi_table *rsdt;
u32 *rsdt_entry;
int rsdt_entry_count;
u8 *i;
unsigned long i;
// search BIOS memory for RSDP
for (i = ACPI_BIOS_ROM_BASE; i < ACPI_BIOS_ROM_END; i += 16) {
rsdp = (struct acpi_rsdp *) i;
if (readl(rsdp->signature) == ACPI_RSDP1_SIG
&& readl(rsdp->signature + 1) == ACPI_RSDP2_SIG) {
rsdp = (struct acpi_rsdp *) phys_to_virt(i);
if (rsdp->signature[0] == ACPI_RSDP1_SIG &&
rsdp->signature[1] == ACPI_RSDP2_SIG) {
char oem[7];
int j;
// strip trailing space and print OEM identifier
memcpy_fromio(oem, rsdp->oem, 6);
memcpy(oem, rsdp->oem, 6);
oem[6] = '\0';
for (j = 5;
j > 0 && (oem[j] == '\0' || oem[j] == ' ');
......@@ -275,7 +275,7 @@ static int __init acpi_map_tables(void)
return -ENODEV;
}
// fetch RSDT from RSDP
rsdt = acpi_map_table(readl(&rsdp->rsdt));
rsdt = acpi_map_table(rsdp->rsdt);
if (!rsdt || rsdt->signature != ACPI_RSDT_SIG) {
printk(KERN_ERR "ACPI: no RSDT found\n");
acpi_unmap_table(rsdt);
......
......@@ -27,10 +27,10 @@ CONFIG_82596_MODULE :=
ifeq ($(CONFIG_PCMCIA),y)
SUB_DIRS += pcmcia
MOD_SUB_DIRS += pcmcia
MOD_IN_SUB_DIRS += pcmcia
else
ifeq ($(CONFIG_PCMCIA),m)
MOD_SUB_DIRS += pcmcia
MOD_IN_SUB_DIRS += pcmcia
endif
endif
......@@ -829,14 +829,6 @@ else
endif
endif
ifeq ($(CONFIG_PCMCIA_PCNET),y)
CONFIG_8390_BUILTIN = y
else
ifeq ($(CONFIG_PCMCIA_PCNET),m)
CONFIG_8390_MODULE = y
endif
endif
# If anything built-in uses the 8390, then build it into the kernel also.
# If not, but a module uses it, build as a module.
ifdef CONFIG_8390_BUILTIN
......
......@@ -10,16 +10,16 @@
* Modified by: Dag Brattli <dagb@cs.uit.no>
*
* Copyright (c) 1998-1999 Dag Brattli <dagb@cs.uit.no>
* Copyright (c) 1998 Corel Computer Corp.
* Copyright (c) 1998-1999 Rebel.com
*
* 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.
*
* Neither Paul VanderSpek nor Corel Computer Corp. admit liability
* nor provide warranty for any of this software. This material is
* provided "AS-IS" and at no charge.
* Neither Paul VanderSpek nor Rebel.com admit liability nor provide
* warranty for any of this software. This material is provided "AS-IS"
* and at no charge.
*
* If you find bugs in this file, its very likely that the same bug
* will also be in pc87108.c since the implementations is quite
......
This diff is collapsed.
......@@ -4,7 +4,7 @@
Copyright (C) 1999 David A. Hinds -- dhinds@hyper.stanford.edu
3c589_cs.c 1.134 1999/09/15 15:33:09
3c589_cs.c 1.135 1999/10/07 20:14:54
The network driver code is based on Donald Becker's 3c589 code:
......@@ -115,7 +115,7 @@ static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static char *version =
"3c589_cs.c 1.134 1999/09/15 15:33:09 (David Hinds)";
"3c589_cs.c 1.135 1999/10/07 20:14:54 (David Hinds)";
#else
#define DEBUG(n, args...)
#endif
......@@ -142,14 +142,14 @@ static void tc589_release(u_long arg);
static int tc589_event(event_t event, int priority,
event_callback_args_t *args);
static ushort read_eeprom(short ioaddr, int index);
static u_short read_eeprom(ioaddr_t ioaddr, int index);
static void tc589_reset(struct net_device *dev);
static void media_check(u_long arg);
static int el3_config(struct net_device *dev, struct ifmap *map);
static int el3_open(struct net_device *dev);
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev);
static void el3_interrupt(int irq, void *dev_id, struct pt_regs *regs);
static void update_stats(int addr, struct net_device *dev);
static void update_stats(ioaddr_t addr, struct net_device *dev);
static struct net_device_stats *el3_get_stats(struct net_device *dev);
static int el3_rx(struct net_device *dev);
static int el3_close(struct net_device *dev);
......@@ -355,14 +355,14 @@ static void tc589_config(dev_link_t *link)
struct net_device *dev;
tuple_t tuple;
cisparse_t parse;
u_short buf[32];
u_short buf[32], *phys_addr;
int last_fn, last_ret, i, j, multi = 0;
short ioaddr, *phys_addr;
ioaddr_t ioaddr;
char *ram_split[] = {"5:3", "3:1", "1:1", "3:5"};
handle = link->handle;
dev = link->priv;
phys_addr = (short *)dev->dev_addr;
phys_addr = (u_short *)dev->dev_addr;
DEBUG(0, "3c589_config(0x%p)\n", link);
......@@ -571,7 +571,7 @@ static void wait_for_completion(struct net_device *dev, int cmd)
Read a word from the EEPROM using the regular EEPROM access register.
Assume that we are in register window zero.
*/
static ushort read_eeprom(short ioaddr, int index)
static u_short read_eeprom(ioaddr_t ioaddr, int index)
{
int i;
outw(EEPROM_READ + index, ioaddr + 10);
......@@ -589,7 +589,7 @@ static ushort read_eeprom(short ioaddr, int index)
static void tc589_set_xcvr(struct net_device *dev, int if_port)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
ushort ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
EL3WINDOW(0);
switch (if_port) {
......@@ -611,7 +611,7 @@ static void tc589_set_xcvr(struct net_device *dev, int if_port)
static void dump_status(struct net_device *dev)
{
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
EL3WINDOW(1);
printk(KERN_INFO " irq status %04x, rx status %04x, tx status "
"%02x tx free %04x\n", inw(ioaddr+EL3_STATUS),
......@@ -627,7 +627,7 @@ static void dump_status(struct net_device *dev)
/* Reset and restore all of the 3c589 registers. */
static void tc589_reset(struct net_device *dev)
{
ushort ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
int i;
EL3WINDOW(0);
......@@ -709,7 +709,7 @@ static int el3_open(struct net_device *dev)
static void el3_tx_timeout(struct net_device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
printk(KERN_NOTICE "%s: Transmit timed out!\n", dev->name);
dump_status(dev);
......@@ -724,7 +724,7 @@ static void el3_tx_timeout(struct net_device *dev)
static void pop_tx_status(struct net_device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
int i;
/* Clear the Tx status stack. */
......@@ -747,7 +747,7 @@ static void pop_tx_status(struct net_device *dev)
static int el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
/* Transmitter timeout, serious problems. */
if (dev->tbusy) {
......@@ -791,7 +791,7 @@ static void el3_interrupt(int irq, void *dev_id, struct pt_regs *regs)
{
struct net_device *dev = (struct net_device *)dev_id;
struct el3_private *lp;
int ioaddr, status;
ioaddr_t ioaddr, status;
int i = 0;
if ((dev == NULL) || !dev->start)
......@@ -885,7 +885,7 @@ static void media_check(u_long arg)
{
struct net_device *dev = (struct net_device *)(arg);
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
u_short media, errs;
u_long flags;
......@@ -984,7 +984,7 @@ static struct net_device_stats *el3_get_stats(struct net_device *dev)
operation, and it's simpler for the rest of the driver to assume that
window 1 is always valid rather than use a special window-state variable.
*/
static void update_stats(int ioaddr, struct net_device *dev)
static void update_stats(ioaddr_t ioaddr, struct net_device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
......@@ -1013,7 +1013,7 @@ static void update_stats(int ioaddr, struct net_device *dev)
static int el3_rx(struct net_device *dev)
{
struct el3_private *lp = (struct el3_private *)dev->priv;
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
int worklimit = 32;
short rx_status;
......@@ -1073,7 +1073,7 @@ static int el3_rx(struct net_device *dev)
*/
static void set_multicast_list(struct net_device *dev)
{
short ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
dev_link_t *link;
for (link = dev_list; link; link = link->next)
if (link->priv == dev) break;
......@@ -1099,7 +1099,7 @@ static void set_multicast_list(struct net_device *dev)
static int el3_close(struct net_device *dev)
{
int ioaddr = dev->base_addr;
ioaddr_t ioaddr = dev->base_addr;
dev_link_t *link;
for (link = dev_list; link; link = link->next)
......
......@@ -3,13 +3,34 @@
#
mainmenu_option next_comment
comment 'PCMCIA network devices'
comment 'PCMCIA network device support'
dep_tristate 'PCMCIA ethernet cards (NE2000 compatibles: DE-650, ...)' CONFIG_PCMCIA_PCNET $CONFIG_PCMCIA
dep_tristate '3Com 3c589 PCMCIA card' CONFIG_PCMCIA_3C589 $CONFIG_PCMCIA
dep_tristate 'Aviator/Raytheon 2.4MHz wireless' CONFIG_PCMCIA_RAYCS $CONFIG_PCMCIA
bool 'PCMCIA network device support' CONFIG_NET_PCMCIA
if [ "$CONFIG_NET_PCMCIA" = "y" ]; then
dep_tristate ' 3Com 3c589 PCMCIA support' CONFIG_PCMCIA_3C589 $CONFIG_PCMCIA
dep_tristate ' 3Com 3c574 PCMCIA support' CONFIG_PCMCIA_3C574 $CONFIG_PCMCIA
dep_tristate ' Fujitsu FMV-J18x PCMCIA support' CONFIG_PCMCIA_FMVJ18X $CONFIG_PCMCIA
dep_tristate ' NE2000 compatible PCMCIA support' CONFIG_PCMCIA_PCNET $CONFIG_PCMCIA
dep_tristate ' New Media PCMCIA support' CONFIG_PCMCIA_NMCLAN $CONFIG_PCMCIA
dep_tristate ' SMC 91Cxx PCMCIA support' CONFIG_PCMCIA_SMC91C92 $CONFIG_PCMCIA
dep_tristate ' Xircom 16-bit PCMCIA support' CONFIG_PCMCIA_XIRC2PS $CONFIG_PCMCIA
if [ "$CONFIG_PCMCIA_3C589" = "y" -o "$CONFIG_PCMCIA_RAYCS" = "y" -o "$CONFIG_PCMCIA_PCNET" = "y" ]; then
# if [ "$CONFIG_CARDBUS" = "y" ]; then
# dep_tristate ' 3Com 3c575 CardBus support' CONFIG_PCMCIA_3C575 $CONFIG_PCMCIA
# dep_tristate ' DEC Tulip CardBus support' CONFIG_PCMCIA_TULIP $CONFIG_PCMCIA
# dep_tristate ' SMC EPIC CardBus support' CONFIG_PCMCIA_EPIC100 $CONFIG_PCMCIA
# fi
dep_tristate ' Aviator/Raytheon 2.4MHz wireless support' CONFIG_PCMCIA_RAYCS $CONFIG_PCMCIA
dep_tristate ' Xircom Netwave AirSurfer wireless support' CONFIG_PCMCIA_NETWAVE $CONFIG_PCMCIA
dep_tristate ' AT&T/Lucent Wavelan wireless support' CONFIG_PCMCIA_WAVELAN $CONFIG_PCMCIA
fi
if [ "$CONFIG_PCMCIA_3C589" = "y" -o "$CONFIG_PCMCIA_3C574" = "y" -o \
"$CONFIG_PCMCIA_FMVJ18X" = "y" -o "$CONFIG_PCMCIA_PCNET" = "y" -o \
"$CONFIG_PCMCIA_NMCLAN" = "y" -o "$CONFIG_PCMCIA_SMC91C92" = "y" -o \
"$CONFIG_PCMCIA_XIRC2PS" = "y" -o "$CONFIG_PCMCIA_RAYCS" = "y" -o \
"$CONFIG_PCMCIA_NETWAVE" = "y" -o "$CONFIG_PCMCIA_WAVELAN" = "y" ]; then
define_bool CONFIG_PCMCIA_NETCARD y
fi
......
......@@ -13,22 +13,81 @@ O_OBJS :=
M_OBJS :=
MOD_LIST_NAME := PCMCIA_MODULES
#CFLAGS_3c575_cb.o = -DCARDBUS
#CFLAGS_tulip_cb.o = -DCARDBUS
ifeq ($(CONFIG_PCMCIA_3C589),y)
O_OBJS += 3c589_cs.o
else
ifeq ($(CONFIG_PCMCIA_3C589),m)
M_OBJS += 3c589_cs.o
endif
endif
ifeq ($(CONFIG_PCMCIA_3C574),y)
O_OBJS += 3c574_cs.o
else
ifeq ($(CONFIG_PCMCIA_3C574),m)
M_OBJS += 3c574_cs.o
endif
endif
ifeq ($(CONFIG_PCMCIA_FMVJ18X),y)
O_OBJS += fmvj18x_cs.o
else
ifeq ($(CONFIG_PCMCIA_FMVJ18X),m)
M_OBJS += fmvj18x_cs.o
endif
endif
ifeq ($(CONFIG_PCMCIA_NMCLAN),y)
O_OBJS += nmclan_cs.o
else
ifeq ($(CONFIG_PCMCIA_NMCLAN),m)
M_OBJS += nmclan_cs.o
endif
endif
ifeq ($(CONFIG_PCMCIA_PCNET),y)
O_OBJS += pcnet_cs.o
else
ifeq ($(CONFIG_PCMCIA_PCNET),m)
MX_OBJS += pcnet_cs.o
M_OBJS += pcnet_cs.o
endif
endif
ifeq ($(CONFIG_PCMCIA_3C589),y)
O_OBJS += 3c589_cs.o
ifeq ($(CONFIG_PCMCIA_SMC91C92),y)
O_OBJS += smc91c92_cs.o
else
ifeq ($(CONFIG_PCMCIA_3C589),m)
MX_OBJS += 3c589_cs.o
ifeq ($(CONFIG_PCMCIA_SMC91C92),m)
M_OBJS += smc91c92_cs.o
endif
endif
#ifeq ($(CONFIG_PCMCIA_3C575),y)
# O_OBJS += 3c575_cb.o
#else
# ifeq ($(CONFIG_PCMCIA_3C575),m)
# M_OBJS += 3c575_cb.o
# endif
#endif
#ifeq ($(CONFIG_PCMCIA_TULIP),y)
# O_OBJS += tulip_cb.o
#else
# ifeq ($(CONFIG_PCMCIA_TULIP),m)
# M_OBJS += tulip_cb.o
# endif
#endif
#ifeq ($(CONFIG_PCMCIA_EPIC100),y)
# O_OBJS += epic100_cb.o
#else
# ifeq ($(CONFIG_PCMCIA_EPIC100),m)
# M_OBJS += epic100_cb.o
# endif
#endif
ifeq ($(CONFIG_PCMCIA_RAYCS),y)
OX_OBJS += ray_cs.o
else
......@@ -37,4 +96,23 @@ else
endif
endif
ifeq ($(CONFIG_PCMCIA_NETWAVE),y)
OX_OBJS += netwave_cs.o
else
ifeq ($(CONFIG_PCMCIA_NETWAVE),m)
M_OBJS += netwave_cs.o
endif
endif
ifeq ($(CONFIG_PCMCIA_WAVELAN),y)
OX_OBJS += wavelan_cs.o
else
ifeq ($(CONFIG_PCMCIA_WAVELAN),m)
M_OBJS += wavelan_cs.o
endif
endif
include $(TOPDIR)/Rules.make
#epic100_cb.o: ../epic100.c
# $(CC) $(CFLAGS) -DCARDBUS -c -o $@ ../epic100.c
This diff is collapsed.
/*
* Definitions for Intel 82593 CSMA/CD Core LAN Controller
* The definitions are taken from the 1992 users manual with Intel
* order number 297125-001.
*
* /usr/src/pc/RCS/i82593.h,v 1.1 1996/07/17 15:23:12 root Exp
*
* Copyright 1994, Anders Klemets <klemets@it.kth.se>
*
* This software may be freely distributed for noncommercial purposes
* as long as this notice is retained.
*
* HISTORY
* i82593.h,v
* Revision 1.1 1996/07/17 15:23:12 root
* Initial revision
*
* Revision 1.3 1995/04/05 15:13:58 adj
* Initial alpha release
*
* Revision 1.2 1994/06/16 23:57:31 klemets
* Mirrored all the fields in the configuration block.
*
* Revision 1.1 1994/06/02 20:25:34 klemets
* Initial revision
*
*
*/
#ifndef _I82593_H
#define _I82593_H
/* Intel 82593 CSMA/CD Core LAN Controller */
/* Port 0 Command Register definitions */
/* Execution operations */
#define OP0_NOP 0 /* CHNL = 0 */
#define OP0_SWIT_TO_PORT_1 0 /* CHNL = 1 */
#define OP0_IA_SETUP 1
#define OP0_CONFIGURE 2
#define OP0_MC_SETUP 3
#define OP0_TRANSMIT 4
#define OP0_TDR 5
#define OP0_DUMP 6
#define OP0_DIAGNOSE 7
#define OP0_TRANSMIT_NO_CRC 9
#define OP0_RETRANSMIT 12
#define OP0_ABORT 13
/* Reception operations */
#define OP0_RCV_ENABLE 8
#define OP0_RCV_DISABLE 10
#define OP0_STOP_RCV 11
/* Status pointer control operations */
#define OP0_FIX_PTR 15 /* CHNL = 1 */
#define OP0_RLS_PTR 15 /* CHNL = 0 */
#define OP0_RESET 14
#define CR0_CHNL (1 << 4) /* 0=Channel 0, 1=Channel 1 */
#define CR0_STATUS_0 0x00
#define CR0_STATUS_1 0x20
#define CR0_STATUS_2 0x40
#define CR0_STATUS_3 0x60
#define CR0_INT_ACK (1 << 7) /* 0=No ack, 1=acknowledge */
/* Port 0 Status Register definitions */
#define SR0_NO_RESULT 0 /* dummy */
#define SR0_EVENT_MASK 0x0f
#define SR0_IA_SETUP_DONE 1
#define SR0_CONFIGURE_DONE 2
#define SR0_MC_SETUP_DONE 3
#define SR0_TRANSMIT_DONE 4
#define SR0_TDR_DONE 5
#define SR0_DUMP_DONE 6
#define SR0_DIAGNOSE_PASSED 7
#define SR0_TRANSMIT_NO_CRC_DONE 9
#define SR0_RETRANSMIT_DONE 12
#define SR0_EXECUTION_ABORTED 13
#define SR0_END_OF_FRAME 8
#define SR0_RECEPTION_ABORTED 10
#define SR0_DIAGNOSE_FAILED 15
#define SR0_STOP_REG_HIT 11
#define SR0_CHNL (1 << 4)
#define SR0_EXECUTION (1 << 5)
#define SR0_RECEPTION (1 << 6)
#define SR0_INTERRUPT (1 << 7)
#define SR0_BOTH_RX_TX (SR0_EXECUTION | SR0_RECEPTION)
#define SR3_EXEC_STATE_MASK 0x03
#define SR3_EXEC_IDLE 0
#define SR3_TX_ABORT_IN_PROGRESS 1
#define SR3_EXEC_ACTIVE 2
#define SR3_ABORT_IN_PROGRESS 3
#define SR3_EXEC_CHNL (1 << 2)
#define SR3_STP_ON_NO_RSRC (1 << 3)
#define SR3_RCVING_NO_RSRC (1 << 4)
#define SR3_RCV_STATE_MASK 0x60
#define SR3_RCV_IDLE 0x00
#define SR3_RCV_READY 0x20
#define SR3_RCV_ACTIVE 0x40
#define SR3_RCV_STOP_IN_PROG 0x60
#define SR3_RCV_CHNL (1 << 7)
/* Port 1 Command Register definitions */
#define OP1_NOP 0
#define OP1_SWIT_TO_PORT_0 1
#define OP1_INT_DISABLE 2
#define OP1_INT_ENABLE 3
#define OP1_SET_TS 5
#define OP1_RST_TS 7
#define OP1_POWER_DOWN 8
#define OP1_RESET_RING_MNGMT 11
#define OP1_RESET 14
#define OP1_SEL_RST 15
#define CR1_STATUS_4 0x00
#define CR1_STATUS_5 0x20
#define CR1_STATUS_6 0x40
#define CR1_STOP_REG_UPDATE (1 << 7)
/* Receive frame status bits */
#define RX_RCLD (1 << 0)
#define RX_IA_MATCH (1 << 1)
#define RX_NO_AD_MATCH (1 << 2)
#define RX_NO_SFD (1 << 3)
#define RX_SRT_FRM (1 << 7)
#define RX_OVRRUN (1 << 8)
#define RX_ALG_ERR (1 << 10)
#define RX_CRC_ERR (1 << 11)
#define RX_LEN_ERR (1 << 12)
#define RX_RCV_OK (1 << 13)
#define RX_TYP_LEN (1 << 15)
/* Transmit status bits */
#define TX_NCOL_MASK 0x0f
#define TX_FRTL (1 << 4)
#define TX_MAX_COL (1 << 5)
#define TX_HRT_BEAT (1 << 6)
#define TX_DEFER (1 << 7)
#define TX_UND_RUN (1 << 8)
#define TX_LOST_CTS (1 << 9)
#define TX_LOST_CRS (1 << 10)
#define TX_LTCOL (1 << 11)
#define TX_OK (1 << 13)
#define TX_COLL (1 << 15)
struct i82593_conf_block {
u_char fifo_limit : 4,
forgnesi : 1,
fifo_32 : 1,
d6mod : 1,
throttle_enb : 1;
u_char throttle : 6,
cntrxint : 1,
contin : 1;
u_char addr_len : 3,
acloc : 1,
preamb_len : 2,
loopback : 2;
u_char lin_prio : 3,
tbofstop : 1,
exp_prio : 3,
bof_met : 1;
u_char : 4,
ifrm_spc : 4;
u_char : 5,
slottim_low : 3;
u_char slottim_hi : 3,
: 1,
max_retr : 4;
u_char prmisc : 1,
bc_dis : 1,
: 1,
crs_1 : 1,
nocrc_ins : 1,
crc_1632 : 1,
: 1,
crs_cdt : 1;
u_char cs_filter : 3,
crs_src : 1,
cd_filter : 3,
: 1;
u_char : 2,
min_fr_len : 6;
u_char lng_typ : 1,
lng_fld : 1,
rxcrc_xf : 1,
artx : 1,
sarec : 1,
tx_jabber : 1, /* why is this called max_len in the manual? */
hash_1 : 1,
lbpkpol : 1;
u_char : 6,
fdx : 1,
: 1;
u_char dummy_6 : 6, /* supposed to be ones */
mult_ia : 1,
dis_bof : 1;
u_char dummy_1 : 1, /* supposed to be one */
tx_ifs_retrig : 2,
mc_all : 1,
rcv_mon : 2,
frag_acpt : 1,
tstrttrs : 1;
u_char fretx : 1,
runt_eop : 1,
hw_sw_pin : 1,
big_endn : 1,
syncrqs : 1,
sttlen : 1,
tx_eop : 1,
rx_eop : 1;
u_char rbuf_size : 5,
rcvstop : 1,
: 2;
};
#define I82593_MAX_MULTICAST_ADDRESSES 128 /* Hardware hashed filter */
#endif _I82593_H
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -11,7 +11,7 @@
Copyright (C) 1999 David A. Hinds -- dhinds@hyper.stanford.edu
pcnet_cs.c 1.99 1999/09/15 15:33:09
pcnet_cs.c 1.101 1999/10/21 00:56:19
The network driver code is based on Donald Becker's NE2000 code:
......@@ -72,7 +72,7 @@ static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static char *version =
"pcnet_cs.c 1.99 1999/09/15 15:33:09 (David Hinds)";
"pcnet_cs.c 1.101 1999/10/21 00:56:19 (David Hinds)";
#else
#define DEBUG(n, args...)
#endif
......@@ -477,7 +477,8 @@ static hw_info_t *get_prom(dev_link_t *link)
{
struct net_device *dev = link->priv;
unsigned char prom[32];
int i, j, ioaddr;
ioaddr_t ioaddr;
int i, j;
/* This is lifted straight from drivers/net/ne.c */
struct {
......@@ -851,7 +852,7 @@ static int pcnet_event(event_t event, int priority,
static void set_misc_reg(struct net_device *dev)
{
int nic_base = dev->base_addr;
ioaddr_t nic_base = dev->base_addr;
pcnet_dev_t *info = (pcnet_dev_t *)dev;
u_char tmp;
......@@ -889,7 +890,7 @@ static int pcnet_open(struct net_device *dev)
int i;
for (i = 0; i < 20; i++) {
if ((inb(dev->base_addr+0x1c) & 0x01) == 0) break;
current->state = TASK_INTERRUPTIBLE;
__set_current_state(TASK_UNINTERRUPTIBLE);
schedule_timeout(HZ/10);
}
}
......@@ -941,7 +942,7 @@ static int pcnet_close(struct net_device *dev)
static void pcnet_reset_8390(struct net_device *dev)
{
int nic_base = dev->base_addr;
ioaddr_t nic_base = dev->base_addr;
int i;
ei_status.txing = ei_status.dmaing = 0;
......@@ -996,7 +997,7 @@ static void ei_watchdog(u_long arg)
{
pcnet_dev_t *info = (pcnet_dev_t *)(arg);
struct net_device *dev = &info->dev;
int nic_base = dev->base_addr;
ioaddr_t nic_base = dev->base_addr;
if (dev->start == 0) goto reschedule;
......@@ -1027,7 +1028,7 @@ static void dma_get_8390_hdr(struct net_device *dev,
struct e8390_pkt_hdr *hdr,
int ring_page)
{
int nic_base = dev->base_addr;
ioaddr_t nic_base = dev->base_addr;
if (ei_status.dmaing) {
printk(KERN_NOTICE "%s: DMAing conflict in dma_block_input."
......@@ -1059,7 +1060,7 @@ static void dma_get_8390_hdr(struct net_device *dev,
static void dma_block_input(struct net_device *dev, int count,
struct sk_buff *skb, int ring_offset)
{
int nic_base = dev->base_addr;
ioaddr_t nic_base = dev->base_addr;
int xfer_count = count;
char *buf = skb->data;
......@@ -1116,7 +1117,7 @@ static void dma_block_output(struct net_device *dev, int count,
const unsigned char *buf,
const int start_page)
{
int nic_base = dev->base_addr;
ioaddr_t nic_base = dev->base_addr;
pcnet_dev_t *info = (pcnet_dev_t *)dev;
#ifdef PCMCIA_DEBUG
int retries = 0;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -2,13 +2,15 @@
# PCMCIA bus subsystem configuration
#
mainmenu_option next_comment
comment 'PCMCIA/Cardbus support'
comment 'PCMCIA/CardBus support'
tristate 'PCMCIA/Cardbus support' CONFIG_PCMCIA
tristate 'PCMCIA/CardBus support' CONFIG_PCMCIA
if [ "$CONFIG_PCMCIA" != "n" ]; then
if [ "$CONFIG_PCI" != "n" ]; then
bool ' CardBus support' CONFIG_CARDBUS
fi
bool ' i82365/Yenta compatible bridge support' CONFIG_I82365
bool ' Databook TCIC host bridge support' CONFIG_TCIC
fi
endmenu
......@@ -15,20 +15,34 @@ ALL_SUB_DIRS := $(SUB_DIRS)
MOD_LIST_NAME := PCMCIA_MODULES
ifeq ($(CONFIG_PCMCIA),y)
O_OBJS := i82365.o tcic.o cistpl.o rsrc_mgr.o bulkmem.o
O_OBJS := cistpl.o rsrc_mgr.o bulkmem.o
OX_OBJS := ds.o cs.o
O_TARGET := pcmcia.o
ifeq ($(CONFIG_I82365),y)
O_OBJS += i82365.o
endif
ifeq ($(CONFIG_TCIC),y)
O_OBJS += tcic.o
endif
ifeq ($(CONFIG_CARDBUS),y)
O_OBJS += cardbus.o
OX_OBJS += cb_enabler.o
endif
else
ifeq ($(CONFIG_PCMCIA),m)
M_OBJS := i82365.o tcic.o pcmcia_core.o
M_OBJS := pcmcia_core.o
MX_OBJS := ds.o
MIX_OBJS := cs.o
CORE_OBJS := cistpl.o rsrc_mgr.o bulkmem.o cs.o
ifeq ($(CONFIG_I82365),y)
M_OBJS += i82365.o
endif
ifeq ($(CONFIG_TCIC),y)
M_OBJS += tcic.o
endif
ifeq ($(CONFIG_CARDBUS),y)
CORE_OBJS += cardbus.o
MX_OBJS += cb_enabler.o
endif
endif
endif
......
......@@ -2,7 +2,7 @@
Cardbus device configuration
cardbus.c 1.59 1999/09/15 15:32:19
cardbus.c 1.61 1999/10/20 22:36:57
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
......@@ -325,9 +325,9 @@ int cb_alloc(socket_info_t *s)
pci_readl(bus, i, PCI_CLASS_REVISION, &c[i].dev.class);
c[i].dev.class >>= 8;
c[i].dev.hdr_type = hdr;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
pci_proc_attach_device(&c[i].dev);
#endif
#endif
}
return CS_SUCCESS;
......@@ -344,9 +344,9 @@ void cb_free(socket_info_t *s)
if (*p == &c[0].dev) break;
for (q = *p; q; q = q->next) {
if (q->bus != (*p)->bus) break;
#ifdef CONFIG_PROC_FS
#ifdef CONFIG_PROC_FS
pci_proc_detach_device(q);
#endif
#endif
}
if (*p) *p = q;
s->cap.cb_bus->devices = NULL;
......@@ -496,7 +496,8 @@ int cb_config(socket_info_t *s)
s->irq.AssignedIRQ = irq;
}
}
c[0].dev.irq = irq;
for (i = 0; i < fn; i++)
c[i].dev.irq = irq;
return CS_SUCCESS;
......
......@@ -2,7 +2,7 @@
Cardbus device enabler
cb_enabler.c 1.23 1999/09/15 15:32:19
cb_enabler.c 1.24 1999/10/20 00:19:09
The contents of this file are subject to the Mozilla Public
License Version 1.1 (the "License"); you may not use this file
......@@ -58,7 +58,7 @@ static int pc_debug = PCMCIA_DEBUG;
MODULE_PARM(pc_debug, "i");
#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args)
static char *version =
"cb_enabler.c 1.23 1999/09/15 15:32:19 (David Hinds)";
"cb_enabler.c 1.24 1999/10/20 00:19:09 (David Hinds)";
#else
#define DEBUG(n, args...) do { } while (0)
#endif
......@@ -372,6 +372,9 @@ void unregister_driver(struct driver_operations *ops)
/*====================================================================*/
EXPORT_SYMBOL(register_driver);
EXPORT_SYMBOL(unregister_driver);
static int __init init_cb_enabler(void)
{
servinfo_t serv;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -30,10 +30,4 @@
#ifndef _RSRC_MGR_H
#define _RSRC_MGR_H
#ifdef __BEOS__
int check_resource(int type, u_long base, u_long num);
int register_resource(int type, u_long base, u_long num);
int release_resource(int type, u_long base, u_long num);
#endif
#endif /* _RSRC_MGR_H */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment