summaryrefslogtreecommitdiff
path: root/src/mainboard
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2013-11-28 16:44:51 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-01 15:39:26 +0200
commitab56b3b11c34b5315fadc2147f5d1a860dccc419 (patch)
tree9ef7fe2cb506240b40f9da73392c0fe8b3c93bd9 /src/mainboard
parent926a8d1262c09fda9868f73cf0241140ccf09ec9 (diff)
downloadcoreboot-ab56b3b11c34b5315fadc2147f5d1a860dccc419.tar.xz
ChromeOS: Remove oprom_is_loaded
A global flag oprom_is_loaded was used to indicate to U-boot that VGA option ROM was loaded and run, or that native VGA init was completed on GMA device. Implement this feature without dependency to CHROMEOS option and replace use of global variable oprom_is_loaded with call to gfx_get_init_done(). Change-Id: I7e1afd752f18e5346dabdee62e4f7ea08ada5faf Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/4309 Tested-by: build bot (Jenkins) Reviewed-by: Aaron Durbin <adurbin@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/mainboard')
-rw-r--r--src/mainboard/google/bolt/chromeos.c2
-rw-r--r--src/mainboard/google/butterfly/chromeos.c2
-rw-r--r--src/mainboard/google/falco/chromeos.c2
-rw-r--r--src/mainboard/google/link/chromeos.c2
-rw-r--r--src/mainboard/google/link/i915.c4
-rw-r--r--src/mainboard/google/parrot/chromeos.c2
-rw-r--r--src/mainboard/google/peppy/chromeos.c2
-rw-r--r--src/mainboard/google/rambi/chromeos.c2
-rw-r--r--src/mainboard/google/slippy/chromeos.c2
-rw-r--r--src/mainboard/google/slippy/gma.c4
-rw-r--r--src/mainboard/google/stout/chromeos.c2
-rw-r--r--src/mainboard/google/stout/i915.c4
-rw-r--r--src/mainboard/intel/baskingridge/chromeos.c2
-rw-r--r--src/mainboard/intel/emeraldlake2/chromeos.c2
-rw-r--r--src/mainboard/intel/wtm2/chromeos.c2
-rw-r--r--src/mainboard/intel/wtm2/i915.c4
-rw-r--r--src/mainboard/lenovo/x60/i915.c2
-rw-r--r--src/mainboard/samsung/lumpy/chromeos.c2
-rw-r--r--src/mainboard/samsung/stumpy/chromeos.c2
19 files changed, 19 insertions, 27 deletions
diff --git a/src/mainboard/google/bolt/chromeos.c b/src/mainboard/google/bolt/chromeos.c
index 76f2c313c8..57241017c8 100644
--- a/src/mainboard/google/bolt/chromeos.c
+++ b/src/mainboard/google/bolt/chromeos.c
@@ -79,7 +79,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid",
get_lid_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
}
#endif
diff --git a/src/mainboard/google/butterfly/chromeos.c b/src/mainboard/google/butterfly/chromeos.c
index b5a645fb24..397679aa0f 100644
--- a/src/mainboard/google/butterfly/chromeos.c
+++ b/src/mainboard/google/butterfly/chromeos.c
@@ -93,7 +93,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Was VGA Option ROM loaded? */
gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
diff --git a/src/mainboard/google/falco/chromeos.c b/src/mainboard/google/falco/chromeos.c
index 51d625b82c..780e58f2f9 100644
--- a/src/mainboard/google/falco/chromeos.c
+++ b/src/mainboard/google/falco/chromeos.c
@@ -76,7 +76,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid",
get_lid_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
}
#endif
diff --git a/src/mainboard/google/link/chromeos.c b/src/mainboard/google/link/chromeos.c
index dd1606f1cc..33069b15f1 100644
--- a/src/mainboard/google/link/chromeos.c
+++ b/src/mainboard/google/link/chromeos.c
@@ -88,7 +88,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Did we load the VGA Option ROM? */
gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
#endif
diff --git a/src/mainboard/google/link/i915.c b/src/mainboard/google/link/i915.c
index a38760b1a5..2b62bf45c8 100644
--- a/src/mainboard/google/link/i915.c
+++ b/src/mainboard/google/link/i915.c
@@ -58,7 +58,6 @@ static unsigned int graphics;
static unsigned short addrport;
static unsigned short dataport;
static unsigned int physbase;
-extern int oprom_is_loaded;
static u32 htotal, hblank, hsync, vtotal, vblank, vsync;
const u32 link_edid_data[] = {
@@ -379,6 +378,5 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
printk(BIOS_SPEW, "%ld microseconds\n", globalmicroseconds());
set_vbe_mode_info_valid(&edid, graphics);
i915_init_done = 1;
- oprom_is_loaded = 1;
- return 0;
+ return i915_init_done;
}
diff --git a/src/mainboard/google/parrot/chromeos.c b/src/mainboard/google/parrot/chromeos.c
index 6f50a794b2..1e79e4bb40 100644
--- a/src/mainboard/google/parrot/chromeos.c
+++ b/src/mainboard/google/parrot/chromeos.c
@@ -84,7 +84,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Did we load the VGA Option ROM? */
gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
diff --git a/src/mainboard/google/peppy/chromeos.c b/src/mainboard/google/peppy/chromeos.c
index 51d625b82c..780e58f2f9 100644
--- a/src/mainboard/google/peppy/chromeos.c
+++ b/src/mainboard/google/peppy/chromeos.c
@@ -76,7 +76,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid",
get_lid_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
}
#endif
diff --git a/src/mainboard/google/rambi/chromeos.c b/src/mainboard/google/rambi/chromeos.c
index f6f13edc24..636aae112b 100644
--- a/src/mainboard/google/rambi/chromeos.c
+++ b/src/mainboard/google/rambi/chromeos.c
@@ -78,7 +78,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
get_developer_mode_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", get_lid_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
}
#endif
diff --git a/src/mainboard/google/slippy/chromeos.c b/src/mainboard/google/slippy/chromeos.c
index 51d625b82c..780e58f2f9 100644
--- a/src/mainboard/google/slippy/chromeos.c
+++ b/src/mainboard/google/slippy/chromeos.c
@@ -76,7 +76,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid",
get_lid_switch());
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
}
#endif
diff --git a/src/mainboard/google/slippy/gma.c b/src/mainboard/google/slippy/gma.c
index e698fc918e..f2f93b141c 100644
--- a/src/mainboard/google/slippy/gma.c
+++ b/src/mainboard/google/slippy/gma.c
@@ -89,7 +89,6 @@ static unsigned int graphics;
static unsigned short addrport;
static unsigned short dataport;
static unsigned int physbase;
-extern int oprom_is_loaded;
static int ioread = 0, iowrite = 0;
@@ -462,10 +461,9 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
set_vbe_mode_info_valid(&dp->edid, graphics);
i915_init_done = 1;
- oprom_is_loaded = 1;
//io_i915_write32( 0x80000000,BLC_PWM_CPU_CTL2);
//io_i915_write32( 0x80000000,BLC_PWM_PCH_CTL1);
- return 1;
+ return i915_init_done;
fail:
printk(BIOS_SPEW, "Graphics could not be started;");
diff --git a/src/mainboard/google/stout/chromeos.c b/src/mainboard/google/stout/chromeos.c
index 0e43250008..297626cd84 100644
--- a/src/mainboard/google/stout/chromeos.c
+++ b/src/mainboard/google/stout/chromeos.c
@@ -82,7 +82,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Was VGA Option ROM loaded? */
gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
/* EC is in RW mode when it isn't in recovery mode. */
diff --git a/src/mainboard/google/stout/i915.c b/src/mainboard/google/stout/i915.c
index 8085de6554..4ebd567efe 100644
--- a/src/mainboard/google/stout/i915.c
+++ b/src/mainboard/google/stout/i915.c
@@ -41,7 +41,6 @@ static unsigned int graphics;
static unsigned short addrport;
static unsigned short dataport;
static unsigned int physbase;
-extern int oprom_is_loaded;
#define READ32(addr) io_i915_READ32(addr)
#define WRITE32(val, addr) io_i915_WRITE32(val, addr)
@@ -278,6 +277,5 @@ int i915lightup(unsigned int pphysbase,
memset((void *)graphics, 0, 4520*4096);
printk(BIOS_SPEW, "%ld microseconds\n", globalmicroseconds());
i915_init_done = 1;
- oprom_is_loaded = 1;
- return 0;
+ return i915_init_done;
}
diff --git a/src/mainboard/intel/baskingridge/chromeos.c b/src/mainboard/intel/baskingridge/chromeos.c
index 6bf5116c64..7b64f10604 100644
--- a/src/mainboard/intel/baskingridge/chromeos.c
+++ b/src/mainboard/intel/baskingridge/chromeos.c
@@ -81,7 +81,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Did we load the VGA option ROM? */
gpios->gpios[5].port = -1;
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
#endif
diff --git a/src/mainboard/intel/emeraldlake2/chromeos.c b/src/mainboard/intel/emeraldlake2/chromeos.c
index 4d998ec4e8..2194973fb5 100644
--- a/src/mainboard/intel/emeraldlake2/chromeos.c
+++ b/src/mainboard/intel/emeraldlake2/chromeos.c
@@ -80,7 +80,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Did we load the VGA option ROM? */
gpios->gpios[5].port = -1;
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
#endif
diff --git a/src/mainboard/intel/wtm2/chromeos.c b/src/mainboard/intel/wtm2/chromeos.c
index 594b4a75d3..a5ca4eb88b 100644
--- a/src/mainboard/intel/wtm2/chromeos.c
+++ b/src/mainboard/intel/wtm2/chromeos.c
@@ -61,7 +61,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "developer", DEV_MODE_SETTING);
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "lid", 1); // force open
fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "power", 0);
- fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", oprom_is_loaded);
+ fill_lb_gpio(gpio++, -1, ACTIVE_HIGH, "oprom", gfx_get_init_done());
}
#endif
diff --git a/src/mainboard/intel/wtm2/i915.c b/src/mainboard/intel/wtm2/i915.c
index b664c35ebf..64fa6b1ce2 100644
--- a/src/mainboard/intel/wtm2/i915.c
+++ b/src/mainboard/intel/wtm2/i915.c
@@ -70,7 +70,6 @@ static unsigned int graphics;
static unsigned short addrport;
static unsigned short dataport;
static unsigned int physbase;
-extern int oprom_is_loaded;
const u32 link_edid_data[] = {
0xffffff00, 0x00ffffff, 0x0379e430, 0x00000000,
@@ -220,8 +219,7 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
*/
i915_init_done = 1;
- oprom_is_loaded = 1;
- return 1;
+ return i915_init_done;
fail:
printk(BIOS_SPEW, "Graphics could not be started;");
diff --git a/src/mainboard/lenovo/x60/i915.c b/src/mainboard/lenovo/x60/i915.c
index 4870fd83dc..b41a0baaa1 100644
--- a/src/mainboard/lenovo/x60/i915.c
+++ b/src/mainboard/lenovo/x60/i915.c
@@ -369,5 +369,5 @@ int i915lightup(unsigned int pphysbase, unsigned int piobase,
set_vbe_mode_info_valid(&edid, graphics);
- return 0;
+ return 1;
}
diff --git a/src/mainboard/samsung/lumpy/chromeos.c b/src/mainboard/samsung/lumpy/chromeos.c
index afbdeeb9d0..c9fa1d973f 100644
--- a/src/mainboard/samsung/lumpy/chromeos.c
+++ b/src/mainboard/samsung/lumpy/chromeos.c
@@ -86,7 +86,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Did we load the VGA Option ROM? */
gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
#endif
diff --git a/src/mainboard/samsung/stumpy/chromeos.c b/src/mainboard/samsung/stumpy/chromeos.c
index e639fd3cbd..be1837061e 100644
--- a/src/mainboard/samsung/stumpy/chromeos.c
+++ b/src/mainboard/samsung/stumpy/chromeos.c
@@ -83,7 +83,7 @@ void fill_lb_gpios(struct lb_gpios *gpios)
/* Did we load the VGA Option ROM? */
gpios->gpios[5].port = -1; /* Indicate that this is a pseudo GPIO */
gpios->gpios[5].polarity = ACTIVE_HIGH;
- gpios->gpios[5].value = oprom_is_loaded;
+ gpios->gpios[5].value = gfx_get_init_done();
strncpy((char *)gpios->gpios[5].name,"oprom", GPIO_MAX_NAME_LENGTH);
}
#endif