* [PATCH v4 0/2] Move i2c sys_cfg register configuration to i2c driver @ 2014-10-30 8:04 Pankaj Dubey 2014-10-30 8:04 ` [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in " Pankaj Dubey 2014-10-30 8:04 ` [PATCH v4 2/2] ARM: EXYNOS: Remove i2c sys configuration related code Pankaj Dubey 0 siblings, 2 replies; 9+ messages in thread From: Pankaj Dubey @ 2014-10-30 8:04 UTC (permalink / raw) To: linux-arm-kernel This patch series is moving i2c sys_cfg register configuration settings from mach-exynos to i2c driver. It will help in removing soc_is_exynos kind of macro usage from mach-exynos also it will help in removing static mapping of SYS registers. This series is based on latest kgene/for-next and on top of following Exynos-PMU patches [1]: ARM: Exynos: Convert PMU implementation into a platform driver https://lkml.org/lkml/2014/10/6/89 Revision V3 of these patches was posted along with Exynos Chipid driver support patch [2]. [2]: https://lkml.org/lkml/2014/5/10/31 Change since v3: - Rebased on latest kgene/for-next (SHA-ID: 2b5fa1d5dabb9af8f2da4f380bea8684f9b96f59) - This series consist of only two patches from v3 [1] (v3[1/6] and v3[2/6]). - Addressed Tomasz Figa and Wolfram Sang's comments. - Updated i2c DT binding information. Changes since v2: - Reorganized patches as suggested by Tomasz Figa. - Addressed review comments of Tomasz Figa in i2c-s3c2410.c file. Changes since v1: - Added patch to move i2c interrupt re-configuration code from exynos.c to i2c driver, as suggested by Arnd. - After above patch only user of SYS_I2C_CFG register is pm.c so moving save/restore of this register also into i2c driver. - Spiltted up exynos4 and exynos5 machine descriptors to get rid from soc_is_exynos4/exynos5 kind of macros, as suggested by Arnd. - Changed location of chipid driver to "drivers/soc". - Added drivers/base/soc.c provided infrastructure to make SoC specific information avaible to user space via sysfs entry, as suggested by Arnd. Pankaj Dubey (2): i2c: s3c2410: Handle i2c sys_cfg register in i2c driver ARM: EXYNOS: Remove i2c sys configuration related code .../devicetree/bindings/i2c/i2c-s3c2410.txt | 1 + arch/arm/boot/dts/exynos5250.dtsi | 4 ++ arch/arm/boot/dts/exynos5420.dtsi | 4 ++ arch/arm/mach-exynos/exynos.c | 39 +------------------- arch/arm/mach-exynos/include/mach/map.h | 3 -- arch/arm/mach-exynos/pm.c | 3 +- arch/arm/mach-exynos/regs-sys.h | 22 ----------- arch/arm/mach-exynos/suspend.c | 7 ---- drivers/i2c/busses/i2c-s3c2410.c | 31 ++++++++++++++++ 9 files changed, 44 insertions(+), 70 deletions(-) delete mode 100644 arch/arm/mach-exynos/regs-sys.h -- 1.7.9.5 ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-10-30 8:04 [PATCH v4 0/2] Move i2c sys_cfg register configuration to i2c driver Pankaj Dubey @ 2014-10-30 8:04 ` Pankaj Dubey 2014-11-21 7:25 ` Wolfram Sang 2014-10-30 8:04 ` [PATCH v4 2/2] ARM: EXYNOS: Remove i2c sys configuration related code Pankaj Dubey 1 sibling, 1 reply; 9+ messages in thread From: Pankaj Dubey @ 2014-10-30 8:04 UTC (permalink / raw) To: linux-arm-kernel Let's handle i2c interrupt re-configuration in i2c driver. This will help us in removing some soc specific checks from machine files and will help in removing static iomapping of SYS register in exynos.c Since only Exynos5250, and Exynos5420 has i2c nodes in DT, added syscon based phandle to i2c device nodes of respective SoC DT files. Also handle saving and restoring of SYS_I2C_CFG register during suspend and resume of i2c driver. CC: Rob Herring <robh+dt@kernel.org> CC: Randy Dunlap <rdunlap@infradead.org> CC: Wolfram Sang <wsa@the-dreams.de> CC: Russell King <linux@arm.linux.org.uk> CC: devicetree at vger.kernel.org CC: linux-doc at vger.kernel.org CC: linux-i2c at vger.kernel.org Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> --- .../devicetree/bindings/i2c/i2c-s3c2410.txt | 1 + arch/arm/boot/dts/exynos5250.dtsi | 4 +++ arch/arm/boot/dts/exynos5420.dtsi | 4 +++ drivers/i2c/busses/i2c-s3c2410.c | 31 ++++++++++++++++++++ 4 files changed, 40 insertions(+) diff --git a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt index 278de8e..89b3250 100644 --- a/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt +++ b/Documentation/devicetree/bindings/i2c/i2c-s3c2410.txt @@ -32,6 +32,7 @@ Optional properties: specified, default value is 0. - samsung,i2c-max-bus-freq: Desired frequency in Hz of the bus. If not specified, the default value in Hz is 100000. + - samsung,sysreg-phandle - handle to syscon used to control the system registers Example: diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi index 012b021..6a32d50 100644 --- a/arch/arm/boot/dts/exynos5250.dtsi +++ b/arch/arm/boot/dts/exynos5250.dtsi @@ -293,6 +293,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c0_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; @@ -306,6 +307,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c1_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; @@ -319,6 +321,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c2_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; @@ -332,6 +335,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c3_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi index 8617a03..90bf401 100644 --- a/arch/arm/boot/dts/exynos5420.dtsi +++ b/arch/arm/boot/dts/exynos5420.dtsi @@ -560,6 +560,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c0_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; @@ -573,6 +574,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c1_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; @@ -586,6 +588,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c2_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; @@ -599,6 +602,7 @@ clock-names = "i2c"; pinctrl-names = "default"; pinctrl-0 = <&i2c3_bus>; + samsung,sysreg-phandle = <&sysreg_system_controller>; status = "disabled"; }; diff --git a/drivers/i2c/busses/i2c-s3c2410.c b/drivers/i2c/busses/i2c-s3c2410.c index e3b0337..a46435a 100644 --- a/drivers/i2c/busses/i2c-s3c2410.c +++ b/drivers/i2c/busses/i2c-s3c2410.c @@ -39,6 +39,8 @@ #include <linux/of.h> #include <linux/of_gpio.h> #include <linux/pinctrl/consumer.h> +#include <linux/mfd/syscon.h> +#include <linux/regmap.h> #include <asm/irq.h> @@ -91,6 +93,9 @@ /* Max time to wait for bus to become idle after a xfer (in us) */ #define S3C2410_IDLE_TIMEOUT 5000 +/* Exynos5 Sysreg offset */ +#define EXYNOS5_SYS_I2C_CFG 0x0234 + /* i2c controller state */ enum s3c24xx_i2c_state { STATE_IDLE, @@ -127,6 +132,8 @@ struct s3c24xx_i2c { #if defined(CONFIG_ARM_S3C24XX_CPUFREQ) struct notifier_block freq_transition; #endif + struct regmap *sysreg; + unsigned int sys_i2c_cfg; }; static struct platform_device_id s3c24xx_driver_ids[] = { @@ -1075,6 +1082,7 @@ static void s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c) { struct s3c2410_platform_i2c *pdata = i2c->pdata; + int id; if (!np) return; @@ -1084,6 +1092,23 @@ s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c) of_property_read_u32(np, "samsung,i2c-slave-addr", &pdata->slave_addr); of_property_read_u32(np, "samsung,i2c-max-bus-freq", (u32 *)&pdata->frequency); + /* + * Exynos5's legacy i2c controller and new high speed i2c + * controller have muxed interrupt sources. By default the + * interrupts for 4-channel HS-I2C controller are enabled. + * If node for first four channels of legacy i2c controller + * are available then re-configure the interrupts via the + * system register. + */ + id = of_alias_get_id(np, "i2c"); + i2c->sysreg = syscon_regmap_lookup_by_phandle(np, + "samsung,sysreg-phandle"); + if (IS_ERR(i2c->sysreg)) { + /* As this is not compulsory do not return error */ + pr_info("i2c-%d skipping re-configuration of interrutps\n", id); + return; + } + regmap_update_bits(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, BIT(id), 0); } #else static void @@ -1264,6 +1289,9 @@ static int s3c24xx_i2c_suspend_noirq(struct device *dev) i2c->suspended = 1; + if (!IS_ERR(i2c->sysreg)) + regmap_read(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, &i2c->sys_i2c_cfg); + return 0; } @@ -1272,6 +1300,9 @@ static int s3c24xx_i2c_resume_noirq(struct device *dev) struct platform_device *pdev = to_platform_device(dev); struct s3c24xx_i2c *i2c = platform_get_drvdata(pdev); + if (!IS_ERR(i2c->sysreg)) + regmap_write(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, i2c->sys_i2c_cfg); + clk_prepare_enable(i2c->clk); s3c24xx_i2c_init(i2c); clk_disable_unprepare(i2c->clk); -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-10-30 8:04 ` [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in " Pankaj Dubey @ 2014-11-21 7:25 ` Wolfram Sang 2014-11-21 10:17 ` Pankaj Dubey 0 siblings, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2014-11-21 7:25 UTC (permalink / raw) To: linux-arm-kernel On Thu, Oct 30, 2014 at 01:34:29PM +0530, Pankaj Dubey wrote: > Let's handle i2c interrupt re-configuration in i2c driver. This will > help us in removing some soc specific checks from machine files and > will help in removing static iomapping of SYS register in exynos.c > > Since only Exynos5250, and Exynos5420 has i2c nodes in DT, added syscon > based phandle to i2c device nodes of respective SoC DT files. > > Also handle saving and restoring of SYS_I2C_CFG register during > suspend and resume of i2c driver. > > CC: Rob Herring <robh+dt@kernel.org> > CC: Randy Dunlap <rdunlap@infradead.org> > CC: Wolfram Sang <wsa@the-dreams.de> > CC: Russell King <linux@arm.linux.org.uk> > CC: devicetree at vger.kernel.org > CC: linux-doc at vger.kernel.org > CC: linux-i2c at vger.kernel.org > Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > --- > .../devicetree/bindings/i2c/i2c-s3c2410.txt | 1 + > arch/arm/boot/dts/exynos5250.dtsi | 4 +++ > arch/arm/boot/dts/exynos5420.dtsi | 4 +++ I usually don't take DTS patches. They should go via arm-soc. Please say so if there are reasons I should take them. > @@ -1084,6 +1092,23 @@ s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c) > of_property_read_u32(np, "samsung,i2c-slave-addr", &pdata->slave_addr); > of_property_read_u32(np, "samsung,i2c-max-bus-freq", > (u32 *)&pdata->frequency); > + /* > + * Exynos5's legacy i2c controller and new high speed i2c > + * controller have muxed interrupt sources. By default the > + * interrupts for 4-channel HS-I2C controller are enabled. > + * If node for first four channels of legacy i2c controller s/node/nodes/ > + * are available then re-configure the interrupts via the > + * system register. > + */ > + id = of_alias_get_id(np, "i2c"); > + i2c->sysreg = syscon_regmap_lookup_by_phandle(np, > + "samsung,sysreg-phandle"); > + if (IS_ERR(i2c->sysreg)) { > + /* As this is not compulsory do not return error */ > + pr_info("i2c-%d skipping re-configuration of interrutps\n", id); I'd say drop this message. If you want to keep it, it should be dev_dbg. > + return; > + } > + regmap_update_bits(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, BIT(id), 0); > } Rest looks good, thanks! -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141121/a9b5fa9e/attachment.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-11-21 7:25 ` Wolfram Sang @ 2014-11-21 10:17 ` Pankaj Dubey 2014-11-21 16:47 ` Wolfram Sang 2014-11-22 0:42 ` Kukjin Kim 0 siblings, 2 replies; 9+ messages in thread From: Pankaj Dubey @ 2014-11-21 10:17 UTC (permalink / raw) To: linux-arm-kernel On Friday 21 November 2014 12:55 PM, Wolfram Sang wrote: > On Thu, Oct 30, 2014 at 01:34:29PM +0530, Pankaj Dubey wrote: >> Let's handle i2c interrupt re-configuration in i2c driver. This will >> help us in removing some soc specific checks from machine files and >> will help in removing static iomapping of SYS register in exynos.c >> >> Since only Exynos5250, and Exynos5420 has i2c nodes in DT, added syscon >> based phandle to i2c device nodes of respective SoC DT files. >> >> Also handle saving and restoring of SYS_I2C_CFG register during >> suspend and resume of i2c driver. >> >> CC: Rob Herring <robh+dt@kernel.org> >> CC: Randy Dunlap <rdunlap@infradead.org> >> CC: Wolfram Sang <wsa@the-dreams.de> >> CC: Russell King <linux@arm.linux.org.uk> >> CC: devicetree at vger.kernel.org >> CC: linux-doc at vger.kernel.org >> CC: linux-i2c at vger.kernel.org >> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> >> --- >> .../devicetree/bindings/i2c/i2c-s3c2410.txt | 1 + >> arch/arm/boot/dts/exynos5250.dtsi | 4 +++ >> arch/arm/boot/dts/exynos5420.dtsi | 4 +++ > > I usually don't take DTS patches. They should go via arm-soc. Please say > so if there are reasons I should take them. I CC'ed to you because same patch contains changes in i2c driver. I am not very sure via which tree this should go. May be I can ask samsung SoC maintainer Kukjin to look into this, as patch 2/2 has changes in mach-exynos which should go via Kukjin's tree. > >> @@ -1084,6 +1092,23 @@ s3c24xx_i2c_parse_dt(struct device_node *np, struct s3c24xx_i2c *i2c) >> of_property_read_u32(np, "samsung,i2c-slave-addr", &pdata->slave_addr); >> of_property_read_u32(np, "samsung,i2c-max-bus-freq", >> (u32 *)&pdata->frequency); >> + /* >> + * Exynos5's legacy i2c controller and new high speed i2c >> + * controller have muxed interrupt sources. By default the >> + * interrupts for 4-channel HS-I2C controller are enabled. >> + * If node for first four channels of legacy i2c controller > > s/node/nodes/ OK. > >> + * are available then re-configure the interrupts via the >> + * system register. >> + */ >> + id = of_alias_get_id(np, "i2c"); >> + i2c->sysreg = syscon_regmap_lookup_by_phandle(np, >> + "samsung,sysreg-phandle"); >> + if (IS_ERR(i2c->sysreg)) { >> + /* As this is not compulsory do not return error */ >> + pr_info("i2c-%d skipping re-configuration of interrutps\n", id); > > I'd say drop this message. If you want to keep it, it should be dev_dbg. OK. > >> + return; >> + } >> + regmap_update_bits(i2c->sysreg, EXYNOS5_SYS_I2C_CFG, BIT(id), 0); >> } > > Rest looks good, thanks! Thanks for review. Pankaj Dubey > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-11-21 10:17 ` Pankaj Dubey @ 2014-11-21 16:47 ` Wolfram Sang 2014-11-22 0:48 ` Kukjin Kim 2014-11-22 0:42 ` Kukjin Kim 1 sibling, 1 reply; 9+ messages in thread From: Wolfram Sang @ 2014-11-21 16:47 UTC (permalink / raw) To: linux-arm-kernel > >I usually don't take DTS patches. They should go via arm-soc. Please say > >so if there are reasons I should take them. > > I CC'ed to you because same patch contains changes in i2c driver. Yes, those should absolutely go via my I2C tree. You need to make a seperate patch out of the dts changes which then also should go via samsung-soc, unless Kukjin says he really wants to go the via I2C. But I guess the latter will just create merge conflicts. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 819 bytes Desc: Digital signature URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141121/b415888f/attachment-0001.sig> ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-11-21 16:47 ` Wolfram Sang @ 2014-11-22 0:48 ` Kukjin Kim 2014-11-24 9:01 ` Pankaj Dubey 0 siblings, 1 reply; 9+ messages in thread From: Kukjin Kim @ 2014-11-22 0:48 UTC (permalink / raw) To: linux-arm-kernel Wolfram Sang wrote: > Hi Wolfram, > > >I usually don't take DTS patches. They should go via arm-soc. Please say > > >so if there are reasons I should take them. > > > > I CC'ed to you because same patch contains changes in i2c driver. > > Yes, those should absolutely go via my I2C tree. You need to make a > seperate patch out of the dts changes which then also should go via > samsung-soc, unless Kukjin says he really wants to go the via I2C. But I > guess the latter will just create merge conflicts. Hmm...I think, Pankaj needs to submit separated patches 1) driver change, 2) dt change and then 3) remove change. And 2nd and 3rd changes should be handed in Samsung tree together after landing 1) change in -next. Of course, 1) change should be handled in i2c tree ;) Thanks, Kukjin ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-11-22 0:48 ` Kukjin Kim @ 2014-11-24 9:01 ` Pankaj Dubey 0 siblings, 0 replies; 9+ messages in thread From: Pankaj Dubey @ 2014-11-24 9:01 UTC (permalink / raw) To: linux-arm-kernel On Saturday 22 November 2014 06:18 AM, Kukjin Kim wrote: > Wolfram Sang wrote: >> > Hi Wolfram, > >>>> I usually don't take DTS patches. They should go via arm-soc. Please say >>>> so if there are reasons I should take them. >>> >>> I CC'ed to you because same patch contains changes in i2c driver. >> >> Yes, those should absolutely go via my I2C tree. You need to make a >> seperate patch out of the dts changes which then also should go via >> samsung-soc, unless Kukjin says he really wants to go the via I2C. But I >> guess the latter will just create merge conflicts. > > Hmm...I think, Pankaj needs to submit separated patches 1) driver change, 2) dt > change and then 3) remove change. And 2nd and 3rd changes should be handed in > Samsung tree together after landing 1) change in -next. > > Of course, 1) change should be handled in i2c tree ;) > Thanks for review and guidance. I separated i2c driver changes and posted it as v6 here [1]. DT changes and mach-exynos removal of i2c settings have been posted as v6 here [2]. Please do review and if OK let's get it merged. [1]: i2c-driver: https://patchwork.kernel.org/patch/5363981/ [2]: mach-exynos: http://comments.gmane.org/gmane.linux.kernel.samsung-soc/40155 Thanks, Pankaj Dubey > Thanks, > Kukjin > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in i2c driver 2014-11-21 10:17 ` Pankaj Dubey 2014-11-21 16:47 ` Wolfram Sang @ 2014-11-22 0:42 ` Kukjin Kim 1 sibling, 0 replies; 9+ messages in thread From: Kukjin Kim @ 2014-11-22 0:42 UTC (permalink / raw) To: linux-arm-kernel Pankaj Dubey wrote: > > On Friday 21 November 2014 12:55 PM, Wolfram Sang wrote: > > On Thu, Oct 30, 2014 at 01:34:29PM +0530, Pankaj Dubey wrote: > >> Let's handle i2c interrupt re-configuration in i2c driver. This will > >> help us in removing some soc specific checks from machine files and > >> will help in removing static iomapping of SYS register in exynos.c > >> > >> Since only Exynos5250, and Exynos5420 has i2c nodes in DT, added syscon > >> based phandle to i2c device nodes of respective SoC DT files. > >> Well...actually there are 4ch i2c in exynos5410 and exynos5800 as well, i2c nodes are not added in dt files though. > >> Also handle saving and restoring of SYS_I2C_CFG register during > >> suspend and resume of i2c driver. > >> > >> CC: Rob Herring <robh+dt@kernel.org> > >> CC: Randy Dunlap <rdunlap@infradead.org> > >> CC: Wolfram Sang <wsa@the-dreams.de> > >> CC: Russell King <linux@arm.linux.org.uk> > >> CC: devicetree at vger.kernel.org > >> CC: linux-doc at vger.kernel.org > >> CC: linux-i2c at vger.kernel.org > >> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> > >> --- > >> .../devicetree/bindings/i2c/i2c-s3c2410.txt | 1 + > >> arch/arm/boot/dts/exynos5250.dtsi | 4 +++ > >> arch/arm/boot/dts/exynos5420.dtsi | 4 +++ > > > > I usually don't take DTS patches. They should go via arm-soc. Please say > > so if there are reasons I should take them. > > I CC'ed to you because same patch contains changes in i2c driver. > I am not very sure via which tree this should go. May be I can ask > samsung SoC maintainer Kukjin to look into this, as patch 2/2 has > changes in mach-exynos which should go via Kukjin's tree. > I'll reply on other email. Thanks, Kukjin ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v4 2/2] ARM: EXYNOS: Remove i2c sys configuration related code 2014-10-30 8:04 [PATCH v4 0/2] Move i2c sys_cfg register configuration to i2c driver Pankaj Dubey 2014-10-30 8:04 ` [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in " Pankaj Dubey @ 2014-10-30 8:04 ` Pankaj Dubey 1 sibling, 0 replies; 9+ messages in thread From: Pankaj Dubey @ 2014-10-30 8:04 UTC (permalink / raw) To: linux-arm-kernel As all these code has been moved into i2c driver, now we can safely remove them from machine files. CC: Russell King <linux@arm.linux.org.uk> Signed-off-by: Pankaj Dubey <pankaj.dubey@samsung.com> --- arch/arm/mach-exynos/exynos.c | 39 ++----------------------------- arch/arm/mach-exynos/include/mach/map.h | 3 --- arch/arm/mach-exynos/pm.c | 3 ++- arch/arm/mach-exynos/regs-sys.h | 22 ----------------- arch/arm/mach-exynos/suspend.c | 7 ------ 5 files changed, 4 insertions(+), 70 deletions(-) delete mode 100644 arch/arm/mach-exynos/regs-sys.h diff --git a/arch/arm/mach-exynos/exynos.c b/arch/arm/mach-exynos/exynos.c index 46d3134..6787b00 100644 --- a/arch/arm/mach-exynos/exynos.c +++ b/arch/arm/mach-exynos/exynos.c @@ -27,20 +27,16 @@ #include <asm/mach/map.h> #include <asm/memory.h> +#include <mach/map.h> + #include "common.h" #include "mfc.h" #include "regs-pmu.h" -#include "regs-sys.h" void __iomem *pmu_base_addr; static struct map_desc exynos4_iodesc[] __initdata = { { - .virtual = (unsigned long)S3C_VA_SYS, - .pfn = __phys_to_pfn(EXYNOS4_PA_SYSCON), - .length = SZ_64K, - .type = MT_DEVICE, - }, { .virtual = (unsigned long)S3C_VA_TIMER, .pfn = __phys_to_pfn(EXYNOS4_PA_TIMER), .length = SZ_16K, @@ -110,11 +106,6 @@ static struct map_desc exynos4_iodesc[] __initdata = { static struct map_desc exynos5_iodesc[] __initdata = { { - .virtual = (unsigned long)S3C_VA_SYS, - .pfn = __phys_to_pfn(EXYNOS5_PA_SYSCON), - .length = SZ_64K, - .type = MT_DEVICE, - }, { .virtual = (unsigned long)S3C_VA_TIMER, .pfn = __phys_to_pfn(EXYNOS5_PA_TIMER), .length = SZ_16K, @@ -262,32 +253,6 @@ static void __init exynos_init_irq(void) static void __init exynos_dt_machine_init(void) { - struct device_node *i2c_np; - const char *i2c_compat = "samsung,s3c2440-i2c"; - unsigned int tmp; - int id; - - /* - * Exynos5's legacy i2c controller and new high speed i2c - * controller have muxed interrupt sources. By default the - * interrupts for 4-channel HS-I2C controller are enabled. - * If node for first four channels of legacy i2c controller - * are available then re-configure the interrupts via the - * system register. - */ - if (soc_is_exynos5()) { - for_each_compatible_node(i2c_np, NULL, i2c_compat) { - if (of_device_is_available(i2c_np)) { - id = of_alias_get_id(i2c_np, "i2c"); - if (id < 4) { - tmp = readl(EXYNOS5_SYS_I2C_CFG); - writel(tmp & ~(0x1 << id), - EXYNOS5_SYS_I2C_CFG); - } - } - } - } - /* * This is called from smp_prepare_cpus if we've built for SMP, but * we still need to set it up for PM and firmware ops if not. diff --git a/arch/arm/mach-exynos/include/mach/map.h b/arch/arm/mach-exynos/include/mach/map.h index f0b7e92..6779d73 100644 --- a/arch/arm/mach-exynos/include/mach/map.h +++ b/arch/arm/mach-exynos/include/mach/map.h @@ -24,9 +24,6 @@ #define EXYNOS_PA_CHIPID 0x10000000 -#define EXYNOS4_PA_SYSCON 0x10010000 -#define EXYNOS5_PA_SYSCON 0x10050100 - #define EXYNOS4_PA_CMU 0x10030000 #define EXYNOS5_PA_CMU 0x10010000 diff --git a/arch/arm/mach-exynos/pm.c b/arch/arm/mach-exynos/pm.c index 86f3ecd..dfc8594 100644 --- a/arch/arm/mach-exynos/pm.c +++ b/arch/arm/mach-exynos/pm.c @@ -23,12 +23,13 @@ #include <asm/smp_scu.h> #include <asm/suspend.h> +#include <mach/map.h> + #include <plat/pm-common.h> #include "common.h" #include "exynos-pmu.h" #include "regs-pmu.h" -#include "regs-sys.h" static inline void __iomem *exynos_boot_vector_addr(void) { diff --git a/arch/arm/mach-exynos/regs-sys.h b/arch/arm/mach-exynos/regs-sys.h deleted file mode 100644 index 84332b0..0000000 --- a/arch/arm/mach-exynos/regs-sys.h +++ /dev/null @@ -1,22 +0,0 @@ -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * http://www.samsung.com - * - * EXYNOS - system register definition - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 as - * published by the Free Software Foundation. -*/ - -#ifndef __ASM_ARCH_REGS_SYS_H -#define __ASM_ARCH_REGS_SYS_H __FILE__ - -#include <mach/map.h> - -#define S5P_SYSREG(x) (S3C_VA_SYS + (x)) - -/* For EXYNOS5 */ -#define EXYNOS5_SYS_I2C_CFG S5P_SYSREG(0x0234) - -#endif /* __ASM_ARCH_REGS_SYS_H */ diff --git a/arch/arm/mach-exynos/suspend.c b/arch/arm/mach-exynos/suspend.c index 079d999..489e99f 100644 --- a/arch/arm/mach-exynos/suspend.c +++ b/arch/arm/mach-exynos/suspend.c @@ -32,7 +32,6 @@ #include "common.h" #include "regs-pmu.h" -#include "regs-sys.h" #include "exynos-pmu.h" #define S5P_CHECK_SLEEP 0x00000BAD @@ -49,10 +48,6 @@ struct exynos_wkup_irq { u32 mask; }; -static struct sleep_save exynos5_sys_save[] = { - SAVE_ITEM(EXYNOS5_SYS_I2C_CFG), -}; - static struct sleep_save exynos_core_save[] = { /* SROM side */ SAVE_ITEM(S5P_SROM_BW), @@ -302,8 +297,6 @@ static const struct exynos_pm_data exynos5250_pm_data = { .wkup_irq = exynos5250_wkup_irq, .wake_disable_mask = ((0xFF << 8) | (0x1F << 1)), .release_ret_regs = exynos_release_ret_regs, - .extra_save = exynos5_sys_save, - .num_extra_save = ARRAY_SIZE(exynos5_sys_save), .pm_suspend = exynos_pm_suspend, .pm_resume = exynos_pm_resume, .pm_prepare = exynos_pm_prepare, -- 1.7.9.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2014-11-24 9:01 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-10-30 8:04 [PATCH v4 0/2] Move i2c sys_cfg register configuration to i2c driver Pankaj Dubey 2014-10-30 8:04 ` [PATCH v4 1/2] i2c: s3c2410: Handle i2c sys_cfg register in " Pankaj Dubey 2014-11-21 7:25 ` Wolfram Sang 2014-11-21 10:17 ` Pankaj Dubey 2014-11-21 16:47 ` Wolfram Sang 2014-11-22 0:48 ` Kukjin Kim 2014-11-24 9:01 ` Pankaj Dubey 2014-11-22 0:42 ` Kukjin Kim 2014-10-30 8:04 ` [PATCH v4 2/2] ARM: EXYNOS: Remove i2c sys configuration related code Pankaj Dubey
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).