Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 270254
b: refs/heads/master
c: 4a268e0
h: refs/heads/master
v: v3
  • Loading branch information
Sahitya Tummala authored and Chris Ball committed Oct 26, 2011
1 parent 0262ed8 commit 3751fcb
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4a92fe80becbbee650cfad8457ad0e5cd97ed974
refs/heads/master: 4a268e0879c4044523757b6ac94b56fc7955a116
20 changes: 16 additions & 4 deletions trunk/drivers/mmc/host/msm_sdcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ msmsdcc_dma_exec_func(struct msm_dmov_cmd *cmd)
msmsdcc_writel(host, host->cmd_timeout, MMCIDATATIMER);
msmsdcc_writel(host, (unsigned int)host->curr.xfer_size,
MMCIDATALENGTH);
msmsdcc_writel(host, host->cmd_pio_irqmask, MMCIMASK1);
msmsdcc_writel(host, (msmsdcc_readl(host, MMCIMASK0) &
(~MCI_IRQ_PIO)) | host->cmd_pio_irqmask, MMCIMASK0);
msmsdcc_writel(host, host->cmd_datactrl, MMCIDATACTRL);

if (host->cmd_cmd) {
Expand Down Expand Up @@ -543,7 +544,9 @@ msmsdcc_start_data(struct msmsdcc_host *host, struct mmc_data *data,

msmsdcc_writel(host, host->curr.xfer_size, MMCIDATALENGTH);

msmsdcc_writel(host, pio_irqmask, MMCIMASK1);
msmsdcc_writel(host, (msmsdcc_readl(host, MMCIMASK0) &
(~MCI_IRQ_PIO)) | pio_irqmask, MMCIMASK0);

msmsdcc_writel(host, datactrl, MMCIDATACTRL);

if (cmd) {
Expand Down Expand Up @@ -659,8 +662,13 @@ msmsdcc_pio_irq(int irq, void *dev_id)
{
struct msmsdcc_host *host = dev_id;
uint32_t status;
u32 mci_mask0;

status = msmsdcc_readl(host, MMCISTATUS);
mci_mask0 = msmsdcc_readl(host, MMCIMASK0);

if (((mci_mask0 & status) & MCI_IRQ_PIO) == 0)
return IRQ_NONE;

do {
unsigned long flags;
Expand Down Expand Up @@ -719,10 +727,12 @@ msmsdcc_pio_irq(int irq, void *dev_id)
} while (1);

if (status & MCI_RXACTIVE && host->curr.xfer_remain < MCI_FIFOSIZE)
msmsdcc_writel(host, MCI_RXDATAAVLBLMASK, MMCIMASK1);
msmsdcc_writel(host, (mci_mask0 & (~MCI_IRQ_PIO)) |
MCI_RXDATAAVLBLMASK, MMCIMASK0);

if (!host->curr.xfer_remain)
msmsdcc_writel(host, 0, MMCIMASK1);
msmsdcc_writel(host, (mci_mask0 & (~MCI_IRQ_PIO)) | 0,
MMCIMASK0);

return IRQ_HANDLED;
}
Expand Down Expand Up @@ -854,6 +864,8 @@ msmsdcc_irq(int irq, void *dev_id)
do {
status = msmsdcc_readl(host, MMCISTATUS);
status &= msmsdcc_readl(host, MMCIMASK0);
if ((status & (~MCI_IRQ_PIO)) == 0)
break;
msmsdcc_writel(host, status, MMCICLEAR);

if (status & MCI_SDIOINTR)
Expand Down
5 changes: 5 additions & 0 deletions trunk/drivers/mmc/host/msm_sdcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,11 @@
MCI_DATATIMEOUTMASK|MCI_TXUNDERRUNMASK|MCI_RXOVERRUNMASK| \
MCI_CMDRESPENDMASK|MCI_CMDSENTMASK|MCI_DATAENDMASK|MCI_PROGDONEMASK)

#define MCI_IRQ_PIO \
(MCI_RXDATAAVLBLMASK | MCI_TXDATAAVLBLMASK | MCI_RXFIFOEMPTYMASK | \
MCI_TXFIFOEMPTYMASK | MCI_RXFIFOFULLMASK | MCI_TXFIFOFULLMASK | \
MCI_RXFIFOHALFFULLMASK | MCI_TXFIFOHALFEMPTYMASK | \
MCI_RXACTIVEMASK | MCI_TXACTIVEMASK)
/*
* The size of the FIFO in bytes.
*/
Expand Down

0 comments on commit 3751fcb

Please sign in to comment.