From patchwork Fri Aug 23 12:23:23 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 19457 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qc0-f197.google.com (mail-qc0-f197.google.com [209.85.216.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 718D4248E6 for ; Fri, 23 Aug 2013 12:24:37 +0000 (UTC) Received: by mail-qc0-f197.google.com with SMTP id l13sf401373qcy.4 for ; Fri, 23 Aug 2013 05:24:37 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-gm-message-state:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=1b/RT6QAncRWFzlPlJgVusWRrOPPL0sYq5J5JgziuDs=; b=o+v3YhfN3THaetn9g0akYuTEFvO+w4lzlt9sVf2Y2TW0MB4UMMpZpXsdrmzQay1YQx vYVAFJaHOwaGmOKzBqdrxIXdLjKMWfGn8vcnCBe0jwsheoITh5Wzye9zFoIA2UTclR4n uZ9C1UjXl6OcdRb6r/CvfICUC0oP+SqYoqs5PS3/gUaDFWsccHyPT+f+bT6wvCGDoJ0P rXvHD+8f+5z/mSbPpr2HX3ObrF9w5u2weOB73iTE7JmLj/GeUEsGcz2DRI+XzSvORzMg GXVdQ9u3CaZ15H/L+ycR9VO2d6HA4Yt6Sg38p+/Vaxd2j+24bYZrld7p4rozcF7+6lTn HWZg== X-Received: by 10.236.174.232 with SMTP id x68mr3422443yhl.42.1377260677238; Fri, 23 Aug 2013 05:24:37 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.49.30.1 with SMTP id o1ls1463199qeh.3.gmail; Fri, 23 Aug 2013 05:24:37 -0700 (PDT) X-Received: by 10.58.152.3 with SMTP id uu3mr16368904veb.16.1377260677062; Fri, 23 Aug 2013 05:24:37 -0700 (PDT) Received: from mail-vb0-f45.google.com (mail-vb0-f45.google.com [209.85.212.45]) by mx.google.com with ESMTPS id zt2si5460792vec.150.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 05:24:37 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.45; Received: by mail-vb0-f45.google.com with SMTP id e15so384718vbg.32 for ; Fri, 23 Aug 2013 05:24:37 -0700 (PDT) X-Gm-Message-State: ALoCoQlt4LlFjDiisDibgniwfozcTAQMT28dg/ItECZWRgUpNQjfuYkT60HnNscz4ohEVo1HSpQb X-Received: by 10.58.75.41 with SMTP id z9mr16504198vev.4.1377260676971; Fri, 23 Aug 2013 05:24:36 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp90127vcz; Fri, 23 Aug 2013 05:24:36 -0700 (PDT) X-Received: by 10.15.99.72 with SMTP id bk48mr26371578eeb.22.1377260675799; Fri, 23 Aug 2013 05:24:35 -0700 (PDT) Received: from mail-ee0-f47.google.com (mail-ee0-f47.google.com [74.125.83.47]) by mx.google.com with ESMTPS id t9si16768949eeo.155.1969.12.31.16.00.00 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 05:24:35 -0700 (PDT) Received-SPF: neutral (google.com: 74.125.83.47 is neither permitted nor denied by best guess record for domain of lee.jones@linaro.org) client-ip=74.125.83.47; Received: by mail-ee0-f47.google.com with SMTP id d49so267141eek.34 for ; Fri, 23 Aug 2013 05:24:35 -0700 (PDT) X-Received: by 10.14.173.4 with SMTP id u4mr290956eel.81.1377260675202; Fri, 23 Aug 2013 05:24:35 -0700 (PDT) Received: from localhost.localdomain (cpc15-aztw25-2-0-cust493.aztw.cable.virginmedia.com. [92.233.57.238]) by mx.google.com with ESMTPSA id f49sm24417729eec.7.1969.12.31.16.00.00 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 23 Aug 2013 05:24:34 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: arnd@arndb.de, linus.walleij@linaro.org, Lee Jones Subject: [PATCH 23/40] ARM: ux500: Stop enabling GPIOs when not booting with Device Tree Date: Fri, 23 Aug 2013 13:23:23 +0100 Message-Id: <1377260620-18829-24-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1377260620-18829-1-git-send-email-lee.jones@linaro.org> References: <1377260620-18829-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.45 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , It's time to remove all ATAG support from ux500 and rely solely on Device Tree booting. This patch is part of that endeavour. Signed-off-by: Lee Jones --- arch/arm/mach-ux500/board-mop500.c | 2 -- arch/arm/mach-ux500/cpu-db8500.c | 24 --------------- arch/arm/mach-ux500/devices-common.c | 60 ------------------------------------ arch/arm/mach-ux500/devices-common.h | 5 --- arch/arm/mach-ux500/devices-db8500.c | 1 - arch/arm/mach-ux500/devices.h | 2 -- 6 files changed, 94 deletions(-) delete mode 100644 arch/arm/mach-ux500/devices-common.c diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index d53d672..7763c5b 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -25,7 +24,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c index 33264f5..69cee39 100644 --- a/arch/arm/mach-ux500/cpu-db8500.c +++ b/arch/arm/mach-ux500/cpu-db8500.c @@ -139,28 +139,6 @@ static struct platform_device *platform_devs[] __initdata = { &db8500_pmu_device, }; -static resource_size_t __initdata db8500_gpio_base[] = { - U8500_GPIOBANK0_BASE, - U8500_GPIOBANK1_BASE, - U8500_GPIOBANK2_BASE, - U8500_GPIOBANK3_BASE, - U8500_GPIOBANK4_BASE, - U8500_GPIOBANK5_BASE, - U8500_GPIOBANK6_BASE, - U8500_GPIOBANK7_BASE, - U8500_GPIOBANK8_BASE, -}; - -static void __init db8500_add_gpios(struct device *parent) -{ - struct nmk_gpio_platform_data pdata = { - .supports_sleepmode = true, - }; - - dbx500_add_gpios(parent, ARRAY_AND_SIZE(db8500_gpio_base), - IRQ_DB8500_GPIO0, &pdata); -} - static const char *db8500_read_soc_id(void) { void __iomem *uid = __io_address(U8500_BB_UID_BASE); @@ -190,8 +168,6 @@ struct device * __init u8500_init_devices(void) parent = db8500_soc_device_init(); - db8500_add_gpios(parent); - for (i = 0; i < ARRAY_SIZE(platform_devs); i++) platform_devs[i]->dev.parent = parent; diff --git a/arch/arm/mach-ux500/devices-common.c b/arch/arm/mach-ux500/devices-common.c deleted file mode 100644 index f71b3d7..0000000 --- a/arch/arm/mach-ux500/devices-common.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (C) ST-Ericsson SA 2010 - * - * Author: Rabin Vincent for ST-Ericsson - * License terms: GNU General Public License (GPL), version 2. - */ - -#include -#include -#include -#include -#include -#include -#include - -#include "irqs.h" - -#include "devices-common.h" - -static struct platform_device * -dbx500_add_gpio(struct device *parent, int id, resource_size_t addr, int irq, - struct nmk_gpio_platform_data *pdata) -{ - struct resource resources[] = { - { - .start = addr, - .end = addr + 127, - .flags = IORESOURCE_MEM, - }, - { - .start = irq, - .end = irq, - .flags = IORESOURCE_IRQ, - } - }; - - return platform_device_register_resndata( - parent, - "gpio", - id, - resources, - ARRAY_SIZE(resources), - pdata, - sizeof(*pdata)); -} - -void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num, - int irq, struct nmk_gpio_platform_data *pdata) -{ - int first = 0; - int i; - - for (i = 0; i < num; i++, first += 32, irq++) { - pdata->first_gpio = first; - pdata->first_irq = NOMADIK_GPIO_TO_IRQ(first); - pdata->num_gpio = 32; - - dbx500_add_gpio(parent, i, base[i], irq, pdata); - } -} diff --git a/arch/arm/mach-ux500/devices-common.h b/arch/arm/mach-ux500/devices-common.h index 7167b69..ce48a02 100644 --- a/arch/arm/mach-ux500/devices-common.h +++ b/arch/arm/mach-ux500/devices-common.h @@ -33,9 +33,4 @@ dbx500_add_uart(struct device *parent, const char *name, resource_size_t base, return amba_ahb_device_add(parent, name, base, SZ_4K, irq, 0, pdata, 0); } -struct nmk_gpio_platform_data; - -void dbx500_add_gpios(struct device *parent, resource_size_t *base, int num, - int irq, struct nmk_gpio_platform_data *pdata); - #endif diff --git a/arch/arm/mach-ux500/devices-db8500.c b/arch/arm/mach-ux500/devices-db8500.c index 3c5393b..d30205b 100644 --- a/arch/arm/mach-ux500/devices-db8500.c +++ b/arch/arm/mach-ux500/devices-db8500.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/arch/arm/mach-ux500/devices.h b/arch/arm/mach-ux500/devices.h index eafb07a..da23c05 100644 --- a/arch/arm/mach-ux500/devices.h +++ b/arch/arm/mach-ux500/devices.h @@ -10,8 +10,6 @@ struct platform_device; struct amba_device; -extern struct platform_device u8500_gpio_devs[]; - extern struct amba_device ux500_pl031_device; extern struct platform_device u8500_dma40_device;