unsigned long flags;
if (!dma_channels[dma_ch].name) {
- printk (KERN_CRIT __FUNCTION__
- ": trying to free channel %d which is already freed\n",
- dma_ch);
+ printk (KERN_CRIT
+ "%s: trying to free channel %d which is already freed\n",
+ __FUNCTION__, dma_ch);
return;
}
ret = badge4_sa1111_init();
if (ret < 0)
- printk(KERN_ERR __FUNCTION__
- ": SA-1111 initialization failed (%d)\n", ret);
+ printk(KERN_ERR
+ "%s: SA-1111 initialization failed (%d)\n",
+ __FUNCTION__, ret);
/* N.B, according to rmk this is the singular place that GPDR
should be set */
/* detect on->off and off->on transitions */
if ((!old_5V_bitmap) && (badge4_5V_bitmap)) {
/* was off, now on */
- printk(KERN_INFO __FUNCTION__ ": enabling 5V supply rail\n");
+ printk(KERN_INFO "%s: enabling 5V supply rail\n", __FUNCTION__);
GPSR = BADGE4_GPIO_PCMEN5V;
} else if ((old_5V_bitmap) && (!badge4_5V_bitmap)) {
/* was on, now off */
- printk(KERN_INFO __FUNCTION__ ": disabling 5V supply rail\n");
+ printk(KERN_INFO "%s: disabling 5V supply rail\n", __FUNCTION__);
GPCR = BADGE4_GPIO_PCMEN5V;
}
err = request_irq(IRQ_DMA0 + i, dma_irq_handler, SA_INTERRUPT,
device_id, regs);
if (err) {
- printk(KERN_ERR __FUNCTION__
- "unable to request IRQ %d for %s\n",
- IRQ_DMA0 + i, device_id);
+ printk(KERN_ERR
+ "%s: unable to request IRQ %d for %s\n",
+ __FUNCTION__, IRQ_DMA0 + i, device_id);
dma->device = 0;
return err;
}
if (regs == (dma_regs_t *)&DDAR(i))
break;
if (i >= SA1100_DMA_CHANNELS) {
- printk(KERN_ERR __FUNCTION__ ": bad DMA identifier\n");
+ printk(KERN_ERR "%s: bad DMA identifier\n", __FUNCTION__);
return;
}
if (!dma_chan[i].device) {
- printk(KERN_ERR __FUNCTION__ "Trying to free free DMA\n");
+ printk(KERN_ERR "%s: Trying to free free DMA\n", __FUNCTION__);
return;
}
int sa1100_start_dma(dma_regs_t *regs, dma_addr_t dma_ptr, u_int size)
{
- long flags;
+ unsigned long flags;
u_long status;
int ret;
+ if (dma_ptr & 3)
+ printk(KERN_WARNING "DMA: unaligned start address (0x%08lx)\n",
+ (unsigned long)dma_ptr);
+
if (size > MAX_DMA_SIZE)
return -EOVERFLOW;
if (regs == (dma_regs_t *)&DDAR(i))
break;
if (i >= SA1100_DMA_CHANNELS) {
- printk(KERN_ERR __FUNCTION__ ": bad DMA identifier\n");
+ printk(KERN_ERR "%s: bad DMA identifier\n", __FUNCTION__);
return;
}
/*
if ( x != IPAQ_EGPIO_VPP_ON ) {
- printk(__FUNCTION__ " : type=%d (%s) gpio=0x%x (0x%x) egpio=0x%x (0x%x) setp=%d\n",
+ printk("%s: type=%d (%s) gpio=0x%x (0x%x) egpio=0x%x (0x%x) setp=%d\n",
+ __FUNCTION__,
x, egpio_names[x], GPLR, gpio, h3600_egpio, egpio, setp );
}
*/