Hi Heiko, On 15/07/2014 11:27, Heiko Schocher wrote: > Hello Stefano, > > Am 15.07.2014 10:58, schrieb Stefano Babic: >> Hi Heiko, >> >> On 15/07/2014 10:52, Heiko Schocher wrote: >> >>>> I see. What do you mind to add a little effort and move the setup of >>>> the >>>> PWM from the aristaneos board to a PWM driver ? I see there is not >>>> (yet) >>>> such a driver, but why not ? >>> >>> Yes, I can do that ... Hmm, where do you think is a good place for this >>> driver? >>> >> >> IMHO you can create a drivers/pwm directory and add a pwm-imx.c driver. >> This reflects the same we have in kernel. > > Yes, that was also my first thought, but we have a API for this in > include/pwm.h > but no drivers/pwm ... so I searched pwm_init and found: > > pollux:u-boot hs [20140715] $ grep -lr pwm_init . > ./include/.pwm.h.swp > ./include/pwm.h > ./arch/arm/include/asm/arch-tegra20/pwm.h > ./arch/arm/cpu/armv7/s5p-common/pwm.c > ./arch/arm/cpu/armv7/s5p-common/timer.c > ./arch/arm/cpu/armv7/tegra20/pwm.c > ./board/nvidia/common/board.c > pollux:u-boot hs [20140715] $ > > I think, it would better to add a "arch/arm/cpu/armv7/mx6/pwm.c" > > Would this be ok?
Added Tom for asking his opinion. IMHO we had in the past a lot of drivers hidden in arch/ directories, and we have already moved them to a more generic drivers/ organization. include/pwm.h is ok. It sets the prototypes as in kernel. Personally, I would move the driver for tegra in drivers/pwm/ else to hide a new driver in arch/arm/cpu/armv7/mx6/pwm.c Best regards, Stefano -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de ===================================================================== _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot