本文整理汇总了C++中read_SSSR函数的典型用法代码示例。如果您正苦于以下问题:C++ read_SSSR函数的具体用法?C++ read_SSSR怎么用?C++ read_SSSR使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了read_SSSR函数的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: flush
static int flush(struct driver_data *drv_data)
{
unsigned long limit = loops_per_jiffy << 1;
void __iomem *reg = drv_data->ioaddr;
do {
while (read_SSSR(reg) & SSSR_RNE) {
read_SSDR(reg);
}
} while ((read_SSSR(reg) & SSSR_BSY) && limit--);
write_SSSR(SSSR_ROR, reg);
return limit;
}
开发者ID:kizukukoto,项目名称:WDN900_GPL,代码行数:15,代码来源:pxa2xx_spi.c
示例2: pxa2xx_spi_flush
int pxa2xx_spi_flush(struct driver_data *drv_data)
{
unsigned long limit = loops_per_jiffy << 1;
void __iomem *reg = drv_data->ioaddr;
do {
while (read_SSSR(reg) & SSSR_RNE) {
read_SSDR(reg);
}
} while ((read_SSSR(reg) & SSSR_BSY) && --limit);
write_SSSR_CS(drv_data, SSSR_ROR);
return limit;
}
开发者ID:OliverGesch,项目名称:linux,代码行数:15,代码来源:spi-pxa2xx.c
示例3: pxa2xx_spi_dma_transfer
irqreturn_t pxa2xx_spi_dma_transfer(struct driver_data *drv_data)
{
u32 irq_status;
void __iomem *reg = drv_data->ioaddr;
irq_status = read_SSSR(reg) & drv_data->mask_sr;
if (irq_status & SSSR_ROR) {
pxa2xx_spi_dma_error_stop(drv_data,
"dma_transfer: fifo overrun");
return IRQ_HANDLED;
}
/* Check for false positive timeout */
if ((irq_status & SSSR_TINT)
&& (DCSR(drv_data->tx_channel) & DCSR_RUN)) {
write_SSSR(SSSR_TINT, reg);
return IRQ_HANDLED;
}
if (irq_status & SSSR_TINT || drv_data->rx == drv_data->rx_end) {
/* Clear and disable timeout interrupt, do the rest in
* dma_transfer_complete */
if (!pxa25x_ssp_comp(drv_data))
write_SSTO(0, reg);
/* finish this transfer, start the next */
pxa2xx_spi_dma_transfer_complete(drv_data);
return IRQ_HANDLED;
}
/* Opps problem detected */
return IRQ_NONE;
}
开发者ID:acorn-marvell,项目名称:brillo_pxa_kernel,代码行数:35,代码来源:spi-pxa2xx-pxadma.c
示例4: wait_ssp_rx_stall
static int wait_ssp_rx_stall(void const __iomem *ioaddr)
{
unsigned long limit = loops_per_jiffy << 1;
while ((read_SSSR(ioaddr) & SSSR_BSY) && --limit)
cpu_relax();
return limit;
}
开发者ID:acorn-marvell,项目名称:brillo_pxa_kernel,代码行数:9,代码来源:spi-pxa2xx-pxadma.c
示例5: is_tx_fifo_full
static bool is_tx_fifo_full(struct driver_data *drv_data)
{
void __iomem *reg = drv_data->ioaddr;
/* workaround for debug UART */
if (drv_data->ssp_type == INTEL_SSP && (drv_data->ssp->port_id == 5))
return ((read_SFIFOL(reg) & 0xFFFF) != 0);
else if (!is_lpss_ssp(drv_data))
return ((read_SSSR(reg) & SSSR_TFL_MASK) == SSSR_TFL_MASK);
else
return ((read_SSITF(reg) & SSITF_TFL_MASK) == SSITF_TFL_MASK);
}
开发者ID:BitOBSessiOn,项目名称:android_kernel_asus_P01M,代码行数:12,代码来源:spi-pxa2xx.c
示例6: u32_reader
static int u32_reader(struct driver_data *drv_data)
{
void __iomem *reg = drv_data->ioaddr;
while ((read_SSSR(reg) & SSSR_RNE)
&& (drv_data->rx < drv_data->rx_end)) {
*(u32 *)(drv_data->rx) = read_SSDR(reg);
drv_data->rx += 4;
}
return drv_data->rx == drv_data->rx_end;
}
开发者ID:OliverGesch,项目名称:linux,代码行数:12,代码来源:spi-pxa2xx.c
示例7: null_reader
static int null_reader(struct driver_data *drv_data)
{
void __iomem *reg = drv_data->ioaddr;
u8 n_bytes = drv_data->n_bytes;
while ((read_SSSR(reg) & SSSR_RNE)
&& (drv_data->rx < drv_data->rx_end)) {
read_SSDR(reg);
drv_data->rx += n_bytes;
}
return drv_data->rx == drv_data->rx_end;
}
开发者ID:OliverGesch,项目名称:linux,代码行数:13,代码来源:spi-pxa2xx.c
示例8: u32_writer
static int u32_writer(struct driver_data *drv_data)
{
void __iomem *reg = drv_data->ioaddr;
if (((read_SSSR(reg) & SSSR_TFL_MASK) == SSSR_TFL_MASK)
|| (drv_data->tx == drv_data->tx_end))
return 0;
write_SSDR(*(u32 *)(drv_data->tx), reg);
drv_data->tx += 4;
return 1;
}
开发者ID:OliverGesch,项目名称:linux,代码行数:13,代码来源:spi-pxa2xx.c
示例9: u16_writer
static int u16_writer(struct driver_data *drv_data)
{
void __iomem *reg = drv_data->ioaddr;
if (((read_SSSR(reg) & 0x00000f00) == 0x00000f00)
|| (drv_data->tx == drv_data->tx_end))
return 0;
write_SSDR(*(u16 *)(drv_data->tx), reg);
drv_data->tx += 2;
return 1;
}
开发者ID:kizukukoto,项目名称:WDN900_GPL,代码行数:13,代码来源:pxa2xx_spi.c
示例10: null_writer
static int null_writer(struct driver_data *drv_data)
{
void __iomem *reg = drv_data->ioaddr;
u8 n_bytes = drv_data->n_bytes;
if (((read_SSSR(reg) & SSSR_TFL_MASK) == SSSR_TFL_MASK)
|| (drv_data->tx == drv_data->tx_end))
return 0;
write_SSDR(0, reg);
drv_data->tx += n_bytes;
return 1;
}
开发者ID:OliverGesch,项目名称:linux,代码行数:14,代码来源:spi-pxa2xx.c
示例11: apl_i2s_send
/*
* apl_i2s_send - Send audio samples to I2s controller.
* @me: I2sOps structure
* @data: Audio samples
* @length: Number of samples
*
* Send audio samples to I2s controller.
*/
static int apl_i2s_send(I2sOps *me, unsigned int *data, unsigned int length)
{
int i;
uint64_t start;
AplI2s *bus = container_of(me, AplI2s, ops);
struct AplI2sRegs *i2s_reg = bus->regs;
if (!bus->initialized) {
if (apl_i2s_init(bus))
return -1;
bus->initialized = 1;
}
if (length < LPE_SSP_FIFO_SIZE) {
printf("%s : Invalid data size\n", __func__);
return -1;
}
gpio_set(bus->sdmode_gpio, 1);
for (i = 0; i < LPE_SSP_FIFO_SIZE; i++)
writel(*data++, &i2s_reg->ssdr);
i2s_enable(bus->regs);
length -= LPE_SSP_FIFO_SIZE;
while (length > 0) {
start = timer_us(0);
if (read_SSSR(bus->regs) & 0x4) {
writel(*data++, &i2s_reg->ssdr);
length--;
} else {
if (timer_us(start) > 100000) {
i2s_disable(bus->regs);
gpio_set(bus->sdmode_gpio, 0);
printf("I2S Transfer Timeout\n");
return -1;
}
}
}
mdelay(1);
gpio_set(bus->sdmode_gpio, 0);
i2s_disable(bus->regs);
return 0;
}
开发者ID:coreboot,项目名称:depthcharge,代码行数:54,代码来源:apollolake.c
注:本文中的read_SSSR函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论