All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Mark A. Greer" <mgreer@mvista.com>
To: David Woodhouse <dwmw2@infradead.org>
Cc: linux-emb <linuxppc-embedded@lists.linuxppc.org>
Subject: mv6360 support in mv64x60.c (was Re: GT64260_eth (Ethernet) Driver)
Date: Tue, 29 Jun 2004 15:12:27 -0700	[thread overview]
Message-ID: <40E1E94B.9060204@mvista.com> (raw)


>On Fri, 2004-06-25 at 17:07 -0700, Mark A. Greer wrote:

>>> Let me know how it goes.
>
>
>
>I have memory probing working at last. I don't quite understand what I
>was doing wrong there -- I think I was just being stupid and/or the code
>to move the GT64x60 internal registers doesn't work.  If I leave it where
>the bootloader put it, it's OK.

You mean in the arch/ppc/boot/simple code, right?  You may need to do something like what is in arch/ppc/boot/simple/misc-ev64260.S to move the dev windows for your uart (if you're using an external uart).  I successfully change the internal registers base addr on the ev64260.

>Automatic detection of the chip type still isn't working, because it
>tries to work it out from its own PCI ident, but the MV64360 doesn't
>seem to appear on the PCI bus -- there _is_ no device 0.

Strange...according to the manual, you figure it out the same way no matter what bridge it is and it works for the 260 on my ev64260.  Are you sure your setup_info is correct?

>The memory windows aren't right -- you have base_bits == 20 but those 20
>bits actually hold bits 16-35 of the address. That's not a typo, so
>setting base_bits to 16 seems to be the correct thing to do unless we're
>going to handle 'extended address mode'.

Yes, 20 bits in the reg starting at bit 0 (LSB) correspond to bits 35:16 of the window.  As long as the 'base' you pass into mv64x60_set_32bit_window() is correct, it should work I think (or be close)--but, of course, I haven't tested it yet :)

Would you turn on DEBUG and send me the dump (along with your setup_info) or give me a reg dump from you bdi (or whatever) or a dump of what's in __log_buf.

>Also we disable all the memory windows for I/O and only re-enable them
>later. That breaks if we actually try to access any of the I/O in the
>meantime -- which we do if we enable MV64x60 debugging, because it keeps
>calling printk() :)

Well, I've been burned in the past by "dangling windows" so I was trying to be as safe as possible.  BTW, prink() isn't atually the issue since console_init() isn't called for some time after setup_arch().  However, it is an issue for progress & KGDB.  Good point, though, I missed that one.  What if we extend the setup_info to include dev bus windows and make a routine to set those up when we're setting up the pci windows??

>Is there a reason we need to disable the windows? Could we pass an array
>of the desired settings to mv64x60_init() and have them set up
>immediately, rather than just disabled and then fixed again later?

Okay, I think we're in agreement.  Just to make sure, the solution is to add an array to setup_info that contains the dev bus window ranges and have the core code set those up when its setting up the PCI windows.  Agree?

>I could register my console later, I suppose, and live without printk
>until after setup_arch()... but that sucks.

You must have some other issue.  printk() isn't going to actually try to access the uart/mpsc until console_init() is called in start_kernel().  Before console_init() is called, the msgs are just being put into __log_buf.  If you are panic'ing in console_init() then you may be missing a window setup call in your board's setup_arch routine or the address you specified for the uart is wrong (or something like that).  If you're using progress or KGDB, that's a different story.

Mark


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

             reply	other threads:[~2004-06-29 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-06-29 22:12 Mark A. Greer [this message]
2004-06-30 10:23 ` mv6360 support in mv64x60.c (was Re: GT64260_eth (Ethernet) Driver) David Woodhouse
2004-07-01 14:13 ` David Woodhouse
2004-07-01 15:24   ` Matt Porter
2004-07-01 19:10   ` Mark A. Greer
     [not found]     ` <1088777061.14216.4449.camel@hades.cambridge.redhat.com>
2004-07-02 23:02       ` Mark A. Greer

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=40E1E94B.9060204@mvista.com \
    --to=mgreer@mvista.com \
    --cc=dwmw2@infradead.org \
    --cc=linuxppc-embedded@lists.linuxppc.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.