public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] pciauto_setup_device bars_num fix
@ 2007-07-25  6:28 Ed Swarthout
  2007-07-26  1:27 ` Shinya Kuribayashi
  0 siblings, 1 reply; 2+ messages in thread
From: Ed Swarthout @ 2007-07-25  6:28 UTC (permalink / raw)
  To: u-boot

Passing bars_num=0 to pciauto_setup_device should assign no bars.

Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
---
 drivers/pci_auto.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/pci_auto.c b/drivers/pci_auto.c
index a3c609b..2378553 100644
--- a/drivers/pci_auto.c
+++ b/drivers/pci_auto.c
@@ -94,7 +94,7 @@ void pciauto_setup_device(struct pci_controller *hose,
 	pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &cmdstat);
 	cmdstat = (cmdstat & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) | PCI_COMMAND_MASTER;
 
-	for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
+	for (bar = PCI_BASE_ADDRESS_0; bar < PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
 		/* Tickle the BAR and get the response */
 		pci_hose_write_config_dword(hose, dev, bar, 0xffffffff);
 		pci_hose_read_config_dword(hose, dev, bar, &bar_response);
-- 
1.5.3.rc1.13.g08e38

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

* [U-Boot-Users] [PATCH] pciauto_setup_device bars_num fix
  2007-07-25  6:28 [U-Boot-Users] [PATCH] pciauto_setup_device bars_num fix Ed Swarthout
@ 2007-07-26  1:27 ` Shinya Kuribayashi
  0 siblings, 0 replies; 2+ messages in thread
From: Shinya Kuribayashi @ 2007-07-26  1:27 UTC (permalink / raw)
  To: u-boot

Ed Swarthout wrote:
> Passing bars_num=0 to pciauto_setup_device should assign no bars.
> 
> Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>

Indeed. This patch works fine on our MIPS target.

Acked-by: Shinya Kuribayashi <shinya.kuribayashi@necel.com>

> ---
>  drivers/pci_auto.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/pci_auto.c b/drivers/pci_auto.c
> index a3c609b..2378553 100644
> --- a/drivers/pci_auto.c
> +++ b/drivers/pci_auto.c
> @@ -94,7 +94,7 @@ void pciauto_setup_device(struct pci_controller *hose,
>  	pci_hose_read_config_dword(hose, dev, PCI_COMMAND, &cmdstat);
>  	cmdstat = (cmdstat & ~(PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) | PCI_COMMAND_MASTER;
>  
> -	for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
> +	for (bar = PCI_BASE_ADDRESS_0; bar < PCI_BASE_ADDRESS_0 + (bars_num*4); bar += 4) {
>  		/* Tickle the BAR and get the response */
>  		pci_hose_write_config_dword(hose, dev, bar, 0xffffffff);
>  		pci_hose_read_config_dword(hose, dev, bar, &bar_response);

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

end of thread, other threads:[~2007-07-26  1:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25  6:28 [U-Boot-Users] [PATCH] pciauto_setup_device bars_num fix Ed Swarthout
2007-07-26  1:27 ` Shinya Kuribayashi

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