static size_t cw1200_align_size(struct sbus_priv *self, size_t size) { size_t aligned = sdio_align_size(self->func, size); /* HACK!!! Problems with DMA size on u8500 platform */ if ((aligned & 0x1F) && (aligned & ~0x1F)) { aligned &= ~0x1F; aligned += 0x20; } return aligned; }
static size_t cw1200_sdio_align_size(struct hwbus_priv *self, size_t size) { if (self->pdata->no_nptb) size = round_up(size, SDIO_BLOCK_SIZE); else size = sdio_align_size(self->func, size); #if (LINUX_VERSION_CODE < KERNEL_VERSION(3, 2, 0)) /* A quirk to handle this was committed in 3.2-rc */ if (size == SDIO_BLOCK_SIZE) size += SDIO_BLOCK_SIZE; /* HW bug; force use of block mode */ #endif return size; }