diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2014-04-23 14:00:59 -0700 |
---|---|---|
committer | Marc Jones <marc.jones@se-eng.com> | 2014-12-30 20:18:33 +0100 |
commit | f17680b23c3b334bfbe81a03e08d05e04cc0334e (patch) | |
tree | 9eeb5e904e0033301b4d8f53118917962a0270d0 /src/mainboard/google | |
parent | 4f062ae381db3c7e5b1b64ce22db374f63f048d7 (diff) | |
download | coreboot-f17680b23c3b334bfbe81a03e08d05e04cc0334e.tar.xz |
ipq8064: prepare uart driver for use in coreboot
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 <vbendeb@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/196662
Original-Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
(cherry picked from commit 5e9af53a069cd048334a3a28f0a4ce9df7c96992)
Signed-off-by: Marc Jones <marc.jones@se-eng.com>
Change-Id: I80c824d085036c0f90c52aad77843e87976dbe49
Reviewed-on: http://review.coreboot.org/7874
Tested-by: build bot (Jenkins)
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/mainboard/google')
-rw-r--r-- | src/mainboard/google/storm/cdp.c | 43 |
1 files changed, 15 insertions, 28 deletions
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 <common.h> -#include <linux/mtd/ipq_nand.h> -#include <asm/arch-ipq806x/gpio.h> -#include <asm/global_data.h> -#include <asm/io.h> -#include <asm/arch-ipq806x/clock.h> -#include <asm/arch-ipq806x/ebi2.h> -#include <asm/arch-ipq806x/smem.h> -#include <asm/errno.h> -#include "ipq806x_board_param.h" -#include "ipq806x_cdp.h" -#include <asm/arch-ipq806x/nss/msm_ipq806x_gmac.h> -#include <asm/arch-ipq806x/timer.h> -#include <nand.h> -#include <phy.h> - -DECLARE_GLOBAL_DATA_PTR; +#include <types.h> +#include <cdp.h> +#include <gpio.h> +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 |