diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2008-07-18 00:55:51 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-18 00:55:51 -0400 |
commit | f5e706ad886b6a5eb59637830110b09ccebf01c5 (patch) | |
tree | ea043a0a28e16a2ac6395c35d737f52698a165b7 /include/asm-sparc64/ebus.h | |
parent | 5e3609f60c09f0f15f71f80c6d7933b2c7be71a6 (diff) |
sparc: join the remaining header files
With this commit all sparc64 header files are moved to asm-sparc.
The remaining files (71 files) were too different to be trivially
merged so divide them up in a _32.h and a _64.h file which
are both included from the file with no bit size.
The following script were used:
cd include
FILES=`wc -l asm-sparc64/*h | grep -v '^ 1' | cut -b 20-`
for FILE in ${FILES}; do
echo $FILE:
BASE=`echo $FILE | cut -d '.' -f 1`
FN32=${BASE}_32.h
FN64=${BASE}_64.h
GUARD=___ASM_SPARC_`echo $BASE | tr '-' '_' | tr [:lower:] [:upper:]`_H
git mv asm-sparc/$FILE asm-sparc/$FN32
git mv asm-sparc64/$FILE asm-sparc/$FN64
echo git mv done
printf "#ifndef %s\n" $GUARD > asm-sparc/$FILE
printf "#define %s\n" $GUARD >> asm-sparc/$FILE
printf "#if defined(__sparc__) && defined(__arch64__)\n" >> asm-sparc/$FILE
printf "#include <asm-sparc/%s>\n" $FN64 >> asm-sparc/$FILE
printf "#else\n" >> asm-sparc/$FILE
printf "#include <asm-sparc/%s>\n" $FN32 >> asm-sparc/$FILE
printf "#endif\n" >> asm-sparc/$FILE
printf "#endif\n" >> asm-sparc/$FILE
git add asm-sparc/$FILE
echo new file done
printf "#include <asm-sparc/%s>\n" $FILE > asm-sparc64/$FILE
git add asm-sparc64/$FILE
echo sparc64 file done
done
The guard contains three '_' to avoid conflict with existing guards.
In additing the two Kbuild files are emptied to avoid breaking
headers_* targets.
We will reintroduce the exported header files when the necessary
kbuild changes are merged.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/asm-sparc64/ebus.h')
-rw-r--r-- | include/asm-sparc64/ebus.h | 95 |
1 files changed, 1 insertions, 94 deletions
diff --git a/include/asm-sparc64/ebus.h b/include/asm-sparc64/ebus.h index fcc62b97ced5..d7d476158bd5 100644 --- a/include/asm-sparc64/ebus.h +++ b/include/asm-sparc64/ebus.h | |||
@@ -1,94 +1 @@ | |||
1 | /* | #include <asm-sparc/ebus.h> | |
2 | * ebus.h: PCI to Ebus pseudo driver software state. | ||
3 | * | ||
4 | * Copyright (C) 1997 Eddie C. Dost (ecd@skynet.be) | ||
5 | * Copyright (C) 1999 David S. Miller (davem@redhat.com) | ||
6 | */ | ||
7 | |||
8 | #ifndef __SPARC64_EBUS_H | ||
9 | #define __SPARC64_EBUS_H | ||
10 | |||
11 | #include <asm/oplib.h> | ||
12 | #include <asm/prom.h> | ||
13 | #include <asm/of_device.h> | ||
14 | |||
15 | struct linux_ebus_child { | ||
16 | struct linux_ebus_child *next; | ||
17 | struct linux_ebus_device *parent; | ||
18 | struct linux_ebus *bus; | ||
19 | struct device_node *prom_node; | ||
20 | struct resource resource[PROMREG_MAX]; | ||
21 | int num_addrs; | ||
22 | unsigned int irqs[PROMINTR_MAX]; | ||
23 | int num_irqs; | ||
24 | }; | ||
25 | |||
26 | struct linux_ebus_device { | ||
27 | struct of_device ofdev; | ||
28 | struct linux_ebus_device *next; | ||
29 | struct linux_ebus_child *children; | ||
30 | struct linux_ebus *bus; | ||
31 | struct device_node *prom_node; | ||
32 | struct resource resource[PROMREG_MAX]; | ||
33 | int num_addrs; | ||
34 | unsigned int irqs[PROMINTR_MAX]; | ||
35 | int num_irqs; | ||
36 | }; | ||
37 | #define to_ebus_device(d) container_of(d, struct linux_ebus_device, ofdev.dev) | ||
38 | |||
39 | struct linux_ebus { | ||
40 | struct of_device ofdev; | ||
41 | struct linux_ebus *next; | ||
42 | struct linux_ebus_device *devices; | ||
43 | struct pci_dev *self; | ||
44 | int index; | ||
45 | int is_rio; | ||
46 | struct device_node *prom_node; | ||
47 | }; | ||
48 | #define to_ebus(d) container_of(d, struct linux_ebus, ofdev.dev) | ||
49 | |||
50 | struct ebus_dma_info { | ||
51 | spinlock_t lock; | ||
52 | void __iomem *regs; | ||
53 | |||
54 | unsigned int flags; | ||
55 | #define EBUS_DMA_FLAG_USE_EBDMA_HANDLER 0x00000001 | ||
56 | #define EBUS_DMA_FLAG_TCI_DISABLE 0x00000002 | ||
57 | |||
58 | /* These are only valid is EBUS_DMA_FLAG_USE_EBDMA_HANDLER is | ||
59 | * set. | ||
60 | */ | ||
61 | void (*callback)(struct ebus_dma_info *p, int event, void *cookie); | ||
62 | void *client_cookie; | ||
63 | unsigned int irq; | ||
64 | #define EBUS_DMA_EVENT_ERROR 1 | ||
65 | #define EBUS_DMA_EVENT_DMA 2 | ||
66 | #define EBUS_DMA_EVENT_DEVICE 4 | ||
67 | |||
68 | unsigned char name[64]; | ||
69 | }; | ||
70 | |||
71 | extern int ebus_dma_register(struct ebus_dma_info *p); | ||
72 | extern int ebus_dma_irq_enable(struct ebus_dma_info *p, int on); | ||
73 | extern void ebus_dma_unregister(struct ebus_dma_info *p); | ||
74 | extern int ebus_dma_request(struct ebus_dma_info *p, dma_addr_t bus_addr, | ||
75 | size_t len); | ||
76 | extern void ebus_dma_prepare(struct ebus_dma_info *p, int write); | ||
77 | extern unsigned int ebus_dma_residue(struct ebus_dma_info *p); | ||
78 | extern unsigned int ebus_dma_addr(struct ebus_dma_info *p); | ||
79 | extern void ebus_dma_enable(struct ebus_dma_info *p, int on); | ||
80 | |||
81 | extern struct linux_ebus *ebus_chain; | ||
82 | |||
83 | extern void ebus_init(void); | ||
84 | |||
85 | #define for_each_ebus(bus) \ | ||
86 | for((bus) = ebus_chain; (bus); (bus) = (bus)->next) | ||
87 | |||
88 | #define for_each_ebusdev(dev, bus) \ | ||
89 | for((dev) = (bus)->devices; (dev); (dev) = (dev)->next) | ||
90 | |||
91 | #define for_each_edevchild(dev, child) \ | ||
92 | for((child) = (dev)->children; (child); (child) = (child)->next) | ||
93 | |||
94 | #endif /* !(__SPARC64_EBUS_H) */ | ||