lkml.org 
[lkml]   [2021]   [Mar]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectReply: Re: [PATCH v5] drm/loongson: Add DRM Driver for Loongson 7A1000 bridge chip
> > +void ls7a_mm_wreg_locked(struct loongson_device *ldev, u32 offset, u32 val)
> > +{
> > + unsigned long flags;
> > +
> > + spin_lock_irqsave(&ldev->mmio_lock, flags);
> > + writel(val, ldev->mmio + offset);
> > + spin_unlock_irqrestore(&ldev->mmio_lock, flags);
> > +}
> Why lock and disable irq? To workaround the hw issue from the first
> revision of LS7A? If so, I suggest to remove the workaround. Because:
> 1, mmio r/w will be used in irq context; 2, newer revision of LS7A
> doesn't need workaround.
Yes,the lock is to workaround the hw issue,I have decided to remove the lock.
>
> > +
> > + /* DC IO */
> > + ldev->io = (void *)TO_UNCAC(LS7A_CHIPCFG_REG_BASE);
> TO_UNCAC() is a MIPS-specific macro, I think ioremap() is better.
OK.I have switched to ioremap, and the test passed.
>
> > +#define LS7A_CHIPCFG_REG_BASE (0x10010000)
> > +#define PCI_DEVICE_ID_LOONGSON_DC 0x7a06
> > +#define PCI_DEVICE_ID_LOONGSON_GPU 0x7a15
> They are already defined in include/linux/pci_ids.h.
In include/linux/pci_ids.h only defined PCI_VENDOR_ID_LOONGSON.

------------------------------
Loongson LiChenyang
\
 
 \ /
  Last update: 2021-03-06 07:50    [W:0.031 / U:0.188 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site