summaryrefslogtreecommitdiffstats
path: root/arch/mips/philips/nino
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/philips/nino')
-rw-r--r--arch/mips/philips/nino/Makefile11
-rw-r--r--arch/mips/philips/nino/int-handler.S9
-rw-r--r--arch/mips/philips/nino/irq.c42
-rw-r--r--arch/mips/philips/nino/kgdb.c6
-rw-r--r--arch/mips/philips/nino/power.c6
-rw-r--r--arch/mips/philips/nino/prom.c73
-rw-r--r--arch/mips/philips/nino/ramdisk/Makefile12
-rw-r--r--arch/mips/philips/nino/ramdisk/ld.script11
-rw-r--r--arch/mips/philips/nino/reset.c4
-rw-r--r--arch/mips/philips/nino/rtc.c7
-rw-r--r--arch/mips/philips/nino/setup.c17
-rw-r--r--arch/mips/philips/nino/time.c8
-rw-r--r--arch/mips/philips/nino/wbflush.c4
13 files changed, 126 insertions, 84 deletions
diff --git a/arch/mips/philips/nino/Makefile b/arch/mips/philips/nino/Makefile
index 7d31a66fb..bcdd9b2e3 100644
--- a/arch/mips/philips/nino/Makefile
+++ b/arch/mips/philips/nino/Makefile
@@ -17,10 +17,17 @@ all: nino.o
obj-y := int-handler.o setup.o irq.o time.o reset.o rtc.o prom.o power.o wbflush.o
-obj-$(CONFIG_BLK_DEV_INITRD) += ../boot/ramdisk.o
+int-handler.o: int-handler.S
obj-$(CONFIG_REMOTE_DEBUG) += kgdb.o
-int-handler.o: int-handler.S
+obj-$(CONFIG_BLK_DEV_INITRD) += ramdisk.o
+
+ramdisk.o:
+ $(MAKE) -C ramdisk
+ ln -sf ramdisk/ramdisk.o ramdisk.o
+
+clean:
+ rm -f *.o
include $(TOPDIR)/Rules.make
diff --git a/arch/mips/philips/nino/int-handler.S b/arch/mips/philips/nino/int-handler.S
index 90d7f8818..ff2e48e90 100644
--- a/arch/mips/philips/nino/int-handler.S
+++ b/arch/mips/philips/nino/int-handler.S
@@ -1,22 +1,21 @@
/*
* linux/arch/mips/philips/nino/int-handler.S
*
- * Copyright (C) 1999 Harald Koerfgen (Harald.Koerfgen@home.ivm.de)
+ * Copyright (C) 1999 Harald Koerfgen
* Copyright (C) 2000 Jim Pick (jim@jimpick.com)
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Interrupt handler for PR31700.
+ * Interrupt handler for Philips Nino.
*/
#include <asm/asm.h>
#include <asm/regdef.h>
#include <asm/mipsregs.h>
#include <asm/stackframe.h>
-#include <asm/philips/pr31700.h>
-
+#include <asm/tx3912.h>
.data
.globl HighPriVect
diff --git a/arch/mips/philips/nino/irq.c b/arch/mips/philips/nino/irq.c
index 71aba8599..3d7a88afe 100644
--- a/arch/mips/philips/nino/irq.c
+++ b/arch/mips/philips/nino/irq.c
@@ -2,15 +2,15 @@
* linux/arch/mips/philips/nino/irq.c
*
* Copyright (C) 1992 Linus Torvalds
- * Copyright (C) 1999 Harald Koerfgen (Harald.Koerfgen@home.ivm.de)
+ * Copyright (C) 1999 Harald Koerfgen
* Copyright (C) 2000 Pavel Machek (pavel@suse.cz)
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Generic interrupt handler for PR31700.
+ * Generic interrupt handler for Philips Nino.
*/
#include <linux/errno.h>
#include <linux/init.h>
@@ -30,7 +30,7 @@
#include <asm/irq.h>
#include <asm/mipsregs.h>
#include <asm/system.h>
-#include <asm/philips/pr31700.h>
+#include <asm/tx3912.h>
unsigned long spurious_count = 0;
@@ -45,10 +45,12 @@ static inline void mask_irq(unsigned int irq_nr)
IntEnable6 &= ~INT6_PERIODICINT;
break;
- case 3: /* Serial port receive interrupt */
+ case 3:
+ /* Serial port receive interrupt */
break;
- case 2: /* Serial port transmit interrupt */
+ case 2:
+ /* Serial port transmit interrupt */
break;
default:
@@ -63,12 +65,12 @@ static inline void unmask_irq(unsigned int irq_nr)
IntEnable6 |= INT6_PERIODICINT;
break;
- case 3: /* Serial port receive interrupt */
- /* FIXME: currently handled in driver */
+ case 3:
+ /* Serial port receive interrupt */
break;
- case 2: /* Serial port transmit interrupt */
- /* FIXME: currently handled in driver */
+ case 2:
+ /* Serial port transmit interrupt */
break;
default:
@@ -149,17 +151,24 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
struct irqaction *action;
int do_random, cpu;
+ if (irq == 20) {
+ if (IntStatus2 & 0xfffff00) {
+ if (IntStatus2 & 0x0f000000)
+ return do_IRQ(2, regs);
+ }
+ }
+
cpu = smp_processor_id();
irq_enter(cpu, irq);
kstat.irqs[cpu][irq]++;
if (irq == 20) {
- printk("20 %08lx %08lx\n %08lx %08lx\n %08lx\n",
- IntStatus1, IntStatus2, IntStatus3,
- IntStatus4, IntStatus5 );
- printk("20 %08lx %08lx\n %08lx %08lx\n %08lx\n",
- IntEnable1, IntEnable2, IntEnable3,
- IntEnable4, IntEnable5 );
+ printk("20 %08lx %08lx\n %08lx %08lx\n %08lx\n",
+ IntStatus1, IntStatus2, IntStatus3,
+ IntStatus4, IntStatus5 );
+ printk("20 %08lx %08lx\n %08lx %08lx\n %08lx\n",
+ IntEnable1, IntEnable2, IntEnable3,
+ IntEnable4, IntEnable5 );
}
@@ -179,6 +188,7 @@ asmlinkage void do_IRQ(int irq, struct pt_regs *regs)
unmask_irq(irq);
__cli();
} else {
+ IntClear1 = ~0;
IntClear3 = ~0;
IntClear4 = ~0;
IntClear5 = ~0;
diff --git a/arch/mips/philips/nino/kgdb.c b/arch/mips/philips/nino/kgdb.c
index 0bb03e86f..0d3ebf23b 100644
--- a/arch/mips/philips/nino/kgdb.c
+++ b/arch/mips/philips/nino/kgdb.c
@@ -1,16 +1,16 @@
/*
* linux/arch/mips/philips/nino/kgdb.c
*
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Low level functions for remote debugging on PR31700.
+ * Kernel debugging on the Philips Nino.
*/
#include <asm/system.h>
-#include <asm/philips/pr31700.h>
+#include <asm/tx3912.h>
static int remoteDebugInitialized = 0;
diff --git a/arch/mips/philips/nino/power.c b/arch/mips/philips/nino/power.c
index 907b134b7..fccf2fbdb 100644
--- a/arch/mips/philips/nino/power.c
+++ b/arch/mips/philips/nino/power.c
@@ -2,15 +2,15 @@
* linux/arch/mips/philips/nino/power.c
*
* Copyright (C) 2000 Jim Pick <jim@jimpick.com>
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Routines for power management on the Nino.
+ * Power management routines on the Philips Nino.
*/
-#include <asm/philips/pr31700.h>
+#include <asm/tx3912.h>
void nino_wait(void)
{
diff --git a/arch/mips/philips/nino/prom.c b/arch/mips/philips/nino/prom.c
index bb4582099..b83d7a084 100644
--- a/arch/mips/philips/nino/prom.c
+++ b/arch/mips/philips/nino/prom.c
@@ -1,5 +1,5 @@
/*
- * linux/arch/mips/philips-hpc/nino/prom.c
+ * linux/arch/mips/philips/nino/prom.c
*
* Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
@@ -7,50 +7,30 @@
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Early initialization code for the Nino.
+ * Early initialization code for the Philips Nino.
*/
#include <linux/config.h>
#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/string.h>
#include <asm/bootinfo.h>
+#include <asm/addrspace.h>
+#include <asm/page.h>
char arcs_cmdline[COMMAND_LINE_SIZE];
-#ifdef CONFIG_LL_DEBUG
-extern void init_uart(void);
-
-int __init prom_printf(const char * fmt, ...)
-{
- extern void serial_outc(char);
- static char buf[1024];
- va_list args;
- char c;
- int i = 0;
-
- /*
- * Printing messages via serial port
- */
- va_start(args, fmt);
- vsprintf(buf, fmt, args);
- va_end(args);
-
- for (i = 0; buf[i] != '\0'; i++) {
- c = buf[i];
- if (c == '\n')
- serial_outc('\r');
- serial_outc(c);
- }
-
- return i;
-}
+#ifdef CONFIG_FB_TX3912
+extern u_long tx3912fb_paddr;
+extern u_long tx3912fb_vaddr;
+extern u_long tx3912fb_size;
#endif
/* Do basic initialization */
void __init prom_init(int argc, char **argv,
unsigned long magic, int *prom_vec)
{
- int i;
+ u_long free_end, mem_size;
+ u_int i;
/*
* collect args and prepare cmd_line
@@ -61,20 +41,37 @@ void __init prom_init(int argc, char **argv,
strcat(arcs_cmdline, " ");
}
-#ifdef CONFIG_LL_DEBUG
- earlyInitUartPR31700();
-#endif
-
mips_machgroup = MACH_GROUP_PHILIPS;
mips_machtype = MACH_PHILIPS_NINO;
- /* Add memory region */
#ifdef CONFIG_NINO_4MB
- add_memory_region(0, 4 << 20, BOOT_MEM_RAM);
+ mem_size = 4 << 20;
#elif CONFIG_NINO_8MB
- add_memory_region(0, 8 << 20, BOOT_MEM_RAM);
+ mem_size = 8 << 20;
#elif CONFIG_NINO_16MB
- add_memory_region(0, 16 << 20, BOOT_MEM_RAM);
+ mem_size = 16 << 20;
+#endif
+
+#ifdef CONFIG_FB_TX3912
+ /*
+ * The LCD controller requires that the framebuffer
+ * start address fall within a 1MB segment and is
+ * aligned on a 16 byte boundary. The way to assure
+ * this is to place the framebuffer at the end of
+ * memory and mark it as reserved.
+ */
+ free_end = (mem_size - tx3912fb_size) & PAGE_MASK;
+ add_memory_region(0, free_end, BOOT_MEM_RAM);
+ add_memory_region(free_end, (mem_size - free_end), BOOT_MEM_RESERVED);
+
+ /*
+ * Calculate physical and virtual addresses for
+ * the beginning of the framebuffer.
+ */
+ tx3912fb_paddr = PHYSADDR(free_end);
+ tx3912fb_vaddr = KSEG1ADDR(free_end);
+#else
+ add_memory_region(0, mem_size, BOOT_MEM_RAM);
#endif
}
diff --git a/arch/mips/philips/nino/ramdisk/Makefile b/arch/mips/philips/nino/ramdisk/Makefile
new file mode 100644
index 000000000..1e7658863
--- /dev/null
+++ b/arch/mips/philips/nino/ramdisk/Makefile
@@ -0,0 +1,12 @@
+#
+# Makefile for the Philips Nino ramdisk
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+ramdisk.o: ramdisk.gz ld.script
+ $(LD) -T ld.script -b binary -o $@ ramdisk.gz
+
+include $(TOPDIR)/Rules.make
diff --git a/arch/mips/philips/nino/ramdisk/ld.script b/arch/mips/philips/nino/ramdisk/ld.script
new file mode 100644
index 000000000..87fd81108
--- /dev/null
+++ b/arch/mips/philips/nino/ramdisk/ld.script
@@ -0,0 +1,11 @@
+OUTPUT_FORMAT("ecoff-littlemips")
+OUTPUT_ARCH(mips)
+SECTIONS
+{
+ .data :
+ {
+ __rd_start = .;
+ *(.data)
+ __rd_end = .;
+ }
+}
diff --git a/arch/mips/philips/nino/reset.c b/arch/mips/philips/nino/reset.c
index c809b6b93..51113f1bd 100644
--- a/arch/mips/philips/nino/reset.c
+++ b/arch/mips/philips/nino/reset.c
@@ -1,13 +1,13 @@
/*
* linux/arch/mips/philips/nino/reset.c
*
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Generic restart, halt and power off functions.
+ * Generic restart, halt and power off functions for Philips Nino.
*/
#include <linux/init.h>
#include <asm/reboot.h>
diff --git a/arch/mips/philips/nino/rtc.c b/arch/mips/philips/nino/rtc.c
index 0b2584411..bcca11cf7 100644
--- a/arch/mips/philips/nino/rtc.c
+++ b/arch/mips/philips/nino/rtc.c
@@ -1,14 +1,15 @@
/*
- * linux/arch/mips/philips-mobile/nino/rtc.c
+ * linux/arch/mips/philips/nino/rtc.c
*
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Functions to access the RTC on the PR31700 chip.
+ * Functions to access RTC on the Philips Nino.
*/
+#include <linux/spinlock.h>
#include <linux/mc146818rtc.h>
static unsigned char nino_rtc_read_data(unsigned long addr)
diff --git a/arch/mips/philips/nino/setup.c b/arch/mips/philips/nino/setup.c
index 2554d3bfb..85e247cb4 100644
--- a/arch/mips/philips/nino/setup.c
+++ b/arch/mips/philips/nino/setup.c
@@ -1,13 +1,13 @@
/*
* linux/arch/mips/philips/nino/setup.c
*
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Interrupt and exception initialization for PR31700.
+ * Interrupt and exception initialization for Philips Nino.
*/
#include <linux/console.h>
#include <linux/init.h>
@@ -18,7 +18,7 @@
#include <asm/gdb-stub.h>
#include <asm/irq.h>
#include <asm/wbflush.h>
-#include <asm/philips/pr31700.h>
+#include <asm/tx3912.h>
extern struct rtc_ops nino_rtc_ops;
@@ -58,7 +58,7 @@ static void __init nino_irq_setup(void)
* Enable only the interrupts for the UART and negative
* edge (1-to-0) triggered multi-function I/O pins.
*/
- clear_cp0_status(ST0_BEV);
+ change_cp0_status(ST0_BEV, 0);
tmp = read_32bit_cp0_register(CP0_STATUS);
change_cp0_status(ST0_IM, tmp | IE_IRQ2 | IE_IRQ4);
@@ -75,6 +75,8 @@ static void __init nino_irq_setup(void)
static __init void nino_time_init(struct irqaction *irq)
{
+ unsigned int scratch = 0;
+
/*
* Enable periodic interrupts
*/
@@ -83,7 +85,10 @@ static __init void nino_time_init(struct irqaction *irq)
RTCperiodTimer = PER_TIMER_COUNT;
RTCtimerControl = TIM_ENPERTIMER;
IntEnable5 |= INT5_PERIODICINT;
- ClockControl |= CLK_ENTIMERCLK;
+
+ scratch = inl(TX3912_CLK_CTRL_BASE);
+ scratch |= TX3912_CLK_CTRL_ENTIMERCLK;
+ outl(scratch, TX3912_CLK_CTRL_BASE);
/* Enable all interrupts */
IntEnable6 |= INT6_GLOBALEN | INT6_PERIODICINT;
@@ -96,7 +101,7 @@ void __init nino_setup(void)
board_time_init = nino_time_init;
/* Base address to use for PC type I/O accesses */
- mips_io_port_base = KSEG1ADDR(0x08000000);
+ mips_io_port_base = KSEG1ADDR(0xB0C00000);
setup_nino_reset_vectors();
diff --git a/arch/mips/philips/nino/time.c b/arch/mips/philips/nino/time.c
index b3bc87e7e..5a3c368c1 100644
--- a/arch/mips/philips/nino/time.c
+++ b/arch/mips/philips/nino/time.c
@@ -1,15 +1,15 @@
/*
* linux/arch/mips/philips/nino/time.c
*
- * Copyright (C) 1999 Harald Koerfgen (Harald.Koerfgen@home.ivm.de)
+ * Copyright (C) 1999 Harald Koerfgen
* Copyright (C) 2000 Pavel Machek (pavel@suse.cz)
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Time handling details for PR31700.
+ * Time handling functinos for Philips Nino.
*/
#include <linux/errno.h>
#include <linux/init.h>
@@ -21,7 +21,7 @@
#include <linux/interrupt.h>
#include <linux/timex.h>
#include <linux/delay.h>
-#include <asm/philips/pr31700.h>
+#include <asm/tx3912.h>
extern volatile unsigned long wall_jiffies;
extern rwlock_t xtime_lock;
diff --git a/arch/mips/philips/nino/wbflush.c b/arch/mips/philips/nino/wbflush.c
index 2b1056259..f70b5ef69 100644
--- a/arch/mips/philips/nino/wbflush.c
+++ b/arch/mips/philips/nino/wbflush.c
@@ -1,13 +1,13 @@
/*
* linux/arch/mips/philips/nino/wbflush.c
*
- * Copyright (C) 2001 Steven Hill (sjhill@realitydiluted.com)
+ * Copyright (C) 2001 Steven J. Hill (sjhill@realitydiluted.com)
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
- * Function to flush the write buffer on the PR31700 chip.
+ * Function to flush the write buffer on the Philips Nino.
*/
#include <linux/init.h>