diff options
author | Li Yang <leoli@freescale.com> | 2006-10-04 00:10:46 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-10-04 01:24:27 -0400 |
commit | 9865853851313e0d94a4acde42d6f9d8070bb376 (patch) | |
tree | 0f4cca2bda6d2a21b8beb02ec2883bf328f1935c /include/asm-powerpc/qe_ic.h | |
parent | 9a1ab883c04e43f9f9819c40eb435bcdc4136193 (diff) |
[POWERPC] Add QUICC Engine (QE) infrastructure
Add QUICC Engine (QE) configuration, header files, and
QE management and library code that are used by QE devices
drivers.
Includes Leo's modifications up to, and including, the
platform_device to of_device adaptation:
"The series of patches add generic QE infrastructure called
qe_lib, and MPC8360EMDS board support. Qe_lib is used by
QE device drivers such as ucc_geth driver.
This version updates QE interrupt controller to use new irq
mapping mechanism, addresses all the comments received with
last submission and includes some style fixes.
v2: Change to use device tree for BCSR and MURAM;
Remove I/O port interrupt handling code as it is not generic
enough.
v3: Address comments from Kumar; Update definition of several
device tree nodes; Copyright style change."
In addition, the following changes have been made:
o removed typedefs
o uint -> u32 conversions
o removed following defines:
QE_SIZEOF_BD, BD_BUFFER_ARG, BD_BUFFER_CLEAR, BD_BUFFER,
BD_STATUS_AND_LENGTH_SET, BD_STATUS_AND_LENGTH, and BD_BUFFER_SET
because they hid sizeof/in_be32/out_be32 operations from the reader.
o fixed qe_snums_init() serial num assignment to use a const array
o made CONFIG_UCC_FAST select UCC_SLOW
o reduced NR_QE_IC_INTS from 128 to 64
o remove _IO_BASE, etc. defines (not used)
o removed irrelevant comments, added others to resemble removed BD_ defines
o realigned struct definitions in headers
o various other style fixes including things like pinMask -> pin_mask
o fixed a ton of whitespace issues
o marked ioregs as __be32/__be16
o removed platform_device code and redundant get_qe_base()
o removed redundant comments
o added cpu_relax() to qe_reset
o uncasted all get_property() assignments
o eliminated unneeded casts
o eliminated immrbar_phys_to_virt (not used)
Signed-off-by: Li Yang <leoli@freescale.com>
Signed-off-by: Shlomi Gridish <gridish@freescale.com>
Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'include/asm-powerpc/qe_ic.h')
-rw-r--r-- | include/asm-powerpc/qe_ic.h | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/include/asm-powerpc/qe_ic.h b/include/asm-powerpc/qe_ic.h new file mode 100644 index 000000000000..e386fb7e44b0 --- /dev/null +++ b/include/asm-powerpc/qe_ic.h | |||
@@ -0,0 +1,64 @@ | |||
1 | /* | ||
2 | * include/asm-powerpc/qe_ic.h | ||
3 | * | ||
4 | * Copyright (C) 2006 Freescale Semicondutor, Inc. All rights reserved. | ||
5 | * | ||
6 | * Authors: Shlomi Gridish <gridish@freescale.com> | ||
7 | * Li Yang <leoli@freescale.com> | ||
8 | * | ||
9 | * Description: | ||
10 | * QE IC external definitions and structure. | ||
11 | * | ||
12 | * This program is free software; you can redistribute it and/or modify it | ||
13 | * under the terms of the GNU General Public License as published by the | ||
14 | * Free Software Foundation; either version 2 of the License, or (at your | ||
15 | * option) any later version. | ||
16 | */ | ||
17 | #ifndef _ASM_POWERPC_QE_IC_H | ||
18 | #define _ASM_POWERPC_QE_IC_H | ||
19 | |||
20 | #include <linux/irq.h> | ||
21 | |||
22 | #define NUM_OF_QE_IC_GROUPS 6 | ||
23 | |||
24 | /* Flags when we init the QE IC */ | ||
25 | #define QE_IC_SPREADMODE_GRP_W 0x00000001 | ||
26 | #define QE_IC_SPREADMODE_GRP_X 0x00000002 | ||
27 | #define QE_IC_SPREADMODE_GRP_Y 0x00000004 | ||
28 | #define QE_IC_SPREADMODE_GRP_Z 0x00000008 | ||
29 | #define QE_IC_SPREADMODE_GRP_RISCA 0x00000010 | ||
30 | #define QE_IC_SPREADMODE_GRP_RISCB 0x00000020 | ||
31 | |||
32 | #define QE_IC_LOW_SIGNAL 0x00000100 | ||
33 | #define QE_IC_HIGH_SIGNAL 0x00000200 | ||
34 | |||
35 | #define QE_IC_GRP_W_PRI0_DEST_SIGNAL_HIGH 0x00001000 | ||
36 | #define QE_IC_GRP_W_PRI1_DEST_SIGNAL_HIGH 0x00002000 | ||
37 | #define QE_IC_GRP_X_PRI0_DEST_SIGNAL_HIGH 0x00004000 | ||
38 | #define QE_IC_GRP_X_PRI1_DEST_SIGNAL_HIGH 0x00008000 | ||
39 | #define QE_IC_GRP_Y_PRI0_DEST_SIGNAL_HIGH 0x00010000 | ||
40 | #define QE_IC_GRP_Y_PRI1_DEST_SIGNAL_HIGH 0x00020000 | ||
41 | #define QE_IC_GRP_Z_PRI0_DEST_SIGNAL_HIGH 0x00040000 | ||
42 | #define QE_IC_GRP_Z_PRI1_DEST_SIGNAL_HIGH 0x00080000 | ||
43 | #define QE_IC_GRP_RISCA_PRI0_DEST_SIGNAL_HIGH 0x00100000 | ||
44 | #define QE_IC_GRP_RISCA_PRI1_DEST_SIGNAL_HIGH 0x00200000 | ||
45 | #define QE_IC_GRP_RISCB_PRI0_DEST_SIGNAL_HIGH 0x00400000 | ||
46 | #define QE_IC_GRP_RISCB_PRI1_DEST_SIGNAL_HIGH 0x00800000 | ||
47 | #define QE_IC_GRP_W_DEST_SIGNAL_SHIFT (12) | ||
48 | |||
49 | /* QE interrupt sources groups */ | ||
50 | enum qe_ic_grp_id { | ||
51 | QE_IC_GRP_W = 0, /* QE interrupt controller group W */ | ||
52 | QE_IC_GRP_X, /* QE interrupt controller group X */ | ||
53 | QE_IC_GRP_Y, /* QE interrupt controller group Y */ | ||
54 | QE_IC_GRP_Z, /* QE interrupt controller group Z */ | ||
55 | QE_IC_GRP_RISCA, /* QE interrupt controller RISC group A */ | ||
56 | QE_IC_GRP_RISCB /* QE interrupt controller RISC group B */ | ||
57 | }; | ||
58 | |||
59 | void qe_ic_init(struct device_node *node, unsigned int flags); | ||
60 | void qe_ic_set_highest_priority(unsigned int virq, int high); | ||
61 | int qe_ic_set_priority(unsigned int virq, unsigned int priority); | ||
62 | int qe_ic_set_high_priority(unsigned int virq, unsigned int priority, int high); | ||
63 | |||
64 | #endif /* _ASM_POWERPC_QE_IC_H */ | ||