Skip to content

Commit f81b3e0

Browse files
evgeniy-paltsevcarlescufi
authored andcommitted
ARC: boards: HSDK: ged rid of pinmux usage
Pinmux is deprecated (see #39740) so let's get rid of it's usage for HSDK board. As we call pinmux only once at init phase we simply do register setup in platform code instead of pinmux. Signed-off-by: Evgeniy Paltsev <[email protected]> Signed-off-by: Eugeniy Paltsev <[email protected]>
1 parent dfabb2e commit f81b3e0

File tree

6 files changed

+23
-46
lines changed

6 files changed

+23
-46
lines changed

boards/arc/hsdk/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@
44
# SPDX-License-Identifier: Apache-2.0
55
#
66

7-
zephyr_sources_ifdef(CONFIG_PINMUX_HSDK pinmux.c)
7+
zephyr_sources(platform.c)

boards/arc/hsdk/hsdk_2cores_defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ CONFIG_ARCV2_TIMER=y
1111
CONFIG_CONSOLE=y
1212
CONFIG_UART_CONSOLE=y
1313
CONFIG_SERIAL=y
14-
CONFIG_PINMUX=y
15-
CONFIG_PINMUX_HSDK=y
1614
CONFIG_GPIO=y
1715
CONFIG_SPI=y
1816
CONFIG_SMP=y

boards/arc/hsdk/hsdk_defconfig

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ CONFIG_ARCV2_TIMER=y
1111
CONFIG_CONSOLE=y
1212
CONFIG_UART_CONSOLE=y
1313
CONFIG_SERIAL=y
14-
CONFIG_PINMUX=y
15-
CONFIG_PINMUX_HSDK=y
1614
CONFIG_GPIO=y
1715
CONFIG_SPI=y
1816
CONFIG_SMP=y

boards/arc/hsdk/pinmux.c

Lines changed: 0 additions & 36 deletions
This file was deleted.

boards/arc/hsdk/platform.c

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2022 Synopsys
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <soc.h>
8+
#include <init.h>
9+
10+
#define HSDK_CREG_GPIO_MUX_REG 0xf0001484
11+
#define HSDK_CREG_GPIO_MUX_VAL 0x00000400
12+
13+
static int hsdk_creg_gpio_mux_init(const struct device *dev)
14+
{
15+
ARG_UNUSED(dev);
16+
17+
sys_write32(HSDK_CREG_GPIO_MUX_REG, HSDK_CREG_GPIO_MUX_VAL);
18+
19+
return 0;
20+
}
21+
22+
SYS_INIT(hsdk_creg_gpio_mux_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);

dts/arc/synopsys/arc_hsdk.dtsi

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@
6666
reg = <0x90000000 0x50000000>;
6767
};
6868

69-
pinctrl: pinctrl@f0001484 {
70-
compatible = "snps,creg-gpio-mux-hsdk";
71-
reg = <0xf0001484 0x4>;
72-
};
73-
7469
uart0: uart@f0005000 {
7570
compatible = "ns16550";
7671
clock-frequency = <33333333>;

0 commit comments

Comments
 (0)