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

ppc64: ppc_md cleanup

parent 2b4c871d
...@@ -66,7 +66,6 @@ ...@@ -66,7 +66,6 @@
extern volatile unsigned char *chrp_int_ack_special; extern volatile unsigned char *chrp_int_ack_special;
void chrp_setup_pci_ptrs(void);
void chrp_progress(char *, unsigned short); void chrp_progress(char *, unsigned short);
void chrp_request_regions(void); void chrp_request_regions(void);
...@@ -237,8 +236,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -237,8 +236,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
#endif /* CONFIG_BLK_DEV_INITRD */ #endif /* CONFIG_BLK_DEV_INITRD */
#endif #endif
ppc_md.ppc_machine = naca->platform;
ppc_md.setup_arch = chrp_setup_arch; ppc_md.setup_arch = chrp_setup_arch;
ppc_md.setup_residual = NULL; ppc_md.setup_residual = NULL;
ppc_md.get_cpuinfo = chrp_get_cpuinfo; ppc_md.get_cpuinfo = chrp_get_cpuinfo;
...@@ -265,7 +262,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5, ...@@ -265,7 +262,6 @@ chrp_init(unsigned long r3, unsigned long r4, unsigned long r5,
ppc_md.power_off = rtas_power_off; ppc_md.power_off = rtas_power_off;
ppc_md.halt = rtas_halt; ppc_md.halt = rtas_halt;
ppc_md.time_init = NULL;
ppc_md.get_boot_time = pSeries_get_rtc_time; ppc_md.get_boot_time = pSeries_get_rtc_time;
ppc_md.get_rtc_time = pSeries_get_rtc_time; ppc_md.get_rtc_time = pSeries_get_rtc_time;
ppc_md.set_rtc_time = pSeries_set_rtc_time; ppc_md.set_rtc_time = pSeries_set_rtc_time;
......
...@@ -312,7 +312,6 @@ iSeries_init_early(void) ...@@ -312,7 +312,6 @@ iSeries_init_early(void)
ppc_md.setup_arch = iSeries_setup_arch; ppc_md.setup_arch = iSeries_setup_arch;
ppc_md.setup_residual = iSeries_setup_residual; ppc_md.setup_residual = iSeries_setup_residual;
ppc_md.get_cpuinfo = iSeries_get_cpuinfo; ppc_md.get_cpuinfo = iSeries_get_cpuinfo;
ppc_md.irq_cannonicalize = NULL;
ppc_md.init_IRQ = iSeries_init_IRQ; ppc_md.init_IRQ = iSeries_init_IRQ;
ppc_md.init_ras_IRQ = NULL; ppc_md.init_ras_IRQ = NULL;
ppc_md.get_irq = iSeries_get_irq; ppc_md.get_irq = iSeries_get_irq;
...@@ -325,8 +324,7 @@ iSeries_init_early(void) ...@@ -325,8 +324,7 @@ iSeries_init_early(void)
ppc_md.power_off = iSeries_power_off; ppc_md.power_off = iSeries_power_off;
ppc_md.halt = iSeries_halt; ppc_md.halt = iSeries_halt;
ppc_md.time_init = NULL; ppc_md.get_boot_time = iSeries_get_boot_time;
ppc_md.get_boot_time = iSeries_get_boot_time;
ppc_md.set_rtc_time = iSeries_set_rtc_time; ppc_md.set_rtc_time = iSeries_set_rtc_time;
ppc_md.get_rtc_time = iSeries_get_rtc_time; ppc_md.get_rtc_time = iSeries_get_rtc_time;
ppc_md.calibrate_decr = iSeries_calibrate_decr; ppc_md.calibrate_decr = iSeries_calibrate_decr;
...@@ -784,15 +782,6 @@ iSeries_halt(void) ...@@ -784,15 +782,6 @@ iSeries_halt(void)
mf_powerOff(); mf_powerOff();
} }
/*
* Nothing to do here.
*/
void __init
iSeries_time_init(void)
{
/* Nothing to do */
}
/* JDH Hack */ /* JDH Hack */
unsigned long jdh_time = 0; unsigned long jdh_time = 0;
......
...@@ -348,8 +348,7 @@ pcibios_assign_resources(void) ...@@ -348,8 +348,7 @@ pcibios_assign_resources(void)
* the BIOS forgot to do so or because we have decided the old * the BIOS forgot to do so or because we have decided the old
* address was unusable for some reason. * address was unusable for some reason.
*/ */
if (!r->start && r->end && ppc_md.pcibios_enable_device_hook && if (!r->start && r->end)
!ppc_md.pcibios_enable_device_hook(dev, 1))
pci_assign_resource(dev, idx); pci_assign_resource(dev, idx);
} }
...@@ -583,11 +582,9 @@ int pcibios_enable_device(struct pci_dev *dev) ...@@ -583,11 +582,9 @@ int pcibios_enable_device(struct pci_dev *dev)
int idx; int idx;
struct resource *r; struct resource *r;
PPCDBG(PPCDBG_BUSWALK,"PCI: %s for device %s \n",__FUNCTION__,dev->slot_name); PPCDBG(PPCDBG_BUSWALK,"PCI: %s for device %s \n", __FUNCTION__,
if (ppc_md.pcibios_enable_device_hook) dev->slot_name);
if (ppc_md.pcibios_enable_device_hook(dev, 0))
return -EINVAL;
pci_read_config_word(dev, PCI_COMMAND, &cmd); pci_read_config_word(dev, PCI_COMMAND, &cmd);
old_cmd = cmd; old_cmd = cmd;
for (idx=0; idx<6; idx++) { for (idx=0; idx<6; idx++) {
......
#ifdef __KERNEL__ #ifdef __KERNEL__
#ifndef _PPC_MACHDEP_H #ifndef _PPC64_MACHDEP_H
#define _PPC_MACHDEP_H #define _PPC64_MACHDEP_H
/* /*
* This program is free software; you can redistribute it and/or * This program is free software; you can redistribute it and/or
...@@ -14,7 +14,6 @@ ...@@ -14,7 +14,6 @@
struct pt_regs; struct pt_regs;
struct pci_bus; struct pci_bus;
struct pci_dev;
struct device_node; struct device_node;
struct TceTable; struct TceTable;
struct rtc_time; struct rtc_time;
...@@ -70,30 +69,25 @@ struct machdep_calls { ...@@ -70,30 +69,25 @@ struct machdep_calls {
void (*setup_residual)(struct seq_file *m, int cpu_id); void (*setup_residual)(struct seq_file *m, int cpu_id);
/* Optional, may be NULL. */ /* Optional, may be NULL. */
void (*get_cpuinfo)(struct seq_file *m); void (*get_cpuinfo)(struct seq_file *m);
/* Optional, may be NULL. */
unsigned int (*irq_cannonicalize)(unsigned int irq);
void (*init_IRQ)(void); void (*init_IRQ)(void);
void (*init_ras_IRQ)(void); void (*init_ras_IRQ)(void);
int (*get_irq)(struct pt_regs *); int (*get_irq)(struct pt_regs *);
/* A general init function, called by ppc_init in init/main.c. /* Optional, may be NULL. */
May be NULL. */
void (*init)(void); void (*init)(void);
void (*restart)(char *cmd); void (*restart)(char *cmd);
void (*power_off)(void); void (*power_off)(void);
void (*halt)(void); void (*halt)(void);
long (*time_init)(void); /* Optional, may be NULL */
int (*set_rtc_time)(struct rtc_time *); int (*set_rtc_time)(struct rtc_time *);
void (*get_rtc_time)(struct rtc_time *); void (*get_rtc_time)(struct rtc_time *);
void (*get_boot_time)(struct rtc_time *); void (*get_boot_time)(struct rtc_time *);
void (*calibrate_decr)(void);
void (*progress)(char *, unsigned short); void (*calibrate_decr)(void);
unsigned char (*nvram_read_val)(int addr); void (*progress)(char *, unsigned short);
void (*nvram_write_val)(int addr, unsigned char val);
/* Debug interface. Low level I/O to some terminal device */ /* Debug interface. Low level I/O to some terminal device */
void (*udbg_putc)(unsigned char c); void (*udbg_putc)(unsigned char c);
...@@ -101,32 +95,21 @@ struct machdep_calls { ...@@ -101,32 +95,21 @@ struct machdep_calls {
int (*udbg_getc_poll)(void); int (*udbg_getc_poll)(void);
/* PCI interfaces */ /* PCI interfaces */
int (*pcibios_read_config)(struct device_node *dn, int where, int size, u32 *val); int (*pcibios_read_config)(struct device_node *dn, int where, int size,
int (*pcibios_write_config)(struct device_node *dn, int where, int size, u32 val); u32 *val);
int (*pcibios_write_config)(struct device_node *dn, int where,
int size, u32 val);
/* Called after scanning the bus, before allocating /* Called after scanning the bus, before allocating
* resources * resources
*/ */
void (*pcibios_fixup)(void); void (*pcibios_fixup)(void);
/* Called for each PCI bus in the system /* Called for each PCI bus in the system
* when it's probed * when it's probed
*/ */
void (*pcibios_fixup_bus)(struct pci_bus *); 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 #ifdef CONFIG_SMP
/* functions for dealing with other cpus */ /* functions for dealing with other cpus */
struct smp_ops_t smp_ops; struct smp_ops_t smp_ops;
...@@ -136,7 +119,5 @@ struct machdep_calls { ...@@ -136,7 +119,5 @@ struct machdep_calls {
extern struct machdep_calls ppc_md; extern struct machdep_calls ppc_md;
extern char cmd_line[512]; extern char cmd_line[512];
extern void setup_pci_ptrs(void); #endif /* _PPC64_MACHDEP_H */
#endif /* _PPC_MACHDEP_H */
#endif /* __KERNEL__ */ #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