Commit 7ec16940 authored by Anton Blanchard's avatar Anton Blanchard

ppc64: ppc_md cleanup

parent 2b4c871d
......@@ -66,7 +66,6 @@
extern volatile unsigned char *chrp_int_ack_special;
void chrp_setup_pci_ptrs(void);
void chrp_progress(char *, unsigned short);
void chrp_request_regions(void);
......@@ -237,8 +236,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
#endif /* CONFIG_BLK_DEV_INITRD */
#endif
ppc_md.ppc_machine = naca->platform;
ppc_md.setup_arch = chrp_setup_arch;
ppc_md.setup_residual = NULL;
ppc_md.get_cpuinfo = chrp_get_cpuinfo;
......@@ -265,7 +262,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.power_off = rtas_power_off;
ppc_md.halt = rtas_halt;
ppc_md.time_init = NULL;
ppc_md.get_boot_time = pSeries_get_rtc_time;
ppc_md.get_rtc_time = pSeries_get_rtc_time;
ppc_md.set_rtc_time = pSeries_set_rtc_time;
......
......@@ -312,7 +312,6 @@ iSeries_init_early(void)
ppc_md.setup_arch = iSeries_setup_arch;
ppc_md.setup_residual = iSeries_setup_residual;
ppc_md.get_cpuinfo = iSeries_get_cpuinfo;
ppc_md.irq_cannonicalize = NULL;
ppc_md.init_IRQ = iSeries_init_IRQ;
ppc_md.init_ras_IRQ = NULL;
ppc_md.get_irq = iSeries_get_irq;
......@@ -325,7 +324,6 @@ iSeries_init_early(void)
ppc_md.power_off = iSeries_power_off;
ppc_md.halt = iSeries_halt;
ppc_md.time_init = NULL;
ppc_md.get_boot_time = iSeries_get_boot_time;
ppc_md.set_rtc_time = iSeries_set_rtc_time;
ppc_md.get_rtc_time = iSeries_get_rtc_time;
......@@ -784,15 +782,6 @@ iSeries_halt(void)
mf_powerOff();
}
/*
* Nothing to do here.
*/
void __init
iSeries_time_init(void)
{
/* Nothing to do */
}
/* JDH Hack */
unsigned long jdh_time = 0;
......
......@@ -348,8 +348,7 @@ pcibios_assign_resources(void)
* the BIOS forgot to do so or because we have decided the old
* address was unusable for some reason.
*/
if (!r->start && r->end && ppc_md.pcibios_enable_device_hook &&
!ppc_md.pcibios_enable_device_hook(dev, 1))
if (!r->start && r->end)
pci_assign_resource(dev, idx);
}
......@@ -583,10 +582,8 @@ int pcibios_enable_device(struct pci_dev *dev)
int idx;
struct resource *r;
PPCDBG(PPCDBG_BUSWALK,"PCI: %s for device %s \n",__FUNCTION__,dev->slot_name);
if (ppc_md.pcibios_enable_device_hook)
if (ppc_md.pcibios_enable_device_hook(dev, 0))
return -EINVAL;
PPCDBG(PPCDBG_BUSWALK,"PCI: %s for device %s \n", __FUNCTION__,
dev->slot_name);
pci_read_config_word(dev, PCI_COMMAND, &cmd);
old_cmd = cmd;
......
#ifdef __KERNEL__
#ifndef _PPC_MACHDEP_H
#define _PPC_MACHDEP_H
#ifndef _PPC64_MACHDEP_H
#define _PPC64_MACHDEP_H
/*
* This program is free software; you can redistribute it and/or
......@@ -14,7 +14,6 @@
struct pt_regs;
struct pci_bus;
struct pci_dev;
struct device_node;
struct TceTable;
struct rtc_time;
......@@ -70,39 +69,36 @@ struct machdep_calls {
void (*setup_residual)(struct seq_file *m, int cpu_id);
/* Optional, may be NULL. */
void (*get_cpuinfo)(struct seq_file *m);
/* Optional, may be NULL. */
unsigned int (*irq_cannonicalize)(unsigned int irq);
void (*init_IRQ)(void);
void (*init_ras_IRQ)(void);
int (*get_irq)(struct pt_regs *);
/* A general init function, called by ppc_init in init/main.c.
May be NULL. */
/* Optional, may be NULL. */
void (*init)(void);
void (*restart)(char *cmd);
void (*power_off)(void);
void (*halt)(void);
long (*time_init)(void); /* Optional, may be NULL */
int (*set_rtc_time)(struct rtc_time *);
void (*get_rtc_time)(struct rtc_time *);
void (*get_boot_time)(struct rtc_time *);
void (*calibrate_decr)(void);
void (*progress)(char *, unsigned short);
unsigned char (*nvram_read_val)(int addr);
void (*nvram_write_val)(int addr, unsigned char val);
/* Debug interface. Low level I/O to some terminal device */
void (*udbg_putc)(unsigned char c);
unsigned char (*udbg_getc)(void);
int (*udbg_getc_poll)(void);
/* PCI interfaces */
int (*pcibios_read_config)(struct device_node *dn, int where, int size, u32 *val);
int (*pcibios_write_config)(struct device_node *dn, int where, int size, u32 val);
int (*pcibios_read_config)(struct device_node *dn, int where, int size,
u32 *val);
int (*pcibios_write_config)(struct device_node *dn, int where,
int size, u32 val);
/* Called after scanning the bus, before allocating
* resources
......@@ -114,19 +110,6 @@ struct machdep_calls {
*/
void (*pcibios_fixup_bus)(struct pci_bus *);
/* Called when pci_enable_device() is called (initial=0) or
* when a device with no assigned resource is found (initial=1).
* Returns 0 to allow assignement/enabling of the device
*/
int (*pcibios_enable_device_hook)(struct pci_dev *, int initial);
void* (*pci_dev_io_base)(unsigned char bus, unsigned char devfn, int physical);
void* (*pci_dev_mem_base)(unsigned char bus, unsigned char devfn);
int (*pci_dev_root_bridge)(unsigned char bus, unsigned char devfn);
/* this is for modules, since _machine can be a define -- Cort */
int ppc_machine;
#ifdef CONFIG_SMP
/* functions for dealing with other cpus */
struct smp_ops_t smp_ops;
......@@ -136,7 +119,5 @@ struct machdep_calls {
extern struct machdep_calls ppc_md;
extern char cmd_line[512];
extern void setup_pci_ptrs(void);
#endif /* _PPC_MACHDEP_H */
#endif /* _PPC64_MACHDEP_H */
#endif /* __KERNEL__ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment