On Mon, Oct 11, 2010 at 2:27 PM, Victor Rodriguez <[email protected]> wrote:
> On Sat, Oct 9, 2010 at 7:55 AM, Sergei Shtylyov <[email protected]> wrote:
>> Hello.
>>
>> On 09-10-2010 5:12, [email protected] wrote:
>>
>>> From: Victor Rodriguez<[email protected]>
>>
>>> This patch adds USB-OHCI support for the Hawkboard-L138 system
>>> It is under the machine name "omapl138_hawkboard".
>>> This system is based on the da850 davinci CPU architecture.
>>
>>> Signed-off-by: Victor Rodriguez<[email protected]>
>>
>> [...]
>>
>>> diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c
>>> b/arch/arm/mach-davinci/board-omapl138-hawk.c
>>> index ae7f75c..1864d51 100644
>>> --- a/arch/arm/mach-davinci/board-omapl138-hawk.c
>>> +++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
>>
>> [...]
>>>
>>> @@ -170,6 +173,94 @@ static struct davinci_mmc_config da850_mmc_config = {
>>
>> [...]
>>>
>>> +static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler)
>>> +{
>>> +       int irq         = gpio_to_irq(DA850_USB1_OC_PIN);
>>> +       int error       = 0;
>>> +
>>> +       if (handler != NULL) {
>>> +               hawk_usb_ocic_handler = handler;
>>> +
>>> +               error = request_irq(irq, omapl138_hawk_usb_ocic_irq,
>>> +                               IRQF_DISABLED | IRQF_TRIGGER_RISING |
>>> +                               IRQF_TRIGGER_FALLING,
>>> +                                       "OHCI over-current indicator",
>>> NULL);
>>
>>   Please aling all follow-up lines, preferrably under 'irq'.
>
>
> Sorry I do not follow here. Under what do you suggest to align ??
>
>
> static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler)
> {
>        int irq         = gpio_to_irq(DA850_USB1_OC_PIN);
>        int error       = 0;
>
>        if (handler != NULL) {
>                hawk_usb_ocic_handler = handler;
>
>                error = request_irq(irq, omapl138_hawk_usb_ocic_irq,
>                                IRQF_DISABLED | IRQF_TRIGGER_RISING |
>                                IRQF_TRIGGER_FALLING,
>                                        "OHCI over-current indicator", NULL);
>                if (error)
>                        printk(KERN_ERR "%s: could not request IRQ to watch "
>                                "over-current indicator changes\n", __func__);
>        } else
>                free_irq(irq, NULL);
>
>        return error;
> }


I think that this is what you explained

static int hawk_usb_ocic_notify(da8xx_ocic_handler_t handler)
{
        int irq         = gpio_to_irq(DA850_USB1_OC_PIN);
        int error       = 0;

        if (handler != NULL) {
                hawk_usb_ocic_handler = handler;

                error = request_irq(irq, omapl138_hawk_usb_ocic_irq,
                                        IRQF_DISABLED | IRQF_TRIGGER_RISING |
                                        IRQF_TRIGGER_FALLING,
                                        "OHCI over-current indicator", NULL);
                if (error)
                        printk(KERN_ERR "%s: could not request IRQ to watch "
                                "over-current indicator changes\n", __func__);
        } else
                free_irq(irq, NULL);

        return error;
}

Hope it will be i will send the patch

Thanks a lot for check the patches

Sincerely yours

Victor Rodriguez

>>> +               if (error)
>>> +                       printk(KERN_ERR "%s: could not request IRQ to
>>> watch "
>>> +                               "over-current indicator changes\n",
>>> __func__);
>>> +       } else
>>> +               free_irq(irq, NULL);
>>> +
>>> +       return error;
>>> +}
>>> +
>>> +static struct da8xx_ohci_root_hub omapl138_hawk_usb11_pdata = {
>>> +       .set_power      = hawk_usb_set_power,
>>> +       .get_power      = hawk_usb_get_power,
>>> +       .get_oci        = hawk_usb_get_oci,
>>> +       .ocic_notify    = hawk_usb_ocic_notify,
>>> +       /* TPS2065 switch @ 5V */
>>> +       .potpgt         = (3 + 1) / 2,  /* 3 ms max */
>>
>>   Are you really using the same power switch chip as DA830 EVM?
>
> Sorry was the
>
> TPS2087D
>
> But is also at 5V with the same parameters the only minor difference
> that i see is that
>
> TPS2065 is
>
>    * 1-A Continuous Current
>
> and TPS2087D is
>
>    * 500 mA Continuous Current per Channel
>
> but works fine with that parameters
>
> Regards
>
> Victor Rodriguez
>
>
>
> could work even at
>>> diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c
>>> index f033a0a..1675f41 100644
>>> --- a/arch/arm/mach-davinci/da850.c
>>> +++ b/arch/arm/mach-davinci/da850.c
>>> @@ -345,6 +345,21 @@ static struct clk aemif_clk = {
>>>        .flags          = ALWAYS_ENABLED,
>>>  };
>>>
>>> +static struct clk usb11_clk = {
>>> +       .name           = "usb11",
>>> +       .parent         = &pll0_sysclk4,
>>> +       .lpsc           = DA8XX_LPSC1_USB11,
>>> +       .gpsc           = 1,
>>> +       .flags          = ALWAYS_ENABLED,
>>> +       };
>>> +
>>> +static struct clk usb20_clk = {
>>> +       .name           = "usb20",
>>> +       .parent         = &pll0_sysclk2,
>>> +       .lpsc           = DA8XX_LPSC1_USB20,
>>> +       .gpsc           = 1,
>>> +       };
>>> +
>>>  static struct clk_lookup da850_clks[] = {
>>>        CLK(NULL,               "ref",          &ref_clk),
>>>        CLK(NULL,               "pll0",         &pll0_clk),
>>> @@ -387,6 +402,8 @@ static struct clk_lookup da850_clks[] = {
>>>        CLK("davinci_mmc.0",    NULL,           &mmcsd0_clk),
>>>        CLK("davinci_mmc.1",    NULL,           &mmcsd1_clk),
>>>        CLK(NULL,               "aemif",        &aemif_clk),
>>> +       CLK(NULL,               "usb11",        &usb11_clk),
>>> +       CLK(NULL,               "usb20",        &usb20_clk),
>>>        CLK(NULL,               NULL,           NULL),
>>>  };
>>>
>>> @@ -548,6 +565,8 @@ static const struct mux_config da850_pins[] = {
>>>        MUX_CFG(DA850, GPIO2_15,        5,      0,      15,     8,
>>>  false)
>>>        MUX_CFG(DA850, GPIO4_0,         10,     28,     15,     8,
>>>  false)
>>>        MUX_CFG(DA850, GPIO4_1,         10,     24,     15,     8,
>>>  false)
>>> +       MUX_CFG(DA850, GPIO2_4,         6,      12,     15,     8,
>>>  false)
>>> +       MUX_CFG(DA850, GPIO6_13,        13,     8,      15,     8,
>>>  false)
>>>        MUX_CFG(DA850, RTC_ALARM,       0,      28,     15,     2,
>>>  false)
>>>  #endif
>>>  };
>>> diff --git a/arch/arm/mach-davinci/include/mach/mux.h
>>> b/arch/arm/mach-davinci/include/mach/mux.h
>>> index de11aac..e2985e6 100644
>>> --- a/arch/arm/mach-davinci/include/mach/mux.h
>>> +++ b/arch/arm/mach-davinci/include/mach/mux.h
>>> @@ -913,6 +913,8 @@ enum davinci_da850_index {
>>>        DA850_GPIO2_15,
>>>        DA850_GPIO4_0,
>>>        DA850_GPIO4_1,
>>> +       DA850_GPIO2_4,
>>> +       DA850_GPIO6_13,
>>>        DA850_RTC_ALARM,
>>>  };
>>>
>>
>>   The above should be a separate patch (or even 2 patches).
>>
>> WBR, Sergei
>>
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to