* [PATCH] DT: if dt is available don't use s3c_arch_init
@ 2013-09-23 10:14 Mateusz Krawczuk
2013-09-23 10:28 ` Sachin Kamat
2013-09-23 12:37 ` Tomasz Figa
0 siblings, 2 replies; 4+ messages in thread
From: Mateusz Krawczuk @ 2013-09-23 10:14 UTC (permalink / raw)
To: linux-arm-kernel
It prevents from executing platform code, when booting from device tree.
Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
arch/arm/plat-samsung/init.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
index aa9511b..0ace02d 100644
--- a/arch/arm/plat-samsung/init.c
+++ b/arch/arm/plat-samsung/init.c
@@ -20,6 +20,7 @@
#include <linux/module.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
+#include <linux/of.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
#include <linux/of.h>
@@ -152,6 +153,8 @@ static int __init s3c_arch_init(void)
{
int ret;
+ if (of_have_populated_dt())
+ return 0;
// do the correct init for cpu
if (cpu == NULL) {
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH] DT: if dt is available don't use s3c_arch_init
2013-09-23 10:14 [PATCH] DT: if dt is available don't use s3c_arch_init Mateusz Krawczuk
@ 2013-09-23 10:28 ` Sachin Kamat
2013-09-23 12:37 ` Tomasz Figa
1 sibling, 0 replies; 4+ messages in thread
From: Sachin Kamat @ 2013-09-23 10:28 UTC (permalink / raw)
To: linux-arm-kernel
Hi Mateusz,
On 23 September 2013 15:44, Mateusz Krawczuk
<m.krawczuk@partner.samsung.com> wrote:
> It prevents from executing platform code, when booting from device tree.
>
> Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
nit: Please format the patch title appropriately. In this case, it
should start with
"ARM: SAMSUNG: ..."
--
With warm regards,
Sachin
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] DT: if dt is available don't use s3c_arch_init
2013-09-23 10:14 [PATCH] DT: if dt is available don't use s3c_arch_init Mateusz Krawczuk
2013-09-23 10:28 ` Sachin Kamat
@ 2013-09-23 12:37 ` Tomasz Figa
2013-09-26 3:56 ` Kukjin Kim
1 sibling, 1 reply; 4+ messages in thread
From: Tomasz Figa @ 2013-09-23 12:37 UTC (permalink / raw)
To: linux-arm-kernel
Hi Mateusz,
On Monday 23 of September 2013 12:14:49 Mateusz Krawczuk wrote:
> It prevents from executing platform code, when booting from device tree.
>
> Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> ---
> arch/arm/plat-samsung/init.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
> index aa9511b..0ace02d 100644
> --- a/arch/arm/plat-samsung/init.c
> +++ b/arch/arm/plat-samsung/init.c
> @@ -20,6 +20,7 @@
> #include <linux/module.h>
> #include <linux/interrupt.h>
> #include <linux/ioport.h>
> +#include <linux/of.h>
> #include <linux/serial_core.h>
> #include <linux/platform_device.h>
> #include <linux/of.h>
> @@ -152,6 +153,8 @@ static int __init s3c_arch_init(void)
> {
> int ret;
>
> + if (of_have_populated_dt())
> + return 0;
I'm not sure if this is the correct thing to do here (note platforms that
still want this initialization to be handled, even when booting with DT).
The DT case is already handled several lines below in if (cpu == NULL)
check and if your platform requires this initialization not to happen you
should assure it has cpu == NULL.
Best regards,
Tomasz
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] DT: if dt is available don't use s3c_arch_init
2013-09-23 12:37 ` Tomasz Figa
@ 2013-09-26 3:56 ` Kukjin Kim
0 siblings, 0 replies; 4+ messages in thread
From: Kukjin Kim @ 2013-09-26 3:56 UTC (permalink / raw)
To: linux-arm-kernel
Tomasz Figa wrote:
>
> Hi Mateusz,
>
> On Monday 23 of September 2013 12:14:49 Mateusz Krawczuk wrote:
> > It prevents from executing platform code, when booting from device tree.
> >
> > Signed-off-by: Mateusz Krawczuk <m.krawczuk@partner.samsung.com>
> > Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
> > ---
> > arch/arm/plat-samsung/init.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/arch/arm/plat-samsung/init.c b/arch/arm/plat-samsung/init.c
> > index aa9511b..0ace02d 100644
> > --- a/arch/arm/plat-samsung/init.c
> > +++ b/arch/arm/plat-samsung/init.c
> > @@ -20,6 +20,7 @@
> > #include <linux/module.h>
> > #include <linux/interrupt.h>
> > #include <linux/ioport.h>
> > +#include <linux/of.h>
> > #include <linux/serial_core.h>
> > #include <linux/platform_device.h>
> > #include <linux/of.h>
> > @@ -152,6 +153,8 @@ static int __init s3c_arch_init(void)
> > {
> > int ret;
> >
> > + if (of_have_populated_dt())
> > + return 0;
>
> I'm not sure if this is the correct thing to do here (note platforms that
> still want this initialization to be handled, even when booting with DT).
>
> The DT case is already handled several lines below in if (cpu == NULL)
> check and if your platform requires this initialization not to happen you
> should assure it has cpu == NULL.
>
Yeah, I agree and I think this is not needed at this moment we could cleanup
the init functions later for Samsung SoCs though.
Thanks,
Kukjin
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-09-26 3:56 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-09-23 10:14 [PATCH] DT: if dt is available don't use s3c_arch_init Mateusz Krawczuk
2013-09-23 10:28 ` Sachin Kamat
2013-09-23 12:37 ` Tomasz Figa
2013-09-26 3:56 ` Kukjin Kim
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox