public inbox for linux-arch@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/7][RFC] Move Marvell MBUS window handling into drivers
@ 2008-03-07 10:19 Lennert Buytenhek
  2008-03-07 10:19 ` Lennert Buytenhek
       [not found] ` <20080307101913.GA11918-mfnYTeDhw6uOVk/H6u/4e9i2O/JbrIOy@public.gmane.org>
  0 siblings, 2 replies; 20+ messages in thread
From: Lennert Buytenhek @ 2008-03-07 10:19 UTC (permalink / raw)
  To: linux-arch-u79uwXL29TY76Z2rM5mHXA
  Cc: Saeed Bishara, Dale Farnsworth, Russell King, Tzachi Perelstein,
	Nicolas Pitre

Hi all,

Various Marvell chips (ARM SoCs, MIPS/PPC northbridges,
standalone PCI/PCIe SATA/etc. controllers) use an on-chip bus
called MBUS.

An MBUS bus address consists of not only a 32/64-bit address, but
also of a target/attribute ID, which identify which of the connected
MBUS peripherals the access is intended for.  I.e., transactions are
routed explicitly, rather than implicitly based on their address.

Peripherals map DMA addresses (as handed to them via e.g. TX/RX
descriptors) to MBUS bus addresses via a set of programmable
per-peripheral address map windows.

In the typical ARM/PPC case, each DMA-capable MBUS peripheral is
programmed such that its entire DMA address range points to the
on-chip DRAM controller.  (But if you wanted, you could also map a
peripheral's entire DMA address range to e.g. the PCI MEM address
range of some on-chip PCI/PCIe controller.)

For things like PCIe SATA controllers, you don't need to worry
about setting these address windows, but on most of the ARM/PPC/MIPS
stuff, the mapping windows don't contain valid values after reset,
and the programming has to be done by the bootloader or the kernel.

While the MBUS address map registers are an integral part of each
peripheral's own register set, these MBUS address map windows are
currently programmed directly by platform code, leading to such
gems as arch/arm/mach-orion/addr-map.c and
arch/powerpc/platforms/chrp/pegasos_eth.c.

This patch set is an initial attempt at moving programming of the
MBUS register windows for the set of MBUS peripherals that we currently
have in-tree drivers for from platform code into drivers.

With these patches, info about DRAM target/attribute IDs is prepared
by the platform code as usual, but then passed into platform drivers
via platform device data, instead of programming that data into the
peripherals directly.

This avoids duplicating the window programming code across each
platform that wants to use these peripherals, and avoids exposing
internal peripheral register set details outside of their drivers.

Comments appreciated.


thanks,
Lennert
--
To unsubscribe from this list: send the line "unsubscribe linux-arch" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

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

end of thread, other threads:[~2008-03-16 11:59 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-07 10:19 [PATCH 0/7][RFC] Move Marvell MBUS window handling into drivers Lennert Buytenhek
2008-03-07 10:19 ` Lennert Buytenhek
     [not found] ` <20080307101913.GA11918-mfnYTeDhw6uOVk/H6u/4e9i2O/JbrIOy@public.gmane.org>
2008-03-07 10:20   ` [PATCH 1/7] introduce mbus DRAM target info abstraction Lennert Buytenhek
2008-03-07 10:20     ` Lennert Buytenhek
2008-03-07 10:21   ` [PATCH 2/7] Orion: initialise mbus DRAM target info on boot Lennert Buytenhek
2008-03-07 10:21     ` Lennert Buytenhek
2008-03-07 10:22   ` [PATCH 3/7] Orion: make PCIe/PCI support use mbus DRAM info Lennert Buytenhek
2008-03-07 10:22     ` Lennert Buytenhek
2008-03-07 10:22   ` [PATCH 4/7] ehci-orion: mbus decode window support Lennert Buytenhek
2008-03-07 10:22     ` Lennert Buytenhek
2008-03-07 10:22   ` [PATCH 5/7] mv643xx_eth: " Lennert Buytenhek
2008-03-07 10:22     ` Lennert Buytenhek
2008-03-07 10:23   ` [PATCH 6/7] sata_mv: " Lennert Buytenhek
2008-03-07 10:23     ` Lennert Buytenhek
2008-03-07 10:23   ` [PATCH 7/7] Orion: leave peripheral window programming up to drivers Lennert Buytenhek
2008-03-07 10:23     ` Lennert Buytenhek
2008-03-10  8:31   ` [PATCH 0/7][RFC] Move Marvell MBUS window handling into drivers Tzachi Perelstein
2008-03-10  8:31     ` Tzachi Perelstein
2008-03-16 11:59   ` Russell King - ARM Linux
2008-03-16 11:59     ` Russell King - ARM Linux

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