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]
Date:	Thu, 27 Mar 2014 12:43:41 +0900
From:	Jingoo Han <jg1.han@...sung.com>
To:	'Kishon Vijay Abraham I' <kishon@...com>
Cc:	devicetree@...r.kernel.org, linux-doc@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
	linux-omap@...r.kernel.org, linux-pci@...r.kernel.org,
	bhelgaas@...gle.com, mohit.kumar@...com, robh+dt@...nel.org,
	pawel.moll@....com, mark.rutland@....com,
	ijc+devicetree@...lion.org.uk, galak@...eaurora.org,
	rob@...dley.net, linux@....linux.org.uk, tony@...mide.com,
	rnayak@...com, paul@...an.com, 'Jingoo Han' <jg1.han@...sung.com>
Subject: Re: [RFC PATCH 02/12] pci: host: pcie-dra7xx: add support for
 pcie-dra7xx controller

On Wednesday, March 26, 2014 10:58 PM, Kishon Vijay Abraham I wrote:
> 
> Added support for pcie controller in dra7xx. This driver re-uses
> the designware core code that is already present in kernel.
> 
> Signed-off-by: Kishon Vijay Abraham I <kishon@...com>

Hi Kishon,
Long time no see! I added trivial comments.

> ---
>  Documentation/devicetree/bindings/pci/ti-pci.txt |   35 ++
>  drivers/pci/host/Kconfig                         |   10 +
>  drivers/pci/host/Makefile                        |    1 +
>  drivers/pci/host/pcie-dra7xx.c                   |  411 ++++++++++++++++++++++

How about using 'pci-' prefix?
As it was discussed earlier, 'pci-' prefix is more proper.

>  4 files changed, 457 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/pci/ti-pci.txt
>  create mode 100644 drivers/pci/host/pcie-dra7xx.c

[.....]

> --- /dev/null
> +++ b/drivers/pci/host/pcie-dra7xx.c

[.....]

> +#define	PCIECTRL_TI_CONF_IRQSTATUS_MAIN		0x0024
> +#define	PCIECTRL_TI_CONF_IRQENABLE_SET_MAIN	0x0028

I don't think that it's good to add vendor names such as TI
to SFR names.

How about adding 'DRA7XX' or just removing 'TI'?

1. PCIECTRL_DRA7XX_CONF_IRQSTATUS_MAIN

2. PCIECTRL_CONF_IRQSTATUS_MAIN

[.....]

> +enum dra7xx_pcie_device_type {
> +	DRA7XX_PCIE_UNKNOWN_TYPE,
> +	DRA7XX_PCIE_EP_TYPE,
> +	DRA7XX_PCIE_LEG_EP_TYPE,
> +	DRA7XX_PCIE_RC_TYPE,
> +};

This driver can support only RC mode, so, these enum can be removed.

[.....]

> +	of_property_read_u32(node, "ti,device-type", &device_type);
> +	switch (device_type) {
> +	case DRA7XX_PCIE_RC_TYPE:
> +		dra7xx_pcie_writel(dra7xx->base,
> +			PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_RC);
> +		break;
> +	case DRA7XX_PCIE_EP_TYPE:
> +		dra7xx_pcie_writel(dra7xx->base,
> +			PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_EP);
> +		break;
> +	case DRA7XX_PCIE_LEG_EP_TYPE:
> +		dra7xx_pcie_writel(dra7xx->base,
> +			PCIECTRL_TI_CONF_DEVICE_TYPE, DEVICE_TYPE_LEG_EP);
> +		break;
> +	default:
> +		dev_dbg(dev, "UNKNOWN device type %d\n", device_type);
> +	}

Thus, this switch can be removed.
Others look good.

Best regards,
Jingoo Han

--
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