[coreboot-gerrit] Patch set updated for coreboot: 5e67135 ipq8064: prepare include files before adding UART driver

Marc Jones (marc.jones@se-eng.com) gerrit at coreboot.org
Mon Dec 22 01:12:50 CET 2014


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/7873

-gerrit

commit 5e67135bed58db2a541e0c70021e6461c0489903
Author: Vadim Bendebury <vbendeb at chromium.org>
Date:   Wed Apr 23 13:42:22 2014 -0700

    ipq8064: prepare include files before adding UART driver
    
    These patch modifies .h files to match the coreboot API. A few more
    significant changes are:
    
     - UART specific fields removed from common board structure in cdp.h.
       These fields are set at compile time in u-boot (where this
       structure comes from), they will be set in a different structure in
       the UART driver in an upcoming patch.
    
     - an inline wrapper is added in gpio.h to provide GPIO API the UART
       driver expects.
    
     - the ipq_configure_gpio() is passed the descriptor placed in ro data.
    
    BUG=chrome-os-partner:27784
    TEST=none
    
    Original-Change-Id: Id49507fb0c72ef993a89b538cd417b6c86ae3786
    Original-Signed-off-by: Vadim Bendebury <vbendeb at chromium.org>
    Original-Reviewed-on: https://chromium-review.googlesource.com/196661
    Original-Reviewed-by: Stefan Reinauer <reinauer at chromium.org>
    (cherry picked from commit ea400f1b720eb671fa411c5fd1df7efd14fdacd6)
    Signed-off-by: Marc Jones <marc.jones at se-eng.com>
    
    Change-Id: I2c7be09675b225de99be3c94b22e9ee2ebb2cb9a
---
 src/include/console/uart.h                  |  1 +
 src/soc/qualcomm/ipq806x/include/cdp.h      | 10 +---------
 src/soc/qualcomm/ipq806x/include/gpio.h     |  8 ++++++++
 src/soc/qualcomm/ipq806x/include/gsbi.h     |  2 --
 src/soc/qualcomm/ipq806x/include/ipq_uart.h |  5 ++---
 5 files changed, 12 insertions(+), 14 deletions(-)

diff --git a/src/include/console/uart.h b/src/include/console/uart.h
index 94933fe..45dd65e 100644
--- a/src/include/console/uart.h
+++ b/src/include/console/uart.h
@@ -44,6 +44,7 @@ void uart_init(int idx);
 void uart_tx_byte(int idx, unsigned char data);
 void uart_tx_flush(int idx);
 unsigned char uart_rx_byte(int idx);
+int uart_can_rx_byte(void);
 
 uintptr_t uart_platform_base(int idx);
 
diff --git a/src/soc/qualcomm/ipq806x/include/cdp.h b/src/soc/qualcomm/ipq806x/include/cdp.h
index 22ba192..15f91cb 100644
--- a/src/soc/qualcomm/ipq806x/include/cdp.h
+++ b/src/soc/qualcomm/ipq806x/include/cdp.h
@@ -106,20 +106,12 @@ typedef struct {
 
 /* Board specific parameters */
 typedef struct {
-	unsigned int machid;
-	unsigned int ddr_size;
-	unsigned int uart_gsbi;
-	unsigned int uart_gsbi_base;
-	unsigned int uart_dm_base;
-	unsigned int clk_dummy;
 #if 0
-	uart_clk_mnd_t mnd_value;
 	unsigned int gmac_gpio_count;
 	gpio_func_data_t *gmac_gpio;
 	ipq_gmac_board_cfg_t gmac_cfg[IPQ_GMAC_NMACS];
 	flash_desc flashdesc;
 	spinorflash_params_t flash_param;
-	gpio_func_data_t dbg_uart_gpio[NO_OF_DBG_UART_GPIOS];
 #endif
 } __attribute__ ((__packed__)) board_ipq806x_params_t;
 
@@ -141,5 +133,5 @@ static inline int gmac_cfg_is_valid(ipq_gmac_board_cfg_t *cfg)
 #endif
 
 unsigned int get_board_index(unsigned machid);
-void ipq_configure_gpio(gpio_func_data_t *gpio, unsigned count);
+void ipq_configure_gpio(const gpio_func_data_t *gpio, unsigned count);
 #endif
diff --git a/src/soc/qualcomm/ipq806x/include/gpio.h b/src/soc/qualcomm/ipq806x/include/gpio.h
index 678da0d..efaf30e 100644
--- a/src/soc/qualcomm/ipq806x/include/gpio.h
+++ b/src/soc/qualcomm/ipq806x/include/gpio.h
@@ -92,4 +92,12 @@ void gpio_tlmm_config_get(gpio_t gpio, unsigned int *func,
 
 void gpio_io_config_set(gpio_t gpio, unsigned int out);
 void gpio_io_config_get(gpio_t gpio, unsigned int *in, unsigned int *out);
+
+/* Keep this to maintain backwards compatibility with the vendor API. */
+static inline void gpio_tlmm_config(unsigned int gpio, unsigned int func,
+				    unsigned int dir, unsigned int pull,
+				    unsigned int drvstr, unsigned int enable)
+{
+	gpio_tlmm_config_set(gpio, func, pull, drvstr, enable);
+}
 #endif // __SOC_QUALCOMM_IPQ806X_GPIO_H_
diff --git a/src/soc/qualcomm/ipq806x/include/gsbi.h b/src/soc/qualcomm/ipq806x/include/gsbi.h
index d2ba2b3..c12d6fd 100644
--- a/src/soc/qualcomm/ipq806x/include/gsbi.h
+++ b/src/soc/qualcomm/ipq806x/include/gsbi.h
@@ -19,8 +19,6 @@
 #ifndef __GSBI_H_
 #define __GSBI_H_
 
-#include <asm/io.h>
-
 /* GSBI Registers */
 #define GSBI_CTRL_REG(base)        ((base) + 0x0)
 
diff --git a/src/soc/qualcomm/ipq806x/include/ipq_uart.h b/src/soc/qualcomm/ipq806x/include/ipq_uart.h
index 6fff046..da943b9 100644
--- a/src/soc/qualcomm/ipq806x/include/ipq_uart.h
+++ b/src/soc/qualcomm/ipq806x/include/ipq_uart.h
@@ -32,14 +32,13 @@
 #ifndef __UART_DM_H__
 #define __UART_DM_H__
 
-#include <asm/io.h>
-#include "common.h"
+#define PERIPH_BLK_BLSP 0
+
 #define MSM_BOOT_UART_DM_EXTR_BITS(value, start_pos, end_pos) \
                                              ((value << (32 - end_pos))\
                                               >> (32 - (end_pos - start_pos)))
 
 
-extern void dsb(void);
 #define PACK_CHARS_INTO_WORDS(a, cnt, word)  {                                 \
                                                word = 0;                       \
                                                int j;                          \



More information about the coreboot-gerrit mailing list