All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Gerhard Pircher" <gerhard_pircher@gmx.net>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org, debian-powerpc@lists.debian.org
Subject: Re: AGPGART driver for ArticiaS - ioremap() problem
Date: Fri, 20 Jan 2006 12:16:38 +0100 (MET)	[thread overview]
Message-ID: <17310.1137755798@www009.gmx.net> (raw)
In-Reply-To: 1137708554.12998.31.camel@localhost.localdomain

> --- Ursprüngliche Nachricht ---
> Von: Benjamin Herrenschmidt <benh@kernel.crashing.org>
> An: Gerhard Pircher <gerhard_pircher@gmx.net>
> Kopie: linuxppc-dev@ozlabs.org, debian-powerpc@lists.debian.org
> Betreff: Re: AGPGART driver for ArticiaS - ioremap() problem
> Datum: Fri, 20 Jan 2006 09:09:13 +1100
> 
> > > Makes sense, since this value is right in the middle of your RAM :)
> > > What does the firmware sets the base register too ?
> > I did a readout of all AGP related registers and the base register was
> > set to 0x0, so the firmware doesn't set it up at all.
> > 
> > > Can't you try to allocate some resource in the PCI area that isn't
> > > already occupied instead ?
> > I though the GART base address should be in memory space!?
> 
> Euh... I was talking about the aperture base, not the GART base... (One
> is the address one the bus where the AGP area will be visible, the other
> is where the GART will be in memory, that is the table that contains the
> mapping between AGP pages and memory pages).
Doh! :) Actually I meant the aperture base. That was a communication error
between brain and hands. :) 

> > Sorry for this dumb question: how can I allocate a resource in the PCI
> > area? I'm not yet familiar with the whole Linux PCI/MM API. :) With
> > something like pci_alloc_consistent()?
> 
> Nope... look at drivers/pci/setup-res.c how it does for allocating new
> resources for PCI devices.
I guess you mean something like this code snipped from the efficeon-agp.c
source code (with pci_assign_resource()):

---

/*
 * The following fixes the case where the BIOS has "forgotten" to
 * provide an address range for the GART.
 * 20030610 - hamish@zot.org
 */
r = &pdev->resource[0];
if (!r->start && r->end) {
   if(pci_assign_resource(pdev, 0)) {
      printk(KERN_ERR PFX "could not assign resource 0\n");
      return -ENODEV;
   }
}

/*
 * If the device has not been properly setup, the following will catch
 * the problem and should stop the system from crashing.
 * 20030610 - hamish@zot.org
 */
if (pci_enable_device(pdev)) {
   printk(KERN_ERR PFX "Unable to Enable PCI device\n");
   return -ENODEV;
}

/* Fill in the mode register */
if (cap_ptr) {
   pci_read_config_dword(pdev,
   bridge->capndx+PCI_AGP_STATUS, &bridge->mode);
}

pci_set_drvdata(pdev, bridge);

----

BTW: I took a look at the PCI resources list of the AmigaOne and found out
that the resources of the AGP graphic card are allocated to bus 0 (PCI
only). IMHO their allocation should be assigned to bus 1 (AGP) (at least
this is the case on x86!?), so I think this should be fixed. Is my
assumption correct?

Thanks!

Gerhard

-- 
10 GB Mailbox, 100 FreeSMS/Monat http://www.gmx.net/de/go/topmail
+++ GMX - die erste Adresse für Mail, Message, More +++

  reply	other threads:[~2006-01-20 11:16 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-15 23:10 AGPGART driver for ArticiaS - ioremap() problem Gerhard Pircher
2006-01-15 23:25 ` Benjamin Herrenschmidt
2006-01-16  8:11   ` Gerhard Pircher
2006-01-16 23:18     ` Benjamin Herrenschmidt
2006-01-17  8:37       ` Gerhard Pircher
2006-01-17 21:24         ` Benjamin Herrenschmidt
2006-01-18 19:40           ` Gerhard Pircher
2006-01-18 23:09             ` Benjamin Herrenschmidt
2006-01-19  8:50               ` Gerhard Pircher
2006-01-19  9:59                 ` Benjamin Herrenschmidt
2006-01-19 10:52                   ` Gerhard Pircher
2006-01-19 22:09                     ` Benjamin Herrenschmidt
2006-01-20 11:16                       ` Gerhard Pircher [this message]
2006-01-20 23:00                         ` Benjamin Herrenschmidt
  -- strict thread matches above, loose matches on Subject: below --
2006-01-23 22:15 Gerhard Pircher
2006-01-21  1:59 Gerhard Pircher
2006-01-21 22:48 ` Benjamin Herrenschmidt
2006-01-23 22:12   ` Gerhard Pircher
2006-01-23 23:15     ` Benjamin Herrenschmidt
2006-01-11 21:00 Gerhard Pircher
2006-01-11 21:52 ` John W. Linville
2006-01-11 22:18   ` Gerhard Pircher
2006-01-12  4:44 ` Benjamin Herrenschmidt
2006-01-12  8:15   ` Gerhard Pircher
2006-01-15 21:48     ` Benjamin Herrenschmidt
2006-01-12 19:15   ` Gerhard Pircher

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=17310.1137755798@www009.gmx.net \
    --to=gerhard_pircher@gmx.net \
    --cc=benh@kernel.crashing.org \
    --cc=debian-powerpc@lists.debian.org \
    --cc=linuxppc-dev@ozlabs.org \
    /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.