Commit ad47c00f authored by Randy Vinson's avatar Randy Vinson Committed by Linus Torvalds

[PATCH] ppc32: add Support for IBM 750FX and 750GX Eval Boards

I've added support for the IBM 750FX and 750GX Eval Boards
(Chestnut/Buckeye).
Signed-off-by: default avatarRandy Vinson <rvinson@mvista.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent e1b2de6e
......@@ -520,6 +520,12 @@ config PCORE
config POWERPMC250
bool "Force-PowerPMC250"
config CHESTNUT
bool "IBM 750FX Eval board or 750GX Eval board"
help
Select CHESTNUT if configuring an IBM 750FX Eval Board or a
IBM 750GX Eval board.
config SPRUCE
bool "IBM-Spruce"
......@@ -694,7 +700,7 @@ config PPC_GEN550
bool
depends on SANDPOINT || MCPN765 || SPRUCE || PPLUS || PCORE || \
PRPMC750 || K2 || PRPMC800 || LOPEC || \
(EV64260 && !SERIAL_MPSC)
(EV64260 && !SERIAL_MPSC) || CHESTNUT
default y
config FORCE
......@@ -712,6 +718,11 @@ config MV64360
depends on KATANA
default y
config MV64360
bool
depends on CHESTNUT
default y
config MV64X60
bool
depends on (GT64260 || MV64360)
......
......@@ -76,6 +76,9 @@ zimageinitrd-$(CONFIG_OCOTEA) := zImage.initrd-TREE
end-$(CONFIG_EV64260) := ev64260
cacheflag-$(CONFIG_EV64260) := -include $(clear_L2_L3)
extra.o-$(CONFIG_CHESTNUT) := misc-chestnut.o
end-$(CONFIG_CHESTNUT) := chestnut
zimage-$(CONFIG_GEMINI) := zImage-STRIPELF
zimageinitrd-$(CONFIG_GEMINI) := zImage.initrd-STRIPELF
end-$(CONFIG_GEMINI) := gemini
......
/*
* arch/ppc/boot/simple/misc-chestnut.S
*
* Setup for the IBM Chestnut (ibm-750fxgx_eval)
*
* Author: <source@mvista.com>
*
* <2004> (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 <asm/ppc_asm.h>
#include <asm/mv64x60_defs.h>
#include <platforms/chestnut.h>
.globl mv64x60_board_init
mv64x60_board_init:
/*
* move UART to 0xffc00000
*/
li r23,16
addis r25,0,CONFIG_MV64X60_BASE@h
ori r25,r25,MV64x60_CPU2DEV_2_BASE
addis r26,0,CHESTNUT_UART_BASE@h
srw r26,r26,r23
stwbrx r26,0,(r25)
sync
addis r25,0,CONFIG_MV64X60_BASE@h
ori r25,r25,MV64x60_CPU2DEV_2_SIZE
addis r26,0,0x00100000@h
srw r26,r26,r23
stwbrx r26,0,(r25)
sync
blr
This diff is collapsed.
......@@ -25,6 +25,7 @@ obj-$(CONFIG_PQ2ADS) += pq2ads.o
obj-$(CONFIG_TQM8260) += tqm8260_setup.o
obj-$(CONFIG_CPCI690) += cpci690.o
obj-$(CONFIG_EV64260) += ev64260.o
obj-$(CONFIG_CHESTNUT) += chestnut.o
obj-$(CONFIG_GEMINI) += gemini_pci.o gemini_setup.o gemini_prom.o
obj-$(CONFIG_K2) += k2.o
obj-$(CONFIG_LOPEC) += lopec.o
......
This diff is collapsed.
/*
* arch/ppc/platforms/chestnut.h
*
* Definitions for IBM 750FXGX Eval (Chestnut)
*
* Author: <source@mvista.com>
*
* Based on Artesyn Katana code done by Tim Montgomery <timm@artesyncp.com>
* Based on code done by Rabeeh Khoury - rabeeh@galileo.co.il
* Based on code done by Mark A. Greer <mgreer@mvista.com>
*
* <2004> (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.
*/
/*
* This is the CPU physical memory map (windows must be at least 1MB and start
* on a boundary that is a multiple of the window size):
*
* Seems on the IBM 750FXGX Eval board, the MV64460 Registers can be in
* only 2 places per switch U17 0x14000000 or 0xf1000000 easily - chose to
* implement at 0xf1000000 only at this time
*
* 0xfff00000-0xffffffff - 8 Flash
* 0xffd00000-0xffd00004 - CPLD
* 0xffc00000-0xffc0000f - UART
* 0xffb00000-0xffb07fff - FRAM
* 0xffa00000-0xffafffff - *** HOLE ***
* 0xff900000-0xff9fffff - MV64460 Integrated SRAM
* 0xfe000000-0xff8fffff - *** HOLE ***
* 0xfc000000-0xfdffffff - 32bit Flash
* 0xf1010000-0xfbffffff - *** HOLE ***
* 0xf1000000-0xf100ffff - MV64460 Registers
*/
#ifndef __PPC_PLATFORMS_CHESTNUT_H__
#define __PPC_PLATFORMS_CHESTNUT_H__
#define CHESTNUT_BOOT_8BIT_BASE 0xfff00000
#define CHESTNUT_BOOT_8BIT_SIZE_ACTUAL (1024*1024)
#define CHESTNUT_BOOT_SRAM_BASE 0xffe00000
#define CHESTNUT_BOOT_SRAM_SIZE_ACTUAL (1024*1024)
#define CHESTNUT_CPLD_BASE 0xffd00000
#define CHESTNUT_CPLD_SIZE_ACTUAL 5
#define CHESTNUT_CPLD_REG3 (CHESTNUT_CPLD_BASE+3)
#define CHESTNUT_UART_BASE 0xffc00000
#define CHESTNUT_UART_SIZE_ACTUAL 16
#define CHESTNUT_FRAM_BASE 0xffb00000
#define CHESTNUT_FRAM_SIZE_ACTUAL (32*1024)
#define CHESTNUT_BRIDGE_REG_BASE 0xf1000000
#define CHESTNUT_INTERNAL_SRAM_BASE 0xff900000
#define CHESTNUT_INTERNAL_SRAM_SIZE_ACTUAL (256*1024)
#define CHESTNUT_32BIT_BASE 0xfc000000
#define CHESTNUT_32BIT_SIZE (32*1024*1024)
#define CHESTNUT_BOOT_8BIT_SIZE max(MV64360_WINDOW_SIZE_MIN, \
CHESTNUT_BOOT_8BIT_SIZE_ACTUAL)
#define CHESTNUT_BOOT_SRAM_SIZE max(MV64360_WINDOW_SIZE_MIN, \
CHESTNUT_BOOT_SRAM_SIZE_ACTUAL)
#define CHESTNUT_CPLD_SIZE max(MV64360_WINDOW_SIZE_MIN, \
CHESTNUT_CPLD_SIZE_ACTUAL)
#define CHESTNUT_UART_SIZE max(MV64360_WINDOW_SIZE_MIN, \
CHESTNUT_UART_SIZE_ACTUAL)
#define CHESTNUT_FRAM_SIZE max(MV64360_WINDOW_SIZE_MIN, \
CHESTNUT_FRAM_SIZE_ACTUAL)
#define CHESTNUT_INTERNAL_SRAM_SIZE max(MV64360_WINDOW_SIZE_MIN, \
CHESTNUT_INTERNAL_SRAM_SIZE_ACTUAL)
#define CHESTNUT_BUS_SPEED 200000000
#define CHESTNUT_PIBS_DATABASE 0xf0000 /* from PIBS src code */
#define MV64360_ETH_PORT_SERIAL_CONTROL_REG_PORT0 0x243c
#define MV64360_ETH_PORT_SERIAL_CONTROL_REG_PORT1 0x283c
/*
* PCI windows
*/
#define CHESTNUT_PCI0_MEM_PROC_ADDR 0x80000000
#define CHESTNUT_PCI0_MEM_PCI_HI_ADDR 0x00000000
#define CHESTNUT_PCI0_MEM_PCI_LO_ADDR 0x80000000
#define CHESTNUT_PCI0_MEM_SIZE 0x10000000
#define CHESTNUT_PCI0_IO_PROC_ADDR 0xa0000000
#define CHESTNUT_PCI0_IO_PCI_ADDR 0x00000000
#define CHESTNUT_PCI0_IO_SIZE 0x01000000
/*
* Board-specific IRQ info
*/
#define CHESTNUT_PCI_SLOT0_IRQ 64+31
#define CHESTNUT_PCI_SLOT1_IRQ 64+30
#define CHESTNUT_PCI_SLOT2_IRQ 64+29
#define CHESTNUT_PCI_SLOT3_IRQ 64+28
/* serial port definitions */
#define CHESTNUT_UART0_IO_BASE CHESTNUT_UART_BASE+8
#define CHESTNUT_UART1_IO_BASE CHESTNUT_UART_BASE
#define UART0_INT 64+25
#define UART1_INT 64+26
#ifdef CONFIG_SERIAL_MANY_PORTS
#define RS_TABLE_SIZE 64
#else
#define RS_TABLE_SIZE 2
#endif
/* Rate for the 3.6864 Mhz clock for the onboard serial chip */
#define BASE_BAUD ( 3686400 / 16 )
#ifdef CONFIG_SERIAL_DETECT_IRQ
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST|ASYNC_AUTO_IRQ)
#else
#define STD_COM_FLAGS (ASYNC_BOOT_AUTOCONF|ASYNC_SKIP_TEST)
#endif
#define STD_UART_OP(num) \
{ 0, BASE_BAUD, 0, UART##num##_INT, STD_COM_FLAGS, \
iomem_base: (u8 *)CHESTNUT_UART##num##_IO_BASE, \
io_type: SERIAL_IO_MEM},
#define SERIAL_PORT_DFNS \
STD_UART_OP(0) \
STD_UART_OP(1)
#endif /* __PPC_PLATFORMS_CHESTNUT_H__ */
......@@ -42,6 +42,7 @@ obj-$(CONFIG_ADIR) += i8259.o indirect_pci.o pci_auto.o \
obj-$(CONFIG_CPCI690) += todc_time.o pci_auto.o
obj-$(CONFIG_EBONY) += indirect_pci.o pci_auto.o todc_time.o
obj-$(CONFIG_EV64260) += todc_time.o pci_auto.o
obj-$(CONFIG_CHESTNUT) += mv64360_pic.o pci_auto.o
obj-$(CONFIG_GEMINI) += open_pic.o indirect_pci.o
obj-$(CONFIG_GT64260) += gt64260_pic.o
obj-$(CONFIG_K2) += i8259.o indirect_pci.o todc_time.o \
......
......@@ -397,6 +397,14 @@ config MTD_REDWOOD
Redwood board. If you have one of these boards and would like to
use the flash chips on it, say 'Y'.
config MTD_CHESTNUT
tristate "CFI Flash devices mapped on IBM 750FX or IBM 750GX Eval Boards"
depends on MTD_CFI && PPC32 && CHESTNUT
help
This enables access routines for the flash chips on the IBM
750FX and 750GX Eval Boards. If you have one of these boards and
would like to use the flash chips on it, say 'Y'
config MTD_CSTM_MIPS_IXX
tristate "Flash chip mapping on ITE QED-4N-S01B, Globespan IVR or custom board"
depends on MIPS && MTD_CFI && MTD_JEDECPROBE && MTD_PARTITIONS
......
......@@ -54,6 +54,7 @@ obj-$(CONFIG_MTD_EDB7312) += edb7312.o
obj-$(CONFIG_MTD_IMPA7) += impa7.o
obj-$(CONFIG_MTD_FORTUNET) += fortunet.o
obj-$(CONFIG_MTD_REDWOOD) += redwood.o
obj-$(CONFIG_CHESTNUT) += chestnut.o
obj-$(CONFIG_MTD_UCLINUX) += uclinux.o
obj-$(CONFIG_MTD_NETtel) += nettel.o
obj-$(CONFIG_MTD_SCB2_FLASH) += scb2_flash.o
......
/*
* drivers/mtd/maps/chestnut.c
*
* Flash map driver for IBM Chestnut (750FXGX Eval)
*
* Chose not to enable 8 bit flash as it contains the firware and board
* info. Thus only the 32bit flash is supported.
*
* Author: <source@mvista.com>
*
* 2004 (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/module.h>
#include <linux/init.h>
#include <linux/types.h>
#include <linux/kernel.h>
#include <asm/io.h>
#include <linux/mtd/mtd.h>
#include <linux/mtd/map.h>
#include <linux/mtd/partitions.h>
#include <platforms/chestnut.h>
static struct map_info chestnut32_map = {
.name = "User FS",
.size = CHESTNUT_32BIT_SIZE,
.bankwidth = 4,
.phys = CHESTNUT_32BIT_BASE,
};
static struct mtd_partition chestnut32_partitions[] = {
{
.name = "User FS",
.offset = 0,
.size = CHESTNUT_32BIT_SIZE,
}
};
static struct mtd_info *flash32;
int __init init_chestnut(void)
{
/* 32-bit FLASH */
chestnut32_map.virt = ioremap(chestnut32_map.phys, chestnut32_map.size);
if (!chestnut32_map.virt) {
printk(KERN_NOTICE "Failed to ioremap 32-bit flash\n");
return -EIO;
}
simple_map_init(&chestnut32_map);
flash32 = do_map_probe("cfi_probe", &chestnut32_map);
if (flash32) {
flash32->owner = THIS_MODULE;
add_mtd_partitions(flash32, chestnut32_partitions,
ARRAY_SIZE(chestnut32_partitions));
} else {
printk(KERN_NOTICE "map probe failed for 32-bit flash\n");
return -ENXIO;
}
return 0;
}
static void __exit
cleanup_chestnut(void)
{
if (flash32) {
del_mtd_partitions(flash32);
map_destroy(flash32);
}
if (chestnut32_map.virt) {
iounmap((void *)chestnut32_map.virt);
chestnut32_map.virt = 0;
}
}
module_init(init_chestnut);
module_exit(cleanup_chestnut);
MODULE_DESCRIPTION("MTD map and partitions for IBM Chestnut (750fxgx Eval)");
MODULE_AUTHOR("<mvista.com>");
MODULE_LICENSE("GPL");
......@@ -849,6 +849,8 @@
#define MV64x60_GPP_VALUE 0xf104
#define MV64x60_GPP_INTR_CAUSE 0xf108
#define MV64x60_GPP_INTR_MASK 0xf10c
#define MV64x60_GPP_VALUE_SET 0xf118
#define MV64x60_GPP_VALUE_CLR 0xf11c
/*
......
......@@ -10,6 +10,8 @@
#if defined(CONFIG_EV64260)
#include <platforms/ev64260.h>
#elif defined(CONFIG_CHESTNUT)
#include <platforms/chestnut.h>
#elif defined(CONFIG_GEMINI)
#include <platforms/gemini_serial.h>
#elif defined(CONFIG_POWERPMC250)
......
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