public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Anatolij Gustschin <agust@denx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] ati_radeon: Support PCI virtual not eq bus mapping.
Date: Wed, 31 Mar 2010 19:03:22 +0200	[thread overview]
Message-ID: <20100331190322.62bd5642@wker> (raw)
In-Reply-To: <1270047297-25092-1-git-send-email-Ed.Swarthout@freescale.com>

On Wed, 31 Mar 2010 09:54:57 -0500
Ed Swarthout <Ed.Swarthout@freescale.com> wrote:

> Use pci_bus_to_virt() to convert the bus address from the BARs to
> virtual address' to eliminate the direct mapping requirement.
> 
> Rename variables to better match usage (_phys -> _bus or no-suffix)
> 
> This fixes the mpc8572ds CONFIG_PYS_64BIT mode failure: 
> "videoboot: Vidoe ROM failed to map!"

s/CONFIG_PYS_64BIT/CONFIG_PHYS_64BIT
s/Vidoe/Video

> Tested on mpc8572ds with and without CONFIG_PHYS_64BIT.
> 
> Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com>
> ---
> 
> This patch is independent of the ati radeon return error patch,
> but for ease of debug it should be applied with this one.
> 
>  drivers/bios_emulator/atibios.c |    9 ++++---
>  drivers/video/ati_radeon_fb.c   |   45 ++++++++++++++++++++------------------
>  drivers/video/ati_radeon_fb.h   |    4 +-
>  3 files changed, 31 insertions(+), 27 deletions(-)

With this patch applied following warnings appear:

ati_radeon_fb.c: In function 'video_hw_init':
ati_radeon_fb.c:740: warning: assignment makes integer from pointer without a cast
ati_radeon_fb.c:741: warning: assignment makes integer from pointer without a cast
ati_radeon_fb.c:746: warning: assignment makes integer from pointer without a cast
ati_radeon_fb.c:754: warning: assignment makes integer from pointer without a cast
ati_radeon_fb.c:755: warning: assignment makes integer from pointer without a cast

Please include inlined patch below to fix them. Thanks.

Other than this, I tested this patch on PPC440EPx based sequoia board
with ATI Radeon 9250 PCI card, it works.

Anatolij


diff --git a/drivers/video/ati_radeon_fb.c b/drivers/video/ati_radeon_fb.c
index a74f724..c2c2096 100644
--- a/drivers/video/ati_radeon_fb.c
+++ b/drivers/video/ati_radeon_fb.c
@@ -737,13 +737,13 @@ void *video_hw_init(void)
 	}
 
 	pGD->isaBase = CONFIG_SYS_ISA_IO_BASE_ADDRESS;
-	pGD->pciBase = rinfo->fb_base;
-	pGD->frameAdrs = rinfo->fb_base;
+	pGD->pciBase = (unsigned int)rinfo->fb_base;
+	pGD->frameAdrs = (unsigned int)rinfo->fb_base;
 	pGD->memSize = 64 * 1024 * 1024;
 
 	/* Cursor Start Address */
-	pGD->dprBase =
-	    (pGD->winSizeX * pGD->winSizeY * pGD->gdfBytesPP) + rinfo->fb_base;
+	pGD->dprBase = (pGD->winSizeX * pGD->winSizeY * pGD->gdfBytesPP) +
+		       (unsigned int)rinfo->fb_base;
 	if ((pGD->dprBase & 0x0fff) != 0) {
 		/* allign it */
 		pGD->dprBase &= 0xfffff000;
@@ -751,8 +751,8 @@ void *video_hw_init(void)
 	}
 	DPRINT ("Cursor Start %x Pattern Start %x\n", pGD->dprBase,
 		PATTERN_ADR);
-	pGD->vprBase = rinfo->fb_base;	/* Dummy */
-	pGD->cprBase = rinfo->fb_base;	/* Dummy */
+	pGD->vprBase = (unsigned int)rinfo->fb_base;	/* Dummy */
+	pGD->cprBase = (unsigned int)rinfo->fb_base;	/* Dummy */
 	/* set up Hardware */
 
 	/* Clear video memory (only visible screen area) */

  reply	other threads:[~2010-03-31 17:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-31 14:54 [U-Boot] [PATCH] ati_radeon: Support PCI virtual not eq bus mapping Ed Swarthout
2010-03-31 17:03 ` Anatolij Gustschin [this message]
2010-03-31 20:52   ` [U-Boot] [PATCH V2] " Ed Swarthout
2010-04-08 14:37     ` Anatolij Gustschin

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=20100331190322.62bd5642@wker \
    --to=agust@denx.de \
    --cc=u-boot@lists.denx.de \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox