* [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM
@ 2018-05-14 5:26 Alexander Kurz
2018-05-14 5:26 ` [PATCH 2/2] ARM: i.MX50: Record reset reason as a part of startup Alexander Kurz
2018-05-14 7:53 ` [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM Sascha Hauer
0 siblings, 2 replies; 3+ messages in thread
From: Alexander Kurz @ 2018-05-14 5:26 UTC (permalink / raw)
To: barebox, Sascha Hauer; +Cc: Andrey Smirnov, Alexander Kurz
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/mach-imx/imx50.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c
index d6ff6dfc2..6d121eaf8 100644
--- a/arch/arm/mach-imx/imx50.c
+++ b/arch/arm/mach-imx/imx50.c
@@ -83,7 +83,7 @@ int imx50_devices_init(void)
void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
{
- void __iomem *ccm = (void __iomem *)MX50_CCM_BASE_ADDR;
+ void __iomem *ccm = IOMEM(MX50_CCM_BASE_ADDR);
u32 r;
imx5_init_lowlevel();
@@ -113,11 +113,11 @@ void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
writel(0x4, ccm + MX5_CCM_CCSR);
if (cpufreq_mhz == 400)
- imx5_setup_pll_400((void __iomem *)MX50_PLL1_BASE_ADDR);
+ imx5_setup_pll_400(IOMEM(MX50_PLL1_BASE_ADDR));
else
- imx5_setup_pll_800((void __iomem *)MX50_PLL1_BASE_ADDR);
+ imx5_setup_pll_800(IOMEM(MX50_PLL1_BASE_ADDR));
- imx5_setup_pll_216((void __iomem *)MX50_PLL3_BASE_ADDR);
+ imx5_setup_pll_216(IOMEM(MX50_PLL3_BASE_ADDR));
/* Switch peripheral to PLL3 */
writel(0x00015154, ccm + MX5_CCM_CBCMR);
@@ -126,7 +126,7 @@ void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
/* make sure change is effective */
while (readl(ccm + MX5_CCM_CDHIPR));
- imx5_setup_pll_400((void __iomem *)MX50_PLL2_BASE_ADDR);
+ imx5_setup_pll_400(IOMEM(MX50_PLL2_BASE_ADDR));
/* Switch peripheral to PLL2 */
r = 0x02800145 |
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 2/2] ARM: i.MX50: Record reset reason as a part of startup
2018-05-14 5:26 [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM Alexander Kurz
@ 2018-05-14 5:26 ` Alexander Kurz
2018-05-14 7:53 ` [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Alexander Kurz @ 2018-05-14 5:26 UTC (permalink / raw)
To: barebox, Sascha Hauer; +Cc: Andrey Smirnov, Alexander Kurz
The given SRSR register location is also valid for the i.MX50.
Signed-off-by: Alexander Kurz <akurz@blala.de>
---
arch/arm/mach-imx/imx50.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c
index 6d121eaf8..f7cbc9d4b 100644
--- a/arch/arm/mach-imx/imx50.c
+++ b/arch/arm/mach-imx/imx50.c
@@ -21,6 +21,7 @@
#include <mach/revision.h>
#include <mach/clock-imx51_53.h>
#include <mach/generic.h>
+#include <mach/reset-reason.h>
#define SI_REV 0x48
@@ -49,7 +50,10 @@ static int imx50_silicon_revision(void)
int imx50_init(void)
{
+ void __iomem *src = IOMEM(MX50_SRC_BASE_ADDR);
+
imx50_silicon_revision();
+ imx_set_reset_reason(src + IMX_SRC_SRSR, imx_reset_reasons);
imx53_boot_save_loc();
return 0;
--
2.11.0
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM
2018-05-14 5:26 [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM Alexander Kurz
2018-05-14 5:26 ` [PATCH 2/2] ARM: i.MX50: Record reset reason as a part of startup Alexander Kurz
@ 2018-05-14 7:53 ` Sascha Hauer
1 sibling, 0 replies; 3+ messages in thread
From: Sascha Hauer @ 2018-05-14 7:53 UTC (permalink / raw)
To: Alexander Kurz; +Cc: Andrey Smirnov, barebox
On Mon, May 14, 2018 at 05:26:49AM +0000, Alexander Kurz wrote:
> Signed-off-by: Alexander Kurz <akurz@blala.de>
> ---
> arch/arm/mach-imx/imx50.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/mach-imx/imx50.c b/arch/arm/mach-imx/imx50.c
> index d6ff6dfc2..6d121eaf8 100644
> --- a/arch/arm/mach-imx/imx50.c
> +++ b/arch/arm/mach-imx/imx50.c
> @@ -83,7 +83,7 @@ int imx50_devices_init(void)
>
> void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
> {
> - void __iomem *ccm = (void __iomem *)MX50_CCM_BASE_ADDR;
> + void __iomem *ccm = IOMEM(MX50_CCM_BASE_ADDR);
> u32 r;
>
> imx5_init_lowlevel();
> @@ -113,11 +113,11 @@ void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
> writel(0x4, ccm + MX5_CCM_CCSR);
>
> if (cpufreq_mhz == 400)
> - imx5_setup_pll_400((void __iomem *)MX50_PLL1_BASE_ADDR);
> + imx5_setup_pll_400(IOMEM(MX50_PLL1_BASE_ADDR));
> else
> - imx5_setup_pll_800((void __iomem *)MX50_PLL1_BASE_ADDR);
> + imx5_setup_pll_800(IOMEM(MX50_PLL1_BASE_ADDR));
>
> - imx5_setup_pll_216((void __iomem *)MX50_PLL3_BASE_ADDR);
> + imx5_setup_pll_216(IOMEM(MX50_PLL3_BASE_ADDR));
>
> /* Switch peripheral to PLL3 */
> writel(0x00015154, ccm + MX5_CCM_CBCMR);
> @@ -126,7 +126,7 @@ void imx50_init_lowlevel_early(unsigned int cpufreq_mhz)
> /* make sure change is effective */
> while (readl(ccm + MX5_CCM_CDHIPR));
>
> - imx5_setup_pll_400((void __iomem *)MX50_PLL2_BASE_ADDR);
> + imx5_setup_pll_400(IOMEM(MX50_PLL2_BASE_ADDR));
>
> /* Switch peripheral to PLL2 */
> r = 0x02800145 |
> --
> 2.11.0
>
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-05-14 7:54 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-14 5:26 [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM Alexander Kurz
2018-05-14 5:26 ` [PATCH 2/2] ARM: i.MX50: Record reset reason as a part of startup Alexander Kurz
2018-05-14 7:53 ` [PATCH 1/2] ARM: i.MX50: Replace expicit casts with IOMEM Sascha Hauer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox