Disable the Geode graphics device early in initialization. We don't
want resources allocated to it.

Signed-off-by: Marc Jones <marcj303@gmail.com>


Index: mainboard/pcengines/alix2c3/dts
===================================================================
--- mainboard/pcengines/alix2c3/dts	(revision 1100)
+++ mainboard/pcengines/alix2c3/dts	(working copy)
@@ -46,8 +46,6 @@
 			com1_enable = "1";
 			com1_address = "0x3f8";
 			com1_irq = "4";
-			/* this board does not really have vga; disable it (pci device 00:01.1)  */
-			unwanted_vpci = < 80000900 0 >;
 		};
 		pci@f,2 {
 			/config/("southbridge/amd/cs5536/ide");
Index: northbridge/amd/geodelx/geodelx.c
===================================================================
--- northbridge/amd/geodelx/geodelx.c	(revision 1111)
+++ northbridge/amd/geodelx/geodelx.c	(working copy)
@@ -32,7 +32,8 @@
 extern void chipsetinit(void);
 extern void northbridge_init_early(void);
 extern void graphics_init(u8 video_mb);
-extern u64 sizeram(void);
+extern u64 sizeram(void);
+extern void hide_vpci(u32 vpci_devid)
 
 /**
  * Currently not set up.
@@ -225,7 +226,12 @@
 	 (struct northbridge_amd_geodelx_pci_config *)dev->device_configuration;
 
 	printk(BIOS_DEBUG, "VRC_VG value: 0x%04x\n", nb_mc->geode_video_mb);
-	graphics_init((u8)nb_mc->geode_video_mb);
+	graphics_init((u8)nb_mc->geode_video_mb);
+
+	if (!nb_mc->geode_video_mb) {
+		printk(BIOS_DEBUG, "No graphics memory. Hide Geode grapics device.\n"
+		hide_vpci(0x80000900);
+	}
 }
 
 /**
Index: southbridge/amd/cs5536/cs5536.c
===================================================================
--- southbridge/amd/cs5536/cs5536.c	(revision 1111)
+++ southbridge/amd/cs5536/cs5536.c	(working copy)
@@ -88,7 +88,7 @@
  * bits 24 -> 30 reserved and set to zero
  * bit  31       triggers the config cycle
  */
-static void hide_vpci(u32 vpci_devid)
+void hide_vpci(u32 vpci_devid)
 {
 	printk(BIOS_DEBUG, "Hiding VPCI device: 0x%08X (%02x:%02x.%01x)\n",
 		vpci_devid, (vpci_devid >> 16) & 0xff,
