From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 03/10] arm: mach-orion5x: use mv_mbus_dram_info() in PCI code
Date: Wed, 6 Mar 2013 14:43:39 +0100 [thread overview]
Message-ID: <1362577426-12804-4-git-send-email-thomas.petazzoni@free-electrons.com> (raw)
In-Reply-To: <1362577426-12804-1-git-send-email-thomas.petazzoni@free-electrons.com>
The PCI code was directly accessing the orion_mbus_dram_info structure
to get access to a description of the SDRAM chip selects in order to
configure the PCIe -> SDRAM address decoding windows.
However, with the introduction of the mvebu-mbus driver, we are going
to remove this global structure and instead leave only the exported
mv_mbus_dram_info() function to access this description of the SDRAM
chip selects. Therefore, we simply switch to using this API.
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
arch/arm/mach-orion5x/pci.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/arch/arm/mach-orion5x/pci.c b/arch/arm/mach-orion5x/pci.c
index d9c7c3b..973db98 100644
--- a/arch/arm/mach-orion5x/pci.c
+++ b/arch/arm/mach-orion5x/pci.c
@@ -402,8 +402,9 @@ static void __init orion5x_pci_master_slave_enable(void)
orion5x_pci_hw_wr_conf(bus_nr, 0, func, reg, 4, val | 0x7);
}
-static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)
+static void __init orion5x_setup_pci_wins(void)
{
+ const struct mbus_dram_target_info *dram = mv_mbus_dram_info();
u32 win_enable;
int bus;
int i;
@@ -420,7 +421,7 @@ static void __init orion5x_setup_pci_wins(struct mbus_dram_target_info *dram)
bus = orion5x_pci_local_bus_nr();
for (i = 0; i < dram->num_cs; i++) {
- struct mbus_dram_window *cs = dram->cs + i;
+ const struct mbus_dram_window *cs = dram->cs + i;
u32 func = PCI_CONF_FUNC_BAR_CS(cs->cs_index);
u32 reg;
u32 val;
@@ -467,7 +468,7 @@ static int __init pci_setup(struct pci_sys_data *sys)
/*
* Point PCI unit MBUS decode windows to DRAM space.
*/
- orion5x_setup_pci_wins(&orion_mbus_dram_info);
+ orion5x_setup_pci_wins();
/*
* Master + Slave enable
--
1.7.9.5
next prev parent reply other threads:[~2013-03-06 13:43 UTC|newest]
Thread overview: 59+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-06 13:43 [PATCH 3.10] Introduce a Marvell EBU MBus driver Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 01/10] arm: plat-orion: only build addr-map.c when needed Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 02/10] arm: plat-orion: use mv_mbus_dram_info() in PCIe code Thomas Petazzoni
2013-03-06 13:43 ` Thomas Petazzoni [this message]
2013-03-06 13:43 ` [PATCH 04/10] bus: introduce an Marvell EBU MBus driver Thomas Petazzoni
2013-03-06 19:08 ` Jason Gunthorpe
2013-03-06 19:27 ` Thomas Petazzoni
2013-03-06 20:24 ` Jason Gunthorpe
2013-03-06 20:40 ` Thomas Petazzoni
2013-03-06 21:50 ` Jason Gunthorpe
2013-03-06 22:27 ` Jason Cooper
2013-03-06 23:04 ` Jason Gunthorpe
2013-03-07 10:39 ` Thomas Petazzoni
2013-03-08 13:50 ` Arnd Bergmann
2013-03-08 14:06 ` Thomas Petazzoni
2013-03-08 15:41 ` Arnd Bergmann
2013-03-08 17:50 ` Jason Gunthorpe
2013-03-08 19:42 ` Arnd Bergmann
2013-03-08 20:05 ` Jason Gunthorpe
2013-03-08 22:46 ` Arnd Bergmann
2013-03-08 17:43 ` Jason Gunthorpe
2013-03-08 22:58 ` Arnd Bergmann
2013-03-07 22:20 ` Ezequiel Garcia
2013-03-07 23:05 ` Jason Gunthorpe
2013-03-08 1:02 ` Ezequiel Garcia
2013-03-08 8:10 ` Thomas Petazzoni
2013-03-08 17:29 ` Jason Gunthorpe
2013-03-08 17:59 ` Ezequiel Garcia
2013-03-08 18:31 ` Jason Gunthorpe
2013-03-08 18:53 ` Ezequiel Garcia
2013-03-18 16:27 ` Thomas Petazzoni
2013-03-18 17:18 ` Jason Gunthorpe
2013-03-08 15:59 ` Maxime Bizon
2013-03-08 16:48 ` Jason Gunthorpe
2013-03-08 17:12 ` Ezequiel Garcia
2013-03-08 8:14 ` Thomas Petazzoni
2013-03-08 18:26 ` Jason Gunthorpe
2013-03-07 3:50 ` Arnd Bergmann
2013-03-07 3:37 ` Arnd Bergmann
2013-03-07 6:35 ` Jason Gunthorpe
2013-03-08 16:48 ` Jason Cooper
2013-03-08 19:47 ` Jason Gunthorpe
2013-03-08 22:54 ` Arnd Bergmann
2013-03-07 10:58 ` Thomas Petazzoni
2013-03-07 17:37 ` Jason Gunthorpe
2013-03-07 19:11 ` Thomas Petazzoni
2013-03-07 19:55 ` Jason Gunthorpe
2013-03-07 20:28 ` Thomas Petazzoni
2013-03-07 20:47 ` Jason Gunthorpe
2013-03-06 13:43 ` [PATCH 05/10] arm: mach-mvebu: convert to use mvebu-mbus driver Thomas Petazzoni
2013-03-06 13:58 ` Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 06/10] arm: mach-kirkwood: " Thomas Petazzoni
2013-03-06 19:09 ` Jason Gunthorpe
2013-03-06 19:31 ` Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 07/10] arm: mach-dove: " Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 08/10] arm: mach-orion5x: " Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 09/10] arm: mach-mv78xx0: convert to use the " Thomas Petazzoni
2013-03-06 13:43 ` [PATCH 10/10] arm: plat-orion: remove addr-map code Thomas Petazzoni
2013-03-06 16:59 [PATCH v2 for 3.10] Introduce a Marvell EBU MBus driver Thomas Petazzoni
2013-03-06 16:59 ` [PATCH 03/10] arm: mach-orion5x: use mv_mbus_dram_info() in PCI code Thomas Petazzoni
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=1362577426-12804-4-git-send-email-thomas.petazzoni@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).