From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Mon, 28 Oct 2019 05:47:53 +0100 Subject: [U-Boot] [PATCH v3 094/108] i2c: designware: Add apollolake support In-Reply-To: <20191021033913.220758-89-sjg@chromium.org> References: <20191021033913.220758-22-sjg@chromium.org> <20191021033913.220758-89-sjg@chromium.org> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Simon, Am 21.10.2019 um 05:38 schrieb Simon Glass: > For apollolake we need to take the I2C bus controller out of reset before > using this. Add this functionality to the driver. > > Signed-off-by: Simon Glass > --- > > Changes in v3: > - Add a weak function to avoid errors on other platforms > > Changes in v2: None > > drivers/i2c/dw_i2c_pci.c | 20 +++++++++++++++++++- > 1 file changed, 19 insertions(+), 1 deletion(-) > > diff --git a/drivers/i2c/dw_i2c_pci.c b/drivers/i2c/dw_i2c_pci.c > index 065c0aa5994..d6d93f08a56 100644 > --- a/drivers/i2c/dw_i2c_pci.c > +++ b/drivers/i2c/dw_i2c_pci.c > @@ -6,8 +6,14 @@ > */ > > #include > +#include > #include "designware_i2c.h" > > +enum { > + VANILLA = 0, > + INTEL_APL, > +}; > + > /* BayTrail HCNT/LCNT/SDA hold time */ > static struct dw_scl_sda_cfg byt_config = { > .ss_hcnt = 0x200, > @@ -17,6 +23,9 @@ static struct dw_scl_sda_cfg byt_config = { > .sda_hold = 0x6, > }; > > +/* Have a weak function for now - possibly should be a new uclass */ > +void lpss_reset_release(void *regs); > + > static int designware_i2c_pci_probe(struct udevice *dev) > { > struct dw_i2c *priv = dev_get_priv(dev); > @@ -25,9 +34,12 @@ static int designware_i2c_pci_probe(struct udevice *dev) > priv->regs = (struct i2c_regs *) > dm_pci_map_bar(dev, PCI_BASE_ADDRESS_0, PCI_REGION_MEM); > if (IS_ENABLED(CONFIG_INTEL_BAYTRAIL)) > - /* Use BayTrail specific timing values */ > + /* Use BayTrail-specific timing values */ Nitpick only: unrelated change. Reviewed-by: Heiko Schocher [...] bye, Heiko -- DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de