Re: [PATCH -queue v1 4/7] [loongson] lemote-2f: add pci support

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

 



On Fri, 2009-11-06 at 21:11 +0800, Wu Zhangjin wrote:
> From: Wu Zhangjin <wuzhangjin@xxxxxxxxx>
> 
> Most of the pci support between fuloong2e and lemote loongson2f family
> machines are the same, except the cs5536 support.
> 
> This patch renames ops-fuloong2e.c to ops-loongson2.c and then append
> the cs5536 support to share most of the source code among loongson
> machines.
[...]
> +
> +
> +static int loongson_pcibios_config_access(unsigned char access_type,
> +				      struct pci_bus *bus,
> +				      unsigned int devfn, int where,
> +				      u32 *data)
> +{
> +	u32 busnum = bus->number;
> +	u32 addr, type;
> +	u32 dummy;
> +	void *addrp;
> +	int device = PCI_SLOT(devfn);
> +	int function = PCI_FUNC(devfn);
> +	int reg = where & ~3;
> +
> +	if (busnum == 0) {
> +		/* board-specific part,currently,only fuloong2f,yeeloong2f
> +		 * use CS5536, fuloong2e use via686b, gdium has no
> +		 * south bridge
> +		 */
> +#ifdef CONFIG_CS5536
> +		/* cs5536_pci_conf_read4/write4() will call _rdmsr/_wrmsr() to
> +		 * access the regsters PCI_MSR_ADDR, PCI_MSR_DATA_LO,
> +		 * PCI_MSR_DATA_HI, which is bigger than 0xf0, so, it will not
> +		 * go this branch, but the others. so, no calling dead loop
> +		 * here.
> +		 */
> +		if ((PCI_IDSEL_CS5536 == device) && (reg < PCI_MSR_CTRL)) {

0xf0 is exactly PCI_MSR_CTRL, will replace it by PCI_MSR_CTRL later.

Regards,
	Wu Zhangjin



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

  Powered by Linux