> - The description of alternative PINMUX configuration takes place in
> da850_pins[] in da850.c
> - Group of pins that describe a new feature can be defined in the
> board-specific file (so they can be enabled in one call)
New features should be defined in the SoC file, because your board
might not be the only one to
need this feature.
For example, let's say I want to enable CLKOUT2 on GIO31, on dm365.
With the following patch, I define it for
any board that might need it :
===================================================================
--- a/arch/arm/mach-davinci/dm365.c
+++ b/arch/arm/mach-davinci/dm365.c
@@ -591,6 +591,7 @@
MUX_CFG(DM365, VIN_CAM_HD, 0, 12, 1, 0, false)
MUX_CFG(DM365, VIN_YIN4_7_EN, 0, 0, 0xff, 0, false)
MUX_CFG(DM365, VIN_YIN0_3_EN, 0, 8, 0xf, 0, false)
+MUX_CFG(DM365, CLKOUT2_G31, 4, 8, 3, 3, false)
INT_CFG(DM365, INT_EDMA_CC, 2, 1, 1, false)
INT_CFG(DM365, INT_EDMA_TC0_ERR, 3, 1, 1, false)
Index: b/arch/arm/mach-davinci/include/mach/mux.h
===================================================================
--- a/arch/arm/mach-davinci/include/mach/mux.h
+++ b/arch/arm/mach-davinci/include/mach/mux.h
@@ -307,6 +307,7 @@
DM365_VIN_CAM_HD,
DM365_VIN_YIN4_7_EN,
DM365_VIN_YIN0_3_EN,
+ DM365_CLKOUT2_G31,
/* IRQ muxing */
DM365_INT_EDMA_CC,
Now, each board that needs this particular features simply call
davinci_cfg_reg(DM365_CLKOUT2_G31);
On the other hand, if the new MUX_CFG is defined in your board file,
then every new board
that want to output CLKOUT2 on GIO31 will redefine this same features,
have a chance to get it wrong etc ...
Of course, if your board is the only in tree consumer of the new
features, it won't benefit to anyone else.
But it won't be harmful to you either.
> - Programming the pinmux takes place in board-specific file using the
> da8xx_pinmux_setup now renamed to davinci_cfg_reg_list.
>
>>> Regards,
>>
>> WBR, Sergei
>
> Thank you for your help and clear explanations,
>
> Regards,
>
> --
> Christophe Aeschlimann
>
> Embedded Software Engineer
>
> Advanced Communications Networks S.A.
>
> Rue du Puits-Godet 8a
> 2000 Neuchâtel, Switzerland
>
> Tél. +41 32 724 74 31
>
> [email protected]
> _______________________________________________
> Davinci-linux-open-source mailing list
> [email protected]
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
>
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source