From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.20]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 26C512EC09B for ; Wed, 24 Jun 2026 11:14:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.175.65.20 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782299650; cv=none; b=ZtYgvlIaRkGCsrwiuYCko0I1Ovh7zJ0kOKnBqNIFXmtNCHhnJQP7UxV3gHbvTD6kpDApEDro/1VyajTCzAaZ17cgZ8c5KKW7vh3zYUejxISwvyVE2bEBnzDnCE6/Zvwu5QkH3VU4Kxow0PUf9UWpWMbg4gCwyDCJy1z9PISYIOw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782299650; c=relaxed/simple; bh=4Z1i9Z2EfATKkuXzRV/xbJfEP7bd2JhvUbuiK3wcH8I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=buzd1co0ehb30rVouXL0nT9PLXiDFSbdoZx1SDMWw1ga0b//w5Jn18f5QF3R4xwT3TPjRnnr8FUjfRxArhKuwIdkg5qPxXNzti157f2Kto9QetcnqjBG+Y9yj94L9jyFTmQIJ7rcevpE3WelP4A9wyYhTy4oCXpyorK61Wr0SR8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com; spf=pass smtp.mailfrom=intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=YrcOhbqP; arc=none smtp.client-ip=198.175.65.20 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="YrcOhbqP" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1782299649; x=1813835649; h=date:from:to:cc:subject:message-id:references: mime-version:in-reply-to; bh=4Z1i9Z2EfATKkuXzRV/xbJfEP7bd2JhvUbuiK3wcH8I=; b=YrcOhbqPhZ7SKifDidlBZBBK30YuMExxU5XvB/EBam5f06U9jyaIKT8J 5aUbqY/Q6asDq5EY7hOjMHtzf6r8KM88nG4LvoiMXdma7+3voJ/417dM1 Dfzb0VSiFqOcJZdnWa9j684oEigwpkkmq8FNLXwmJA1+h0t4Alo2r2AXy A58szYXaEiQ3k8UiPvJAUD64fCTf7VyC+rl3vqrlVyrJoC6lb8BZ5EbpU I5f8f9eLSANzNjvXoGmqVTUArjHQmKFLYAsEbl/Pfg9hAIF3pbFOQdekd uD1XYGv8pfeJi3/lhXRG7tRWoksb5K1FEvJ9PJgicJE9hANiAuI+JPehw g==; X-CSE-ConnectionGUID: wanGHC4ASFqSaHMtHwiIDQ== X-CSE-MsgGUID: V1tzcPEfTxm5TsL3jQ/48A== X-IronPort-AV: E=McAfee;i="6800,10657,11826"; a="82827862" X-IronPort-AV: E=Sophos;i="6.24,222,1774335600"; d="scan'208";a="82827862" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by orvoesa112.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2026 04:14:08 -0700 X-CSE-ConnectionGUID: 5etJSCkMTVeo4aUWC2WejQ== X-CSE-MsgGUID: RN0RErp7Rpa2d0PdDje2bQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.24,222,1774335600"; d="scan'208";a="254787509" Received: from black.igk.intel.com ([10.91.253.5]) by orviesa005.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 24 Jun 2026 04:14:05 -0700 Date: Wed, 24 Jun 2026 13:14:02 +0200 From: Raag Jadav To: Heikki Krogerus Cc: Rodrigo Vivi , Matthew Brost , Thomas =?iso-8859-1?Q?Hellstr=F6m?= , "Michael J . Ruhl" , Andy Shevchenko , Mika Westerberg , Riana Tauro , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v1 2/2] drm/xe/mcu_i2c: Take over control of the controller enabling Message-ID: References: <20260622114759.3464047-1-heikki.krogerus@linux.intel.com> <20260622114759.3464047-3-heikki.krogerus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Wed, Jun 24, 2026 at 01:13:56PM +0300, Heikki Krogerus wrote: > On Tue, Jun 23, 2026 at 04:39:05PM +0200, Raag Jadav wrote: > > On Mon, Jun 22, 2026 at 01:47:59PM +0200, Heikki Krogerus wrote: > > > Some platforms make an assumption that the i2c controller's > > > enabled state indicates also the power state of the > > > controller. This can create a problem when the controller is > > > in disabled state, because the hardware may assume > > > incorrectly that it is then also in low-power state. > > > > > > To fix this, the controller is kept enabled by taking over > > > the IC_ENABLE register. The controller has to be disabled > > > when the configuration is updated and when the target > > > address or the slave address are assigned, so disabling it > > > when IC_CON, IC_TAR or IC_SAR registers are programmed, and > > > then re-enabling it again. > > > > ... > > > > > static int xe_i2c_read(void *context, unsigned int reg, unsigned int *val) > > > { > > > struct xe_i2c *i2c = context; > > > > > > - *val = xe_mmio_read32(i2c->mmio, XE_REG(reg + I2C_MEM_SPACE_OFFSET)); > > > + switch (reg) { > > > > Curious, should I expect DW_IC_INTR_MASK case here which skips the MMIO? > > Probable not. We have the ACCESS_POLLING flag set, so the > i2c-designware will only write 0 to that register. Check > __i2c_dw_write_intr_mask(). Yes, but I'm not sure if all the writes to DW_IC_INTR_MASK have been converted to use that helper yet, or did I miss something? Raag