[coreboot-gerrit] New patch to review for coreboot: 2932963 nyan: Remove broken setup_display() from romstage

Marc Jones (marc.jones@se-eng.com) gerrit at coreboot.org
Tue Mar 10 21:57:47 CET 2015


Marc Jones (marc.jones at se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/8638

-gerrit

commit 2932963390a03194a52c8d5991422abfb24b7b58
Author: Julius Werner <jwerner at chromium.org>
Date:   Fri Jul 11 17:09:41 2014 -0700

    nyan: Remove broken setup_display() from romstage
    
    This patch removes a chunk of romstage code from Tegra and all Nyan
    boards that was supposed to enable some LCD power rails early, but never
    really worked. The dev_find_slot() function can only find PCI devices,
    which the CPU cluster is not. Since we're done with Nyan-RO and the
    ramstage display code is fine as it is, there is no point in trying to
    fix this... but we should remove it from ToT lest someone uses it as a
    blueprint to add more dead code to future boards.
    
    BRANCH=None
    BUG=None
    TEST=None
    
    Original-Change-Id: I6eee256873299429d4e3934fe7d454120390f34d
    Original-Signed-off-by: Julius Werner <jwerner at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/207720
    Original-Reviewed-by: David Hendricks <dhendrix at chromium.org>
    (cherry picked from commit a3df62a3bcefcc20ae59648f5d1f0a01db3c02c6)
    Signed-off-by: Marc Jones <marc.jones at se-eng.com>
    
    Change-Id: I8deedea5e9787848aae3064509c611bc349313cc
---
 src/mainboard/google/nyan/romstage.c       | 20 ----------
 src/mainboard/google/nyan_big/romstage.c   | 20 ----------
 src/mainboard/google/nyan_blaze/romstage.c | 20 ----------
 src/soc/nvidia/tegra124/Makefile.inc       |  1 -
 src/soc/nvidia/tegra124/early_display.c    | 61 ------------------------------
 5 files changed, 122 deletions(-)

diff --git a/src/mainboard/google/nyan/romstage.c b/src/mainboard/google/nyan/romstage.c
index 749b87d..5ab77b3 100644
--- a/src/mainboard/google/nyan/romstage.c
+++ b/src/mainboard/google/nyan/romstage.c
@@ -22,7 +22,6 @@
 #include <arch/exception.h>
 #include <arch/io.h>
 #include <arch/stages.h>
-#include <device/device.h>
 #include <cbfs.h>
 #include <cbmem.h>
 #include <console/console.h>
@@ -191,25 +190,6 @@ static void __attribute__((noinline)) romstage(void)
 		cpu_reset();
 	}
 
-	/* For quality of the user experience, it's important to get
-	 * the video going ASAP. Because there are long delays in some
-	 * of the powerup steps, we do some very early setup here in
-	 * romstage. The only thing setup_display does is manage
-	 * 4 GPIOs, under control of the config struct members.
-	 * In general, it is safe to enable panel power, and disable
-	 * anything related to the backlight. If we get something wrong,
-	 * we can easily fix it in ramstage by further GPIO manipulation,
-	 * so we feel it is ok to do some setting at this point.
-	 */
-
-	const struct device *soc = dev_find_slot(DEVICE_PATH_CPU_CLUSTER, 0);
-	printk(BIOS_SPEW, "s%s: soc is %p\n", __func__, soc);
-	if (soc && soc->chip_info) {
-		const struct soc_nvidia_tegra124_config *config =
-			soc->chip_info;
-		setup_display((struct soc_nvidia_tegra124_config *)config);
-	}
-
 	cbmem_initialize_empty();
 
 	timestamp_init(0);
diff --git a/src/mainboard/google/nyan_big/romstage.c b/src/mainboard/google/nyan_big/romstage.c
index 749b87d..5ab77b3 100644
--- a/src/mainboard/google/nyan_big/romstage.c
+++ b/src/mainboard/google/nyan_big/romstage.c
@@ -22,7 +22,6 @@
 #include <arch/exception.h>
 #include <arch/io.h>
 #include <arch/stages.h>
-#include <device/device.h>
 #include <cbfs.h>
 #include <cbmem.h>
 #include <console/console.h>
@@ -191,25 +190,6 @@ static void __attribute__((noinline)) romstage(void)
 		cpu_reset();
 	}
 
-	/* For quality of the user experience, it's important to get
-	 * the video going ASAP. Because there are long delays in some
-	 * of the powerup steps, we do some very early setup here in
-	 * romstage. The only thing setup_display does is manage
-	 * 4 GPIOs, under control of the config struct members.
-	 * In general, it is safe to enable panel power, and disable
-	 * anything related to the backlight. If we get something wrong,
-	 * we can easily fix it in ramstage by further GPIO manipulation,
-	 * so we feel it is ok to do some setting at this point.
-	 */
-
-	const struct device *soc = dev_find_slot(DEVICE_PATH_CPU_CLUSTER, 0);
-	printk(BIOS_SPEW, "s%s: soc is %p\n", __func__, soc);
-	if (soc && soc->chip_info) {
-		const struct soc_nvidia_tegra124_config *config =
-			soc->chip_info;
-		setup_display((struct soc_nvidia_tegra124_config *)config);
-	}
-
 	cbmem_initialize_empty();
 
 	timestamp_init(0);
diff --git a/src/mainboard/google/nyan_blaze/romstage.c b/src/mainboard/google/nyan_blaze/romstage.c
index a23937e..a5f6194 100644
--- a/src/mainboard/google/nyan_blaze/romstage.c
+++ b/src/mainboard/google/nyan_blaze/romstage.c
@@ -22,7 +22,6 @@
 #include <arch/exception.h>
 #include <arch/io.h>
 #include <arch/stages.h>
-#include <device/device.h>
 #include <cbfs.h>
 #include <cbmem.h>
 #include <console/console.h>
@@ -191,25 +190,6 @@ static void __attribute__((noinline)) romstage(void)
 		cpu_reset();
 	}
 
-	/* For quality of the user experience, it's important to get
-	 * the video going ASAP. Because there are long delays in some
-	 * of the powerup steps, we do some very early setup here in
-	 * romstage. The only thing setup_display does is manage
-	 * 4 GPIOs, under control of the config struct members.
-	 * In general, it is safe to enable panel power, and disable
-	 * anything related to the backlight. If we get something wrong,
-	 * we can easily fix it in ramstage by further GPIO manipulation,
-	 * so we feel it is ok to do some setting at this point.
-	 */
-
-	const struct device *soc = dev_find_slot(DEVICE_PATH_CPU_CLUSTER, 0);
-	printk(BIOS_SPEW, "s%s: soc is %p\n", __func__, soc);
-	if (soc && soc->chip_info) {
-		const struct soc_nvidia_tegra124_config *config =
-			soc->chip_info;
-		setup_display((struct soc_nvidia_tegra124_config *)config);
-	}
-
 	cbmem_initialize_empty();
 
 	timestamp_init(0);
diff --git a/src/soc/nvidia/tegra124/Makefile.inc b/src/soc/nvidia/tegra124/Makefile.inc
index 8054ca2..6631364 100644
--- a/src/soc/nvidia/tegra124/Makefile.inc
+++ b/src/soc/nvidia/tegra124/Makefile.inc
@@ -33,7 +33,6 @@ verstage-y += ../tegra/pinmux.c
 romstage-y += cbfs.c
 romstage-y += cbmem.c
 romstage-y += clock.c
-romstage-y += early_display.c
 romstage-y += dma.c
 romstage-y += i2c.c
 romstage-y += monotonic_timer.c
diff --git a/src/soc/nvidia/tegra124/early_display.c b/src/soc/nvidia/tegra124/early_display.c
deleted file mode 100644
index 4356a62..0000000
--- a/src/soc/nvidia/tegra124/early_display.c
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * This file is part of the coreboot project.
- *
- * Copyright 2013 Google Inc.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#include <console/console.h>
-#include <stdlib.h>
-#include <stddef.h>
-#include <arch/cache.h>
-#include "chip.h"
-#include <soc/display.h>
-#include "gpio.h"
-
-/* the primary purpose of this function is to kick off things in
- * romstage that are time consuming. No more should be done at this
- * point than the bare minimum that will allow us to pick up the work
- * in the ramstage and not require lots of udelays.  ramstage will do
- * the rest. As it happens, that merely means 'turn off everything you can,
- * save the minimum long-delay bit that you need to get graphics going'. It's
- * important not to have the backlight on as people don't like display trash
- * on startup, even if I do.
- */
-void setup_display(struct soc_nvidia_tegra124_config *config)
-{
-	if (config->panel_vdd_gpio){
-		gpio_output(config->panel_vdd_gpio, 1);
-		printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
-			__func__, config->panel_vdd_gpio, 1);
-	}
-	if (config->lvds_shutdown_gpio){
-		gpio_output(config->lvds_shutdown_gpio, 0);
-		printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
-			__func__, config->lvds_shutdown_gpio, 0);
-	}
-	if (config->backlight_en_gpio){
-		gpio_output(config->backlight_en_gpio, 0);
-		printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
-			__func__, config->backlight_en_gpio, 0);
-	}
-	if (config->backlight_vdd_gpio){
-		gpio_output(config->backlight_vdd_gpio, 0);
-		printk(BIOS_SPEW,"%s: setting gpio %08x to %d\n",
-			__func__, config->backlight_vdd_gpio, 0);
-	}
-
-}
-



More information about the coreboot-gerrit mailing list