Skip to content

Commit

Permalink
ARC: [TB10x] Remove redundant abilis,simple-pinctrl mechanism
Browse files Browse the repository at this point in the history
The TB10x platform port includes a custom mechanism using to set up
default pin controller configurations using abilis,simple-default
pin configurations of nodes compatible with abilis,simple-pinctrl. This
mechanism is redundant with the Linux standard "default" pin
configuration, see commit ab78029
"drivers/pinctrl: grab default handles from device core".
This patch removes the TB10x custom mechanism in favour of the Linux
standard.

Signed-off-by: Christian Ruppert <christian.ruppert@abilis.com>
Reviewed-by: Stephen Warren <swarren@nvidia.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
  • Loading branch information
Christian Ruppert authored and Vineet Gupta committed May 15, 2013
1 parent f722406 commit 7d19273
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 32 deletions.
2 changes: 1 addition & 1 deletion arch/arc/boot/dts/abilis_tb100_dvk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

soc100 {
uart@FF100000 {
pinctrl-names = "abilis,simple-default";
pinctrl-names = "default";
pinctrl-0 = <&pctl_uart0>;
};
ethernet@FE100000 {
Expand Down
2 changes: 1 addition & 1 deletion arch/arc/boot/dts/abilis_tb101_dvk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

soc100 {
uart@FF100000 {
pinctrl-names = "abilis,simple-default";
pinctrl-names = "default";
pinctrl-0 = <&pctl_uart0>;
};
ethernet@FE100000 {
Expand Down
6 changes: 2 additions & 4 deletions arch/arc/boot/dts/abilis_tb10x.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,7 @@
};

uart@FF100000 {
compatible = "snps,dw-apb-uart",
"abilis,simple-pinctrl";
compatible = "snps,dw-apb-uart";
reg = <0xFF100000 0x100>;
clock-frequency = <166666666>;
interrupts = <25 1>;
Expand Down Expand Up @@ -184,8 +183,7 @@
#address-cells = <1>;
#size-cells = <0>;
cell-index = <1>;
compatible = "abilis,tb100-spi",
"abilis,simple-pinctrl";
compatible = "abilis,tb100-spi";
num-cs = <2>;
reg = <0xFE011000 0x20>;
interrupt-parent = <&tb10x_ictl>;
Expand Down
26 changes: 0 additions & 26 deletions arch/arc/plat-tb10x/tb10x.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,31 +34,6 @@ static void __init tb10x_platform_init(void)
of_platform_populate(NULL, of_default_bus_match_table, NULL, NULL);
}

static void __init tb10x_platform_late_init(void)
{
struct device_node *dn;

/*
* Pinctrl documentation recommends setting up the iomux here for
* all modules which don't require control over the pins themselves.
* Modules which need this kind of assistance are compatible with
* "abilis,simple-pinctrl", i.e. we can easily iterate over them.
* TODO: Does this recommended method work cleanly with pins required
* by modules?
*/
for_each_compatible_node(dn, NULL, "abilis,simple-pinctrl") {
struct platform_device *pd = of_find_device_by_node(dn);
struct pinctrl *pctl;

pctl = pinctrl_get_select(&pd->dev, "abilis,simple-default");
if (IS_ERR(pctl)) {
int ret = PTR_ERR(pctl);
dev_err(&pd->dev, "Could not set up pinctrl: %d\n",
ret);
}
}
}

static const char *tb10x_compat[] __initdata = {
"abilis,arc-tb10x",
NULL,
Expand All @@ -67,5 +42,4 @@ static const char *tb10x_compat[] __initdata = {
MACHINE_START(TB10x, "tb10x")
.dt_compat = tb10x_compat,
.init_machine = tb10x_platform_init,
.init_late = tb10x_platform_late_init,
MACHINE_END

0 comments on commit 7d19273

Please sign in to comment.