From: Tony Lindgren <tony@atomide.com> To: Tero Kristo <t-kristo@ti.com> Cc: linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCHv3b 4/5] ARM: OMAP4: cminst: add support for clkdm_xlate_address Date: Tue, 30 May 2017 11:10:28 -0700 [thread overview] Message-ID: <20170530181028.GA3730@atomide.com> (raw) In-Reply-To: <1496155669-1677-5-git-send-email-t-kristo@ti.com> Hi, * Tero Kristo <t-kristo@ti.com> [170530 07:51]: > This function gets the physical base address of a clockdomain. .. > +static u32 omap4_clkdm_xlate_address(struct clockdomain *clkdm) > +{ > + u32 addr = (u32)_cm_bases[clkdm->prcm_partition] - OMAP2_L4_IO_OFFSET + > + clkdm->cm_inst + clkdm->clkdm_offs; > + > + return addr; > +} > + Hmm this will be flakey as it assumes fixed mappings for all these which we do not have on all SoCs. It would be best to pass the domain bases around as struct resource then just ioremap locally. It might be enough if we changed _cm_bases[] locally to be an array of: struct omap_domain_base { struct resource res; void __iomem *va; }; Or do you have better ideas? Regards, Tony
WARNING: multiple messages have this Message-ID (diff)
From: tony@atomide.com (Tony Lindgren) To: linux-arm-kernel@lists.infradead.org Subject: [PATCHv3b 4/5] ARM: OMAP4: cminst: add support for clkdm_xlate_address Date: Tue, 30 May 2017 11:10:28 -0700 [thread overview] Message-ID: <20170530181028.GA3730@atomide.com> (raw) In-Reply-To: <1496155669-1677-5-git-send-email-t-kristo@ti.com> Hi, * Tero Kristo <t-kristo@ti.com> [170530 07:51]: > This function gets the physical base address of a clockdomain. .. > +static u32 omap4_clkdm_xlate_address(struct clockdomain *clkdm) > +{ > + u32 addr = (u32)_cm_bases[clkdm->prcm_partition] - OMAP2_L4_IO_OFFSET + > + clkdm->cm_inst + clkdm->clkdm_offs; > + > + return addr; > +} > + Hmm this will be flakey as it assumes fixed mappings for all these which we do not have on all SoCs. It would be best to pass the domain bases around as struct resource then just ioremap locally. It might be enough if we changed _cm_bases[] locally to be an array of: struct omap_domain_base { struct resource res; void __iomem *va; }; Or do you have better ideas? Regards, Tony
next prev parent reply other threads:[~2017-05-30 18:10 UTC|newest] Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-05-30 14:47 [PATCHv3b 0/5] ARM: OMAP2+: preparation for clk/clkctrl support Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 1/5] ARM: OMAP2+: timer: add support for fetching fck handle from DT Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 2/5] ARM: OMAP4: hwmod_data: add opt clks for dss_hdmi and dss_venc Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 3/5] ARM: omap2+: clockdomain: add clkdm_xlate_address Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 4/5] ARM: OMAP4: cminst: add support for clkdm_xlate_address Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 18:10 ` Tony Lindgren [this message] 2017-05-30 18:10 ` Tony Lindgren 2017-05-31 14:36 ` Tero Kristo 2017-05-31 14:36 ` Tero Kristo 2017-05-30 14:47 ` [PATCHv3b 5/5] ARM: OMAP2+: hwmod: populate clkctrl clocks for hwmods if available Tero Kristo 2017-05-30 14:47 ` Tero Kristo 2017-05-30 18:15 ` Tony Lindgren 2017-05-30 18:15 ` Tony Lindgren 2017-05-31 14:40 ` Tero Kristo 2017-05-31 14:40 ` Tero Kristo 2017-05-30 18:16 ` [PATCHv3b 0/5] ARM: OMAP2+: preparation for clk/clkctrl support Tony Lindgren 2017-05-30 18:16 ` Tony Lindgren 2017-05-31 14:40 ` Tero Kristo 2017-05-31 14:40 ` Tero Kristo
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20170530181028.GA3730@atomide.com \ --to=tony@atomide.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=linux-omap@vger.kernel.org \ --cc=t-kristo@ti.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.