static void __init ts43xx_fixup( struct tag *tags, char **cmdline, struct meminfo *mi) { unsigned long memSize; unsigned char *otpArea; /* The contents of the flash OTP area should have been copied here by the bootloader */ __pv_phys_offset = CNS3XXX_DDR2SDRAM_BASE; memSize = *(unsigned long *)__bus_to_virt(CNS3XXX_DDR2SDRAM_BASE + 0x20); otpArea = (unsigned char *)__bus_to_virt(CNS3XXX_DDR2SDRAM_BASE + 0x24); printk("Bootloader says it found %ld MB of DDR2\n", memSize); mi->nr_banks = 1; mi->bank[0].start = CNS3XXX_DDR2SDRAM_BASE + 0x00000000; if (memSize == 512) mi->bank[0].size = SZ_512M; else mi->bank[0].size = SZ_256M; memcpy(cns3xxx_flashOTP, otpArea, 64); }
static void sun4i_pcm_enqueue(struct snd_pcm_substream *substream) { struct sun4i_runtime_data *prtd = substream->runtime->private_data; dma_addr_t pos = prtd->dma_pos; unsigned int limit; int ret; unsigned long len = prtd->dma_period; limit = prtd->dma_limit; while(prtd->dma_loaded < limit) { if((pos + len) > prtd->dma_end) { len = prtd->dma_end - pos; } ret = sw_dma_enqueue(prtd->params->channel, substream, __bus_to_virt(pos), len); if(ret == 0) { prtd->dma_loaded++; pos += prtd->dma_period; if(pos >= prtd->dma_end) pos = prtd->dma_start; }else { break; } } prtd->dma_pos = pos; }