From: Ezequiel Garcia <ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org Cc: Andrew Lunn <andrew-g2DYL2Zd6BY@public.gmane.org>, Jason Cooper <jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org>, Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>, Maen Suleiman <maen-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>, Lior Amsalem <alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org>, Bjorn Helgaas <bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org>, Sebastian Hesselbarth <sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Subject: [RESEND PATCH v7 17/22] ARM: mvebu: Initialize MBus using the DT binding Date: Mon, 15 Jul 2013 11:57:46 -0300 [thread overview] Message-ID: <1373900271-4722-18-git-send-email-ezequiel.garcia@free-electrons.com> (raw) In-Reply-To: <1373900271-4722-1-git-send-email-ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> Now that the mbus device tree binding has been introduced, we can switch over to it. Also, and since the initialization of the mbus driver is quite fundamental for the system to work properly, this patch adds a BUG() in case mbus fails to initialize. Signed-off-by: Ezequiel Garcia <ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> --- arch/arm/mach-mvebu/armada-370-xp.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index 97cbb80..829b573 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -34,44 +34,12 @@ static void __init armada_370_xp_map_io(void) debug_ll_io_init(); } -/* - * This initialization will be replaced by a DT-based - * initialization once the mvebu-mbus driver gains DT support. - */ - -#define ARMADA_370_XP_MBUS_WINS_OFFS 0x20000 -#define ARMADA_370_XP_MBUS_WINS_SIZE 0x100 -#define ARMADA_370_XP_SDRAM_WINS_OFFS 0x20180 -#define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20 - -static void __init armada_370_xp_mbus_init(void) -{ - char *mbus_soc_name; - struct device_node *dn; - const __be32 mbus_wins_offs = cpu_to_be32(ARMADA_370_XP_MBUS_WINS_OFFS); - const __be32 sdram_wins_offs = cpu_to_be32(ARMADA_370_XP_SDRAM_WINS_OFFS); - - if (of_machine_is_compatible("marvell,armada370")) - mbus_soc_name = "marvell,armada370-mbus"; - else - mbus_soc_name = "marvell,armadaxp-mbus"; - - dn = of_find_node_by_name(NULL, "internal-regs"); - BUG_ON(!dn); - - mvebu_mbus_init(mbus_soc_name, - of_translate_address(dn, &mbus_wins_offs), - ARMADA_370_XP_MBUS_WINS_SIZE, - of_translate_address(dn, &sdram_wins_offs), - ARMADA_370_XP_SDRAM_WINS_SIZE); -} - static void __init armada_370_xp_timer_and_clk_init(void) { of_clk_init(NULL); armada_370_xp_timer_init(); coherency_init(); - armada_370_xp_mbus_init(); + BUG_ON(mvebu_mbus_dt_init()); #ifdef CONFIG_CACHE_L2X0 l2x0_of_init(0, ~0UL); #endif -- 1.8.1.5
WARNING: multiple messages have this Message-ID (diff)
From: ezequiel.garcia@free-electrons.com (Ezequiel Garcia) To: linux-arm-kernel@lists.infradead.org Subject: [RESEND PATCH v7 17/22] ARM: mvebu: Initialize MBus using the DT binding Date: Mon, 15 Jul 2013 11:57:46 -0300 [thread overview] Message-ID: <1373900271-4722-18-git-send-email-ezequiel.garcia@free-electrons.com> (raw) In-Reply-To: <1373900271-4722-1-git-send-email-ezequiel.garcia@free-electrons.com> Now that the mbus device tree binding has been introduced, we can switch over to it. Also, and since the initialization of the mbus driver is quite fundamental for the system to work properly, this patch adds a BUG() in case mbus fails to initialize. Signed-off-by: Ezequiel Garcia <ezequiel.garcia@free-electrons.com> --- arch/arm/mach-mvebu/armada-370-xp.c | 34 +--------------------------------- 1 file changed, 1 insertion(+), 33 deletions(-) diff --git a/arch/arm/mach-mvebu/armada-370-xp.c b/arch/arm/mach-mvebu/armada-370-xp.c index 97cbb80..829b573 100644 --- a/arch/arm/mach-mvebu/armada-370-xp.c +++ b/arch/arm/mach-mvebu/armada-370-xp.c @@ -34,44 +34,12 @@ static void __init armada_370_xp_map_io(void) debug_ll_io_init(); } -/* - * This initialization will be replaced by a DT-based - * initialization once the mvebu-mbus driver gains DT support. - */ - -#define ARMADA_370_XP_MBUS_WINS_OFFS 0x20000 -#define ARMADA_370_XP_MBUS_WINS_SIZE 0x100 -#define ARMADA_370_XP_SDRAM_WINS_OFFS 0x20180 -#define ARMADA_370_XP_SDRAM_WINS_SIZE 0x20 - -static void __init armada_370_xp_mbus_init(void) -{ - char *mbus_soc_name; - struct device_node *dn; - const __be32 mbus_wins_offs = cpu_to_be32(ARMADA_370_XP_MBUS_WINS_OFFS); - const __be32 sdram_wins_offs = cpu_to_be32(ARMADA_370_XP_SDRAM_WINS_OFFS); - - if (of_machine_is_compatible("marvell,armada370")) - mbus_soc_name = "marvell,armada370-mbus"; - else - mbus_soc_name = "marvell,armadaxp-mbus"; - - dn = of_find_node_by_name(NULL, "internal-regs"); - BUG_ON(!dn); - - mvebu_mbus_init(mbus_soc_name, - of_translate_address(dn, &mbus_wins_offs), - ARMADA_370_XP_MBUS_WINS_SIZE, - of_translate_address(dn, &sdram_wins_offs), - ARMADA_370_XP_SDRAM_WINS_SIZE); -} - static void __init armada_370_xp_timer_and_clk_init(void) { of_clk_init(NULL); armada_370_xp_timer_init(); coherency_init(); - armada_370_xp_mbus_init(); + BUG_ON(mvebu_mbus_dt_init()); #ifdef CONFIG_CACHE_L2X0 l2x0_of_init(0, ~0UL); #endif -- 1.8.1.5
next prev parent reply other threads:[~2013-07-15 14:57 UTC|newest] Thread overview: 60+ messages / expand[flat|nested] mbox.gz Atom feed top 2013-07-15 14:57 [RESEND PATCH v7 00/22] MBus DT binding: The return of PCIe Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia [not found] ` <1373900271-4722-1-git-send-email-ezequiel.garcia-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org> 2013-07-15 14:57 ` [RESEND PATCH v7 01/22] memory: mvebu-devbus: Remove address decoding window workaround Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 02/22] bus: mvebu-mbus: Add new API for window creation Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 03/22] ARM: kirkwood: Move to ID based MBus " Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 04/22] ARM: mv78xx0: Move to ID based " Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 05/22] ARM: orion5x: " Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 06/22] ARM: dove: " Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 07/22] bus: mvebu-mbus: Factor out initialization details Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 08/22] bus: mvebu-mbus: Introduce device tree binding Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 09/22] bus: mvebu-mbus: Add static window allocation to the DT binding Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 10/22] bus: mvebu-mbus: Add new API for the PCIe memory and IO aperture Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 11/22] PCI: mvebu: Adapt to the new device tree layout Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 12/22] bus: mvebu-mbus: Remove the no longer used name-based API Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 13/22] bus: mvebu-mbus: Remove name -> target, attribute mapping tables Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 14/22] bus: mvebu-mbus: Update main description Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 15/22] bus: mvebu-mbus: Factorize Armada 370/XP data structures Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 16/22] ARM: mvebu: Remove the harcoded BootROM window allocation Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia [this message] 2013-07-15 14:57 ` [RESEND PATCH v7 17/22] ARM: mvebu: Initialize MBus using the DT binding Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 18/22] ARM: mvebu: Use the preprocessor on Armada 370/XP device tree files Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 19/22] ARM: mvebu: Add MBus to Armada 370/XP device tree Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 20/22] ARM: mvebu: Add BootROM " Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 21/22] ARM: mvebu: Relocate Armada 370/XP DeviceBus device tree nodes Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-15 14:57 ` [RESEND PATCH v7 22/22] ARM: mvebu: Relocate Armada 370/XP PCIe " Ezequiel Garcia 2013-07-15 14:57 ` Ezequiel Garcia 2013-07-20 15:44 ` [RESEND PATCH v7 00/22] MBus DT binding: The return of PCIe Ezequiel Garcia 2013-07-20 15:44 ` Ezequiel Garcia 2013-07-20 16:58 ` Andrew Lunn 2013-07-20 16:58 ` Andrew Lunn 2013-07-20 17:38 ` Andrew Lunn 2013-07-20 17:38 ` Andrew Lunn [not found] ` <20130720173847.GC26625-g2DYL2Zd6BY@public.gmane.org> 2013-07-20 18:36 ` Ezequiel Garcia 2013-07-20 18:36 ` Ezequiel Garcia 2013-07-20 18:54 ` Ezequiel Garcia 2013-07-20 18:54 ` Ezequiel Garcia 2013-07-20 19:45 ` Andrew Lunn 2013-07-20 19:45 ` Andrew Lunn 2013-07-21 15:27 ` Thomas Petazzoni 2013-07-21 15:27 ` 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=1373900271-4722-18-git-send-email-ezequiel.garcia@free-electrons.com \ --to=ezequiel.garcia-wi1+55scjutkeb57/3fjtnbpr1lh4cv8@public.gmane.org \ --cc=alior-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \ --cc=andrew-g2DYL2Zd6BY@public.gmane.org \ --cc=bhelgaas-hpIqsD4AKlfQT0dZR+AlfA@public.gmane.org \ --cc=devicetree-discuss-uLR06cmDAlY/bJ5BZ2RsiQ@public.gmane.org \ --cc=jason-NLaQJdtUoK4Be96aLqz0jA@public.gmane.org \ --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \ --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \ --cc=maen-eYqpPyKDWXRBDgjK7y7TUQ@public.gmane.org \ --cc=sebastian.hesselbarth-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.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: linkBe 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.