Skip to content

Commit

Permalink
Merge branch 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-…
Browse files Browse the repository at this point in the history
…linus

* 'upstream' of git://ftp.linux-mips.org/pub/scm/upstream-linus:
  [MIPS] MTX1: clear PCI errors
  [MIPS] MTX1: add idsel cardbus ressources
  [MIPS] MTX1: remove unneeded settings
  [MIPS] dma_sync_sg_for_cpu is a no-op except for non-coherent R10000s.
  [MIPS] Cobalt: update reserved resources
  [MIPS] SN: PCI fixup needs to include <irq.h>.
  [MIPS] DMA: Fix a bunch of warnings due to missing inline keywords.
  [MIPS] RM: It should be #ifdef CONFIG_FOO not #if CONFIG_FOO ...
  [MIPS] Fix and cleanup the mess that a dozen prom_printf variants are.
  [MIPS] DEC: Remove redeclarations of mips_machgroup and mips_machtype.
  [MIPS] No need to write c0_compare in plat_timer_setup
  [MIPS] Convert to RTC-class ds1742 driver
  [MIPS] Oprofile: Add missing break statements.
  [MIPS] jmr3927: build fix
  [MIPS] SNI: Fix mc146818_decode_year
  [MIPS] Replace sys32_timer_create with the generic compat_sys_timer_create.
  [MIPS] Replace sys32_socketcall with the generic compat_sys_socketcall.
  [MIPS] N32 waitid is the same as o32.
  • Loading branch information
Linus Torvalds committed Mar 4, 2007
2 parents e9cdb1e + 8b4ac6f commit 2c89a8d
Show file tree
Hide file tree
Showing 73 changed files with 429 additions and 1,021 deletions.
35 changes: 28 additions & 7 deletions arch/mips/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ config MACH_DECSTATION
bool "DECstations"
select BOOT_ELF32
select DMA_NONCOHERENT
select EARLY_PRINTK
select SYS_HAS_EARLY_PRINTK
select IRQ_CPU
select SYS_HAS_CPU_R3000
select SYS_HAS_CPU_R4X00
Expand Down Expand Up @@ -242,6 +242,7 @@ config MACH_JAZZ
config LASAT
bool "LASAT Networks platforms"
select DMA_NONCOHERENT
select SYS_HAS_EARLY_PRINTK
select HW_HAS_PCI
select MIPS_GT64120
select MIPS_NILE4
Expand All @@ -256,6 +257,7 @@ config MIPS_ATLAS
bool "MIPS Atlas board"
select BOOT_ELF32
select DMA_NONCOHERENT
select SYS_HAS_EARLY_PRINTK
select IRQ_CPU
select HW_HAS_PCI
select MIPS_BOARDS_GEN
Expand Down Expand Up @@ -301,6 +303,7 @@ config MIPS_MALTA
select SYS_HAS_CPU_MIPS64_R1
select SYS_HAS_CPU_NEVADA
select SYS_HAS_CPU_RM7000
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
Expand All @@ -316,6 +319,7 @@ config MIPS_SEAD
depends on EXPERIMENTAL
select IRQ_CPU
select DMA_NONCOHERENT
select SYS_HAS_EARLY_PRINTK
select MIPS_BOARDS_GEN
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_MIPS32_R2
Expand Down Expand Up @@ -353,9 +357,11 @@ config WR_PPMC
config MIPS_SIM
bool 'MIPS simulator (MIPSsim)'
select DMA_NONCOHERENT
select SYS_HAS_EARLY_PRINTK
select IRQ_CPU
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_CPU_MIPS32_R2
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
select SYS_SUPPORTS_LITTLE_ENDIAN
Expand All @@ -376,6 +382,7 @@ config MOMENCO_JAGUAR_ATX
select RM7000_CPU_SCACHE
select SWAP_IO_SPACE
select SYS_HAS_CPU_RM9000
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
Expand Down Expand Up @@ -513,6 +520,7 @@ config PMC_YOSEMITE
select IRQ_CPU_RM9K
select SWAP_IO_SPACE
select SYS_HAS_CPU_RM9000
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
Expand Down Expand Up @@ -573,6 +581,7 @@ config SGI_IP22
select SWAP_IO_SPACE
select SYS_HAS_CPU_R4X00
select SYS_HAS_CPU_R5000
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL
select SYS_SUPPORTS_BIG_ENDIAN
Expand All @@ -587,7 +596,7 @@ config SGI_IP27
select ARC64
select BOOT_ELF64
select DMA_IP27
select EARLY_PRINTK
select SYS_HAS_EARLY_PRINTK
select HW_HAS_PCI
select NR_CPUS_DEFAULT_64
select PCI_DOMAINS
Expand Down Expand Up @@ -749,6 +758,7 @@ config SNI_RM
select SYS_HAS_CPU_R5000
select SYS_HAS_CPU_R10000
select R5000_CPU_SCACHE
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select SYS_SUPPORTS_64BIT_KERNEL if EXPERIMENTAL
select SYS_SUPPORTS_BIG_ENDIAN
Expand Down Expand Up @@ -897,6 +907,20 @@ config DMA_NEED_PCI_MAP_STATE
bool

config EARLY_PRINTK
bool "Early printk" if EMBEDDED && DEBUG_KERNEL
depends on SYS_HAS_EARLY_PRINTK
default y
help
This option enables special console drivers which allow the kernel
to print messages very early in the bootup process.

This is useful for kernel debugging when your machine crashes very
early before the console code is initialized. For normal operation
it is not recommended because it looks on some machines ugly and
oesn't cooperate with an X server. You should normally N here,
unless you want to debug such a crash.

config SYS_HAS_EARLY_PRINTK
bool

config GENERIC_ISA_DMA
Expand Down Expand Up @@ -1033,6 +1057,7 @@ config SOC_PNX8550
select DMA_NONCOHERENT
select HW_HAS_PCI
select SYS_HAS_CPU_MIPS32_R1
select SYS_HAS_EARLY_PRINTK
select SYS_SUPPORTS_32BIT_KERNEL
select GENERIC_HARDIRQS_NO__DO_IRQ
select SYS_SUPPORTS_KGDB
Expand Down Expand Up @@ -1093,7 +1118,7 @@ config HAVE_STD_PC_SERIAL_PORT

config ARC_CONSOLE
bool "ARC console support"
depends on SGI_IP22 || SNI_RM
depends on SGI_IP22 || (SNI_RM && CPU_LITTLE_ENDIAN)

config ARC_MEMORY
bool
Expand Down Expand Up @@ -1895,10 +1920,6 @@ config HZ

source "kernel/Kconfig.preempt"

config RTC_DS1742
bool "DS1742 BRAM/RTC support"
depends on TOSHIBA_JMR3927 || TOSHIBA_RBTX4927

config MIPS_INSANE_LARGE
bool "Support for large 64-bit configurations"
depends on CPU_R10000 && 64BIT
Expand Down
32 changes: 0 additions & 32 deletions arch/mips/arc/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,35 +29,3 @@ void prom_putchar(char c)
ArcWrite(1, &it, 1, &cnt);
bc_enable();
}

char prom_getchar(void)
{
ULONG cnt;
CHAR c;

bc_disable();
ArcRead(0, &c, 1, &cnt);
bc_enable();

return c;
}

void prom_printf(char *fmt, ...)
{
va_list args;
char ppbuf[1024];
char *bptr;

va_start(args, fmt);
vsprintf(ppbuf, fmt, args);

bptr = ppbuf;

while (*bptr != 0) {
if (*bptr == '\n')
prom_putchar('\r');

prom_putchar(*bptr++);
}
va_end(args);
}
9 changes: 6 additions & 3 deletions arch/mips/arc/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@ void __init prom_init(void)
{
PSYSTEM_PARAMETER_BLOCK pb = PROMBLOCK;
romvec = ROMVECTOR;
ULONG cnt;
CHAR c;

prom_argc = fw_arg0;
_prom_argv = (LONG *) fw_arg1;
_prom_envp = (LONG *) fw_arg2;

if (pb->magic != 0x53435241) {
prom_printf("Aieee, bad prom vector magic %08lx\n", pb->magic);
printk(KERN_CRIT "Aieee, bad prom vector magic %08lx\n", pb->magic);
while(1)
;
}
Expand All @@ -41,8 +44,8 @@ void __init prom_init(void)
prom_meminit();

#ifdef DEBUG_PROM_INIT
prom_printf("Press a key to reboot\n");
prom_getchar();
pr_info("Press a key to reboot\n");
ArcRead(0, &c, 1, &cnt);
ArcEnterInteractiveMode();
#endif
}
6 changes: 3 additions & 3 deletions arch/mips/arc/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,11 @@ void __init prom_meminit(void)
#ifdef DEBUG
int i = 0;

prom_printf("ARCS MEMORY DESCRIPTOR dump:\n");
printk("ARCS MEMORY DESCRIPTOR dump:\n");
p = ArcGetMemoryDescriptor(PROM_NULL_MDESC);
while(p) {
prom_printf("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
i, p, p->base, p->pages, mtypes(p->type));
printk("[%d,%p]: base<%08lx> pages<%08lx> type<%s>\n",
i, p, p->base, p->pages, mtypes(p->type));
p = ArcGetMemoryDescriptor(p);
i++;
}
Expand Down
10 changes: 5 additions & 5 deletions arch/mips/arc/tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ static char *iflags[] = {
static void __init
dump_component(pcomponent *p)
{
prom_printf("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
p, classes[p->class], types[p->type],
iflags[p->iflags], p->vers, p->rev);
prom_printf("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n",
p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
printk("[%p]:class<%s>type<%s>flags<%s>ver<%d>rev<%d>",
p, classes[p->class], types[p->type],
iflags[p->iflags], p->vers, p->rev);
printk("key<%08lx>\n\tamask<%08lx>cdsize<%d>ilen<%d>iname<%s>\n",
p->key, p->amask, (int)p->cdsize, (int)p->ilen, p->iname);
}

static void __init
Expand Down
33 changes: 30 additions & 3 deletions arch/mips/au1000/mtx-1/board_setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
#include <asm/pgtable.h>
#include <asm/mach-au1x00/au1000.h>

extern int (*board_pci_idsel)(unsigned int devsel, int assert);
int mtx1_pci_idsel(unsigned int devsel, int assert);

void board_reset (void)
{
/* Hit BCSR.SYSTEM_CONTROL[SW_RST] */
Expand All @@ -66,19 +69,43 @@ void __init board_setup(void)
#endif

// initialize sys_pinfunc:
// disable second ethernet port (SYS_PF_NI2)
// set U3/GPIO23 to GPIO23 (SYS_PF_U3)
au_writel( SYS_PF_NI2 | SYS_PF_U3, SYS_PINFUNC );
au_writel( SYS_PF_NI2, SYS_PINFUNC );

// initialize GPIO
au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF
au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF
au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF

// enable LED and set it to green
au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR );
au_writel( 0x18000800, GPIO2_OUTPUT );

board_pci_idsel = mtx1_pci_idsel;

printk("4G Systems MTX-1 Board\n");
}

int
mtx1_pci_idsel(unsigned int devsel, int assert)
{
#define MTX_IDSEL_ONLY_0_AND_3 0
#if MTX_IDSEL_ONLY_0_AND_3
if (devsel != 0 && devsel != 3) {
printk("*** not 0 or 3\n");
return 0;
}
#endif

if (assert && devsel != 0) {
// supress signal to cardbus
au_writel( 0x00000002, SYS_OUTPUTCLR ); // set EXT_IO3 OFF
}
else {
au_writel( 0x00000002, SYS_OUTPUTSET ); // set EXT_IO3 ON
}
au_sync_udelay(1);
return 1;
}

2 changes: 1 addition & 1 deletion arch/mips/au1000/mtx-1/irqmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
#include <asm/mach-au1x00/au1000.h>

char irq_tab_alchemy[][5] __initdata = {
[0] = { -1, INTA, INTB, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */
[0] = { -1, INTA, INTA, INTX, INTX}, /* IDSEL 00 - AdapterA-Slot0 (top) */
[1] = { -1, INTB, INTA, INTX, INTX}, /* IDSEL 01 - AdapterA-Slot1 (bottom) */
[2] = { -1, INTC, INTD, INTX, INTX}, /* IDSEL 02 - AdapterB-Slot0 (top) */
[3] = { -1, INTD, INTC, INTX, INTX}, /* IDSEL 03 - AdapterB-Slot1 (bottom) */
Expand Down
26 changes: 0 additions & 26 deletions arch/mips/cobalt/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,29 +19,3 @@ static void putchar(int c)

COBALT_UART[UART_TX] = c;
}

static void cons_write(struct console *c, const char *s, unsigned n)
{
while(n-- && *s)
putchar(*s++);
}

static struct console cons_info =
{
.name = "uart",
.write = cons_write,
.flags = CON_PRINTBUFFER | CON_BOOT,
.index = -1,
};

void __init cobalt_early_console(void)
{
register_console(&cons_info);

printk("Cobalt: early console registered\n");
}

void __init disable_early_printk(void)
{
unregister_console(&cons_info);
}
Loading

0 comments on commit 2c89a8d

Please sign in to comment.