Skip to contentSkip to conversation

83xx: correctly set encryption and I2C bus 0 clock

PATCH New Norbert van Bolhuis 5 participants 9 messages Mar 11, 2009 – Mar 14, 2009

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

This patch makes sure the correct mask is applied when setting the encryption and I2C bus 0 clock in SCCR.
Failing to do so may lead to ENCCM being 0 in which case I2C bus 0 won't function.

mpc83xx/cpu_init.c 2009-03-11 07:57:37.000000000 +0100 renamed from mpc83xx/cpu_init.c.org 2009-03-11 07:56:57.000000000 +0100 +1 -1
@@ -106,7 +106,7 @@ void cpu_init_f (volatile immap_t * im)
  #ifdef CONFIG_SYS_SCCR_ENCCM
         /* Encryption clock mode */
         im->clk.sccr = (im->clk.sccr & ~SCCR_ENCCM) |
-                      (CONFIG_SYS_SCCR_ENCCM << SCCR_PCICM_SHIFT);
+                      (CONFIG_SYS_SCCR_ENCCM << SCCR_ENCCM_SHIFT);
  #endif
 
  #ifdef CONFIG_SYS_SCCR_PCICM
#1 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Hello Norbert,

added Kim Phillips to cc as he is the 83xx maintainer

Quoted 19 lines · Norbert van Bolhuis

This patch makes sure the correct mask is applied when setting the encryption and I2C bus 0 clock in SCCR.
Failing to do so may lead to ENCCM being 0 in which case I2C bus 0 won't function.

mpc83xx/cpu_init.c 2009-03-11 07:57:37.000000000 +0100 renamed from mpc83xx/cpu_init.c.org 2009-03-11 07:56:57.000000000 +0100 +1 -1
@@ -106,7 +106,7 @@ void cpu_init_f (volatile immap_t * im)
  #ifdef CONFIG_SYS_SCCR_ENCCM
         /* Encryption clock mode */
         im->clk.sccr = (im->clk.sccr & ~SCCR_ENCCM) |
-                      (CONFIG_SYS_SCCR_ENCCM << SCCR_PCICM_SHIFT);
+                      (CONFIG_SYS_SCCR_ENCCM << SCCR_ENCCM_SHIFT);
  #endif
 
  #ifdef CONFIG_SYS_SCCR_PCICM
Quoted 2 lines

Can you please use git-format-patch for making a patch? Otherwise your patch seems okay to me,

thanks
Heiko

Signature · 2 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany 
#2 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Quoted 10 lines · On Wed, 11 Mar 2009 09:33:04 +0100 Heiko Schocher <[email protected]> wrote:
Quoted 10 lines
mpc83xx/cpu_init.c 2009-03-11 07:57:37.000000000 +0100 renamed from mpc83xx/cpu_init.c.org 2009-03-11 07:56:57.000000000 +0100 +1 -1
@@ -106,7 +106,7 @@ void cpu_init_f (volatile immap_t * im)
  #ifdef CONFIG_SYS_SCCR_ENCCM
         /* Encryption clock mode */
         im->clk.sccr = (im->clk.sccr & ~SCCR_ENCCM) |
-                      (CONFIG_SYS_SCCR_ENCCM << SCCR_PCICM_SHIFT);
+                      (CONFIG_SYS_SCCR_ENCCM << SCCR_ENCCM_SHIFT);
  #endif
 
Quoted 8 lines
Quoted 5 lines
mpc83xx/cpu_init.c 2009-03-11 07:57:37.000000000 +0100 renamed from mpc83xx/cpu_init.c.org 2009-03-11 07:56:57.000000000 +0100 +0 -0
  #ifdef CONFIG_SYS_SCCR_PCICM

Can you please use git-format-patch for making a patch? Otherwise your patch seems okay to me,

heh, I thought it wouldn't be a problem, but you're right Heiko:

Applying: 83xx: correctly set encryption and I2C bus 0 clock
error: mpc83xx/cpu_init.c: does not exist in index
Patch failed at 0001.
When you have resolved this problem run "git am -i --resolved". If you would prefer to skip this patch, instead run "git am -i --skip". To restore the original branch and stop patching run "git am -i --abort".

even patch(1) asks which file to patch.

Norbert, can you please follow proper patch submission guidelines and resubmit? We would appreciate it as much as its (and future patches') content.

Thanks,

Kim

#3 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Quoted 10 lines · Kim Phillips

heh, I thought it wouldn't be a problem, but you're right Heiko:

Applying: 83xx: correctly set encryption and I2C bus 0 clock
error: mpc83xx/cpu_init.c: does not exist in index
Patch failed at 0001.
When you have resolved this problem run "git am -i --resolved". If you would prefer to skip this patch, instead run "git am -i --skip". To restore the original branch and stop patching run "git am -i --abort".

even patch(1) asks which file to patch.

Try "git am -p0".

-Scott

#4 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Quoted 10 lines · On Wed, 11 Mar 2009 13:22:05 -0500 Scott Wood <[email protected]> wrote:
Quoted 9 lines · Kim Phillips

heh, I thought it wouldn't be a problem, but you're right Heiko:

Applying: 83xx: correctly set encryption and I2C bus 0 clock
error: mpc83xx/cpu_init.c: does not exist in index
Patch failed at 0001.
When you have resolved this problem run "git am -i --resolved". If you would prefer to skip this patch, instead run "git am -i --skip". To restore the original branch and stop patching run "git am -i --abort".

Quoted 3 lines
Quoted 1 line

even patch(1) asks which file to patch.

Try "git am -p0".

right. That yields another problem:

Applying: 83xx: correctly set encryption and I2C bus 0 clock
error: patch failed: cpu/mpc83xx/cpu_init.c:106
error: cpu/mpc83xx/cpu_init.c: patch does not apply
Patch failed at 0001.
When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".

It appears Norbert cut-n-pasted the diff and thus introduced whitespace errors.

I can obviously apply this by hand but I'd rather get Norbert up to speed with submitting patches, esp. for the sake of future, potentially unwieldy, contributions.

Kim

#5 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Kim,

Yes I just cut-n-pasted it.
I hope it's better now.

Regards,
Norbert.

Quoted 26 lines · Kim Phillips
Quoted 10 lines · On Wed, 11 Mar 2009 13:22:05 -0500 Scott Wood <[email protected]> wrote:
Quoted 9 lines · Kim Phillips

heh, I thought it wouldn't be a problem, but you're right Heiko:

Applying: 83xx: correctly set encryption and I2C bus 0 clock
error: mpc83xx/cpu_init.c: does not exist in index
Patch failed at 0001.
When you have resolved this problem run "git am -i --resolved". If you would prefer to skip this patch, instead run "git am -i --skip". To restore the original branch and stop patching run "git am -i --abort".

Quoted 2 lines
Quoted 1 line

even patch(1) asks which file to patch.

Try "git am -p0".

right. That yields another problem:

Applying: 83xx: correctly set encryption and I2C bus 0 clock
error: patch failed: cpu/mpc83xx/cpu_init.c:106
error: cpu/mpc83xx/cpu_init.c: patch does not apply
Patch failed at 0001.
When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort".

Quoted 9 lines

It appears Norbert cut-n-pasted the diff and thus introduced whitespace errors.

I can obviously apply this by hand but I'd rather get Norbert up to speed with submitting patches, esp. for the sake of future, potentially unwieldy, contributions.

Kim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-83xx-correctly-set-encryption-and-I2C-bus-0-clock.patch
Type: text/x-patch
Size: 0 bytes
Desc: not available
Url : http://lists.denx.de/pipermail/u-boot/attachments/20090312/18c2dd32/attachment.bin

#6 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Dear Norbert van Bolhuis,

Quoted 3 lines · In message <[email protected]> you wrote:

Yes I just cut-n-pasted it.
I hope it's better now.

No, it is not better.

Patches should be sent inline, and not as attachments. It would be best if you used git-send-email to post the patch.

Also, your Signed-off-by: line is missing in the patch.

And it would be better if you used git-format-patch to create the patch.

Sorry for the trouble for a one-line-fix, but I think it is important to learn these things right in the beginning - the less efforts will be there when it comes to real work.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Nothing ever becomes real till it is experienced -- even a proverb is
no proverb to you till your life has illustrated it.     - John Keats
#7 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

OK, no problem.
Eventually I'll get it right :-)
3rd (and hopefully final) attempt:

This patch makes sure the correct mask is applied when setting the encryption and I2C bus 0 clock in SCCR.
Failing to do so may lead to ENCCM being 0 in which case I2C bus 0 won't function.

cpu/mpc83xx/cpu_init.c +1 -1
index 491c2e5..8e9c875 100644
@@ -106,7 +106,7 @@ void cpu_init_f (volatile immap_t * im)
  #ifdef CONFIG_SYS_SCCR_ENCCM
  	/* Encryption clock mode */
  	im->clk.sccr = (im->clk.sccr & ~SCCR_ENCCM) |
-		       (CONFIG_SYS_SCCR_ENCCM << SCCR_PCICM_SHIFT);
+		       (CONFIG_SYS_SCCR_ENCCM << SCCR_ENCCM_SHIFT);
  #endif
 
  #ifdef CONFIG_SYS_SCCR_PCICM
Signature · 3 lines
1.5.2.2

Signed-off-by: Norbert van Bolhuis <[email protected]>
Quoted 25 lines · Wolfgang Denk

Dear Norbert van Bolhuis,

Quoted 2 lines · In message <[email protected]> you wrote:

Yes I just cut-n-pasted it.
I hope it's better now.

No, it is not better.

Patches should be sent inline, and not as attachments. It would be best if you used git-send-email to post the patch.

Also, your Signed-off-by: line is missing in the patch.

And it would be better if you used git-format-patch to create the patch.

Sorry for the trouble for a one-line-fix, but I think it is important to learn these things right in the beginning - the less efforts will be there when it comes to real work.

Best regards,

Wolfgang Denk

#8 lore raw

PATCH 1/1 83xx: correctly set encryption and I2C bus 0 clock

Quoted 3 lines · On Fri, 13 Mar 2009 08:58:14 +0100 Norbert van Bolhuis…

OK, no problem.
Eventually I'll get it right :-)
3rd (and hopefully final) attempt:

something is still wrong with the way you are submitting this patch:

Applying: mpc83xx: correctly set encryption and I2C bus 0 clock
error: patch failed: cpu/mpc83xx/cpu_init.c:106
error: cpu/mpc83xx/cpu_init.c: patch does not apply Using index info to reconstruct a base tree...
error: patch failed: cpu/mpc83xx/cpu_init.c:106
error: cpu/mpc83xx/cpu_init.c: patch does not apply Did you hand edit your patch?
It does not apply to blobs recorded in its index. Cannot fall back to three-way merge.
Patch failed at 0001.

but since I'm out next week and this should go in now, I'm manually applying it. Next time, try sending the patch to yourself and test if you can apply it before sending it here. More information can be found in linux-2.6/Documentation/{SubmittingPatches,email-clients.txt}.

Thanks for your contribution,

Kim