From patchwork Mon May 20 00:45:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 1101750 X-Patchwork-Delegate: van.freenix@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=ziswiler.com Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 456gH43BjNz9s6w for ; Mon, 20 May 2019 10:48:00 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 26E69C21DE8; Mon, 20 May 2019 00:46:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BB3DAC21E30; Mon, 20 May 2019 00:45:44 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id C51B3C21DB6; Mon, 20 May 2019 00:45:37 +0000 (UTC) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) by lists.denx.de (Postfix) with ESMTPS id A8CEFC21E31 for ; Mon, 20 May 2019 00:45:33 +0000 (UTC) Received: from localhost.localdomain ([81.221.138.131]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1Mr8n4-1gqOK52qjG-00oFCT; Mon, 20 May 2019 02:45:32 +0200 From: Marcel Ziswiler To: u-boot@lists.denx.de Date: Mon, 20 May 2019 02:45:01 +0200 Message-Id: <20190520004502.8924-10-marcel@ziswiler.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190520004502.8924-1-marcel@ziswiler.com> References: <20190520004502.8924-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:97fli9BB6wIuBfpdwqIZcgzGpP4lfyxHQBdTMQtjSxMqEKYUBSh 1l5ZRKTuyDAvDq6Pf18DjSggTjoaM1ZT7hzuJj5Wb06BlbCt5+dku2abgxi5znhvR6+gLUa Z/PEn1bcPc36AHOfrEnpg3lnghCKAlG/ZjcdEfOrA+X+SdQukXXsujSIHnYnTfy58ZkBUbK nuT0i2B7UDMNE5Cz/JOmQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:NkEyp4Zlkh4=:7Tae2xK24b7/6l40tR59lg a0k/63ZrpjEHsFu33kS+Y5v/t3FytXZI+Jf236hrpgqUwyOD6pSzjOflQrW1EWL+CE+5YCBzR 3Mstx0S/yQDmWGz6dzxStrnfXftM9MmCG1Ol437hzpf2OyjhjA3MxIq+2dTwTO5G2TvbS9h1r Cdwj9pNDCWEdRiGNiT3BRxbyXIbg1rxr4FtMPeU/X0Iy8WuauRXujSvcvbKJy8zk620EX7iRA UPNWLNlSDSELuNxg4hFChRI+faiz5UPjFLXJhI8MWv4uo1uzqa4aYLSxD+3SqMtcWMu2zDvdp SM9fgOO2i5kMEGhCp0MQDuFDSGjHdMO9Ts7kh1gtX+QTnH6t6jIPEcKyfpnedQQU+oGOVPGLU BgxuAw0rrFQavLBxx/3A75SX0ZlKJBiGSMK4j1qqXH/2pKwenMaNRzKp/30owsajoTwSZa32y /ZTXhOuHwAjGMSGZGBXBehcxyHvOVF2y3PiteVJug1KQwQtwCsyfbGvFijoKCm0o8IcjNdiyj AP40ihjRvH9Sl9hi163sVMDL5FPP4Wln4+oIPcQHR2fzhj9hlNaXl988dKdF2CepCLSuFaUVC B578lagBouJkUpFs/ZNaRF6csz3C1MJBDYICXVAfep51ZUOmkPSgVo4c/Pwtnrk3UDs8TVHDS 17Jkhd4BilqO08812DipYYWPLN9yI9Pl5ddz2zdXmrSvTKbMRRpCQ4ovWBGg0n7dWRQBrvRfI ebAqYHmTwXlQ3S0N41ZkFiZ5VxrOLQU2WbaHfQ== Cc: Marek Vasut , Marcel Ziswiler Subject: [U-Boot] [PATCH v1 09/10] colibri_pxa270: add mmc platform data X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add MMC platform data. While at it also fix trivial checkpatch.pl issues. Signed-off-by: Marcel Ziswiler --- board/toradex/colibri_pxa270/colibri_pxa270.c | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/board/toradex/colibri_pxa270/colibri_pxa270.c b/board/toradex/colibri_pxa270/colibri_pxa270.c index e9e17508a5..507bf579cf 100644 --- a/board/toradex/colibri_pxa270/colibri_pxa270.c +++ b/board/toradex/colibri_pxa270/colibri_pxa270.c @@ -3,7 +3,7 @@ * Toradex Colibri PXA270 Support * * Copyright (C) 2010 Marek Vasut - * Copyright (C) 2016 Marcel Ziswiler + * Copyright (C) 2016-2019 Marcel Ziswiler */ #include @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -32,7 +33,7 @@ int board_init(void) /* arch number of Toradex Colibri PXA270 */ gd->bd->bi_arch_number = MACH_TYPE_COLIBRI; - /* adress of boot parameters */ + /* address of boot parameters */ gd->bd->bi_boot_params = 0xa0000100; return 0; @@ -82,7 +83,7 @@ int board_usb_init(int index, enum usb_init_type init) writel(readl(UHCRHDA) | 0x100, UHCRHDA); /* Set port power control mask bits, only 3 ports. */ - writel(readl(UHCRHDB) | (0x7<<17), UHCRHDB); + writel(readl(UHCRHDB) | (0x7 << 17), UHCRHDB); /* enable port 2 */ writel(readl(UP2OCR) | UP2OCR_HXOE | UP2OCR_HXS | @@ -106,8 +107,6 @@ void usb_board_stop(void) udelay(10); writel(readl(CKEN) & ~CKEN10_USBHOST, CKEN); - - return; } #endif @@ -119,11 +118,22 @@ int board_eth_init(bd_t *bis) #endif #ifdef CONFIG_CMD_MMC +#if !CONFIG_IS_ENABLED(DM_MMC) int board_mmc_init(bd_t *bis) { pxa_mmc_register(0); return 0; } +#else /* !CONFIG_IS_ENABLED(DM_MMC) */ +static const struct pxa_mmc_plat mmc_platdata = { + .base = (struct pxa_mmc_regs *)MMC0_BASE, +}; + +U_BOOT_DEVICE(pxa_mmcs) = { + .name = "pxa_mmc", + .platdata = &mmc_platdata, +}; +#endif /* !CONFIG_IS_ENABLED(DM_MMC) */ #endif static const struct pxa_serial_platdata serial_platdata = {