linux/drivers/pcmcia/pxa2xx_balloon3.c
<<
>>
Prefs
   1/*
   2 * linux/drivers/pcmcia/pxa2xx_balloon3.c
   3 *
   4 * Balloon3 PCMCIA specific routines.
   5 *
   6 *  Author:     Nick Bane
   7 *  Created:    June, 2006
   8 *  Copyright:  Toby Churchill Ltd
   9 *  Derived from pxa2xx_mainstone.c, by Nico Pitre
  10 *
  11 * Various modification by Marek Vasut <marek.vasut@gmail.com>
  12 *
  13 * This program is free software; you can redistribute it and/or modify
  14 * it under the terms of the GNU General Public License version 2 as
  15 * published by the Free Software Foundation.
  16 */
  17
  18#include <linux/module.h>
  19#include <linux/gpio.h>
  20#include <linux/errno.h>
  21#include <linux/interrupt.h>
  22#include <linux/platform_device.h>
  23#include <linux/irq.h>
  24#include <linux/io.h>
  25
  26#include <mach/balloon3.h>
  27
  28#include <asm/mach-types.h>
  29
  30#include "soc_common.h"
  31
  32static int balloon3_pcmcia_hw_init(struct soc_pcmcia_socket *skt)
  33{
  34        uint16_t ver;
  35
  36        ver = __raw_readw(BALLOON3_FPGA_VER);
  37        if (ver < 0x4f08)
  38                pr_warn("The FPGA code, version 0x%04x, is too old. "
  39                        "PCMCIA/CF support might be broken in this version!",
  40                        ver);
  41
  42        skt->socket.pci_irq = BALLOON3_BP_CF_NRDY_IRQ;
  43        skt->stat[SOC_STAT_CD].gpio = BALLOON3_GPIO_S0_CD"/a>;
SOC_STAT_CD].BALLOON3_GPIO_S0_CD"/a>;
  42        skt->SOC_STAT_CD].ver;
BALLOON3_GPIO_S0_CD"/a>;
SOC_STAT_CD].__raw_readw4/a>(<4 href="include/mach/balloon3.h" class="fref">mach4 id="L374 class="line" name="L374>  374/a>        ifa/pxa2x0_CD" class="sref">SOC_STAT_CD].4r_warn(&qu}
&50href="include/mach/balloon3.h" class="fref">mach5id="L40"5class="line" name="L40"5  40<51ia/pxa2xx_bunsigned longoon3.c#L31" id="L31" class="linexa2xuslslslslG u	  >
L31" class="linexa2xus2xx_b2]7.3oc_pcmcia_socket *);
  39       5lass="sr5f">pci_irq =   39       5ode=gpio5 class="sref">gpio 5 SOC_STAT_CD].uint16_t   32static int   39       5_readw" 5lass="sref">__raw_readw5/a>(<5 href="+code=============================xx_balloon3.c#L32" id=s="linexa2xslslslslG u	  >
s="linexa2xssoc_pcmcia_socket *5r_warn(  33{
SOC_STAT_CD].&6uot;PCMCIA/CFalloon3.c#L31" id="fliplslslslG u	  >
flip2xx__CD" class="sref">SOC_STAT_CD].  39       6s="sref"6ver);
pci_irq = 
xa2xus2xx_="L35">  35
,
gpio 6 
xa2xus2xx_=^oon3.c#L31" id="L31" class="linexa2xuslslslslG u	  >
L31" class="linexa2xus2xx_blloon3.c#L35" iD" class="sref">BALLOON3_GPIO_S0_CD"/a>;
,
]__raw_readw6/a>(<6ame="L6">   6'drivedey the Free Software Foundation.
   76r_warn(
&7="comment"> *  Derived from ssssssss*by the Free Software Foundation.

flip2xx_)3oc_pcmcia_socket *);
BALLOON3_GPIO_S0_CD"/a>;
,
]="L35">  35

xa2xus2xx__CD" class="sref">SOC_STAT_CD].pci_irq = 
xa2xus2xx_=&P_CF_NRDY_IRQ" c;gpio 7 skt->skt->  39       7="sref">7r_warn(
xa2xs;

loony=BALLOON= !!LOON3_FPGA_VER" la2xuslslslslG u	  >
xa2xus2xx_=&P_CF_NRDY_IRQ" c;skt->&80=BALLOON3_BP_CF_NRDY_IRQ" cna2xslslslslG u	  >
xa2xs;

xa2xus2xx_=&P_CF_NRDY_IRQ" c;
xa2xs;
);

xa2xs;
pci_irq = 
xa2xs;
gpio 8 &qu}
uint16_t   L31" class="lineconfigures="line/pxa2xx_balloon3.c#L32" id="L32" class="line" name="L32">  32static int   39       8balloon38.c#L6" id="L6" class="l8/a>(<8 href="+code================================conslloon3.c#L32" id="L3xx_exa2xs class="line" nam"L3xx_exa2xs csoc_pcmcia_socket *8r_warn(
&9uot;PCMCIA/CF support might b(LOON3_FPGA_VER" la2xslslslslG u	  >
xa2xs;

flags2xx_=&P_CF_NRDY_IRQ" cSSeRESET hexa2xx_ballooSSeRESET2xx_)3?an>
  36        );
SOC_STAT_CD].pci_irq = gpio 9 uint16_t 
s="linelow_level  33{
 *  35
  39       9balloon39.c#L6" id="L6" class="l9/a>(<97href="+code=9" class="lslsls" name="L31">  31
/pcmcia/pxaCIA/CF support m"L35">  35
  31
  39       9alloon3.9c#L7" id="L7" class="li9>  3798href="+code=9" class="lslslsxa2xx_exa2xslslslslG u	  >
xa2xx_exa2xs/pxaF support m"L35">  35
  39       9c#L8" id=="L8" class="line" name=strin99href="+code=9" class="lslslsconfigures="line" name="L32">  configures="line/pxapport m"L35">  35
  L31" class="lineconfigures="line/pxa"L39" class="line" name="L39">  39       10ss="line"  name="L9">   9n nhref="+code=9" class="lslslsfirse" name="L32">  firseot;PCMCIA/CF support m"L0"L39" class="line" name="L39">  39       10vers/pcmc0ia/pxa2xx_balloon3.c#L1001g">n 1href="+code=9" class="lslslsnversion!",
IA/CF support might b= 1"L39" class="line" name="L39">  39       10">  11 02g">n 2f="+}_CD" class="sref">SOC_STAT_CD].n 3class="sref">uint16_t  * T04g">n 4ia/pxa2xx_bxx_balloon3.c#L32" id=sivers/pcmcia/plslslslG u	  >
sivers/pcmcia/pSOC_STAT_CD].  14 05g">n  class="sref">uint16_t   1506g">n 6ia/pxa2xx_balloon3.c#L31" id="_name="L31">  31
_cmcia/pxaCf="+code=ballooL31" class="lineame="L31">  31
n 7f">soc_pcmcia_socket * 0*/
n 8href="+code=alloon3.c#L31" id="rne" name="L32">  rne/pxa_CD" class="sref">SOC_STAT_CD].  18#includ09g">n clude/asm-xtensa/mach-types.h" class="falt">asm/m1ass="line"" name="L9">   9a" name="L32">  ch-t   _is="falt">a/pxa2)n11ot;PCMCIA/CF supporta/pxa2x-on3.c#L31" id="ENODEV" name="L32">  ENODEV/pxa_CD" class="sref">SOC_STAT_CD].  11  * Va1ious mCD" class="sref">SOC_STAT_CD].  35

sivers/pcmcia/p_31" c.c#L36/option626/pco="sr" class=_CD * TThis 114ot;PCMCIA/CFaf (!on3.c#L31" id="L31" class="linemcia/plslslslG u	  >
L31" class="linemcia/p2xx_  14  * it115href="+code=========a/pxa2x-on3.c#L31" id="ENOMEM" name="L32">  ENOMEM/pxa_CD" class="sref">SOC_STAT_CD].  15>SOC_STAT_CD].  rne/pxam"L35">  35

sivers/pcmcia/p_3dd_data.c#L36" id="L36" claL31" class="linemcia/plslslslG u	  >
L31" class="linemcia/p2xx_"L39" class="line" name="L39">  39       1comment">  */
  18#includde &l11clude/asm-xtensa/mach-types.h" class="falt">asm/m1lass="lin1e" name="L19">  19#i1nclud12uot;PCMCIA/CFaf (!on3.c#L31" id="rne" name="L32">  rne/pxa  20#inc1lude 121ot;PCMCIA/CF support_CF_NRDY_IRQ" crne" name="L32">  rne/pxam"L35">  35

sivers/pcmcia/p_3dd.c#L36" id="L36" claL31" class="linemcia/plslslslG u	  >
L31" class="linemcia/p2xx_  21#include <1;SOC_STAT_CD].  rne/pxa  231#incl124href="+code=========35">  35
  sivers/pcmcia/p_pue.c#L36" id="L36" claL31" class="linemcia/plslslslG u	  >
L31" class="linemcia/p2xx_  14  24#in1lude <linux/io1.h>
  rne/pxa_CD" class="sref">SOC_STAT_CD].  26#include1 <1a href}
  39       1pes.h|inc1lude/asm-x86_64/mach-typ1es.h|1ncludexa2xx_bvoidoon3.c#L31" id="__exe="L31">  31
_cexe=/pxaCf="+code=ballooL31" class="lineexe="L31">  31
L31" class="lineexe=/pxa2void *  30#include &quo1t;  sivers/pcmcia/p_unlogister.c#L36" id="L36" claL31" class="linemcia/plslslslG u	  >
L31" class="linemcia/p2xx_"
uint16_t skt)
  31
c hrefeame=.c#L36" id="L36" claL31" class="lineame="L31">  31
  14  31
c hrefeexe=.c#L36" id="L36" claL31" class="lineexe="L31">  31
L31" class="lineexe=/pxaver;
SOC_STAT_CD].__raw_readw1(1a href6" id="L36" claMODULE_LICENSEersion!"  31  6" id="L36" claMODULE_AUTHOL36">  36   MODULE_AUTHOL.c#L36/option626/pco="sr" class=an class=A_VERnn c@cecompent"g.co.uk
(&qu6" id="L36" claMODULE_ALIAS36">  36   MODULE_ALIAS.c#L36/option626/pco="sr" class=_ivers/p:_CD1quot;P6" id="L36" claMODULE_DESCRIPTION36">  36   MODULE_DESCRIPTION.c#L36/option626/pco="sr" class=Boon3.c# bonrd CF/>  401/a>   
xx_boriginal LXRcomment">c Licenshref="drihttp://sourcftorge.net/projects/lxr">LXRc" iduciay2xx_, pxa2xexperid="3al 38" id=" Lihref="drirs/pto:lxr@l/a>&.no">lxr@l/a>&.no2xx_.
_lookup valuss="linsubfooter">
lxr.l/a>&.no kindly hosted" Lihref="drihttp://www.redpill-l/apro.no">Redpill L/apro AS.c#L,/a>