Re: [PATCH v4 15/24] fpga: dfl-fme-pr: add compat_id support for dfl-fme-region platform device.

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

 



On Wed, Feb 28, 2018 at 05:06:57PM -0600, Alan Tull wrote:
> On Tue, Feb 13, 2018 at 3:24 AM, Wu Hao <hao.wu@xxxxxxxxx> wrote:
> 
> Hi Hao,
> 
> > This patch adds compat_id support when driver creates the platform
> > device for dfl-fme-region. It allows dfl-fme-region platform driver
> > to create fpga-region with correct compat_id.
> >
> > Signed-off-by: Wu Hao <hao.wu@xxxxxxxxx>
> > ---
> >  drivers/fpga/dfl-fme-pr.c | 20 ++++++++++++++++++++
> >  drivers/fpga/dfl-fme-pr.h |  3 +++
> >  2 files changed, 23 insertions(+)
> >
> > diff --git a/drivers/fpga/dfl-fme-pr.c b/drivers/fpga/dfl-fme-pr.c
> > index 526e90b..c17170b 100644
> > --- a/drivers/fpga/dfl-fme-pr.c
> > +++ b/drivers/fpga/dfl-fme-pr.c
> > @@ -314,6 +314,25 @@ static void fpga_fme_destroy_bridges(struct feature_platform_data *pdata)
> >  }
> >
> >  /**
> > + * fpga_fme_get_region_compat_id - read region compat_id from hardware
> > + *
> > + * @dev: fme device.
> > + */
> > +static struct fpga_region_compat_id
> > +fpga_fme_get_region_compat_id(struct device *dev)
> > +{
> > +       struct fpga_region_compat_id compat_id;
> > +       void __iomem *fme_pr;
> > +
> > +       fme_pr = get_feature_ioaddr_by_id(dev, FME_FEATURE_ID_PR_MGMT);
> > +
> > +       compat_id.id_l = readq(fme_pr + FME_PR_INTFC_ID_L);
> > +       compat_id.id_h = readq(fme_pr + FME_PR_INTFC_ID_H);
> 
> I tried building for 32 bit ARM and ran into readq and writeq not
> being defined.  v2 had proper '#indef readq/writeq', so looks like we
> need that after all.

Sorry, it's missing a header file for dfl-fme-pr.h, as some files don't include
dfl.h at this version. That header file has definitions for readq/writeq.

+#include <linux/io-64-nonatomic-lo-hi.h>

will fix it.

Thanks
Hao

> Alan
--
To unsubscribe from this list: send the line "unsubscribe linux-api" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux