From mboxrd@z Thu Jan 1 00:00:00 1970 From: Igor Grinberg Date: Wed, 17 Sep 2014 16:07:29 +0300 Subject: [U-Boot] [PATCH v2 11/11] dm: imx: Move cm_fx6 to use driver model for serial and GPIO In-Reply-To: <1410925884-8767-12-git-send-email-sjg@chromium.org> References: <1410925884-8767-1-git-send-email-sjg@chromium.org> <1410925884-8767-12-git-send-email-sjg@chromium.org> Message-ID: <54198791.3060303@compulab.co.il> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On 09/17/14 06:51, Simon Glass wrote: > Now that serial and GPIO are available for iMX.6, move cm_fx6 over as an > example. > > Signed-off-by: Simon Glass Thanks for doing this. Acked-by: Igor Grinberg > --- > > Changes in v2: > - Use the correct namespace for the platform data > > board/compulab/cm_fx6/cm_fx6.c | 10 ++++++++++ > include/configs/cm_fx6.h | 11 +++++++++++ > 2 files changed, 21 insertions(+) > > diff --git a/board/compulab/cm_fx6/cm_fx6.c b/board/compulab/cm_fx6/cm_fx6.c > index 10e31b6..d79cd5f 100644 > --- a/board/compulab/cm_fx6/cm_fx6.c > +++ b/board/compulab/cm_fx6/cm_fx6.c > @@ -9,11 +9,13 @@ > */ > > #include > +#include > #include > #include > #include > #include > #include > +#include > #include > #include > #include > @@ -509,3 +511,11 @@ u32 get_board_rev(void) > return cl_eeprom_get_board_rev(); > } > > +static struct mxc_serial_platdata cm_fx6_mxc_serial_plat = { > + .reg = (struct mxc_uart *)UART4_BASE, > +}; > + > +U_BOOT_DEVICE(cm_fx6_serial) = { > + .name = "serial_mxc", > + .platdata = &cm_fx6_mxc_serial_plat, > +}; > diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h > index 10d02b4..1f55150 100644 > --- a/include/configs/cm_fx6.h > +++ b/include/configs/cm_fx6.h > @@ -21,6 +21,17 @@ > #define CONFIG_MACH_TYPE 4273 > #define CONFIG_SYS_HZ 1000 > > +#ifndef CONFIG_SPL_BUILD > +#define CONFIG_DM > +#define CONFIG_CMD_DM > + > +#define CONFIG_DM_GPIO > +#define CONFIG_CMD_GPIO > + > +#define CONFIG_DM_SERIAL > +#define CONFIG_SYS_MALLOC_F_LEN (1 << 10) > +#endif > + > /* Display information on boot */ > #define CONFIG_DISPLAY_CPUINFO > #define CONFIG_DISPLAY_BOARDINFO > -- Regards, Igor.