From: gregkh@linuxfoundation.org (Greg KH)
To: kernelnewbies@lists.kernelnewbies.org
Subject: Correct Place of calling a driver initialization function.
Date: Fri, 9 Mar 2012 07:04:21 -0800 [thread overview]
Message-ID: <20120309150421.GA12428@kroah.com> (raw)
In-Reply-To: <CANev7oX_u42ZA=hTJhNOsFojgp-vthBmtqC8qMjfGiUT4Mk=NA@mail.gmail.com>
On Fri, Mar 09, 2012 at 03:49:57PM +0530, KARTHIK SEKURU wrote:
> Hi,
>
> I am new to linux-kernel and am using kernel 3.1.6 and working on
> arm-SemiHosting(through USB) drivers.
>
> We are using SemiHosting to exchange/transfer data from the arm-board to
> the PC.
What is SemiHosting?
> Board details ?
>
> Using ARM926e-js processor with 128MB SDRAM., Clock-33Mhz
>
> SDRAM Size = 128M
>
> CONFIG_PAGE_OFFSET = 0xc0000000
> CONFIG_PHYS_OFFSET= 0x80000000
> Kernel Lowmem = 32M including 8M for initramfs (starting from 24M to 32M).
> HighMEM is not configured.
> Vmalloc_start = end address of LowMem (i.e 0xC200000)
> VMALLOC_END = Vmalloc_start + 64M = 0xC6000000
>
> The SemiHosting(USB) drivers have read(); write(); seek(); functionalities
> along with an InitUSB function that initializes the semihosting USB
> hardware unit on the arm board.
Is this a USB host controller, or a device controller? Do you have a
pointer to where this code is somewhere so we can see what it does?
> We are using kernel ioremap() function for accessing the USB register set,
> which is remaped to malloc section.
Are these are the USB controller's register set for a host device, or a
"gadget"?
> Functionality in semihosting init (InitUSB) function ?
>
> 1. We send header command to hostPC via USB DMA operation by setting few
> USB registers.
Setting them where?
> USB DMA takes the start address of the header and it?s size and these
> two params (addr, size) are set into corresponding USB registers.
>
> The USB transfer is enabled by setting USB_EN register to appropriate
> value.
>
>
>
> 2.After header transfer acknowledgement from hostPC should be received.
>
> As acknowledgement , hostPC should set INTC_USB register, we poll for
> this register and once this is set we are done with the initialisation.
>
> I wanted to test if the InitUSB function is working as expected. So I
> called this function in the start_kernel(after Console_Init()).
>
> As this function is just setting few registers and polling for few
> registers., I io_remaped this register set in the InitUSB function..
>
> But the INTC_USB register that is set by the hostPC as acknowledgement is
> not getting set and the code is never coming out of the while loop.
>
> Now, I wanted to know if the place from where the InitUSB() function is
> called is the culprit and due to it if I am not receiving acknowledgement
> from the PC.
>
> As mentioned I am calling the Init_USB function in the start_kernel(after
> Console_Init()).
I think a pointer to the code would be the easiest for us to understand
exactly what is going on here. Also, USB specific questions are best
asked on the linux-usb at vger.kernel.org mailing list, have you tried
there?
thanks,
greg k-h
next prev parent reply other threads:[~2012-03-09 15:04 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-09 10:19 Correct Place of calling a driver initialization function KARTHIK SEKURU
2012-03-09 15:04 ` Greg KH [this message]
2012-03-12 13:53 ` KARTHIK SEKURU
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=20120309150421.GA12428@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=kernelnewbies@lists.kernelnewbies.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).