~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/mips/jz4740/irq.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno
  • Date: 2011-06-07 12:14:05 UTC
  • mfrom: (43.1.9 sid)
  • Revision ID: james.westby@ubuntu.com-20110607121405-i3h1rd7nrnd2b73h
Tags: 2.6.39-2
[ Ben Hutchings ]
* [x86] Enable BACKLIGHT_APPLE, replacing BACKLIGHT_MBP_NVIDIA
  (Closes: #627492)
* cgroups: Disable memory resource controller by default. Allow it
  to be enabled using kernel parameter 'cgroup_enable=memory'.
* rt2800usb: Enable support for more USB devices including
  Linksys WUSB600N (Closes: #596626) (this change was accidentally
  omitted from 2.6.39-1)
* [x86] Remove Celeron from list of processors supporting PAE. Most
  'Celeron M' models do not.
* Update debconf template translations:
  - Swedish (Martin Bagge) (Closes: #628932)
  - French (David Prévot) (Closes: #628191)
* aufs: Update for 2.6.39 (Closes: #627837)
* Add stable 2.6.39.1, including:
  - ext4: dont set PageUptodate in ext4_end_bio()
  - pata_cmd64x: fix boot crash on parisc (Closes: #622997, #622745)
  - ext3: Fix fs corruption when make_indexed_dir() fails
  - netfilter: nf_ct_sip: validate Content-Length in TCP SIP messages
  - sctp: fix race between sctp_bind_addr_free() and
    sctp_bind_addr_conflict()
  - sctp: fix memory leak of the ASCONF queue when free asoc
  - md/bitmap: fix saving of events_cleared and other state
  - cdc_acm: Fix oops when Droids MuIn LCD is connected
  - cx88: Fix conversion from BKL to fine-grained locks (Closes: #619827)
  - keys: Set cred->user_ns in key_replace_session_keyring (CVE-2011-2184)
  - tmpfs: fix race between truncate and writepage
  - nfs41: Correct offset for LAYOUTCOMMIT
  - xen/mmu: fix a race window causing leave_mm BUG()
  - ext4: fix possible use-after-free in ext4_remove_li_request()
  For the complete list of changes, see:
   http://www.kernel.org/pub/linux/kernel/v2.6/ChangeLog-2.6.39.1
* Bump ABI to 2
* netfilter: Enable IP_SET, IP_SET_BITMAP_IP, IP_SET_BITMAP_IPMAC,
  IP_SET_BITMAP_PORT, IP_SET_HASH_IP, IP_SET_HASH_IPPORT,
  IP_SET_HASH_IPPORTIP, IP_SET_HASH_IPPORTNET, IP_SET_HASH_NET,
  IP_SET_HASH_NETPORT, IP_SET_LIST_SET, NETFILTER_XT_SET as modules
  (Closes: #629401)

[ Aurelien Jarno ]
* [mipsel/loongson-2f] Disable_SCSI_LPFC to workaround GCC ICE.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
#define IRQ_BIT(x) BIT((x) - JZ4740_IRQ_BASE)
45
45
 
46
 
static void intc_irq_unmask(unsigned int irq)
47
 
{
48
 
        writel(IRQ_BIT(irq), jz_intc_base + JZ_REG_INTC_CLEAR_MASK);
49
 
}
50
 
 
51
 
static void intc_irq_mask(unsigned int irq)
52
 
{
53
 
        writel(IRQ_BIT(irq), jz_intc_base + JZ_REG_INTC_SET_MASK);
54
 
}
55
 
 
56
 
static int intc_irq_set_wake(unsigned int irq, unsigned int on)
 
46
static inline unsigned long intc_irq_bit(struct irq_data *data)
 
47
{
 
48
        return (unsigned long)irq_data_get_irq_chip_data(data);
 
49
}
 
50
 
 
51
static void intc_irq_unmask(struct irq_data *data)
 
52
{
 
53
        writel(intc_irq_bit(data), jz_intc_base + JZ_REG_INTC_CLEAR_MASK);
 
54
}
 
55
 
 
56
static void intc_irq_mask(struct irq_data *data)
 
57
{
 
58
        writel(intc_irq_bit(data), jz_intc_base + JZ_REG_INTC_SET_MASK);
 
59
}
 
60
 
 
61
static int intc_irq_set_wake(struct irq_data *data, unsigned int on)
57
62
{
58
63
        if (on)
59
 
                jz_intc_wakeup |= IRQ_BIT(irq);
 
64
                jz_intc_wakeup |= intc_irq_bit(data);
60
65
        else
61
 
                jz_intc_wakeup &= ~IRQ_BIT(irq);
 
66
                jz_intc_wakeup &= ~intc_irq_bit(data);
62
67
 
63
68
        return 0;
64
69
}
65
70
 
66
71
static struct irq_chip intc_irq_type = {
67
72
        .name =         "INTC",
68
 
        .mask =         intc_irq_mask,
69
 
        .mask_ack =     intc_irq_mask,
70
 
        .unmask =       intc_irq_unmask,
71
 
        .set_wake =     intc_irq_set_wake,
 
73
        .irq_mask =     intc_irq_mask,
 
74
        .irq_mask_ack = intc_irq_mask,
 
75
        .irq_unmask =   intc_irq_unmask,
 
76
        .irq_set_wake = intc_irq_set_wake,
72
77
};
73
78
 
74
79
static irqreturn_t jz4740_cascade(int irq, void *data)
95
100
 
96
101
        jz_intc_base = ioremap(JZ4740_INTC_BASE_ADDR, 0x14);
97
102
 
 
103
        /* Mask all irqs */
 
104
        writel(0xffffffff, jz_intc_base + JZ_REG_INTC_SET_MASK);
 
105
 
98
106
        for (i = JZ4740_IRQ_BASE; i < JZ4740_IRQ_BASE + 32; i++) {
99
 
                intc_irq_mask(i);
100
 
                set_irq_chip_and_handler(i, &intc_irq_type, handle_level_irq);
 
107
                irq_set_chip_data(i, (void *)IRQ_BIT(i));
 
108
                irq_set_chip_and_handler(i, &intc_irq_type, handle_level_irq);
101
109
        }
102
110
 
103
111
        setup_irq(2, &jz4740_cascade_action);