All of lore.kernel.org
 help / color / mirror / Atom feed
From: 조기성 <k9@tibetsystem.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] PPC440EP UART 4port enble
Date: Tue, 11 Nov 2008 15:34:53 +0900	[thread overview]
Message-ID: <001701c943c7$9b0f16a0$d12d43e0$@com> (raw)

Hi. 
We have designed a new PPC440EP yosemite based board.
But we are using UART 4port tx,rx( 2pin UART0, 1, 2, 3)
But current It only works 2port(UART0, UART1).
I read user manual then changed  u-boot's GPIO bit flag blows.
But it's now working, How can I do that?

Thanks in advance


int board_early_init_f(void)
{
	
...
	/*UART1 */
	out32(GPIO1_TCR, in32(GPIO1_TCR) | 0x02000000);
	out32(GPIO1_OSRL, in32(GPIO1_OSRL) | 0x00080000);
	out32(GPIO1_ISR2L, in32(GPIO1_ISR2L) | 0x00010000)


#if 1 //kscho, UART2, 3(0 based UART) enable
	out32(GPIO1_TCR, in32(GPIO1_TCR) | 0x20000000); 
	out32(GPIO1_OSRL, in32(GPIO1_OSRL) | 0x00080000)
	out32(GPIO1_OSRL, in32(GPIO1_OSRL) | 0x00080000);
#else
	//gpio_config(34, GPIO_OUT, GPIO_ALT3, GPIO_OUT_1);
	//gpio_config(35, GPIO_OUT, GPIO_ALT3, GPIO_OUT_1);
	//gpio_config(36, GPIO_OUT, GPIO_ALT3, GPIO_OUT_1);

	printf("GPIO1_TCR 0x%lx\n", in32(GPIO1_TCR));
	out32(GPIO1_TCR, in32(GPIO1_TCR) | 0x24); /* 0010 01 */
	printf("### GPIO1_TCR 0x%lx\n", in32(GPIO1_TCR));
	//out32(GPIO1_OSRL, in32(GPIO1_OSRL) | 0x820); /* 0000 0100  0001 */
	printf("GPIO1_OSRL 0x%lx\n", in32(GPIO1_OSRL));
	out32(GPIO1_OSRL, in32(GPIO1_OSRL) | 0xC30); /* 0000 1100 0011 */
	printf("### GPIO1_OSRL 0x%lx\n", in32(GPIO1_OSRL));
	printf("GPIO1_TSRL 0x%lx\n", in32(GPIO1_TSRL));
	out32(GPIO1_TSRL, in32(GPIO1_TSRL) & ~0x00000ff0); 
	printf("### GPIO1_TSRL 0x%lx\n", in32(GPIO1_TSRL));
	printf("GPIO1_ISR3L 0x%lx\n", in32(GPIO1_ISR3L));
	out32(GPIO1_ISR3L, in32(GPIO1_ISR3L) | 0x00000280); /* 0000 0001
0100 */
	printf("### GPIO1_ISR3L 0x%lx\n", in32(GPIO1_ISR3L));
#endi

...
	/*------------------------------------------------------------------
--
	 * Setup other serial configuration
	 *------------------------------------------------------------------
-*/
	mfsdr(sdr_pci0, reg);
	mtsdr(sdr_pci0, 0x80000000 | reg);	/* PCI arbiter enabled */
	mtsdr(sdr_pfc0, 0x00003e00);	/* Pin function */
	mtsdr(sdr_pfc1, 0x00048000);	/* Pin function: UART0 has 4 pins *
}


Best Regards.
Steven.

---------------------------------------------------------------------
6F Lotte IT Castle II 550-1 Gasan-dong, 
Geumcheon-gu, Seoul, 153-768, Korea
Research Engineer/R&D software Team
Tel: 82-2-890-1657(Direct)
FAX:02-890-1639

             reply	other threads:[~2008-11-11  6:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-11-11  6:34 조기성 [this message]
2008-11-11  7:24 ` [U-Boot] PPC440EP UART 4port enble Stefan Roese
2008-11-11 11:03   ` 조기성
2008-11-11 13:12     ` Stefan Roese

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='001701c943c7$9b0f16a0$d12d43e0$@com' \
    --to=k9@tibetsystem.com \
    --cc=u-boot@lists.denx.de \
    /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 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.