From f17680b23c3b334bfbe81a03e08d05e04cc0334e Mon Sep 17 00:00:00 2001 From: Vadim Bendebury Date: Wed, 23 Apr 2014 14:00:59 -0700 Subject: ipq8064: prepare uart driver for use in coreboot MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The IO accessor wrappers are used to allow integer register addresses. A structure defining UART interface configuration is declared and defined. A few long lines are wrapped. Interface functions are renamed to match the wrapper API. cdp.c is edited to fit into coreboot compilation environment, and the only function required by the UART driver if exposed, the rest are compiled out for now. BUG=chrome-os-partner:27784 TEST=after all patches are applied the serial console on AP148 becomes operational. Original-Change-Id: I80c824d085036c0f90c52aad77843e87976dbe49 Original-Signed-off-by: Vadim Bendebury Original-Reviewed-on: https://chromium-review.googlesource.com/196662 Original-Reviewed-by: Stefan Reinauer (cherry picked from commit 5e9af53a069cd048334a3a28f0a4ce9df7c96992) Signed-off-by: Marc Jones Change-Id: I80c824d085036c0f90c52aad77843e87976dbe49 Reviewed-on: http://review.coreboot.org/7874 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/mainboard/google/storm/cdp.c | 43 ++++++++++++++-------------------------- 1 file changed, 15 insertions(+), 28 deletions(-) (limited to 'src/mainboard') diff --git a/src/mainboard/google/storm/cdp.c b/src/mainboard/google/storm/cdp.c index f26ae021af..94845c7322 100644 --- a/src/mainboard/google/storm/cdp.c +++ b/src/mainboard/google/storm/cdp.c @@ -1,25 +1,22 @@ /* * Copyright (c) 2012 - 2013 The Linux Foundation. All rights reserved.* */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "ipq806x_board_param.h" -#include "ipq806x_cdp.h" -#include -#include -#include -#include - -DECLARE_GLOBAL_DATA_PTR; +#include +#include +#include +void ipq_configure_gpio(const gpio_func_data_t *gpio, unsigned count) +{ + int i; + + for (i = 0; i < count; i++) { + gpio_tlmm_config(gpio->gpio, gpio->func, gpio->dir, + gpio->pull, gpio->drvstr, gpio->enable); + gpio++; + } +} +#if 0 /* Watchdog bite time set to default reset value */ #define RESET_WDT_BITE_TIME 0x31F3 @@ -354,17 +351,6 @@ int get_eth_mac_address(uchar *enetaddr, uint no_of_macs) return ret; } -void ipq_configure_gpio(gpio_func_data_t *gpio, uint count) -{ - int i; - - for (i = 0; i < count; i++) { - gpio_tlmm_config(gpio->gpio, gpio->func, gpio->dir, - gpio->pull, gpio->drvstr, gpio->enable); - gpio++; - } -} - int board_eth_init(bd_t *bis) { int status; @@ -377,3 +363,4 @@ int board_eth_init(bd_t *bis) status = ipq_gmac_init(gboard_param->gmac_cfg); return status; } +#endif -- cgit v1.2.3