aboutsummaryrefslogtreecommitdiffstats
path: root/arch/ppc64/kernel/pmac_feature.c
diff options
context:
space:
mode:
authorJon Loeliger <linuxppc@jdl.com>2005-09-17 11:36:54 -0400
committerPaul Mackerras <paulus@samba.org>2005-09-18 19:38:49 -0400
commitaacaf9bd9646f6f611a08fca976411b6e5ddefe2 (patch)
tree604853646cc176c0a0908db39f254285121fa50c /arch/ppc64/kernel/pmac_feature.c
parentf495a8bfd6a52cf32859f93d5320bb234d8a9560 (diff)
[PATCH] powerpc: Remove sections use from ppc64 and drivers
Here is a new patch that removes all notion of the pmac, prep, chrp and openfirmware initialization sections, and then unifies the sections.h files without those __pmac, etc, sections identifiers cluttering things up. Signed-off-by: Jon Loeliger <jdl@freescale.com> Signed-off-by: Kumar Gala <kumar.gala@freescale.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/ppc64/kernel/pmac_feature.c')
-rw-r--r--arch/ppc64/kernel/pmac_feature.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/arch/ppc64/kernel/pmac_feature.c b/arch/ppc64/kernel/pmac_feature.c
index eb4e6c3f694d..26075f11db77 100644
--- a/arch/ppc64/kernel/pmac_feature.c
+++ b/arch/ppc64/kernel/pmac_feature.c
@@ -53,7 +53,7 @@
53 * We use a single global lock to protect accesses. Each driver has 53 * We use a single global lock to protect accesses. Each driver has
54 * to take care of its own locking 54 * to take care of its own locking
55 */ 55 */
56static DEFINE_SPINLOCK(feature_lock __pmacdata); 56static DEFINE_SPINLOCK(feature_lock);
57 57
58#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags); 58#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags);
59#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags); 59#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags);
@@ -62,9 +62,9 @@ static DEFINE_SPINLOCK(feature_lock __pmacdata);
62/* 62/*
63 * Instance of some macio stuffs 63 * Instance of some macio stuffs
64 */ 64 */
65struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata; 65struct macio_chip macio_chips[MAX_MACIO_CHIPS] ;
66 66
67struct macio_chip* __pmac macio_find(struct device_node* child, int type) 67struct macio_chip* macio_find(struct device_node* child, int type)
68{ 68{
69 while(child) { 69 while(child) {
70 int i; 70 int i;
@@ -79,7 +79,7 @@ struct macio_chip* __pmac macio_find(struct device_node* child, int type)
79} 79}
80EXPORT_SYMBOL_GPL(macio_find); 80EXPORT_SYMBOL_GPL(macio_find);
81 81
82static const char* macio_names[] __pmacdata = 82static const char* macio_names[] =
83{ 83{
84 "Unknown", 84 "Unknown",
85 "Grand Central", 85 "Grand Central",
@@ -106,9 +106,9 @@ static const char* macio_names[] __pmacdata =
106#define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v))) 106#define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v)))
107#define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v))) 107#define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v)))
108 108
109static struct device_node* uninorth_node __pmacdata; 109static struct device_node* uninorth_node;
110static u32* uninorth_base __pmacdata; 110static u32* uninorth_base;
111static u32 uninorth_rev __pmacdata; 111static u32 uninorth_rev;
112static void *u3_ht; 112static void *u3_ht;
113 113
114extern struct device_node *k2_skiplist[2]; 114extern struct device_node *k2_skiplist[2];
@@ -133,14 +133,14 @@ struct pmac_mb_def
133 struct feature_table_entry* features; 133 struct feature_table_entry* features;
134 unsigned long board_flags; 134 unsigned long board_flags;
135}; 135};
136static struct pmac_mb_def pmac_mb __pmacdata; 136static struct pmac_mb_def pmac_mb;
137 137
138/* 138/*
139 * Here are the chip specific feature functions 139 * Here are the chip specific feature functions
140 */ 140 */
141 141
142 142
143static long __pmac g5_read_gpio(struct device_node* node, long param, long value) 143static long g5_read_gpio(struct device_node* node, long param, long value)
144{ 144{
145 struct macio_chip* macio = &macio_chips[0]; 145 struct macio_chip* macio = &macio_chips[0];
146 146
@@ -148,7 +148,7 @@ static long __pmac g5_read_gpio(struct device_node* node, long param, long value
148} 148}
149 149
150 150
151static long __pmac g5_write_gpio(struct device_node* node, long param, long value) 151static long g5_write_gpio(struct device_node* node, long param, long value)
152{ 152{
153 struct macio_chip* macio = &macio_chips[0]; 153 struct macio_chip* macio = &macio_chips[0];
154 154
@@ -156,7 +156,7 @@ static long __pmac g5_write_gpio(struct device_node* node, long param, long valu
156 return 0; 156 return 0;
157} 157}
158 158
159static long __pmac g5_gmac_enable(struct device_node* node, long param, long value) 159static long g5_gmac_enable(struct device_node* node, long param, long value)
160{ 160{
161 struct macio_chip* macio = &macio_chips[0]; 161 struct macio_chip* macio = &macio_chips[0];
162 unsigned long flags; 162 unsigned long flags;
@@ -181,7 +181,7 @@ static long __pmac g5_gmac_enable(struct device_node* node, long param, long val
181 return 0; 181 return 0;
182} 182}
183 183
184static long __pmac g5_fw_enable(struct device_node* node, long param, long value) 184static long g5_fw_enable(struct device_node* node, long param, long value)
185{ 185{
186 struct macio_chip* macio = &macio_chips[0]; 186 struct macio_chip* macio = &macio_chips[0];
187 unsigned long flags; 187 unsigned long flags;
@@ -206,7 +206,7 @@ static long __pmac g5_fw_enable(struct device_node* node, long param, long value
206 return 0; 206 return 0;
207} 207}
208 208
209static long __pmac g5_mpic_enable(struct device_node* node, long param, long value) 209static long g5_mpic_enable(struct device_node* node, long param, long value)
210{ 210{
211 unsigned long flags; 211 unsigned long flags;
212 212
@@ -220,7 +220,7 @@ static long __pmac g5_mpic_enable(struct device_node* node, long param, long val
220 return 0; 220 return 0;
221} 221}
222 222
223static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long value) 223static long g5_eth_phy_reset(struct device_node* node, long param, long value)
224{ 224{
225 struct macio_chip* macio = &macio_chips[0]; 225 struct macio_chip* macio = &macio_chips[0];
226 struct device_node *phy; 226 struct device_node *phy;
@@ -250,7 +250,7 @@ static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long v
250 return 0; 250 return 0;
251} 251}
252 252
253static long __pmac g5_i2s_enable(struct device_node *node, long param, long value) 253static long g5_i2s_enable(struct device_node *node, long param, long value)
254{ 254{
255 /* Very crude implementation for now */ 255 /* Very crude implementation for now */
256 struct macio_chip* macio = &macio_chips[0]; 256 struct macio_chip* macio = &macio_chips[0];
@@ -275,7 +275,7 @@ static long __pmac g5_i2s_enable(struct device_node *node, long param, long valu
275 275
276 276
277#ifdef CONFIG_SMP 277#ifdef CONFIG_SMP
278static long __pmac g5_reset_cpu(struct device_node* node, long param, long value) 278static long g5_reset_cpu(struct device_node* node, long param, long value)
279{ 279{
280 unsigned int reset_io = 0; 280 unsigned int reset_io = 0;
281 unsigned long flags; 281 unsigned long flags;
@@ -320,12 +320,12 @@ static long __pmac g5_reset_cpu(struct device_node* node, long param, long value
320 * This takes the second CPU off the bus on dual CPU machines 320 * This takes the second CPU off the bus on dual CPU machines
321 * running UP 321 * running UP
322 */ 322 */
323void __pmac g5_phy_disable_cpu1(void) 323void g5_phy_disable_cpu1(void)
324{ 324{
325 UN_OUT(U3_API_PHY_CONFIG_1, 0); 325 UN_OUT(U3_API_PHY_CONFIG_1, 0);
326} 326}
327 327
328static long __pmac generic_get_mb_info(struct device_node* node, long param, long value) 328static long generic_get_mb_info(struct device_node* node, long param, long value)
329{ 329{
330 switch(param) { 330 switch(param) {
331 case PMAC_MB_INFO_MODEL: 331 case PMAC_MB_INFO_MODEL:
@@ -347,14 +347,14 @@ static long __pmac generic_get_mb_info(struct device_node* node, long param, lon
347 347
348/* Used on any machine 348/* Used on any machine
349 */ 349 */
350static struct feature_table_entry any_features[] __pmacdata = { 350static struct feature_table_entry any_features[] = {
351 { PMAC_FTR_GET_MB_INFO, generic_get_mb_info }, 351 { PMAC_FTR_GET_MB_INFO, generic_get_mb_info },
352 { 0, NULL } 352 { 0, NULL }
353}; 353};
354 354
355/* G5 features 355/* G5 features
356 */ 356 */
357static struct feature_table_entry g5_features[] __pmacdata = { 357static struct feature_table_entry g5_features[] = {
358 { PMAC_FTR_GMAC_ENABLE, g5_gmac_enable }, 358 { PMAC_FTR_GMAC_ENABLE, g5_gmac_enable },
359 { PMAC_FTR_1394_ENABLE, g5_fw_enable }, 359 { PMAC_FTR_1394_ENABLE, g5_fw_enable },
360 { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable }, 360 { PMAC_FTR_ENABLE_MPIC, g5_mpic_enable },
@@ -368,7 +368,7 @@ static struct feature_table_entry g5_features[] __pmacdata = {
368 { 0, NULL } 368 { 0, NULL }
369}; 369};
370 370
371static struct pmac_mb_def pmac_mb_defs[] __pmacdata = { 371static struct pmac_mb_def pmac_mb_defs[] = {
372 { "PowerMac7,2", "PowerMac G5", 372 { "PowerMac7,2", "PowerMac G5",
373 PMAC_TYPE_POWERMAC_G5, g5_features, 373 PMAC_TYPE_POWERMAC_G5, g5_features,
374 0, 374 0,
@@ -394,7 +394,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
394/* 394/*
395 * The toplevel feature_call callback 395 * The toplevel feature_call callback
396 */ 396 */
397long __pmac pmac_do_feature_call(unsigned int selector, ...) 397long pmac_do_feature_call(unsigned int selector, ...)
398{ 398{
399 struct device_node* node; 399 struct device_node* node;
400 long param, value; 400 long param, value;
@@ -706,8 +706,8 @@ void __init pmac_check_ht_link(void)
706 * Early video resume hook 706 * Early video resume hook
707 */ 707 */
708 708
709static void (*pmac_early_vresume_proc)(void *data) __pmacdata; 709static void (*pmac_early_vresume_proc)(void *data);
710static void *pmac_early_vresume_data __pmacdata; 710static void *pmac_early_vresume_data;
711 711
712void pmac_set_early_video_resume(void (*proc)(void *data), void *data) 712void pmac_set_early_video_resume(void (*proc)(void *data), void *data)
713{ 713{
@@ -725,11 +725,11 @@ EXPORT_SYMBOL(pmac_set_early_video_resume);
725 * AGP related suspend/resume code 725 * AGP related suspend/resume code
726 */ 726 */
727 727
728static struct pci_dev *pmac_agp_bridge __pmacdata; 728static struct pci_dev *pmac_agp_bridge;
729static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata; 729static int (*pmac_agp_suspend)(struct pci_dev *bridge);
730static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata; 730static int (*pmac_agp_resume)(struct pci_dev *bridge);
731 731
732void __pmac pmac_register_agp_pm(struct pci_dev *bridge, 732void pmac_register_agp_pm(struct pci_dev *bridge,
733 int (*suspend)(struct pci_dev *bridge), 733 int (*suspend)(struct pci_dev *bridge),
734 int (*resume)(struct pci_dev *bridge)) 734 int (*resume)(struct pci_dev *bridge))
735{ 735{
@@ -746,7 +746,7 @@ void __pmac pmac_register_agp_pm(struct pci_dev *bridge,
746} 746}
747EXPORT_SYMBOL(pmac_register_agp_pm); 747EXPORT_SYMBOL(pmac_register_agp_pm);
748 748
749void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev) 749void pmac_suspend_agp_for_card(struct pci_dev *dev)
750{ 750{
751 if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL) 751 if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL)
752 return; 752 return;
@@ -756,7 +756,7 @@ void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev)
756} 756}
757EXPORT_SYMBOL(pmac_suspend_agp_for_card); 757EXPORT_SYMBOL(pmac_suspend_agp_for_card);
758 758
759void __pmac pmac_resume_agp_for_card(struct pci_dev *dev) 759void pmac_resume_agp_for_card(struct pci_dev *dev)
760{ 760{
761 if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL) 761 if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL)
762 return; 762 return;