From mboxrd@z Thu Jan 1 00:00:00 1970 From: thaoth Date: Thu, 11 Sep 2008 22:46:00 -0700 (PDT) Subject: [U-Boot] [T-Engine] UBoot configuration for T-Engine/SH7727 MS7727CP02 DevKit In-Reply-To: <48C9084D.3000807@renesas.com> References: <18868090.post@talk.nabble.com> <29ab51dc0808071835u6248f23fyfc55165edf63497e@mail.gmail.com> <18887349.post@talk.nabble.com> <19411908.post@talk.nabble.com> <20080910211346.c79dbdc8.iwamatsu@nigauri.org> <48C87F9C.2080202@renesas.com> <19429512.post@talk.nabble.com> <48C9084D.3000807@renesas.com> Message-ID: <19449833.post@talk.nabble.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, > > Following your instruction, I did > int usb_board_init(void) > { > printf("usb_board_init\n"); > > outw(0x18, STBCR3); > outw(0x18, SRSTR); > udelay(10); > > outw(0x28, EXCPGCR); > udelay(10); > > outw(0x00, STBCR3); > outw(0x00, SRSTR); > return 0; > } >> These registers are 8-bit width. So please use outb() macro. They are the same. It is still problem. > I am sorry, my explanation was short. This EXCPGCR value was for an > another board. > In the case of your board, it may be necessary to make it a defferent > value. As specification of SH7727, value of EXCPGCR is 0x28 and this means "" The SH7727 has an on-chip USB interface (USB) which requires a fixed 48-MHz clock source. The extend clock pulse generator (EXCPG) generates a divided clock from the internal clock (I?), the bus clock (B?), or the external clock (UCLK). Because the clock sources, which can be a candidate to be used by EXCPG, vary from CPG setting or external clock source, user of SH7727 must adjust the divided clock, carefully to be 48 MHz. "" * Bits 5 to 3?Clock Select (USBCKSEL2 to USBCKSEL0): 000: Peripheral Clock (P?) (Initial value) 100: Internal Clock (I?) 101: Bus Clock (B?) 110: External clock (UCLK) ***: Another value Reserved (setting prohibited) * Bits 2 to 0?: Divider Select (USBDIVSEL2 to USBDIVSEL0): 000: 1/1 -> Dividing Ratio Selection 001: 1/2 010: 1/3 1**: Internal clock (I?), bus clock (B?), external clock (UCLK) halted 0x28: 00101000 -> 00 101 000 -> * 101: Using bus clock * 000: Dividing Ratio Selection is 1/1 I know * Internal clock: 96Mhz * Peripheral Clock: 24Mhz * CPU Block: 144Mhz http://www.nabble.com/file/p19449833/a.JPG a.JPG Please let me know the correct value of EXCPGCR ? Is 0x28 correct initialize value of USB clock? > And I used my board, I set 0x1500 in PKCR. I don't understand PKCR - Port control register so I don't know correct initialize value of this register. 0x1500 = 0001 0101 0000 0000 -> PK6 is port output -> PK5 is port output -> PK4 is port output I don't know this value could be set for my board - TEngine/SH7727. I am appreciating your helping :) -- View this message in context: http://www.nabble.com/-T-Engine--UBoot-configuration-for-T-Engine-SH7727-MS7727CP02-DevKit-tp18868090p19449833.html Sent from the Uboot - Users mailing list archive at Nabble.com.