From c5cd57c330694a63360be4d93ecf5cb23883aafc Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Fri, 11 Jul 2014 17:09:41 -0700 Subject: 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 Original-Reviewed-on: https://chromium-review.googlesource.com/207720 Original-Reviewed-by: David Hendricks (cherry picked from commit a3df62a3bcefcc20ae59648f5d1f0a01db3c02c6) Signed-off-by: Marc Jones Change-Id: I8deedea5e9787848aae3064509c611bc349313cc Reviewed-on: http://review.coreboot.org/8638 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: David Hendricks --- src/mainboard/google/nyan/romstage.c | 20 -------------------- src/mainboard/google/nyan_big/romstage.c | 20 -------------------- src/mainboard/google/nyan_blaze/romstage.c | 20 -------------------- 3 files changed, 60 deletions(-) (limited to 'src/mainboard/google') diff --git a/src/mainboard/google/nyan/romstage.c b/src/mainboard/google/nyan/romstage.c index 1af3c31f22..a71f68269b 100644 --- a/src/mainboard/google/nyan/romstage.c +++ b/src/mainboard/google/nyan/romstage.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -190,25 +189,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(); // Enable additional peripherals we need for ROM stage. diff --git a/src/mainboard/google/nyan_big/romstage.c b/src/mainboard/google/nyan_big/romstage.c index 1af3c31f22..a71f68269b 100644 --- a/src/mainboard/google/nyan_big/romstage.c +++ b/src/mainboard/google/nyan_big/romstage.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -190,25 +189,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(); // Enable additional peripherals we need for ROM stage. diff --git a/src/mainboard/google/nyan_blaze/romstage.c b/src/mainboard/google/nyan_blaze/romstage.c index 2e526485c8..522ee91043 100644 --- a/src/mainboard/google/nyan_blaze/romstage.c +++ b/src/mainboard/google/nyan_blaze/romstage.c @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include @@ -190,25 +189,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(); // Enable additional peripherals we need for ROM stage. -- cgit v1.2.3