Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b904d713 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'for-linus' of git://www.jni.nu/cris

* 'for-linus' of git://www.jni.nu/cris:
  CRIS: Don't use mask_irq as symbol name
  CRIS: Simplify param.h by simply including <asm-generic/param.h>
  CRISv10: Whitespace fixes for hw_settings.S
  CRISv10: Trivial fixes.
  CRISv32: Fix RS485 port 4 CD Kconfig item.
  CRISv32: Remove duplicated Kconfig items.
  cris: push down BKL into some device drivers
parents 2e8949f0 4150764f
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -19,6 +19,7 @@
#include <linux/module.h>
#include <linux/miscdevice.h>
#include <linux/delay.h>
#include <linux/smp_lock.h>
#include <linux/bcd.h>
#include <linux/capability.h>

@@ -238,9 +239,7 @@ static unsigned char days_in_mo[] =

/* ioctl that supports RTC_RD_TIME and RTC_SET_TIME (read and set time/date). */

static int
rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
	  unsigned long arg) 
static int rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
	unsigned long flags;

@@ -354,6 +353,17 @@ rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
	}
}

static long rtc_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
{
	int ret;

	lock_kernel();
	ret = rtc_ioctl(file, cmd, arg);
	unlock_kernel();

	return ret;
}

static void
print_rtc_status(void)
{
@@ -376,7 +386,7 @@ print_rtc_status(void)

static const struct file_operations rtc_fops = {
	.owner		= THIS_MODULE,
	.ioctl =	rtc_ioctl,
	.unlocked_ioctl = rtc_unlocked_ioctl,
}; 

/* Probe for the chip by writing something to its RAM and try reading it back. */
+15 −4
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@
#include <linux/delay.h>
#include <linux/bcd.h>
#include <linux/mutex.h>
#include <linux/smp_lock.h>

#include <asm/uaccess.h>
#include <asm/system.h>
@@ -53,7 +54,7 @@ static DEFINE_MUTEX(rtc_lock); /* Protect state etc */
static const unsigned char days_in_month[] =
	{ 0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 };

int pcf8563_ioctl(struct inode *, struct file *, unsigned int, unsigned long);
static long pcf8563_unlocked_ioctl(struct file *, unsigned int, unsigned long);

/* Cache VL bit value read at driver init since writing the RTC_SECOND
 * register clears the VL status.
@@ -62,7 +63,7 @@ static int voltage_low;

static const struct file_operations pcf8563_fops = {
	.owner = THIS_MODULE,
	.ioctl = pcf8563_ioctl,
	.unlocked_ioctl = pcf8563_unlocked_ioctl,
};

unsigned char
@@ -212,8 +213,7 @@ pcf8563_exit(void)
 * ioctl calls for this driver. Why return -ENOTTY upon error? Because
 * POSIX says so!
 */
int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
	unsigned long arg)
static int pcf8563_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
	/* Some sanity checks. */
	if (_IOC_TYPE(cmd) != RTC_MAGIC)
@@ -339,6 +339,17 @@ int pcf8563_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
	return 0;
}

static long pcf8563_unlocked_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
	int ret;

	lock_kernel();
	return pcf8563_ioctl(filp, cmd, arg);
	unlock_kernel();

	return ret;
}

static int __init pcf8563_register(void)
{
	if (pcf8563_init() < 0) {
+4 −4
Original line number Diff line number Diff line
@@ -17,8 +17,8 @@
#include <linux/kernel.h>
#include <linux/init.h>

#define mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr));
#define unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr));
#define crisv10_mask_irq(irq_nr) (*R_VECT_MASK_CLR = 1 << (irq_nr));
#define crisv10_unmask_irq(irq_nr) (*R_VECT_MASK_SET = 1 << (irq_nr));

/* don't use set_int_vector, it bypasses the linux interrupt handlers. it is
 * global just so that the kernel gdb can use it.
@@ -116,12 +116,12 @@ static unsigned int startup_crisv10_irq(unsigned int irq)

static void enable_crisv10_irq(unsigned int irq)
{
	unmask_irq(irq);
	crisv10_unmask_irq(irq);
}

static void disable_crisv10_irq(unsigned int irq)
{
	mask_irq(irq);
	crisv10_mask_irq(irq);
}

static void ack_crisv10_irq(unsigned int irq)
+7 −8
Original line number Diff line number Diff line
/* $Id: dmacopy.c,v 1.1 2001/12/17 13:59:27 bjornw Exp $ 
 *
/*
 * memcpy for large blocks, using memory-memory DMA channels 6 and 7 in Etrax
 */

@@ -14,7 +13,7 @@ void *dma_memcpy(void *pdst,
{
	static etrax_dma_descr indma, outdma;

	D(printk("dma_memcpy %d bytes... ", pn));
	D(printk(KERN_DEBUG "dma_memcpy %d bytes... ", pn));

#if 0
	*R_GEN_CONFIG = genconfig_shadow =
@@ -33,10 +32,10 @@ void *dma_memcpy(void *pdst,
	*R_DMA_CH6_CMD = IO_STATE(R_DMA_CH6_CMD, cmd, start);
	*R_DMA_CH7_CMD = IO_STATE(R_DMA_CH7_CMD, cmd, start);

	while(*R_DMA_CH7_CMD == 1) /* wait for completion */ ;

	D(printk("done\n"));
	while (*R_DMA_CH7_CMD == 1)
		/* wait for completion */;

	D(printk(KERN_DEBUG "done\n"));
}


+6 −8
Original line number Diff line number Diff line
/*
 * $Id: hw_settings.S,v 1.1 2001/12/17 13:59:27 bjornw Exp $
 * 
 * This table is used by some tools to extract hardware parameters.
 * The table should be included in the kernel and the decompressor.
 * Don't forget to update the tools if you change this table.
Loading