Commit af077e54 authored by Randy Vinson's avatar Randy Vinson Committed by Tom Rini

Renaming pplus_common.c to hawk_common.c to match gt64260_common.c, etc, plus minor

cleanups.
parent 96531b37
...@@ -513,7 +513,7 @@ void __init pplus_find_bridges(void) ...@@ -513,7 +513,7 @@ void __init pplus_find_bridges(void)
hose->mem_space.start = PPLUS_PCI_MEM_START; hose->mem_space.start = PPLUS_PCI_MEM_START;
hose->mem_space.end = PPLUS_PCI_MEM_END - HAWK_MPIC_SIZE; hose->mem_space.end = PPLUS_PCI_MEM_END - HAWK_MPIC_SIZE;
if (pplus_init(hose, PPLUS_HAWK_PPC_REG_BASE, PPLUS_PROC_PCI_MEM_START, if (hawk_init(hose, PPLUS_HAWK_PPC_REG_BASE, PPLUS_PROC_PCI_MEM_START,
PPLUS_PROC_PCI_MEM_END - HAWK_MPIC_SIZE, PPLUS_PROC_PCI_MEM_END - HAWK_MPIC_SIZE,
PPLUS_PROC_PCI_IO_START, PPLUS_PROC_PCI_IO_END, PPLUS_PROC_PCI_IO_START, PPLUS_PROC_PCI_IO_END,
PPLUS_PROC_PCI_MEM_END - HAWK_MPIC_SIZE + 1) PPLUS_PROC_PCI_MEM_END - HAWK_MPIC_SIZE + 1)
...@@ -816,7 +816,7 @@ static unsigned long __init pplus_find_end_of_memory(void) ...@@ -816,7 +816,7 @@ static unsigned long __init pplus_find_end_of_memory(void)
dump_dbats(); dump_dbats();
#endif #endif
total = pplus_get_mem_size(PPLUS_HAWK_SMC_BASE); total = hawk_get_mem_size(PPLUS_HAWK_SMC_BASE);
return (total); return (total);
} }
......
...@@ -64,14 +64,4 @@ ...@@ -64,14 +64,4 @@
#define PPLUS_VGA_MEM_BASE 0xf0000000U #define PPLUS_VGA_MEM_BASE 0xf0000000U
extern int pplus_init(struct pci_controller *hose, #endif /* __PPC_PPLUS_H */
unsigned int ppc_reg_base, unsigned long processor_pci_mem_start,
unsigned long processor_pci_mem_end,
unsigned long processor_pci_io_start,
unsigned long processor_pci_io_end,
unsigned long processor_mpic_base);
extern unsigned long pplus_get_mem_size(unsigned int smc_base);
extern int pplus_mpic_init(unsigned int pci_mem_offset);
#endif /* __PPC_PPLUS_H */
...@@ -45,23 +45,23 @@ obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \ ...@@ -45,23 +45,23 @@ obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \
obj-$(CONFIG_LOPEC) += mpc10x_common.o indirect_pci.o pci_auto.o \ obj-$(CONFIG_LOPEC) += mpc10x_common.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o todc_time.o open_pic.o i8259.o todc_time.o
obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \ obj-$(CONFIG_MCPN765) += todc_time.o indirect_pci.o pci_auto.o \
open_pic.o i8259.o pplus_common.o open_pic.o i8259.o hawk_common.o
obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \ obj-$(CONFIG_MENF1) += todc_time.o i8259.o mpc10x_common.o \
pci_auto.o indirect_pci.o pci_auto.o indirect_pci.o
obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \ obj-$(CONFIG_MVME5100) += open_pic.o todc_time.o indirect_pci.o \
i8259.o pci_auto.o pplus_common.o i8259.o pci_auto.o hawk_common.o
obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o obj-$(CONFIG_OCOTEA) += indirect_pci.o pci_auto.o todc_time.o
obj-$(CONFIG_PAL4) += cpc700_pic.o obj-$(CONFIG_PAL4) += cpc700_pic.o
obj-$(CONFIG_PCORE) += mpc10x_common.o todc_time.o i8259.o \ obj-$(CONFIG_PCORE) += mpc10x_common.o todc_time.o i8259.o \
indirect_pci.o pci_auto.o indirect_pci.o pci_auto.o
obj-$(CONFIG_POWERPMC250) += open_pic.o mpc10x_common.o \ obj-$(CONFIG_POWERPMC250) += open_pic.o mpc10x_common.o \
indirect_pci.o pci_auto.o indirect_pci.o pci_auto.o
obj-$(CONFIG_PPLUS) += pplus_common.o open_pic.o i8259.o \ obj-$(CONFIG_PPLUS) += hawk_common.o open_pic.o i8259.o \
indirect_pci.o todc_time.o pci_auto.o indirect_pci.o todc_time.o pci_auto.o
obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \ obj-$(CONFIG_PRPMC750) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o hawk_common.o
obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \ obj-$(CONFIG_PRPMC800) += open_pic.o indirect_pci.o pci_auto.o \
pplus_common.o harrier.o hawk_common.o harrier.o
obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \ obj-$(CONFIG_SANDPOINT) += i8259.o open_pic.o mpc10x_common.o \
pci_auto.o indirect_pci.o todc_time.o pci_auto.o indirect_pci.o todc_time.o
obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \ obj-$(CONFIG_SPRUCE) += cpc700_pic.o indirect_pci.o pci_auto.o \
......
/* /*
* arch/ppc/syslib/pplus_common.c * arch/ppc/syslib/hawk_common.c
* *
* Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK. * Common Motorola PowerPlus Platform--really Falcon/Raven or HAWK.
* *
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
* 'OpenPIC_Addr' will be set correctly by this routine. * 'OpenPIC_Addr' will be set correctly by this routine.
*/ */
int __init int __init
pplus_init(struct pci_controller *hose, hawk_init(struct pci_controller *hose,
uint ppc_reg_base, uint ppc_reg_base,
ulong processor_pci_mem_start, ulong processor_pci_mem_start,
ulong processor_pci_mem_end, ulong processor_pci_mem_end,
...@@ -59,14 +59,14 @@ pplus_init(struct pci_controller *hose, ...@@ -59,14 +59,14 @@ pplus_init(struct pci_controller *hose,
*/ */
if (((processor_pci_mem_start&0xffff0000) != processor_pci_mem_start) || if (((processor_pci_mem_start&0xffff0000) != processor_pci_mem_start) ||
((processor_pci_io_start &0xffff0000) != processor_pci_io_start)) { ((processor_pci_io_start &0xffff0000) != processor_pci_io_start)) {
printk("pplus_init: %s\n", printk("hawk_init: %s\n",
"PPC to PCI mappings must start on 64 KB boundaries"); "PPC to PCI mappings must start on 64 KB boundaries");
return -1; return -1;
} }
if (((processor_pci_mem_end &0x0000ffff) != 0x0000ffff) || if (((processor_pci_mem_end &0x0000ffff) != 0x0000ffff) ||
((processor_pci_io_end &0x0000ffff) != 0x0000ffff)) { ((processor_pci_io_end &0x0000ffff) != 0x0000ffff)) {
printk("pplus_init: PPC to PCI mappings %s\n", printk("hawk_init: PPC to PCI mappings %s\n",
"must end just before a 64 KB boundaries"); "must end just before a 64 KB boundaries");
return -1; return -1;
} }
...@@ -75,19 +75,19 @@ pplus_init(struct pci_controller *hose, ...@@ -75,19 +75,19 @@ pplus_init(struct pci_controller *hose,
(hose->mem_space.end - hose->mem_space.start)) || (hose->mem_space.end - hose->mem_space.start)) ||
((processor_pci_io_end - processor_pci_io_start) != ((processor_pci_io_end - processor_pci_io_start) !=
(hose->io_space.end - hose->io_space.start))) { (hose->io_space.end - hose->io_space.start))) {
printk("pplus_init: %s\n", printk("hawk_init: %s\n",
"PPC and PCI memory or I/O space sizes don't match"); "PPC and PCI memory or I/O space sizes don't match");
return -1; return -1;
} }
if ((processor_mpic_base & 0xfffc0000) != processor_mpic_base) { if ((processor_mpic_base & 0xfffc0000) != processor_mpic_base) {
printk("pplus_init: %s\n", printk("hawk_init: %s\n",
"MPIC address must start on 256 MB boundary"); "MPIC address must start on 256 MB boundary");
return -1; return -1;
} }
if ((pci_dram_offset & 0xffff0000) != pci_dram_offset) { if ((pci_dram_offset & 0xffff0000) != pci_dram_offset) {
printk("pplus_init: %s\n", printk("hawk_init: %s\n",
"pci_dram_offset must be multiple of 64 KB"); "pci_dram_offset must be multiple of 64 KB");
return -1; return -1;
} }
...@@ -226,7 +226,7 @@ static uint hawk_size_table[] __initdata = { ...@@ -226,7 +226,7 @@ static uint hawk_size_table[] __initdata = {
* into virtual memory--too early to use ioremap(). * into virtual memory--too early to use ioremap().
*/ */
unsigned long __init unsigned long __init
pplus_get_mem_size(uint smc_base) hawk_get_mem_size(uint smc_base)
{ {
unsigned long total; unsigned long total;
int i, size_table_entries, reg_limit; int i, size_table_entries, reg_limit;
...@@ -238,7 +238,7 @@ pplus_get_mem_size(uint smc_base) ...@@ -238,7 +238,7 @@ pplus_get_mem_size(uint smc_base)
vend_dev_id = in_be32((uint *)smc_base + PCI_VENDOR_ID); vend_dev_id = in_be32((uint *)smc_base + PCI_VENDOR_ID);
if (((vend_dev_id & 0xffff0000) >> 16) != PCI_VENDOR_ID_MOTOROLA) { if (((vend_dev_id & 0xffff0000) >> 16) != PCI_VENDOR_ID_MOTOROLA) {
printk("pplus_get_mem_size: %s (0x%x)\n", printk("hawk_get_mem_size: %s (0x%x)\n",
"Not a Motorola Memory Controller", vend_dev_id); "Not a Motorola Memory Controller", vend_dev_id);
return 0; return 0;
} }
...@@ -259,7 +259,7 @@ pplus_get_mem_size(uint smc_base) ...@@ -259,7 +259,7 @@ pplus_get_mem_size(uint smc_base)
reg_limit = HAWK_SMC_REG_COUNT; reg_limit = HAWK_SMC_REG_COUNT;
} }
else { else {
printk("pplus_get_mem_size: %s (0x%x)\n", printk("hawk_get_mem_size: %s (0x%x)\n",
"Not a Falcon or HAWK", vend_dev_id); "Not a Falcon or HAWK", vend_dev_id);
return 0; return 0;
} }
...@@ -285,35 +285,3 @@ pplus_get_mem_size(uint smc_base) ...@@ -285,35 +285,3 @@ pplus_get_mem_size(uint smc_base)
return total; return total;
} }
int __init
pplus_mpic_init(unsigned int pci_mem_offset)
{
unsigned short devid;
unsigned int pci_membase;
/* Check the first PCI device to see if it is a Raven or Hawk. */
early_read_config_word(0, 0, 0, PCI_DEVICE_ID, &devid);
switch (devid) {
case PCI_DEVICE_ID_MOTOROLA_RAVEN:
case PCI_DEVICE_ID_MOTOROLA_HAWK:
break;
default:
OpenPIC_Addr = NULL;
return 1;
}
/* Read the memory base register. */
early_read_config_dword(0, 0, 0, PCI_BASE_ADDRESS_1, &pci_membase);
if (pci_membase == 0) {
OpenPIC_Addr = NULL;
return 1;
}
/* Map the MPIC registers to virtual memory. */
OpenPIC_Addr = ioremap(pci_membase + pci_mem_offset, 0x22000);
return 0;
}
...@@ -29,4 +29,4 @@ extern int hawk_init(struct pci_controller *hose, ...@@ -29,4 +29,4 @@ extern int hawk_init(struct pci_controller *hose,
extern unsigned long hawk_get_mem_size(unsigned int smc_base); extern unsigned long hawk_get_mem_size(unsigned int smc_base);
extern int hawk_mpic_init(unsigned int pci_mem_offset); extern int hawk_mpic_init(unsigned int pci_mem_offset);
#endif /* __ASMPPC_PPLUS_H */ #endif /* __ASMPPC_HAWK_H */
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