lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAC5umyip2hnH5bTB5WggEsjTK1S_XAhZAW2616OkC_A72BuQqg@mail.gmail.com>
Date:	Thu, 22 Oct 2015 00:47:42 +0900
From:	Akinobu Mita <akinobu.mita@...il.com>
To:	Yaniv Gardi <ygardi@...eaurora.org>
Cc:	Jej B <James.Bottomley@...senpartnership.com>,
	Paul Bolle <pebolle@...cali.nl>,
	Christoph Hellwig <hch@...radead.org>,
	LKML <linux-kernel@...r.kernel.org>,
	"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
	linux-arm-msm@...r.kernel.org, Santosh Y <santoshsy@...il.com>,
	linux-scsi-owner@...r.kernel.org,
	Subhash Jadavani <subhashj@...eaurora.org>,
	Gilad Broner <gbroner@...eaurora.org>,
	Dolev Raviv <draviv@...eaurora.org>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Vinayak Holikatti <vinholikatti@...il.com>,
	"James E.J. Bottomley" <JBottomley@...n.com>,
	Christoph Hellwig <hch@....de>,
	Sujit Reddy Thumma <sthumma@...eaurora.org>,
	Raviv Shvili <rshvili@...eaurora.org>,
	Sahitya Tummala <stummala@...eaurora.org>,
	"open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" 
	<devicetree@...r.kernel.org>
Subject: Re: [PATCH v1 01/17] scsi: ufs-qcom: add number of lanes per direction

2015-09-13 23:52 GMT+09:00 Yaniv Gardi <ygardi@...eaurora.org>:
> diff --git a/drivers/scsi/ufs/ufshcd.c b/drivers/scsi/ufs/ufshcd.c
> index 1c37a7d..9638553 100644
> --- a/drivers/scsi/ufs/ufshcd.c
> +++ b/drivers/scsi/ufs/ufshcd.c
> @@ -40,6 +40,7 @@
>  #include <linux/async.h>
>  #include <linux/devfreq.h>
>
> +#include <linux/of.h>
>  #include "ufshcd.h"
>  #include "unipro.h"
>  #define UFSHCD_REQ_SENSE_SIZE  18
> @@ -87,6 +88,8 @@
>  /* Interrupt aggregation default timeout, unit: 40us */
>  #define INT_AGGR_DEF_TO        0x02
>
> +#define UFSHCD_DEFAULT_LANES_PER_DIRECTION             2
> +
>  #define ufshcd_toggle_vreg(_dev, _vreg, _on)                           \
>         ({                                                              \
>                 int _ret;                                               \
> @@ -5765,6 +5768,21 @@ static struct devfreq_dev_profile ufs_devfreq_profile = {
>         .get_dev_status = ufshcd_devfreq_get_dev_status,
>  };
>
> +static void ufshcd_init_lanes_per_dir(struct ufs_hba *hba)
> +{
> +       struct device *dev = hba->dev;
> +       int ret;
> +
> +       ret = of_property_read_u32(dev->of_node, "lanes-per-direction",
> +               &hba->lanes_per_direction);
> +       if (ret) {
> +               dev_dbg(hba->dev,
> +                       "%s: failed to read lanes-per-direction, ret=%d\n",
> +                       __func__, ret);
> +               hba->lanes_per_direction = UFSHCD_DEFAULT_LANES_PER_DIRECTION;
> +       }
> +}
> +
>  /**
>   * ufshcd_init - Driver initialization routine
>   * @hba: per-adapter instance
> @@ -5788,6 +5806,8 @@ int ufshcd_init(struct ufs_hba *hba, void __iomem *mmio_base, unsigned int irq)
>         hba->mmio_base = mmio_base;
>         hba->irq = irq;
>
> +       ufshcd_init_lanes_per_dir(hba);
> +
>         err = ufshcd_hba_init(hba);
>         if (err)
>                 goto out_error;

Should this be called in ufshcd_pltfrm_init() and move
ufshcd_init_lanes_per_dir() to
ufshcd-pltfrm.c?  Because all 'of_' stuffs are in ufshcd-pltfrm.c.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ