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

Commit 9eb20074 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/lethal/sh-2.6:
  sh: SH-4A UBC support
  sh: interrupt exception handling rework
  sh: Default enable R7780RP IRQs.
  sh: Zero-out coherent buffer in consistent_alloc().
  sh: Convert IPR-IRQ to IRQ chip.
  sh: Convert INTC2 IRQ handler to irq_chip.
  sh: Fix pr_debug statements for sh4
  sh: Convert r7780rp IRQ handler to IRQ chip.
  sh: Updates for IRQ handler changes.
  sh: Kill off timer_ops get_frequency().
  sh: First step at generic timeofday support.
parents 8770c018 8ae91b9a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -45,6 +45,9 @@ config GENERIC_CALIBRATE_DELAY
config GENERIC_IOMAP
config GENERIC_IOMAP
	bool
	bool


config GENERIC_TIME
	def_bool n

config ARCH_MAY_HAVE_PC_FDC
config ARCH_MAY_HAVE_PC_FDC
	bool
	bool


@@ -357,6 +360,7 @@ config CPU_HAS_SR_RB
endmenu
endmenu


menu "Timer support"
menu "Timer support"
depends on !GENERIC_TIME


config SH_TMU
config SH_TMU
	bool "TMU timer support"
	bool "TMU timer support"
+2 −2
Original line number Original line Diff line number Diff line
@@ -83,7 +83,7 @@ static int hp6x0_apm_get_info(char *buf, char **start, off_t fpos, int length)
	return p - buf;
	return p - buf;
}
}


static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev, struct pt_regs *regs)
static irqreturn_t hp6x0_apm_interrupt(int irq, void *dev)
{
{
	if (!apm_suspended)
	if (!apm_suspended)
		apm_queue_event(APM_USER_SUSPEND);
		apm_queue_event(APM_USER_SUSPEND);
@@ -96,7 +96,7 @@ static int __init hp6x0_apm_init(void)
	int ret;
	int ret;


	ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
	ret = request_irq(HP680_BTN_IRQ, hp6x0_apm_interrupt,
			  SA_INTERRUPT, MODNAME, 0);
			  IRQF_DISABLED, MODNAME, 0);
	if (unlikely(ret < 0)) {
	if (unlikely(ret < 0)) {
		printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
		printk(KERN_ERR MODNAME ": IRQ %d request failed\n",
		       HP680_BTN_IRQ);
		       HP680_BTN_IRQ);
+1 −1
Original line number Original line Diff line number Diff line
@@ -135,7 +135,7 @@ static int swdrv_write(struct file *filp, const char *buff, size_t count,
	return count;
	return count;
}
}


static irqreturn_t sw_interrupt(int irq, void *dev_id, struct pt_regs *regs)
static irqreturn_t sw_interrupt(int irq, void *dev_id)
{
{
	landisk_btn = (0x0ff & (~ctrl_inb(PA_STATUS)));
	landisk_btn = (0x0ff & (~ctrl_inb(PA_STATUS)));
	disable_irq(IRQ_BUTTON);
	disable_irq(IRQ_BUTTON);
+2 −3
Original line number Original line Diff line number Diff line
@@ -69,7 +69,6 @@ static void __init pci_write_config(unsigned long busNo,


static unsigned char m_irq_mask = 0xfb;
static unsigned char m_irq_mask = 0xfb;
static unsigned char s_irq_mask = 0xff;
static unsigned char s_irq_mask = 0xff;
volatile unsigned long irq_err_count;


static void disable_mpc1211_irq(unsigned int irq)
static void disable_mpc1211_irq(unsigned int irq)
{
{
@@ -118,7 +117,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
	if(irq < 8) {
	if(irq < 8) {
		if(m_irq_mask & (1<<irq)){
		if(m_irq_mask & (1<<irq)){
		  if(!mpc1211_irq_real(irq)){
		  if(!mpc1211_irq_real(irq)){
		    irq_err_count++;
		    atomic_inc(&irq_err_count)
		    printk("spurious 8259A interrupt: IRQ %x\n",irq);
		    printk("spurious 8259A interrupt: IRQ %x\n",irq);
		   }
		   }
		} else {
		} else {
@@ -131,7 +130,7 @@ static void mask_and_ack_mpc1211(unsigned int irq)
	} else {
	} else {
		if(s_irq_mask & (1<<(irq - 8))){
		if(s_irq_mask & (1<<(irq - 8))){
		  if(!mpc1211_irq_real(irq)){
		  if(!mpc1211_irq_real(irq)){
		    irq_err_count++;
		    atomic_inc(&irq_err_count);
		    printk("spurious 8259A interrupt: IRQ %x\n",irq);
		    printk("spurious 8259A interrupt: IRQ %x\n",irq);
		  }
		  }
		} else {
		} else {
+22 −83
Original line number Original line Diff line number Diff line
/*
/*
 * linux/arch/sh/boards/renesas/r7780rp/irq.c
 *
 * Copyright (C) 2000  Kazumoto Kojima
 *
 * Renesas Solutions Highlander R7780RP-1 Support.
 * Renesas Solutions Highlander R7780RP-1 Support.
 *
 *
 * Modified for R7780RP-1 by
 * Copyright (C) 2002  Atom Create Engineering Co., Ltd.
 * Atom Create Engineering Co., Ltd. 2002.
 * Copyright (C) 2006  Paul Mundt
 *
 * This file is subject to the terms and conditions of the GNU General Public
 * License.  See the file "COPYING" in the main directory of this archive
 * for more details.
 */
 */
#include <linux/init.h>
#include <linux/init.h>
#include <linux/irq.h>
#include <linux/irq.h>
#include <asm/io.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/r7780rp/r7780rp.h>


#ifdef CONFIG_SH_R7780MP
#ifdef CONFIG_SH_R7780MP
static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0};
static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0};
@@ -20,71 +18,26 @@ static int mask_pos[] = {12, 11, 9, 14, 15, 8, 13, 6, 5, 4, 3, 2, 0, 0, 1, 0};
static int mask_pos[] = {15, 14, 13, 12, 11, 10, 9, 8, 7, 5, 6, 4, 0, 1, 2, 0};
static int mask_pos[] = {15, 14, 13, 12, 11, 10, 9, 8, 7, 5, 6, 4, 0, 1, 2, 0};
#endif
#endif


static void enable_r7780rp_irq(unsigned int irq);
static void disable_r7780rp_irq(unsigned int irq);

/* shutdown is same as "disable" */
#define shutdown_r7780rp_irq disable_r7780rp_irq

static void ack_r7780rp_irq(unsigned int irq);
static void end_r7780rp_irq(unsigned int irq);

static unsigned int startup_r7780rp_irq(unsigned int irq)
{
	enable_r7780rp_irq(irq);
	return 0; /* never anything pending */
}

static void disable_r7780rp_irq(unsigned int irq)
{
	unsigned short val;
	unsigned short mask = 0xffff ^ (0x0001 << mask_pos[irq]);

	/* Set the priority in IPR to 0 */
	val = ctrl_inw(IRLCNTR1);
	val &= mask;
	ctrl_outw(val, IRLCNTR1);
}

static void enable_r7780rp_irq(unsigned int irq)
static void enable_r7780rp_irq(unsigned int irq)
{
{
	unsigned short val;
	unsigned short value = (0x0001 << mask_pos[irq]);

	/* Set priority in IPR back to original value */
	/* Set priority in IPR back to original value */
	val = ctrl_inw(IRLCNTR1);
	ctrl_outw(ctrl_inw(IRLCNTR1) | (1 << mask_pos[irq]), IRLCNTR1);
	val |= value;
	ctrl_outw(val, IRLCNTR1);
}
}


static void ack_r7780rp_irq(unsigned int irq)
static void disable_r7780rp_irq(unsigned int irq)
{
	disable_r7780rp_irq(irq);
}

static void end_r7780rp_irq(unsigned int irq)
{
{
	if (!(irq_desc[irq].status & (IRQ_DISABLED|IRQ_INPROGRESS)))
	/* Set the priority in IPR to 0 */
		enable_r7780rp_irq(irq);
	ctrl_outw(ctrl_inw(IRLCNTR1) & (0xffff ^ (1 << mask_pos[irq])),
		  IRLCNTR1);
}
}


static struct hw_interrupt_type r7780rp_irq_type = {
static struct irq_chip r7780rp_irq_chip __read_mostly = {
	.typename = "R7780RP-IRQ",
	.name		= "r7780rp",
	.startup = startup_r7780rp_irq,
	.mask		= disable_r7780rp_irq,
	.shutdown = shutdown_r7780rp_irq,
	.unmask		= enable_r7780rp_irq,
	.enable = enable_r7780rp_irq,
	.mask_ack	= disable_r7780rp_irq,
	.disable = disable_r7780rp_irq,
	.ack = ack_r7780rp_irq,
	.end = end_r7780rp_irq,
};
};


static void make_r7780rp_irq(unsigned int irq)
{
	disable_irq_nosync(irq);
	irq_desc[irq].chip = &r7780rp_irq_type;
	disable_r7780rp_irq(irq);
}

/*
/*
 * Initialize IRQ setting
 * Initialize IRQ setting
 */
 */
@@ -92,24 +45,10 @@ void __init init_r7780rp_IRQ(void)
{
{
	int i;
	int i;


	/* IRL0=PCI Slot #A
	for (i = 0; i < 15; i++) {
	 * IRL1=PCI Slot #B
		disable_irq_nosync(i);
	 * IRL2=PCI Slot #C
		set_irq_chip_and_handler(i, &r7780rp_irq_chip,
	 * IRL3=PCI Slot #D
					 handle_level_irq);
	 * IRL4=CF Card
		enable_r7780rp_irq(i);
	 * IRL5=CF Card Insert
	}
	 * IRL6=M66596
	 * IRL7=SD Card
	 * IRL8=Touch Panel
	 * IRL9=SCI
	 * IRL10=Serial
	 * IRL11=Extention #A
	 * IRL11=Extention #B
	 * IRL12=Debug LAN
	 * IRL13=Push Switch
	 * IRL14=ZiggBee IO
	 */

	for (i=0; i<15; i++)
		make_r7780rp_irq(i);
}
}
Loading