From: Scott Wood <oss@buserror.net>
To: Yangbo Lu <yangbo.lu@nxp.com>,
linux-mmc@vger.kernel.org, ulf.hansson@linaro.org,
Arnd Bergmann <arnd@arndb.de>
Cc: linuxppc-dev@lists.ozlabs.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
linux-i2c@vger.kernel.org, iommu@lists.linux-foundation.org,
netdev@vger.kernel.org, Mark Rutland <mark.rutland@arm.com>,
Rob Herring <robh+dt@kernel.org>,
Russell King <linux@arm.linux.org.uk>,
Jochen Friedrich <jochen@scram.de>,
Joerg Roedel <joro@8bytes.org>,
Claudiu Manoil <claudiu.manoil@freescale.com>,
Bhupesh Sharma <bhupesh.sharma@freescale.com>,
Qiang Zhao <qiang.zhao@nxp.com>,
Kumar Gala <galak@codeaurora.org>,
Santosh Shilimkar <ssantosh@kernel.org>,
Leo Li <leoyang.li@nxp.com>, Xiaobo Xie <xiaobo.xie@nxp.com>,
Minghuan Lian <minghuan.lian@nxp.com>
Subject: Re: [v12, 5/8] soc: fsl: add GUTS driver for QorIQ platforms
Date: Wed, 26 Oct 2016 12:06:06 -0500 [thread overview]
Message-ID: <1477501566.6812.9.camel@buserror.net> (raw)
In-Reply-To: <1474441040-11946-6-git-send-email-yangbo.lu@nxp.com>
On Wed, 2016-09-21 at 14:57 +0800, Yangbo Lu wrote:
> diff --git a/drivers/soc/fsl/Kconfig b/drivers/soc/fsl/Kconfig
> new file mode 100644
> index 0000000..b99764c
> --- /dev/null
> +++ b/drivers/soc/fsl/Kconfig
> @@ -0,0 +1,19 @@
> +#
> +# Freescale SOC drivers
> +#
> +
> +source "drivers/soc/fsl/qe/Kconfig"
> +
> +config FSL_GUTS
> + bool "Freescale QorIQ GUTS driver"
> + select SOC_BUS
> + help
> + The global utilities block controls power management, I/O device
> + enabling, power-onreset(POR) configuration monitoring, alternate
> + function selection for multiplexed signals,and clock control.
> + This driver is to manage and access global utilities block.
> + Initially only reading SVR and registering soc device are
> supported.
> + Other guts accesses, such as reading RCW, should eventually be
> moved
> + into this driver as well.
> +
> + If you want GUTS driver support, you should say Y here.
This is user-enablable without dependencies, which means it will break some
randconfigs. If this is to be enabled via select then remove the text after
"bool".
> +/* SoC die attribute definition for QorIQ platform */
> +static const struct fsl_soc_die_attr fsl_soc_die[] = {
> +#ifdef CONFIG_PPC
> + /*
> + * Power Architecture-based SoCs T Series
> + */
> +
> + /* Die: T4240, SoC: T4240/T4160/T4080 */
> + { .die = "T4240",
> + .svr = 0x82400000,
> + .mask = 0xfff00000,
> + },
> + /* Die: T1040, SoC: T1040/T1020/T1042/T1022 */
> + { .die = "T1040",
> + .svr = 0x85200000,
> + .mask = 0xfff00000,
> + },
> + /* Die: T2080, SoC: T2080/T2081 */
> + { .die = "T2080",
> + .svr = 0x85300000,
> + .mask = 0xfff00000,
> + },
> + /* Die: T1024, SoC: T1024/T1014/T1023/T1013 */
> + { .die = "T1024",
> + .svr = 0x85400000,
> + .mask = 0xfff00000,
> + },
> +#endif /* CONFIG_PPC */
> +#if defined(CONFIG_ARCH_MXC) || defined(CONFIG_ARCH_LAYERSCAPE)
Will this driver ever be probed on MXC? Why do we need these ifdefs at all?
> + /*
> + * ARM-based SoCs LS Series
> + */
> +
> + /* Die: LS1043A, SoC: LS1043A/LS1023A */
> + { .die = "LS1043A",
> + .svr = 0x87920000,
> + .mask = 0xffff0000,
> + },
> + /* Die: LS2080A, SoC: LS2080A/LS2040A/LS2085A */
> + { .die = "LS2080A",
> + .svr = 0x87010000,
> + .mask = 0xff3f0000,
> + },
> + /* Die: LS1088A, SoC: LS1088A/LS1048A/LS1084A/LS1044A */
> + { .die = "LS1088A",
> + .svr = 0x87030000,
> + .mask = 0xff3f0000,
> + },
> + /* Die: LS1012A, SoC: LS1012A */
> + { .die = "LS1012A",
> + .svr = 0x87040000,
> + .mask = 0xffff0000,
> + },
> + /* Die: LS1046A, SoC: LS1046A/LS1026A */
> + { .die = "LS1046A",
> + .svr = 0x87070000,
> + .mask = 0xffff0000,
> + },
> + /* Die: LS2088A, SoC: LS2088A/LS2048A/LS2084A/LS2044A */
> + { .die = "LS2088A",
> + .svr = 0x87090000,
> + .mask = 0xff3f0000,
> + },
> + /* Die: LS1021A, SoC: LS1021A/LS1020A/LS1022A
> + * Note: Put this die at the end in cause of incorrect
> identification
> + */
> + { .die = "LS1021A",
> + .svr = 0x87000000,
> + .mask = 0xfff00000,
> + },
> +#endif /* CONFIG_ARCH_MXC || CONFIG_ARCH_LAYERSCAPE */
Instead of relying on ordering, add more bits to the mask so that there's no
overlap. I think 0xfff70000 would work.
> +out:
> + kfree(soc_dev_attr.machine);
> + kfree(soc_dev_attr.family);
> + kfree(soc_dev_attr.soc_id);
> + kfree(soc_dev_attr.revision);
> + iounmap(guts->regs);
> +out_free:
> + kfree(guts);
> + return ret;
> +}
Please use devm.
-Scott
next prev parent reply other threads:[~2016-10-26 17:06 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-21 6:57 [v12, 0/8] Fix eSDHC host version register bug Yangbo Lu
[not found] ` <1474441040-11946-1-git-send-email-yangbo.lu-3arQi8VN3Tc@public.gmane.org>
2016-09-21 6:57 ` [v12, 1/8] dt: bindings: update Freescale DCFG compatible Yangbo Lu
2016-09-21 6:57 ` [v12, 2/8] ARM64: dts: ls2080a: add device configuration node Yangbo Lu
2016-09-21 6:57 ` [v12, 3/8] dt: bindings: move guts devicetree doc out of powerpc directory Yangbo Lu
2016-09-21 6:57 ` [v12, 4/8] powerpc/fsl: move mpc85xx.h to include/linux/fsl Yangbo Lu
2016-09-21 6:57 ` [v12, 5/8] soc: fsl: add GUTS driver for QorIQ platforms Yangbo Lu
2016-10-26 17:06 ` Scott Wood [this message]
[not found] ` <1477501566.6812.9.camel-fOR+EgIDQEHk1uMJSBkQmQ@public.gmane.org>
2016-10-27 4:34 ` Y.B. Lu
2016-09-21 6:57 ` [v12, 6/8] MAINTAINERS: add entry for Freescale SoC drivers Yangbo Lu
2016-09-21 6:57 ` [v12, 7/8] base: soc: introduce soc_device_match() interface Yangbo Lu
2016-09-21 7:56 ` Alexander Shiyan
2016-09-21 8:25 ` Peter Rosin
2016-09-21 6:57 ` [v12, 8/8] mmc: sdhci-of-esdhc: fix host version for T4240-R1.0-R2.0 Yangbo Lu
2016-09-26 3:14 ` [v12, 0/8] Fix eSDHC host version register bug Y.B. Lu
2016-10-18 10:47 ` Ulf Hansson
[not found] ` <CAPDyKFoit0sTPpfi2=AHcdZsDwOJxbBX68O-1jBFL=5JN0m6_w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-10-19 2:40 ` Y.B. Lu
2016-10-19 2:47 ` Y.B. Lu
[not found] ` <AM5PR0401MB2529BA70C6E7AF7C71631A47F8D20-oQ3wXcTHOqqGPub0A97BiI3W/0Ik+aLCnBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2016-10-19 8:27 ` gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r
2016-10-08 3:28 ` Y.B. Lu
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=1477501566.6812.9.camel@buserror.net \
--to=oss@buserror.net \
--cc=arnd@arndb.de \
--cc=bhupesh.sharma@freescale.com \
--cc=claudiu.manoil@freescale.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=iommu@lists.linux-foundation.org \
--cc=jochen@scram.de \
--cc=joro@8bytes.org \
--cc=leoyang.li@nxp.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mark.rutland@arm.com \
--cc=minghuan.lian@nxp.com \
--cc=netdev@vger.kernel.org \
--cc=qiang.zhao@nxp.com \
--cc=robh+dt@kernel.org \
--cc=ssantosh@kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=xiaobo.xie@nxp.com \
--cc=yangbo.lu@nxp.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: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).