Skip to content

Commit

Permalink
[PATCH] powerpc: Remove sections use from ppc64 and drivers
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jon Loeliger authored and Paul Mackerras committed Sep 18, 2005
1 parent f495a8b commit aacaf9b
Show file tree
Hide file tree
Showing 12 changed files with 203 additions and 206 deletions.
60 changes: 30 additions & 30 deletions arch/ppc64/kernel/pmac_feature.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
* We use a single global lock to protect accesses. Each driver has
* to take care of its own locking
*/
static DEFINE_SPINLOCK(feature_lock __pmacdata);
static DEFINE_SPINLOCK(feature_lock);

#define LOCK(flags) spin_lock_irqsave(&feature_lock, flags);
#define UNLOCK(flags) spin_unlock_irqrestore(&feature_lock, flags);
Expand All @@ -62,9 +62,9 @@ static DEFINE_SPINLOCK(feature_lock __pmacdata);
/*
* Instance of some macio stuffs
*/
struct macio_chip macio_chips[MAX_MACIO_CHIPS] __pmacdata;
struct macio_chip macio_chips[MAX_MACIO_CHIPS] ;

struct macio_chip* __pmac macio_find(struct device_node* child, int type)
struct macio_chip* macio_find(struct device_node* child, int type)
{
while(child) {
int i;
Expand All @@ -79,7 +79,7 @@ struct macio_chip* __pmac macio_find(struct device_node* child, int type)
}
EXPORT_SYMBOL_GPL(macio_find);

static const char* macio_names[] __pmacdata =
static const char* macio_names[] =
{
"Unknown",
"Grand Central",
Expand All @@ -106,9 +106,9 @@ static const char* macio_names[] __pmacdata =
#define UN_BIS(r,v) (UN_OUT((r), UN_IN(r) | (v)))
#define UN_BIC(r,v) (UN_OUT((r), UN_IN(r) & ~(v)))

static struct device_node* uninorth_node __pmacdata;
static u32* uninorth_base __pmacdata;
static u32 uninorth_rev __pmacdata;
static struct device_node* uninorth_node;
static u32* uninorth_base;
static u32 uninorth_rev;
static void *u3_ht;

extern struct device_node *k2_skiplist[2];
Expand All @@ -133,30 +133,30 @@ struct pmac_mb_def
struct feature_table_entry* features;
unsigned long board_flags;
};
static struct pmac_mb_def pmac_mb __pmacdata;
static struct pmac_mb_def pmac_mb;

/*
* Here are the chip specific feature functions
*/


static long __pmac g5_read_gpio(struct device_node* node, long param, long value)
static long g5_read_gpio(struct device_node* node, long param, long value)
{
struct macio_chip* macio = &macio_chips[0];

return MACIO_IN8(param);
}


static long __pmac g5_write_gpio(struct device_node* node, long param, long value)
static long g5_write_gpio(struct device_node* node, long param, long value)
{
struct macio_chip* macio = &macio_chips[0];

MACIO_OUT8(param, (u8)(value & 0xff));
return 0;
}

static long __pmac g5_gmac_enable(struct device_node* node, long param, long value)
static long g5_gmac_enable(struct device_node* node, long param, long value)
{
struct macio_chip* macio = &macio_chips[0];
unsigned long flags;
Expand All @@ -181,7 +181,7 @@ static long __pmac g5_gmac_enable(struct device_node* node, long param, long val
return 0;
}

static long __pmac g5_fw_enable(struct device_node* node, long param, long value)
static long g5_fw_enable(struct device_node* node, long param, long value)
{
struct macio_chip* macio = &macio_chips[0];
unsigned long flags;
Expand All @@ -206,7 +206,7 @@ static long __pmac g5_fw_enable(struct device_node* node, long param, long value
return 0;
}

static long __pmac g5_mpic_enable(struct device_node* node, long param, long value)
static long g5_mpic_enable(struct device_node* node, long param, long value)
{
unsigned long flags;

Expand All @@ -220,7 +220,7 @@ static long __pmac g5_mpic_enable(struct device_node* node, long param, long val
return 0;
}

static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long value)
static long g5_eth_phy_reset(struct device_node* node, long param, long value)
{
struct macio_chip* macio = &macio_chips[0];
struct device_node *phy;
Expand Down Expand Up @@ -250,7 +250,7 @@ static long __pmac g5_eth_phy_reset(struct device_node* node, long param, long v
return 0;
}

static long __pmac g5_i2s_enable(struct device_node *node, long param, long value)
static long g5_i2s_enable(struct device_node *node, long param, long value)
{
/* Very crude implementation for now */
struct macio_chip* macio = &macio_chips[0];
Expand All @@ -275,7 +275,7 @@ static long __pmac g5_i2s_enable(struct device_node *node, long param, long valu


#ifdef CONFIG_SMP
static long __pmac g5_reset_cpu(struct device_node* node, long param, long value)
static long g5_reset_cpu(struct device_node* node, long param, long value)
{
unsigned int reset_io = 0;
unsigned long flags;
Expand Down Expand Up @@ -320,12 +320,12 @@ static long __pmac g5_reset_cpu(struct device_node* node, long param, long value
* This takes the second CPU off the bus on dual CPU machines
* running UP
*/
void __pmac g5_phy_disable_cpu1(void)
void g5_phy_disable_cpu1(void)
{
UN_OUT(U3_API_PHY_CONFIG_1, 0);
}

static long __pmac generic_get_mb_info(struct device_node* node, long param, long value)
static long generic_get_mb_info(struct device_node* node, long param, long value)
{
switch(param) {
case PMAC_MB_INFO_MODEL:
Expand All @@ -347,14 +347,14 @@ static long __pmac generic_get_mb_info(struct device_node* node, long param, lon

/* Used on any machine
*/
static struct feature_table_entry any_features[] __pmacdata = {
static struct feature_table_entry any_features[] = {
{ PMAC_FTR_GET_MB_INFO, generic_get_mb_info },
{ 0, NULL }
};

/* G5 features
*/
static struct feature_table_entry g5_features[] __pmacdata = {
static struct feature_table_entry g5_features[] = {
{ PMAC_FTR_GMAC_ENABLE, g5_gmac_enable },
{ PMAC_FTR_1394_ENABLE, g5_fw_enable },
{ PMAC_FTR_ENABLE_MPIC, g5_mpic_enable },
Expand All @@ -368,7 +368,7 @@ static struct feature_table_entry g5_features[] __pmacdata = {
{ 0, NULL }
};

static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
static struct pmac_mb_def pmac_mb_defs[] = {
{ "PowerMac7,2", "PowerMac G5",
PMAC_TYPE_POWERMAC_G5, g5_features,
0,
Expand All @@ -394,7 +394,7 @@ static struct pmac_mb_def pmac_mb_defs[] __pmacdata = {
/*
* The toplevel feature_call callback
*/
long __pmac pmac_do_feature_call(unsigned int selector, ...)
long pmac_do_feature_call(unsigned int selector, ...)
{
struct device_node* node;
long param, value;
Expand Down Expand Up @@ -706,8 +706,8 @@ void __init pmac_check_ht_link(void)
* Early video resume hook
*/

static void (*pmac_early_vresume_proc)(void *data) __pmacdata;
static void *pmac_early_vresume_data __pmacdata;
static void (*pmac_early_vresume_proc)(void *data);
static void *pmac_early_vresume_data;

void pmac_set_early_video_resume(void (*proc)(void *data), void *data)
{
Expand All @@ -725,11 +725,11 @@ EXPORT_SYMBOL(pmac_set_early_video_resume);
* AGP related suspend/resume code
*/

static struct pci_dev *pmac_agp_bridge __pmacdata;
static int (*pmac_agp_suspend)(struct pci_dev *bridge) __pmacdata;
static int (*pmac_agp_resume)(struct pci_dev *bridge) __pmacdata;
static struct pci_dev *pmac_agp_bridge;
static int (*pmac_agp_suspend)(struct pci_dev *bridge);
static int (*pmac_agp_resume)(struct pci_dev *bridge);

void __pmac pmac_register_agp_pm(struct pci_dev *bridge,
void pmac_register_agp_pm(struct pci_dev *bridge,
int (*suspend)(struct pci_dev *bridge),
int (*resume)(struct pci_dev *bridge))
{
Expand All @@ -746,7 +746,7 @@ void __pmac pmac_register_agp_pm(struct pci_dev *bridge,
}
EXPORT_SYMBOL(pmac_register_agp_pm);

void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev)
void pmac_suspend_agp_for_card(struct pci_dev *dev)
{
if (pmac_agp_bridge == NULL || pmac_agp_suspend == NULL)
return;
Expand All @@ -756,7 +756,7 @@ void __pmac pmac_suspend_agp_for_card(struct pci_dev *dev)
}
EXPORT_SYMBOL(pmac_suspend_agp_for_card);

void __pmac pmac_resume_agp_for_card(struct pci_dev *dev)
void pmac_resume_agp_for_card(struct pci_dev *dev)
{
if (pmac_agp_bridge == NULL || pmac_agp_resume == NULL)
return;
Expand Down
30 changes: 15 additions & 15 deletions arch/ppc64/kernel/pmac_nvram.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,10 @@ extern int system_running;
static int (*core99_write_bank)(int bank, u8* datas);
static int (*core99_erase_bank)(int bank);

static char *nvram_image __pmacdata;
static char *nvram_image;


static ssize_t __pmac core99_nvram_read(char *buf, size_t count, loff_t *index)
static ssize_t core99_nvram_read(char *buf, size_t count, loff_t *index)
{
int i;

Expand All @@ -103,7 +103,7 @@ static ssize_t __pmac core99_nvram_read(char *buf, size_t count, loff_t *index)
return count;
}

static ssize_t __pmac core99_nvram_write(char *buf, size_t count, loff_t *index)
static ssize_t core99_nvram_write(char *buf, size_t count, loff_t *index)
{
int i;

Expand All @@ -121,14 +121,14 @@ static ssize_t __pmac core99_nvram_write(char *buf, size_t count, loff_t *index)
return count;
}

static ssize_t __pmac core99_nvram_size(void)
static ssize_t core99_nvram_size(void)
{
if (nvram_image == NULL)
return -ENODEV;
return NVRAM_SIZE;
}

static u8 __pmac chrp_checksum(struct chrp_header* hdr)
static u8 chrp_checksum(struct chrp_header* hdr)
{
u8 *ptr;
u16 sum = hdr->signature;
Expand All @@ -139,7 +139,7 @@ static u8 __pmac chrp_checksum(struct chrp_header* hdr)
return sum;
}

static u32 __pmac core99_calc_adler(u8 *buffer)
static u32 core99_calc_adler(u8 *buffer)
{
int cnt;
u32 low, high;
Expand All @@ -161,7 +161,7 @@ static u32 __pmac core99_calc_adler(u8 *buffer)
return (high << 16) | low;
}

static u32 __pmac core99_check(u8* datas)
static u32 core99_check(u8* datas)
{
struct core99_header* hdr99 = (struct core99_header*)datas;

Expand All @@ -180,7 +180,7 @@ static u32 __pmac core99_check(u8* datas)
return hdr99->generation;
}

static int __pmac sm_erase_bank(int bank)
static int sm_erase_bank(int bank)
{
int stat, i;
unsigned long timeout;
Expand Down Expand Up @@ -212,7 +212,7 @@ static int __pmac sm_erase_bank(int bank)
return 0;
}

static int __pmac sm_write_bank(int bank, u8* datas)
static int sm_write_bank(int bank, u8* datas)
{
int i, stat = 0;
unsigned long timeout;
Expand Down Expand Up @@ -247,7 +247,7 @@ static int __pmac sm_write_bank(int bank, u8* datas)
return 0;
}

static int __pmac amd_erase_bank(int bank)
static int amd_erase_bank(int bank)
{
int i, stat = 0;
unsigned long timeout;
Expand Down Expand Up @@ -294,7 +294,7 @@ static int __pmac amd_erase_bank(int bank)
return 0;
}

static int __pmac amd_write_bank(int bank, u8* datas)
static int amd_write_bank(int bank, u8* datas)
{
int i, stat = 0;
unsigned long timeout;
Expand Down Expand Up @@ -341,7 +341,7 @@ static int __pmac amd_write_bank(int bank, u8* datas)
}


static int __pmac core99_nvram_sync(void)
static int core99_nvram_sync(void)
{
struct core99_header* hdr99;
unsigned long flags;
Expand Down Expand Up @@ -431,7 +431,7 @@ int __init pmac_nvram_init(void)
return 0;
}

int __pmac pmac_get_partition(int partition)
int pmac_get_partition(int partition)
{
struct nvram_partition *part;
const char *name;
Expand Down Expand Up @@ -459,7 +459,7 @@ int __pmac pmac_get_partition(int partition)
return part->index;
}

u8 __pmac pmac_xpram_read(int xpaddr)
u8 pmac_xpram_read(int xpaddr)
{
int offset = pmac_get_partition(pmac_nvram_XPRAM);
loff_t index;
Expand All @@ -476,7 +476,7 @@ u8 __pmac pmac_xpram_read(int xpaddr)
return buf;
}

void __pmac pmac_xpram_write(int xpaddr, u8 data)
void pmac_xpram_write(int xpaddr, u8 data)
{
int offset = pmac_get_partition(pmac_nvram_XPRAM);
loff_t index;
Expand Down
Loading

0 comments on commit aacaf9b

Please sign in to comment.