diff -u -r -N linux-2.4.0-test9.vr.vanilla/arch/mips/config.in linux-2.4.0-test9.vr/arch/mips/config.in
--- linux-2.4.0-test9.vr.vanilla/arch/mips/config.in	Mon Mar  5 20:59:57 2001
+++ linux-2.4.0-test9.vr/arch/mips/config.in	Mon Mar 19 16:17:46 2001
@@ -255,11 +255,14 @@
     define_bool CONFIG_CPU_R39XX y
     int 'Main memory (in megabytes)' CONFIG_MAIN_MEMORY 4
     int 'Memory on expansion board (0 for none)' CONFIG_EXP_MEMORY 8
-    choice 'Video subsystem' "\
-      4gray			CONFIG_PHILIPS_VELO1_4GRAY \
-      16gray			CONFIG_PHILIPS_VELO1_16GRAY \
-      velo500			CONFIG_PHILIPS_VELO500 \
-      " 16gray
+    choice 'Velo model' "\
+	Velo1			CONFIG_PHILIPS_VELO1 \
+	Velo500			CONFIG_PHILIPS_VELO500 \
+	" Velo1
   fi
 
   if [ "$CONFIG_VTECH_HELIO" = "y" ]; then
diff -u -r -N linux-2.4.0-test9.vr.vanilla/arch/mips/r39xx/prom/memory.c linux-2.4.0-test9.vr/arch/mips/r39xx/prom/memory.c
--- linux-2.4.0-test9.vr.vanilla/arch/mips/r39xx/prom/memory.c	Sun Jul  9 00:36:18 2000
+++ linux-2.4.0-test9.vr/arch/mips/r39xx/prom/memory.c	Mon Mar 19 16:04:16 2001
@@ -17,6 +17,10 @@
 #include <linux/mm.h>
 #include <linux/bootmem.h>
 
+#ifdef CONFIG_FB
+#include <video/r3912fb.h>
+#endif
+
 #ifdef CONFIG_VTECH_HELIO
 #define PROM_DEBUG
 #endif
@@ -116,25 +120,13 @@
 /*
  * This has to be in line with VIDEORAM_SIZE in r3912fb.c
  */
-	switch (mips_machtype) {
-	case MACH_R39XX_SHARP_MOBILON:
-	case MACH_R39XX_COMPAQ:
-		free_end -= 640*240;
-		videomemory = KSEG0ADDR(free_end);
-		break;
-	case MACH_R39XX_PHILIPS_VELO:
-		free_end -= 480*240/2;	/* Velo has actually 2 different bit depths, this is for 4bit.
-					   It is bigger that's why it is used here. */
-		videomemory = KSEG0ADDR(free_end);
-		break;
-	case MACH_R39XX_PHILIPS_NINO:
-		free_end -= 240*320/2;
-		free_end &= PAGE_MASK;
-		videomemory = KSEG0ADDR(free_end);
-		break;
-	default:
-		break;
-	}
+	if (mips_machtype == MACH_R39XX_SHARP_MOBILON ||
+	    mips_machtype == MACH_R39XX_COMPAQ ||
+	    mips_machtype == MACH_R39XX_PHILIPS_VELO ||
+	    mips_machtype == MACH_R39XX_PHILIPS_NINO) {
+	 	free_end -= VIDEORAM_SIZE;
+ 		videomemory = KSEG0ADDR(free_end);
+ 	}
 #endif
 
 #ifdef PROM_DEBUG
diff -u -r -N linux-2.4.0-test9.vr.vanilla/drivers/video/Config.in linux-2.4.0-test9.vr/drivers/video/Config.in
--- linux-2.4.0-test9.vr.vanilla/drivers/video/Config.in	Fri Nov 10 14:40:42 2000
+++ linux-2.4.0-test9.vr/drivers/video/Config.in	Mon Mar 19 16:13:35 2001
@@ -171,6 +171,14 @@
       # Helio-only option, because only the helio code can switch modes now.
       bool '    Force 1bpp mode' CONFIG_FB_R3912_FORCE_MONO
    fi
+
+   if [ "$CONFIG_PHILIPS_VELO" = "y" -a "$CONFIG_FB_R3912" != "n" ]; then
+      choice 'Velo Bit depth' "\
+      4gray			CONFIG_PHILIPS_VELO_4GRAY \
+      16gray			CONFIG_PHILIPS_VELO_16GRAY \
+      " 16gray
+   fi
+
    tristate '  NEC VRC4171 LCD Controller' CONFIG_FB_VRC4171
 
 
diff -u -r -N linux-2.4.0-test9.vr.vanilla/include/video/r3912fb.h linux-2.4.0-test9.vr/include/video/r3912fb.h
--- linux-2.4.0-test9.vr.vanilla/include/video/r3912fb.h	Wed Dec 31 21:00:00 1969
+++ linux-2.4.0-test9.vr/include/video/r3912fb.h	Thu Mar 22 23:54:06 2001
@@ -0,0 +1,66 @@
+/*
+ * This can go back into a header file if/when more platforms are defined.
+ * For now, it's just Mobilon parameters.
+ *
+ * VIDEORAM_SIZE     Normally x_res * y_res * (bpp/8) 
+ * FB_X_RES          Visible horizontal resolution in pixels
+ * FB_X_VIRTUAL_RES  Horizontal resolution of framebuffer memory in pixels
+ *                   (default is FB_X_RES)
+ * FB_Y_RES          Visible vertical resolution in pixels
+ * FB_Y_VIRTUAL_RES  Vertical resolution of framebuffer memory in pixels
+ *                   (default FB_Y_RES)
+ * FB_BPP            Bits per pixel
+ * FB_IS_GREY        1 means greyscale device, otherwise 0
+ * FB_IS_INVERSE     1 means pallette 0 is white instead of black
+ *
+ * FIXME: this has to be set up depending on size and color depth
+ */
+
+#ifdef CONFIG_PHILIPS_VELO
+#	ifdef CONFIG_PHILIPS_VELO1
+#		define FB_X_RES 	480
+#	elif defined(CONFIG_PHILIPS_VELO500)
+#		define FB_X_RES		640
+#	endif
+#	define	FB_Y_RES	240
+#	ifdef CONFIG_PHILIPS_VELO_4GRAY
+#		define FB_BPP	2
+#	else /* CONFIG_PHILIPS_VELO_16GRAY */
+#		define FB_BPP	4
+#	endif
+#	define FB_IS_GREY     1
+#	define FB_IS_INVERSE  0
+#	define VIDEORAM_SIZE  (FB_X_RES * FB_Y_RES * FB_BPP / 8)
+#elif defined(CONFIG_VTECH_HELIO)
+#	define FB_X_RES       160
+#	define FB_Y_RES       160
+#	ifdef CONFIG_FB_R3912_FORCE_MONO
+#		define FB_BPP 1
+#	else
+#		define FB_BPP         4
+#	endif
+#	define FB_IS_GREY     1
+#	define FB_IS_INVERSE  0 /* it is inverse, but that gives poor results */
+#	define VIDEORAM_SIZE  (FB_X_RES * FB_Y_RES * FB_BPP / 8)
+
+#	define LCD_CLK_36M    0
+#	define LCD_CLK_18M    1
+#	define LCD_CLK_9M     2
+#	define LCD_CLK_4M     3
+
+#	define VIDEO_RF       LCD_CLK_9M
+#	define LCD_CLK        (36864000 / (1 << VIDEO_RF))
+#	define LCD_BAUD       0x6               /* for 4.5MHz Lcd Clock only */
+#	define LCD_CP         (LCD_CLK / (LCD_BAUD * 2 + 2))
+
+#	define LCD_FRAMERATE  70
+#	define LCD_LINERATE   (70 * (FB_X_RES + 1))
+#	define LCD_VIDRATE    ((LCD_CP / LCD_LINERATE) - 1)
+#else
+#	define FB_X_RES       640
+#	define FB_Y_RES       240
+#	define FB_BPP         8
+#	define FB_IS_GREY     0
+#	define FB_IS_INVERSE  0
+#	define VIDEORAM_SIZE  (FB_X_RES * FB_Y_RES * FB_BPP / 8)
+#endif
