<div class="im"> Hi,<br>><br>> I am new to linux-kernel and am using kernel 3.1.6 and working on<br>> arm-SemiHosting(through USB) drivers.<br>><br>> We are using SemiHosting to exchange/transfer data from the arm-board to<br>
> the PC.<br><br></div>What is SemiHosting?<div>SemiHosting is a way to tranfer/exchange data b/w arm-board and the PC.</div><div>We have an application USBConsole.exe running on the windows machine that controls/interfaces with the USB uint on the</div>
<div>arm board.<br><div class="im"><br>> Board details –<br>><br>> Using ARM926e-js processor with 128MB SDRAM., Clock-33Mhz<br>><br>> SDRAM Size = 128M<br>><br>> CONFIG_PAGE_OFFSET = 0xc0000000<br>> CONFIG_PHYS_OFFSET= 0x80000000<br>
> Kernel Lowmem = 32M including 8M for initramfs (starting from 24M to 32M).<br>> HighMEM is not configured.<br>> Vmalloc_start = end address of LowMem (i.e 0xC200000)<br>> VMALLOC_END = Vmalloc_start + 64M = 0xC6000000<br>
><br>> The SemiHosting(USB) drivers have read(); write(); seek(); functionalities<br>> along with an InitUSB function that initializes the semihosting USB<br>> hardware unit on the arm board.<br><br></div>Is this a USB host controller, or a device controller? Do you have a<br>
pointer to where this code is somewhere so we can see what it does?</div><div>It is neither.,it is a hardware unit on the arm-board with a register set accesed by both arm and </div><div>the USBConsole.exe on the PC.This USBConsole.exe sets these registers appropriately.</div>
<div><br><div class="im"><br>> We are using kernel ioremap() function for accessing the USB register set,<br>> which is remaped to malloc section.<br><br></div>Are these are the USB controller's register set for a host device, or a<br>
"gadget"?<br><div class="im"><br>> Functionality in semihosting init (InitUSB) function –<br>><br>> 1. We send header command to hostPC via USB DMA operation by setting few<br>> USB registers.<br><br>
</div>Setting them where?</div><div>Setting them on the board memory(USB register memory after virtually mapped)<br><div class="im"><br>> USB DMA takes the start address of the header and it’s size and these<br>> two params (addr, size) are set into corresponding USB registers.<br>
><br>> The USB transfer is enabled by setting USB_EN register to appropriate<br>> value.<br>><br>><br>><br>> 2.After header transfer acknowledgement from hostPC should be received.<br>><br>> As acknowledgement , hostPC should set INTC_USB register, we poll for<br>
> this register and once this is set we are done with the initialisation.<br>><br>> I wanted to test if the InitUSB function is working as expected. So I<br>> called this function in the start_kernel(after Console_Init()).<br>
><br>> As this function is just setting few registers and polling for few<br>> registers., I io_remaped this register set in the InitUSB function..<br>><br>> But the INTC_USB register that is set by the hostPC as acknowledgement is<br>
> not getting set and the code is never coming out of the while loop.<br>></div><div class="im"> Can a USBConsole.exe running on the windows machine access register on the arm-board running on the linux.??</div><div class="im">
><br>> As mentioned I am calling the Init_USB function in the start_kernel(after<br>> Console_Init()).</div><br><div class="gmail_quote">On Fri, Mar 9, 2012 at 8:34 PM, Greg KH <span dir="ltr"><<a href="mailto:gregkh@linuxfoundation.org">gregkh@linuxfoundation.org</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Fri, Mar 09, 2012 at 03:49:57PM +0530, KARTHIK SEKURU wrote:<br>
> Hi,<br>
><br>
> I am new to linux-kernel and am using kernel 3.1.6 and working on<br>
> arm-SemiHosting(through USB) drivers.<br>
><br>
> We are using SemiHosting to exchange/transfer data from the arm-board to<br>
> the PC.<br>
<br>
</div>What is SemiHosting?<br>
<div class="im"><br>
> Board details –<br>
><br>
> Using ARM926e-js processor with 128MB SDRAM., Clock-33Mhz<br>
><br>
> SDRAM Size = 128M<br>
><br>
> CONFIG_PAGE_OFFSET = 0xc0000000<br>
> CONFIG_PHYS_OFFSET= 0x80000000<br>
> Kernel Lowmem = 32M including 8M for initramfs (starting from 24M to 32M).<br>
> HighMEM is not configured.<br>
> Vmalloc_start = end address of LowMem (i.e 0xC200000)<br>
> VMALLOC_END = Vmalloc_start + 64M = 0xC6000000<br>
><br>
> The SemiHosting(USB) drivers have read(); write(); seek(); functionalities<br>
> along with an InitUSB function that initializes the semihosting USB<br>
> hardware unit on the arm board.<br>
<br>
</div>Is this a USB host controller, or a device controller? Do you have a<br>
pointer to where this code is somewhere so we can see what it does?<br>
<div class="im"><br>
> We are using kernel ioremap() function for accessing the USB register set,<br>
> which is remaped to malloc section.<br>
<br>
</div>Are these are the USB controller's register set for a host device, or a<br>
"gadget"?<br>
<div class="im"><br>
> Functionality in semihosting init (InitUSB) function –<br>
><br>
> 1. We send header command to hostPC via USB DMA operation by setting few<br>
> USB registers.<br>
<br>
</div>Setting them where?<br>
<div class="im"><br>
> USB DMA takes the start address of the header and it’s size and these<br>
> two params (addr, size) are set into corresponding USB registers.<br>
><br>
> The USB transfer is enabled by setting USB_EN register to appropriate<br>
> value.<br>
><br>
><br>
><br>
> 2.After header transfer acknowledgement from hostPC should be received.<br>
><br>
> As acknowledgement , hostPC should set INTC_USB register, we poll for<br>
> this register and once this is set we are done with the initialisation.<br>
><br>
> I wanted to test if the InitUSB function is working as expected. So I<br>
> called this function in the start_kernel(after Console_Init()).<br>
><br>
> As this function is just setting few registers and polling for few<br>
> registers., I io_remaped this register set in the InitUSB function..<br>
><br>
> But the INTC_USB register that is set by the hostPC as acknowledgement is<br>
> not getting set and the code is never coming out of the while loop.<br>
><br>
> Now, I wanted to know if the place from where the InitUSB() function is<br>
> called is the culprit and due to it if I am not receiving acknowledgement<br>
> from the PC.<br>
><br>
> As mentioned I am calling the Init_USB function in the start_kernel(after<br>
> Console_Init()).<br>
<br>
</div>I think a pointer to the code would be the easiest for us to understand<br>
exactly what is going on here. Also, USB specific questions are best<br>
asked on the <a href="mailto:linux-usb@vger.kernel.org">linux-usb@vger.kernel.org</a> mailing list, have you tried<br>
there?<br>
<br>
thanks,<br>
<br>
greg k-h<br>
</blockquote></div><br></div>