On Tue, Jan 4, 2011 at 6:13 AM, Kevin Hilman <[email protected]>wrote:

> Subhasish Ghosh <[email protected]> writes:
>
> > From: Subhasish <[email protected]>
>
> Missing descriptive changelog.
>

[SG] -- Will Add a changelog.


>
> > Signed-off-by: Subhasish <[email protected]>
> > ---
> >  arch/arm/mach-davinci/board-da850-evm.c |   36
> +++++++++++++++++++++++++++++++
> >  1 files changed, 36 insertions(+), 0 deletions(-)
> >
> > diff --git a/arch/arm/mach-davinci/board-da850-evm.c
> b/arch/arm/mach-davinci/board-da850-evm.c
> > index b01fb2a..f44d184 100644
> > --- a/arch/arm/mach-davinci/board-da850-evm.c
> > +++ b/arch/arm/mach-davinci/board-da850-evm.c
> > @@ -45,6 +45,7 @@
> >
> >  #define DA850_MMCSD_CD_PIN           GPIO_TO_PIN(4, 0)
> >  #define DA850_MMCSD_WP_PIN           GPIO_TO_PIN(4, 1)
> > +#define DA850_PRU_CAN_TRX_PIN  GPIO_TO_PIN(2, 0)
> >
> >  #define DA850_MII_MDIO_CLKEN_PIN     GPIO_TO_PIN(2, 6)
> >
> > @@ -190,6 +191,41 @@ static struct platform_device *da850_evm_devices[]
> __initdata = {
> >       &da850_evm_norflash_device,
> >  };
> >
> > +const short da850_pru_can_pins[] = {
> > +     DA850_PRU0_R31_0, DA850_PRU1_R30_15, DA850_PRU1_R31_18,
> > +     -1
> > +};
> > +
> > +static int __init da850_evm_setup_pru_can(void)
> > +{
> > +     int ret;
> > +
> > +     if (!machine_is_davinci_da850_evm())
> > +             return 0;
> > +
> > +     ret = davinci_cfg_reg_list(da850_pru_can_pins);
> > +     if (ret)
> > +             pr_warning("da850_evm_init: da850_pru_can_pins mux setup"
> > +                                     "failed:%d\n", ret);
> > +
> > +     ret = davinci_cfg_reg(DA850_GPIO2_0);
> > +     if (ret)
> > +             pr_warning("da850_evm_init:GPIO(2,0) mux setup "
> > +                                     "failed\n");
> > +
> > +     /* value = 0 to enable the CAN transceiver */
> > +     ret = gpio_request_one(DA850_PRU_CAN_TRX_PIN, GPIOF_OUT_INIT_LOW,
> "pru_can_en");
> > +     if (ret)
> > +             pr_warning("Cannot setup GPIO %d\n",
> DA850_PRU_CAN_TRX_PIN);
>
> Do you want to continue and register the PRU, even if GPIO request
> fails?
>
[SG] -- Will not register the PRU if the GPIO request fails.


>
> Kevin
>
> > +     ret = da8xx_register_pru_can();
> > +     if (ret)
> > +             pr_warning("da850_evm_init: pru can registration failed:"
> > +                             "%d\n", ret);
> > +     return ret;
> > +}
> > +device_initcall(da850_evm_setup_pru_can);
> > +
> >  #define DA8XX_AEMIF_CE2CFG_OFFSET    0x10
> >  #define DA8XX_AEMIF_ASIZE_16BIT              0x1
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to