All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lian Minghuan-b31939 <B31939@freescale.com>
To: Kumar Gala <galak@kernel.crashing.org>,
	Minghuan Lian <Minghuan.Lian@freescale.com>
Cc: "linuxppc-dev@lists.ozlabs.org list"
	<linuxppc-dev@lists.ozlabs.org>, Arnd Bergmann <arnd@arndb.de>,
	Zang Roy-R61911 <r61911@freescale.com>,
	Scott Wood <scottwood@freescale.com>,
	Bjorn Helgaas <bhelgaas@google.com>, <linux-pci@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 02/12][v3] pci: fsl: add structure fsl_pci
Date: Fri, 25 Oct 2013 13:58:06 +0800	[thread overview]
Message-ID: <526A086E.305@freescale.com> (raw)
In-Reply-To: <2B28E421-9B64-4CEC-9E00-8893502CE12F@kernel.crashing.org>

Hi Kumar,

please see my comment inline.

On 10/24/2013 12:11 PM, Kumar Gala wrote:
> On Oct 23, 2013, at 5:41 AM, Minghuan Lian wrote:
>
>> PowerPC uses structure pci_controller to describe PCI controller,
>> but ARM uses structure pci_sys_data. In order to support PowerPC
>> and ARM simultaneously, the patch adds a structure fsl_pci that
>> contains most of the members of the pci_controller and pci_sys_data.
>> Meanwhile, it defines a interface fsl_arch_sys_to_pci() which should
>> be implemented in architecture-specific PCI controller driver to
>> convert pci_controller or pci_sys_data to fsl_pci.
>>
>> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
>> ---
>> change log:
>> v1-v3:
>> Derived from http://patchwork.ozlabs.org/patch/278965/
>>
>> Based on upstream master.
>> Based on the discussion of RFC version here
>> http://patchwork.ozlabs.org/patch/274487/
>>
>> include/linux/fsl/pci-common.h | 41 +++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 41 insertions(+)
> NAK.
>
> We discussed this some at the ARM Summit this week and the feeling is we need to move to a common interface between the various ARCHs.
[Minghuan] Do you mean we will use the common interface instead of 
arch/powerpc/kernel/pci-common.c...
and arch/arm/kernel/bios32.c?  Who will do the code movement and when 
will the work be completed? The patches just move the common functions 
of FSL PCI controller operation which can be re-used by PowerPC and ARM. 
LS1 is coming, I worry about not having enough time to wait for the move 
is completed.

> - k
>
>> diff --git a/include/linux/fsl/pci-common.h b/include/linux/fsl/pci-common.h
>> index 5e4f683..e56a040 100644
>> --- a/include/linux/fsl/pci-common.h
>> +++ b/include/linux/fsl/pci-common.h
>> @@ -102,5 +102,46 @@ struct ccsr_pci {
>>
>> };
>>
>> +/*
>> + * Structure of a PCI controller (host bridge)
>> + */
>> +struct fsl_pci {
>> +	struct list_head node;
>> +	bool is_pcie;
>> +	struct device_node *dn;
>> +	struct device *dev;
>> +
>> +	int first_busno;
>> +	int last_busno;
>> +	int self_busno;
>> +	struct resource busn;
>> +
>> +	struct pci_ops *ops;
>> +	struct ccsr_pci __iomem *regs;
>> +
>> +	u32 indirect_type;
>> +
>> +	struct resource io_resource;
>> +	resource_size_t io_base_phys;
>> +	resource_size_t pci_io_size;
>> +
>> +	struct resource mem_resources[3];
>> +	resource_size_t mem_offset[3];
>> +
>> +	int global_number;	/* PCI domain number */
>> +
>> +	resource_size_t dma_window_base_cur;
>> +	resource_size_t dma_window_size;
>> +
>> +	void *sys;
>> +};
>> +
>> +/*
>> + * Convert architecture specific pci controller structure to fsl_pci
>> + * PowerPC uses structure pci_controller and ARM uses structure pci_sys_data
>> + * to describe pci controller.
>> + */
>> +extern struct fsl_pci *fsl_arch_sys_to_pci(void *sys);
>> +
>> #endif /* __PCI_COMMON_H */
>> #endif /* __KERNEL__ */
>> -- 
>> 1.8.1.2
>>
>



WARNING: multiple messages have this Message-ID (diff)
From: Lian Minghuan-b31939 <B31939@freescale.com>
To: Kumar Gala <galak@kernel.crashing.org>,
	Minghuan Lian <Minghuan.Lian@freescale.com>
Cc: Arnd Bergmann <arnd@arndb.de>,
	linux-pci@vger.kernel.org, Zang Roy-R61911 <r61911@freescale.com>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Scott Wood <scottwood@freescale.com>,
	"linuxppc-dev@lists.ozlabs.org list"
	<linuxppc-dev@lists.ozlabs.org>,
	linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 02/12][v3] pci: fsl: add structure fsl_pci
Date: Fri, 25 Oct 2013 13:58:06 +0800	[thread overview]
Message-ID: <526A086E.305@freescale.com> (raw)
In-Reply-To: <2B28E421-9B64-4CEC-9E00-8893502CE12F@kernel.crashing.org>

Hi Kumar,

please see my comment inline.

On 10/24/2013 12:11 PM, Kumar Gala wrote:
> On Oct 23, 2013, at 5:41 AM, Minghuan Lian wrote:
>
>> PowerPC uses structure pci_controller to describe PCI controller,
>> but ARM uses structure pci_sys_data. In order to support PowerPC
>> and ARM simultaneously, the patch adds a structure fsl_pci that
>> contains most of the members of the pci_controller and pci_sys_data.
>> Meanwhile, it defines a interface fsl_arch_sys_to_pci() which should
>> be implemented in architecture-specific PCI controller driver to
>> convert pci_controller or pci_sys_data to fsl_pci.
>>
>> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
>> ---
>> change log:
>> v1-v3:
>> Derived from http://patchwork.ozlabs.org/patch/278965/
>>
>> Based on upstream master.
>> Based on the discussion of RFC version here
>> http://patchwork.ozlabs.org/patch/274487/
>>
>> include/linux/fsl/pci-common.h | 41 +++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 41 insertions(+)
> NAK.
>
> We discussed this some at the ARM Summit this week and the feeling is we need to move to a common interface between the various ARCHs.
[Minghuan] Do you mean we will use the common interface instead of 
arch/powerpc/kernel/pci-common.c...
and arch/arm/kernel/bios32.c?  Who will do the code movement and when 
will the work be completed? The patches just move the common functions 
of FSL PCI controller operation which can be re-used by PowerPC and ARM. 
LS1 is coming, I worry about not having enough time to wait for the move 
is completed.

> - k
>
>> diff --git a/include/linux/fsl/pci-common.h b/include/linux/fsl/pci-common.h
>> index 5e4f683..e56a040 100644
>> --- a/include/linux/fsl/pci-common.h
>> +++ b/include/linux/fsl/pci-common.h
>> @@ -102,5 +102,46 @@ struct ccsr_pci {
>>
>> };
>>
>> +/*
>> + * Structure of a PCI controller (host bridge)
>> + */
>> +struct fsl_pci {
>> +	struct list_head node;
>> +	bool is_pcie;
>> +	struct device_node *dn;
>> +	struct device *dev;
>> +
>> +	int first_busno;
>> +	int last_busno;
>> +	int self_busno;
>> +	struct resource busn;
>> +
>> +	struct pci_ops *ops;
>> +	struct ccsr_pci __iomem *regs;
>> +
>> +	u32 indirect_type;
>> +
>> +	struct resource io_resource;
>> +	resource_size_t io_base_phys;
>> +	resource_size_t pci_io_size;
>> +
>> +	struct resource mem_resources[3];
>> +	resource_size_t mem_offset[3];
>> +
>> +	int global_number;	/* PCI domain number */
>> +
>> +	resource_size_t dma_window_base_cur;
>> +	resource_size_t dma_window_size;
>> +
>> +	void *sys;
>> +};
>> +
>> +/*
>> + * Convert architecture specific pci controller structure to fsl_pci
>> + * PowerPC uses structure pci_controller and ARM uses structure pci_sys_data
>> + * to describe pci controller.
>> + */
>> +extern struct fsl_pci *fsl_arch_sys_to_pci(void *sys);
>> +
>> #endif /* __PCI_COMMON_H */
>> #endif /* __KERNEL__ */
>> -- 
>> 1.8.1.2
>>
>

WARNING: multiple messages have this Message-ID (diff)
From: B31939@freescale.com (Lian Minghuan-b31939)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 02/12][v3] pci: fsl: add structure fsl_pci
Date: Fri, 25 Oct 2013 13:58:06 +0800	[thread overview]
Message-ID: <526A086E.305@freescale.com> (raw)
In-Reply-To: <2B28E421-9B64-4CEC-9E00-8893502CE12F@kernel.crashing.org>

Hi Kumar,

please see my comment inline.

On 10/24/2013 12:11 PM, Kumar Gala wrote:
> On Oct 23, 2013, at 5:41 AM, Minghuan Lian wrote:
>
>> PowerPC uses structure pci_controller to describe PCI controller,
>> but ARM uses structure pci_sys_data. In order to support PowerPC
>> and ARM simultaneously, the patch adds a structure fsl_pci that
>> contains most of the members of the pci_controller and pci_sys_data.
>> Meanwhile, it defines a interface fsl_arch_sys_to_pci() which should
>> be implemented in architecture-specific PCI controller driver to
>> convert pci_controller or pci_sys_data to fsl_pci.
>>
>> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com>
>> ---
>> change log:
>> v1-v3:
>> Derived from http://patchwork.ozlabs.org/patch/278965/
>>
>> Based on upstream master.
>> Based on the discussion of RFC version here
>> http://patchwork.ozlabs.org/patch/274487/
>>
>> include/linux/fsl/pci-common.h | 41 +++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 41 insertions(+)
> NAK.
>
> We discussed this some at the ARM Summit this week and the feeling is we need to move to a common interface between the various ARCHs.
[Minghuan] Do you mean we will use the common interface instead of 
arch/powerpc/kernel/pci-common.c...
and arch/arm/kernel/bios32.c?  Who will do the code movement and when 
will the work be completed? The patches just move the common functions 
of FSL PCI controller operation which can be re-used by PowerPC and ARM. 
LS1 is coming, I worry about not having enough time to wait for the move 
is completed.

> - k
>
>> diff --git a/include/linux/fsl/pci-common.h b/include/linux/fsl/pci-common.h
>> index 5e4f683..e56a040 100644
>> --- a/include/linux/fsl/pci-common.h
>> +++ b/include/linux/fsl/pci-common.h
>> @@ -102,5 +102,46 @@ struct ccsr_pci {
>>
>> };
>>
>> +/*
>> + * Structure of a PCI controller (host bridge)
>> + */
>> +struct fsl_pci {
>> +	struct list_head node;
>> +	bool is_pcie;
>> +	struct device_node *dn;
>> +	struct device *dev;
>> +
>> +	int first_busno;
>> +	int last_busno;
>> +	int self_busno;
>> +	struct resource busn;
>> +
>> +	struct pci_ops *ops;
>> +	struct ccsr_pci __iomem *regs;
>> +
>> +	u32 indirect_type;
>> +
>> +	struct resource io_resource;
>> +	resource_size_t io_base_phys;
>> +	resource_size_t pci_io_size;
>> +
>> +	struct resource mem_resources[3];
>> +	resource_size_t mem_offset[3];
>> +
>> +	int global_number;	/* PCI domain number */
>> +
>> +	resource_size_t dma_window_base_cur;
>> +	resource_size_t dma_window_size;
>> +
>> +	void *sys;
>> +};
>> +
>> +/*
>> + * Convert architecture specific pci controller structure to fsl_pci
>> + * PowerPC uses structure pci_controller and ARM uses structure pci_sys_data
>> + * to describe pci controller.
>> + */
>> +extern struct fsl_pci *fsl_arch_sys_to_pci(void *sys);
>> +
>> #endif /* __PCI_COMMON_H */
>> #endif /* __KERNEL__ */
>> -- 
>> 1.8.1.2
>>
>

  parent reply	other threads:[~2013-10-25  5:58 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 10:41 [PATCH 01/12][v3] pci: fsl: derive the common PCI driver to drivers/pci/host Minghuan Lian
2013-10-23 10:41 ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 02/12][v3] pci: fsl: add structure fsl_pci Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-24  4:11   ` Kumar Gala
2013-10-24  4:11     ` Kumar Gala
2013-10-24  4:11     ` Kumar Gala
2013-10-24  4:15     ` Zang Roy-R61911
2013-10-24  4:15       ` Zang Roy-R61911
2013-10-24  4:15       ` Zang Roy-R61911
2013-10-25  5:58     ` Lian Minghuan-b31939 [this message]
2013-10-25  5:58       ` Lian Minghuan-b31939
2013-10-25  5:58       ` Lian Minghuan-b31939
2013-10-28 18:22       ` Scott Wood
2013-10-28 18:22         ` Scott Wood
2013-10-28 18:22         ` Scott Wood
2014-01-03 22:19   ` [02/12,v3] " Scott Wood
2014-01-03 22:19     ` Scott Wood
2014-01-06  6:10     ` Lian Minghuan-b31939
2014-01-06  6:10       ` Lian Minghuan-b31939
2014-01-07  8:33       ` Scott Wood
2014-01-07  8:33         ` Scott Wood
2014-01-22 23:38     ` Roy Zang
2014-01-22 23:38       ` Roy Zang
2013-10-23 10:41 ` [PATCH 03/12][v3] pci: fsl: add PCI indirect access support Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2014-01-03 22:33   ` [03/12,v3] " Scott Wood
2014-01-03 22:33     ` Scott Wood
2014-01-06  5:36     ` Lian Minghuan-b31939
2014-01-06  5:36       ` Lian Minghuan-b31939
2014-01-07  7:13       ` Scott Wood
2014-01-07  7:13         ` Scott Wood
2013-10-23 10:41 ` [PATCH 04/12][v3] pci: fsl: add early " Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 05/12][v3] pci: fsl: port PCI ATMU related code Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 06/12][v3] pci: fsl: port PCI controller setup code Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 07/12][v3] pci: fsl: port PCI platform driver Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 08/12][v3] pci: fsl: add PowerPC PCI driver Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 09/12][v3] pci: fsl: update PCI PM driver Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 10/12][v3] pci: fsl: support function fsl_pci_assign_primary Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-10-23 10:41 ` [PATCH 11/12][v3] pci: fsl: update PCI EDAC driver Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2014-01-03 22:16   ` [11/12,v3] " Scott Wood
2014-01-03 22:16     ` Scott Wood
2014-01-06  3:57     ` Lian Minghuan-b31939
2014-01-06  3:57       ` Lian Minghuan-b31939
2013-10-23 10:41 ` [PATCH 12/12][v3] pci: fsl: fix function check_pci_ctl_endpt_part Minghuan Lian
2013-10-23 10:41   ` Minghuan Lian
2013-11-25 23:01 ` [PATCH 01/12][v3] pci: fsl: derive the common PCI driver to drivers/pci/host Bjorn Helgaas
2013-11-25 23:01   ` Bjorn Helgaas
2014-01-03 22:37   ` Scott Wood
2014-01-03 22:37     ` Scott Wood

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=526A086E.305@freescale.com \
    --to=b31939@freescale.com \
    --cc=Minghuan.Lian@freescale.com \
    --cc=arnd@arndb.de \
    --cc=bhelgaas@google.com \
    --cc=galak@kernel.crashing.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=r61911@freescale.com \
    --cc=scottwood@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.