mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PATCH] htirq: refactor so we only have one function that writes to the chip
This refactoring actually optimizes the code a little by caching the value that we think the device is programmed with instead of reading it back from the hardware. Which simplifies the code a little and should speed things up a bit. This patch introduces the concept of a ht_irq_msg and modifies the architecture read/write routines to update this code. There is a minor consistency fix here as well as x86_64 forgot to initialize the htirq as masked. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Cc: Andi Kleen <ak@suse.de> Acked-by: Bryan O'Sullivan <bos@pathscale.com> Cc: <olson@pathscale.com> Cc: Roland Dreier <rolandd@cisco.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
parent
64d9fe6973
commit
ec68307cc5
4 changed files with 59 additions and 83 deletions
|
@ -1,11 +1,14 @@
|
|||
#ifndef LINUX_HTIRQ_H
|
||||
#define LINUX_HTIRQ_H
|
||||
|
||||
struct ht_irq_msg {
|
||||
u32 address_lo; /* low 32 bits of the ht irq message */
|
||||
u32 address_hi; /* high 32 bits of the it irq message */
|
||||
};
|
||||
|
||||
/* Helper functions.. */
|
||||
void write_ht_irq_low(unsigned int irq, u32 data);
|
||||
void write_ht_irq_high(unsigned int irq, u32 data);
|
||||
u32 read_ht_irq_low(unsigned int irq);
|
||||
u32 read_ht_irq_high(unsigned int irq);
|
||||
void fetch_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void write_ht_irq_msg(unsigned int irq, struct ht_irq_msg *msg);
|
||||
void mask_ht_irq(unsigned int irq);
|
||||
void unmask_ht_irq(unsigned int irq);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue