Commit ee3b1931 authored by Mark A. Greer's avatar Mark A. Greer Committed by Linus Torvalds

[PATCH] ppc32: mv64x60 updates

This patch briges the mv64x60 related code up to the latest that I have.

It:
- adds MPSC support to some ppc bootwrapper files
- adds an erratum workaround for the mv64460
- changes some platform_data related structure names
- cleans up a bunch of whitespace
Signed-off-by: default avatarMark A. Greer <mgreer@mvista.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 58b613dc
......@@ -59,7 +59,8 @@ void _vprintk(void(*putc)(const char), const char *fmt0, va_list ap);
unsigned char *ISA_io = NULL;
#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
|| defined(CONFIG_SERIAL_MPSC_CONSOLE)
extern unsigned long com_port;
extern int serial_tstc(unsigned long com_port);
......@@ -81,7 +82,8 @@ void exit(void)
int tstc(void)
{
#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
|| defined(CONFIG_SERIAL_MPSC_CONSOLE)
if(keyb_present)
return (CRT_tstc() || serial_tstc(com_port));
else
......@@ -95,7 +97,8 @@ int getc(void)
{
while (1) {
#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
|| defined(CONFIG_SERIAL_MPSC_CONSOLE)
if (serial_tstc(com_port))
return (serial_getc(com_port));
#endif /* serial console */
......@@ -111,7 +114,8 @@ putc(const char c)
int x,y;
#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
|| defined(CONFIG_SERIAL_MPSC_CONSOLE)
serial_putc(com_port, c);
if ( c == '\n' )
serial_putc(com_port, '\r');
......@@ -159,7 +163,8 @@ void puts(const char *s)
while ( ( c = *s++ ) != '\0' ) {
#if defined(CONFIG_SERIAL_CPM_CONSOLE) || defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE)
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
|| defined(CONFIG_SERIAL_MPSC_CONSOLE)
serial_putc(com_port, c);
if ( c == '\n' ) serial_putc(com_port, '\r');
#endif /* serial console */
......
......@@ -50,7 +50,8 @@
*/
#if (defined(CONFIG_SERIAL_8250_CONSOLE) \
|| defined(CONFIG_VGA_CONSOLE) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE)) \
|| defined(CONFIG_SERIAL_MPC52xx_CONSOLE) \
|| defined(CONFIG_SERIAL_MPSC_CONSOLE)) \
&& !defined(CONFIG_GEMINI)
#define INTERACTIVE_CONSOLE 1
#endif
......@@ -98,7 +99,7 @@ decompress_kernel(unsigned long load_addr, int num_words, unsigned long cksum)
struct bi_record *rec;
unsigned long initrd_loc = 0, TotalMemory = 0;
#ifdef CONFIG_SERIAL_8250_CONSOLE
#if defined(CONFIG_SERIAL_8250_CONSOLE) || defined(CONFIG_SERIAL_MPSC_CONSOLE)
com_port = serial_init(0, NULL);
#endif
......
......@@ -6,12 +6,10 @@
*
* Author: Mark A. Greer <mgreer@mvista.com>
*
* Copyright 2001 MontaVista Software Inc.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
* 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.
*/
/* This code assumes that the data cache has been disabled (L1, L2, L3). */
......
......@@ -369,7 +369,8 @@ mv64360_register_hdlrs(void)
u32 mask;
int rc;
/* Register CPU interface error interrupt handler */
/* Clear old errors and register CPU interface error intr handler */
mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
if ((rc = request_irq(MV64x60_IRQ_CPU_ERR,
mv64360_cpu_error_int_handler, SA_INTERRUPT, CPU_INTR_STR, 0)))
printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
......@@ -377,7 +378,8 @@ mv64360_register_hdlrs(void)
mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0x000000ff);
/* Register internal SRAM error interrupt handler */
/* Clear old errors and register internal SRAM error intr handler */
mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR,
mv64360_sram_error_int_handler,SA_INTERRUPT,SRAM_INTR_STR, 0)))
printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
......@@ -393,18 +395,20 @@ mv64360_register_hdlrs(void)
(mv64x60_get_bridge_rev() > 1))
mask |= 0x1; /* enable DPErr on 64460 */
/* Register PCI 0 error interrupt handler */
/* Clear old errors and register PCI 0 error intr handler */
mv64x60_write(&bh, MV64x60_PCI0_ERR_CAUSE, 0);
if ((rc = request_irq(MV64360_IRQ_PCI0, mv64360_pci_error_int_handler,
SA_INTERRUPT, PCI0_INTR_STR, (void *)0)))
SA_INTERRUPT, PCI0_INTR_STR, (void *)0)))
printk(KERN_WARNING "Can't register pci 0 error handler: %d",
rc);
mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, 0);
mv64x60_write(&bh, MV64x60_PCI0_ERR_MASK, mask);
/* Register PCI 1 error interrupt handler */
/* Clear old errors and register PCI 1 error intr handler */
mv64x60_write(&bh, MV64x60_PCI1_ERR_CAUSE, 0);
if ((rc = request_irq(MV64360_IRQ_PCI1, mv64360_pci_error_int_handler,
SA_INTERRUPT, PCI1_INTR_STR, (void *)1)))
SA_INTERRUPT, PCI1_INTR_STR, (void *)1)))
printk(KERN_WARNING "Can't register pci 1 error handler: %d",
rc);
......
This diff is collapsed.
......@@ -27,7 +27,7 @@
#include <asm/pci-bridge.h>
#include <asm/mv64x60_defs.h>
extern u8 mv64x60_pci_exclude_bridge;
extern u8 mv64x60_pci_exclude_bridge;
extern spinlock_t mv64x60_lock;
......@@ -210,7 +210,7 @@ struct mv64x60_chip_info {
void (*enable_window_64bit)(mv64x60_handle_t *bh, u32 window);
void (*disable_window_64bit)(mv64x60_handle_t *bh, u32 window);
void (*disable_all_windows)(mv64x60_handle_t *bh,
struct mv64x60_setup_info *si);
struct mv64x60_setup_info *si);
void (*config_io2mem_windows)(mv64x60_handle_t *bh,
struct mv64x60_setup_info *si,
u32 mem_windows[MV64x60_CPU2MEM_WINDOWS][2]);
......@@ -223,16 +223,16 @@ struct mv64x60_chip_info {
};
struct mv64x60_handle {
u32 type; /* type of bridge */
u32 rev; /* revision of bridge */
u32 v_base; /* virtual base addr of bridge regs */
u32 p_base; /* physical base addr of bridge regs */
u32 type; /* type of bridge */
u32 rev; /* revision of bridge */
void *v_base; /* virtual base addr of bridge regs */
phys_addr_t p_base; /* physical base addr of bridge regs */
u32 pci_mode_a; /* pci bus 0 mode: conventional pci, pci-x */
u32 pci_mode_b; /* pci bus 1 mode: conventional pci, pci-x */
u32 pci_mode_a; /* pci 0 mode: conventional pci, pci-x*/
u32 pci_mode_b; /* pci 1 mode: conventional pci, pci-x*/
u32 io_base_a; /* vaddr of pci 0's I/O space */
u32 io_base_b; /* vaddr of pci 1's I/O space */
u32 io_base_a; /* vaddr of pci 0's I/O space */
u32 io_base_b; /* vaddr of pci 1's I/O space */
struct pci_controller *hose_a;
struct pci_controller *hose_b;
......@@ -247,7 +247,7 @@ mv64x60_write(struct mv64x60_handle *bh, u32 offset, u32 val) {
ulong flags;
spin_lock_irqsave(&mv64x60_lock, flags);
out_le32((volatile u32 *)(bh->v_base + offset), val);
out_le32(bh->v_base + offset, val);
spin_unlock_irqrestore(&mv64x60_lock, flags);
}
......@@ -256,7 +256,7 @@ mv64x60_read(struct mv64x60_handle *bh, u32 offset) {
ulong flags;
spin_lock_irqsave(&mv64x60_lock, flags);
return in_le32((volatile u32 *)(bh->v_base + offset));
return in_le32(bh->v_base + offset);
spin_unlock_irqrestore(&mv64x60_lock, flags);
}
......@@ -282,11 +282,11 @@ int mv64x60_init(struct mv64x60_handle *bh, struct mv64x60_setup_info *si);
u32 mv64x60_get_mem_size(u32 bridge_base, u32 chip_type);
void mv64x60_early_init(struct mv64x60_handle *bh,
struct mv64x60_setup_info *si);
void mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr, u32 cfg_data,
struct pci_controller **hose);
void mv64x60_alloc_hose(struct mv64x60_handle *bh, u32 cfg_addr,
u32 cfg_data, struct pci_controller **hose);
int mv64x60_get_type(struct mv64x60_handle *bh);
int mv64x60_setup_for_chip(struct mv64x60_handle *bh);
u32 mv64x60_get_bridge_vbase(void);
void *mv64x60_get_bridge_vbase(void);
u32 mv64x60_get_bridge_type(void);
u32 mv64x60_get_bridge_rev(void);
void mv64x60_get_mem_windows(struct mv64x60_handle *bh,
......
......@@ -216,9 +216,9 @@
#define MV64360_CPU1_SYNC_BARRIER_VIRT 0x00d8
/* CPU Deadlock and Ordering registers (Rev B part only) */
#define GT64260_CPU_DEADLOCK_ORDERING 0x02d0
#define GT64260_CPU_WB_PRIORITY_BUFFER_DEPTH 0x02d8
#define GT64260_CPU_COUNTERS_SYNC_BARRIER_ATTRIBUTE 0x02e0
#define GT64260_CPU_DEADLOCK_ORDERING 0x02d0
#define GT64260_CPU_WB_PRIORITY_BUFFER_DEPTH 0x02d8
#define GT64260_CPU_COUNTERS_SYNC_BARRIER_ATTRIBUTE 0x02e0
/* CPU Access Protection Registers (gt64260 realy has 8 but don't need) */
#define MV64x260_CPU_PROT_WINDOWS 4
......
......@@ -1048,7 +1048,7 @@ extern void mv64340_irq_init(unsigned int base);
#define MPSC_ROUTING_REG_BLOCK_SIZE 0x000c
#define MPSC_SDMA_INTR_REG_BLOCK_SIZE 0x0084
struct mpsc_shared_pd_dd {
struct mpsc_shared_pdata {
u32 mrr_val;
u32 rcrr_val;
u32 tcrr_val;
......@@ -1067,7 +1067,7 @@ struct mpsc_shared_pd_dd {
#define MPSC_SDMA_REG_BLOCK_SIZE 0x0c18
#define MPSC_BRG_REG_BLOCK_SIZE 0x0008
struct mpsc_pd_dd {
struct mpsc_pdata {
u8 mirror_regs;
u8 cache_mgmt;
u8 max_idle;
......
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