Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 210634
b: refs/heads/master
c: 545074f
h: refs/heads/master
v: v3
  • Loading branch information
Linus Walleij authored and Grant Likely committed Sep 8, 2010
1 parent b4ec9f6 commit 3e0732e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 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: be7852a839b6dcd86db1a2d25b9a1a99f38db2db
refs/heads/master: 545074fb953e1753f6b8409db533ad7998789efb
14 changes: 8 additions & 6 deletions trunk/drivers/spi/amba-pl022.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,9 @@ static void giveback(struct pl022 *pl022)
msg->state = NULL;
if (msg->complete)
msg->complete(msg->context);
/* This message is completed, so let's turn off the clock! */
/* This message is completed, so let's turn off the clocks! */
clk_disable(pl022->clk);
amba_pclk_disable(pl022->adev);
}

/**
Expand Down Expand Up @@ -1139,9 +1140,10 @@ static void pump_messages(struct work_struct *work)
/* Setup the SPI using the per chip configuration */
pl022->cur_chip = spi_get_ctldata(pl022->cur_msg->spi);
/*
* We enable the clock here, then the clock will be disabled when
* We enable the clocks here, then the clocks will be disabled when
* giveback() is called in each method (poll/interrupt/DMA)
*/
amba_pclk_enable(pl022->adev);
clk_enable(pl022->clk);
restore_state(pl022);
flush(pl022);
Expand Down Expand Up @@ -1786,11 +1788,9 @@ pl022_probe(struct amba_device *adev, struct amba_id *id)
}

/* Disable SSP */
clk_enable(pl022->clk);
writew((readw(SSP_CR1(pl022->virtbase)) & (~SSP_CR1_MASK_SSE)),
SSP_CR1(pl022->virtbase));
load_ssp_default_config(pl022);
clk_disable(pl022->clk);

status = request_irq(adev->irq[0], pl022_interrupt_handler, 0, "pl022",
pl022);
Expand Down Expand Up @@ -1818,6 +1818,8 @@ pl022_probe(struct amba_device *adev, struct amba_id *id)
goto err_spi_register;
}
dev_dbg(dev, "probe succeded\n");
/* Disable the silicon block pclk and clock it when needed */
amba_pclk_disable(adev);
return 0;

err_spi_register:
Expand Down Expand Up @@ -1879,9 +1881,9 @@ static int pl022_suspend(struct amba_device *adev, pm_message_t state)
return status;
}

clk_enable(pl022->clk);
amba_pclk_enable(adev);
load_ssp_default_config(pl022);
clk_disable(pl022->clk);
amba_pclk_disable(adev);
dev_dbg(&adev->dev, "suspended\n");
return 0;
}
Expand Down

0 comments on commit 3e0732e

Please sign in to comment.