From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mxvip35.hichina.com (mxvip35.hichina.com [218.106.248.85]) by ozlabs.org (Postfix) with ESMTP id 95442DDEEA for ; Sat, 26 May 2007 20:26:52 +1000 (EST) From: "Peter Luan" To: , Subject: Re: Using Cypress EZ-Host on ML403/5 Date: Sat, 26 May 2007 18:20:01 +0800 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C79FC2.79D2D300" Message-ID: <1180174808$27627$25143635@peterluan@truebroad.com> Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C79FC2.79D2D300 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Hi First of all, I'm a beginner, so my questions may be funny .... sorry for that. Any how your ideas are very valuable for me. I'm going to have the usb work on ML403. I have two questions about the usb on ml403 board. 1) In EDK9.1i, we can use the wizard to build a new design with usb. But I found it's different from the reference design that xilinx provided for edk8.1i. So which design should I choose? In datasheet of opb_epc, I found that we should add the irq manually. So I added the irq and reset according to xapp925. After that, I patched my linux kernel using the patch by Peter Korsgaard. But when I pluged in the usb camera, it can't probe it. What should I do additionally? 2) I can't find where to initialize the base registers and irq in the usb driver for cy7c67300 provided by Peter Korsgaard. In the function usb_c67x00_drv_probe, I found it called platform_get_resource(pdev, IORESOURCE_MEM, 0). So I think I should add some register codes for usb like uartlite or temac in virtex.c. I added the following codes: #ifdef XPAR_USB_0_BASEADDR [VIRTEX_USB_0] = { .name = "xilix_usb", .id = 0, .num_resource = 2, .resource = (struct resource[]) { { .start = XPAR_USB_0_BASEADDR, .end = XPAR_USB_0_HIGHADDR, .flags = IORESOURCE_MEM, }, { .start = XPAR_INTC_0_USB_0_VEC_ID, .end = XPAR_INTC_0_USB_0_VEC_ID, .flags = IORESOURCE_IRQ, } } }, #endif and define the following macro in xparameters_ml403.h. #define XPAR_INTC_0_USB_0_VEC_ID XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR #define XPAR_USB_0_BASEADDR XPAR_CYPRESS_USB_PRH0_BASEADDR #define XPAR_USB_0_HIGHADDR XPAR_CYPRESS_USB_PRH0_HIGHADDR After that, it still can't prob the usb device. So could you give me some suggestion about making usb work on ml403? Thank you very much! Peter Luan ------=_NextPart_000_0007_01C79FC2.79D2D300 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi First of all, I'm a beginner, so my = questions may be funny .... sorry for that.

Any how your ideas are very valuable for me. = I'm going to have the usb work on ML403.

I have two questions about the usb on ml403 = board.

 

1) In EDK9.1i, we can use the wizard to build = a new design with usb. But I found it's different from the reference design = that xilinx provided for edk8.1i. So which design should I choose? In = datasheet of opb_epc, I found that we should add the irq manually. So I added the irq = and reset according to xapp925. After that, I patched my linux kernel using = the patch by Peter Korsgaard. But when I pluged in the usb camera, it can't = probe it. What should I do additionally?

 

2) I can't find where to initialize the base registers and irq in the usb driver for cy7c67300 provided by Peter Korsgaard. In the function usb_c67x00_drv_probe, I = found it called platform_get_resource(pdev, IORESOURCE_MEM, 0). So I think I = should add some register codes for usb like uartlite or temac in virtex.c. I added = the following codes:

 #ifdef = XPAR_USB_0_BASEADDR

      [VIRTEX_USB_0] = =3D {

        = ;   .name =3D "xilix_usb",

        = ;   .id =3D 0,

        = ;   .num_resource =3D 2,

        = ;   .resource =3D (struct resource[]) {

        = ;         = {

        = ;            =   .start  =3D XPAR_USB_0_BASEADDR,

        = ;            =   .end    =3D XPAR_USB_0_HIGHADDR,

        = ;            =   .flags  =3D IORESOURCE_MEM,

        = ;         = },

        = ;         = {

        = ;            =   .start  =3D XPAR_INTC_0_USB_0_VEC_ID,

        = ;            =   .end    =3D XPAR_INTC_0_USB_0_VEC_ID,

        = ;            =   .flags  =3D IORESOURCE_IRQ,

        = ;         = }

        = ;   }

      = },

#endif

 

and define the following macro in xparameters_ml403.h.

 

#define XPAR_INTC_0_USB_0_VEC_ID XPAR_OPB_INTC_0_SYSTEM_USB_HPI_INT_INTR

#define XPAR_USB_0_BASEADDR XPAR_CYPRESS_USB_PRH0_BASEADDR

#define XPAR_USB_0_HIGHADDR XPAR_CYPRESS_USB_PRH0_HIGHADDR

 

After that, it still can't prob the usb = device. So could you give me some suggestion about making usb work on = ml403?

 

Thank you very = much!

 

Peter Luan

------=_NextPart_000_0007_01C79FC2.79D2D300--