From fc4c8520b48286798297b957efc54b0e48dc3cc6 Mon Sep 17 00:00:00 2001 From: Aaron Durbin Date: Thu, 13 Nov 2014 16:41:26 -0600 Subject: [PATCH] Revert "ryu: libpayload: Set fb address in dc register" This reverts commit e83de6429cb17817c0f85ea6e812e7e99613dcb6. The initialization can be moved into depthcharge. Moving it there also provides symmetry with the backlight support. BRANCH=none BUG=chrome-os-partner:31936 TEST=built on ryu Change-Id: I46e720567f5732f3a0e0612caa91670e8cb5aa8a Signed-off-by: Aaron Durbin Reviewed-on: https://chromium-review.googlesource.com/229790 Reviewed-by: Furquan Shaikh --- payloads/libpayload/configs/config.rush | 1 - payloads/libpayload/drivers/Makefile.inc | 3 -- payloads/libpayload/drivers/video/tegra.c | 63 ----------------------- payloads/libpayload/drivers/video/video.c | 15 ------ 4 files changed, 82 deletions(-) delete mode 100644 payloads/libpayload/drivers/video/tegra.c diff --git a/payloads/libpayload/configs/config.rush b/payloads/libpayload/configs/config.rush index 01e3394765..709414ae85 100644 --- a/payloads/libpayload/configs/config.rush +++ b/payloads/libpayload/configs/config.rush @@ -45,7 +45,6 @@ CONFIG_LP_8250_MMIO32_SERIAL_CONSOLE=y # CONFIG_LP_SERIAL_ACS_FALLBACK is not set CONFIG_LP_VIDEO_CONSOLE=y CONFIG_LP_COREBOOT_VIDEO_CONSOLE=y -CONFIG_LP_TEGRA_VIDEO_CONSOLE_INIT=y # CONFIG_LP_PC_KEYBOARD is not set # diff --git a/payloads/libpayload/drivers/Makefile.inc b/payloads/libpayload/drivers/Makefile.inc index e67dfdc598..2712f048be 100644 --- a/payloads/libpayload/drivers/Makefile.inc +++ b/payloads/libpayload/drivers/Makefile.inc @@ -65,9 +65,6 @@ libc-$(CONFIG_LP_GEODELX_VIDEO_CONSOLE) += video/font8x16.c libc-$(CONFIG_LP_COREBOOT_VIDEO_CONSOLE) += video/corebootfb.c libc-$(CONFIG_LP_COREBOOT_VIDEO_CONSOLE) += video/font8x16.c -# Tegra132 framebuffer init driver -libc-$(CONFIG_LP_TEGRA_VIDEO_CONSOLE_INIT) += video/tegra.c - libc-$(CONFIG_LP_STORAGE) += storage/storage.c libc-$(CONFIG_LP_STORAGE_ATA) += storage/ata.c libc-$(CONFIG_LP_STORAGE_ATAPI) += storage/atapi.c diff --git a/payloads/libpayload/drivers/video/tegra.c b/payloads/libpayload/drivers/video/tegra.c deleted file mode 100644 index b9244ca5c6..0000000000 --- a/payloads/libpayload/drivers/video/tegra.c +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright 2014 Google Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - */ -#include -#include -#include - -#define write32(val, addr) *(volatile uint32_t *)addr = val -#define read32(addr) *(volatile uint32_t *)addr - -#define WIN_ENABLE (1 << 30) -#define TEGRA_DC_WIN_OPTIONS 0x54201c00 -#define TEGRA_DC_FB_START 0x54202000 - -struct video_console tegra_video_console; - -static int tegra_fb_init(void) -{ - uint32_t value; - - if ((lib_sysinfo.framebuffer == NULL) || - !(lib_sysinfo.framebuffer->physical_address)) - return -1; - - write32(((uint32_t)lib_sysinfo.framebuffer->physical_address), - TEGRA_DC_FB_START); - value = read32(TEGRA_DC_WIN_OPTIONS); - write32((value | WIN_ENABLE), TEGRA_DC_WIN_OPTIONS); - - /* - * This is not a full functional video driver. The return value here - * must be non-zero so that upper layer can continue scaning to find - * the real video driver. - */ - return -1; -} - -struct video_console tegra_video_console = { - .init = tegra_fb_init, -}; diff --git a/payloads/libpayload/drivers/video/video.c b/payloads/libpayload/drivers/video/video.c index d88069efd3..5f76a3075a 100644 --- a/payloads/libpayload/drivers/video/video.c +++ b/payloads/libpayload/drivers/video/video.c @@ -43,23 +43,8 @@ extern struct video_console coreboot_video_console; extern struct video_console vga_video_console; #endif -#ifdef CONFIG_LP_TEGRA_VIDEO_CONSOLE_INIT -extern struct video_console tegra_video_console; -#endif - static struct video_console *console_list[] = { -/* - * tegra_video_console only provides the init function to do a few - * dc configuration settings. Since it is not a full-fledged video - * driver, its init function will not return success so that - * function video_init() can find the real video driver. Also - * tegra_video_console must be placed at first position in this - * console_list[] to ensure the tegra init function is being called. - */ -#ifdef CONFIG_LP_TEGRA_VIDEO_CONSOLE_INIT - &tegra_video_console, -#endif #ifdef CONFIG_LP_GEODELX_VIDEO_CONSOLE &geodelx_video_console, #endif