Updates for ARC VDK platform
Subsystems (2)
cover Updates for ARC VDK platform
This series improves ARC VDK support in upstream Linux kernel by:
1) Removal of UP configuration which is no longer supported by ARC VDK. Instead SMP platform with all but master cores halted is used to mimic UP system.
2) Adding off-the-tree patches that enable MMC card and UIO
Alexey Brodkin (3):
arc: vdk: Disable halt on reset
arc: vdk: Add support of MMC controller
arc: vdk: Add support of UIO
arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 26 ++++++++++++++++++++++++++ arch/arc/configs/vdk_hs38_smp_defconfig | 10 +++++++--- 2 files changed, 33 insertions(+), 3 deletions(-)
Signature · 1 line
2.7.4
PATCH 1/3 arc: vdk: Disable halt on reset
In recent VDKs ARC cores are configured as "run on reset" which made existing kernel configuration outdated to effect that slave cores never start execution of the code keeping only master online.
With that fix we're again in sync with VDK platform.
And while at it we regenerate defconfig via savedefconfig so default options are now excluded.
--- arch/arc/configs/vdk_hs38_smp_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)
arch/arc/configs/vdk_hs38_smp_defconfig +1 -3
@@ -15,7 +15,7 @@ CONFIG_ARC_PLAT_AXS10X=y CONFIG_AXS103=y CONFIG_ISA_ARCV2=y CONFIG_SMP=y -# CONFIG_ARC_TIMERS_64BIT is not set +# CONFIG_ARC_SMP_HALT_ON_RESET is not set CONFIG_ARC_UBOOT_SUPPORT=y CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp" CONFIG_PREEMPT=y
@@ -56,7 +56,6 @@ CONFIG_NATIONAL_PHY=y CONFIG_MOUSE_PS2_TOUCHKIT=y CONFIG_SERIO_ARC_PS2=y # CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y
@@ -80,7 +79,6 @@ CONFIG_USB_STORAGE=y CONFIG_USB_SERIAL=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_NTFS_FS=y
Signature · 1 line
2.7.4
Re: [PATCH 1/3] arc: vdk: Disable halt on reset
Quoted 20 lines · Alexey Brodkin
In recent VDKs ARC cores are configured as "run on reset" which made existing kernel configuration outdated to effect that slave cores never start execution of the code keeping only master online.
With that fix we're again in sync with VDK platform.
And while at it we regenerate defconfig via savedefconfig so default options are now excluded.
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>--- arch/arc/configs/vdk_hs38_smp_defconfig | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-)arch/arc/configs/vdk_hs38_smp_defconfig +0
-0
arch/arc/configs/vdk_hs38_smp_defconfig CONFIG_ARC_PLAT_AXS10X=y · line 18
Quoted 4 lines
arch/arc/configs/vdk_hs38_smp_defconfig +0
-1@@ -15,7 +15,7 @@ CONFIG_ARC_PLAT_AXS10X=y CONFIG_AXS103=y CONFIG_ISA_ARCV2=y CONFIG_SMP=y -# CONFIG_ARC_TIMERS_64BIT is not set
Are you sure abut this part. Ater the timers driver rework, this would enable GFRC for SMP builds and AFAIKR there were some issues with time with GFRC + nSIM etc..
Quoted 21 lines
arch/arc/configs/vdk_hs38_smp_defconfig +1
-2+# CONFIG_ARC_SMP_HALT_ON_RESET is not set CONFIG_ARC_UBOOT_SUPPORT=y CONFIG_ARC_BUILTIN_DTB_NAME="vdk_hs38_smp" CONFIG_PREEMPT=y@@ -56,7 +56,6 @@ CONFIG_NATIONAL_PHY=y CONFIG_MOUSE_PS2_TOUCHKIT=y CONFIG_SERIO_ARC_PS2=y # CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set CONFIG_SERIAL_8250=y CONFIG_SERIAL_8250_CONSOLE=y CONFIG_SERIAL_8250_DW=y@@ -80,7 +79,6 @@ CONFIG_USB_STORAGE=y CONFIG_USB_SERIAL=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT3_FS=y -CONFIG_EXT4_FS=y CONFIG_MSDOS_FS=y CONFIG_VFAT_FS=y CONFIG_NTFS_FS=y
Re: [PATCH 1/3] arc: vdk: Disable halt on reset
Hi Vineet,
Quoted 17 lines · Vineet Gupta
Quoted 16 lines · Alexey Brodkin
In recent VDKs ARC cores are configured as "run on reset" which made existing kernel configuration outdated to effect that slave cores never start execution of the code keeping only master online.
With that fix we're again in sync with VDK platform.
And while at it we regenerate defconfig via savedefconfig so default options are now excluded.
Signed-off-by Alexey Brodkin <abrodkin at synopsys.com>---
?arch/arc/configs/vdk_hs38_smp_defconfig | 4 +---
?1 file changed, 1 insertion(+), 3 deletions(-)
Quoted 12 lines
Quoted 9 lines
arch/arc/configs/vdk_hs38_smp_defconfig +0
-0@@ -15,7 +15,7 @@ CONFIG_ARC_PLAT_AXS10X=y?CONFIG_AXS103=y
?CONFIG_ISA_ARCV2=y
?CONFIG_SMP=y
-#CONFIG_ARC_TIMERS_64BITis not setAre you sure abut this part. Ater the timers driver rework, this would enable GFRC for SMP builds and AFAIKR there were some issues with time with GFRC + nSIM etc..
Not anymore :)
Probably I missed something in discussions.
As a matter of fact I did run-test resulting vmlinux and it worked very nice. More over?ARC_TIMERS_64BIT is selected automatically by?ISA_ARCV2, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/Kconfig#n119
That said even if "# CONFIG_ARC_TIMERS_64BIT is not set" is left in place the option will be effectively enabled, no?
-Alexey
Re: [PATCH 1/3] arc: vdk: Disable halt on reset
Quoted 8 lines · Alexey Brodkin
Quoted 4 lines
Quoted 1 line
-#
CONFIG_ARC_TIMERS_64BITis not setAre you sure abut this part. Ater the timers driver rework, this would enable GFRC for SMP builds and AFAIKR there were some issues with time with GFRC + nSIM etc..
Not anymore :)
Probably I missed something in discussions.
STAR 9000879565, 9000879563
Quoted 6 lines
As a matter of fact I did run-test resulting vmlinux and it worked very nice. More over
ARC_TIMERS_64BITis selected automatically byISA_ARCV2, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/Kconfig#n119That said even if "#
CONFIG_ARC_TIMERS_64BITis not set" is left in place the option will be effectively enabled, no?
The whole point of adding this to defconfig is to override the default from Kconfig ?
Re: [PATCH 1/3] arc: vdk: Disable halt on reset
Hi Vineet,
Quoted 16 lines · Vineet Gupta
Quoted 11 lines · Alexey Brodkin
Quoted 7 lines
Quoted 4 lines
-#
CONFIG_ARC_TIMERS_64BITis not setAre you sure abut this part. Ater the timers driver rework, this would enable GFRC for SMP builds and AFAIKR there were some issues with time with GFRC + nSIM etc..
Not anymore :)
Probably I missed something in discussions.
STAR 9000879565, 9000879563
Quoted 1 line
Quoted 8 lines
Quoted 6 lines
As a matter of fact I did run-test resulting vmlinux and it worked very nice. More over
ARC_TIMERS_64BITis selected automatically byISA_ARCV2, see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/arch/arc/Kconfig#n119That said even if "#
CONFIG_ARC_TIMERS_64BITis not set" is left in place the option will be effectively enabled, no?The whole point of adding this to defconfig is to override the default from
Kconfig?
Not anymore :)
Since commit?c4c9a040ecb7 ("clocksource: import ARC timer driver"), see?http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4c9a040ecb7297e011e579f5a9cc280e42d725f we have this:
---------------------->8----------------------
config ISA_ARCV2
bool "ARC ISA v2"
select ARC_TIMERS_64BIT
---------------------->8----------------------
which really means if one selects ISA_ARCV2 then ARC_TIMERS_64BIT gets selected automatically and there's no way to override it from either menuconfig or defconfig.
Probably behavior that you meant was to keep a separate "config ARC_TIMERS_64BIT" and have it "default y if ISA_ARCV2".
-Alexey
Re: [PATCH 1/3] arc: vdk: Disable halt on reset
Quoted 12 lines · Alexey Brodkin
Quoted 1 line
The whole point of adding this to defconfig is to override the default from
Kconfig?Not anymore :)
Since commit
c4c9a040ecb7("clocksource: import ARC timer driver"),
see http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=c4c9a040ecb7297e011e579f5a9cc280e42d725f
we have this:
---------------------->8----------------------
configISA_ARCV2
bool "ARC ISA v2"
selectARC_TIMERS_64BIT
---------------------->8----------------------
Quoted 2 lines
which really means if one selects
ISA_ARCV2thenARC_TIMERS_64BITgets selected automatically and there's no way to override it from either menuconfig or defconfig.
Bummer - this means VDK based off 4.9+ kernel might be affected with nsim GFRC issue !
Quoted 2 lines
Probably behavior that you meant was to keep a separate "config
ARC_TIMERS_64BIT" and have it "default y ifISA_ARCV2".
No, the whole point of moving it out of arch/arc was to increase test coverage etc so it was not tied to ISA_ARCV2 on purpose so that it would atleast build.
Lets see what Rudd has to say abt this. But GFRC can't be used this would need fixing after all by introducing an additional ARC_PLAT_CANT_USE_TIMERS_64BIT which is def_bool set to n, but selected y in VDK Kconfig.
-Vineet
RE: [PATCH 1/3] arc: vdk: Disable halt on reset
Hi Vineet,
Quoted 24 lines
-----Original Message-----
From: Vineet Gupta [mailto:vgupta at synopsys.com]
Sent: Wednesday, February 1, 2017 10:56 PM
To: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
Cc: Ruud Derwig <rderwig at synopsys.com>; linux-kernel at vger.kernel.org; linux-snps-arc at lists.infradead.org
Subject: Re: [PATCH 1/3] arc: vdk: Disable halt on resetQuoted 1 line · Alexey Brodkin
Quoted 1 line
The whole point of adding this to defconfig is to override the default from
Kconfig?Quoted 13 lines
Not anymore :)
Since commit
c4c9a040ecb7("clocksource: import ARC timer driver"), see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/
?id=c4c9a040ecb7297e011e579f5a9cc280e42d725f
we have this:
---------------------->8----------------------
configISA_ARCV2
bool "ARC ISA v2"
selectARC_TIMERS_64BIT
---------------------->8----------------------
Quoted 6 lines
Quoted 2 lines
which really means if one selects
ISA_ARCV2thenARC_TIMERS_64BITgets selected automatically and there's no way to override it from eithermenuconfig or defconfig.
Bummer - this means VDK based off 4.9+ kernel might be affected with nsim GFRC issue !
One note here - I think it only affects 4.10+ kernels.
-Aexey
RE: [PATCH 1/3] arc: vdk: Disable halt on reset
In reply to Vineet GuptaHi,
VDK config includes GRFC, not sure if it's working/used though.
The nSIM STAR is about that GRFC frequency is fixed in nSIM, but configurable for HW/customers. But if the frequency is configured correctly (same as cpu frequency), don't think there's an issue.
Ruud.
-----Original Message-----
From: Vineet Gupta
Sent: Wednesday, February 01, 2017 8:56 PM
To: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
Cc: Ruud Derwig <rderwig at synopsys.com>; linux-kernel at vger.kernel.org; linux-snps-arc at lists.infradead.org
Subject: Re: [PATCH 1/3] arc: vdk: Disable halt on reset
Quoted 14 lines · Alexey Brodkin
Quoted 1 line
The whole point of adding this to defconfig is to override the default from
Kconfig?Not anymore :)
Since commit
c4c9a040ecb7("clocksource: import ARC timer driver"), see
http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/
?id=c4c9a040ecb7297e011e579f5a9cc280e42d725f
we have this:
---------------------->8----------------------
configISA_ARCV2
bool "ARC ISA v2"
selectARC_TIMERS_64BIT
---------------------->8----------------------
Quoted 2 lines
which really means if one selects
ISA_ARCV2thenARC_TIMERS_64BITgets selected automatically and there's no way to override it from either menuconfig or defconfig.
Bummer - this means VDK based off 4.9+ kernel might be affected with nsim GFRC issue !
Quoted 2 lines
Probably behavior that you meant was to keep a separate "config
ARC_TIMERS_64BIT" and have it "default y ifISA_ARCV2".
No, the whole point of moving it out of arch/arc was to increase test coverage etc so it was not tied to ISA_ARCV2 on purpose so that it would atleast build.
Lets see what Rudd has to say abt this. But GFRC can't be used this would need fixing after all by introducing an additional ARC_PLAT_CANT_USE_TIMERS_64BIT which is def_bool set to n, but selected y in VDK Kconfig.
-Vineet
PATCH 2/3 arc: vdk: Add support of MMC controller
In reply to Alexey BrodkinARC VDK virtual platform emulates host MMC controller (DW Mobile Storage) and moreover rootfs is situated on that virtual card.
--- arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 18 ++++++++++++++++++ arch/arc/configs/vdk_hs38_smp_defconfig | 4 ++++ 2 files changed, 22 insertions(+)
arch/arc/boot/dts/vdk_axs10x_mb.dtsi +18 -0
@@ -23,6 +23,12 @@ #clock-cells = <0>; }; + mmcclk: mmcclk { + compatible = "fixed-clock"; + clock-frequency = <50000000>; + #clock-cells = <0>; + }; + pguclk: pguclk { #clock-cells = <0>; compatible = "fixed-clock";
@@ -94,5 +100,17 @@ interrupts = <5>; interrupt-names = "arc_ps2_irq"; }; + + mmc at 0x15000 { + compatible = "snps,dw-mshc"; + reg = <0x15000 0x400>; + num-slots = <1>; + fifo-depth = <1024>; + card-detect-delay = <200>; + clocks = <&apbclk>, <&mmcclk>; + clock-names = "biu", "ciu"; + interrupts = <7>; + bus-width = <4>; + }; }; };
arch/arc/configs/vdk_hs38_smp_defconfig +4 -0
@@ -77,6 +77,10 @@ CONFIG_USB_OHCI_HCD=y CONFIG_USB_OHCI_HCD_PLATFORM=y CONFIG_USB_STORAGE=y CONFIG_USB_SERIAL=y +CONFIG_MMC=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_PLTFM=y +CONFIG_MMC_DW=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT3_FS=y CONFIG_MSDOS_FS=y
Signature · 1 line
2.7.4
PATCH 3/3 arc: vdk: Add support of UIO
In reply to Alexey BrodkinARC VDK for EVSS uses UIO for communication with Embedded Vision Subsystem.
--- arch/arc/boot/dts/vdk_axs10x_mb.dtsi | 8 ++++++++ arch/arc/configs/vdk_hs38_smp_defconfig | 2 ++ 2 files changed, 10 insertions(+)
arch/arc/boot/dts/vdk_axs10x_mb.dtsi +8 -0
@@ -112,5 +112,13 @@ interrupts = <7>; bus-width = <4>; }; + + /* Embedded Vision subsystem UIO mappings; only relevant for EV VDK */ + uio_ev: uio at 0xD0000000 { + compatible = "generic-uio"; + reg = <0xD0000000 0x2000 0xD1000000 0x2000 0x90000000 0x10000000 0xC0000000 0x10000000>; + reg-names = "ev_gsa", "ev_ctrl", "ev_shared_mem", "ev_code_mem"; + interrupts = <23>; + }; }; };
arch/arc/configs/vdk_hs38_smp_defconfig +2 -0
@@ -81,6 +81,8 @@ CONFIG_MMC=y CONFIG_MMC_SDHCI=y CONFIG_MMC_SDHCI_PLTFM=y CONFIG_MMC_DW=y +CONFIG_UIO=y +CONFIG_UIO_PDRV_GENIRQ=y # CONFIG_IOMMU_SUPPORT is not set CONFIG_EXT3_FS=y CONFIG_MSDOS_FS=y
Signature · 1 line
2.7.4
Quoted 4 lines · Alexey Brodkin
This series improves ARC VDK support in upstream Linux kernel by:
1) Removal of UP configuration which is no longer supported by ARC VDK. Instead SMP platform with all but master cores halted is used to mimic UP system.
Is this missing from the series ?
Hi Vineet,
Quoted 8 lines · Vineet Gupta
Quoted 5 lines · Alexey Brodkin
This series improves ARC VDK support in upstream Linux kernel by:
?1) Removal of UP configuration which is no longer supported by ARC VDK. ????Instead SMP platform with all but master cores halted is used to mimic ????UP system.Is this missing from the series ?
Indeed, I was doing 2 things in parallel and so missed -1 patch :( I may either send v2 with missing patch included or save it for another series that ditches most of UP configs as well. What suits you better?
-Alexey
Quoted 4 lines · Alexey Brodkin
Hi Vineet,
Quoted 1 line · Vineet Gupta
On 02/01/2017 08:43 AM, Alexey Brodkin wrote:
Quoted 8 lines
Quoted 5 lines
Quoted 4 lines
This series improves ARC VDK support in upstream Linux kernel by:
1) Removal of UP configuration which is no longer supported by ARC VDK. Instead SMP platform with all but master cores halted is used to mimic UP system.Is this missing from the series ?
Indeed, I was doing 2 things in parallel and so missed -1 patch :( I may either send v2 with missing patch included or save it for another series that ditches most of UP configs as well. What suits you better?
Latter would be better !
-Vineet
Hi Vineet,
Quoted 12 lines · Vineet Gupta
Quoted 11 lines · Alexey Brodkin
Hi Vineet,
Quoted 7 lines · Vineet Gupta
Quoted 5 lines · Alexey Brodkin
This series improves ARC VDK support in upstream Linux kernel by:
?1) Removal of UP configuration which is no longer supported by ARC VDK. ????Instead SMP platform with all but master cores halted is used to mimic ????UP system.
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
Is this missing from the series ?
Indeed, I was doing 2 things in parallel and so missed -1 patch :( I may either send v2 with missing patch included or save it for another series that ditches most of UP configs as well. What suits you better?
Latter would be better !
So then you're going to apply existing series as it is sometime soon and in the meantime I'll prepare another one, right?
-Alexey