setup_irq(ce->irq, &footbridge_timer_irq);
ce->cpumask = cpumask_of(smp_processor_id());
-- --- clockevents_config_and_register(ce, mem_fclk_21285, 0x4, 0xffffff);
++ +++ clockevents_config_and_register(ce, rate, 0x4, 0xffffff);
++ + +}
++++ +
++++ +static u32 notrace footbridge_read_sched_clock(void)
++++ +{
++++ + return ~*CSR_TIMER3_VALUE;
++++ +}
++++ +
++++ +void __init footbridge_sched_clock(void)
++++ +{
++++ + unsigned rate = DIV_ROUND_CLOSEST(mem_fclk_21285, 16);
++++ +
++++ + *CSR_TIMER3_LOAD = 0;
++++ + *CSR_TIMER3_CLR = 0;
++++ + *CSR_TIMER3_CNTL = TIMER_CNTL_ENABLE | TIMER_CNTL_DIV16;
++++ +
++++ + setup_sched_clock(footbridge_read_sched_clock, 24, rate);
+ }
return 0;
}
- max_dma_pfn = min(max_pfn, arm_dma_pfn_limit);
-
- - - /*
- - - * If the mask allows for more memory than we can address,
- - - * and we actually have that much memory, then fail the
- - - * allocation.
- - - */
- - - if (sizeof(mask) != sizeof(dma_addr_t) &&
- - - mask > (dma_addr_t)~0 &&
- - dma_to_pfn(dev, ~0) > arm_dma_pfn_limit) {
- dma_to_pfn(dev, ~0) > max_dma_pfn) {
- - - dev_warn(dev, "Coherent DMA mask %#llx is larger than dma_addr_t allows\n",
- - - mask);
- - - dev_warn(dev, "Driver did not use or check the return value from dma_set_coherent_mask()?\n");
- - - return 0;
- - - }
- - -
- - - /*
- - - * Now check that the mask, when translated to a PFN,
- - - * fits within the allowable addresses which we can
- - - * allocate.
- - - */
- - if (dma_to_pfn(dev, mask) < arm_dma_pfn_limit) {
- if (dma_to_pfn(dev, mask) < max_dma_pfn) {
- - - dev_warn(dev, "Coherent DMA mask %#llx (pfn %#lx-%#lx) covers a smaller range of system memory than the DMA zone pfn 0x0-%#lx\n",
- - - mask,
- - - dma_to_pfn(dev, 0), dma_to_pfn(dev, mask) + 1,
- - - arm_dma_pfn_limit + 1);
+ + + if (!__dma_supported(dev, mask, true))
return 0;
- - - }
}
return mask;