[{"id":1758690,"web_url":"http://patchwork.ozlabs.org/comment/1758690/","msgid":"<CAOMZO5C-wFyd9abSiNZW7662Z6kR4W023a+exm+Jykj4=MM+VQ@mail.gmail.com>","list_archive_url":null,"date":"2017-08-28T16:22:19","subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","submitter":{"id":6978,"url":"http://patchwork.ozlabs.org/api/people/6978/","name":"Fabio Estevam","email":"festevam@gmail.com"},"content":"Hi Anatolij,\n\nOn Fri, Aug 25, 2017 at 10:10 AM, Anatolij Gustschin <agust@denx.de> wrote:\n\n>  void ipuv3_fb_shutdown(void)\n>  {\n> -       int i;\n> +       struct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;\n>         struct ipu_stat *stat = (struct ipu_stat *)IPU_STAT;\n> +       u32 reg;\n> +       int i;\n> +\n> +       /*\n> +        * Check if IPU clock was enabled before. Won't access\n> +        * IPU registers if clock is not enabled.\n> +        */\n> +       reg = readl(&mxc_ccm->CCGR3);\n> +       if ((reg & MXC_CCM_CCGR3_IPU1_IPU_MASK) == 0)\n> +               return;\n\nMaybe you could also check whether IPU2 has been enabled?","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","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=\"EiWs8OCf\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgxr66Fprz9sP5\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 02:22:30 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 7A845C22553; Mon, 28 Aug 2017 16:22:25 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 2658BC2252C;\n\tMon, 28 Aug 2017 16:22:23 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 93500C224F3; Mon, 28 Aug 2017 16:22:21 +0000 (UTC)","from mail-oi0-f49.google.com (mail-oi0-f49.google.com\n\t[209.85.218.49])\n\tby lists.denx.de (Postfix) with ESMTPS id 13F10C22029\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 16:22:21 +0000 (UTC)","by mail-oi0-f49.google.com with SMTP id r203so7889661oih.0\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 09:22:21 -0700 (PDT)","by 10.157.24.52 with HTTP; Mon, 28 Aug 2017 09:22:19 -0700 (PDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.0 required=5.0 tests=FREEMAIL_FROM,\n\tRCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,\n\tT_DKIM_INVALID\n\tautolearn=unavailable autolearn_force=no version=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025;\n\th=mime-version:in-reply-to:references:from:date:message-id:subject:to\n\t:cc; bh=9JqOyo9xZkgzJxyQVn0oL6OA9cOjomuJDCllA2Larzw=;\n\tb=EiWs8OCfTKMrQ1ILhK/IOQOtTw9D5dQhmK0FctdvxQfeLhwP1a9cRPzmPKsZKqk02l\n\taljja+tCg4od7xb4CDqmShuCrbuX/g62/i6YZEAncLvQxyWzhCj11N6xRr9s2BCusUKH\n\tL1tchXLuhJLJxGR7vK22JxEjntE3R0GNElFfQ59Q3Vh4vBFSWxGKzSVYEBXbo30zxZlw\n\tNHRRMg+DPl+Qd2KNR6at1zSrJr5i5I1CFMJ97pBNswxM0zuMmEl/Yi0ifBWBELqpXYO4\n\tlOe2jKm0EJcdRKuVd5PR6TTjDXc+oFHuFUCXm3BH94H3ZSBZLohjyHm3F9FIpm7wQHoe\n\tUSSg==","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=9JqOyo9xZkgzJxyQVn0oL6OA9cOjomuJDCllA2Larzw=;\n\tb=HS8VEjSK8JlN/lclmmQsVKzmzTirnZFoxyUdAvD9UPFJcxHV83RaCFrvsMGNofH9cs\n\ta6bhhS0oKmkHJMMbVs8RMq0JZf29/tVpzGm9pJ9pBtev/vav/R3Qq0wg7k6UakfAIKmd\n\thlBLrGJNg1b+1o+pCdxjLg9WvTDTUpfFFkObtzTcUlKK4nlKWUEZC26YCS6kPprFrp6i\n\t/bb3rNDuSuXee0hxnBE3CFRzPWPe0X1cAik4p15qc6wKgdKWMlcvKO30gvU8ojr9PAW8\n\tRAzXjkzHx2HkDpNzGqOhTrHtjpqcEzTWYBo1QtQ0+ucapOoJWSWCCr/5JUsXWo9WwkwF\n\tVwAA==","X-Gm-Message-State":"AHYfb5jtyanXSW+s6+jPHABuQlw/8E0eu/n7SuUjazPu2T7MfzBx6JKb\n\tQZlEbro9B3Wk6IPxHYk5rZpAAC4Rd58X","X-Received":"by 10.202.169.145 with SMTP id s139mr1031119oie.62.1503937339435;\n\tMon, 28 Aug 2017 09:22:19 -0700 (PDT)","MIME-Version":"1.0","In-Reply-To":"<1503666643-15848-1-git-send-email-agust@denx.de>","References":"<1503666643-15848-1-git-send-email-agust@denx.de>","From":"Fabio Estevam <festevam@gmail.com>","Date":"Mon, 28 Aug 2017 13:22:19 -0300","Message-ID":"<CAOMZO5C-wFyd9abSiNZW7662Z6kR4W023a+exm+Jykj4=MM+VQ@mail.gmail.com>","To":"Anatolij Gustschin <agust@denx.de>","Cc":"U-Boot-Denx <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1758708,"web_url":"http://patchwork.ozlabs.org/comment/1758708/","msgid":"<1d1ff220-f225-7d32-061f-6b9c738a52bf@denx.de>","list_archive_url":null,"date":"2017-08-28T16:54:39","subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","submitter":{"id":5771,"url":"http://patchwork.ozlabs.org/api/people/5771/","name":"Stefano Babic","email":"sbabic@denx.de"},"content":"Hi Anatolji,\n\nOn 25/08/2017 15:10, Anatolij Gustschin wrote:\n> Boards can skip display interface init using board_video_skip().\n> If display interface was not initialized (e.g. no ipuv3 framebuffer\n> registered or IPU clock disabled), booting Linux stops due to the\n> crash in IPU shutdown function, when accessing IPU registers.\n> Check IPU clock and skip shutdown if clock is not enabled.\n> \n> Signed-off-by: Anatolij Gustschin <agust@denx.de>\n> ---\n>  drivers/video/mxc_ipuv3_fb.c | 13 ++++++++++++-\n>  1 file changed, 12 insertions(+), 1 deletion(-)\n> \n> diff --git a/drivers/video/mxc_ipuv3_fb.c b/drivers/video/mxc_ipuv3_fb.c\n> index 0d0a0a9..8836229 100644\n> --- a/drivers/video/mxc_ipuv3_fb.c\n> +++ b/drivers/video/mxc_ipuv3_fb.c\n> @@ -13,6 +13,7 @@\n>  \n>  #include <common.h>\n>  #include <linux/errno.h>\n> +#include <asm/arch/crm_regs.h>\n>  #include <asm/global_data.h>\n>  #include <linux/string.h>\n>  #include <linux/list.h>\n> @@ -568,8 +569,18 @@ err0:\n>  \n>  void ipuv3_fb_shutdown(void)\n>  {\n> -\tint i;\n> +\tstruct mxc_ccm_reg *mxc_ccm = (struct mxc_ccm_reg *)CCM_BASE_ADDR;\n>  \tstruct ipu_stat *stat = (struct ipu_stat *)IPU_STAT;\n> +\tu32 reg;\n> +\tint i;\n> +\n> +\t/*\n> +\t * Check if IPU clock was enabled before. Won't access\n> +\t * IPU registers if clock is not enabled.\n> +\t */\n> +\treg = readl(&mxc_ccm->CCGR3);\n> +\tif ((reg & MXC_CCM_CCGR3_IPU1_IPU_MASK) == 0)\n> +\t\treturn;\n>  \n\nIt looks to me quite weak to simply check if clock is gated. On some\nboard clock is gated even if IPU is not active. Do you have a way\nreading inside IPU itself ? Then we can better decide if it was really\nacrive. For example, checking if ipu_enable_channel() was called (and\nDMA registers are set).\n\nBest regards,\nStefano","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xgyYf4HNtz9s7m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 02:55:02 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 4F7FAC22570; Mon, 28 Aug 2017 16:54:48 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 1534CC2255E;\n\tMon, 28 Aug 2017 16:54:46 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 314AAC22554; Mon, 28 Aug 2017 16:54:45 +0000 (UTC)","from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])\n\tby lists.denx.de (Postfix) with ESMTPS id CADA2C22560\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 16:54:44 +0000 (UTC)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xgyYJ4RTPz1qsg8;\n\tMon, 28 Aug 2017 18:54:44 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xgyYJ3zTmz3jgY4;\n\tMon, 28 Aug 2017 18:54:44 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id 99oyT1bM5I49; Mon, 28 Aug 2017 18:54:43 +0200 (CEST)","from babic.homelinux.org (host-88-217-136-221.customer.m-online.net\n\t[88.217.136.221])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPS;\n\tMon, 28 Aug 2017 18:54:43 +0200 (CEST)","from localhost (mail.babic.homelinux.org [127.0.0.1])\n\tby babic.homelinux.org (Postfix) with ESMTP id B98864540597;\n\tMon, 28 Aug 2017 18:54:42 +0200 (CEST)","from babic.homelinux.org ([127.0.0.1])\n\tby localhost (mail.babic.homelinux.org [127.0.0.1]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id oQ82tJIvT4vL; Mon, 28 Aug 2017 18:54:40 +0200 (CEST)","from [192.168.178.132] (papero.fritz.box [192.168.178.132])\n\tby babic.homelinux.org (Postfix) with ESMTP id F2480454035C;\n\tMon, 28 Aug 2017 18:54:39 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","X-Virus-Scanned":["amavisd-new at mnet-online.de","Debian amavisd-new at babic.homelinux.org"],"To":"Anatolij Gustschin <agust@denx.de>, u-boot@lists.denx.de","References":"<1503666643-15848-1-git-send-email-agust@denx.de>","From":"Stefano Babic <sbabic@denx.de>","Message-ID":"<1d1ff220-f225-7d32-061f-6b9c738a52bf@denx.de>","Date":"Mon, 28 Aug 2017 18:54: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":"<1503666643-15848-1-git-send-email-agust@denx.de>","Content-Language":"de-DE","Subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1758753,"web_url":"http://patchwork.ozlabs.org/comment/1758753/","msgid":"<20170828200826.1b2301a8@crub>","list_archive_url":null,"date":"2017-08-28T18:08:26","subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","submitter":{"id":872,"url":"http://patchwork.ozlabs.org/api/people/872/","name":"Anatolij Gustschin","email":"agust@denx.de"},"content":"Hi Fabio,\n\nOn Mon, 28 Aug 2017 13:22:19 -0300\nFabio Estevam festevam@gmail.com wrote:\n...\n> > +       /*\n> > +        * Check if IPU clock was enabled before. Won't access\n> > +        * IPU registers if clock is not enabled.\n> > +        */\n> > +       reg = readl(&mxc_ccm->CCGR3);\n> > +       if ((reg & MXC_CCM_CCGR3_IPU1_IPU_MASK) == 0)\n> > +               return;  \n> \n> Maybe you could also check whether IPU2 has been enabled?\n\ncurrently IPU2 is not used, the driver never enables it. I checked\nit when preparing this patch.\n\nThanks,\nAnatolij","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xh0BX2jvSz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 04:08:34 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 6CE19C225C3; Mon, 28 Aug 2017 18:08:19 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id D3F8FC2259A;\n\tMon, 28 Aug 2017 18:08:16 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 38AE6C2259A; Mon, 28 Aug 2017 18:08:15 +0000 (UTC)","from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])\n\tby lists.denx.de (Postfix) with ESMTPS id D3007C22578\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 18:08:14 +0000 (UTC)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xh0B64fmlz1qsGN;\n\tMon, 28 Aug 2017 20:08:14 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xh0B649NBz3jgYR;\n\tMon, 28 Aug 2017 20:08:14 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id 5PFGtrlgL8pK; Mon, 28 Aug 2017 20:08:13 +0200 (CEST)","from crub (p4FCB44C5.dip0.t-ipconnect.de [79.203.68.197])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPSA;\n\tMon, 28 Aug 2017 20:08:13 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","X-Virus-Scanned":"amavisd-new at mnet-online.de","X-Auth-Info":"IuRwaGGarKEo+AOy60XlyDmzGZxTr5ffSjjlRoCi8fY=","Date":"Mon, 28 Aug 2017 20:08:26 +0200","From":"Anatolij Gustschin <agust@denx.de>","To":"Fabio Estevam <festevam@gmail.com>","Message-ID":"<20170828200826.1b2301a8@crub>","In-Reply-To":"<CAOMZO5C-wFyd9abSiNZW7662Z6kR4W023a+exm+Jykj4=MM+VQ@mail.gmail.com>","References":"<1503666643-15848-1-git-send-email-agust@denx.de>\n\t<CAOMZO5C-wFyd9abSiNZW7662Z6kR4W023a+exm+Jykj4=MM+VQ@mail.gmail.com>","X-Mailer":"Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Cc":"U-Boot-Denx <u-boot@lists.denx.de>","Subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}},{"id":1758762,"web_url":"http://patchwork.ozlabs.org/comment/1758762/","msgid":"<20170828202312.3f7e3ec7@crub>","list_archive_url":null,"date":"2017-08-28T18:23:12","subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","submitter":{"id":872,"url":"http://patchwork.ozlabs.org/api/people/872/","name":"Anatolij Gustschin","email":"agust@denx.de"},"content":"Hi Stefano,\n\nOn Mon, 28 Aug 2017 18:54:39 +0200\nStefano Babic sbabic@denx.de wrote:\n...\n> > +\t/*\n> > +\t * Check if IPU clock was enabled before. Won't access\n> > +\t * IPU registers if clock is not enabled.\n> > +\t */\n> > +\treg = readl(&mxc_ccm->CCGR3);\n> > +\tif ((reg & MXC_CCM_CCGR3_IPU1_IPU_MASK) == 0)\n> > +\t\treturn;\n> >    \n> \n> It looks to me quite weak to simply check if clock is gated. On some\n> board clock is gated even if IPU is not active. Do you have a way\n> reading inside IPU itself ? Then we can better decide if it was really\n> acrive. For example, checking if ipu_enable_channel() was called (and\n> DMA registers are set).\n\nwe cannot access IPU registers when IPU clock is disabled (register\naccess will hang the CPU).\n\nThanks,\nAnatolij","headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":"ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xh0WN2Nnwz9sN7\n\tfor <incoming@patchwork.ozlabs.org>;\n\tTue, 29 Aug 2017 04:23:12 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid D455AC225CA; Mon, 28 Aug 2017 18:23:05 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id 80443C225B5;\n\tMon, 28 Aug 2017 18:23:03 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 8A2EEC225A9; Mon, 28 Aug 2017 18:23:01 +0000 (UTC)","from mail-out.m-online.net (mail-out.m-online.net [212.18.0.10])\n\tby lists.denx.de (Postfix) with ESMTPS id 4D0D0C225B2\n\tfor <u-boot@lists.denx.de>; Mon, 28 Aug 2017 18:23:01 +0000 (UTC)","from frontend01.mail.m-online.net (unknown [192.168.8.182])\n\tby mail-out.m-online.net (Postfix) with ESMTP id 3xh0W90l8Yz1qsGN;\n\tMon, 28 Aug 2017 20:23:01 +0200 (CEST)","from localhost (dynscan1.mnet-online.de [192.168.6.70])\n\tby mail.m-online.net (Postfix) with ESMTP id 3xh0W90BGDz3jgYV;\n\tMon, 28 Aug 2017 20:23:01 +0200 (CEST)","from mail.mnet-online.de ([192.168.8.182])\n\tby localhost (dynscan1.mail.m-online.net [192.168.6.70]) (amavisd-new,\n\tport 10024)\n\twith ESMTP id c4kqZHguB5Df; Mon, 28 Aug 2017 20:23:00 +0200 (CEST)","from crub (p4FCB44C5.dip0.t-ipconnect.de [79.203.68.197])\n\t(using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits))\n\t(No client certificate requested)\n\tby mail.mnet-online.de (Postfix) with ESMTPSA;\n\tMon, 28 Aug 2017 20:23:00 +0200 (CEST)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,\n\tRCVD_IN_MSPIKE_H3,\n\tRCVD_IN_MSPIKE_WL autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","X-Virus-Scanned":"amavisd-new at mnet-online.de","X-Auth-Info":"wfftjMKRXVNJFJQ1DPjJ0v+2oRAbLYyhK8Y2mOODENk=","Date":"Mon, 28 Aug 2017 20:23:12 +0200","From":"Anatolij Gustschin <agust@denx.de>","To":"Stefano Babic <sbabic@denx.de>","Message-ID":"<20170828202312.3f7e3ec7@crub>","In-Reply-To":"<1d1ff220-f225-7d32-061f-6b9c738a52bf@denx.de>","References":"<1503666643-15848-1-git-send-email-agust@denx.de>\n\t<1d1ff220-f225-7d32-061f-6b9c738a52bf@denx.de>","X-Mailer":"Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu)","MIME-Version":"1.0","Cc":"u-boot@lists.denx.de","Subject":"Re: [U-Boot] [PATCH] video: ipuv3_fb: skip IPU shutdown if IPU was\n\tnot enabled before","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"}}]