ARM: berlin: bisect compatible simple-mfd conversion
Subsystems (7)
Sebastian Hesselbarth
maintainercover ARM: berlin: bisect compatible simple-mfd conversion
This is a patch set reworking Antoine's patches to move Berlin's system and chip controller nodes to simple-mfd registered sub-nodes in a bisect compatible way.
Compared to Antoine's patches, I basically first converted the drivers to deal with both single node and simple-mfd sub-node registration, then move the DT nodes over to simple-mfd, and finally drop the old way of registration.
I decided to squash the BG2/BG2CD/BG2Q DT changes into a single patch where applicable instead of the clock node rework patches. I also left the Acked-by from Phillip Zabel (reset), Linus Walleij (pinctrl), and Stephen Boyd (clk) in place for the driver changes as the outcome is the same at the end.
I am still planing to get this into v4.2 as soon as possible, so if Arnd is now happy with the dependency of the patches and none of the maintainers is against it, I'll prepare a PR next week.
@Arnd: This is still based on v4.1-rc1 as I cannot see a stable branch for simple-mfd support. Anything specific you want me to remind you that this depends on simple-mfd?
Sebastian
Antoine Tenart (14):
ARM: berlin: select MFD_SYSCON by default
ARM: berlin: prepare simple-mfd/syscon conversion of sys/chip ctrl
nodes
reset: berlin: convert to a platform driver
ARM: berlin: move reset to simple-mfd nodes
reset: berlin: drop arch_initcall initialization
pinctrl: berlin: prepare to use regmap provided by syscon
ARM: berlin: move pinctrl to simple-mfd nodes
pinctrl: berlin: drop SoC stub provided regmap
clk: berlin: prepare simple-mfd conversion
ARM: berlin: move BG2 clock node
ARM: berlin: move BG2CD clock node
ARM: berlin: move BG2Q clock node
clk: berlin: drop direct of_iomap of nodes reg property
ARM: berlin: remove useless chip and system ctrl compatibles
arch/arm/boot/dts/berlin2.dtsi | 90 +++++++++++++++----------- arch/arm/boot/dts/berlin2cd.dtsi | 66 +++++++++++-------- arch/arm/boot/dts/berlin2q.dtsi | 115 +++++++++++++++++++--------------- arch/arm/mach-berlin/Kconfig | 1 + drivers/clk/berlin/bg2.c | 7 +-- drivers/clk/berlin/bg2q.c | 7 ++- drivers/pinctrl/berlin/berlin-bg2.c | 26 +------- drivers/pinctrl/berlin/berlin-bg2cd.c | 26 +------- drivers/pinctrl/berlin/berlin-bg2q.c | 26 +------- drivers/pinctrl/berlin/berlin.c | 9 ++- drivers/reset/reset-berlin.c | 74 +++++++++------------- 11 files changed, 206 insertions(+), 241 deletions(-)
---
Cc: Philipp Zabel <[email protected]>
Cc: Linus Walleij <[email protected]>
Cc: Stephen Boyd <[email protected]>
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 1/14 ARM: berlin: select MFD_SYSCON by default
From: Antoine Tenart <[email protected]>
The chip and system controller nodes handle sub-devices, such as the clock, pinctrl or reset controllers. The drivers handling them need a regmap provided by syscon. Select it by default when using a Berlin SoC.
--- arch/arm/mach-berlin/Kconfig | 1 + 1 file changed, 1 insertion(+)
arch/arm/mach-berlin/Kconfig +1 -0
@@ -6,6 +6,7 @@ menuconfig ARCH_BERLIN select DW_APB_ICTL select DW_APB_TIMER_OF select GENERIC_IRQ_CHIP + select MFD_SYSCON select PINCTRL if ARCH_BERLIN
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 2/14 ARM: berlin: prepare simple-mfd/syscon conversion of sys/chip ctrl nodes
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
The chip and system controller nodes will be handled by simple-mfd based driver probing. Prepare the conversion by adding "simple-mfd" and "syscon" compatibles to the corresponding nodes.
--- arch/arm/boot/dts/berlin2.dtsi | 4 ++-- arch/arm/boot/dts/berlin2cd.dtsi | 4 ++-- arch/arm/boot/dts/berlin2q.dtsi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/berlin2.dtsi +2 -2
@@ -351,7 +351,7 @@ }; chip: chip-control at ea0000 { - compatible = "marvell,berlin2-chip-ctrl"; + compatible = "marvell,berlin2-chip-ctrl", "simple-mfd", "syscon"; #clock-cells = <1>; #reset-cells = <2>; reg = <0xea0000 0x400>;
@@ -442,7 +442,7 @@ }; sysctrl: system-controller at d000 { - compatible = "marvell,berlin2-system-ctrl"; + compatible = "marvell,berlin2-system-ctrl", "simple-mfd", "syscon"; reg = <0xd000 0x100>; uart0_pmux: uart0-pmux {
arch/arm/boot/dts/berlin2cd.dtsi +2 -2
@@ -295,7 +295,7 @@ }; chip: chip-control at ea0000 { - compatible = "marvell,berlin2cd-chip-ctrl"; + compatible = "marvell,berlin2cd-chip-ctrl", "simple-mfd", "syscon"; #clock-cells = <1>; #reset-cells = <2>; reg = <0xea0000 0x400>;
@@ -389,7 +389,7 @@ }; sysctrl: system-controller at d000 { - compatible = "marvell,berlin2cd-system-ctrl"; + compatible = "marvell,berlin2cd-system-ctrl", "simple-mfd", "syscon"; reg = <0xd000 0x100>; };
arch/arm/boot/dts/berlin2q.dtsi +2 -2
@@ -360,7 +360,7 @@ }; chip: chip-control at ea0000 { - compatible = "marvell,berlin2q-chip-ctrl"; + compatible = "marvell,berlin2q-chip-ctrl", "simple-mfd", "syscon"; #clock-cells = <1>; #reset-cells = <2>; reg = <0xea0000 0x400>, <0xdd0170 0x10>;
@@ -526,7 +526,7 @@ }; sysctrl: pin-controller at d000 { - compatible = "marvell,berlin2q-system-ctrl"; + compatible = "marvell,berlin2q-system-ctrl", "simple-mfd", "syscon"; reg = <0xd000 0x100>; uart0_pmux: uart0-pmux {
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 3/14 reset: berlin: convert to a platform driver
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
The Berlin reset controller was introduced without being a platform driver because of a needed DT rework: the node describing the reset controller also describes the pinctrl and clk controllers...
Prepare conversion by adding a platform driver probe to a new compatible "marvell,berlin2-reset" with syscon regmap.
---
Cc: Philipp Zabel <[email protected]>
--- drivers/reset/reset-berlin.c | 53 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 52 insertions(+), 1 deletion(-)
drivers/reset/reset-berlin.c +52 -1
@@ -11,10 +11,12 @@#include <linux/delay.h> #include <linux/io.h> +#include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h> #include <linux/platform_device.h> +#include <linux/regmap.h> #include <linux/reset-controller.h> #include <linux/slab.h> #include <linux/types.h>
@@ -27,6 +29,7 @@struct berlin_reset_priv {void __iomem *base;unsigned int size; +struct regmap *regmap;struct reset_controller_dev rcdev; };
@@ -37,7 +40,10 @@ static int berlin_reset_reset(struct reset_controller_dev *rcdev,int offset = id >>8 ;int mask =BIT (id &0x1f ); -writel (mask, priv->base + offset); +if (priv->regmap) +regmap_write (priv->regmap, offset, mask); +else +writel (mask, priv->base + offset);/* let the reset be effective */ udelay (10 );
@@ -70,6 +76,51 @@ static int berlin_reset_xlate(struct reset_controller_dev *rcdev,return (offset <<8 ) | bit; } +static int berlin2_reset_probe (struct platform_device *pdev) +{ +struct device_node *parent_np =of_get_parent (pdev->dev.of_node); +struct berlin_reset_priv *priv; + + priv =devm_kzalloc (&pdev->dev,sizeof (*priv),GFP_KERNEL ); +if (!priv) +return -ENOMEM ; + + priv->regmap =syscon_node_to_regmap (parent_np); +of_node_put (parent_np); +if (IS_ERR (priv->regmap)) +return PTR_ERR (priv->regmap); + + priv->rcdev.owner =THIS_MODULE ; + priv->rcdev.ops = &berlin_reset_ops; + priv->rcdev.of_node = pdev->dev.of_node; + priv->rcdev.of_reset_n_cells =2 ; + priv->rcdev.of_xlate = berlin_reset_xlate; + +reset_controller_register (&priv->rcdev); + +return 0 ; +} + +static const struct of_device_id berlin_reset_dt_match[] = { + { .compatible ="marvell,berlin2-reset" }, + { }, +}; +MODULE_DEVICE_TABLE (of, berlin_reset_dt_match); + +static struct platform_driver berlin_reset_driver = { + .probe = berlin2_reset_probe, + .driver = { + .name ="berlin2-reset" , + .of_match_table = berlin_reset_dt_match, + }, +}; +module_platform_driver (berlin_reset_driver); + +MODULE_AUTHOR ("Antoine Tenart <[email protected]>" ); +MODULE_AUTHOR ("Sebastian Hesselbarth <[email protected]>" ); +MODULE_DESCRIPTION ("Marvell Berlin reset driver" ); +MODULE_LICENSE ("GPL" ); +static int __berlin_reset_init (struct device_node *np) {struct berlin_reset_priv *priv;
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 4/14 ARM: berlin: move reset to simple-mfd nodes
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
Now with a proper platform driver for reset and simple-mfd, move to the new marvell,berlin-reset node.
---
Cc: Philipp Zabel <[email protected]>
--- arch/arm/boot/dts/berlin2.dtsi | 6 +++++- arch/arm/boot/dts/berlin2cd.dtsi | 10 +++++++--- arch/arm/boot/dts/berlin2q.dtsi | 12 ++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-)
arch/arm/boot/dts/berlin2.dtsi +5 -1
@@ -353,7 +353,6 @@ chip: chip-control at ea0000 { compatible = "marvell,berlin2-chip-ctrl", "simple-mfd", "syscon"; #clock-cells = <1>; - #reset-cells = <2>; reg = <0xea0000 0x400>; clocks = <&refclk>; clock-names = "refclk";
@@ -362,6 +361,11 @@ groups = "G26"; function = "emmc"; }; + + chip_rst: reset { + compatible = "marvell,berlin2-reset"; + #reset-cells = <2>; + }; }; apb at fc0000 {
arch/arm/boot/dts/berlin2cd.dtsi +7 -3
@@ -84,7 +84,7 @@ compatible = "marvell,berlin2cd-usb-phy"; reg = <0xb74000 0x128>; #phy-cells = <0>; - resets = <&chip 0x178 23>; + resets = <&chip_rst 0x178 23>; status = "disabled"; };
@@ -92,7 +92,7 @@ compatible = "marvell,berlin2cd-usb-phy"; reg = <0xb78000 0x128>; #phy-cells = <0>; - resets = <&chip 0x178 24>; + resets = <&chip_rst 0x178 24>; status = "disabled"; };
@@ -297,7 +297,6 @@ chip: chip-control at ea0000 { compatible = "marvell,berlin2cd-chip-ctrl", "simple-mfd", "syscon"; #clock-cells = <1>; - #reset-cells = <2>; reg = <0xea0000 0x400>; clocks = <&refclk>; clock-names = "refclk";
@@ -306,6 +305,11 @@ groups = "G6"; function = "uart0"; }; + + chip_rst: reset { + compatible = "marvell,berlin2-reset"; + #reset-cells = <2>; + }; }; usb0: usb at ed0000 {
arch/arm/boot/dts/berlin2q.dtsi +8 -4
@@ -127,7 +127,7 @@ compatible = "marvell,berlin2-usb-phy"; reg = <0xa2f400 0x128>; #phy-cells = <0>; - resets = <&chip 0x104 14>; + resets = <&chip_rst 0x104 14>; status = "disabled"; };
@@ -145,7 +145,7 @@ compatible = "marvell,berlin2-usb-phy"; reg = <0xb74000 0x128>; #phy-cells = <0>; - resets = <&chip 0x104 12>; + resets = <&chip_rst 0x104 12>; status = "disabled"; };
@@ -153,7 +153,7 @@ compatible = "marvell,berlin2-usb-phy"; reg = <0xb78000 0x128>; #phy-cells = <0>; - resets = <&chip 0x104 13>; + resets = <&chip_rst 0x104 13>; status = "disabled"; };
@@ -362,7 +362,6 @@ chip: chip-control at ea0000 { compatible = "marvell,berlin2q-chip-ctrl", "simple-mfd", "syscon"; #clock-cells = <1>; - #reset-cells = <2>; reg = <0xea0000 0x400>, <0xdd0170 0x10>; clocks = <&refclk>; clock-names = "refclk";
@@ -376,6 +375,11 @@ groups = "G7"; function = "twsi1"; }; + + chip_rst: reset { + compatible = "marvell,berlin2-reset"; + #reset-cells = <2>; + }; }; ahci: sata at e90000 {
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 5/14 reset: berlin: drop arch_initcall initialization
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
With proper platform driver probing for berlin reset driver, drop the arch_initcall workaround.
---
Cc: Philipp Zabel <[email protected]>
--- drivers/reset/reset-berlin.c | 71 +------------------------------------------- 1 file changed, 1 insertion(+), 70 deletions(-)
drivers/reset/reset-berlin.c +1 -70
@@ -27,8 +27,6 @@ container_of((p), struct berlin_reset_priv, rcdev)struct berlin_reset_priv { -void __iomem *base; -unsigned int size;struct regmap *regmap;struct reset_controller_dev rcdev; };
@@ -40,10 +38,7 @@ static int berlin_reset_reset(struct reset_controller_dev *rcdev,int offset = id >>8 ;int mask =BIT (id &0x1f ); -if (priv->regmap) -regmap_write (priv->regmap, offset, mask); -else -writel (mask, priv->base + offset); +regmap_write (priv->regmap, offset, mask);/* let the reset be effective */ udelay (10 );
@@ -58,7 +53,6 @@ static struct reset_control_ops berlin_reset_ops = {static int berlin_reset_xlate (struct reset_controller_dev *rcdev,const struct of_phandle_args *reset_spec) { -struct berlin_reset_priv *priv =to_berlin_reset_priv (rcdev);unsigned offset, bit;if (WARN_ON (reset_spec->args_count != rcdev->of_reset_n_cells))
@@ -67,9 +61,6 @@ static int berlin_reset_xlate(struct reset_controller_dev *rcdev, offset = reset_spec->args[0 ]; bit = reset_spec->args[1 ]; -if (offset >= priv->size) -return -EINVAL ; -if (bit >=BERLIN_MAX_RESETS )return -EINVAL ;
@@ -120,63 +111,3 @@ MODULE_AUTHOR("Antoine Tenart <[email protected]>");MODULE_AUTHOR ("Sebastian Hesselbarth <[email protected]>" );MODULE_DESCRIPTION ("Marvell Berlin reset driver" );MODULE_LICENSE ("GPL" ); - -static int __berlin_reset_init (struct device_node *np) -{ -struct berlin_reset_priv *priv; -struct resource res; -resource_size_t size; -int ret; - - priv =kzalloc (sizeof (*priv),GFP_KERNEL ); -if (!priv) -return -ENOMEM ; - - ret =of_address_to_resource (np,0 , &res); -if (ret) - goto err; - - size =resource_size (&res); - priv->base =ioremap (res.start, size); -if (!priv->base) { - ret = -ENOMEM ; - goto err; - } - priv->size = size; - - priv->rcdev.owner =THIS_MODULE ; - priv->rcdev.ops = &berlin_reset_ops; - priv->rcdev.of_node = np; - priv->rcdev.of_reset_n_cells =2 ; - priv->rcdev.of_xlate = berlin_reset_xlate; - -reset_controller_register (&priv->rcdev); - -return 0 ; - -err: -kfree (priv); -return ret; -} - -static const struct of_device_id berlin_reset_of_match[]__initconst = { - { .compatible ="marvell,berlin2-chip-ctrl" }, - { .compatible ="marvell,berlin2cd-chip-ctrl" }, - { .compatible ="marvell,berlin2q-chip-ctrl" }, - { }, -}; - -static int __init berlin_reset_init (void ) -{ -struct device_node *np; -int ret; - -for_each_matching_node (np, berlin_reset_of_match) { - ret =__berlin_reset_init (np); -if (ret) -return ret; - } - -return 0 ; -} -arch_initcall (berlin_reset_init);
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 6/14 pinctrl: berlin: prepare to use regmap provided by syscon
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
The Berlin pin controller nodes will be simple-mfd probed sub-nodes of soc-controller and system-controller nodes. The register bank is managed by syscon, which provides a regmap.
Prepare to get the regmap from syscon parent node instead of SoC stub provided regmap.
---
Cc: Linus Walleij <[email protected]>
--- drivers/pinctrl/berlin/berlin-bg2.c | 8 ++++++++ drivers/pinctrl/berlin/berlin-bg2cd.c | 8 ++++++++ drivers/pinctrl/berlin/berlin-bg2q.c | 8 ++++++++ drivers/pinctrl/berlin/berlin.c | 7 ++++++- 4 files changed, 30 insertions(+), 1 deletion(-)
drivers/pinctrl/berlin/berlin-bg2.c +8 -0
@@ -225,6 +225,14 @@ static const struct of_device_id berlin2_pinctrl_match[] = { .compatible = "marvell,berlin2-system-ctrl", .data = &berlin2_sysmgr_pinctrl_data }, + { + .compatible = "marvell,berlin2-soc-pinctrl", + .data = &berlin2_soc_pinctrl_data + }, + { + .compatible = "marvell,berlin2-system-pinctrl", + .data = &berlin2_sysmgr_pinctrl_data + }, {} };MODULE_DEVICE_TABLE (of, berlin2_pinctrl_match);
drivers/pinctrl/berlin/berlin-bg2cd.c +8 -0
@@ -168,6 +168,14 @@ static const struct of_device_id berlin2cd_pinctrl_match[] = { .compatible = "marvell,berlin2cd-system-ctrl", .data = &berlin2cd_sysmgr_pinctrl_data }, + { + .compatible = "marvell,berlin2cd-soc-pinctrl", + .data = &berlin2cd_soc_pinctrl_data + }, + { + .compatible = "marvell,berlin2cd-system-pinctrl", + .data = &berlin2cd_sysmgr_pinctrl_data + }, {} };MODULE_DEVICE_TABLE (of, berlin2cd_pinctrl_match);
drivers/pinctrl/berlin/berlin-bg2q.c +8 -0
@@ -387,6 +387,14 @@ static const struct of_device_id berlin2q_pinctrl_match[] = { .compatible = "marvell,berlin2q-system-ctrl", .data = &berlin2q_sysmgr_pinctrl_data, }, + { + .compatible = "marvell,berlin2q-soc-pinctrl", + .data = &berlin2q_soc_pinctrl_data, + }, + { + .compatible = "marvell,berlin2q-system-pinctrl", + .data = &berlin2q_sysmgr_pinctrl_data, + }, {} };MODULE_DEVICE_TABLE (of, berlin2q_pinctrl_match);
drivers/pinctrl/berlin/berlin.c +6 -1
@@ -11,6 +11,7 @@*/ #include <linux/io.h> +#include <linux/mfd/syscon.h> #include <linux/module.h> #include <linux/of.h> #include <linux/of_address.h>
@@ -295,13 +296,17 @@ int berlin_pinctrl_probe(struct platform_device *pdev, const struct berlin_pinctrl_desc *desc) {struct device *dev = &pdev->dev; +struct device_node *parent_np =of_get_parent (dev->of_node);struct berlin_pinctrl *pctrl;struct regmap *regmap;int ret; regmap =dev_get_regmap (&pdev->dev,NULL );if (!regmap) -return -ENODEV ; + regmap =syscon_node_to_regmap (parent_np); +of_node_put (parent_np); +if (IS_ERR (regmap)) +return PTR_ERR (regmap); pctrl =devm_kzalloc (dev,sizeof (*pctrl),GFP_KERNEL );if (!pctrl)
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 7/14 ARM: berlin: move pinctrl to simple-mfd nodes
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
Now with proper support for simple-mfd probed pinctrl driver, move to the new soc-pinctrl and system-pinctrl nodes.
---
Cc: Linus Walleij <[email protected]>
--- arch/arm/boot/dts/berlin2.dtsi | 38 ++++++++++++++++------------ arch/arm/boot/dts/berlin2cd.dtsi | 14 ++++++++--- arch/arm/boot/dts/berlin2q.dtsi | 53 +++++++++++++++++++++++----------------- 3 files changed, 63 insertions(+), 42 deletions(-)
arch/arm/boot/dts/berlin2.dtsi +22 -16
@@ -357,9 +357,13 @@ clocks = <&refclk>; clock-names = "refclk"; - emmc_pmux: emmc-pmux { - groups = "G26"; - function = "emmc"; + soc_pinctrl: pin-controller { + compatible = "marvell,berlin2-soc-pinctrl"; + + emmc_pmux: emmc-pmux { + groups = "G26"; + function = "emmc"; + }; }; chip_rst: reset {
@@ -449,19 +453,21 @@ compatible = "marvell,berlin2-system-ctrl", "simple-mfd", "syscon"; reg = <0xd000 0x100>; - uart0_pmux: uart0-pmux { - groups = "GSM4"; - function = "uart0"; - }; - - uart1_pmux: uart1-pmux { - groups = "GSM5"; - function = "uart1"; - }; - - uart2_pmux: uart2-pmux { - groups = "GSM3"; - function = "uart2"; + sys_pinctrl: pin-controller { + compatible = "marvell,berlin2-system-pinctrl"; + uart0_pmux: uart0-pmux { + groups = "GSM4"; + function = "uart0"; + }; + + uart1_pmux: uart1-pmux { + groups = "GSM5"; + function = "uart1"; + }; + uart2_pmux: uart2-pmux { + groups = "GSM3"; + function = "uart2"; + }; }; };
arch/arm/boot/dts/berlin2cd.dtsi +11 -3
@@ -301,9 +301,13 @@ clocks = <&refclk>; clock-names = "refclk"; - uart0_pmux: uart0-pmux { - groups = "G6"; - function = "uart0"; + soc_pinctrl: pin-controller { + compatible = "marvell,berlin2cd-soc-pinctrl"; + + uart0_pmux: uart0-pmux { + groups = "G6"; + function = "uart0"; + }; }; chip_rst: reset {
@@ -395,6 +399,10 @@ sysctrl: system-controller at d000 { compatible = "marvell,berlin2cd-system-ctrl", "simple-mfd", "syscon"; reg = <0xd000 0x100>; + + sys_pinctrl: pin-controller { + compatible = "marvell,berlin2cd-system-pinctrl"; + }; }; sic: interrupt-controller at e000 {
arch/arm/boot/dts/berlin2q.dtsi +30 -23
70 lines not on this page · raw message
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 8/14 pinctrl: berlin: drop SoC stub provided regmap
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
With convertsion to simple-mfd sub-nodes, drop the regmap registration by SoC stubs.
---
Cc: Linus Walleij <[email protected]>
--- drivers/pinctrl/berlin/berlin-bg2.c | 30 ------------------------------ drivers/pinctrl/berlin/berlin-bg2cd.c | 30 ------------------------------ drivers/pinctrl/berlin/berlin-bg2q.c | 30 ------------------------------ drivers/pinctrl/berlin/berlin.c | 4 +--- 4 files changed, 1 insertion(+), 93 deletions(-)
drivers/pinctrl/berlin/berlin-bg2.c +0 -30
@@ -218,14 +218,6 @@ static const struct berlin_pinctrl_desc berlin2_sysmgr_pinctrl_data = {static const struct of_device_id berlin2_pinctrl_match[] = { { - .compatible ="marvell,berlin2-chip-ctrl" , - .data = &berlin2_soc_pinctrl_data - }, - { - .compatible ="marvell,berlin2-system-ctrl" , - .data = &berlin2_sysmgr_pinctrl_data - }, - { .compatible ="marvell,berlin2-soc-pinctrl" , .data = &berlin2_soc_pinctrl_data },
@@ -241,28 +233,6 @@ static int berlin2_pinctrl_probe(struct platform_device *pdev) {const struct of_device_id *match =of_match_device (berlin2_pinctrl_match, &pdev->dev); -struct regmap_config *rmconfig; -struct regmap *regmap; -struct resource *res; -void __iomem *base; - - rmconfig =devm_kzalloc (&pdev->dev,sizeof (*rmconfig),GFP_KERNEL ); -if (!rmconfig) -return -ENOMEM ; - - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (base)) -return PTR_ERR (base); - - rmconfig->reg_bits =32 , - rmconfig->val_bits =32 , - rmconfig->reg_stride =4 , - rmconfig->max_register =resource_size (res); - - regmap =devm_regmap_init_mmio (&pdev->dev, base, rmconfig); -if (IS_ERR (regmap)) -return PTR_ERR (regmap);return berlin_pinctrl_probe (pdev, match->data); }
drivers/pinctrl/berlin/berlin-bg2cd.c +0 -30
@@ -161,14 +161,6 @@ static const struct berlin_pinctrl_desc berlin2cd_sysmgr_pinctrl_data = {static const struct of_device_id berlin2cd_pinctrl_match[] = { { - .compatible ="marvell,berlin2cd-chip-ctrl" , - .data = &berlin2cd_soc_pinctrl_data - }, - { - .compatible ="marvell,berlin2cd-system-ctrl" , - .data = &berlin2cd_sysmgr_pinctrl_data - }, - { .compatible ="marvell,berlin2cd-soc-pinctrl" , .data = &berlin2cd_soc_pinctrl_data },
@@ -184,28 +176,6 @@ static int berlin2cd_pinctrl_probe(struct platform_device *pdev) {const struct of_device_id *match =of_match_device (berlin2cd_pinctrl_match, &pdev->dev); -struct regmap_config *rmconfig; -struct regmap *regmap; -struct resource *res; -void __iomem *base; - - rmconfig =devm_kzalloc (&pdev->dev,sizeof (*rmconfig),GFP_KERNEL ); -if (!rmconfig) -return -ENOMEM ; - - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (base)) -return PTR_ERR (base); - - rmconfig->reg_bits =32 , - rmconfig->val_bits =32 , - rmconfig->reg_stride =4 , - rmconfig->max_register =resource_size (res); - - regmap =devm_regmap_init_mmio (&pdev->dev, base, rmconfig); -if (IS_ERR (regmap)) -return PTR_ERR (regmap);return berlin_pinctrl_probe (pdev, match->data); }
drivers/pinctrl/berlin/berlin-bg2q.c +0 -30
@@ -380,14 +380,6 @@ static const struct berlin_pinctrl_desc berlin2q_sysmgr_pinctrl_data = {static const struct of_device_id berlin2q_pinctrl_match[] = { { - .compatible ="marvell,berlin2q-chip-ctrl" , - .data = &berlin2q_soc_pinctrl_data, - }, - { - .compatible ="marvell,berlin2q-system-ctrl" , - .data = &berlin2q_sysmgr_pinctrl_data, - }, - { .compatible ="marvell,berlin2q-soc-pinctrl" , .data = &berlin2q_soc_pinctrl_data, },
@@ -403,28 +395,6 @@ static int berlin2q_pinctrl_probe(struct platform_device *pdev) {const struct of_device_id *match =of_match_device (berlin2q_pinctrl_match, &pdev->dev); -struct regmap_config *rmconfig; -struct regmap *regmap; -struct resource *res; -void __iomem *base; - - rmconfig =devm_kzalloc (&pdev->dev,sizeof (*rmconfig),GFP_KERNEL ); -if (!rmconfig) -return -ENOMEM ; - - res =platform_get_resource (pdev,IORESOURCE_MEM ,0 ); - base =devm_ioremap_resource (&pdev->dev, res); -if (IS_ERR (base)) -return PTR_ERR (base); - - rmconfig->reg_bits =32 , - rmconfig->val_bits =32 , - rmconfig->reg_stride =4 , - rmconfig->max_register =resource_size (res); - - regmap =devm_regmap_init_mmio (&pdev->dev, base, rmconfig); -if (IS_ERR (regmap)) -return PTR_ERR (regmap);return berlin_pinctrl_probe (pdev, match->data); }
drivers/pinctrl/berlin/berlin.c +1 -3
@@ -301,9 +301,7 @@ int berlin_pinctrl_probe(struct platform_device *pdev,struct regmap *regmap;int ret; - regmap =dev_get_regmap (&pdev->dev,NULL ); -if (!regmap) - regmap =syscon_node_to_regmap (parent_np); + regmap =syscon_node_to_regmap (parent_np);of_node_put (parent_np);if (IS_ERR (regmap))return PTR_ERR (regmap);
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 9/14 clk: berlin: prepare simple-mfd conversion
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
Prepare conversion of berlin clk drivers to a simple-mfd sub-node by checking for parent node compatible. If parent node is "syscon" compatible use it for of_iomap instead of the own node.
---
Cc: Stephen Boyd <[email protected]>
--- drivers/clk/berlin/bg2.c | 6 ++++++ drivers/clk/berlin/bg2q.c | 6 ++++++ 2 files changed, 12 insertions(+)
drivers/clk/berlin/bg2.c +6 -0
@@ -502,11 +502,15 @@ static const struct berlin2_gate_data bg2_gates[] __initconst = {static void __init berlin2_clock_setup (struct device_node *np) { +struct device_node *parent_np =of_get_parent (np);const char *parent_names[9 ];struct clk *clk;u8 avpll_flags =0 ;int n; +if (of_device_is_compatible (parent_np,"syscon" )) + np = parent_np; + gbase =of_iomap (np,0 );if (!gbase)return ;
@@ -689,3 +693,5 @@ CLK_OF_DECLARE(berlin2_clock, "marvell,berlin2-chip-ctrl", berlin2_clock_setup);CLK_OF_DECLARE (berlin2cd_clock,"marvell,berlin2cd-chip-ctrl" , berlin2_clock_setup); +CLK_OF_DECLARE (berlin2_clk,"marvell,berlin2-clk" , + berlin2_clock_setup);
drivers/clk/berlin/bg2q.c +6 -0
@@ -290,10 +290,14 @@ static const struct berlin2_gate_data bg2q_gates[] __initconst = {static void __init berlin2q_clock_setup (struct device_node *np) { +struct device_node *parent_np =of_get_parent (np);const char *parent_names[9 ];struct clk *clk;int n; +if (of_device_is_compatible (parent_np,"syscon" )) + np = parent_np; + gbase =of_iomap (np,0 );if (!gbase) {pr_err ("%s: Unable to map global base\n" , np->full_name);
@@ -386,3 +390,5 @@ bg2q_fail: }CLK_OF_DECLARE (berlin2q_clock,"marvell,berlin2q-chip-ctrl" , berlin2q_clock_setup); +CLK_OF_DECLARE (berlin2q_clk,"marvell,berlin2q-clk" , + berlin2q_clock_setup);
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 10/14 ARM: berlin: move BG2 clock node
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
With the introduction of the Berlin simple-mfd controller driver, all drivers previously sharing the chip and system controller nodes now have their own sub-node.
---
Cc: Stephen Boyd <[email protected]>
--- arch/arm/boot/dts/berlin2.dtsi | 42 +++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-)
arch/arm/boot/dts/berlin2.dtsi +23 -19
@@ -56,7 +56,7 @@ sdhci0: sdhci at ab0000 { compatible = "mrvl,pxav3-mmc"; reg = <0xab0000 0x200>; - clocks = <&chip CLKID_SDIO0XIN>, <&chip CLKID_SDIO0>; + clocks = <&chip_clk CLKID_SDIO0XIN>, <&chip_clk CLKID_SDIO0>; clock-names = "io", "core"; interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; status = "disabled";
@@ -65,7 +65,7 @@ sdhci1: sdhci at ab0800 { compatible = "mrvl,pxav3-mmc"; reg = <0xab0800 0x200>; - clocks = <&chip CLKID_SDIO1XIN>, <&chip CLKID_SDIO1>; + clocks = <&chip_clk CLKID_SDIO1XIN>, <&chip_clk CLKID_SDIO1>; clock-names = "io", "core"; interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; status = "disabled";
@@ -75,7 +75,7 @@ compatible = "mrvl,pxav3-mmc"; reg = <0xab1000 0x200>; interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_NFC_ECC>, <&chip CLKID_NFC>; + clocks = <&chip_clk CLKID_NFC_ECC>, <&chip_clk CLKID_NFC>; clock-names = "io", "core"; pinctrl-0 = <&emmc_pmux>; pinctrl-names = "default";
@@ -105,13 +105,13 @@ compatible = "arm,cortex-a9-twd-timer"; reg = <0xad0600 0x20>; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_HIGH)>; - clocks = <&chip CLKID_TWD>; + clocks = <&chip_clk CLKID_TWD>; }; eth1: ethernet at b90000 { compatible = "marvell,pxa168-eth"; reg = <0xb90000 0x10000>; - clocks = <&chip CLKID_GETH1>; + clocks = <&chip_clk CLKID_GETH1>; interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; /* set by bootloader */ local-mac-address = [00 00 00 00 00 00];
@@ -134,7 +134,7 @@ eth0: ethernet at e50000 { compatible = "marvell,pxa168-eth"; reg = <0xe50000 0x10000>; - clocks = <&chip CLKID_GETH0>; + clocks = <&chip_clk CLKID_GETH0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; /* set by bootloader */ local-mac-address = [00 00 00 00 00 00];
@@ -233,7 +233,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c00 0x14>; interrupts = <8>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "okay"; };
@@ -242,7 +242,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c14 0x14>; interrupts = <9>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "okay"; };
@@ -251,7 +251,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c28 0x14>; interrupts = <10>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -260,7 +260,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c3c 0x14>; interrupts = <11>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -269,7 +269,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c50 0x14>; interrupts = <12>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -278,7 +278,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c64 0x14>; interrupts = <13>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -287,7 +287,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c78 0x14>; interrupts = <14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -296,7 +296,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c8c 0x14>; interrupts = <15>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -315,7 +315,7 @@ compatible = "marvell,berlin2-ahci", "generic-ahci"; reg = <0xe90000 0x1000>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_SATA>; + clocks = <&chip_clk CLKID_SATA>; #address-cells = <1>; #size-cells = <0>;
@@ -335,7 +335,7 @@ sata_phy: phy at e900a0 { compatible = "marvell,berlin2-sata-phy"; reg = <0xe900a0 0x200>; - clocks = <&chip CLKID_SATA>; + clocks = <&chip_clk CLKID_SATA>; #address-cells = <1>; #size-cells = <0>; #phy-cells = <1>;
@@ -352,10 +352,14 @@ chip: chip-control at ea0000 { compatible = "marvell,berlin2-chip-ctrl", "simple-mfd", "syscon"; - #clock-cells = <1>; reg = <0xea0000 0x400>; - clocks = <&refclk>; - clock-names = "refclk"; + + chip_clk: clock { + compatible = "marvell,berlin2-clk"; + #clock-cells = <1>; + clocks = <&refclk>; + clock-names = "refclk"; + }; soc_pinctrl: pin-controller { compatible = "marvell,berlin2-soc-pinctrl";
Signature · 1 line
2.1.0
PATCH 10/14 ARM: berlin: move BG2 clock node
Quoted 9 lines · Sebastian Hesselbarth
From: Antoine Tenart <[email protected]>
With the introduction of the Berlin simple-mfd controller driver, all drivers previously sharing the chip and system controller nodes now have their own sub-node.
Signed-off-by Antoine Tenart <[email protected]>Signed-off-by Sebastian Hesselbarth <[email protected]>---
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Sebastian Hesselbarth
maintainerPATCH 11/14 ARM: berlin: move BG2CD clock node
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
With the introduction of the Berlin simple-mfd controller driver, all drivers previously sharing the chip and system controller nodes now have their own sub-node.
---
Cc: Stephen Boyd <[email protected]>
--- arch/arm/boot/dts/berlin2cd.dtsi | 38 +++++++++++++++++++++----------------- 1 file changed, 21 insertions(+), 17 deletions(-)
arch/arm/boot/dts/berlin2cd.dtsi +21 -17
@@ -53,7 +53,7 @@ sdhci0: sdhci at ab0000 { compatible = "mrvl,pxav3-mmc"; reg = <0xab0000 0x200>; - clocks = <&chip CLKID_SDIO0XIN>, <&chip CLKID_SDIO0>; + clocks = <&chip_clk CLKID_SDIO0XIN>, <&chip_clk CLKID_SDIO0>; clock-names = "io", "core"; interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; status = "disabled";
@@ -77,7 +77,7 @@ compatible = "arm,cortex-a9-twd-timer"; reg = <0xad0600 0x20>; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(1) | IRQ_TYPE_LEVEL_HIGH)>; - clocks = <&chip CLKID_TWD>; + clocks = <&chip_clk CLKID_TWD>; }; usb_phy0: usb-phy at b74000 {
@@ -99,7 +99,7 @@ eth1: ethernet at b90000 { compatible = "marvell,pxa168-eth"; reg = <0xb90000 0x10000>; - clocks = <&chip CLKID_GETH1>; + clocks = <&chip_clk CLKID_GETH1>; interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; /* set by bootloader */ local-mac-address = [00 00 00 00 00 00];
@@ -117,7 +117,7 @@ eth0: ethernet at e50000 { compatible = "marvell,pxa168-eth"; reg = <0xe50000 0x10000>; - clocks = <&chip CLKID_GETH0>; + clocks = <&chip_clk CLKID_GETH0>; interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>; /* set by bootloader */ local-mac-address = [00 00 00 00 00 00];
@@ -216,7 +216,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c00 0x14>; interrupts = <8>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "okay"; };
@@ -225,7 +225,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c14 0x14>; interrupts = <9>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "okay"; };
@@ -234,7 +234,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c28 0x14>; interrupts = <10>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -243,7 +243,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c3c 0x14>; interrupts = <11>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -252,7 +252,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c50 0x14>; interrupts = <12>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -261,7 +261,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c64 0x14>; interrupts = <13>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -270,7 +270,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c78 0x14>; interrupts = <14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -279,7 +279,7 @@ compatible = "snps,dw-apb-timer"; reg = <0x2c8c 0x14>; interrupts = <15>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -296,10 +296,14 @@ chip: chip-control at ea0000 { compatible = "marvell,berlin2cd-chip-ctrl", "simple-mfd", "syscon"; - #clock-cells = <1>; reg = <0xea0000 0x400>; - clocks = <&refclk>; - clock-names = "refclk"; + + chip_clk: clock { + compatible = "marvell,berlin2-clk"; + #clock-cells = <1>; + clocks = <&refclk>; + clock-names = "refclk"; + }; soc_pinctrl: pin-controller { compatible = "marvell,berlin2cd-soc-pinctrl";
@@ -320,7 +324,7 @@ compatible = "chipidea,usb2"; reg = <0xed0000 0x200>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_USB0>; + clocks = <&chip_clk CLKID_USB0>; phys = <&usb_phy0>; phy-names = "usb-phy"; status = "disabled";
@@ -330,7 +334,7 @@ compatible = "chipidea,usb2"; reg = <0xee0000 0x200>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_USB1>; + clocks = <&chip_clk CLKID_USB1>; phys = <&usb_phy1>; phy-names = "usb-phy"; status = "disabled";
Signature · 1 line
2.1.0
PATCH 11/14 ARM: berlin: move BG2CD clock node
Quoted 9 lines · Sebastian Hesselbarth
From: Antoine Tenart <[email protected]>
With the introduction of the Berlin simple-mfd controller driver, all drivers previously sharing the chip and system controller nodes now have their own sub-node.
Signed-off-by Antoine Tenart <[email protected]>Signed-off-by Sebastian Hesselbarth <[email protected]>---
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Sebastian Hesselbarth
maintainerPATCH 12/14 ARM: berlin: move BG2Q clock node
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
With the introduction of the Berlin simple-mfd controller driver, all drivers previously sharing the chip and system controller nodes now have their own sub-node.
---
Cc: Stephen Boyd <[email protected]>
--- arch/arm/boot/dts/berlin2q.dtsi | 50 ++++++++++++++++++++++------------------- 1 file changed, 27 insertions(+), 23 deletions(-)
arch/arm/boot/dts/berlin2q.dtsi +27 -23
@@ -74,7 +74,7 @@ sdhci0: sdhci at ab0000 { compatible = "mrvl,pxav3-mmc"; reg = <0xab0000 0x200>; - clocks = <&chip CLKID_SDIO1XIN>; + clocks = <&chip_clk CLKID_SDIO1XIN>; interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
@@ -82,7 +82,7 @@ sdhci1: sdhci at ab0800 { compatible = "mrvl,pxav3-mmc"; reg = <0xab0800 0x200>; - clocks = <&chip CLKID_SDIO1XIN>; + clocks = <&chip_clk CLKID_SDIO1XIN>; interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>; status = "disabled"; };
@@ -91,7 +91,7 @@ compatible = "mrvl,pxav3-mmc"; reg = <0xab1000 0x200>; interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_NFC_ECC>, <&chip CLKID_NFC>; + clocks = <&chip_clk CLKID_NFC_ECC>, <&chip_clk CLKID_NFC>; clock-names = "io", "core"; status = "disabled"; };
@@ -112,7 +112,7 @@ local-timer at ad0600 { compatible = "arm,cortex-a9-twd-timer"; reg = <0xad0600 0x20>; - clocks = <&chip CLKID_TWD>; + clocks = <&chip_clk CLKID_TWD>; interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>; };
@@ -135,7 +135,7 @@ compatible = "chipidea,usb2"; reg = <0xa30000 0x10000>; interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_USB2>; + clocks = <&chip_clk CLKID_USB2>; phys = <&usb_phy2>; phy-names = "usb-phy"; status = "disabled";
@@ -160,7 +160,7 @@ eth0: ethernet at b90000 { compatible = "marvell,pxa168-eth"; reg = <0xb90000 0x10000>; - clocks = <&chip CLKID_GETH0>; + clocks = <&chip_clk CLKID_GETH0>; interrupts = <GIC_SPI 24 IRQ_TYPE_LEVEL_HIGH>; /* set by bootloader */ local-mac-address = [00 00 00 00 00 00];
@@ -267,7 +267,7 @@ reg = <0x1400 0x100>; interrupt-parent = <&aic>; interrupts = <4>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; pinctrl-0 = <&twsi0_pmux>; pinctrl-names = "default"; status = "disabled";
@@ -280,7 +280,7 @@ reg = <0x1800 0x100>; interrupt-parent = <&aic>; interrupts = <5>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; pinctrl-0 = <&twsi1_pmux>; pinctrl-names = "default"; status = "disabled";
@@ -289,7 +289,7 @@ timer0: timer at 2c00 { compatible = "snps,dw-apb-timer"; reg = <0x2c00 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; interrupts = <8>; };
@@ -297,14 +297,14 @@ timer1: timer at 2c14 { compatible = "snps,dw-apb-timer"; reg = <0x2c14 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; }; timer2: timer at 2c28 { compatible = "snps,dw-apb-timer"; reg = <0x2c28 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -312,7 +312,7 @@ timer3: timer at 2c3c { compatible = "snps,dw-apb-timer"; reg = <0x2c3c 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -320,7 +320,7 @@ timer4: timer at 2c50 { compatible = "snps,dw-apb-timer"; reg = <0x2c50 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -328,7 +328,7 @@ timer5: timer at 2c64 { compatible = "snps,dw-apb-timer"; reg = <0x2c64 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -336,7 +336,7 @@ timer6: timer at 2c78 { compatible = "snps,dw-apb-timer"; reg = <0x2c78 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -344,7 +344,7 @@ timer7: timer at 2c8c { compatible = "snps,dw-apb-timer"; reg = <0x2c8c 0x14>; - clocks = <&chip CLKID_CFG>; + clocks = <&chip_clk CLKID_CFG>; clock-names = "timer"; status = "disabled"; };
@@ -361,10 +361,14 @@ chip: chip-control at ea0000 { compatible = "marvell,berlin2q-chip-ctrl", "simple-mfd", "syscon"; - #clock-cells = <1>; reg = <0xea0000 0x400>, <0xdd0170 0x10>; - clocks = <&refclk>; - clock-names = "refclk"; + + chip_clk: clock { + compatible = "marvell,berlin2q-clk"; + #clock-cells = <1>; + clocks = <&refclk>; + clock-names = "refclk"; + }; soc_pinctrl: pin-controller { compatible = "marvell,berlin2q-soc-pinctrl";
@@ -389,7 +393,7 @@ compatible = "marvell,berlin2q-ahci", "generic-ahci"; reg = <0xe90000 0x1000>; interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_SATA>; + clocks = <&chip_clk CLKID_SATA>; #address-cells = <1>; #size-cells = <0>;
@@ -409,7 +413,7 @@ sata_phy: phy at e900a0 { compatible = "marvell,berlin2q-sata-phy"; reg = <0xe900a0 0x200>; - clocks = <&chip CLKID_SATA>; + clocks = <&chip_clk CLKID_SATA>; #address-cells = <1>; #size-cells = <0>; #phy-cells = <1>;
@@ -428,7 +432,7 @@ compatible = "chipidea,usb2"; reg = <0xed0000 0x10000>; interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_USB0>; + clocks = <&chip_clk CLKID_USB0>; phys = <&usb_phy0>; phy-names = "usb-phy"; status = "disabled";
@@ -438,7 +442,7 @@ compatible = "chipidea,usb2"; reg = <0xee0000 0x10000>; interrupts = <GIC_SPI 12 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&chip CLKID_USB1>; + clocks = <&chip_clk CLKID_USB1>; phys = <&usb_phy1>; phy-names = "usb-phy"; status = "disabled";
Signature · 1 line
2.1.0
PATCH 12/14 ARM: berlin: move BG2Q clock node
Quoted 9 lines · Sebastian Hesselbarth
From: Antoine Tenart <[email protected]>
With the introduction of the Berlin simple-mfd controller driver, all drivers previously sharing the chip and system controller nodes now have their own sub-node.
Signed-off-by Antoine Tenart <[email protected]>Signed-off-by Sebastian Hesselbarth <[email protected]>---
Signature · 2 lines
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project
Sebastian Hesselbarth
maintainerPATCH 13/14 clk: berlin: drop direct of_iomap of nodes reg property
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
The Berlin clock driver was sharing a DT node with the pin controller and the reset driver. All these devices are now sub-nodes of the chip controller. This patch rework the Berlin clock driver to allow moving the Berlin clock DT bindings into their own sub-node of the chip controller node.
---
Cc: Stephen Boyd <[email protected]>
--- drivers/clk/berlin/bg2.c | 9 +-------- drivers/clk/berlin/bg2q.c | 9 ++------- 2 files changed, 3 insertions(+), 15 deletions(-)
drivers/clk/berlin/bg2.c +1 -8
@@ -508,10 +508,7 @@ static void __init berlin2_clock_setup(struct device_node *np)u8 avpll_flags =0 ;int n; -if (of_device_is_compatible (parent_np,"syscon" )) - np = parent_np; - - gbase =of_iomap (np,0 ); + gbase =of_iomap (parent_np,0 );if (!gbase)return ;
@@ -689,9 +686,5 @@ static void __init berlin2_clock_setup(struct device_node *np) bg2_fail:iounmap (gbase); } -CLK_OF_DECLARE (berlin2_clock,"marvell,berlin2-chip-ctrl" , - berlin2_clock_setup); -CLK_OF_DECLARE (berlin2cd_clock,"marvell,berlin2cd-chip-ctrl" , - berlin2_clock_setup);CLK_OF_DECLARE (berlin2_clk,"marvell,berlin2-clk" , berlin2_clock_setup);
drivers/clk/berlin/bg2q.c +2 -7
@@ -295,17 +295,14 @@ static void __init berlin2q_clock_setup(struct device_node *np)struct clk *clk;int n; -if (of_device_is_compatible (parent_np,"syscon" )) - np = parent_np; - - gbase =of_iomap (np,0 ); + gbase =of_iomap (parent_np,0 );if (!gbase) {pr_err ("%s: Unable to map global base\n" , np->full_name);return ; }/* BG2Q CPU PLL is not part of global registers */ - cpupll_base =of_iomap (np,1 ); + cpupll_base =of_iomap (parent_np,1 );if (!cpupll_base) {pr_err ("%s: Unable to map cpupll base\n" , np->full_name);iounmap (gbase);
@@ -388,7 +385,5 @@ bg2q_fail:iounmap (cpupll_base);iounmap (gbase); } -CLK_OF_DECLARE (berlin2q_clock,"marvell,berlin2q-chip-ctrl" , - berlin2q_clock_setup);CLK_OF_DECLARE (berlin2q_clk,"marvell,berlin2q-clk" , berlin2q_clock_setup);
Signature · 1 line
2.1.0
Sebastian Hesselbarth
maintainerPATCH 14/14 ARM: berlin: remove useless chip and system ctrl compatibles
In reply to Sebastian HesselbarthFrom: Antoine Tenart <[email protected]>
Now that the rework to have one sub-node per device in the chip and system controllers is done, their dedicated compatible can be removed.
--- arch/arm/boot/dts/berlin2.dtsi | 4 ++-- arch/arm/boot/dts/berlin2cd.dtsi | 4 ++-- arch/arm/boot/dts/berlin2q.dtsi | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/berlin2.dtsi +2 -2
@@ -351,7 +351,7 @@ }; chip: chip-control at ea0000 { - compatible = "marvell,berlin2-chip-ctrl", "simple-mfd", "syscon"; + compatible = "simple-mfd", "syscon"; reg = <0xea0000 0x400>; chip_clk: clock {
@@ -454,7 +454,7 @@ }; sysctrl: system-controller at d000 { - compatible = "marvell,berlin2-system-ctrl", "simple-mfd", "syscon"; + compatible = "simple-mfd", "syscon"; reg = <0xd000 0x100>; sys_pinctrl: pin-controller {
arch/arm/boot/dts/berlin2cd.dtsi +2 -2
@@ -295,7 +295,7 @@ }; chip: chip-control at ea0000 { - compatible = "marvell,berlin2cd-chip-ctrl", "simple-mfd", "syscon"; + compatible = "simple-mfd", "syscon"; reg = <0xea0000 0x400>; chip_clk: clock {
@@ -401,7 +401,7 @@ }; sysctrl: system-controller at d000 { - compatible = "marvell,berlin2cd-system-ctrl", "simple-mfd", "syscon"; + compatible = "simple-mfd", "syscon"; reg = <0xd000 0x100>; sys_pinctrl: pin-controller {
arch/arm/boot/dts/berlin2q.dtsi +2 -2
@@ -360,7 +360,7 @@ }; chip: chip-control at ea0000 { - compatible = "marvell,berlin2q-chip-ctrl", "simple-mfd", "syscon"; + compatible = "simple-mfd", "syscon"; reg = <0xea0000 0x400>, <0xdd0170 0x10>; chip_clk: clock {
@@ -537,7 +537,7 @@ }; sysctrl: pin-controller at d000 { - compatible = "marvell,berlin2q-system-ctrl", "simple-mfd", "syscon"; + compatible = "simple-mfd", "syscon"; reg = <0xd000 0x100>; sys_pinctrl: pin-controller {
Signature · 1 line
2.1.0
cover ARM: berlin: bisect compatible simple-mfd conversion
In reply to Sebastian HesselbarthQuoted 13 lines · On Saturday 16 May 2015 02:23:29 Sebastian Hesselbarth wrote:
This is a patch set reworking Antoine's patches to move Berlin's system and chip controller nodes to simple-mfd registered sub-nodes in a bisect compatible way.
Compared to Antoine's patches, I basically first converted the drivers to deal with both single node and simple-mfd sub-node registration, then move the DT nodes over to simple-mfd, and finally drop the old way of registration.
I decided to squash the BG2/BG2CD/BG2Q DT changes into a single patch where applicable instead of the clock node rework patches. I also left the Acked-by from Phillip Zabel (reset), Linus Walleij (pinctrl), and Stephen Boyd (clk) in place for the driver changes as the outcome is the same at the end.
Quoted 8 lines
I am still planing to get this into v4.2 as soon as possible, so if Arnd is now happy with the dependency of the patches and none of the maintainers is against it, I'll prepare a PR next week.
@Arnd: This is still based on v4.1-rc1 as I cannot see a stable branch for simple-mfd support. Anything specific you want me to remind you that this depends on simple-mfd?
You should be able to see a drivers/simple-mfd branch in arm-soc.git. You can base on top of that.
I think it's fine to merge the entire series into our next/drivers branch, which already has the simple-mfd bits, but you'll still need to rebase on simple-mfd to make bisection work.
Thanks,
ARnd
cover ARM: berlin: bisect compatible simple-mfd conversion
In reply to Sebastian HesselbarthQuoted 4 lines · On Saturday 16 May 2015 02:23:29 Sebastian Hesselbarth wrote:
I am still planing to get this into v4.2 as soon as possible, so if Arnd is now happy with the dependency of the patches and none of the maintainers is against it, I'll prepare a PR next week.
I haven't see the pull request yet, are you still working on it?
Arnd
Sebastian Hesselbarth
maintainercover ARM: berlin: bisect compatible simple-mfd conversion
Quoted 7 lines · Arnd Bergmann
Quoted 4 lines · On Saturday 16 May 2015 02:23:29 Sebastian Hesselbarth wrote:
I am still planing to get this into v4.2 as soon as possible, so if Arnd is now happy with the dependency of the patches and none of the maintainers is against it, I'll prepare a PR next week.
I haven't see the pull request yet, are you still working on it?
I was hoping to find some time to actually test bisectability. How much time do I have left for getting into v4.2 cycle?
Sebastian
cover ARM: berlin: bisect compatible simple-mfd conversion
Quoted 11 lines · On Wednesday 20 May 2015 17:37:26 Sebastian Hesselbarth wrote:
Quoted 7 lines · Arnd Bergmann
Quoted 4 lines · On Saturday 16 May 2015 02:23:29 Sebastian Hesselbarth wrote:
I am still planing to get this into v4.2 as soon as possible, so if Arnd is now happy with the dependency of the patches and none of the maintainers is against it, I'll prepare a PR next week.
I haven't see the pull request yet, are you still working on it?
I was hoping to find some time to actually test bisectability. How much time do I have left for getting into v4.2 cycle?
I've reviewed your patches for possible bisection problems now, and they seem to all be good in this regard. I think it's best if you send a pull request now. It's not urgent yet, but I'd rather have more stuff merged earlier than later.
Arnd