diff options
author | Sourabh Banerjee <sbanerje@codeaurora.org> | 2015-02-19 16:43:26 +0530 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2015-04-17 09:59:53 +0200 |
commit | 89208653320c099e3c4489a43f792633d99cf4c1 (patch) | |
tree | bf172662053d8fe4c0d57f3a2d9ab36e57f81614 /src/soc/qualcomm/ipq806x/qup.c | |
parent | 3cfb6a066b6801186b716a4f789b69655e1e420e (diff) |
ipq806x: extend GSBI driver to support i2c on any GSBI block
The GSBI driver is extended to be able to program the CTRL reg for any given
GSBI block. The NS and MD registers programming is made more readable by
programming the M, N, D and other bits of the registers individually.
Defined configure structs for each QUP block to be able to track the init
status for each qup.
Configured GPIO8 and GPIO9 for I2C fuction.
BRANCH=chromeos-2013.04
BUG=chrome-os-partner:36722
TEST=Booted up storm P0.2, verified that the TPM on GSBI1 still works.
Change-Id: I17906beedef5c80267cf114892080b121902210a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 07bc79211770decc1070c3a88874a4e452b8f5bc
Original-Change-Id: I841d0d419f7339f5e5cb3385da98786eb18252ad
Original-Signed-off-by: Sourabh Banerjee <sbanerje@codeaurora.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/250763
Original-Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Original-Trybot-Ready: Vadim Bendebury <vbendeb@chromium.org>
Original-Commit-Queue: Vadim Bendebury <vbendeb@chromium.org>
Original-Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: http://review.coreboot.org/9759
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'src/soc/qualcomm/ipq806x/qup.c')
-rw-r--r-- | src/soc/qualcomm/ipq806x/qup.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/soc/qualcomm/ipq806x/qup.c b/src/soc/qualcomm/ipq806x/qup.c index 0ae3990183..72ba724e8b 100644 --- a/src/soc/qualcomm/ipq806x/qup.c +++ b/src/soc/qualcomm/ipq806x/qup.c @@ -1,7 +1,7 @@ /* * This file is part of the coreboot project. * - * Copyright (C) 2014 The Linux Foundation. All rights reserved. + * Copyright (C) 2014 - 2015 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -38,13 +38,13 @@ //TODO: refactor the following array to iomap driver. static unsigned gsbi_qup_base[] = { - GSBI_QUP1_BASE, - GSBI_QUP2_BASE, - GSBI_QUP3_BASE, - GSBI_QUP4_BASE, - GSBI_QUP5_BASE, - GSBI_QUP6_BASE, - GSBI_QUP7_BASE, + (unsigned)GSBI_QUP1_BASE, + (unsigned)GSBI_QUP2_BASE, + (unsigned)GSBI_QUP3_BASE, + (unsigned)GSBI_QUP4_BASE, + (unsigned)GSBI_QUP5_BASE, + (unsigned)GSBI_QUP6_BASE, + (unsigned)GSBI_QUP7_BASE, }; #define QUP_ADDR(gsbi_num, reg) ((void *)((gsbi_qup_base[gsbi_num-1]) + (reg))) |