public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] problem with REG32() in ixp425
@ 2006-04-04 11:15 sumanth
  2006-04-04 11:22 ` Andrew Lunn
  0 siblings, 1 reply; 2+ messages in thread
From: sumanth @ 2006-04-04 11:15 UTC (permalink / raw)
  To: ecos-discuss


Hi,

             I am sumanth, i am porting ecos to ixp 425 evaluation board of
mine, but i am getting problem in the hal_interrupt_configure, where we 
have address calculation routine 
 *IXP425_GPIT1R = (*IXP425_GPIT1R & ~(7 << shift)) | (ival << shift);
 *IXP425_GPISR |= (1 << vector);

where *IXP425_GPIT1R calls REG32 and it calculates the base address and the
actual bytes from base address which should happen actually,  and call the
routine
#define REG32(a,b) ((volatile unsigned int *)((a)+(b)))
but in our case it is calling the routine
#define REG32(a,b) (b) 
so we are only getting the no of bytes move from base, is there any problem
with definition of _ASSEMBLER_
I am giving the snap shot of the code

xscale/cores/current/include/hal_xscale.h

#ifdef __ASSEMBLER__

#define REG8(a,b)  (b)
#define REG16(a,b) (b)
#define REG32(a,b) (b)

#else /* __ASSEMBLER__ */

#define REG8(a,b)  ((volatile unsigned char *)((a)+(b)))
#define REG16(a,b) ((volatile unsigned short *)((a)+(b)))
#define REG32(a,b) ((volatile unsigned int *)((a)+(b)))

extern void hal_xscale_core_init(void);
#endif /* __ASSEMBLER__ */

any pointers in this case are very helpful, and any one who worked on the
ixp425 processor can help me by sharing their problem situations and how
could they resolve them

Thanks & regards,
Sumanth.
--
View this message in context: http://www.nabble.com/problem-with-REG32%28%29-in-ixp425-t1392459.html#a3742533
Sent from the Sourceware - ecos-discuss forum at Nabble.com.


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* Re: [ECOS] problem with REG32() in ixp425
  2006-04-04 11:15 [ECOS] problem with REG32() in ixp425 sumanth
@ 2006-04-04 11:22 ` Andrew Lunn
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Lunn @ 2006-04-04 11:22 UTC (permalink / raw)
  To: sumanth; +Cc: ecos-discuss

On Tue, Apr 04, 2006 at 04:15:37AM -0700, sumanth wrote:
> 
> Hi,
> 
>              I am sumanth, i am porting ecos to ixp 425 evaluation board of
> mine, but i am getting problem in the hal_interrupt_configure, where we 
> have address calculation routine 
>  *IXP425_GPIT1R = (*IXP425_GPIT1R & ~(7 << shift)) | (ival << shift);
>  *IXP425_GPISR |= (1 << vector);
> 
> where *IXP425_GPIT1R calls REG32 and it calculates the base address and the
> actual bytes from base address which should happen actually,  and call the
> routine
> #define REG32(a,b) ((volatile unsigned int *)((a)+(b)))
> but in our case it is calling the routine
> #define REG32(a,b) (b) 
> so we are only getting the no of bytes move from base, is there any problem
> with definition of _ASSEMBLER_
> I am giving the snap shot of the code
> 
> xscale/cores/current/include/hal_xscale.h
> 
> #ifdef __ASSEMBLER__
> 
> #define REG8(a,b)  (b)
> #define REG16(a,b) (b)
> #define REG32(a,b) (b)
> 
> #else /* __ASSEMBLER__ */
> 
> #define REG8(a,b)  ((volatile unsigned char *)((a)+(b)))
> #define REG16(a,b) ((volatile unsigned short *)((a)+(b)))
> #define REG32(a,b) ((volatile unsigned int *)((a)+(b)))
> 
> extern void hal_xscale_core_init(void);
> #endif /* __ASSEMBLER__ */

hal_interrupt_configure is written in C i presume?

Try using the gcc command line options -E -dD on the file containing
hal_interrupt_configure(). is __ASSEMBLER__ being defined somewhere?

        Andrew

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-04-04 11:15 [ECOS] problem with REG32() in ixp425 sumanth
2006-04-04 11:22 ` Andrew Lunn

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 read-only IMAP folder(s) and NNTP newsgroup(s).