Skip to content

Commit

Permalink
[PATCH] powerpc: Remove sections use from ppc
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 7da8f86 commit f495a8b
Show file tree
Hide file tree
Showing 21 changed files with 269 additions and 272 deletions.
10 changes: 5 additions & 5 deletions arch/ppc/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -644,7 +644,7 @@ pcibios_alloc_controller(void)
/*
* Functions below are used on OpenFirmware machines.
*/
static void __openfirmware
static void
make_one_node_map(struct device_node* node, u8 pci_bus)
{
int *bus_range;
Expand Down Expand Up @@ -678,7 +678,7 @@ make_one_node_map(struct device_node* node, u8 pci_bus)
}
}

void __openfirmware
void
pcibios_make_OF_bus_map(void)
{
int i;
Expand Down Expand Up @@ -720,7 +720,7 @@ pcibios_make_OF_bus_map(void)

typedef int (*pci_OF_scan_iterator)(struct device_node* node, void* data);

static struct device_node* __openfirmware
static struct device_node*
scan_OF_pci_childs(struct device_node* node, pci_OF_scan_iterator filter, void* data)
{
struct device_node* sub_node;
Expand Down Expand Up @@ -761,7 +761,7 @@ scan_OF_pci_childs_iterator(struct device_node* node, void* data)
return 0;
}

static struct device_node* __openfirmware
static struct device_node*
scan_OF_childs_for_device(struct device_node* node, u8 bus, u8 dev_fn)
{
u8 filter_data[2] = {bus, dev_fn};
Expand Down Expand Up @@ -842,7 +842,7 @@ pci_find_hose_for_OF_device(struct device_node* node)
return NULL;
}

static int __openfirmware
static int
find_OF_pci_device_filter(struct device_node* node, void* data)
{
return ((void *)node == data);
Expand Down
2 changes: 1 addition & 1 deletion arch/ppc/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -339,7 +339,7 @@ early_init(int r3, int r4, int r5)
* Assume here that all clock rates are the same in a
* smp system. -- Cort
*/
int __openfirmware
int
of_show_percpuinfo(struct seq_file *m, int i)
{
struct device_node *cpu_node;
Expand Down
8 changes: 4 additions & 4 deletions arch/ppc/platforms/chrp_pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void __iomem *gg2_pci_config_base;
* limit the bus number to 3 bits
*/

int __chrp gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off,
int gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off,
int len, u32 *val)
{
volatile void __iomem *cfg_data;
Expand All @@ -56,7 +56,7 @@ int __chrp gg2_read_config(struct pci_bus *bus, unsigned int devfn, int off,
return PCIBIOS_SUCCESSFUL;
}

int __chrp gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off,
int gg2_write_config(struct pci_bus *bus, unsigned int devfn, int off,
int len, u32 val)
{
volatile void __iomem *cfg_data;
Expand Down Expand Up @@ -92,7 +92,7 @@ static struct pci_ops gg2_pci_ops =
/*
* Access functions for PCI config space using RTAS calls.
*/
int __chrp
int
rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 *val)
{
Expand All @@ -108,7 +108,7 @@ rtas_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
return rval? PCIBIOS_DEVICE_NOT_FOUND: PCIBIOS_SUCCESSFUL;
}

int __chrp
int
rtas_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 val)
{
Expand Down
16 changes: 8 additions & 8 deletions arch/ppc/platforms/chrp_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static const char *gg2_cachemodes[4] = {
"Disabled", "Write-Through", "Copy-Back", "Transparent Mode"
};

int __chrp
int
chrp_show_cpuinfo(struct seq_file *m)
{
int i, sdramen;
Expand Down Expand Up @@ -303,7 +303,7 @@ void __init chrp_setup_arch(void)
pci_create_OF_bus_map();
}

void __chrp
void
chrp_event_scan(void)
{
unsigned char log[1024];
Expand All @@ -314,15 +314,15 @@ chrp_event_scan(void)
ppc_md.heartbeat_count = ppc_md.heartbeat_reset;
}

void __chrp
void
chrp_restart(char *cmd)
{
printk("RTAS system-reboot returned %d\n",
call_rtas("system-reboot", 0, 1, NULL));
for (;;);
}

void __chrp
void
chrp_power_off(void)
{
/* allow power on only with power button press */
Expand All @@ -331,13 +331,13 @@ chrp_power_off(void)
for (;;);
}

void __chrp
void
chrp_halt(void)
{
chrp_power_off();
}

u_int __chrp
u_int
chrp_irq_canonicalize(u_int irq)
{
if (irq == 2)
Expand Down Expand Up @@ -572,7 +572,7 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
if (ppc_md.progress) ppc_md.progress("Linux/PPC "UTS_RELEASE"\n", 0x0);
}

void __chrp
void
rtas_display_progress(char *s, unsigned short hex)
{
int width;
Expand All @@ -599,7 +599,7 @@ rtas_display_progress(char *s, unsigned short hex)
call_rtas( "display-character", 1, 1, NULL, ' ' );
}

void __chrp
void
rtas_indicator_progress(char *s, unsigned short hex)
{
call_rtas("set-indicator", 3, 1, NULL, 6, 0, hex);
Expand Down
2 changes: 1 addition & 1 deletion arch/ppc/platforms/chrp_smp.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ smp_chrp_take_timebase(void)
}

/* CHRP with openpic */
struct smp_ops_t chrp_smp_ops __chrpdata = {
struct smp_ops_t chrp_smp_ops = {
.message_pass = smp_openpic_message_pass,
.probe = smp_chrp_probe,
.kick_cpu = smp_chrp_kick_cpu,
Expand Down
8 changes: 4 additions & 4 deletions arch/ppc/platforms/chrp_time.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ long __init chrp_time_init(void)
return 0;
}

int __chrp chrp_cmos_clock_read(int addr)
int chrp_cmos_clock_read(int addr)
{
if (nvram_as1 != 0)
outb(addr>>8, nvram_as1);
outb(addr, nvram_as0);
return (inb(nvram_data));
}

void __chrp chrp_cmos_clock_write(unsigned long val, int addr)
void chrp_cmos_clock_write(unsigned long val, int addr)
{
if (nvram_as1 != 0)
outb(addr>>8, nvram_as1);
Expand All @@ -72,7 +72,7 @@ void __chrp chrp_cmos_clock_write(unsigned long val, int addr)
/*
* Set the hardware clock. -- Cort
*/
int __chrp chrp_set_rtc_time(unsigned long nowtime)
int chrp_set_rtc_time(unsigned long nowtime)
{
unsigned char save_control, save_freq_select;
struct rtc_time tm;
Expand Down Expand Up @@ -118,7 +118,7 @@ int __chrp chrp_set_rtc_time(unsigned long nowtime)
return 0;
}

unsigned long __chrp chrp_get_rtc_time(void)
unsigned long chrp_get_rtc_time(void)
{
unsigned int year, mon, day, hour, min, sec;
int uip, i;
Expand Down
16 changes: 8 additions & 8 deletions arch/ppc/platforms/pmac_backlight.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int backlight_req_enable = -1;
static void backlight_callback(void *);
static DECLARE_WORK(backlight_work, backlight_callback, NULL);

void __pmac register_backlight_controller(struct backlight_controller *ctrler,
void register_backlight_controller(struct backlight_controller *ctrler,
void *data, char *type)
{
struct device_node* bk_node;
Expand Down Expand Up @@ -99,7 +99,7 @@ void __pmac register_backlight_controller(struct backlight_controller *ctrler,
}
EXPORT_SYMBOL(register_backlight_controller);

void __pmac unregister_backlight_controller(struct backlight_controller
void unregister_backlight_controller(struct backlight_controller
*ctrler, void *data)
{
/* We keep the current backlight level (for now) */
Expand All @@ -108,7 +108,7 @@ void __pmac unregister_backlight_controller(struct backlight_controller
}
EXPORT_SYMBOL(unregister_backlight_controller);

static int __pmac __set_backlight_enable(int enable)
static int __set_backlight_enable(int enable)
{
int rc;

Expand All @@ -122,7 +122,7 @@ static int __pmac __set_backlight_enable(int enable)
release_console_sem();
return rc;
}
int __pmac set_backlight_enable(int enable)
int set_backlight_enable(int enable)
{
if (!backlighter)
return -ENODEV;
Expand All @@ -133,15 +133,15 @@ int __pmac set_backlight_enable(int enable)

EXPORT_SYMBOL(set_backlight_enable);

int __pmac get_backlight_enable(void)
int get_backlight_enable(void)
{
if (!backlighter)
return -ENODEV;
return backlight_enabled;
}
EXPORT_SYMBOL(get_backlight_enable);

static int __pmac __set_backlight_level(int level)
static int __set_backlight_level(int level)
{
int rc = 0;

Expand All @@ -165,7 +165,7 @@ static int __pmac __set_backlight_level(int level)
}
return rc;
}
int __pmac set_backlight_level(int level)
int set_backlight_level(int level)
{
if (!backlighter)
return -ENODEV;
Expand All @@ -176,7 +176,7 @@ int __pmac set_backlight_level(int level)

EXPORT_SYMBOL(set_backlight_level);

int __pmac get_backlight_level(void)
int get_backlight_level(void)
{
if (!backlighter)
return -ENODEV;
Expand Down
Loading

0 comments on commit f495a8b

Please sign in to comment.