Re: [PATCH 2/2] Fix pci id check.

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

 



Hi Anoop,

> -#define MSP_HAS_PCI(ID)	(((u32)(ID) <= 0x4236) && ((u32)(ID) >= 0x4220))
> +#define MSP_HAS_PCI(ID)  ((((u32)(ID) <= (0x4236)) && \
> +			((u32)(ID) >= (0x4220))) || \
> +			((u32)(ID) == (0x7140)))
> +#define MSP_PCI_READ_REG32(base, byte_offset) \
> +	(*((volatile u32 *)((u8 *)(base) + (byte_offset))))

why not use __raw_readl() ?

>  	/* Extract Device ID */
> -	id = read_reg32(PCI_JTAG_DEVID_REG, 0xFFFF) >> 12;
> +	id = (MSP_PCI_READ_REG32(PCI_JTAG_DEVID_REG, 0) >> 12) & 0x0FFFF;

You can simplify the macro above as byte_offset == 0 ... do we even need
a macro as there is only one user of it ... ?

John




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

  Powered by Linux