Re: i8259.c in big endian

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Also I like to see away to pass in a base offset. I have a mips device
which has a i8259 chip but its io is offseted by 0xb0000000.

On Thu, 8 Nov 2001, Atsushi Nemoto wrote:

> arch/mips/kernel/i8259.c seems not working in big endian.
> 
> Here is a patch to fix this.
> 
> --- linux-sgi-cvs/arch/mips/kernel/i8259.c	Mon Sep 10 02:43:01 2001
> +++ linux.new/arch/mips/kernel/i8259.c	Thu Nov  8 15:40:03 2001
> @@ -70,8 +70,13 @@
>  static unsigned int cached_irq_mask = 0xffff;
>  
>  #define __byte(x,y) 	(((unsigned char *)&(y))[x])
> +#ifdef __BIG_ENDIAN
> +#define cached_21	(__byte(1,cached_irq_mask))
> +#define cached_A1	(__byte(0,cached_irq_mask))
> +#else
>  #define cached_21	(__byte(0,cached_irq_mask))
>  #define cached_A1	(__byte(1,cached_irq_mask))
> +#endif
>  
>  void disable_8259A_irq(unsigned int irq)
>  {
> ---
> Atsushi Nemoto
> 


[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux