Marvell OpenRD-Ultimate machine support
Subsystems (2)
PATCH 1/1 Marvell OpenRD-Ultimate machine support
Hi!
This patch adds support for the OpenRD Ultimate machine(could be found at http://www.arm.linux.org.uk/developer/machines/list.php?id=2884)
Besides adding machine description this patch adds correction for PHY address for Ultimate version.
Differences from the previous attempt:
- Correctly filled instances of mv643xx_eth_platform_data in case of ultimate version.
- Do PCIE initialization w/o additional checks since all openrd types have it
- Init ge01 if (!openrd-base) to make the code cleaner
Regards,
-- Dmytro Milinevskyy
--- arch/arm/mach-kirkwood/Kconfig | 7 +++++++ arch/arm/mach-kirkwood/openrd-setup.c | 26 ++++++++++++++++++++++---- 2 files changed, 29 insertions(+), 4 deletions(-)
arch/arm/mach-kirkwood/Kconfig +7 -0
@@ -75,6 +75,13 @@ config MACH_OPENRD_CLIENT Say 'Y' here if you want your kernel to support the Marvell OpenRD Client Board. +config MACH_OPENRD_ULTIMATE + bool "Marvell OpenRD Ultimate Board" + select MACH_OPENRD + help + Say 'Y' here if you want your kernel to support the + Marvell OpenRD Ultimate Board. + config MACH_NETSPACE_V2 bool "LaCie Network Space v2 NAS Board" help
arch/arm/mach-kirkwood/openrd-setup.c +22 -4
@@ -1,7 +1,7 @@/* * arch/arm/mach-kirkwood/openrd-setup.c * -* Marvell OpenRD (Base|Client) Board Setup +* Marvell OpenRD (Base|Client|Ultimate) Board Setup * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any
@@ -73,9 +73,15 @@ static void __init openrd_init(void)kirkwood_ehci_init (); +if (machine_is_openrd_ultimate ()) { + openrd_ge00_data.phy_addr =MV643XX_ETH_PHY_ADDR (0 ); + openrd_ge01_data.phy_addr =MV643XX_ETH_PHY_ADDR (1 ); + } +kirkwood_ge00_init (&openrd_ge00_data); -if (machine_is_openrd_client ()) +if (!machine_is_openrd_base ())kirkwood_ge01_init (&openrd_ge01_data); +kirkwood_sata_init (&openrd_sata_data);kirkwood_sdio_init (&openrd_mvsdio_data);
@@ -84,8 +90,7 @@ static void __init openrd_init(void)static int __init openrd_pci_init (void ) { -if (machine_is_openrd_base () ||machine_is_openrd_client ()) -kirkwood_pcie_init (); +kirkwood_pcie_init ();return 0 ; }
@@ -116,3 +121,16 @@ MACHINE_START(OPENRD_CLIENT, "Marvell OpenRD Client Board") .timer = &kirkwood_timer, MACHINE_END#endif + +#ifdef CONFIG_MACH_OPENRD_ULTIMATE +MACHINE_START (OPENRD_ULTIMATE ,"Marvell OpenRD Ultimate Board" ) +/* Maintainer: Dhaval Vasa <[email protected]> */ + .phys_io = KIRKWOOD_REGS_PHYS_BASE, + .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc, + .boot_params = 0x00000100, + .init_machine = openrd_init, + .map_io = kirkwood_map_io, + .init_irq = kirkwood_init_irq, + .timer = &kirkwood_timer, +MACHINE_END +#endif
Signature · 1 line
1.7.1
Hi,
Quoted 5 lines · Dmytro Milinevskyy
[snipped]
arch/arm/mach-kirkwood/openrd-setup.c static void __init openrd_init(void) · line 96
Quoted 9 lines
arch/arm/mach-kirkwood/openrd-setup.c +1
-2@@ -84,8 +90,7 @@ static void __init openrd_init(void)static int __init openrd_pci_init (void ) { -if (machine_is_openrd_base () ||machine_is_openrd_client ()) -kirkwood_pcie_init (); +kirkwood_pcie_init ();return 0 ; }
You just 'broke' kirkwood, welcome to the club. We all have done this:
http://marc.info/?l=linux-arm-kernel&m=125624586625065&w=2
http://marc.info/?l=linux-arm-kernel&m=125804222219159&w=2
Put that 'if()' clause back in, the 'subsys_initcall(openrd_pci_init)' causes that code to run on *all* compiled in boards (think of the case where you have SheevaPlug's also enabled).
Cheers
Signature · 2 lines
Alexander Clouter .sigmonster says: Poverty begins at home.
Hi!
You are right, I didn't notice that it's called via subsys_initcall.
-- Dima
Quoted 32 lines · Alexander Clouter
Hi,
Quoted 5 lines · Dmytro Milinevskyy
[snipped]
Review static void __init openrd_init(void) · line 96
Quoted 9 lines
(quoted diff) +1
-2@@ -84,8 +90,7 @@ static void __init openrd_init(void) ?static int __init openrd_pci_init(void) ?{ - ? ? if (machine_is_openrd_base() || machine_is_openrd_client()) - ? ? ? ? ? ? kirkwood_pcie_init(); + ? ? kirkwood_pcie_init(); ? ? ? return 0; ?}You just 'broke' kirkwood, welcome to the club. ?We all have done this:
http://marc.info/?l=linux-arm-kernel&m=125624586625065&w=2
http://marc.info/?l=linux-arm-kernel&m=125804222219159&w=2Put that '
if()' clause back in, the 'subsys_initcall(openrd_pci_init)' causes that code to run on *all* compiled in boards (think of the case where you have SheevaPlug's also enabled).Cheers
--
Alexander Clouter
.sigmonster says: Poverty begins at home.