* val shifted sb steps to the left.
*/
#define SSP_WRITE_BITS(reg, val, mask, sb) \
- ((reg) = (((reg) & ~(mask)) | (((val)<<(sb)) & (mask))))
+ ((reg) = (((reg) & ~(mask)) | (((val)<<(sb)) & (mask))))
/*
* This macro is also used to define some default values.
* the result with mask.
*/
#define GEN_MASK_BITS(val, mask, sb) \
- (((val)<<(sb)) & (mask))
+ (((val)<<(sb)) & (mask))
#define DRIVE_TX 0
#define DO_NOT_DRIVE_TX 1
static void giveback(struct pl022 *pl022)
{
struct spi_transfer *last_transfer;
+
pl022->next_msg_cs_active = false;
last_transfer = list_last_entry(&pl022->cur_msg->transfers,
{
unsigned long limit = loops_per_jiffy << 1;
- dev_dbg(&pl022->adev->dev, "flush\n");
+ dev_dbg(&pl022->adev->dev, "%s\n", __func__);
do {
while (readw(SSP_SR(pl022->virtbase)) & SSP_SR_MASK_RNE)
readw(SSP_DR(pl022->virtbase));
message->status = -EIO;
giveback(pl022);
- return;
}
static int pl022_transfer_one_message(struct spi_master *master,
scr = SCR_MIN;
}
- WARN(!best_freq, "pl022: Matching cpsdvsr and scr not found for %d Hz rate \n",
+ WARN(!best_freq, "pl022: Matching cpsdvsr and scr not found for %d Hz rate\n",
freq);
clk_freq->cpsdvsr = (u8) (best_cpsdvsr & 0xFF);
* We can override with custom divisors, else we use the board
* frequency setting
*/
- if ((0 == chip_info->clk_freq.cpsdvsr)
- && (0 == chip_info->clk_freq.scr)) {
+ if ((chip_info->clk_freq.cpsdvsr == 0)
+ && (chip_info->clk_freq.scr == 0)) {
status = calculate_effective_freq(pl022,
spi->max_speed_hz,
&clk_freq);