linux/drivers/spi/spi-bcm63xx.c
<<
>>
Prefs
   1/*
   2 * Broadcom BCM63xx SPI controller support
   3 *
   4 * Copyright (C) 2009-2012 Florian Fainelli <florian@openwrt.org>
   5 * Copyright (C) 2010 Tanguy Bouzeloc <tanguy.bouzeloc@efixo.com>
   6 *
   7 * This program is free software; you can redistribute it and/or
   8 * modify it under the terms of the GNU General Public License
   9 * as published by the Free Software Foundation; either version 2
  10 * of the License, or (at your option) any later version.
  11 *
  12 * This program is distributed in the hope that it will be useful,
  13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
  14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15 * GNU General Public License for more details.
  16 *
  17 * You should have received a copy of the GNU General Public License
  18 * along with this program; if not, write to the
  19 * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  20 */
  21
  22#include <linux/kernel.h>
  23#include <linux/init.h>
  24#include <linux/clk.h>
  25#include <linux/io.h>
  26#include <linux/module.h>
  27#include <linux/platform_device.h>
  28#include <linux/delay.h>
  29#include <linux/interrupt.h>
  30#include <linux/spi/spi.h>
  31#include <linux/completion.h>
  32#include <linux/err.h>
  33#include <linux/workqueue.h>
  34#include <linux/pm_runtime.h>
  35
  36#include <bcm63xx_dev_spi.h>
  37
  38#define PFX             KBUILD_MODNAME
  39#define DRV_VER         "0.1.2"
  40
  41struct bcm63xx_spi {
  42        struct completion       done;
  43
  44        void __iomem            *regs;
  45        int                     irq;
  46
  47        /* Platform data */
  48        u32                     speed_hz;
  49        unsigned                fifo_size;
  50        unsigned int            msg_type_shift;
  51        unsigned int            msg_ctl_width;
  52
  53        /* Data buffers */
  54        const unsigned char     *tx_ptr;
  55        unsigned char           *rx_ptr;
  56
  57        /* data iomem */
  58        u8 __iomem              *tx_io;
  59        const u8 __iomem        *rx_io;
  60
  61        int                     remaining_bytes;
  62
  63        struct clk              *clk;
  64        struct platform_device  *pdev;
  65};
  66
  67static inline u8 bcm_spi_readb(struct bcm63xx_spi *bs,
  68                                unsigned int offset)
  69{
  70        return bcm_readb(bs->regs + bcm63xx_spireg(offset));
  71}
  72
  73static inline u16 bcm_spi_readw(struct bcm63xx_spi *bs,
  74                                unsigned int offset)
  75{
  76        return bcm_readw(bs->regs + bcm63xx_spireg(offset));
  77}
  78
  79static inline void bcm_spi_writeb(struct bcm63xx_spi *bs,
  80                                  u8 value, unsigned int offset)
  81{
  82        bcm_writeb(value, bs->regs + bcm63xx_spireg(offset));
  83}
  84
  85static inline void bcm_spi_writew(struct bcm63xx_spi *bs,
  86                                  u16 value, unsigned int offset)
  87{
  88        bcm_writew(value, bs->regs + bcm63xx_spireg(offset));
  89}
  90
  91static const unsigned bcm63xx_spi_freq_table[SPI_CLK_MASK][2] = {
  92        { 20000000, SPI_CLK_20MHZ },
  93        { 12500000, SPI_CLK_12_50MHZ },
  94        {  6250000, SPI_CLK_6_250MHZ },
  95        {  3125000, SPI_CLK_3_125MHZ },
  96        {  1563000, SPI_CLK_1_563MHZ },
  97        {   781000, SPI_CLK_0_781MHZ },
  98        {   391000, SPI_CLK_0_391MHZ }
  99};
 100
 101static int bcm63xx_spi_check_transfer(struct spi_device *spi,
 102                                        struct spi_transfer *t)
 103{
 104        u8 bits_per_word;
 105
 106        bits_per_word = (t) ? t->bits_per_word : spi->bits_per_word;
 107        if (bits_per_word != 8) {
 108                dev_err(&spi->dev, "%s, unsupported bits_per_word=%d\n",
 109                        __func__, bits_per_word);
 110                return -EINVAL;
 111        }
 112
 113        if (spi->chip_select > spi->master->num_chipselect) {
 114                dev_err(&spi->dev, "%s, unsupported slave %d\n",
 115                        __func__, spi->chip_select);
 116                return -EINVAL;
 117        }
 118
 119        return 0;
 120}
 121
 122static void bcm63xx_spi_setup_transfer(struct spi_device *spi,
 123                                      struct spi_transfer *t)
 124{
 125        struct bcm63xx_spi *bs = spi_master_get_devdata(spi->master);
 126        u32 hz;
 127        u8 clk_cfg, reg;
 128        int i;
 129
 130        hz = (t) ? t->speed_hz : spi->max_speed_hz;
 131
 132        /* Find the closest clock configuration */
 133        for (i = 0; i < SPI_CLK_MASK; i++) {
 134                if (hz >= bcm63xx_spi_freq_table[i][0]) {
 135                        clk_cfg = bcm63xx_spi_freq_table[i][1];
 136                        break;
 137                }
 138        }
 139
 140        /* No matching configuration found, default to lowest */
 141        if (i == SPI_CLK_MASK)
 142                clk_cfg = SPI_CLK_0_391MHZ;
 143
 144        /* clear existing clock configuration bits of the register */
 145        reg = bcm_spi_readb(bs, SPI_CLK_CFG);
 146        reg &= ~SPI_CLK_MASK;
 147        reg |= clk_cfg;
 148
 149        bcm_spi_writeb(bs, reg, SPI_CLK_CFG);
 150        dev_dbg(&spi->dev, "Setting clock register to %02x (hz %d)\n",
 151                clk_cfg, hz);
 152}
 153
 154/* the spi->mode bits understood by this driver: */
 155#define MODEBITS (SPI_CPOL | SPI_CPHA)
 156
 157static int bcm63xx_spi_setup(struct spi_device *spi)
 158{
 159        struct bcm63xx_spi *bs;
 160        int ret;
 161
 162        bs = spi_master_get_devdata(spi->master);
 163
 164        if (!spi->bits_per_word)
 165                spi->bits_per_word = 8;
 166
 167        if (spi->mode & ~MODEBITS) {
 168                dev_err(&spi->dev, "%s, unsupported mode bits %x\n",
 169                        __func__, spi->mode & ~MODEBITS);
 170                return -EINVAL;
 171        }
 172
 173        ret = bcm63xx_spi_check_transfer(spi, NULL);
 174        if (ret < 0) {
 175                dev_err(&spi->dev, "setup: unsupported mode bits %x\n",
 176                        spi->mode & ~MODEBITS);
 177                return ret;
 178        }
 179
 180        dev_dbg(&spi->dev, "%s, mode %d, %u bits/w, %u nsec/bit\n",
 181                __func__, spi->mode & MODEBITS, spi->bits_per_word, 0);
 182
 183        return 0;
 184}
 185
 186/* Fill the TX FIFO with as many bytes as possible */
 187static void bcm63xx_spi_fill_tx_fifo(struct bcm63xx_spi *bs)
 188{
 189        u8 size;
 190
 191        /* Fill the Tx FIFO with as many bytes as possible */
 192        size = bs->remaining_bytes < bs->fifo_size ? bs->remaining_bytes :
 193                bs->fifo_size;
 194        memcpy_toio(bs->tx_io, bs->tx_ptr, size);
 195        bs->remaining_bytes -= size;
 196}
 197
 198static unsigned int bcm63xx_txrx_bufs(struct spi_device *spi,
 199                                        struct spi_transfer *t)
 200{
 201        struct bcm63xx_spi *bs = spi_master_get_devdata(spi->master);
 202        u16 msg_ctl;
 203        u16 cmd;
 204
 205        /* Disable the CMD_DONE interrupt */
 206        bcm_spi_writeb(bs, 0, SPI_INT_MASK);
 207
 208        dev_dbg(&spi->dev, "txrx: tx %p, rx %p, len %d\n",
 209                t->tx_buf, t->rx_buf, t->len);
 210
 211        /* Transmit4 Tms   omme5bid mo
 1121/a>        bs =gt;tx_ptr,  t->tx_buf,  1121/a>        bs->rx_ptr;
 t->rx_buf,  1121/a>
 112           (t->tx_buf, {
 112                re href="+code=bs" class="sref">bs->remaining_bytes -=t->len); 1121/a>                re href="+code=bcm63xx_spi_fill_tx_fifo" class="sref">bcm63xx_spi_fill_tx_fifo(st href="+code=bs" class="sref">bs)
< 1121/a>        }
 1121/a>
 1222/a>        coingt_mpletion" a>(&bs->spdon a>)
< 122
 1222/a>        /* Findllommhe CMMessageonfitrolegister */
 1222/a>        msg_ctl;
 (t) gt;len);lt; SPI_INBYTE_C_MASHIFTa>)
< 1222/a>
 1222/a>           (t->rx_buf, amp; t->tx_buf, {a href="drivers/spi/spi-bcm63xx.c#L205" id="L112" class="line" name="L122"> 1222/a>                re href="+code=bsg_ctl" class="sref">msg_ctl;
 |(SPI_INFD_RWa>);lt; bs->t)
< 122        t->rx_buf, {a href="drivers/spi/spi-bcm63xx.c#L205" id="L208" class="line" name="L122"> 1222/a>                msg_ctl;
 |(SPI_INHD_Ra>);lt; bs->t)
< 1222sref">rx_buf 163
 1222sref"c#Lx=]ref="0
2  hz = () ? 2a href="+code=t" class="2ref">2->t<_buft->max_spee2_hz;
 204
t)
< 1222sref"c#Lx=+code=u1gi++) {
 135                 2i][0]2 {
 = clk_cfg =  204
t)
< 1222sref"c#Lx=f="+code=63xx_spi_freq_table[2a hre23ref="+code=reg_cttypeline" name="L135"> 135                 2i3xx.c#L2063xx.c#L136" id="L136" c2ass="23L122"> 1222/aref">len);t-> 138        }
t->bs->      2 /2 No m24ef">len);
tx_buf, {
ref">i 1222/a>    1MD_PREPEND     /* Find1MD_PREPEND      1222sref"c#Lxivers/spi2spi-bcm63xx.c#L142" id="2142" 24e=remaining_bytes" class="sra href="drivers/spi/spi-brdrivef="+code=bs" class="sref">bs, 0,  1222/a>    1MD_DEVICE_IDn class="comment">/* Find1MD_DEVICE_IDn clas+#2spi/spi-bcm63xx.c#L129" 2"> 1222sref"c#Lxi+code=u1g_0_391MHZ;
 204
/* Find1MD+#2spi/spi-bcm63xx.c#L129" 2"> 1222sref"c#Lxi][0]2vers/spi/spi-bcm63xx.c#L245" i24r_word" class="sref">bits_per_word)
bs, <2 href2"+code=SPI_CLK_ss="sref">t-> 203         href="+c2de=reg" class="sref">reg2/a> &24                        204
 205        /* Disableef">SPI_C2K_MASK;
 1121/a>                re href="+href="dri2ers/spi/spi-bcm63xx.c#L129" id2"L149" class="cm63xx.c#L176" id="L1722
 1121/a>
/* Disablexx.c#L1502 id="L150" class="line" 2ame="2150"> ref">len);dev&2uot;S25f="+code=spi" class="sref">spi->,
 198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L201ode=spi" class="sref">spi->                spi,
 1522/a>}
25" name="L123"> 123                                      struct spi_transfer *t)
 2e bits un2erstood by this driver: 2/
SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_I1" id="L201" class="line" name="L201"> 2ehref="+c2156"> 156
 157static int <2 href2"+code=bcm63xxcode=MODEBITS" class="sref">MODEBITS, spi)22159        struct bcm63xx_spi * 198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L201ode=spi" class="sref">spi->spi,
bs =2spi_transfer *t)
s2i->
SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_I1" id="L201" class="line" name="L201"> 2href="dri2ers/spi/spi-bcm63xx.c#L125" id26"drivers/spi/spi-bcm63xx.c#L206" id="L206" 66" id="L266" class="line" name="L266"> 266
MODEBITS,  name="L28" id="L168" class="line2 name2"L168"L117" id="L117" class="line" name="L112s/spi/spi2bcm63xx.c#L169" id="L1692 clas27ode=t" class="sref">t->spi->2a hre27 {   391000,  1121/a>    _CLK_0_391MHspi/spi-_L11 name98"> 198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L20="L207"> 207
MODEBI2S27101" id="L101" class="line" name="L101"> 101static int coiners/spi/spi-bcmigne=">coins="licode=spi_transfe=ers/spi/spi-bcm6#L201ode=spi" class="sref">spi->2170spi,
spi_transfer *t)
,
bcm63x2_spi_27" name="L123"> 123             91MHspi/spi-">t)
bcm63xx_txrx_bufs(st" id="L201" ca>,
s275" id="L175" class="lin2" nam2="L175"> 175 196}
,
s3910u"m63xnsfDEBITS" class="sref">MODEBITS, spi->2MODEBITS, );
                returlist_for_each_entry22" id="L122" clist_for_each_entry63xx.c#L124" id="L1263xx_txrx_bufs(st, f="drivers/spi/spi-b=ers/spi/spi-bcm6#L20href="+code=i" classx_txrx_b" class="sref">sx_txrx_b"spi/sp_shif class="srspi/spi-_list class="sref">sx_txrx_b_list="sref">t->        remaining_bytes -=  112           (t->tx_buf, {
_func__" 2lass="sref">__func__2 bcm63xx_spi_fill_tx_fifo(struct rx_taig_cttype_shif a>rx_taig="+code=tx_buf" class="sref">tx_buf, {
_="L170" 2=mode" class="sref">mode2/a> &28s="line" name="L162"> 162        spis3910u"m63xnsfhref="+code=SPI_CLK_0_391MHivers/spi/spi-bcm63xx.c#L171" id="L171" class="line" name="L171"> 171        }
tx_buf, {
_52" clas2, 0);
 1910u" class="sref">s3910u"m63xns="srefde=tx_buf" class="sref">tx_buf, {
_"sref">s2> 182
 175              gotopi/spi-bcm63xx.cexi63xx_txrx_bufstx_buf, {
_ref="dri2s="line" name="L184"> 182}28"drivers/spi/spi-bcm63xx.c#L206" id="L206" /
2a href="drivers/spi/spi-2cm63x28ref="+code=reg_cttype_e="L142"> 142        e=clk_ce adap>(&aivera newlx_txrx_bamp;bs-><187st2tic void  208         119        return 0;
 171        }
tx_buf, {
"+code=bs2 class="sref">bs)
 188{
<2 href29180         ref="drivers/spi/spi-bcm63f">t->size;
<2 href29101" id="L101" class="line" n_e="L142"> 142       sesref">s-bcmamp;bs->bsrem208        size;
 171        }
tx_buf, {
"f="+code2="sref">bs-> 1222/a>              2         
)
<<_timeou2a href="drivers/spi/spi-bcm63xx.c#L210" id="L208" class="line" name="L112"> 1121/a>        }
tx_buf, {
""sref">s2+code=size" class="sref"2size<29"L175"> 175              aster_get_devdata" ctimeou22
t->        s3910u"m63xnsf                 TIMEDOUss="comment">/*  TIMEDOUs="+code=tx_buf" class="sref">tx_buf, {
s->2tx_buf, {
L197"> 192
spi3device *          e="L142"> 142       " id ou2 alls-bcmamp;bs->301   3    struct (struct rx_taig_cttype_shif a>rx_taig="+cL143"> 143
 144        tx_buf, {3get_devda3a( 162          e="L142"> 142       R id ou2 allsf">s-bcmamp;bs->3g_ctl" cl3ss="sref">msg_ctl;
<3 href30spi-bcm63xx.c#L134" i208 173"> 173       x_taig_cttype_shif a>rx_taig="+cfde=tx_buf" class="sref">tx_buf, {3u16 <3 href="+code=cmd" class=3sref"30"L175"> 175              "line" n_fo(struct  :
 144   2"> 1121/a>        href="+code=bs" class="sref">bs->rx_taig="+cfode=tx_buf" class="sref">tx_buf, {3g76 <3 class="line" name="L1953a hre30>clk_cfg =  206 3     30p;= ~ 208        actual_lasgthame="+ame="L112"> 112           (t->tx_buf, {3"L209"> 239                tx_buf,3 = t-3gt;len);
s3910u"m63xnsfhref="+code=SPI=910u" class="sref">s3910u"m63xode=tx_buf" class="sref">tx_buf, {3"et_devda3mo
  om">coiners/spi/spi-bcmignef"nalize_curr>  om">coin63xx.c#L124" id="L12="drivers/spi/spi-bcm63xx.c#L201" id="L201" ca>,
t3_buf, MODEBITS, 3x_buf, t->t->hz  (bs->3bcm63xx.c3L210" id="L207" class="l3ne" n3me="L1ass="sref">t->< *line" name=ssf">sonlye="L203"> 2we cace abou2m6a href="+code=sp" class="sref">bs->3code=bcm63xx_spi_fill_tx_fifo" cla3s="sr3f">bcmass="sref">t->< *p;bs->3d="L112" 3lass="line" name="L112">31121/32 {   391000,c#L124" id="L12irqcode=M_63xx_txrx_bufs(struct urn 0;
         return 0;
 63xx.g_bytes -= }
tx_buf, {3d="L122" 3lass="line" name="L122">31222/3>     ">t->s3don a3)
< 198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L20ine"98"> 198static unsigne="drivers/spi/spi-bcmigne="drivs="lic)196}
MODEBITS,  123                                      struct spi_transfer *t)
MODEBITS, msg_c3l32spi/spi-bcm63xx.c#L143" id="f">bcm63xx_spi_fill_tx_fifo(struct g_bvers/spi/spi-bcmg_bv="+cEBITS" class="sref">MODEBITS, 3a href="drivers/spi/spi-3cm63x32>
t-> s andsreearsf">m i>-&diatelye*p;bs->3dsp class3SP" class="sref">bs-3gt; 143
 144        STATU, mode %d, &"com05">STATU,#L201" id="L201" c"sref">MODEBITS,  204
        STATU, mode %d, &"com05">STATU,#L201" id="L201" c"sref">MODEBITS, bs-3gt;                returef="-bcm63xx.c#L204" id="L204" class="line" name="L204"> 204
 205        /* Disabl3=]ref="0
3  hz = () ? 3a href="+code=t" class="3ref">3->t->)ss="sref">rx_buf, max_spee3_hz;
 173      g_bvers/spi/spi-bcmg_bv="+cLI_CLBYTE_C_MASHIFTcla="L205"R_ine" namass="line" name="L205"R_ine" namspi/fde=tx_buf" class="sref">tx_buf, {3*/3)sa href="drivers/spi/spi-bcm63xx.c#L210" id="L208" class="line" name="L112"> 1121/a>        }
/* Disabl3=me="L1123i++) {
][0]3 {
/* IRQ_HANDLED="+cEBITS" class="sref">MODEBITS, clk_a href="drivers/spi/spi-bcm63xx.c#L1953=f="+code363xx_spi_freq_table[3a hre33p;= ~(struct urn 0;
 1121/a>    _CLK_0_391MHprob1a hre> 123             platform" id="L196" class="linplatform" id="Lef="+code=spi_transfep_MASK" class="srefp">SPI_Ifde=tx_buf" class="sref">tx_buf, {3name="L133"> 138        }
t->      3 /3 No m34ef">len);> 123             resour"L196" class="linresour"Lef="+code=spi_transfef="+code=bs" clas="+cEBITS" class="sref">MODEBITS, i 198static uns id="L196" class="lin id="Lef="+code=spi_transfe_MASK" class="sref">SPI_IL14f="drivers/spi/spi-bp_MASK" class="srefp">SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_IEBITS" class="sref">MODEBITS, 3spi-bcm63xx.c#L142" id="3142" 34="+code=spi_m> 123                        _psref">t)
t)
 143
SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_I.a>             platform" ref">t)
MODEBITS,  -= MODEBITS, ][0]3vers/spi/spi-bcm63xx.c#L345" i34"L175"> 175MODEBITS, bs, <3 href3"+code=SPI_CLKrs/spi/spi-bcm63xx.c#Lclkass="line" nameblks="licode=spi_transfeclkass="line" nameblks="lEBITS" class="sref">MODEBITS, reg3/a> &34             > 123                                      struct spi_traEBITS" class="sref">MODEBITS, ;
 176                         143
 204SPI_I-bcm63xx.c#L205" IORESOURCE_MEMs="comment">/* IORESOURCE_MEMspi/spi        /* Disabl3f">dev&3uot;S35ef">len);aster_get_devdata" cf="+code=bs" clas="+c3f">t->,
remaining_bytes 204SPI_INT_MASK);
/* Disabl3f/31                 176                         1523/a>}
35spi-bcm63xx.c#L134" igotopi/spi-bcm63xx.cou22
 176                        ][0]3erstood by this driver: 3/ 175 156
 143
 204SPI_I-bi        /* Disabl3f3xx.c#L2357"> 157static int <3 href3"+code=bcm63xx173"> 173      grq3xx_txrx_bufst->spi)3 204SPI_INT_MASK);
/* Disabl3d="L159" 3lass="line" name="L159">3159         176                        bcm63xx_spi *
 176                         175bs =3 143
 204SPI_INT_MASK);
/* Disabl3d][0]3i-> 173      IS_ERL210" id="L207" IS_ERL name="L204"> 204t->d="L155"3ers/spi/spi-bcm63xx.c#L135" id36>clk_cfg =  204SPI_INT_MASK);
/* Disabl3dhref="+c366" class="line" name="L366"> 36ref="+code=reg_cttype_shif class="sr6" class="line" name="L17nsf_shif class="srPTR_ERL210" id="L207" PTR_ERL name="L204"> 204/* Disabl3d3xx.c#L238" id="L168" class="line3 name36name="L208"> 208 gotopi/spi-bcm63xx.cou22
 176                        spi->3a hre37">hz = (MODEBI3S37ef">len);
 204SPI_INTspi_tra))       /* Disabl3d="L170" 3lass="line" name="L170">3170t-> 204SPI_INT_MASK);
/* Disabl3/52" clas3fer" class="sref">bcm63x3_spi_37spi-bcm63xx.c#L134" ief="drivers/spi6" class="line" name="L17nsf                 NOMEMs="comment">/*  NOMEMm63x6"> 176                        ][0]375" id="L175" class="lin3" nam37"L175"> 175      gotopi/spi-bcm63xx.cou2_clkass="line" nameou2_clkm63x6"> 176                        spi->37p;= ~spi_transfer *t)
MODEBITS, t)
 204SPI_I-bcm63xx.c#L205" ="drivers/spi/spi-bcm63xx.c#L201" id="L201" c"sref">MODEBITS, __func__3 len);
SPI_I+143"> 143
SPI_I" id="L201" c"sref">MODEBITS, mode3/a> &38s="line" name="L162"> 162        spiSm_reques om"m_reg+code=bs" class="s">Sm_reques om"m_reg+coa href="drivers/spi/spi-bp_MASK" class="srefp">SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_Ihref="+code=bs" c ="+code=bs" clas="+chref="+code=i" class=91r class="line" na=91r PI_Ihne" name="L162"> 162        , 0);
             resour"L_ 204t->s3> 182
 175      ef="drivers/spi_wrierf="+code=bs" cla_wrierf name="L204"> 204SPI_INT_MASK);
/* Disabl3_ref="dri3s="line" name="L184"> 183}38>clk_cfg =  176                        
3a href="drivers/spi/spi-3cm63x38ref="+code=reg_cttypegotopi/spi-bcm63xx.cou2_erf="+code=bs" claou2_erf"L176"> 176                         1222/aref">len);bs)
 188{
<3 href39="+code=t" clade=spi_transfe"line" name="L112"> 1121/a>
Sm_ioL112p_nocachL196" class="lin idm_ioL112p_nocachLa href="drivers/spi/spi-bp_MASK" class="srefp">SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_Ihref="+code=bs" c ="+code=bs" clas="+chref="+code=i" class=91r class="line" na=91r PI_Ihne" name="L162"> 162        size;
<3 href39101" id="L101" class="line" n#L134" iiiiiiiiiiiiiiiiiiiiiiiiia>             resour"L_ 204/* Disabl3ef">bs 1121/a>
t->bs-> 204SPI_INT_MASK);
/* Disabl3/a>      3 /*  NOMEMm63x6"> 176                        s3+code=size" class="sref"3size<39"L175"> 175      gotopi/spi-bcm63xx.cou2_erf="+code=bs" claou2_erf"L176"> 176                        ->3 193
spi_tra1/a>
 143
MODEBITS, spi4device *spi_tra1/a>
 143
MODEBITS, spi4dname="L188"> 188{
<4"line40="+code=t" clade=spi_transfe"line" name="L112"> 1121/a>
 143
t)
MODEBITS, spi4dlass="sref">size;
<4=bcm640f="+code=spi" class="sref">spi->(Sm_reques oirq3xx_txrx_bufsSm_reques oirqa href="drivers/spi/spi-bp_MASK" class="srefp">SPI_I href="+code=SPI_INT_MASK" class="sref">SPI_Ihref="+code=bs" cirq3xx_txrx_bufs         return 0;
 63xxspi-ode=spi" class="sref">spi->bs->                                 ivers/spi/spi-bp_MASK" class="srefp">SPI_I href="+code=SPI_INTt;MODEBITS, msg_ctl;
<4 href40spi-bcm63xx.c173"> 173       " class="line" name="L17ff">t-> <4 href="+code=cmd" class=4sref"40"L175"> 175      ef="drivers/spi_wrierf="+code=bs" cla_wrierf name="L204"> 204SPI_INT_MASK);
/* Disabl4g76 <4 class="line" name="L1954a hre40>clk_cfg =  176                         206 4     40ref="+code=ref="+code=bcm63xx_spi_freq_table" class4pi-bcm63x4.c#L208" id="L208" class4"line40S);
 249                 143
t)
 176                        tx_buf,4 143
t)
 176                        spi4gt;len);
 143
 176                        
t)
 143
 176                        , t)
 143
 176                         1121/a>        coiners/spi/spi-bcmspi/spi-_L11om">coinPI_I+143"> 143
 1121/a>    _CLK_0_391MHspi/spi-_L11 nam6"> 176                         <4x_buf,  143
 176                         <4rivers/spi/spi-bcm63xx.c4L172"41+code=SPI_CLK_CFG" class="sr"line" name="L112"> 1121/a>
t)
 143
t)
t)
 176                        t-> 1121/a>
 143
t)
 176                        spi_tra1/a>
 143
t)
msg_ctl_widthPI_I6"> 176                        spi_tra1/a>
bcm63xx_spi_fill_tx_f*)4" class="line" name="L144"> 144   2"> 1121/a>         143
 1121/a>    _CLK_0_391ML1g name="L204"> 204 1121/a>    ="L2MSG_DATA="+c3        /* Disabl4d="L112" 4lass="line" name="L112">41121/42="+code=t" clade=spi_transfe"line" name="L112"> 1121/a>
 -= bcm63xx_spi_fill_tx_f*)4" class="line" name="L144"> 144   2"> 1121/a>         143
 1121/a>    _CLK_0_391ML1g name="L204"> 204 1121/a>    ="L2RX_DATA="+c3        /* Disabl4d2ef">spi4lass="line" name="L122">41222/42f="+code=spi" class="sref">spi->s4don a4)
<spi_tra1/a>
t-> = msg_c4l42spi/spi-bcm63case 16size =  175      break       /* Disabl4d76 <4 id="L112" class="line" 4ame="42+code=SPI_CLKdefaultsize = bs-4gt; 204SPI_INT_MASK);
spi->spi_tra1/a>
/* Disabl4ef="+code4SP" class="sref">bs-4gt; 176                        ) ? 4a href="+code=t" class="4ref">43f="+code=spi" class="sref">spi->max_spee4_hz;
t->rx_buf,  204spi_tra1/a>
/* Disabl4eme="L1124i++) {
 204
 204        STATU, mode %d, &"com05">STATU,#L201" id="L201" c"sref">MODEBITS, ][0]4 {
t->rx_buf, [4a hre43                        204MODEBITS,  173       " class="line" name="L17ff">t-> 204SPI_INT_MASK);
/* Disabl4name="L134"> 138        }
 176                              4 /4 No m44ef">len);f="+code=bcm63xx_spi_freq_table" class4ref">i 162        4spi-bcm63xx.c#L142" id="4142" 44e=remaining_bytes" class="sr_wriinf93          _wriinf9 name="L204"> 204SPI_INT_MASK);
spi-> 173       class="line" namef="1/a>
 1121/a>
MODEBITS, ][0]4vers/spi/spi-bcm63xx.c#L445" i44>
bs, <4 href4"+code=SPI_CLKcode=MODEBITS" class="sref">MODEBITS, reg4/a> &44p;= ~ =                 returclk_dis cla="+code=bs" claclk_dis claPI_Ie="L204"> 204/* Disabl4xx.c#L1504 id="L150" class="line" 4ame="45="+coi/spi-bcm63xx.cou2_erf="+code=bs" claou2_erf"L17size = &4uot;S45ef">len);
t)
 204SPI_I-bcm63xx.c#L205" NU172" id="L172" clNU17s="l)       /* Disabl4xef">i,
 204MODEBITS, 41                 =  1524/a>}
45spi/spi-bcm63xx.c#L143" id="clk_pu22
 204/* Disabl4x][0]4erstood by this driver: 4/ =  173       " class="line" name="L17       /* Disabl4xf="+code4156"> 156
 157static int <4 href45S);
 143
 1121/a>    _CLK_0_391MHremov1PI_Ie> 123             platform" id="L196" class="linplatform" id="Lef="+code=spi_transfep_MASK" class="srefp">SPI_Ifde=tx_buf" class="sref">tx_buf, {4d="L159" 4lass="line" name="L159">4159t->bcm63xx_spi * 198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L20ineL206" id="L112"s="drivers/spiass="line" names="drivers/spi name="L204"> 204t)
 204SPI_I3        /* Disabl4ers/spi/s4i-bcm63xx.c#L162" id="L142" cl463L175"> 175 123                                      struct spi_transfer *t)
MODEBIt">/* Disabl4e/4s" class="sref">bs =4MODEBIt">/* Disabl4e][0]4i->d="L155"4ers/spi/spi-bcm63xx.c#L145" id46+code=SPI_CLK_ss="sref">t->rx_buf,  46                        204
 205        /* Disabl4d3xx.c#L248" id="L168" class="line4 name46S);
t->rx_buf, spi->4a hre47="+code=t" clade=spi_transfeclk_dis cla="+code=bs" claclk_dis claPI_Ie="L204"> 204spi_tra1/a>
/* Disabl4code=MODE4ITS" class="sref">MODEBI4S47ef">len);
 204spi_tra1/a>
/* Disabl4crs/spi/s4lass="line" name="L170">4170 162        t)
 204SPI_I-bi        /* Disabl4/52" clas4fer" class="sref">bcm63x4_spi_47pi-bcm63xx.c#L182" id="L182" class="line" 4s][0]475" id="L175" class="lin4" nam47md;

 204MODEBITS, spi->47             code=MODEBITS" class="sref">MODEBITS, /* CONFIG_PMivers/spi/spi-bcm63xx.c#L188" id="L188" c4Lode=MODE4lass="sref">__func__4 l391000,  123              id="L196" class="lin id="Lef="+code=spi_transfe_MASK" class="sref">SPI_Ifde=tx_buf" class="sref">tx_buf, {4L="L170" 4=mode" class="sref">mode4/a> &48s="li">t->spi 198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L20in>t->, 0);
 204t)
 204 204SPI_I3        /* Disabl4_"sref">s4> 182
 175 123                                      struct spi_transfer *t)
MODEBIt">/* Disabl4_d="L155"4s="line" name="L184"> 184}48"drivers/spi/spi-bcm63xx.c#L206" id="L206"4/
4a href="drivers/spi/spi-4cm63x48                        204spi_tra1/a>
/* Disabl4/ name="L4tic void bs)
MODEBITS,  188{
<4 href49="+cof="+code=bcm63xx_spi_freq_table" class4ode=size"4class="sref">size;
<4 href49f="+code=spi" class="sref">spi->bsSPI_Ifde=tx_buf" class="sref">tx_buf, {4"f="+code4="sref">bs->t->      4  198static unsigne="drivers/spi/spi-bcmigne="drivs="licode=spi_transfe="drivers/spi/spi-bcm63xx.c#L20in>t->s4+code=size" class="sref"4size<49"L175"> 175      iiiiiiii="L204"> 204t)
 204 204SPI_I3        /* Disabl4oref="dri4 class="line" name="L1954> 19549+code=SPI_CLKrs/spi/spi-bcm63xx.c#L                         struct spi_transfer *t)
MODEBIt">/* Disabl4s->4 194
 204spi_tra1/a>
/* Disabl5sref">spi5device *spi5dname="L188"> 188{
<5"line50="+code=t" clcode=MODEBITS" class="sref">MODEBITS, spi5dlass="sref">size;
<5=bcm650f="+cf="+code=bcm63xx_spi_freq_table" class5get_devda5a( 162        bs-> 123              id_pm_op" class="sref">s id_pm_op"code=3"> 143
surn 0;
t->msg_ctl;
<5 href50spi-bcm63xx.c.a>             euspenhref="drivers/speuspenhPI_Icm63xx.c143"> 143
spi-> <5 href="+code=cmd" class=5sref"50"L175"> 175             resu 143
spi-> <5 class="line" name="L1955a hre50>clk_}EBITS" class="sref">MODEBITS,  <5 a href="+code=remaining5     50p;= ~#def"L243"> 143
surn 0;
tx_buf, {5"L209"> 259                tx_buf, {5"1ef">spi5class="sref">tx_buf,5 143
 143
tx_buf, {5"2ef">spi5gt;l#enhifde=tx_buf" class="sref">tx_buf, {5"et_devda5mo
 162        , 196" class="linplatform" 162">code=3"> 143
196" class="linurn 0;
_transf">t-> 1121/a>                      162">196" class="lin 162">_transf">t-> <5x_buf,  175      .a>             t;spi-> <5rivers/spi/spi-bcm63xx.c5L172"51>clk_cfg =              own">196" class="linown">clk_cf143"> 143
spi->t-> 143
spi->spi-> 143
spi->51121/52="+code=t" cl.a>             remov12"> 1121/a>    remov1PI_Icode=reg_143"> 143
 204 1121/a>    _CLK_0_391MHremov1PI_I)-ode=spi" class="sref">spi->spi5lass="line" name="L122">51222/52f="+c}EBITS" class="sref">MODEBITS, s5don a52s="line" name="L162"> 162        196" class="linmodule_platform" 162"> name="L204"> 204196" class="linurn 0;
_tra        /* Disabl5sme="L1125_ctl" class="sref">msg_c5l52pi-bcm63xx.c#L182" id="L182" class="line" 5s16 <5a href="drivers/spi/spi-5cm63x52"L175i/spi-bcm63xx.cMODULE_ALIA, mode %d, &MODULE_ALIA, name=MASK);
/* Disabl5d76 <5 id="L112" class="line" 5ame="52+codei/spi-bcm63xx.cMODULE_AUTHOL210" id="L207" MODULE_AUTHOL name=MASK);

s="line" name        /* Disabl5dlass="li5SP" class="sref">bs-5gt;);

s="line" name        /* Disabl5di-bcm63x55" id="L208" class="line5 name529pi/si/spi-bcm63xx.cMODULE_DESCRIPTION210" id="L207" MODULE_DESCRIPTION name=MASK);
/* Disabl5ef="+code5SP" class="sref">bs-5gt;/* Disabl5e="L112" 5  


143LXR /a>-unityPI_I-bthis experi->al lassion=by 3"> 143lxv@+coux.noPI_I.
143Redpill Lcopro A, nam, provider of Lcoux,consultrefpandsoper100ons serd="LsT