[{"id":1748127,"web_url":"http://patchwork.ozlabs.org/comment/1748127/","msgid":"<CAFd5g45r+YAz706Uhwj9_Gf6iJy8P92K_JZmo22skDWNOXf8rw@mail.gmail.com>","list_archive_url":null,"date":"2017-08-16T06:30:18","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":69647,"url":"http://patchwork.ozlabs.org/api/people/69647/","name":"Brendan Higgins","email":"brendanhiggins@google.com"},"content":"On Tue, Aug 15, 2017 at 10:21 AM, Andrew Jeffery <andrew@aj.id.au> wrote:\n> In addition to the base, low and high clock configuration, the AC timing\n> register #1 on the AST2400 houses fields controlling:\n>\n> 1. tBUF: Minimum delay between Stop and Start conditions\n> 2. tHDSTA: Hold time for the Start condition\n> 3. tACST: Setup time for Start and Stop conditions, and hold time for the\n>    Repeated Start condition\n>\n> These values are defined in hardware on the AST2500 and therefore don't\n> need to be set.\n>\n> aspeed_i2c_init_clk() was performing a direct write of the generated\n> clock values rather than a read/mask/modify/update sequence to retain\n> tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST\n> fields on the AST2400. This resulted in a delay/setup/hold time of 1\n> base clock, which in some configurations is not enough for some devices\n> (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired\n> bus speed of 100kHz).\n>\n> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>\n> ---\n>  drivers/i2c/busses/i2c-aspeed.c | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c\n> index ee76e6dddc4b..284f8670dbeb 100644\n> --- a/drivers/i2c/busses/i2c-aspeed.c\n> +++ b/drivers/i2c/busses/i2c-aspeed.c\n> @@ -53,6 +53,9 @@\n>  #define ASPEED_I2CD_MASTER_EN                          BIT(0)\n>\n>  /* 0x04 : I2CD Clock and AC Timing Control Register #1 */\n> +#define ASPEED_I2CD_TIME_TBUF_MASK                     GENMASK(31, 28)\n> +#define ASPEED_I2CD_TIME_THDSTA_MASK                   GENMASK(27, 24)\n> +#define ASPEED_I2CD_TIME_TACST_MASK                    GENMASK(23, 20)\n>  #define ASPEED_I2CD_TIME_SCL_HIGH_SHIFT                        16\n>  #define ASPEED_I2CD_TIME_SCL_HIGH_MASK                 GENMASK(19, 16)\n>  #define ASPEED_I2CD_TIME_SCL_LOW_SHIFT                 12\n> @@ -744,7 +747,11 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus)\n>         u32 divisor, clk_reg_val;\n>\n>         divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);\n> -       clk_reg_val = bus->get_clk_reg_val(divisor);\n> +       clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);\n> +       clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |\n> +                       ASPEED_I2CD_TIME_THDSTA_MASK |\n> +                       ASPEED_I2CD_TIME_TACST_MASK);\n> +       clk_reg_val |= bus->get_clk_reg_val(divisor);\n>         writel(clk_reg_val, bus->base + ASPEED_I2C_AC_TIMING_REG1);\n>         writel(ASPEED_NO_TIMEOUT_CTRL, bus->base + ASPEED_I2C_AC_TIMING_REG2);\n>\n> --\n> 2.11.0\n>\n\nAwesome! I think this might fix an issue we saw on one of our boards.\nI am out of the country right now, so I cannot test this myself, until Monday.","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xXKGk2CRpz9sRg\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 16:30:38 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xXKGk0fV9zDqYN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 16:30:38 +1000 (AEST)","from mail-qk0-x236.google.com (mail-qk0-x236.google.com\n\t[IPv6:2607:f8b0:400d:c09::236])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xXKGQ57J5zDqY3\n\tfor <openbmc@lists.ozlabs.org>; Wed, 16 Aug 2017 16:30:22 +1000 (AEST)","by mail-qk0-x236.google.com with SMTP id x191so15267039qka.5\n\tfor <openbmc@lists.ozlabs.org>; Tue, 15 Aug 2017 23:30:22 -0700 (PDT)","by 10.140.44.53 with HTTP; Tue, 15 Aug 2017 23:30:18 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"hzxP6ZD+\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"hzxP6ZD+\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"hzxP6ZD+\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=QAoVSNh2qBweUI4CnasldT+G4w4hmUSIELVKR1g3hdI=;\n\tb=hzxP6ZD+FvdYbre3IxCJIMrdILjSHpD/AZWFYuoBcQaJAPktxpse4WdnP0NlL0MR1G\n\tCLpLUewkDX8Jv5OAOVO8A6QM35DKyZTZD/srZQP2pc6dkZIl8UUKhVxlS9bY10qzUCSW\n\tUqUwiUR38QqTBu400ydazbrBBad6MveI9O2QcdTJ6d81gZxGb7ySyt45Dlm/3vsLrGua\n\tRrT8xBXp50ydlPgHvdhNImwOTNxVQqXkAqDWunLRQPu/q7FHUMNIVnOvN0UeSUfCWh/Y\n\tL+Agpmbypa6N2vRILjcGvSdOZojRgkOTjU2g6LEEQx3T1HgfZeY8JyVGQEprgG3M9K6f\n\t3sog==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=QAoVSNh2qBweUI4CnasldT+G4w4hmUSIELVKR1g3hdI=;\n\tb=DvtguYUoFjM7cOc5ambFhh9aTEs15c7fhKTblncw/dDMnMbciP8pvum/rP4nGZgczL\n\tBzAg2KG6sAxCiqNB73WZcKEt+cJhjg0ZN73T3ujHDuvYN05PPfXO/CGff1V2RNhoHwpx\n\tjpCCmBMlW677MMypswWMqgnfvHUPYAsxFIYO7R0SiiMXRUtgxpwz0pTytHhYiR53Ipk/\n\tLkWBjySsP3R1hxcrKjKL2urWHZQBRKXvfBsyW75bm8LYXJ7Al8Uq7iUMVhOaiu/oWssY\n\twJABHarx0gSwdQP2Lc5B0o9ELPWC1QUW9OwzzDISfDetVjsO9BEjb+YqkrBRziDbRMxG\n\tbdFw==","X-Gm-Message-State":"AHYfb5hFRXQUO7uCJ0eQbzAIvGFyi9lROFlYq2es3t/favWETVO2J/hm\n\tzS/3m0z+ibh9w/kzujraUtjvUnFEG5nD","X-Received":"by 10.55.207.211 with SMTP id v80mr751364qkl.51.1502865019401;\n\tTue, 15 Aug 2017 23:30:19 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170815072102.23067-1-andrew@aj.id.au>","References":"<20170815072102.23067-1-andrew@aj.id.au>","From":"Brendan Higgins <brendanhiggins@google.com>","Date":"Wed, 16 Aug 2017 09:30:18 +0300","Message-ID":"<CAFd5g45r+YAz706Uhwj9_Gf6iJy8P92K_JZmo22skDWNOXf8rw@mail.gmail.com>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","To":"Andrew Jeffery <andrew@aj.id.au>","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Ryan Chen <ryan_chen@aspeedtech.com>, linux-aspeed@lists.ozlabs.org,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tOpenBMC Maillist <openbmc@lists.ozlabs.org>, \n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tlinux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1748136,"web_url":"http://patchwork.ozlabs.org/comment/1748136/","msgid":"<CACPK8XeNDxo14KRsAqo3a0Rs26h-1vRsLyqSX+bt2jfZHq=5yA@mail.gmail.com>","list_archive_url":null,"date":"2017-08-16T06:49:57","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":48628,"url":"http://patchwork.ozlabs.org/api/people/48628/","name":"Joel Stanley","email":"joel@jms.id.au"},"content":"On Tue, Aug 15, 2017 at 4:51 PM, Andrew Jeffery <andrew@aj.id.au> wrote:\n> In addition to the base, low and high clock configuration, the AC timing\n> register #1 on the AST2400 houses fields controlling:\n>\n> 1. tBUF: Minimum delay between Stop and Start conditions\n> 2. tHDSTA: Hold time for the Start condition\n> 3. tACST: Setup time for Start and Stop conditions, and hold time for the\n>    Repeated Start condition\n>\n> These values are defined in hardware on the AST2500 and therefore don't\n> need to be set.\n>\n> aspeed_i2c_init_clk() was performing a direct write of the generated\n> clock values rather than a read/mask/modify/update sequence to retain\n> tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST\n> fields on the AST2400. This resulted in a delay/setup/hold time of 1\n> base clock, which in some configurations is not enough for some devices\n> (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired\n> bus speed of 100kHz).\n>\n> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>\n> ---\n>  drivers/i2c/busses/i2c-aspeed.c | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c\n> index ee76e6dddc4b..284f8670dbeb 100644\n> --- a/drivers/i2c/busses/i2c-aspeed.c\n> +++ b/drivers/i2c/busses/i2c-aspeed.c\n> @@ -53,6 +53,9 @@\n>  #define ASPEED_I2CD_MASTER_EN                          BIT(0)\n>\n>  /* 0x04 : I2CD Clock and AC Timing Control Register #1 */\n> +#define ASPEED_I2CD_TIME_TBUF_MASK                     GENMASK(31, 28)\n> +#define ASPEED_I2CD_TIME_THDSTA_MASK                   GENMASK(27, 24)\n> +#define ASPEED_I2CD_TIME_TACST_MASK                    GENMASK(23, 20)\n>  #define ASPEED_I2CD_TIME_SCL_HIGH_SHIFT                        16\n>  #define ASPEED_I2CD_TIME_SCL_HIGH_MASK                 GENMASK(19, 16)\n>  #define ASPEED_I2CD_TIME_SCL_LOW_SHIFT                 12\n> @@ -744,7 +747,11 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus)\n>         u32 divisor, clk_reg_val;\n>\n>         divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);\n> -       clk_reg_val = bus->get_clk_reg_val(divisor);\n> +       clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);\n> +       clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |\n> +                       ASPEED_I2CD_TIME_THDSTA_MASK |\n> +                       ASPEED_I2CD_TIME_TACST_MASK);\n\nInstead of keeping the u-boot values (which appear to be hard-coded),\nshould we instead put the known working values in the register?\n\nCheers,\n\nJoel","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xXKjc0yN4z9sRg\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 16:50:28 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xXKjb6RLgzDqkb\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 16:50:27 +1000 (AEST)","from mail-lf0-x242.google.com (mail-lf0-x242.google.com\n\t[IPv6:2a00:1450:4010:c07::242])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xXKjT3xL3zDqZy;\n\tWed, 16 Aug 2017 16:50:21 +1000 (AEST)","by mail-lf0-x242.google.com with SMTP id w199so1873869lff.2;\n\tTue, 15 Aug 2017 23:50:21 -0700 (PDT)","by 10.25.72.77 with HTTP; Tue, 15 Aug 2017 23:49:57 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"nlNdghwF\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"nlNdghwF\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=gmail.com header.i=@gmail.com\n\theader.b=\"nlNdghwF\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:sender:in-reply-to:references:from:date:message-id\n\t:subject:to:cc;\n\tbh=l+q+WkswTBF8Uiz+ilqlN7zWUzttWKRnK7mHBoIgP6Y=;\n\tb=nlNdghwFAUcNCDCe1cJO/y96SR9bc3zMXg784mMBPMcQElzRqO8Qj7exlSpbLx27jb\n\tg1fizAb7eJAinv4rYC4iEXsUVVZ/pIoEBH6cX+tCEZ7uJNOGOnI09auwQifnsTlN0n/l\n\tAH2lj44+MoUZiZyBbKh80tqR+6w8pNZ1Rze+EfCOBksJiKSok4s2JLmWD5tTaof3mrjW\n\t7dRfdnz0vnQ7VIJdh6gJH2dX3QRE7I83vyLl5NF+zSg7clXCQFyNdojQy3W5xZTLBkRR\n\tWAgcBp9Oo/9qosMflEwqJl8cpnlfe8sbjSn5V4fHyLBjRuXX2Jhlhhue/g0ZXy/xy0lV\n\t14kw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:sender:in-reply-to:references:from\n\t:date:message-id:subject:to:cc;\n\tbh=l+q+WkswTBF8Uiz+ilqlN7zWUzttWKRnK7mHBoIgP6Y=;\n\tb=t4frhMD01wFxuy7OCB80ieKi5sVMETpkYo0B9mQ1P4VlqUg83RqSe1Q3IYSSpbwxVb\n\tFzJGjYlkMocQJ/I+A9UN0pH4jf0vberD0DxUF4NLopuKE7ZqC5vmE8Z55ColLCWOiCe1\n\tee9H1vGWqIQiQnYMKnFFlx0jhVSlYgnJsY2aChT8CbwQUTTYsMGUPFzaYV1euXaZhWGk\n\tJ1kIQ49fRjCVLNAE+ssQLu6SKZJZXbbko9976Bnn/bugD8G1TAfAz5HAncn2ikyHRGsq\n\tdDGrLGRJX2IBE8lCrD2CpYl29nhCpf42DOES8+k381GVjzCP0vFvhHAUdgAj84bu7STf\n\tECiQ==","X-Gm-Message-State":"AHYfb5jx2yh4j4VXdQX1Njne3ZLBIFmFff3iqzbTabd7192/aZUHX/BF\n\tcqacyhesMeHGTfodydZmEIK+mJHGVQ==","X-Received":"by 10.25.235.18 with SMTP id j18mr260934lfh.257.1502866217923;\n\tTue, 15 Aug 2017 23:50:17 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170815072102.23067-1-andrew@aj.id.au>","References":"<20170815072102.23067-1-andrew@aj.id.au>","From":"Joel Stanley <joel@jms.id.au>","Date":"Wed, 16 Aug 2017 16:19:57 +0930","X-Google-Sender-Auth":"AQ8qr6ETJz1vQ4gT11ELm8aFiuw","Message-ID":"<CACPK8XeNDxo14KRsAqo3a0Rs26h-1vRsLyqSX+bt2jfZHq=5yA@mail.gmail.com>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","To":"Andrew Jeffery <andrew@aj.id.au>","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Ryan Chen <ryan_chen@aspeedtech.com>, linux-aspeed@lists.ozlabs.org,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tOpenBMC Maillist <openbmc@lists.ozlabs.org>, \n\tBrendan Higgins <brendanhiggins@google.com>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tlinux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1748140,"web_url":"http://patchwork.ozlabs.org/comment/1748140/","msgid":"<1502866778.4493.84.camel@kernel.crashing.org>","list_archive_url":null,"date":"2017-08-16T06:59:38","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":38,"url":"http://patchwork.ozlabs.org/api/people/38/","name":"Benjamin Herrenschmidt","email":"benh@kernel.crashing.org"},"content":"On Wed, 2017-08-16 at 08:53 +0200, Cédric Le Goater wrote:\n> > >          divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);\n> > > -       clk_reg_val = bus->get_clk_reg_val(divisor);\n> > > +       clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);\n> > > +       clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |\n> > > +                       ASPEED_I2CD_TIME_THDSTA_MASK |\n> > > +                       ASPEED_I2CD_TIME_TACST_MASK);\n> > \n> > Instead of keeping the u-boot values (which appear to be hard-coded),\n> > should we instead put the known working values in the register?\n> \n> Yes. I was wondering where the initial setting was from on the AST400.\n\nWell, the AST2500 hard codes them in HW, so it makes some amount of\nsense to use whatever aspeed platform.S hard codes in u-boot for the\n2400. The values look reasonably sane.\n\nIf we ever see a need to change them, we can add DT props etc... but\nfor now I'd just not bother.\n\nThe way it is now, at least, if I have problems, I can tweak the values\nwith devmem and try again without the driver overwriting them :-)\n\nCheers,\nBen.","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xXKxN0MVkz9sRg\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 17:00:40 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xXKxM6MCmzDqkv\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 17:00:39 +1000 (AEST)","from gate.crashing.org (gate.crashing.org [63.228.1.57])\n\t(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xXKxB1XHLzDqgB;\n\tWed, 16 Aug 2017 17:00:29 +1000 (AEST)","from localhost.localdomain (localhost.localdomain [127.0.0.1])\n\tby gate.crashing.org (8.14.1/8.13.8) with ESMTP id v7G6xcBb030592;\n\tWed, 16 Aug 2017 01:59:40 -0500"],"Message-ID":"<1502866778.4493.84.camel@kernel.crashing.org>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","From":"Benjamin Herrenschmidt <benh@kernel.crashing.org>","To":"=?ISO-8859-1?Q?C=E9dric?= Le Goater <clg@kaod.org>, Joel Stanley\n\t<joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>","Date":"Wed, 16 Aug 2017 16:59:38 +1000","In-Reply-To":"<247768a3-074f-70ad-6132-39d1443ce210@kaod.org>","References":"<20170815072102.23067-1-andrew@aj.id.au>\n\t<CACPK8XeNDxo14KRsAqo3a0Rs26h-1vRsLyqSX+bt2jfZHq=5yA@mail.gmail.com>\n\t<247768a3-074f-70ad-6132-39d1443ce210@kaod.org>","Content-Type":"text/plain; charset=\"UTF-8\"","X-Mailer":"Evolution 3.24.4 (3.24.4-1.fc26) ","Mime-Version":"1.0","Content-Transfer-Encoding":"8bit","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Ryan Chen <ryan_chen@aspeedtech.com>, linux-aspeed@lists.ozlabs.org,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tOpenBMC Maillist <openbmc@lists.ozlabs.org>, \n\tBrendan Higgins <brendanhiggins@google.com>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tlinux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1748150,"web_url":"http://patchwork.ozlabs.org/comment/1748150/","msgid":"<7d2aa1d5-f3c7-4581-f7e8-36b1f9d4d80d@kaod.org>","list_archive_url":null,"date":"2017-08-16T07:15:39","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":68548,"url":"http://patchwork.ozlabs.org/api/people/68548/","name":"Cédric Le Goater","email":"clg@kaod.org"},"content":"On 08/16/2017 08:59 AM, Benjamin Herrenschmidt wrote:\n> On Wed, 2017-08-16 at 08:53 +0200, Cédric Le Goater wrote:\n>>>>          divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);\n>>>> -       clk_reg_val = bus->get_clk_reg_val(divisor);\n>>>> +       clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);\n>>>> +       clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |\n>>>> +                       ASPEED_I2CD_TIME_THDSTA_MASK |\n>>>> +                       ASPEED_I2CD_TIME_TACST_MASK);\n>>>\n>>> Instead of keeping the u-boot values (which appear to be hard-coded),\n>>> should we instead put the known working values in the register?\n>>\n>> Yes. I was wondering where the initial setting was from on the AST400.\n> \n> Well, the AST2500 hard codes them in HW, so it makes some amount of\n> sense to use whatever aspeed platform.S hard codes in u-boot for the\n> 2400. The values look reasonably sane.\n> \n> If we ever see a need to change them, we can add DT props etc... but\n> for now I'd just not bother.\n> \n> The way it is now, at least, if I have problems, I can tweak the values\n> with devmem and try again without the driver overwriting them :-)\n\nah yes. that is useful I agree. \n\nC.","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xXLSJ3dRHz9sNn\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 17:24:00 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xXLSJ2ps2zDr9H\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 17:24:00 +1000 (AEST)","from 16.mo3.mail-out.ovh.net (16.mo3.mail-out.ovh.net\n\t[188.165.56.217])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xXLSC0hHVzDqh0\n\tfor <openbmc@lists.ozlabs.org>; Wed, 16 Aug 2017 17:23:54 +1000 (AEST)","from player758.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo3.mail-out.ovh.net (Postfix) with ESMTP id 48B3A12B826\n\tfor <openbmc@lists.ozlabs.org>; Wed, 16 Aug 2017 09:15:50 +0200 (CEST)","from zorba.kaod.org (i15-les03-th2-31-37-69-229.sfr.lns.abo.bbox.fr\n\t[31.37.69.229]) (Authenticated sender: postmaster@kaod.org)\n\tby player758.ha.ovh.net (Postfix) with ESMTPSA id C0B622C007F;\n\tWed, 16 Aug 2017 09:15:39 +0200 (CEST)"],"X-Greylist":"delayed 895 seconds by postgrey-1.36 at bilbo;\n\tWed, 16 Aug 2017 17:23:55 AEST","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","To":"Benjamin Herrenschmidt <benh@kernel.crashing.org>,\n\tJoel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>","References":"<20170815072102.23067-1-andrew@aj.id.au>\n\t<CACPK8XeNDxo14KRsAqo3a0Rs26h-1vRsLyqSX+bt2jfZHq=5yA@mail.gmail.com>\n\t<247768a3-074f-70ad-6132-39d1443ce210@kaod.org>\n\t<1502866778.4493.84.camel@kernel.crashing.org>","From":"=?UTF-8?Q?C=c3=a9dric_Le_Goater?= <clg@kaod.org>","Message-ID":"<7d2aa1d5-f3c7-4581-f7e8-36b1f9d4d80d@kaod.org>","Date":"Wed, 16 Aug 2017 09:15:39 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<1502866778.4493.84.camel@kernel.crashing.org>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"8bit","X-Ovh-Tracer-Id":"17376576213290879988","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelkedrleekgdduvdekucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Ryan Chen <ryan_chen@aspeedtech.com>, linux-aspeed@lists.ozlabs.org,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tOpenBMC Maillist <openbmc@lists.ozlabs.org>, \n\tBrendan Higgins <brendanhiggins@google.com>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tlinux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1748531,"web_url":"http://patchwork.ozlabs.org/comment/1748531/","msgid":"<247768a3-074f-70ad-6132-39d1443ce210@kaod.org>","list_archive_url":null,"date":"2017-08-16T06:53:30","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":68548,"url":"http://patchwork.ozlabs.org/api/people/68548/","name":"Cédric Le Goater","email":"clg@kaod.org"},"content":"On 08/16/2017 08:49 AM, Joel Stanley wrote:\n> On Tue, Aug 15, 2017 at 4:51 PM, Andrew Jeffery <andrew@aj.id.au> wrote:\n>> In addition to the base, low and high clock configuration, the AC timing\n>> register #1 on the AST2400 houses fields controlling:\n>>\n>> 1. tBUF: Minimum delay between Stop and Start conditions\n>> 2. tHDSTA: Hold time for the Start condition\n>> 3. tACST: Setup time for Start and Stop conditions, and hold time for the\n>>    Repeated Start condition\n>>\n>> These values are defined in hardware on the AST2500 and therefore don't\n>> need to be set.\n>>\n>> aspeed_i2c_init_clk() was performing a direct write of the generated\n>> clock values rather than a read/mask/modify/update sequence to retain\n>> tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST\n>> fields on the AST2400. This resulted in a delay/setup/hold time of 1\n>> base clock, which in some configurations is not enough for some devices\n>> (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired\n>> bus speed of 100kHz).\n>>\n>> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>\n>> ---\n>>  drivers/i2c/busses/i2c-aspeed.c | 9 ++++++++-\n>>  1 file changed, 8 insertions(+), 1 deletion(-)\n>>\n>> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c\n>> index ee76e6dddc4b..284f8670dbeb 100644\n>> --- a/drivers/i2c/busses/i2c-aspeed.c\n>> +++ b/drivers/i2c/busses/i2c-aspeed.c\n>> @@ -53,6 +53,9 @@\n>>  #define ASPEED_I2CD_MASTER_EN                          BIT(0)\n>>\n>>  /* 0x04 : I2CD Clock and AC Timing Control Register #1 */\n>> +#define ASPEED_I2CD_TIME_TBUF_MASK                     GENMASK(31, 28)\n>> +#define ASPEED_I2CD_TIME_THDSTA_MASK                   GENMASK(27, 24)\n>> +#define ASPEED_I2CD_TIME_TACST_MASK                    GENMASK(23, 20)\n>>  #define ASPEED_I2CD_TIME_SCL_HIGH_SHIFT                        16\n>>  #define ASPEED_I2CD_TIME_SCL_HIGH_MASK                 GENMASK(19, 16)\n>>  #define ASPEED_I2CD_TIME_SCL_LOW_SHIFT                 12\n>> @@ -744,7 +747,11 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus)\n>>         u32 divisor, clk_reg_val;\n>>\n>>         divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);\n>> -       clk_reg_val = bus->get_clk_reg_val(divisor);\n>> +       clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);\n>> +       clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |\n>> +                       ASPEED_I2CD_TIME_THDSTA_MASK |\n>> +                       ASPEED_I2CD_TIME_TACST_MASK);\n> \n> Instead of keeping the u-boot values (which appear to be hard-coded),\n> should we instead put the known working values in the register?\n\nYes. I was wondering where the initial setting was from on the AST400.\n\nC.","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xXWDD1M0kz9rvt\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 23:59:08 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xXWDD0SW8zDrKQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 16 Aug 2017 23:59:08 +1000 (AEST)","from 13.mo3.mail-out.ovh.net (13.mo3.mail-out.ovh.net\n\t[188.165.33.202])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xXWD15GQjzDrK6\n\tfor <openbmc@lists.ozlabs.org>; Wed, 16 Aug 2017 23:58:57 +1000 (AEST)","from player758.ha.ovh.net (b6.ovh.net [213.186.33.56])\n\tby mo3.mail-out.ovh.net (Postfix) with ESMTP id B347F12B788\n\tfor <openbmc@lists.ozlabs.org>; Wed, 16 Aug 2017 08:53:43 +0200 (CEST)","from zorba.kaod.org (i15-les03-th2-31-37-69-229.sfr.lns.abo.bbox.fr\n\t[31.37.69.229]) (Authenticated sender: postmaster@kaod.org)\n\tby player758.ha.ovh.net (Postfix) with ESMTPSA id 025802C008E;\n\tWed, 16 Aug 2017 08:53:30 +0200 (CEST)"],"X-Greylist":"delayed 8399 seconds by postgrey-1.36 at bilbo;\n\tWed, 16 Aug 2017 23:58:57 AEST","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","To":"Joel Stanley <joel@jms.id.au>, Andrew Jeffery <andrew@aj.id.au>","References":"<20170815072102.23067-1-andrew@aj.id.au>\n\t<CACPK8XeNDxo14KRsAqo3a0Rs26h-1vRsLyqSX+bt2jfZHq=5yA@mail.gmail.com>","From":"=?UTF-8?Q?C=c3=a9dric_Le_Goater?= <clg@kaod.org>","Message-ID":"<247768a3-074f-70ad-6132-39d1443ce210@kaod.org>","Date":"Wed, 16 Aug 2017 08:53:30 +0200","User-Agent":"Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101\n\tThunderbird/52.2.1","MIME-Version":"1.0","In-Reply-To":"<CACPK8XeNDxo14KRsAqo3a0Rs26h-1vRsLyqSX+bt2jfZHq=5yA@mail.gmail.com>","Content-Type":"text/plain; charset=utf-8","Content-Language":"en-US","Content-Transfer-Encoding":"7bit","X-Ovh-Tracer-Id":"17003058922318826484","X-VR-SPAMSTATE":"OK","X-VR-SPAMSCORE":"-100","X-VR-SPAMCAUSE":"gggruggvucftvghtrhhoucdtuddrfeelkedrleekgdduvdefucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuqfggjfdpvefjgfevmfevgfenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddm","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Ryan Chen <ryan_chen@aspeedtech.com>, linux-aspeed@lists.ozlabs.org,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tOpenBMC Maillist <openbmc@lists.ozlabs.org>, \n\tBrendan Higgins <brendanhiggins@google.com>,\n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tlinux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1755746,"web_url":"http://patchwork.ozlabs.org/comment/1755746/","msgid":"<CAFd5g46ZtSxY2MfCLEUArbByFUTDHFp3HRAg6YDJ8oYf42G3OA@mail.gmail.com>","list_archive_url":null,"date":"2017-08-24T00:19:59","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":69647,"url":"http://patchwork.ozlabs.org/api/people/69647/","name":"Brendan Higgins","email":"brendanhiggins@google.com"},"content":"On Tue, Aug 15, 2017 at 12:21 AM, Andrew Jeffery <andrew@aj.id.au> wrote:\n> In addition to the base, low and high clock configuration, the AC timing\n> register #1 on the AST2400 houses fields controlling:\n>\n> 1. tBUF: Minimum delay between Stop and Start conditions\n> 2. tHDSTA: Hold time for the Start condition\n> 3. tACST: Setup time for Start and Stop conditions, and hold time for the\n>    Repeated Start condition\n>\n> These values are defined in hardware on the AST2500 and therefore don't\n> need to be set.\n>\n> aspeed_i2c_init_clk() was performing a direct write of the generated\n> clock values rather than a read/mask/modify/update sequence to retain\n> tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST\n> fields on the AST2400. This resulted in a delay/setup/hold time of 1\n> base clock, which in some configurations is not enough for some devices\n> (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired\n> bus speed of 100kHz).\n>\n> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>\n> ---\n>  drivers/i2c/busses/i2c-aspeed.c | 9 ++++++++-\n>  1 file changed, 8 insertions(+), 1 deletion(-)\n>\n> diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c\n> index ee76e6dddc4b..284f8670dbeb 100644\n> --- a/drivers/i2c/busses/i2c-aspeed.c\n> +++ b/drivers/i2c/busses/i2c-aspeed.c\n> @@ -53,6 +53,9 @@\n>  #define ASPEED_I2CD_MASTER_EN                          BIT(0)\n>\n>  /* 0x04 : I2CD Clock and AC Timing Control Register #1 */\n> +#define ASPEED_I2CD_TIME_TBUF_MASK                     GENMASK(31, 28)\n> +#define ASPEED_I2CD_TIME_THDSTA_MASK                   GENMASK(27, 24)\n> +#define ASPEED_I2CD_TIME_TACST_MASK                    GENMASK(23, 20)\n>  #define ASPEED_I2CD_TIME_SCL_HIGH_SHIFT                        16\n>  #define ASPEED_I2CD_TIME_SCL_HIGH_MASK                 GENMASK(19, 16)\n>  #define ASPEED_I2CD_TIME_SCL_LOW_SHIFT                 12\n> @@ -744,7 +747,11 @@ static int aspeed_i2c_init_clk(struct aspeed_i2c_bus *bus)\n>         u32 divisor, clk_reg_val;\n>\n>         divisor = DIV_ROUND_UP(bus->parent_clk_frequency, bus->bus_frequency);\n> -       clk_reg_val = bus->get_clk_reg_val(divisor);\n> +       clk_reg_val = readl(bus->base + ASPEED_I2C_AC_TIMING_REG1);\n> +       clk_reg_val &= (ASPEED_I2CD_TIME_TBUF_MASK |\n> +                       ASPEED_I2CD_TIME_THDSTA_MASK |\n> +                       ASPEED_I2CD_TIME_TACST_MASK);\n> +       clk_reg_val |= bus->get_clk_reg_val(divisor);\n>         writel(clk_reg_val, bus->base + ASPEED_I2C_AC_TIMING_REG1);\n>         writel(ASPEED_NO_TIMEOUT_CTRL, bus->base + ASPEED_I2C_AC_TIMING_REG2);\n>\n> --\n> 2.11.0\n>\n\nSorry for the delay.\n\nWe tried this out and it fixes a problem similar to the one you described.\n\nThanks again!\n\nReviewed-by: Brendan Higgins <brendanhiggins@google.com>\nTested-by: Brendan Higgins <brendanhiggins@google.com>","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xd4gb62V2z9t34\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 10:20:11 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xd4gb1zKbzDrKC\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 24 Aug 2017 10:20:11 +1000 (AEST)","from mail-qt0-x22c.google.com (mail-qt0-x22c.google.com\n\t[IPv6:2607:f8b0:400d:c0d::22c])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128\n\tbits)) (No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xd4gQ4mDzzDrJr\n\tfor <openbmc@lists.ozlabs.org>; Thu, 24 Aug 2017 10:20:02 +1000 (AEST)","by mail-qt0-x22c.google.com with SMTP id p13so2813532qtp.5\n\tfor <openbmc@lists.ozlabs.org>; Wed, 23 Aug 2017 17:20:02 -0700 (PDT)","by 10.140.29.181 with HTTP; Wed, 23 Aug 2017 17:19:59 -0700 (PDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"PBLOgX7o\"; dkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"PBLOgX7o\"; dkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"PBLOgX7o\"; dkim-atps=neutral"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=ddC/UspMPjCr7vqzTXrsSr/IkMUjrGf/HBubYZMCf/o=;\n\tb=PBLOgX7o0+H9oYhm3bJm3ut0LC3asRPz4LWRzKuyDdZqZPDUG9Itjro9fT673n7PQC\n\ttujN408Vcfx7d5J3mYODOfP9sC73EV+IZJEoRV6D3TuKAb/D+AWGNBc4ZuqxpZzXiMA/\n\t7Y5iZLfrwunMsI7aPe88Kvp3rMiy8CRZmieZNvji7EclXVPTkdkaZub7V5RbfZiLCzul\n\tnTVps8pQupxlG+33LLxCDqsHme3bzF4vN0ZrOPpHANirFU45EyVAi+FdwiN7XCsoiICF\n\tLcdk3inK/CExZXzj7SUXM9Gzo8a9flCaUXbq/rd25lR1MbtJxEtxe8O/cIkUyWQbhw+0\n\tyUYQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:mime-version:in-reply-to:references:from:date\n\t:message-id:subject:to:cc;\n\tbh=ddC/UspMPjCr7vqzTXrsSr/IkMUjrGf/HBubYZMCf/o=;\n\tb=aHGoTs55xLzzS3yAlK6/uyAlUg6qLiLYKtNPDMxqROfxampXHRm0+A55D06dkzn5Dj\n\tevzeVJMqS2tTUwIbh/aeDdAv/WTOevkSNyJf4iOhhqrNTg8c9wrx4wqPR0zGGyC4CBde\n\t5hKqx8T/jwRsx7JveQrM5rv8HJLTU0VvUs4hrzomfMPbQdtVJMh0qUjNcIdXUI7+U1DJ\n\tIl93xni/m2Fu+NPbjjJyE0pbx+wk63J3JClRkfoOqD4rDC80UoK/s3Au4dnyZnwZHgEp\n\tPReoJMt7MYo/QXslb95fhlfEZF7roFFdDJgQSjrGr9wxInwFDt7KEWMi1HSsF1Bwx5RT\n\txtjg==","X-Gm-Message-State":"AHYfb5if7jFW0C4baGTCGvV7/PphrF70mKX+aP7jUN71WWTOhYtge+bM\n\t5Z2WodVqjm00W69byumtKt4nVwxkNaaZ","X-Google-Smtp-Source":"ADKCNb5O3iccHaXWXVw0j6+IE2ru/uky6B6s0SylLRiB4fnJf6QgZdI6ahUFn+nVsKPhPLuNa3xo+Zfk47tDpW0K1Cs=","X-Received":"by 10.200.34.195 with SMTP id g3mr6015961qta.4.1503533999599;\n\tWed, 23 Aug 2017 17:19:59 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<20170815072102.23067-1-andrew@aj.id.au>","References":"<20170815072102.23067-1-andrew@aj.id.au>","From":"Brendan Higgins <brendanhiggins@google.com>","Date":"Wed, 23 Aug 2017 17:19:59 -0700","Message-ID":"<CAFd5g46ZtSxY2MfCLEUArbByFUTDHFp3HRAg6YDJ8oYf42G3OA@mail.gmail.com>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","To":"Andrew Jeffery <andrew@aj.id.au>","Content-Type":"text/plain; charset=\"UTF-8\"","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"Ryan Chen <ryan_chen@aspeedtech.com>, linux-aspeed@lists.ozlabs.org,\n\tWolfram Sang <wsa@the-dreams.de>,\n\tOpenBMC Maillist <openbmc@lists.ozlabs.org>, \n\tLinux Kernel Mailing List <linux-kernel@vger.kernel.org>,\n\tlinux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1758675,"web_url":"http://patchwork.ozlabs.org/comment/1758675/","msgid":"<20170828160702.x45hagij4kkm5zzc@ninjato>","list_archive_url":null,"date":"2017-08-28T16:07:02","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":22495,"url":"http://patchwork.ozlabs.org/api/people/22495/","name":"Wolfram Sang","email":"wsa@the-dreams.de"},"content":"On Tue, Aug 15, 2017 at 04:51:02PM +0930, Andrew Jeffery wrote:\n> In addition to the base, low and high clock configuration, the AC timing\n> register #1 on the AST2400 houses fields controlling:\n> \n> 1. tBUF: Minimum delay between Stop and Start conditions\n> 2. tHDSTA: Hold time for the Start condition\n> 3. tACST: Setup time for Start and Stop conditions, and hold time for the\n>    Repeated Start condition\n> \n> These values are defined in hardware on the AST2500 and therefore don't\n> need to be set.\n> \n> aspeed_i2c_init_clk() was performing a direct write of the generated\n> clock values rather than a read/mask/modify/update sequence to retain\n> tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST\n> fields on the AST2400. This resulted in a delay/setup/hold time of 1\n> base clock, which in some configurations is not enough for some devices\n> (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired\n> bus speed of 100kHz).\n> \n> Signed-off-by: Andrew Jeffery <andrew@aj.id.au>\n\nApplied to for-next, thanks! I even considered for-current but it does\nnot apply there. So, I leave the backporting for the interested parties\n:)","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xgxVT07y0z9sRm\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 02:07:13 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xgxVS5dLHzDqF4\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 02:07:12 +1000 (AEST)","from pokefinder.org (sauhun.de [88.99.104.3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xgxVJ12NxzDq5m\n\tfor <openbmc@lists.ozlabs.org>; Tue, 29 Aug 2017 02:07:04 +1000 (AEST)","from localhost (p54B33072.dip0.t-ipconnect.de [84.179.48.114])\n\tby pokefinder.org (Postfix) with ESMTPSA id 770632C3704;\n\tMon, 28 Aug 2017 18:07:02 +0200 (CEST)"],"Date":"Mon, 28 Aug 2017 18:07:02 +0200","From":"Wolfram Sang <wsa@the-dreams.de>","To":"Andrew Jeffery <andrew@aj.id.au>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","Message-ID":"<20170828160702.x45hagij4kkm5zzc@ninjato>","References":"<20170815072102.23067-1-andrew@aj.id.au>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"2bsylw4bkiptnjz5\"","Content-Disposition":"inline","In-Reply-To":"<20170815072102.23067-1-andrew@aj.id.au>","User-Agent":"NeoMutt/20170113 (1.7.2)","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org,\n\topenbmc@lists.ozlabs.org, brendanhiggins@google.com,\n\tlinux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1759068,"web_url":"http://patchwork.ozlabs.org/comment/1759068/","msgid":"<1503989809.5933.5.camel@aj.id.au>","list_archive_url":null,"date":"2017-08-29T06:56:49","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":68332,"url":"http://patchwork.ozlabs.org/api/people/68332/","name":"Andrew Jeffery","email":"andrew@aj.id.au"},"content":"On Mon, 2017-08-28 at 18:07 +0200, Wolfram Sang wrote:\n> On Tue, Aug 15, 2017 at 04:51:02PM +0930, Andrew Jeffery wrote:\n> > In addition to the base, low and high clock configuration, the AC timing\n> > register #1 on the AST2400 houses fields controlling:\n> > \n> > 1. tBUF: Minimum delay between Stop and Start conditions\n> > 2. tHDSTA: Hold time for the Start condition\n> > 3. tACST: Setup time for Start and Stop conditions, and hold time for the\n> >    Repeated Start condition\n> > \n> > These values are defined in hardware on the AST2500 and therefore don't\n> > need to be set.\n> > \n> > aspeed_i2c_init_clk() was performing a direct write of the generated\n> > clock values rather than a read/mask/modify/update sequence to retain\n> > tBUF, tHDSTA and tACST, and therefore cleared the tBUF, tHDSTA and tACST\n> > fields on the AST2400. This resulted in a delay/setup/hold time of 1\n> > base clock, which in some configurations is not enough for some devices\n> > (e.g. the MAX31785 fan controller, with an APB of 48MHz and a desired\n> > bus speed of 100kHz).\n> > \n> > Signed-off-by: Andrew Jeffery <andrew@aj.id.au>\n> \n> Applied to for-next, thanks! \n\nThanks!\n\n> I even considered for-current but it does\n> not apply there. So, I leave the backporting for the interested parties\n> :)\n> \n\nIt depends on Brendan's clock divisor calculation fix, which appears to\nbe in for-next but not for-current:\n\n    87b59ff8d1d9 i2c: aspeed: add proper support fo 24xx clock params\n\nI'd argue that Brendan's patch should go in for-current as well,\nbecause it fixes a divisor rounding error for the ast2500 (bus is\nclocked faster than requested).\n\nCheers,\n\nAndrew","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhKFP2dbSz9t3B\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 16:57:13 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhKFP0nXHzDqVg\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 16:57:13 +1000 (AEST)","from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n\t[66.111.4.26])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xhKF90Z4JzDqR9;\n\tTue, 29 Aug 2017 16:57:00 +1000 (AEST)","from compute4.internal (compute4.nyi.internal [10.202.2.44])\n\tby mailout.nyi.internal (Postfix) with ESMTP id BB3CE20E15;\n\tTue, 29 Aug 2017 02:56:58 -0400 (EDT)","from frontend2 ([10.202.2.161])\n\tby compute4.internal (MEProxy); Tue, 29 Aug 2017 02:56:58 -0400","from keelia (ppp118-210-176-216.bras2.adl6.internode.on.net\n\t[118.210.176.216])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 2F5572418B;\n\tTue, 29 Aug 2017 02:56:54 -0400 (EDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=aj.id.au header.i=@aj.id.au header.b=\"jAMoCs1E\";\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"kxGzu92r\"; \n\tdkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=aj.id.au header.i=@aj.id.au header.b=\"jAMoCs1E\";\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"kxGzu92r\"; \n\tdkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=aj.id.au header.i=@aj.id.au header.b=\"jAMoCs1E\";\n\tdkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com\n\theader.b=\"kxGzu92r\"; dkim-atps=neutral"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc\n\t:content-type:date:from:in-reply-to:message-id:mime-version\n\t:references:subject:to:x-me-sender:x-me-sender:x-sasl-enc\n\t:x-sasl-enc; s=fm1; bh=/GvQ3kLLuzHCW/5WdWDKUk9vOoaKpcCkT63tqRpIB\n\tic=; b=jAMoCs1E07wXyvMa9do7O8YkqtZ70fu5ivvtz355CenuXqi/yOZluwtA9\n\t36q7RL30reZxVwgdKKZY2EfL+T4HMKaeAzLg7l7B1zrW4I1UCc9Hb/jrYZHCi9zq\n\tH5Up3WuFv7eOmsrVe7BGOar6iENsaqBvsjW73aC127JTWmLhlADmBor03+aExenl\n\tBoluuYe+7dv5zILJhOvqpp17FLLT1I4Fz1iZ5shyXbInu/DcpZJnBc1z/wZ/V9r0\n\tI+1lI2wHVTsaWTDLB6PNpgumxq3/V9xKY8Kplv+EIPXKO5wMV3TVSTjLL8qyoqKG\n\tQzNbpdVR484RCIVjLNp207QpnlcCQ==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to:x-me-sender\n\t:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=/GvQ3kLLuzHCW/5WdW\n\tDKUk9vOoaKpcCkT63tqRpIBic=; b=kxGzu92rMAdCbgOROb2hKRHi4hOOrOoQZV\n\tkyLwksK7g7H13XskRsR+f+4KpwGdkXe2y37vNGtsU1gmmgt5wrClQ8JvIHZmZjvZ\n\tQQyZZQKxBKPHx9/729g+skADoYs82+6XgztiZdo3ck6LYeCUvbhRvtFMG376E1Aq\n\tzJdQVUgpK1NPlczbTbGP7vbwwZfrzSeWLu9SOavCBZLU4Uz1sVvSLxE6nCIk56cK\n\t9RLo+jiYkZcYrVm6RXYTgo+qeoTB6vPb0Fgn6cM4K7pBJYKGfFV/ZBSGpXvQ4aQR\n\tay6jtUmsvXE1vvmMGjKrhnow2C4RGxGR6UJSOhC+YMEK/z4eP+qQ=="],"X-ME-Sender":"<xms:OhClWWXDs981kGDxdLwUzMuSZP1pWKvCLhoTI_C35LZJcCtQQp9pLg>","X-Sasl-enc":"ZJKIqS1Mqwvo6ZpeqC3NIBRM5NrjKqiyo1u4S/qUzVlm 1503989817","Message-ID":"<1503989809.5933.5.camel@aj.id.au>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","From":"Andrew Jeffery <andrew@aj.id.au>","To":"Wolfram Sang <wsa@the-dreams.de>","Date":"Tue, 29 Aug 2017 16:26:49 +0930","In-Reply-To":"<20170828160702.x45hagij4kkm5zzc@ninjato>","References":"<20170815072102.23067-1-andrew@aj.id.au>\n\t<20170828160702.x45hagij4kkm5zzc@ninjato>","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-5SFIj/aZuTWk4Ss2sI3E\"","X-Mailer":"Evolution 3.22.6-1ubuntu1 ","Mime-Version":"1.0","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org,\n\topenbmc@lists.ozlabs.org, brendanhiggins@google.com,\n\tlinux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1759138,"web_url":"http://patchwork.ozlabs.org/comment/1759138/","msgid":"<20170829084508.edybxf6zctgx4xwy@ninjato>","list_archive_url":null,"date":"2017-08-29T08:45:09","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":22495,"url":"http://patchwork.ozlabs.org/api/people/22495/","name":"Wolfram Sang","email":"wsa@the-dreams.de"},"content":"> I'd argue that Brendan's patch should go in for-current as well,\n> because it fixes a divisor rounding error for the ast2500 (bus is\n> clocked faster than requested).\n\nHmmm, pity, the description said \"potential\" issue so I decided for\nfor-next. However, I wouldn't like to reshuffle my branches much so\nshort before the merge window. So, would it be OK with you that you send\nboth patches to stable after rc1?","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhMhS6MQXz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 18:47:20 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhMhS5BsLzDqgQ\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 18:47:20 +1000 (AEST)","from pokefinder.org (sauhun.de [88.99.104.3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhMf10hlyzDqYG;\n\tTue, 29 Aug 2017 18:45:11 +1000 (AEST)","from localhost (p54B33289.dip0.t-ipconnect.de [84.179.50.137])\n\tby pokefinder.org (Postfix) with ESMTPSA id 6C4632C30DD;\n\tTue, 29 Aug 2017 10:45:09 +0200 (CEST)"],"Date":"Tue, 29 Aug 2017 10:45:09 +0200","From":"Wolfram Sang <wsa@the-dreams.de>","To":"Andrew Jeffery <andrew@aj.id.au>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","Message-ID":"<20170829084508.edybxf6zctgx4xwy@ninjato>","References":"<20170815072102.23067-1-andrew@aj.id.au>\n\t<20170828160702.x45hagij4kkm5zzc@ninjato>\n\t<1503989809.5933.5.camel@aj.id.au>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"kvm256seylhxblkl\"","Content-Disposition":"inline","In-Reply-To":"<1503989809.5933.5.camel@aj.id.au>","User-Agent":"NeoMutt/20170113 (1.7.2)","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org,\n\topenbmc@lists.ozlabs.org, brendanhiggins@google.com,\n\tlinux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}},{"id":1759140,"web_url":"http://patchwork.ozlabs.org/comment/1759140/","msgid":"<1503996389.5933.9.camel@aj.id.au>","list_archive_url":null,"date":"2017-08-29T08:46:29","subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","submitter":{"id":68332,"url":"http://patchwork.ozlabs.org/api/people/68332/","name":"Andrew Jeffery","email":"andrew@aj.id.au"},"content":"On Tue, 2017-08-29 at 10:45 +0200, Wolfram Sang wrote:\n> > I'd argue that Brendan's patch should go in for-current as well,\n> > because it fixes a divisor rounding error for the ast2500 (bus is\n> > clocked faster than requested).\n> \n> Hmmm, pity, the description said \"potential\" issue so I decided for\n> for-next. However, I wouldn't like to reshuffle my branches much so\n> short before the merge window. So, would it be OK with you that you send\n> both patches to stable after rc1?\n> \n\nWill do.\n\nCheers,\n\nAndrew","headers":{"Return-Path":"<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>","X-Original-To":["incoming@patchwork.ozlabs.org","openbmc@lists.ozlabs.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","openbmc@lists.ozlabs.org"],"Received":["from lists.ozlabs.org (lists.ozlabs.org [103.22.144.68])\n\t(using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits))\n\t(No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xhMj25cxgz9s4q\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 18:47:50 +1000 (AEST)","from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3])\n\tby lists.ozlabs.org (Postfix) with ESMTP id 3xhMj2499wzDqYs\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 18:47:50 +1000 (AEST)","from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com\n\t[66.111.4.26])\n\t(using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby lists.ozlabs.org (Postfix) with ESMTPS id 3xhMgf5GDrzDqYs;\n\tTue, 29 Aug 2017 18:46:38 +1000 (AEST)","from compute4.internal (compute4.nyi.internal [10.202.2.44])\n\tby mailout.nyi.internal (Postfix) with ESMTP id 2892B21385;\n\tTue, 29 Aug 2017 04:46:36 -0400 (EDT)","from frontend1 ([10.202.2.160])\n\tby compute4.internal (MEProxy); Tue, 29 Aug 2017 04:46:36 -0400","from keelia (ppp118-210-176-216.bras2.adl6.internode.on.net\n\t[118.210.176.216])\n\tby mail.messagingengine.com (Postfix) with ESMTPA id 84C737F9D2;\n\tTue, 29 Aug 2017 04:46:32 -0400 (EDT)"],"Authentication-Results":["ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=aj.id.au header.i=@aj.id.au header.b=\"Uwr/pT3h\";\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"ZUx1rmeT\"; \n\tdkim-atps=neutral","lists.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=aj.id.au header.i=@aj.id.au header.b=\"Uwr/pT3h\";\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com header.b=\"ZUx1rmeT\"; \n\tdkim-atps=neutral","lists.ozlabs.org; dkim=pass (2048-bit key;\n\tunprotected) header.d=aj.id.au header.i=@aj.id.au header.b=\"Uwr/pT3h\";\n\tdkim=pass (2048-bit key;\n\tunprotected) header.d=messagingengine.com\n\theader.i=@messagingengine.com\n\theader.b=\"ZUx1rmeT\"; dkim-atps=neutral"],"DKIM-Signature":["v=1; a=rsa-sha256; c=relaxed/relaxed; d=aj.id.au; h=cc\n\t:content-type:date:from:in-reply-to:message-id:mime-version\n\t:references:subject:to:x-me-sender:x-me-sender:x-sasl-enc\n\t:x-sasl-enc; s=fm1; bh=FN4MxpF4Kl50/esGRlE+XTdgA9zY/R1wdu5l4PLBA\n\tQs=; b=Uwr/pT3h7DjDUtJeKfwy6hO6Lm/nnB1xmsJffja9inbZTB/1ajus6URgS\n\tbWKuC9eCjFTWnw2uVtqYAIdkzYRrGF/T4Q09k6as1XmdbXzv82Uc3Av/V66dOAij\n\tMcWqJc4d4BVns1XAfY7EQeinqXGMbNthjAQQOlv7Uq66wMk7tK/6XMJ8q5JmWN1N\n\tI1DFIb2172ZBhHGzkwzIRfk97t6DmK47Mho5S6pu37oPaeQZLnPmLtBnF4h3xolC\n\txnjPenwOJeuKj80ZOkfgkaddDZeQJM2GQ8FmtMD8gI1473sYIGf9CsCHSYyHraVl\n\tVqcgoKcE6oM7rPxqBypU5JdBLf/uw==","v=1; a=rsa-sha256; c=relaxed/relaxed; d=\n\tmessagingengine.com; h=cc:content-type:date:from:in-reply-to\n\t:message-id:mime-version:references:subject:to:x-me-sender\n\t:x-me-sender:x-sasl-enc:x-sasl-enc; s=fm1; bh=FN4MxpF4Kl50/esGRl\n\tE+XTdgA9zY/R1wdu5l4PLBAQs=; b=ZUx1rmeTyjCeRPeswiH7tCwEl8cxxF4hGz\n\t8hzzeaM+ob8dIwfxNVDKotTKLnDd4RW1X8OzCO1yxi8hkkukbTzx7IFRs9IPWxpa\n\t5DQKNHHpS9+n2HJplUEAW+BGHv8ivZOICCv1WAobR/qLjXL3FuvmMrAQ+Hmq3/x2\n\tqp8bxQvU9RxiZ4mjVWUmai68CW0iC8ZmqsKviXSgoRzPdKLOjm66bHFfUpOZwU17\n\tBiz/uwoDKjOraU5G47dxgdNnEs/AITQZziRv7OeTiSDs+ijYpvw/5vVRW36QHDmx\n\tDsMRvA4C6kcB0h1pTS+hJVqB62Oa3RKFsJBnBI9p0EQai74kZdww=="],"X-ME-Sender":"<xms:7CmlWRdzcBOmetiBYtfGJoENptNjbfNS0dxRea3zTQskq_58rmy3xQ>","X-Sasl-enc":"/vtYPGuNCORVGljNroSOhtyKXQAMJ/dBtztN7WHZM7f2 1503996395","Message-ID":"<1503996389.5933.9.camel@aj.id.au>","Subject":"Re: [PATCH] i2c: aspeed: Retain delay/setup/hold values when\n\tconfiguring bus frequency","From":"Andrew Jeffery <andrew@aj.id.au>","To":"Wolfram Sang <wsa@the-dreams.de>","Date":"Tue, 29 Aug 2017 18:16:29 +0930","In-Reply-To":"<20170829084508.edybxf6zctgx4xwy@ninjato>","References":"<20170815072102.23067-1-andrew@aj.id.au>\n\t<20170828160702.x45hagij4kkm5zzc@ninjato>\n\t<1503989809.5933.5.camel@aj.id.au>\n\t<20170829084508.edybxf6zctgx4xwy@ninjato>","Content-Type":"multipart/signed; micalg=\"pgp-sha512\";\n\tprotocol=\"application/pgp-signature\";\n\tboundary=\"=-atHR4LNRxbeydv6T7sas\"","X-Mailer":"Evolution 3.22.6-1ubuntu1 ","Mime-Version":"1.0","X-BeenThere":"openbmc@lists.ozlabs.org","X-Mailman-Version":"2.1.23","Precedence":"list","List-Id":"Development list for OpenBMC <openbmc.lists.ozlabs.org>","List-Unsubscribe":"<https://lists.ozlabs.org/options/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=unsubscribe>","List-Archive":"<http://lists.ozlabs.org/pipermail/openbmc/>","List-Post":"<mailto:openbmc@lists.ozlabs.org>","List-Help":"<mailto:openbmc-request@lists.ozlabs.org?subject=help>","List-Subscribe":"<https://lists.ozlabs.org/listinfo/openbmc>,\n\t<mailto:openbmc-request@lists.ozlabs.org?subject=subscribe>","Cc":"ryan_chen@aspeedtech.com, linux-aspeed@lists.ozlabs.org,\n\topenbmc@lists.ozlabs.org, brendanhiggins@google.com,\n\tlinux-kernel@vger.kernel.org, linux-i2c@vger.kernel.org","Errors-To":"openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org","Sender":"\"openbmc\"\n\t<openbmc-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org>"}}]