Commit ed78e24b authored by Russell King's avatar Russell King

Merge flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk-patchtest

into flint.arm.linux.org.uk:/usr/src/linux-bk-2.5/linux-2.5-rmk
parents 58f8394b eed3ac83
......@@ -75,6 +75,7 @@ sa1100_cs-objs-$(CONFIG_SA1100_H3600) += sa1100_h3600.o
sa1100_cs-objs-$(CONFIG_SA1100_JORNADA720) += sa1100_jornada720.o sa1111_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_PANGOLIN) += sa1100_pangolin.o
sa1100_cs-objs-$(CONFIG_SA1100_PFS168) += sa1100_pfs168.o sa1111_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_PT_SYSTEM3) += sa1100_system3.o sa1111_generic.o
sa1100_cs-objs-$(CONFIG_SA1100_SHANNON) += sa1100_shannon.o
sa1100_cs-objs-$(CONFIG_SA1100_SIMPAD) += sa1100_simpad.o
sa1100_cs-objs-$(CONFIG_SA1100_STORK) += sa1100_stork.o
......
......@@ -234,6 +234,9 @@ extern void pcmcia_simpad_exit(void);
extern int pcmcia_stork_init(void);
extern void pcmcia_stork_exit(void);
extern int pcmcia_system3_init(void);
extern void pcmcia_system3_exit(void);
extern int pcmcia_xp860_init(void);
extern void pcmcia_xp860_exit(void);
......
......@@ -1154,6 +1154,9 @@ static int __init sa1100_pcmcia_init(void)
#ifdef CONFIG_SA1100_PFS168
pcmcia_pfs_init();
#endif
#ifdef CONFIG_SA1100_PT_SYSTEM3
pcmcia_system3_init();
#endif
#ifdef CONFIG_SA1100_SHANNON
pcmcia_shannon_init();
#endif
......@@ -1169,6 +1172,7 @@ static int __init sa1100_pcmcia_init(void)
#ifdef CONFIG_SA1100_YOPY
pcmcia_yopy_init();
#endif
return 0;
}
......
/*
* drivers/pcmcia/sa1100_system3.c
*
* PT Diagital Board PCMCIA specific routines
*
* Copyright (C) 2001 Stefan Eletzhofer <stefan.eletzhofer@eletztrick.de>
*
* $Id: sa1100_system3.c,v 1.1.4.2 2002/02/25 13:56:45 seletz Exp $
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* $Log: sa1100_system3.c,v $
* Revision 1.1.4.2 2002/02/25 13:56:45 seletz
* - more cleanups
* - setup interrupts for CF card only ATM
*
* Revision 1.1.4.1 2002/02/14 02:23:27 seletz
* - 2.5.2-rmk6 PCMCIA changes
*
* Revision 1.1.2.1 2002/02/13 23:49:33 seletz
* - added from 2.4.16-rmk2
* - cleanups
*
*
*/
#include <linux/kernel.h>
#include <linux/sched.h>
#include <linux/init.h>
#include <linux/ioport.h>
#include <asm/hardware.h>
#include <asm/irq.h>
#include <asm/hardware/sa1111.h>
#include "sa1100_generic.h"
#include "sa1111_generic.h"
#define DEBUG 0
#ifdef DEBUG
# define DPRINTK( x, args... ) printk( "%s: line %d: "x, __FUNCTION__, __LINE__, ## args );
#else
# define DPRINTK( x, args... ) /* nix */
#endif
int system3_pcmcia_init(struct pcmcia_init *init)
{
/* Don't need no CD and BVD* interrupts */
return 2;
}
int system3_pcmcia_shutdown(void)
{
return 0;
}
int system3_pcmcia_configure_socket(const struct pcmcia_configure *conf)
{
if (!conf)
return -1;
/* only CF ATM */
if (conf->sock == 0)
return -1;
return sa1111_pcmcia_configure_socket( conf );
}
static int system3_pcmcia_socket_state(struct pcmcia_state_array
*state)
{
unsigned long status = 0;
if(state->size<2) return -1;
memset(state->state, 0,
(state->size)*sizeof(struct pcmcia_state));
status=PCSR;
#if 0 /* PCMCIA socket not yet connected */
state->state[0].detect = status & PCSR_S0_DETECT ? 0 : 1;
state->state[0].ready = status & PCSR_S0_READY ? 1 : 0;
state->state[0].bvd1 = status & PCSR_S0_BVD1 ? 1 : 0;
state->state[0].bvd2 = 1;
state->state[0].wrprot = status & PCSR_S0_WP ? 1 : 0;
state->state[0].vs_3v = 1;
state->state[0].vs_Xv = 0;
#endif
state->state[1].detect = status & PCSR_S1_DETECT ? 0 : 1;
state->state[1].ready = status & PCSR_S1_READY ? 1 : 0;
state->state[1].bvd1 = status & PCSR_S1_BVD1 ? 1 : 0;
state->state[1].bvd2 = 1;
state->state[1].wrprot = status & PCSR_S1_WP ? 1 : 0;
state->state[1].vs_3v = 1;
state->state[1].vs_Xv = 0;
DPRINTK( "PCSR=0x%08lx, S1_RDY_nIREQ=%d\n", status,
state->state[1].ready );
return 1;
}
struct pcmcia_low_level system3_pcmcia_ops = {
init: system3_pcmcia_init,
shutdown: system3_pcmcia_shutdown,
socket_state: system3_pcmcia_socket_state,
get_irq_info: sa1111_pcmcia_get_irq_info,
configure_socket: system3_pcmcia_configure_socket,
socket_init: sa1111_pcmcia_socket_init,
socket_suspend: sa1111_pcmcia_socket_suspend,
};
int __init pcmcia_system3_init(void)
{
int ret = -ENODEV;
if (machine_is_pt_system3())
ret = sa1100_register_pcmcia(&system3_pcmcia_ops);
return ret;
}
void __exit pcmcia_system3_exit(void)
{
sa1100_unregister_pcmcia(&system3_pcmcia_ops);
}
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