Commit c5bddde0 authored by Tom Rini's avatar Tom Rini

PPC32: Remove the MEN F1 platform code. It was old and unmaintained.

This change can also be found in patch form at:
ftp://source.mvista.com/pub/linuxppc/obsolete/menf1
parent f9a4581c
...@@ -450,9 +450,6 @@ config EV64260 ...@@ -450,9 +450,6 @@ config EV64260
config SPRUCE config SPRUCE
bool "IBM-Spruce" bool "IBM-Spruce"
config MENF1
bool "MEN-F1"
config LOPEC config LOPEC
bool "Motorola-LoPEC" bool "Motorola-LoPEC"
...@@ -533,7 +530,7 @@ config WILLOW ...@@ -533,7 +530,7 @@ config WILLOW
config MPC10X_STORE_GATHERING config MPC10X_STORE_GATHERING
bool "Enable MPC10x store gathering" bool "Enable MPC10x store gathering"
depends on FORCE || MENF1 || SANDPOINT depends on FORCE || SANDPOINT
config GT64260 config GT64260
bool bool
......
...@@ -61,12 +61,6 @@ ZIMAGEINITRD := zImage.initrd-STRIPELF ...@@ -61,12 +61,6 @@ ZIMAGEINITRD := zImage.initrd-STRIPELF
END := gemini END := gemini
TFTPIMAGE := /tftpboot/zImage.$(END) TFTPIMAGE := /tftpboot/zImage.$(END)
endif endif
ifeq ($(CONFIG_MENF1),y)
ZIMAGE := zImage-MENF1
ZIMAGEINITRD := zImage.initrd-MENF1
EXTRA := chrpmap.o
TFTPIMAGE := /tftpboot/zImage.menf1
endif
ifeq ($(CONFIG_K2),y) ifeq ($(CONFIG_K2),y)
EXTRA := legacy.o EXTRA := legacy.o
TFTPIMAGE := /tftpboot/zImage.k2 TFTPIMAGE := /tftpboot/zImage.k2
...@@ -202,12 +196,6 @@ $(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE) ...@@ -202,12 +196,6 @@ $(images)/zImage.initrd-TREE: $(obj)/zvmlinux.initrd $(MKTREE)
$(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(END) \ $(MKTREE) $(obj)/zvmlinux.initrd $(images)/zImage.initrd.$(END) \
$(ENTRYPOINT) $(ENTRYPOINT)
$(images)/zImage-MENF1: $(obj)/zvmlinux $(MKPREP)
$(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.menf1
$(images)/zImage.initrd-MENF1: $(obj)/zvmlinux.initrd $(MKPREP)
$(MKPREP) -pbp $(obj)/zvmlinux.initrd $(images)/zImage.initrd.menf1
$(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT) $(images)/zImage-PPLUS: $(obj)/zvmlinux $(MKPREP) $(MKBUGBOOT)
$(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.pplus $(MKPREP) -pbp $(obj)/zvmlinux $(images)/zImage.pplus
$(MKBUGBOOT) $(obj)/zvmlinux $(images)/zImage.bugboot $(MKBUGBOOT) $(obj)/zvmlinux $(images)/zImage.bugboot
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -56,7 +56,6 @@ CONFIG_APUS=y ...@@ -56,7 +56,6 @@ CONFIG_APUS=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -56,7 +56,6 @@ CONFIG_PPC_MULTIPLATFORM=y ...@@ -56,7 +56,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
CONFIG_EV64260=y CONFIG_EV64260=y
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_MULTIPLATFORM=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
CONFIG_LOPEC=y CONFIG_LOPEC=y
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -50,7 +50,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -50,7 +50,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
CONFIG_MCPN765=y CONFIG_MCPN765=y
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
CONFIG_MVME5100=y CONFIG_MVME5100=y
......
...@@ -55,7 +55,6 @@ CONFIG_PCORE=y ...@@ -55,7 +55,6 @@ CONFIG_PCORE=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -57,7 +57,6 @@ CONFIG_PPC_MULTIPLATFORM=y ...@@ -57,7 +57,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_MULTIPLATFORM=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y ...@@ -55,7 +55,6 @@ CONFIG_PPC_STD_MMU=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
CONFIG_SPRUCE=y CONFIG_SPRUCE=y
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
...@@ -56,7 +56,6 @@ CONFIG_PPC_MULTIPLATFORM=y ...@@ -56,7 +56,6 @@ CONFIG_PPC_MULTIPLATFORM=y
# CONFIG_POWERPMC250 is not set # CONFIG_POWERPMC250 is not set
# CONFIG_EV64260 is not set # CONFIG_EV64260 is not set
# CONFIG_SPRUCE is not set # CONFIG_SPRUCE is not set
# CONFIG_MENF1 is not set
# CONFIG_LOPEC is not set # CONFIG_LOPEC is not set
# CONFIG_MCPN765 is not set # CONFIG_MCPN765 is not set
# CONFIG_MVME5100 is not set # CONFIG_MVME5100 is not set
......
/*
* arch/ppc/platforms/menf1.h
*
* Definitions for MEN F1 board support
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#ifndef __PPC_PLATFORMS_MENF1_H
#define __PPC_PLATFORMS_MENF1_H
#define MENF1_NVRAM_AS0 0x70
#define MENF1_NVRAM_AS1 0x72
#define MENF1_NVRAM_DATA 0x71
#define MENF1_IDE0_BASE_ADDR 0x1f0
#define MENF1_IDE1_BASE_ADDR 0x170
#endif /* __PPC_PLATFORMS_MENF1_H */
/*
* arch/ppc/platforms/menf1_pci.c
*
* PCI support for MEN F1
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/pci.h>
#include <linux/slab.h>
#include <asm/byteorder.h>
#include <asm/io.h>
#include <asm/irq.h>
#include <asm/uaccess.h>
#include <asm/machdep.h>
#include <asm/pci-bridge.h>
#include <asm/mpc10x.h>
#include "menf1.h"
#undef DEBUG
#ifdef DEBUG
#define DBG(x...) printk(x)
#else
#define DBG(x...)
#endif /* DEBUG */
static inline int __init
menf1_map_irq(struct pci_dev *dev, unsigned char idsel, unsigned char pin)
{
static char pci_irq_table[][4] =
/*
* PCI IDSEL/INTPIN->INTLINE
* A B C D
*/
{
{10, 11, 7, 9}, /* IDSEL 26 - PCMIP 0 */
{0, 0, 0, 0}, /* IDSEL 27 - M5229 IDE */
{0, 0, 0, 0}, /* IDSEL 28 - M7101 PMU */
{9, 10, 11, 7}, /* IDSEL 29 - PCMIP 1 */
{10, 11, 7, 9}, /* IDSEL 30 - P2P Bridge */
};
const long min_idsel = 26, max_idsel = 30, irqs_per_slot = 4;
return PCI_IRQ_TABLE_LOOKUP;
};
static int
menf1_exclude_device(u_char bus, u_char devfn)
{
if ((bus == 0) && (devfn == 0xe0)) {
return PCIBIOS_DEVICE_NOT_FOUND;
}
else {
return PCIBIOS_SUCCESSFUL;
}
}
void __init
menf1_find_bridges(void)
{
struct pci_controller* hose;
hose = pcibios_alloc_controller();
if (!hose)
return;
hose->first_busno = 0;
hose->last_busno = 0xff;
ppc_md.pci_exclude_device = menf1_exclude_device;
mpc10x_bridge_init(hose,
MPC10X_MEM_MAP_B,
MPC10X_MEM_MAP_B,
MPC10X_MAPB_EUMB_BASE);
hose->last_busno = pciauto_bus_scan(hose, hose->first_busno);
{
/* Add ISA bus wait states */
unsigned char isa_control;
early_read_config_byte(hose, 0, 0x90, 0x43, &isa_control);
isa_control |= 0x33;
early_write_config_byte(hose, 0, 0x90, 0x43, isa_control);
}
ppc_md.pci_swizzle = common_swizzle;
ppc_md.pci_map_irq = menf1_map_irq;
}
/*
* arch/ppc/platforms/menf1_setup.c
*
* Board setup routines for MEN F1
*
* Author: Matt Porter <mporter@mvista.com>
*
* 2001 (c) MontaVista, Software, Inc. This file is licensed under
* the terms of the GNU General Public License version 2. This program
* is licensed "as is" without any warranty of any kind, whether express
* or implied.
*/
#include <linux/config.h>
#include <linux/stddef.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/errno.h>
#include <linux/reboot.h>
#include <linux/pci.h>
#include <linux/kdev_t.h>
#include <linux/types.h>
#include <linux/major.h>
#include <linux/initrd.h>
#include <linux/console.h>
#include <linux/delay.h>
#include <linux/ide.h>
#include <linux/irq.h>
#include <linux/seq_file.h>
#include <linux/root_dev.h>
#include <asm/system.h>
#include <asm/pgtable.h>
#include <asm/page.h>
#include <asm/dma.h>
#include <asm/io.h>
#include <asm/machdep.h>
#include <asm/time.h>
#include <asm/i8259.h>
#include <asm/mpc10x.h>
#include <asm/todc.h>
#include <asm/bootinfo.h>
#include "menf1.h"
extern void menf1_find_bridges(void);
extern unsigned long loops_per_jiffy;
/* Dummy variable to satisfy mpc10x_common.o */
void *OpenPIC_Addr;
static int
menf1_show_cpuinfo(struct seq_file *m)
{
seq_printf(m, "machine\t\t: MEN F1\n");
return 0;
}
static void __init
menf1_setup_arch(void)
{
/* init to some ~sane value until calibrate_delay() runs */
loops_per_jiffy = 50000000/HZ;
/* Lookup PCI host bridges */
menf1_find_bridges();
#ifdef CONFIG_BLK_DEV_INITRD
if (initrd_start)
ROOT_DEV = Root_RAM0;
else
#endif
#ifdef CONFIG_ROOT_NFS
ROOT_DEV = Root_NFS;
#else
ROOT_DEV = Root_HDA2;
#endif
#ifdef CONFIG_DUMMY_CONSOLE
conswitchp = &dummy_con;
#endif
printk("MEN F1 port (C) 2001 MontaVista Software, Inc. (source@mvista.com)\n");
}
static void
menf1_restart(char *cmd)
{
int picr1;
struct pci_dev *pdev;
local_irq_disable();
/*
* Firmware doesn't like re-entry using Map B (CHRP), so make sure the
* PCI bridge is using MAP A (PReP).
*/
pdev = pci_find_slot(0, PCI_DEVFN(0,0));
while(pdev == NULL); /* paranoia */
pci_read_config_dword(pdev, MPC10X_CFG_PICR1_REG, &picr1);
picr1 = (picr1 & ~MPC10X_CFG_PICR1_ADDR_MAP_MASK) |
MPC10X_CFG_PICR1_ADDR_MAP_A;
pci_write_config_dword(pdev, MPC10X_CFG_PICR1_REG, picr1);
asm volatile("sync");
/* SRR0 has system reset vector, SRR1 has default MSR value */
/* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */
__asm__ __volatile__
("\n\
lis 3,0xfff0
ori 3,3,0x0100
mtspr 26,3
li 3,0
mtspr 27,3
rfi
");
while(1);
}
static void
menf1_halt(void)
{
local_irq_disable();
while (1);
}
static void
menf1_power_off(void)
{
menf1_halt();
}
static void __init
menf1_init_IRQ(void)
{
int i;
for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ )
irq_desc[i].handler = &i8259_pic;
i8259_init(NULL);
}
/*
* Set BAT 3 to map 0xF0000000.
*/
static __inline__ void
menf1_set_bat(void)
{
static int mapping_set = 0;
if (!mapping_set)
{
/* wait for all outstanding memory accesses to complete */
mb();
/* setup DBATs */
mtspr(DBAT3U, 0xf0001ffe);
mtspr(DBAT3L, 0xf000002a);
/* wait for updates */
mb();
mapping_set = 1;
}
return;
}
static unsigned long __init
menf1_find_end_of_memory(void)
{
/* Cover the I/O with a BAT */
menf1_set_bat();
/* Read the memory size from the MPC107 SMC */
return mpc10x_get_mem_size(MPC10X_MEM_MAP_B);
}
static void __init
menf1_map_io(void)
{
io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO);
}
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
/* IDE functions */
static void __init
menf1_ide_init_hwif_ports (hw_regs_t *hw, unsigned long data_port,
unsigned long ctrl_port, int *irq)
{
unsigned long reg = data_port;
int i = 8;
for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) {
hw->io_ports[i] = reg;
reg += 1;
}
if (ctrl_port)
hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port;
else
hw->io_ports[IDE_CONTROL_OFFSET] =
hw->io_ports[IDE_DATA_OFFSET] + 0x206;
if (irq != NULL)
*irq = 0;
}
static int
menf1_ide_default_irq(unsigned long base)
{
if (base == MENF1_IDE0_BASE_ADDR)
return 14;
else if (base == MENF1_IDE1_BASE_ADDR)
return 15;
else
return 0;
}
static unsigned long
menf1_ide_default_io_base(int index)
{
if (index == 0)
return MENF1_IDE0_BASE_ADDR;
else if (index == 1)
return MENF1_IDE1_BASE_ADDR;
else
return 0;
}
#endif
TODC_ALLOC();
void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
unsigned long r6, unsigned long r7)
{
parse_bootinfo(find_bootinfo());
isa_io_base = MPC10X_MAPB_ISA_IO_BASE;
isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE;
pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET;
ppc_md.setup_arch = menf1_setup_arch;
ppc_md.show_cpuinfo = menf1_show_cpuinfo;
ppc_md.init_IRQ = menf1_init_IRQ;
ppc_md.get_irq = i8259_irq;
ppc_md.find_end_of_memory = menf1_find_end_of_memory;
ppc_md.setup_io_mappings = menf1_map_io;
ppc_md.restart = menf1_restart;
ppc_md.power_off = menf1_power_off;
ppc_md.halt = menf1_halt;
TODC_INIT(TODC_TYPE_MK48T59,
MENF1_NVRAM_AS0,
MENF1_NVRAM_AS1,
MENF1_NVRAM_DATA,
7);
ppc_md.time_init = todc_time_init;
ppc_md.get_rtc_time = todc_get_rtc_time;
ppc_md.set_rtc_time = todc_set_rtc_time;
ppc_md.calibrate_decr = todc_calibrate_decr;
ppc_md.nvram_read_val = todc_m48txx_read_val;
ppc_md.nvram_write_val = todc_m48txx_write_val;
#if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE)
ppc_ide_md.default_io_base = menf1_ide_default_io_base;
ppc_ide_md.default_irq = menf1_ide_default_irq;
ppc_ide_md.ide_init_hwif = menf1_ide_init_hwif_ports;
#endif
}
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