[PATCH 2/2] xfree86: Add Loongson MIPS support

Matt Kraai kraai at ftbfs.org
Sun Oct 16 07:08:10 PDT 2011


On Sat, Oct 15, 2011 at 09:40:03PM -0700, Jeremy Huddleston wrote:
> 
> Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=41038
> 
> Signed-off-by: Matt Kraai <kraai at ftbfs.org>
> Reviewed-by: Jeremy Huddleston <jeremyhu at apple.com>
> ---
>  hw/xfree86/os-support/linux/lnx_video.c |   11 ++++++++---
>  1 files changed, 8 insertions(+), 3 deletions(-)
> 
> diff --git a/hw/xfree86/os-support/linux/lnx_video.c b/hw/xfree86/os-support/linux/lnx_video.c
> index 18116bd..a023da3 100644
> --- a/hw/xfree86/os-support/linux/lnx_video.c
> +++ b/hw/xfree86/os-support/linux/lnx_video.c
> @@ -131,16 +131,21 @@ volatile unsigned char *ioBase = NULL;
>  Bool
>  xf86EnableIO(void)
>  {
> -#if defined(__powerpc__)
> +#if defined(__mips__) || defined(__powerpc__)
>  	int fd;
> -	unsigned int ioBase_phys;
> +	pointer ioBase_phys;
>  #endif
>  
>  	if (ExtendedEnabled)
>  		return TRUE;
>  
> -#if defined(__powerpc__)
> +#if defined(__mips__) || defined(__powerpc__)
> +
> +# if defined(__mips__)
> +	ioBase_phys = 0x1fd00000;
> +# elif defined(__powerpc__)
>  	ioBase_phys = syscall(__NR_pciconfig_iobase, 2, 0, 0);
> +# endif
>  
>  	fd = open("/dev/mem", O_RDWR);
>  	if (ioBase == NULL) {

I don't think this patch will make X work on Loongson MIPS systems; it
ends up setting ioBase, but the inb, etc. functions in compiler.h
expect IOPortBase to be set instead.

-- 
Matt Kraai
https://ftbfs.org/kraai


More information about the xorg-devel mailing list