diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2005-07-07 06:08:27 -0400 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2005-07-07 06:08:27 -0400 |
commit | 717cb906bd43a9ac00631d600adda5c6546843a6 (patch) | |
tree | f41b250e9e0fa1e664f002fa9c4608d94527f2f2 /include/asm-ppc | |
parent | 22f579c621e2f264e6d093b07d75f99bc97d5df2 (diff) | |
parent | c101f3136cc98a003d0d16be6fab7d0d950581a6 (diff) |
Merge ../linux-2.6/
Diffstat (limited to 'include/asm-ppc')
-rw-r--r-- | include/asm-ppc/macio.h | 5 | ||||
-rw-r--r-- | include/asm-ppc/mpc8xx.h | 4 | ||||
-rw-r--r-- | include/asm-ppc/of_device.h | 20 | ||||
-rw-r--r-- | include/asm-ppc/pc_serial.h | 86 | ||||
-rw-r--r-- | include/asm-ppc/pci.h | 16 |
5 files changed, 28 insertions, 103 deletions
diff --git a/include/asm-ppc/macio.h b/include/asm-ppc/macio.h index 2cafc9978607..a481b772d154 100644 --- a/include/asm-ppc/macio.h +++ b/include/asm-ppc/macio.h | |||
@@ -1,6 +1,7 @@ | |||
1 | #ifndef __MACIO_ASIC_H__ | 1 | #ifndef __MACIO_ASIC_H__ |
2 | #define __MACIO_ASIC_H__ | 2 | #define __MACIO_ASIC_H__ |
3 | 3 | ||
4 | #include <linux/mod_devicetable.h> | ||
4 | #include <asm/of_device.h> | 5 | #include <asm/of_device.h> |
5 | 6 | ||
6 | extern struct bus_type macio_bus_type; | 7 | extern struct bus_type macio_bus_type; |
@@ -120,10 +121,10 @@ static inline struct pci_dev *macio_get_pci_dev(struct macio_dev *mdev) | |||
120 | struct macio_driver | 121 | struct macio_driver |
121 | { | 122 | { |
122 | char *name; | 123 | char *name; |
123 | struct of_match *match_table; | 124 | struct of_device_id *match_table; |
124 | struct module *owner; | 125 | struct module *owner; |
125 | 126 | ||
126 | int (*probe)(struct macio_dev* dev, const struct of_match *match); | 127 | int (*probe)(struct macio_dev* dev, const struct of_device_id *match); |
127 | int (*remove)(struct macio_dev* dev); | 128 | int (*remove)(struct macio_dev* dev); |
128 | 129 | ||
129 | int (*suspend)(struct macio_dev* dev, pm_message_t state); | 130 | int (*suspend)(struct macio_dev* dev, pm_message_t state); |
diff --git a/include/asm-ppc/mpc8xx.h b/include/asm-ppc/mpc8xx.h index 714d69c819d3..7c31f2d564a1 100644 --- a/include/asm-ppc/mpc8xx.h +++ b/include/asm-ppc/mpc8xx.h | |||
@@ -68,6 +68,10 @@ | |||
68 | #include <platforms/lantec.h> | 68 | #include <platforms/lantec.h> |
69 | #endif | 69 | #endif |
70 | 70 | ||
71 | #if defined(CONFIG_MPC885ADS) | ||
72 | #include <platforms/mpc885ads.h> | ||
73 | #endif | ||
74 | |||
71 | /* Currently, all 8xx boards that support a processor to PCI/ISA bridge | 75 | /* Currently, all 8xx boards that support a processor to PCI/ISA bridge |
72 | * use the same memory map. | 76 | * use the same memory map. |
73 | */ | 77 | */ |
diff --git a/include/asm-ppc/of_device.h b/include/asm-ppc/of_device.h index 7229735a7c18..4b264cfd3998 100644 --- a/include/asm-ppc/of_device.h +++ b/include/asm-ppc/of_device.h | |||
@@ -24,20 +24,8 @@ struct of_device | |||
24 | }; | 24 | }; |
25 | #define to_of_device(d) container_of(d, struct of_device, dev) | 25 | #define to_of_device(d) container_of(d, struct of_device, dev) |
26 | 26 | ||
27 | /* | 27 | extern const struct of_device_id *of_match_device( |
28 | * Struct used for matching a device | 28 | const struct of_device_id *matches, const struct of_device *dev); |
29 | */ | ||
30 | struct of_match | ||
31 | { | ||
32 | char *name; | ||
33 | char *type; | ||
34 | char *compatible; | ||
35 | void *data; | ||
36 | }; | ||
37 | #define OF_ANY_MATCH ((char *)-1L) | ||
38 | |||
39 | extern const struct of_match *of_match_device( | ||
40 | const struct of_match *matches, const struct of_device *dev); | ||
41 | 29 | ||
42 | extern struct of_device *of_dev_get(struct of_device *dev); | 30 | extern struct of_device *of_dev_get(struct of_device *dev); |
43 | extern void of_dev_put(struct of_device *dev); | 31 | extern void of_dev_put(struct of_device *dev); |
@@ -49,10 +37,10 @@ extern void of_dev_put(struct of_device *dev); | |||
49 | struct of_platform_driver | 37 | struct of_platform_driver |
50 | { | 38 | { |
51 | char *name; | 39 | char *name; |
52 | struct of_match *match_table; | 40 | struct of_device_id *match_table; |
53 | struct module *owner; | 41 | struct module *owner; |
54 | 42 | ||
55 | int (*probe)(struct of_device* dev, const struct of_match *match); | 43 | int (*probe)(struct of_device* dev, const struct of_device_id *match); |
56 | int (*remove)(struct of_device* dev); | 44 | int (*remove)(struct of_device* dev); |
57 | 45 | ||
58 | int (*suspend)(struct of_device* dev, pm_message_t state); | 46 | int (*suspend)(struct of_device* dev, pm_message_t state); |
diff --git a/include/asm-ppc/pc_serial.h b/include/asm-ppc/pc_serial.h index fa9cbb67ce3e..8f994f9f8857 100644 --- a/include/asm-ppc/pc_serial.h +++ b/include/asm-ppc/pc_serial.h | |||
@@ -35,93 +35,9 @@ | |||
35 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF | 35 | #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF |
36 | #endif | 36 | #endif |
37 | 37 | ||
38 | #ifdef CONFIG_SERIAL_MANY_PORTS | 38 | #define SERIAL_PORT_DFNS \ |
39 | #define FOURPORT_FLAGS ASYNC_FOURPORT | ||
40 | #define ACCENT_FLAGS 0 | ||
41 | #define BOCA_FLAGS 0 | ||
42 | #define HUB6_FLAGS 0 | ||
43 | #endif | ||
44 | |||
45 | /* | ||
46 | * The following define the access methods for the HUB6 card. All | ||
47 | * access is through two ports for all 24 possible chips. The card is | ||
48 | * selected through the high 2 bits, the port on that card with the | ||
49 | * "middle" 3 bits, and the register on that port with the bottom | ||
50 | * 3 bits. | ||
51 | * | ||
52 | * While the access port and interrupt is configurable, the default | ||
53 | * port locations are 0x302 for the port control register, and 0x303 | ||
54 | * for the data read/write register. Normally, the interrupt is at irq3 | ||
55 | * but can be anything from 3 to 7 inclusive. Note that using 3 will | ||
56 | * require disabling com2. | ||
57 | */ | ||
58 | |||
59 | #define C_P(card,port) (((card)<<6|(port)<<3) + 1) | ||
60 | |||
61 | #define STD_SERIAL_PORT_DEFNS \ | ||
62 | /* UART CLK PORT IRQ FLAGS */ \ | 39 | /* UART CLK PORT IRQ FLAGS */ \ |
63 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ | 40 | { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ |
64 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ | 41 | { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ |
65 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ | 42 | { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ |
66 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ | 43 | { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ |
67 | |||
68 | |||
69 | #ifdef CONFIG_SERIAL_MANY_PORTS | ||
70 | #define EXTRA_SERIAL_PORT_DEFNS \ | ||
71 | { 0, BASE_BAUD, 0x1A0, 9, FOURPORT_FLAGS }, /* ttyS4 */ \ | ||
72 | { 0, BASE_BAUD, 0x1A8, 9, FOURPORT_FLAGS }, /* ttyS5 */ \ | ||
73 | { 0, BASE_BAUD, 0x1B0, 9, FOURPORT_FLAGS }, /* ttyS6 */ \ | ||
74 | { 0, BASE_BAUD, 0x1B8, 9, FOURPORT_FLAGS }, /* ttyS7 */ \ | ||
75 | { 0, BASE_BAUD, 0x2A0, 5, FOURPORT_FLAGS }, /* ttyS8 */ \ | ||
76 | { 0, BASE_BAUD, 0x2A8, 5, FOURPORT_FLAGS }, /* ttyS9 */ \ | ||
77 | { 0, BASE_BAUD, 0x2B0, 5, FOURPORT_FLAGS }, /* ttyS10 */ \ | ||
78 | { 0, BASE_BAUD, 0x2B8, 5, FOURPORT_FLAGS }, /* ttyS11 */ \ | ||
79 | { 0, BASE_BAUD, 0x330, 4, ACCENT_FLAGS }, /* ttyS12 */ \ | ||
80 | { 0, BASE_BAUD, 0x338, 4, ACCENT_FLAGS }, /* ttyS13 */ \ | ||
81 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS14 (spare) */ \ | ||
82 | { 0, BASE_BAUD, 0x000, 0, 0 }, /* ttyS15 (spare) */ \ | ||
83 | { 0, BASE_BAUD, 0x100, 12, BOCA_FLAGS }, /* ttyS16 */ \ | ||
84 | { 0, BASE_BAUD, 0x108, 12, BOCA_FLAGS }, /* ttyS17 */ \ | ||
85 | { 0, BASE_BAUD, 0x110, 12, BOCA_FLAGS }, /* ttyS18 */ \ | ||
86 | { 0, BASE_BAUD, 0x118, 12, BOCA_FLAGS }, /* ttyS19 */ \ | ||
87 | { 0, BASE_BAUD, 0x120, 12, BOCA_FLAGS }, /* ttyS20 */ \ | ||
88 | { 0, BASE_BAUD, 0x128, 12, BOCA_FLAGS }, /* ttyS21 */ \ | ||
89 | { 0, BASE_BAUD, 0x130, 12, BOCA_FLAGS }, /* ttyS22 */ \ | ||
90 | { 0, BASE_BAUD, 0x138, 12, BOCA_FLAGS }, /* ttyS23 */ \ | ||
91 | { 0, BASE_BAUD, 0x140, 12, BOCA_FLAGS }, /* ttyS24 */ \ | ||
92 | { 0, BASE_BAUD, 0x148, 12, BOCA_FLAGS }, /* ttyS25 */ \ | ||
93 | { 0, BASE_BAUD, 0x150, 12, BOCA_FLAGS }, /* ttyS26 */ \ | ||
94 | { 0, BASE_BAUD, 0x158, 12, BOCA_FLAGS }, /* ttyS27 */ \ | ||
95 | { 0, BASE_BAUD, 0x160, 12, BOCA_FLAGS }, /* ttyS28 */ \ | ||
96 | { 0, BASE_BAUD, 0x168, 12, BOCA_FLAGS }, /* ttyS29 */ \ | ||
97 | { 0, BASE_BAUD, 0x170, 12, BOCA_FLAGS }, /* ttyS30 */ \ | ||
98 | { 0, BASE_BAUD, 0x178, 12, BOCA_FLAGS }, /* ttyS31 */ | ||
99 | #else | ||
100 | #define EXTRA_SERIAL_PORT_DEFNS | ||
101 | #endif | ||
102 | |||
103 | /* You can have up to four HUB6's in the system, but I've only | ||
104 | * included two cards here for a total of twelve ports. | ||
105 | */ | ||
106 | #if (defined(CONFIG_HUB6) && defined(CONFIG_SERIAL_MANY_PORTS)) | ||
107 | #define HUB6_SERIAL_PORT_DFNS \ | ||
108 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,0) }, /* ttyS32 */ \ | ||
109 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,1) }, /* ttyS33 */ \ | ||
110 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,2) }, /* ttyS34 */ \ | ||
111 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,3) }, /* ttyS35 */ \ | ||
112 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,4) }, /* ttyS36 */ \ | ||
113 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(0,5) }, /* ttyS37 */ \ | ||
114 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,0) }, /* ttyS38 */ \ | ||
115 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,1) }, /* ttyS39 */ \ | ||
116 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,2) }, /* ttyS40 */ \ | ||
117 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,3) }, /* ttyS41 */ \ | ||
118 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,4) }, /* ttyS42 */ \ | ||
119 | { 0, BASE_BAUD, 0x302, 3, HUB6_FLAGS, C_P(1,5) }, /* ttyS43 */ | ||
120 | #else | ||
121 | #define HUB6_SERIAL_PORT_DFNS | ||
122 | #endif | ||
123 | |||
124 | #define SERIAL_PORT_DFNS \ | ||
125 | STD_SERIAL_PORT_DEFNS \ | ||
126 | EXTRA_SERIAL_PORT_DEFNS \ | ||
127 | HUB6_SERIAL_PORT_DFNS | ||
diff --git a/include/asm-ppc/pci.h b/include/asm-ppc/pci.h index ce5ae6d048f5..db0a2a0ec74d 100644 --- a/include/asm-ppc/pci.h +++ b/include/asm-ppc/pci.h | |||
@@ -69,6 +69,16 @@ extern unsigned long pci_bus_to_phys(unsigned int ba, int busnr); | |||
69 | #define pci_unmap_len(PTR, LEN_NAME) (0) | 69 | #define pci_unmap_len(PTR, LEN_NAME) (0) |
70 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) | 70 | #define pci_unmap_len_set(PTR, LEN_NAME, VAL) do { } while (0) |
71 | 71 | ||
72 | #ifdef CONFIG_PCI | ||
73 | static inline void pci_dma_burst_advice(struct pci_dev *pdev, | ||
74 | enum pci_dma_burst_strategy *strat, | ||
75 | unsigned long *strategy_parameter) | ||
76 | { | ||
77 | *strat = PCI_DMA_BURST_INFINITY; | ||
78 | *strategy_parameter = ~0UL; | ||
79 | } | ||
80 | #endif | ||
81 | |||
72 | /* | 82 | /* |
73 | * At present there are very few 32-bit PPC machines that can have | 83 | * At present there are very few 32-bit PPC machines that can have |
74 | * memory above the 4GB point, and we don't support that. | 84 | * memory above the 4GB point, and we don't support that. |
@@ -103,6 +113,12 @@ extern pgprot_t pci_phys_mem_access_prot(struct file *file, | |||
103 | unsigned long size, | 113 | unsigned long size, |
104 | pgprot_t prot); | 114 | pgprot_t prot); |
105 | 115 | ||
116 | #define HAVE_ARCH_PCI_RESOURCE_TO_USER | ||
117 | extern void pci_resource_to_user(const struct pci_dev *dev, int bar, | ||
118 | const struct resource *rsrc, | ||
119 | u64 *start, u64 *end); | ||
120 | |||
121 | |||
106 | #endif /* __KERNEL__ */ | 122 | #endif /* __KERNEL__ */ |
107 | 123 | ||
108 | #endif /* __PPC_PCI_H */ | 124 | #endif /* __PPC_PCI_H */ |