[PATCH v2] imx6: Add support for phyCARD-i.MX6

Sascha Hauer s.hauer at pengutronix.de
Wed Apr 30 05:52:13 PDT 2014


On Wed, Apr 30, 2014 at 03:15:29PM +0400, Alexander Shiyan wrote:
> Wed, 30 Apr 2014 11:07:32 +0200 от Christian Hemp <c.hemp at phytec.de>:
> > Add support for Phytec phyCARD-i.MX6.
> > 	- 1GB RAM on two banks
> > 	- 1GB RAM on one bank
> > 	- 2GB RAM on two banks
> > 
> > Signed-off-by: Christian Hemp <c.hemp at phytec.de>
> ...
> > +static int phytec_pcaaxl3_core_init(void)
> > +{
> > +	if (!of_machine_is_compatible("phytec,imx6q-pcaaxl3"))
> > +		return 0;
> > +
> > +	imx6_init_lowlevel();
> > +
> > +	return 0;
> > +}
> 
> This can be easy:
> if (of_machine_is_compatible("phytec,imx6q-pcaaxl3"))
>   imx6_init_lowlevel();
> return 0;

I think Christians version is fine. The way Christian did it more
functionality can be added to phytec_pcaaxl3_core_init without
restructuring it.

> 
> ...
> > +++ b/arch/arm/boards/phytec-phycard-imx6/lowlevel.c
> ...
> > +static inline void setup_uart(void)
> > +{
> > +	void __iomem *ccmbase = (void *)MX6_CCM_BASE_ADDR;
> 
> = IOMEM(MX6_CCM_BASE_ADDR);
> and so on...
> 
> ...
> > diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> > index 58dc38b..63fe854 100644
> > --- a/arch/arm/dts/Makefile
> > +++ b/arch/arm/dts/Makefile
> > @@ -27,7 +27,8 @@ dtb-$(CONFIG_ARCH_IMX6) += imx6q-gk802.dtb \
> >  	imx6q-nitrogen6x.dtb \
> >  	imx6dl-nitrogen6x.dtb \
> >  	imx6q-udoo.dtb \
> > -	imx6q-var-custom.dtb
> > +	imx6q-var-custom.dtb \
> 
> Let's use *-bb.dtb as other boards.

Hm, now that we have the upstream dts files in barebox all files in
arch/arm/dts/ are barebox specific, no?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



More information about the barebox mailing list