📄 blackfin koop 项目 das u-boot for the blackfin processor 讨论区 u-boot-help browse messages.htm
字号:
/* 120x600, created 24/03/09 */google_ad_slot = "9412575232";google_ad_width = 130;google_ad_height = 600;--></SCRIPT>
<SCRIPT
src="Blackfin Koop 项目 Das U-Boot for the Blackfin Processor 讨论区 u-boot-help Browse Messages.files/show_ads.js"
type=text/javascript></SCRIPT>
</DIV>
<DIV class=clear></DIV></DIV>
<DIV id=right>
<DIV class=contentNav>
<P id=crumbs><A href="http://blackfin.uclinux.org/">首页</A> » <A
href="http://blackfin.uclinux.org/gf/project/">项目</A> » <A
href="http://blackfin.uclinux.org/gf/project/u-boot/">Das U-Boot for the
Blackfin Processor</A> » <A
href="http://blackfin.uclinux.org/gf/project/u-boot/forum/">讨论区</A> » <A
href="http://blackfin.uclinux.org/gf/project/u-boot/forum/?action=ForumBrowse&forum_id=51">u-boot-help</A>
» <A
href="http://blackfin.uclinux.org/gf/project/u-boot/forum/?action=ForumBrowse&forum_id=51&_forum_action=ForumMessageBrowse&thread_id=26211">BF548
USB Session Initiation and Soft Disconnect</A> » Browse Messages</P>
<DIV class=clear></DIV></DIV>
<DIV class=main>
<FORM method=get><INPUT type=hidden value=ForumBrowse name=action> <INPUT
type=hidden value=51 name=forum_id> <INPUT type=hidden value=ForumMessageBrowse
name=_forum_action> <INPUT type=hidden value=26211 name=thread_id> <SELECT
name=forum_thread_style> <OPTION value=flat selected>展开</OPTION> <OPTION
value=threaded>主题</OPTION></SELECT> <INPUT class=button type=submit value=改变察看方式 name=forum_change_view></FORM><BR>
<P>
<TABLE class=tabular cellSpacing=1 cellPadding=5 width="100%">
<TBODY>
<TR class=th>
<TH noWrap>2008-03-06 08:44:17</TH>
<TH noWrap>BF548 USB Session Initiation and Soft Disconnect</TH></TR>
<TR class=l>
<TD vAlign=top noWrap><A
href="http://blackfin.uclinux.org/gf/user/eventhorizon/?">J.C. Denton</A>
(SPAIN)<BR>Message ID: 52159</TD>
<TD vAlign=top width="80%">Sorry, this might be slightly off topic but I
havn't found a better place to post this and there seem to be capable
people here:<BR>From the BF548 Peripheral Handbook I do not understand the
relation of Soft Disconnect and Session initiation.<BR><BR>On page 13-36
it says the SESSION bit in USB_OTG_DEV_CTL must be set in order to enable
ID sensing. Then the board enters either host or peripheral mode. It goes
on on page 13-37 that if the board decides to be a peripheral it will
request a session using SRP. Clearing the SESSION bit prematurely will be
a software disconnect. This is all very clear by itself.<BR><BR>But how
does it relate to the SOFT_CONN bit in USB_POWER, which also disables the
D-lines ? It says on page 13-72 this is only valid in peripheral mode.
What mode is the board in before ID sensing ? Won't this interfere with
SRP ? Must this be "softconnected" before ID sensing ?<BR><BR>My objective
is to configure everything for peripheral mode, then make a software
connect and then have the board ready to be enumerated by a USB host.
Which is the correct order of bitflipping for this ?<BR><BR>Btw. I am
using a BF548-EZKIT here.<BR><BR>Thanks a lot guys,<BR><BR>J.C.</TD></TR>
<TR
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<TD class=tFooter
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
vAlign=top align=right colSpan=2> </TD></TR></TBODY></TABLE></P><BR>
<P>
<TABLE class=tabular cellSpacing=1 cellPadding=5 width="100%">
<TBODY>
<TR class=th>
<TH noWrap>2008-03-06 09:41:14</TH>
<TH noWrap>Re: BF548 USB Session Initiation and Soft Disconnect</TH></TR>
<TR class=l>
<TD vAlign=top noWrap><A
href="http://blackfin.uclinux.org/gf/user/vapier/?">Mike Frysinger</A>
(UNITED STATES)<BR>Message ID: 52163</TD>
<TD vAlign=top width="80%">there is already a USB driver in the kernel for
the BF54x/BF52x ... why do you need to poke the peripheral MMRs ?</TD></TR>
<TR
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<TD class=tFooter
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
vAlign=top align=right colSpan=2> </TD></TR></TBODY></TABLE></P><BR>
<P>
<TABLE class=tabular cellSpacing=1 cellPadding=5 width="100%">
<TBODY>
<TR class=th>
<TH noWrap>2008-03-06 10:41:57</TH>
<TH noWrap>Re: BF548 USB Session Initiation and Soft Disconnect</TH></TR>
<TR class=l>
<TD vAlign=top noWrap><A
href="http://blackfin.uclinux.org/gf/user/eventhorizon/?">J.C. Denton</A>
(SPAIN)<BR>Message ID: 52165</TD>
<TD vAlign=top width="80%">Right you are. But I am trying to do some
low-level stuff here without any kernel just running u-boot.</TD></TR>
<TR
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<TD class=tFooter
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
vAlign=top align=right colSpan=2> </TD></TR></TBODY></TABLE></P><BR>
<P>
<TABLE class=tabular cellSpacing=1 cellPadding=5 width="100%">
<TBODY>
<TR class=th>
<TH noWrap>2008-03-06 11:58:03</TH>
<TH noWrap>Re: BF548 USB Session Initiation and Soft Disconnect</TH></TR>
<TR class=l>
<TD vAlign=top noWrap><A
href="http://blackfin.uclinux.org/gf/user/cooloney/?">Bryan Wu</A>
(CHINA)<BR>Message ID: 52170</TD>
<TD vAlign=top width="80%">SESSION bit is for USB session control which is
used by both host mode and peripheral mode. But They use this bit in
different way. As USB spec said, only host can start session by setting
this bit. As OTG spec said peripherals can also try to ask the HOST to
start a session which is SRP by using this bit.<BR><BR>For SOFTCONN bit is
provided a method for software to control the USB bus signal D+/D-
directly and is only validate in peripheral mode.<BR><BR>Please look up
the Blackfin Linux kernel svn code drivers/usb/musb/.<BR><BR>-Bryan</TD></TR>
<TR
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<TD class=tFooter
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
vAlign=top align=right colSpan=2> </TD></TR></TBODY></TABLE></P><BR>
<P>
<TABLE class=tabular cellSpacing=1 cellPadding=5 width="100%">
<TBODY>
<TR class=th>
<TH noWrap>2008-04-11 07:59:49</TH>
<TH noWrap>Re: BF548 USB Session Initiation and Soft Disconnect</TH></TR>
<TR class=l>
<TD vAlign=top noWrap><A
href="http://blackfin.uclinux.org/gf/user/felixl/?">Felix Lazarev</A>
(UNITED STATES)<BR>Message ID: 54090</TD>
<TD vAlign=top width="80%">Did you manage to implement usb driver for
U-boot?</TD></TR>
<TR
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<TD class=tFooter
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
vAlign=top align=right colSpan=2> </TD></TR></TBODY></TABLE></P><BR>
<P>
<TABLE class=tabular cellSpacing=1 cellPadding=5 width="100%">
<TBODY>
<TR class=th>
<TH noWrap>2008-04-15 11:58:23</TH>
<TH noWrap>Re: BF548 USB Session Initiation and Soft Disconnect</TH></TR>
<TR class=l>
<TD vAlign=top noWrap><A
href="http://blackfin.uclinux.org/gf/user/eventhorizon/?">J.C. Denton</A>
(SPAIN)<BR>Message ID: 54287</TD>
<TD vAlign=top width="80%">No, right now I am not getting any connect
interrupt. And I can't figure out why. My problem is that I still didn't
find any real description of how exactly to set the board into host mode
and have it wait for connections. The docs are somewhat contradicting each
other. I tried to reproduce the "Linux" way because mass storage is
working on that. All I know about the init sequence is basically what is
done in Linux driver. If you wanna have a look, here are the locations,
and what I found out so far:<BR><BR>musb_start() in musb_core.c:<BR><BR>-
activates interrupts<BR>- sets a 1 sec timout<BR>- sets the SESSION bit in
USB_OTG_DEV_CTL<BR><BR>conn_timer_handler (fires when the timer expires)
in blackfin.c:<BR><BR>- sets the SESSION bit (again)<BR>- checks if the
board is the A device (Does it at some point just decide it or is it ID
sensing ?)<BR> - if yes set GPIO_USB_VRSEL to 1 (No
idea, how to do that in U-Boot ... but I am getting the feeling it's
important :(<BR> - change state to waiting for
connection<BR> - if not set GPIO_USB_VRSEL to
0<BR><BR><BR>From the kernel log, before I plug in the USB stick, I get
the following: <BR><BR>...<BR>conn_timer_handler 298: state is
a_idle<BR>eth0: link up, 100Mbps, half-duplex, lpa
0x40A1<BR>conn_timer_handler 298: state is a_idle<BR>conn_timer_handler
298: state is a_wait_bcon<BR>conn_timer_handler 298: state is
a_wait_bcon<BR>conn_timer_handler 298: state is
a_wait_bcon<BR>conn_timer_handler 298: state is
a_wait_bcon<BR>conn_timer_handler 298: state is a_wait_bcon<BR><BR>and
after plugging in the USB stick:<BR><BR>musb_stage0_irq 403: <==
Power=60, DevCtl=5d, int_usb=0x90<BR>musb_stage0_irq 570: VBUS_ERROR in
a_wait_bcon (5d, VALID), retry #1, port1 0000<BR>musb_stage0_irq 641:
CONNECT (a_host) devctl 5d<BR>...<BR><BR>Since the musb_start() is a lot
above that, the timer expires quite a lot of times before the board
finally becomes an A device. But then there are no more messages. The
timer just keeps setting SESSION and waits. I really wonder if this is the
correct way of doing this.<BR>My code is essentially doing the same (w/o
the GPIO setting) only that the connect interrupt never comes (other
interrupts arrive, for instance a whole bunch of VBUSERRORS).</TD></TR>
<TR
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px">
<TD class=tFooter
style="MARGIN-TOP: 0px; MARGIN-BOTTOM: 0px; PADDING-BOTTOM: 0px; PADDING-TOP: 0px"
vAlign=top align=right colSpan=2> </TD></TR></TBODY></TABLE></P><BR>
<CENTER><BR><A href="http://gforgegroup.com/"><IMG height=43
alt="Powered By GForge® Collaborative Development Environment"
src="Blackfin Koop 项目 Das U-Boot for the Blackfin Processor 讨论区 u-boot-help Browse Messages.files/gforge-as-logo-large.png"
width=130 border=0></A> </CENTER></DIV>
<DIV class=clear></DIV></DIV></DIV></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -