All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: OpenRD base: Initialize PCI express, i2c and UART 1
@ 2009-08-26  7:42 Simon Kagstrom
  2009-08-26 13:57 ` Simon Kagstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Kagstrom @ 2009-08-26  7:42 UTC (permalink / raw)
  To: linux-arm-kernel

ARM: OpenRD base: Initialize PCI express, i2c and UART 1

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
---
(For the marvell git tree)

 arch/arm/mach-kirkwood/openrd_base-setup.c |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-kirkwood/openrd_base-setup.c b/arch/arm/mach-kirkwood/openrd_base-setup.c
index f9a2166..003db06 100644
--- a/arch/arm/mach-kirkwood/openrd_base-setup.c
+++ b/arch/arm/mach-kirkwood/openrd_base-setup.c
@@ -64,6 +64,7 @@ static void __init openrd_base_init(void)
 	kirkwood_mpp_conf(openrd_base_mpp_config);
 
 	kirkwood_uart0_init();
+	kirkwood_uart1_init();
 	kirkwood_nand_init(ARRAY_AND_SIZE(openrd_base_nand_parts), 25);
 
 	kirkwood_ehci_init();
@@ -71,8 +72,20 @@ static void __init openrd_base_init(void)
 	kirkwood_ge00_init(&openrd_base_ge00_data);
 	kirkwood_sata_init(&openrd_base_sata_data);
 	kirkwood_sdio_init(&openrd_base_mvsdio_data);
+
+	kirkwood_i2c_init();
 }
 
+static int __init openrd_base_pci_init(void)
+{
+	if (machine_is_openrd_base())
+		kirkwood_pcie_init();
+
+	return 0;
+ }
+subsys_initcall(openrd_base_pci_init);
+
+
 MACHINE_START(OPENRD_BASE, "Marvell OpenRD Base Board")
 	/* Maintainer: Dhaval Vasa <dhaval.vasa@einfochips.com> */
 	.phys_io	= KIRKWOOD_REGS_PHYS_BASE,
-- 
1.6.0.4

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

* [PATCH] ARM: OpenRD base: Initialize PCI express, i2c and UART 1
  2009-08-26  7:42 [PATCH] ARM: OpenRD base: Initialize PCI express, i2c and UART 1 Simon Kagstrom
@ 2009-08-26 13:57 ` Simon Kagstrom
  2009-08-26 14:03   ` Dhaval Vasa
  0 siblings, 1 reply; 4+ messages in thread
From: Simon Kagstrom @ 2009-08-26 13:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 26 Aug 2009 09:42:30 +0200
Simon Kagstrom <simon.kagstrom@netinsight.net> wrote:

> ARM: OpenRD base: Initialize PCI express, i2c and UART 1

> diff --git a/arch/arm/mach-kirkwood/openrd_base-setup.c b/arch/arm/mach-kirkwood/openrd_base-setup.c
> index f9a2166..003db06 100644
> --- a/arch/arm/mach-kirkwood/openrd_base-setup.c
> +++ b/arch/arm/mach-kirkwood/openrd_base-setup.c
> @@ -64,6 +64,7 @@ static void __init openrd_base_init(void)
>  	kirkwood_mpp_conf(openrd_base_mpp_config);
>  
>  	kirkwood_uart0_init();
> +	kirkwood_uart1_init();

After looking at the openrd design I realised that this might not be
such a hot idea. The UART1 pins are multiplexed with the SD card, so
I'm not sure what happens if you have both of these initialized at the
same time.

Anyone knows how Kirkwood behaves when on-board devices use pins which
are multiplexed for something else?

// Simon

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

* [PATCH] ARM: OpenRD base: Initialize PCI express, i2c and UART 1
  2009-08-26 13:57 ` Simon Kagstrom
@ 2009-08-26 14:03   ` Dhaval Vasa
  2009-10-01  9:26     ` Simon Kagstrom
  0 siblings, 1 reply; 4+ messages in thread
From: Dhaval Vasa @ 2009-08-26 14:03 UTC (permalink / raw)
  To: linux-arm-kernel

Simon Kagstrom wrote:
> On Wed, 26 Aug 2009 09:42:30 +0200
> Simon Kagstrom <simon.kagstrom@netinsight.net> wrote:
> 
>> ARM: OpenRD base: Initialize PCI express, i2c and UART 1
> 
>> diff --git a/arch/arm/mach-kirkwood/openrd_base-setup.c b/arch/arm/mach-kirkwood/openrd_base-setup.c
>> index f9a2166..003db06 100644
>> --- a/arch/arm/mach-kirkwood/openrd_base-setup.c
>> +++ b/arch/arm/mach-kirkwood/openrd_base-setup.c
>> @@ -64,6 +64,7 @@ static void __init openrd_base_init(void)
>>  	kirkwood_mpp_conf(openrd_base_mpp_config);
>>  
>>  	kirkwood_uart0_init();
>> +	kirkwood_uart1_init();
> 
> After looking at the openrd design I realised that this might not be
> such a hot idea. The UART1 pins are multiplexed with the SD card, so
> I'm not sure what happens if you have both of these initialized at the
> same time.
> 
> Anyone knows how Kirkwood behaves when on-board devices use pins which
> are multiplexed for something else?
> 

On Marvell LSP, default SD card is selected; and user has an option of 
selecting UART (either RS-232 or RS-485) using command line argument and 
u-boot environment variable.

Even if you initialize both at the same time, there is no issue as 
selection of SD/UART1 is based on MPP (GPIO) pin - 28, 34.

I am working on patch to add SD/UART1 selection for in-tree.  So, you 
can keep this init routine.

- Dhaval
-- 
_____________________________________________________________________
Disclaimer: This e-mail message and all attachments transmitted with it
are intended solely for the use of the addressee and may contain legally
privileged and confidential information. If the reader of this message
is not the intended recipient, or an employee or agent responsible for
delivering this message to the intended recipient, you are hereby
notified that any dissemination, distribution, copying, or other use of
this message or its attachments is strictly prohibited. If you have
received this message in error, please notify the sender immediately by
replying to this message and please delete it from your computer. Any
views expressed in this message are those of the individual sender
unless otherwise stated.Company has taken enough precautions to prevent
the spread of viruses. However the company accepts no liability for any
damage caused by any virus transmitted by this email.
_____________________________________________________________________
 

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

* [PATCH] ARM: OpenRD base: Initialize PCI express, i2c and UART 1
  2009-08-26 14:03   ` Dhaval Vasa
@ 2009-10-01  9:26     ` Simon Kagstrom
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Kagstrom @ 2009-10-01  9:26 UTC (permalink / raw)
  To: linux-arm-kernel

On Wed, 26 Aug 2009 19:33:35 +0530
Dhaval Vasa <dhaval.vasa@einfochips.com> wrote:

> Simon Kagstrom wrote:
> > On Wed, 26 Aug 2009 09:42:30 +0200
> > Simon Kagstrom <simon.kagstrom@netinsight.net> wrote:
> > 
> >> ARM: OpenRD base: Initialize PCI express, i2c and UART 1
> > 
> >> diff --git a/arch/arm/mach-kirkwood/openrd_base-setup.c b/arch/arm/mach-kirkwood/openrd_base-setup.c
> >> index f9a2166..003db06 100644
> >> --- a/arch/arm/mach-kirkwood/openrd_base-setup.c
> >> +++ b/arch/arm/mach-kirkwood/openrd_base-setup.c
> >> @@ -64,6 +64,7 @@ static void __init openrd_base_init(void)
> >>  	kirkwood_mpp_conf(openrd_base_mpp_config);
> >>  
> >>  	kirkwood_uart0_init();
> >> +	kirkwood_uart1_init();
> > 
> > After looking at the openrd design I realised that this might not be
> > such a hot idea. The UART1 pins are multiplexed with the SD card, so
> > I'm not sure what happens if you have both of these initialized at the
> > same time.
> > 
> > Anyone knows how Kirkwood behaves when on-board devices use pins which
> > are multiplexed for something else?
> > 
> 
> On Marvell LSP, default SD card is selected; and user has an option of 
> selecting UART (either RS-232 or RS-485) using command line argument and 
> u-boot environment variable.
> 
> Even if you initialize both at the same time, there is no issue as 
> selection of SD/UART1 is based on MPP (GPIO) pin - 28, 34.
> 
> I am working on patch to add SD/UART1 selection for in-tree.  So, you 
> can keep this init routine.

A small ping about this patch: Is it acceptable as it is or should I
rework it (since apparently it's safe anyway)?

// Simon

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

end of thread, other threads:[~2009-10-01  9:26 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-26  7:42 [PATCH] ARM: OpenRD base: Initialize PCI express, i2c and UART 1 Simon Kagstrom
2009-08-26 13:57 ` Simon Kagstrom
2009-08-26 14:03   ` Dhaval Vasa
2009-10-01  9:26     ` Simon Kagstrom

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.