* [U-Boot] [PATCH v2] armv8: layerscape: Enable EHCI access for LS1012A
@ 2018-07-27 2:38 Ran Wang
2018-07-31 21:16 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Ran Wang @ 2018-07-27 2:38 UTC (permalink / raw)
To: u-boot
Program Central Security Unit (CSU) to grant access
permission for USB 2.0 controller, otherwiase EHCI funciton will down.
Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
---
Change in v2:
- Add EL checking code to make sure related programming only happen
in EL3
arch/arm/cpu/armv8/fsl-layerscape/soc.c | 9 +++++++++
arch/arm/include/asm/arch-fsl-layerscape/ns_access.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
index 6a56269..d8c3083 100644
--- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
+++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
@@ -14,6 +14,7 @@
#include <asm/io.h>
#include <asm/global_data.h>
#include <asm/arch-fsl-layerscape/config.h>
+#include <asm/arch-fsl-layerscape/ns_access.h>
#ifdef CONFIG_LAYERSCAPE_NS_ACCESS
#include <fsl_csu.h>
#endif
@@ -668,6 +669,14 @@ void fsl_lsch2_early_init_f(void)
CCI400_DVM_MESSAGE_REQ_EN | CCI400_SNOOP_REQ_EN);
}
+ /*
+ * Program Central Security Unit (CSU) to grant access
+ * permission for USB 2.0 controller
+ */
+#if defined(CONFIG_ARCH_LS1012A) && defined(CONFIG_USB_EHCI_FSL)
+ if (current_el() == 3)
+ set_devices_ns_access(CSU_CSLX_USB_2, CSU_ALL_RW);
+#endif
/* Erratum */
erratum_a008850_early(); /* part 1 of 2 */
erratum_a009929();
diff --git a/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h b/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h
index fe97a93..d1b8efa 100644
--- a/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h
+++ b/arch/arm/include/asm/arch-fsl-layerscape/ns_access.h
@@ -40,6 +40,7 @@ enum csu_cslx_ind {
CSU_CSLX_ESDHC,
CSU_CSLX_IFC = 45,
CSU_CSLX_I2C1,
+ CSU_CSLX_USB_2,
CSU_CSLX_I2C3 = 48,
CSU_CSLX_I2C2,
CSU_CSLX_DUART2 = 50,
--
2.7.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH v2] armv8: layerscape: Enable EHCI access for LS1012A
2018-07-27 2:38 [U-Boot] [PATCH v2] armv8: layerscape: Enable EHCI access for LS1012A Ran Wang
@ 2018-07-31 21:16 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2018-07-31 21:16 UTC (permalink / raw)
To: u-boot
On 07/26/2018 07:38 PM, Ran Wang wrote:
> Program Central Security Unit (CSU) to grant access
> permission for USB 2.0 controller, otherwiase EHCI funciton will down.
>
> Signed-off-by: Ran Wang <ran.wang_1@nxp.com>
> ---
> Change in v2:
> - Add EL checking code to make sure related programming only happen
> in EL3
>
> arch/arm/cpu/armv8/fsl-layerscape/soc.c | 9 +++++++++
> arch/arm/include/asm/arch-fsl-layerscape/ns_access.h | 1 +
> 2 files changed, 10 insertions(+)
>
> diff --git a/arch/arm/cpu/armv8/fsl-layerscape/soc.c b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
> index 6a56269..d8c3083 100644
> --- a/arch/arm/cpu/armv8/fsl-layerscape/soc.c
> +++ b/arch/arm/cpu/armv8/fsl-layerscape/soc.c
> @@ -14,6 +14,7 @@
> #include <asm/io.h>
> #include <asm/global_data.h>
> #include <asm/arch-fsl-layerscape/config.h>
> +#include <asm/arch-fsl-layerscape/ns_access.h>
Including this header has a problem. It declares and initializes
ns_dev[], causing a compiling warning for soc.c. Please fix.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-31 21:16 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 2:38 [U-Boot] [PATCH v2] armv8: layerscape: Enable EHCI access for LS1012A Ran Wang
2018-07-31 21:16 ` York Sun
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.