Commit f0647a52 authored by Vitaly Wool's avatar Vitaly Wool Committed by Ralf Baechle

[PATCH] add STB810 support (Philips PNX8550-based)

Signed-off-by: default avatarVitaly Wool <vitalywool@gmail.com>
Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent c25c79d8
...@@ -461,6 +461,11 @@ config PNX8550_JBS ...@@ -461,6 +461,11 @@ config PNX8550_JBS
select PNX8550 select PNX8550
select SYS_SUPPORTS_LITTLE_ENDIAN select SYS_SUPPORTS_LITTLE_ENDIAN
config PNX8550_STB810
bool "Support for Philips PNX8550 based STB810 board"
select PNX8550
select SYS_SUPPORTS_LITTLE_ENDIAN
config DDB5477 config DDB5477
bool "NEC DDB Vrc-5477" bool "NEC DDB Vrc-5477"
select DDB5XXX_COMMON select DDB5XXX_COMMON
......
...@@ -463,6 +463,11 @@ libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/ ...@@ -463,6 +463,11 @@ libs-$(CONFIG_PNX8550_JBS) += arch/mips/philips/pnx8550/jbs/
#cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550 #cflags-$(CONFIG_PNX8550_JBS) += -Iinclude/asm-mips/mach-pnx8550
load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000 load-$(CONFIG_PNX8550_JBS) += 0xffffffff80060000
# Philips PNX8550 STB810 board
#
libs-$(CONFIG_PNX8550_STB810) += arch/mips/philips/pnx8550/stb810/
load-$(CONFIG_PNX8550_STB810) += 0xffffffff80060000
# NEC EMMA2RH boards # NEC EMMA2RH boards
# #
core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/ core-$(CONFIG_EMMA2RH) += arch/mips/emma2rh/common/
......
This diff is collapsed.
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
#define DBG(x...) #define DBG(x...)
#endif #endif
extern char irq_tab_jbs[][5]; extern char pnx8550_irq_tab[][5];
void __init pcibios_fixup_resources(struct pci_dev *dev) void __init pcibios_fixup_resources(struct pci_dev *dev)
{ {
...@@ -47,7 +47,7 @@ void __init pcibios_fixup(void) ...@@ -47,7 +47,7 @@ void __init pcibios_fixup(void)
int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin) int __init pcibios_map_irq(struct pci_dev *dev, u8 slot, u8 pin)
{ {
return irq_tab_jbs[slot][pin]; return pnx8550_irq_tab[slot][pin];
} }
/* Do platform specific device initialization at pci_enable_device() time */ /* Do platform specific device initialization at pci_enable_device() time */
......
...@@ -35,23 +35,15 @@ char * prom_getcmdline(void) ...@@ -35,23 +35,15 @@ char * prom_getcmdline(void)
return &(arcs_cmdline[0]); return &(arcs_cmdline[0]);
} }
void prom_init_cmdline(void) void __init prom_init_cmdline(void)
{ {
char *cp; int i;
int actr;
actr = 1; /* Always ignore argv[0] */
cp = &(arcs_cmdline[0]); arcs_cmdline[0] = '\0';
while(actr < prom_argc) { for (i = 0; i < prom_argc; i++) {
strcpy(cp, prom_argv[actr]); strcat(arcs_cmdline, prom_argv[i]);
cp += strlen(prom_argv[actr]); strcat(arcs_cmdline, " ");
*cp++ = ' ';
actr++;
} }
if (cp != &(arcs_cmdline[0])) /* get rid of trailing space */
--cp;
*cp = '\0';
} }
char *prom_getenv(char *envname) char *prom_getenv(char *envname)
......
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
#include <linux/init.h> #include <linux/init.h>
#include <int.h> #include <int.h>
char irq_tab_jbs[][5] __initdata = { char pnx8550_irq_tab[][5] __initdata = {
[8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, [8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
[9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, [9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
[17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff}, [17] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
}; };
# Makefile for the Philips STB810 Board.
lib-y := prom_init.o board_setup.o irqmap.o
/*
* STB810 specific board startup routines.
*
* Based on the arch/mips/philips/pnx8550/jbs/board_setup.c
*
* Author: MontaVista Software, Inc.
* source@mvista.com
*
* Copyright 2005 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.
*/
#include <linux/init.h>
#include <linux/sched.h>
#include <linux/ioport.h>
#include <linux/mm.h>
#include <linux/console.h>
#include <linux/mc146818rtc.h>
#include <linux/delay.h>
#include <asm/cpu.h>
#include <asm/bootinfo.h>
#include <asm/irq.h>
#include <asm/mipsregs.h>
#include <asm/reboot.h>
#include <asm/pgtable.h>
#include <glb.h>
void __init board_setup(void)
{
unsigned long config0, configpr;
config0 = read_c0_config();
/* clear all three cache coherency fields */
config0 &= ~(0x7 | (7<<25) | (7<<28));
config0 |= (CONF_CM_DEFAULT | (CONF_CM_DEFAULT<<25) |
(CONF_CM_DEFAULT<<28));
write_c0_config(config0);
configpr = read_c0_config7();
configpr |= (1<<19); /* enable tlb */
write_c0_config7(configpr);
}
/*
* Philips STB810 board irqmap.
*
* Author: MontaVista Software, Inc.
* source@mvista.com
*
* Copyright 2005 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.
*/
#include <linux/init.h>
#include <int.h>
char pnx8550_irq_tab[][5] __initdata = {
[8] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
[9] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
[10] = { -1, PNX8550_INT_PCI_INTA, 0xff, 0xff, 0xff},
};
/*
* STB810 specific prom routines
*
* Author: MontaVista Software, Inc.
* source@mvista.com
*
* Copyright 2005 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.
*/
#include <linux/init.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/bootmem.h>
#include <asm/addrspace.h>
#include <asm/bootinfo.h>
#include <linux/string.h>
#include <linux/kernel.h>
int prom_argc;
char **prom_argv, **prom_envp;
extern void __init prom_init_cmdline(void);
extern char *prom_getenv(char *envname);
const char *get_system_type(void)
{
return "Philips PNX8550/STB810";
}
void __init prom_init(void)
{
unsigned long memsize;
prom_argc = (int) fw_arg0;
prom_argv = (char **) fw_arg1;
prom_envp = (char **) fw_arg2;
prom_init_cmdline();
mips_machgroup = MACH_GROUP_PHILIPS;
mips_machtype = MACH_PHILIPS_STB810;
memsize = 0x08000000; /* Trimedia uses memory above */
add_memory_region(0, memsize, BOOT_MEM_RAM);
}
...@@ -131,6 +131,7 @@ ...@@ -131,6 +131,7 @@
#define MACH_PHILIPS_NINO 0 /* Nino */ #define MACH_PHILIPS_NINO 0 /* Nino */
#define MACH_PHILIPS_VELO 1 /* Velo */ #define MACH_PHILIPS_VELO 1 /* Velo */
#define MACH_PHILIPS_JBS 2 /* JBS */ #define MACH_PHILIPS_JBS 2 /* JBS */
#define MACH_PHILIPS_STB810 3 /* STB810 */
/* /*
* Valid machtype for group SIBYTE * Valid machtype for group SIBYTE
......
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