* [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev
@ 2015-09-01 1:40 Peng Fan
2015-09-01 7:28 ` Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2015-09-01 1:40 UTC (permalink / raw)
To: u-boot
Since we need to support runtime check for different drivers,
we need to add get_cpu_rev for vf610.
This patch only introduce a empty implementation to avoid build errors,
later more stuff can be added if need to check vf610 cpu types.
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Cc: Stefano Babic <sbabic@denx.de>
---
arch/arm/cpu/armv7/vf610/generic.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
index 05c401d..bd948cb 100644
--- a/arch/arm/cpu/armv7/vf610/generic.c
+++ b/arch/arm/cpu/armv7/vf610/generic.c
@@ -266,6 +266,17 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
}
#endif
+/*
+ * Empty function
+ * Several drivers use runtime check, which needs get_cpu_rev.
+ * If later we need to do runtime check for vf610, we can add
+ * more stuff here.
+ */
+u32 get_cpu_rev(void)
+{
+ return 0;
+}
+
#if defined(CONFIG_DISPLAY_CPUINFO)
static char *get_reset_cause(void)
{
--
1.8.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev
2015-09-01 7:28 ` Stefano Babic
@ 2015-09-01 6:30 ` Peng Fan
2015-09-01 8:05 ` Stefano Babic
0 siblings, 1 reply; 4+ messages in thread
From: Peng Fan @ 2015-09-01 6:30 UTC (permalink / raw)
To: u-boot
Hi Stefano,
On Tue, Sep 01, 2015 at 09:28:40AM +0200, Stefano Babic wrote:
>Hi Peng,
>
>On 01/09/2015 03:40, Peng Fan wrote:
>> Since we need to support runtime check for different drivers,
>> we need to add get_cpu_rev for vf610.
>>
>> This patch only introduce a empty implementation to avoid build errors,
>> later more stuff can be added if need to check vf610 cpu types.
>>
>> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
>> Cc: Stefano Babic <sbabic@denx.de>
>> ---
>> arch/arm/cpu/armv7/vf610/generic.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
>> index 05c401d..bd948cb 100644
>> --- a/arch/arm/cpu/armv7/vf610/generic.c
>> +++ b/arch/arm/cpu/armv7/vf610/generic.c
>> @@ -266,6 +266,17 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
>> }
>> #endif
>>
>> +/*
>> + * Empty function
>> + * Several drivers use runtime check, which needs get_cpu_rev.
>> + * If later we need to do runtime check for vf610, we can add
>> + * more stuff here.
>> + */
>> +u32 get_cpu_rev(void)
>> +{
>> + return 0;
>> +}
>> +
>> #if defined(CONFIG_DISPLAY_CPUINFO)
>> static char *get_reset_cause(void)
>> {
>>
>
>If there is really no way to get the cpu revision from the SOC, I
>suggest we use the same approach of MXC_CPU_MX6SOLO with a "dummy" cpu.
>Something like :
>
>#define MXC_CPU_VF610 0xF6 /* dummy CPU */
>
>"F6" from vF610, of course, instead of returning 0.
I not have vf610 board in hand and need to check with others about this.
Not sure when I can get the result. So now for quick fix, using your way with
your Suggested-by. Later, if I can get the results, can use another
patch to fix the cpu type, because build errors should be at high
priority to be fixed. What do you think?
Regards,
Peng.
>
>Best regards,
>Stefano Babic
>
>--
>=====================================================================
>DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
>HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
>Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
>=====================================================================
--
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev
2015-09-01 1:40 [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev Peng Fan
@ 2015-09-01 7:28 ` Stefano Babic
2015-09-01 6:30 ` Peng Fan
0 siblings, 1 reply; 4+ messages in thread
From: Stefano Babic @ 2015-09-01 7:28 UTC (permalink / raw)
To: u-boot
Hi Peng,
On 01/09/2015 03:40, Peng Fan wrote:
> Since we need to support runtime check for different drivers,
> we need to add get_cpu_rev for vf610.
>
> This patch only introduce a empty implementation to avoid build errors,
> later more stuff can be added if need to check vf610 cpu types.
>
> Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
> Cc: Stefano Babic <sbabic@denx.de>
> ---
> arch/arm/cpu/armv7/vf610/generic.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm/cpu/armv7/vf610/generic.c b/arch/arm/cpu/armv7/vf610/generic.c
> index 05c401d..bd948cb 100644
> --- a/arch/arm/cpu/armv7/vf610/generic.c
> +++ b/arch/arm/cpu/armv7/vf610/generic.c
> @@ -266,6 +266,17 @@ void imx_get_mac_from_fuse(int dev_id, unsigned char *mac)
> }
> #endif
>
> +/*
> + * Empty function
> + * Several drivers use runtime check, which needs get_cpu_rev.
> + * If later we need to do runtime check for vf610, we can add
> + * more stuff here.
> + */
> +u32 get_cpu_rev(void)
> +{
> + return 0;
> +}
> +
> #if defined(CONFIG_DISPLAY_CPUINFO)
> static char *get_reset_cause(void)
> {
>
If there is really no way to get the cpu revision from the SOC, I
suggest we use the same approach of MXC_CPU_MX6SOLO with a "dummy" cpu.
Something like :
#define MXC_CPU_VF610 0xF6 /* dummy CPU */
"F6" from vF610, of course, instead of returning 0.
Best regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev
2015-09-01 6:30 ` Peng Fan
@ 2015-09-01 8:05 ` Stefano Babic
0 siblings, 0 replies; 4+ messages in thread
From: Stefano Babic @ 2015-09-01 8:05 UTC (permalink / raw)
To: u-boot
Hi Peng,
On 01/09/2015 08:30, Peng Fan wrote:
>
> I not have vf610 board in hand and need to check with others about this.
ok
> Not sure when I can get the result. So now for quick fix, using your way with
> your Suggested-by. Later, if I can get the results, can use another
> patch to fix the cpu type, because build errors should be at high
> priority to be fixed. What do you think?
Agree - this is the best we can currently do.
Regards,
Stefano Babic
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2015-09-01 8:05 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-01 1:40 [U-Boot] [PATCH] imx: vf610 add function get_cpu_rev Peng Fan
2015-09-01 7:28 ` Stefano Babic
2015-09-01 6:30 ` Peng Fan
2015-09-01 8:05 ` Stefano Babic
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.