Commit f495a8bf authored by Jon Loeliger's avatar Jon Loeliger Committed by Paul Mackerras
Browse files

[PATCH] powerpc: Remove sections use from ppc



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: default avatarJon Loeliger <jdl@freescale.com>
Signed-off-by: default avatarKumar Gala <kumar.gala@freescale.com>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent 7da8f860
......@@ -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;
......@@ -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;
......@@ -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;
......@@ -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};
......@@ -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);
......
......@@ -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;
......
......@@ -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;
......@@ -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;
......@@ -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)
{
......@@ -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)
{
......
......@@ -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;
......@@ -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];
......@@ -314,7 +314,7 @@ 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",
......@@ -322,7 +322,7 @@ chrp_restart(char *cmd)
for (;;);
}
void __chrp
void
chrp_power_off(void)
{
/* allow power on only with power button press */
......@@ -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)
......@@ -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;
......@@ -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);
......
......@@ -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,
......
......@@ -52,7 +52,7 @@ 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);
......@@ -60,7 +60,7 @@ int __chrp chrp_cmos_clock_read(int addr)
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);
......@@ -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;
......@@ -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;
......
......@@ -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;
......@@ -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) */
......@@ -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;
......@@ -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;
......@@ -133,7 +133,7 @@ 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;
......@@ -141,7 +141,7 @@ int __pmac get_backlight_enable(void)
}
EXPORT_SYMBOL(get_backlight_enable);
static int __pmac __set_backlight_level(int level)
static int __set_backlight_level(int level)
{
int rc = 0;
......@@ -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;
......@@ -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;
......
......@@ -136,7 +136,7 @@ static inline void debug_calc_bogomips(void)
/* Switch CPU speed under 750FX CPU control
*/
static int __pmac cpu_750fx_cpu_speed(int low_speed)
static int cpu_750fx_cpu_speed(int low_speed)
{
u32 hid2;
......@@ -172,7 +172,7 @@ static int __pmac cpu_750fx_cpu_speed(int low_speed)
return 0;
}
static unsigned int __pmac cpu_750fx_get_cpu_speed(void)
static unsigned int cpu_750fx_get_cpu_speed(void)
{
if (mfspr(SPRN_HID1) & HID1_PS)
return low_freq;
......@@ -181,7 +181,7 @@ static unsigned int __pmac cpu_750fx_get_cpu_speed(void)
}
/* Switch CPU speed using DFS */
static int __pmac dfs_set_cpu_speed(int low_speed)
static int dfs_set_cpu_speed(int low_speed)
{
if (low_speed == 0) {
/* ramping up, set voltage first */
......@@ -205,7 +205,7 @@ static int __pmac dfs_set_cpu_speed(int low_speed)
return 0;
}
static unsigned int __pmac dfs_get_cpu_speed(void)
static unsigned int dfs_get_cpu_speed(void)
{
if (mfspr(SPRN_HID1) & HID1_DFS)
return low_freq;
......@@ -216,7 +216,7 @@ static unsigned int __pmac dfs_get_cpu_speed(void)
/* Switch CPU speed using slewing GPIOs
*/
static int __pmac gpios_set_cpu_speed(int low_speed)
static int gpios_set_cpu_speed(int low_speed)
{
int gpio, timeout = 0;
......@@ -258,7 +258,7 @@ static int __pmac gpios_set_cpu_speed(int low_speed)
/* Switch CPU speed under PMU control
*/
static int __pmac pmu_set_cpu_speed(int low_speed)
static int pmu_set_cpu_speed(int low_speed)
{
struct adb_request req;
unsigned long save_l2cr;
......@@ -354,7 +354,7 @@ static int __pmac pmu_set_cpu_speed(int low_speed)
return 0;
}
static int __pmac do_set_cpu_speed(int speed_mode, int notify)
static int do_set_cpu_speed(int speed_mode, int notify)
{
struct cpufreq_freqs freqs;
unsigned long l3cr;
......@@ -391,17 +391,17 @@ static int __pmac do_set_cpu_speed(int speed_mode, int notify)
return 0;
}
static unsigned int __pmac pmac_cpufreq_get_speed(unsigned int cpu)
static unsigned int pmac_cpufreq_get_speed(unsigned int cpu)
{
return cur_freq;
}
static int __pmac pmac_cpufreq_verify(struct cpufreq_policy *policy)
static int pmac_cpufreq_verify(struct cpufreq_policy *policy)
{
return cpufreq_frequency_table_verify(policy, pmac_cpu_freqs);
}
static int __pmac pmac_cpufreq_target( struct cpufreq_policy *policy,
static int pmac_cpufreq_target( struct cpufreq_policy *policy,
unsigned int target_freq,
unsigned int relation)
{
......@@ -414,13 +414,13 @@ static int __pmac pmac_cpufreq_target( struct cpufreq_policy *policy,
return do_set_cpu_speed(newstate, 1);
}
unsigned int __pmac pmac_get_one_cpufreq(int i)
unsigned int pmac_get_one_cpufreq(int i)
{
/* Supports only one CPU for now */
return (i == 0) ? cur_freq : 0;
}
static int __pmac pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
static int pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
{
if (policy->cpu != 0)
return -ENODEV;
......@@ -433,7 +433,7 @@ static int __pmac pmac_cpufreq_cpu_init(struct cpufreq_policy *policy)
return cpufreq_frequency_table_cpuinfo(policy, pmac_cpu_freqs);
}
static u32 __pmac read_gpio(struct device_node *np)
static u32 read_gpio(struct device_node *np)
{
u32 *reg = (u32 *)get_property(np, "reg", NULL);
u32 offset;
......@@ -452,7 +452,7 @@ static u32 __pmac read_gpio(struct device_node *np)
return offset;
}
static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message_t pmsg)
static int pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message_t pmsg)
{
/* Ok, this could be made a bit smarter, but let's be robust for now. We
* always force a speed change to high speed before sleep, to make sure
......@@ -468,7 +468,7 @@ static int __pmac pmac_cpufreq_suspend(struct cpufreq_policy *policy, pm_message
return 0;
}
static int __pmac pmac_cpufreq_resume(struct cpufreq_policy *policy)
static int pmac_cpufreq_resume(struct cpufreq_policy *policy)
{
/* If we resume, first check if we have a get() function */
if (get_speed_proc)
......@@ -501,7 +501,7 @@ static struct cpufreq_driver pmac_cpufreq_driver = {
};
static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
static int pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
{
struct device_node *volt_gpio_np = of_find_node_by_name(NULL,
"voltage-gpio");
......@@ -593,7 +593,7 @@ static int __pmac pmac_cpufreq_init_MacRISC3(struct device_node *cpunode)
return 0;
}
static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode)
static int pmac_cpufreq_init_7447A(struct device_node *cpunode)
{
struct device_node *volt_gpio_np;
......@@ -620,7 +620,7 @@ static int __pmac pmac_cpufreq_init_7447A(struct device_node *cpunode)
return 0;
}
static int __pmac pmac_cpufreq_init_750FX(struct device_node *cpunode)
static int pmac_cpufreq_init_750FX(struct device_node *cpunode)
{
struct device_node *volt_gpio_np;
u32 pvr, *value;
......
This diff is collapsed.
......@@ -88,17 +88,17 @@ 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 unsigned char __pmac core99_nvram_read_byte(int addr)
static unsigned char core99_nvram_read_byte(int addr)
{
if (nvram_image == NULL)
return 0xff;
return nvram_image[addr];
}
static void __pmac core99_nvram_write_byte(int addr, unsigned char val)
static void core99_nvram_write_byte(int addr, unsigned char val)
{
if (nvram_image == NULL)
return;
......@@ -106,18 +106,18 @@ static void __pmac core99_nvram_write_byte(int addr, unsigned char val)
}
static unsigned char __openfirmware direct_nvram_read_byte(int addr)
static unsigned char direct_nvram_read_byte(int addr)
{
return in_8(&nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult]);
}
static void __openfirmware direct_nvram_write_byte(int addr, unsigned char val)
static void direct_nvram_write_byte(int addr, unsigned char val)
{
out_8(&nvram_data[(addr & (NVRAM_SIZE - 1)) * nvram_mult], val);
}
static unsigned char __pmac indirect_nvram_read_byte(int addr)
static unsigned char indirect_nvram_read_byte(int addr)
{
unsigned char val;
unsigned long flags;
......@@ -130,7 +130,7 @@ static unsigned char __pmac indirect_nvram_read_byte(int addr)
return val;
}
static void __pmac indirect_nvram_write_byte(int addr, unsigned char val)
static void indirect_nvram_write_byte(int addr, unsigned char val)
{
unsigned long flags;
......@@ -143,13 +143,13 @@ static void __pmac indirect_nvram_write_byte(int addr, unsigned char val)
#ifdef CONFIG_ADB_PMU
static void __pmac pmu_nvram_complete(struct adb_request *req)
static void pmu_nvram_complete(struct adb_request *req)
{
if (req->arg)
complete((struct completion *)req->arg);
}
static unsigned char __pmac pmu_nvram_read_byte(int addr)
static unsigned char pmu_nvram_read_byte(int addr)
{
struct adb_request req;
DECLARE_COMPLETION(req_complete);
......@@ -165,7 +165,7 @@ static unsigned char __pmac pmu_nvram_read_byte(int addr)
return req.reply[0];
}
static void __pmac pmu_nvram_write_byte(int addr, unsigned char val)
static void pmu_nvram_write_byte(int addr, unsigned char val)
{
struct adb_request req;
DECLARE_COMPLETION(req_complete);
......@@ -183,7 +183,7 @@ static void __pmac pmu_nvram_write_byte(int addr, unsigned char val)
#endif /* CONFIG_ADB_PMU */
static u8 __pmac chrp_checksum(struct chrp_header* hdr)
static u8 chrp_checksum(struct chrp_header* hdr)
{
u8 *ptr;
u16 sum = hdr->signature;
......@@ -194,7 +194,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;
......@@ -216,7 +216,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;
......@@ -235,7 +235,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;
......@@ -267,7 +267,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;
......@@ -302,7 +302,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;
......@@ -349,7 +349,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;
......@@ -430,7 +430,7 @@ static void __init lookup_partitions(void)
DBG("nvram: NR partition at 0x%x\n", nvram_partitions[pmac_nvram_NR]);
}
static void __pmac core99_nvram_sync(void)
static void core99_nvram_sync(void)
{
struct core99_header* hdr99;
unsigned long flags;
......@@ -554,12 +554,12 @@ void __init pmac_nvram_init(void)
lookup_partitions();
}
int __pmac pmac_get_partition(int partition)
int pmac_get_partition(int partition)
{
return nvram_partitions[partition];
}
u8 __pmac pmac_xpram_read(int xpaddr)
u8 pmac_xpram_read(int xpaddr)
{
int offset = nvram_partitions[pmac_nvram_XPRAM];
......@@ -569,7 +569,7 @@ u8 __pmac pmac_xpram_read(int xpaddr)
return ppc_md.nvram_read_val(xpaddr + offset);
}
void __pmac pmac_xpram_write(int xpaddr, u8 data)
void pmac_xpram_write(int xpaddr, u8 data)
{
int offset = nvram_partitions[pmac_nvram_XPRAM];
......
......@@ -141,7 +141,7 @@ fixup_bus_range(struct device_node *bridge)
|(((unsigned long)(off)) & 0xFCUL) \
|1UL)
static void volatile __iomem * __pmac
static void volatile __iomem *
macrisc_cfg_access(struct pci_controller* hose, u8 bus, u8 dev_fn, u8 offset)
{
unsigned int caddr;
......@@ -162,7 +162,7 @@ macrisc_cfg_access(struct pci_controller* hose, u8 bus, u8 dev_fn, u8 offset)
return hose->cfg_data + offset;
}
static int __pmac
static int
macrisc_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 *val)
{
......@@ -190,7 +190,7 @@ macrisc_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
return PCIBIOS_SUCCESSFUL;
}
static int __pmac
static int
macrisc_write_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 val)
{
......@@ -230,7 +230,7 @@ static struct pci_ops macrisc_pci_ops =
/*
* Verifiy that a specific (bus, dev_fn) exists on chaos
*/
static int __pmac
static int
chaos_validate_dev(struct pci_bus *bus, int devfn, int offset)
{
struct device_node *np;
......@@ -252,7 +252,7 @@ chaos_validate_dev(struct pci_bus *bus, int devfn, int offset)
return PCIBIOS_SUCCESSFUL;
}
static int __pmac
static int
chaos_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
int len, u32 *val)
{
......@@ -264,7 +264,7 @@ chaos_read_config(struct pci_bus *bus, unsigned int devfn, int offset,
return macrisc_read_config(bus, devfn, offset, len, val);
}