* [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
@ 2010-12-21 13:02 Michal Simek
2010-12-21 13:26 ` Sergei Shtylyov
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Michal Simek @ 2010-12-21 13:02 UTC (permalink / raw)
To: u-boot
Microblaze implement enable/disable interrupts through MSR
that's why disable_interrupts function should return 1 when interrupt
was enabled. Return 0 when interrupt was disabled.
Signed-off-by: John Linn <john.linn@xilinx.com>
Signed-off-by: Michal Simek <monstr@monstr.eu>
---
arch/microblaze/cpu/interrupts.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
index e9d53c1..054e09f 100644
--- a/arch/microblaze/cpu/interrupts.c
+++ b/arch/microblaze/cpu/interrupts.c
@@ -41,8 +41,10 @@ void enable_interrupts (void)
int disable_interrupts (void)
{
+ unsigned int msr;
+ MFS(msr, rmsr);
MSRCLR(0x2);
- return 0;
+ return ((msr & 0x2) != 0);
}
#ifdef CONFIG_SYS_INTC_0
--
1.5.5.6
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
2010-12-21 13:02 [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled Michal Simek
@ 2010-12-21 13:26 ` Sergei Shtylyov
2010-12-21 13:49 ` Wolfgang Denk
2011-01-09 21:27 ` [U-Boot] " Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Sergei Shtylyov @ 2010-12-21 13:26 UTC (permalink / raw)
To: u-boot
Hello.
On 21-12-2010 16:02, Michal Simek wrote:
> Microblaze implement enable/disable interrupts through MSR
> that's why disable_interrupts function should return 1 when interrupt
> was enabled. Return 0 when interrupt was disabled.
> Signed-off-by: John Linn<john.linn@xilinx.com>
> Signed-off-by: Michal Simek<monstr@monstr.eu>
[...]
> diff --git a/arch/microblaze/cpu/interrupts.c b/arch/microblaze/cpu/interrupts.c
> index e9d53c1..054e09f 100644
> --- a/arch/microblaze/cpu/interrupts.c
> +++ b/arch/microblaze/cpu/interrupts.c
> @@ -41,8 +41,10 @@ void enable_interrupts (void)
>
> int disable_interrupts (void)
> {
> + unsigned int msr;
Empty line wouldn't hurt here...
> + MFS(msr, rmsr);
> MSRCLR(0x2);
> - return 0;
> + return ((msr & 0x2) != 0);
External pair of () not needed.
WBR, Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
2010-12-21 13:02 [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled Michal Simek
2010-12-21 13:26 ` Sergei Shtylyov
@ 2010-12-21 13:49 ` Wolfgang Denk
2010-12-21 14:45 ` 于会
2011-01-09 21:27 ` [U-Boot] " Wolfgang Denk
2 siblings, 1 reply; 6+ messages in thread
From: Wolfgang Denk @ 2010-12-21 13:49 UTC (permalink / raw)
To: u-boot
Dear Michal Simek,
In message <1292936565-24677-1-git-send-email-monstr@monstr.eu> you wrote:
> Microblaze implement enable/disable interrupts through MSR
> that's why disable_interrupts function should return 1 when interrupt
> was enabled. Return 0 when interrupt was disabled.
>
> Signed-off-by: John Linn <john.linn@xilinx.com>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
> arch/microblaze/cpu/interrupts.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
Acked-by: Wolfgang Denk <wd@denx.de>
Best regards,
Wolfgang Denk
--
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
"Have you lived in this village all your life?" "No, not yet."
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
2010-12-21 13:49 ` Wolfgang Denk
@ 2010-12-21 14:45 ` 于会
2010-12-21 15:10 ` [U-Boot] Porting Questions - was: " Wolfgang Denk
0 siblings, 1 reply; 6+ messages in thread
From: 于会 @ 2010-12-21 14:45 UTC (permalink / raw)
To: u-boot
Dear Wolfgang Denk,
I'm Abraham Yu, here is my first time write to you, I feel so happy to join the U-Boot team.
I was porting arm926ejs SoC to our new SoC call "AVT2210", OK! Here is some basically questions below:
(u-boot.1010.12.rc2 is what I am using.)
1). First, I am useing JTAG to download image to SDRAM, base address 0x40000000, (32M) so I confused with
"CONFIG_SYS_TEXT_BASE", I think this this the relocate address, I am right? Could you please help
me choose a address for me can working. (I choose 0x41F00000, at last crash on relocate: copy_loop)
2). Second, CONFIG_SYS_INIT_SP_ADDR address is also obscure, I choose 0x42000000, at last crash on relocate: copy_loop)
3). What other thing I should do?
Thanks very much, God bless you.
Abraham
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] Porting Questions - was: [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
2010-12-21 14:45 ` 于会
@ 2010-12-21 15:10 ` Wolfgang Denk
0 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2010-12-21 15:10 UTC (permalink / raw)
To: u-boot
Dear =?GBK?B?09q74Q==?=,
Please do not hijack existing mail threads!!
Start a new thread, and make sure to chose a proper subject.
Please make sure to use a line length of 70 characters or so.
And never post HTML to that list.
In message <7eb125f4.fad0.12d0964185c.Coremail.henrybenyu@163.com> you wrote:
>
>
> 1). First, I am useing JTAG to download image to SDRAM, base address 0x40000000, (32M) so I confused with
> "CONFIG_SYS_TEXT_BASE", I think this this the relocate address, I am right? Could you please help
> me choose a address for me can working. (I choose 0x41F00000, at last crash on relocate: copy_loop)
No, CONFIG_SYS_TEXT_BASE is NOT the relocation address. The relocation
address gets dynamically computed and may vary. CONFIG_SYS_TEXT_BASE
is the base address of the text segment when linking the U-Boot
image.
> 2). Second, CONFIG_SYS_INIT_SP_ADDR address is also obscure, I choose 0x42000000, at last crash on relocate: copy_loop)
As the name attempts to suggest, CONFIG_SYS_INIT_SP_ADDR defines the
address of the initial steck pointer in the restricted C runtime
environment before relocation.
> 3). What other thing I should do?
Read the documentation and especially existing code for other, similar
boards.
Best regards,
Wolfgang Denk
--
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
Microsoft Multitasking:
several applications can crash at the same time.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled
2010-12-21 13:02 [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled Michal Simek
2010-12-21 13:26 ` Sergei Shtylyov
2010-12-21 13:49 ` Wolfgang Denk
@ 2011-01-09 21:27 ` Wolfgang Denk
2 siblings, 0 replies; 6+ messages in thread
From: Wolfgang Denk @ 2011-01-09 21:27 UTC (permalink / raw)
To: u-boot
Dear Michal Simek,
In message <1292936565-24677-1-git-send-email-monstr@monstr.eu> you wrote:
> Microblaze implement enable/disable interrupts through MSR
> that's why disable_interrupts function should return 1 when interrupt
> was enabled. Return 0 when interrupt was disabled.
>
> Signed-off-by: John Linn <john.linn@xilinx.com>
> Signed-off-by: Michal Simek <monstr@monstr.eu>
> ---
> arch/microblaze/cpu/interrupts.c | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
Acked-by: Wolfgang Denk <wd@denx.de>
Best regards,
Wolfgang Denk
--
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
A stone was placed at a ford in a river with the inscription:
"When this stone is covered it is dangerous to ford here."
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-01-09 21:27 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-21 13:02 [U-Boot] [PATCH v2] microblaze: Disabling interrupt should return 1 if was enabled Michal Simek
2010-12-21 13:26 ` Sergei Shtylyov
2010-12-21 13:49 ` Wolfgang Denk
2010-12-21 14:45 ` 于会
2010-12-21 15:10 ` [U-Boot] Porting Questions - was: " Wolfgang Denk
2011-01-09 21:27 ` [U-Boot] " Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox