linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533
@ 2015-04-02 21:25 Chen Gang
  2015-04-03 22:59 ` Richard Weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Chen Gang @ 2015-04-02 21:25 UTC (permalink / raw)
  To: realmz6; +Cc: adi-buildroot-devel, linux-kernel

For allmodconfig, it uses BF533 which will cause 3 issues for common
checking:

 - The first 2 issues are about PLL_BYPASS, it needs BF_REV_0_6 (which
   just match the compiler's output for __SILICON_REVISION__).

 - The last issue is about MPU, it needs BF_REV_0_5 or BF_REV_0_6 (which
   just match the compiler's output for __SILICON_REVISION__).

The related error with allmodconfig:

    CC      arch/blackfin/mach-common/arch_checks.o
  arch/blackfin/mach-common/arch_checks.c:24:3: error: #error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
   # error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
     ^
  arch/blackfin/mach-common/arch_checks.c:28:3: error: #error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
   # error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
     ^
  arch/blackfin/mach-common/arch_checks.c:51:3: error: #error the MPU will not function safely while Anomaly 05000263 applies
   # error the MPU will not function safely while Anomaly 05000263 applies
     ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
---
 arch/blackfin/Kconfig | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/blackfin/Kconfig b/arch/blackfin/Kconfig
index af76634..26fbee7 100644
--- a/arch/blackfin/Kconfig
+++ b/arch/blackfin/Kconfig
@@ -449,7 +449,7 @@ config BFIN_KERNEL_CLOCK
 
 config PLL_BYPASS
 	bool "Bypass PLL"
-	depends on BFIN_KERNEL_CLOCK && (!BF60x)
+	depends on BFIN_KERNEL_CLOCK && (!BF60x) && ((!BF533) || BF_REV_0_6)
 	default n
 
 config CLKIN_HALF
@@ -1112,6 +1112,7 @@ endchoice
 comment "Memory Protection Unit"
 config MPU
 	bool "Enable the memory protection unit"
+	depends on (!BF533) || BF_REV_0_6 || BF_REV_0_5
 	default n
 	help
 	  Use the processor's MPU to protect applications from accessing
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533
  2015-04-02 21:25 [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533 Chen Gang
@ 2015-04-03 22:59 ` Richard Weinberger
  2015-04-04 21:48   ` Chen Gang
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2015-04-03 22:59 UTC (permalink / raw)
  To: Chen Gang; +Cc: realmz6, adi-buildroot-devel, linux-kernel

On Thu, Apr 2, 2015 at 11:25 PM, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
> For allmodconfig, it uses BF533 which will cause 3 issues for common
> checking:
>
>  - The first 2 issues are about PLL_BYPASS, it needs BF_REV_0_6 (which
>    just match the compiler's output for __SILICON_REVISION__).
>
>  - The last issue is about MPU, it needs BF_REV_0_5 or BF_REV_0_6 (which
>    just match the compiler's output for __SILICON_REVISION__).
>
> The related error with allmodconfig:
>
>     CC      arch/blackfin/mach-common/arch_checks.o
>   arch/blackfin/mach-common/arch_checks.c:24:3: error: #error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
>    # error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
>      ^
>   arch/blackfin/mach-common/arch_checks.c:28:3: error: #error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
>    # error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
>      ^
>   arch/blackfin/mach-common/arch_checks.c:51:3: error: #error the MPU will not function safely while Anomaly 05000263 applies
>    # error the MPU will not function safely while Anomaly 05000263 applies
>      ^
>
>  config PLL_BYPASS
>         bool "Bypass PLL"
> -       depends on BFIN_KERNEL_CLOCK && (!BF60x)
> +       depends on BFIN_KERNEL_CLOCK && (!BF60x) && ((!BF533) || BF_REV_0_6)
>         default n
>
>  config CLKIN_HALF
> @@ -1112,6 +1112,7 @@ endchoice
>  comment "Memory Protection Unit"
>  config MPU
>         bool "Enable the memory protection unit"
> +       depends on (!BF533) || BF_REV_0_6 || BF_REV_0_5
>         default n
>         help
>           Use the processor's MPU to protect applications from accessing

This answers my question wrt. allmodconfig. ;)
I'm not sure if this is the correct way. Isn't this the reason why we
have COMPILE_TEST?

-- 
Thanks,
//richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533
  2015-04-03 22:59 ` Richard Weinberger
@ 2015-04-04 21:48   ` Chen Gang
  2015-04-04 21:56     ` Richard Weinberger
  0 siblings, 1 reply; 5+ messages in thread
From: Chen Gang @ 2015-04-04 21:48 UTC (permalink / raw)
  To: Richard Weinberger; +Cc: realmz6, adi-buildroot-devel, linux-kernel

On 4/4/15 06:59, Richard Weinberger wrote:
> On Thu, Apr 2, 2015 at 11:25 PM, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
>> For allmodconfig, it uses BF533 which will cause 3 issues for common
>> checking:
>>
>>  - The first 2 issues are about PLL_BYPASS, it needs BF_REV_0_6 (which
>>    just match the compiler's output for __SILICON_REVISION__).
>>
>>  - The last issue is about MPU, it needs BF_REV_0_5 or BF_REV_0_6 (which
>>    just match the compiler's output for __SILICON_REVISION__).
>>
>> The related error with allmodconfig:
>>
>>     CC      arch/blackfin/mach-common/arch_checks.o
>>   arch/blackfin/mach-common/arch_checks.c:24:3: error: #error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
>>    # error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
>>      ^
>>   arch/blackfin/mach-common/arch_checks.c:28:3: error: #error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
>>    # error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
>>      ^
>>   arch/blackfin/mach-common/arch_checks.c:51:3: error: #error the MPU will not function safely while Anomaly 05000263 applies
>>    # error the MPU will not function safely while Anomaly 05000263 applies
>>      ^
>>
>>  config PLL_BYPASS
>>         bool "Bypass PLL"
>> -       depends on BFIN_KERNEL_CLOCK && (!BF60x)
>> +       depends on BFIN_KERNEL_CLOCK && (!BF60x) && ((!BF533) || BF_REV_0_6)
>>         default n
>>
>>  config CLKIN_HALF
>> @@ -1112,6 +1112,7 @@ endchoice
>>  comment "Memory Protection Unit"
>>  config MPU
>>         bool "Enable the memory protection unit"
>> +       depends on (!BF533) || BF_REV_0_6 || BF_REV_0_5
>>         default n
>>         help
>>           Use the processor's MPU to protect applications from accessing
> 
> This answers my question wrt. allmodconfig. ;)
> I'm not sure if this is the correct way. Isn't this the reason why we
> have COMPILE_TEST?
> 

For me, COMPILE_TEST is for compiling test without the related hardware
supports, but the code should no any logical issues firstly (at least,
COMPILE_TEST itself should not generate additional logical bugs).

In our case, I guess the first 2 issues are about logical issues (not
hardware supporting issues), so I guess, it is not suitable to use
COMPILE_TEST to bypass them.


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533
  2015-04-04 21:48   ` Chen Gang
@ 2015-04-04 21:56     ` Richard Weinberger
  2015-04-04 22:14       ` Chen Gang
  0 siblings, 1 reply; 5+ messages in thread
From: Richard Weinberger @ 2015-04-04 21:56 UTC (permalink / raw)
  To: Chen Gang, Richard Weinberger; +Cc: realmz6, adi-buildroot-devel, linux-kernel

Am 04.04.2015 um 23:48 schrieb Chen Gang:
> On 4/4/15 06:59, Richard Weinberger wrote:
>> On Thu, Apr 2, 2015 at 11:25 PM, Chen Gang <xili_gchen_5257@hotmail.com> wrote:
>>> For allmodconfig, it uses BF533 which will cause 3 issues for common
>>> checking:
>>>
>>>  - The first 2 issues are about PLL_BYPASS, it needs BF_REV_0_6 (which
>>>    just match the compiler's output for __SILICON_REVISION__).
>>>
>>>  - The last issue is about MPU, it needs BF_REV_0_5 or BF_REV_0_6 (which
>>>    just match the compiler's output for __SILICON_REVISION__).
>>>
>>> The related error with allmodconfig:
>>>
>>>     CC      arch/blackfin/mach-common/arch_checks.o
>>>   arch/blackfin/mach-common/arch_checks.c:24:3: error: #error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
>>>    # error "Sclk value selected is less than minimum. Please select a proper value for SCLK multiplier"
>>>      ^
>>>   arch/blackfin/mach-common/arch_checks.c:28:3: error: #error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
>>>    # error "ANOMALY 05000273, please make sure CCLK is at least 2x SCLK"
>>>      ^
>>>   arch/blackfin/mach-common/arch_checks.c:51:3: error: #error the MPU will not function safely while Anomaly 05000263 applies
>>>    # error the MPU will not function safely while Anomaly 05000263 applies
>>>      ^
>>>
>>>  config PLL_BYPASS
>>>         bool "Bypass PLL"
>>> -       depends on BFIN_KERNEL_CLOCK && (!BF60x)
>>> +       depends on BFIN_KERNEL_CLOCK && (!BF60x) && ((!BF533) || BF_REV_0_6)
>>>         default n
>>>
>>>  config CLKIN_HALF
>>> @@ -1112,6 +1112,7 @@ endchoice
>>>  comment "Memory Protection Unit"
>>>  config MPU
>>>         bool "Enable the memory protection unit"
>>> +       depends on (!BF533) || BF_REV_0_6 || BF_REV_0_5
>>>         default n
>>>         help
>>>           Use the processor's MPU to protect applications from accessing
>>
>> This answers my question wrt. allmodconfig. ;)
>> I'm not sure if this is the correct way. Isn't this the reason why we
>> have COMPILE_TEST?
>>
> 
> For me, COMPILE_TEST is for compiling test without the related hardware
> supports, but the code should no any logical issues firstly (at least,
> COMPILE_TEST itself should not generate additional logical bugs).
> 
> In our case, I guess the first 2 issues are about logical issues (not
> hardware supporting issues), so I guess, it is not suitable to use
> COMPILE_TEST to bypass them.

So you have a blackfin board and successfully booted such a allmodconfig kernel on it?

Thanks,
//richard

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533
  2015-04-04 21:56     ` Richard Weinberger
@ 2015-04-04 22:14       ` Chen Gang
  0 siblings, 0 replies; 5+ messages in thread
From: Chen Gang @ 2015-04-04 22:14 UTC (permalink / raw)
  To: Richard Weinberger, Richard Weinberger
  Cc: realmz6, adi-buildroot-devel, linux-kernel

On 4/5/15 05:56, Richard Weinberger wrote:
> Am 04.04.2015 um 23:48 schrieb Chen Gang:
>> On 4/4/15 06:59, Richard Weinberger wrote:
> So you have a blackfin board and successfully booted such a allmodconfig kernel on it?

No, I have no any related hardware for it.

For this issue, I referenced arch/blackfin/Makefile for BF_REL:

  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.6 -E  - | grep __SILICON_REVISION__
  #define __SILICON_REVISION__ 0x0006
  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.5 -E  - | grep __SILICON_REVISION__
  #define __SILICON_REVISION__ 0x0005
  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.4 -E  - | grep __SILICON_REVISION__
  #define __SILICON_REVISION__ 0x0004
  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.3 -E  - | grep __SILICON_REVISION__
  #define __SILICON_REVISION__ 0x0003
  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.2 -E  - | grep __SILICON_REVISION__
  cc1: error: -mcpu=bf533-0.2 has invalid silicon revision
  cc1: error: unrecognized command line option '-mcpu=bf533-0.2'
  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.1 -E  - | grep __SILICON_REVISION__
  cc1: error: -mcpu=bf533-0.1 has invalid silicon revision
  cc1: error: unrecognized command line option '-mcpu=bf533-0.1'
  [root@localhost linux-next]# echo "" | /upstream/release-blackfin/bin/bfin-gchen-elf-gcc -dD -mcpu=bf533-0.0 -E  - | grep __SILICON_REVISION__
  cc1: error: -mcpu=bf533-0.0 has invalid silicon revision
  cc1: error: unrecognized command line option '-mcpu=bf533-0.0'


Thanks.
-- 
Chen Gang

Open, share, and attitude like air, water, and life which God blessed

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-04-04 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-04-02 21:25 [PATCH] blackfin: Kconfig: Let PLL_BYPASS and MPU depend on some BF_REV of BF533 Chen Gang
2015-04-03 22:59 ` Richard Weinberger
2015-04-04 21:48   ` Chen Gang
2015-04-04 21:56     ` Richard Weinberger
2015-04-04 22:14       ` Chen Gang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).