diff options
author | David S. Miller <davem@davemloft.net> | 2008-09-16 17:11:43 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-09-16 17:11:43 -0400 |
commit | 2e57572a50a4de41c6cbc879a4866a312d4cd316 (patch) | |
tree | c4f58ec96c06642c4b415b881d3f0a3b673d5b44 /arch/sparc64/kernel/psycho_common.h | |
parent | 9b2e43ae4e9609f80034dfe8de895045cac52d77 (diff) | |
parent | f948cc6ab9e61a8e88d70ee9aafc690e6d26f92c (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
Conflicts:
arch/sparc64/kernel/pci_psycho.c
Diffstat (limited to 'arch/sparc64/kernel/psycho_common.h')
-rw-r--r-- | arch/sparc64/kernel/psycho_common.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/psycho_common.h b/arch/sparc64/kernel/psycho_common.h index b53aa8dcad2c..092c278ef28d 100644 --- a/arch/sparc64/kernel/psycho_common.h +++ b/arch/sparc64/kernel/psycho_common.h | |||
@@ -1,6 +1,31 @@ | |||
1 | #ifndef _PSYCHO_COMMON_H | 1 | #ifndef _PSYCHO_COMMON_H |
2 | #define _PSYCHO_COMMON_H | 2 | #define _PSYCHO_COMMON_H |
3 | 3 | ||
4 | /* U2P Programmer's Manual, page 13-55, configuration space | ||
5 | * address format: | ||
6 | * | ||
7 | * 32 24 23 16 15 11 10 8 7 2 1 0 | ||
8 | * --------------------------------------------------------- | ||
9 | * |0 0 0 0 0 0 0 0 1| bus | device | function | reg | 0 0 | | ||
10 | * --------------------------------------------------------- | ||
11 | */ | ||
12 | #define PSYCHO_CONFIG_BASE(PBM) \ | ||
13 | ((PBM)->config_space | (1UL << 24)) | ||
14 | #define PSYCHO_CONFIG_ENCODE(BUS, DEVFN, REG) \ | ||
15 | (((unsigned long)(BUS) << 16) | \ | ||
16 | ((unsigned long)(DEVFN) << 8) | \ | ||
17 | ((unsigned long)(REG))) | ||
18 | |||
19 | static inline void *psycho_pci_config_mkaddr(struct pci_pbm_info *pbm, | ||
20 | unsigned char bus, | ||
21 | unsigned int devfn, | ||
22 | int where) | ||
23 | { | ||
24 | return (void *) | ||
25 | (PSYCHO_CONFIG_BASE(pbm) | | ||
26 | PSYCHO_CONFIG_ENCODE(bus, devfn, where)); | ||
27 | } | ||
28 | |||
4 | enum psycho_error_type { | 29 | enum psycho_error_type { |
5 | UE_ERR, CE_ERR, PCI_ERR | 30 | UE_ERR, CE_ERR, PCI_ERR |
6 | }; | 31 | }; |