public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure
@ 2010-05-28 20:05 Timur Tabi
  2010-05-28 20:14 ` Kumar Gala
  2010-05-28 20:16 ` Kumar Gala
  0 siblings, 2 replies; 6+ messages in thread
From: Timur Tabi @ 2010-05-28 20:05 UTC (permalink / raw)
  To: u-boot

Add the LAW target (enum law_trgt_if) to the fsl_pci_info structure, so that
we can capture the LAW target for a given PCI or PCIE controller.  Also update
the SET_STD_PCI_INFO and SET_STD_PCIE_INFO macros to assign the
LAW_TRGT_IF_PCI[E]_x macro to the LAW target field of the structure.

This will allow future PCI[E] code to configure the LAW target automatically,
rather than requiring each board to it for each PCI controller separately.

Signed-off-by: Timur Tabi <timur@freescale.com>
---

Tested via MAKEALL.

If this patch is accepted, I'll use it for the P1022DS board support that I'm
working on.

 arch/powerpc/include/asm/fsl_pci.h |   19 +++++++++++--------
 1 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/powerpc/include/asm/fsl_pci.h b/arch/powerpc/include/asm/fsl_pci.h
index db61e7e..bb87543 100644
--- a/arch/powerpc/include/asm/fsl_pci.h
+++ b/arch/powerpc/include/asm/fsl_pci.h
@@ -162,14 +162,15 @@ typedef struct ccsr_pci {
 } ccsr_fsl_pci_t;
 
 struct fsl_pci_info {
-	unsigned long	regs;
-	pci_addr_t	mem_bus;
-	phys_size_t	mem_phys;
-	pci_size_t	mem_size;
-	pci_addr_t	io_bus;
-	phys_size_t	io_phys;
-	pci_size_t	io_size;
-	int		pci_num;
+	unsigned long regs;
+	pci_addr_t mem_bus;
+	phys_size_t mem_phys;
+	pci_size_t mem_size;
+	pci_addr_t io_bus;
+	phys_size_t io_phys;
+	pci_size_t io_size;
+	enum law_trgt_if law;
+	int pci_num;
 };
 
 int fsl_pci_init_port(struct fsl_pci_info *pci_info,
@@ -184,6 +185,7 @@ int fsl_pci_init_port(struct fsl_pci_info *pci_info,
 	x.io_bus = CONFIG_SYS_PCI##num##_IO_BUS; \
 	x.io_phys = CONFIG_SYS_PCI##num##_IO_PHYS; \
 	x.io_size = CONFIG_SYS_PCI##num##_IO_SIZE; \
+	x.law = LAW_TRGT_IF_PCI_##num; \
 	x.pci_num = num; \
 }
 
@@ -196,6 +198,7 @@ int fsl_pci_init_port(struct fsl_pci_info *pci_info,
 	x.io_bus = CONFIG_SYS_PCIE##num##_IO_BUS; \
 	x.io_phys = CONFIG_SYS_PCIE##num##_IO_PHYS; \
 	x.io_size = CONFIG_SYS_PCIE##num##_IO_SIZE; \
+	x.law = LAW_TRGT_IF_PCIE_##num; \
 	x.pci_num = num; \
 }
 
-- 
1.6.5

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure
  2010-05-28 20:05 [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure Timur Tabi
@ 2010-05-28 20:14 ` Kumar Gala
  2010-05-28 20:30   ` Timur Tabi
  2010-05-28 20:16 ` Kumar Gala
  1 sibling, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2010-05-28 20:14 UTC (permalink / raw)
  To: u-boot


On May 28, 2010, at 3:05 PM, Timur Tabi wrote:

> Add the LAW target (enum law_trgt_if) to the fsl_pci_info structure, so that
> we can capture the LAW target for a given PCI or PCIE controller.  Also update
> the SET_STD_PCI_INFO and SET_STD_PCIE_INFO macros to assign the
> LAW_TRGT_IF_PCI[E]_x macro to the LAW target field of the structure.
> 
> This will allow future PCI[E] code to configure the LAW target automatically,
> rather than requiring each board to it for each PCI controller separately.
> 
> Signed-off-by: Timur Tabi <timur@freescale.com>
> ---
> 
> Tested via MAKEALL.
> 
> If this patch is accepted, I'll use it for the P1022DS board support that I'm
> working on.
> 
> arch/powerpc/include/asm/fsl_pci.h |   19 +++++++++++--------
> 1 files changed, 11 insertions(+), 8 deletions(-)

Ack.

Will wait til there is code that uses fsl_pci_info.law until this is applied.

- k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure
  2010-05-28 20:05 [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure Timur Tabi
  2010-05-28 20:14 ` Kumar Gala
@ 2010-05-28 20:16 ` Kumar Gala
  2010-05-28 20:18   ` Timur Tabi
  1 sibling, 1 reply; 6+ messages in thread
From: Kumar Gala @ 2010-05-28 20:16 UTC (permalink / raw)
  To: u-boot

> 
> struct fsl_pci_info {
> -	unsigned long	regs;
> -	pci_addr_t	mem_bus;
> -	phys_size_t	mem_phys;
> -	pci_size_t	mem_size;
> -	pci_addr_t	io_bus;
> -	phys_size_t	io_phys;
> -	pci_size_t	io_size;
> -	int		pci_num;
> +	unsigned long regs;
> +	pci_addr_t mem_bus;
> +	phys_size_t mem_phys;
> +	pci_size_t mem_size;
> +	pci_addr_t io_bus;
> +	phys_size_t io_phys;
> +	pci_size_t io_size;
> +	enum law_trgt_if law;
> +	int pci_num;
> };

My pref is to leave the tabs.

- k

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure
  2010-05-28 20:16 ` Kumar Gala
@ 2010-05-28 20:18   ` Timur Tabi
  2010-05-28 20:31     ` Kumar Gala
  0 siblings, 1 reply; 6+ messages in thread
From: Timur Tabi @ 2010-05-28 20:18 UTC (permalink / raw)
  To: u-boot

Kumar Gala wrote:

> My pref is to leave the tabs.

The 'law' field would be misaligned.  I would need to insert lots of tabs.

	unsigned long	regs;
	pci_addr_t	mem_bus;
	phys_size_t	mem_phys;
	pci_size_t	mem_size;
	pci_addr_t	io_bus;
	phys_size_t	io_phys;
	pci_size_t	io_size;
	enum law_target_if law;
	int		pci_num;

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure
  2010-05-28 20:14 ` Kumar Gala
@ 2010-05-28 20:30   ` Timur Tabi
  0 siblings, 0 replies; 6+ messages in thread
From: Timur Tabi @ 2010-05-28 20:30 UTC (permalink / raw)
  To: u-boot

Kumar Gala wrote:
> Will wait til there is code that uses fsl_pci_info.law until this is applied.
> 

Can you push your ics307 patch to your repository?

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure
  2010-05-28 20:18   ` Timur Tabi
@ 2010-05-28 20:31     ` Kumar Gala
  0 siblings, 0 replies; 6+ messages in thread
From: Kumar Gala @ 2010-05-28 20:31 UTC (permalink / raw)
  To: u-boot


On May 28, 2010, at 3:18 PM, Timur Tabi wrote:

> Kumar Gala wrote:
> 
>> My pref is to leave the tabs.
> 
> The 'law' field would be misaligned.  I would need to insert lots of tabs.
> 
> 	unsigned long	regs;
> 	pci_addr_t	mem_bus;
> 	phys_size_t	mem_phys;
> 	pci_size_t	mem_size;
> 	pci_addr_t	io_bus;
> 	phys_size_t	io_phys;
> 	pci_size_t	io_size;
> 	enum law_target_if law;
> 	int		pci_num;

ok, I'm good with the patch as you have it.

- k

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-05-28 20:31 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-28 20:05 [U-Boot] [PATCH] fsl: add LAW target to fsl_pci_info structure Timur Tabi
2010-05-28 20:14 ` Kumar Gala
2010-05-28 20:30   ` Timur Tabi
2010-05-28 20:16 ` Kumar Gala
2010-05-28 20:18   ` Timur Tabi
2010-05-28 20:31     ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox