From patchwork Thu Feb 14 17:05:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10813325 X-Patchwork-Delegate: viresh.linux@gmail.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5DC61390 for ; Thu, 14 Feb 2019 17:05:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8EC122EBD0 for ; Thu, 14 Feb 2019 17:05:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8249B2EBD8; Thu, 14 Feb 2019 17:05:23 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D40702EBD0 for ; Thu, 14 Feb 2019 17:05:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726921AbfBNRFW (ORCPT ); Thu, 14 Feb 2019 12:05:22 -0500 Received: from mail-wm1-f65.google.com ([209.85.128.65]:51662 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727107AbfBNRFW (ORCPT ); Thu, 14 Feb 2019 12:05:22 -0500 Received: by mail-wm1-f65.google.com with SMTP id b11so7120113wmj.1 for ; Thu, 14 Feb 2019 09:05:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4hUTjly/AFQKT943z1vIP2NLqLHWU7HEz8Xx6XhU0TI=; b=hi1criUcHyxwVWY+CPrenF5q8eQ+PIYV72xZ5FwrNqmZ3Ny4VOe2qcTef0ZFrgzo9Q zcz7LGRHvaifuCYFTtDW73iruPM3QZKmgwD4PfNd82JMkc9WUKl0VBesbyUrH2lbHBfm jKzdsDxbPPpNSLdbHEtdIfpdsFMXQQ5sZVTu6WRkkvd6FkSU7CSmnQ7SMmSgEj6MZ/YR 2nOLad4rIx+n6pHinDP6m3xd8NMzrWcuNbvQJeTj7EdAVAw08JMUH7HAufYMJDGE7OSb JjoyTqyvmTkQXTFunS01f3DsY6lL2TxOPT753RwH+3dC/2VrOLuhpqUM+pOimEyO56mC 9Zjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=4hUTjly/AFQKT943z1vIP2NLqLHWU7HEz8Xx6XhU0TI=; b=dRuyeU088mfNQT3Gz7+k8bQkJagcobUgAKQJ8CXV5HalYv78O6EB2tuJESfLxthy1f D/Anay8Ronhem7W/XcSUIC0rXNB0IAvqPbpHSvudm7FhTC5a6CMIBtUwybowPvGt2s01 HFoS6xTMdx5q5icWhnlxgu82J4/W/CgRa70Nk4cmkKiE2OXP4MPk/1A61zmIUJW2gZ+e ib/65jvsbZTwEy4aTkfs5xfcECwdiEGMXJETaV6wedc2Wfqd3nyiXebarMB+/BEYINhp 6BpbtzbJwpxX8XVM1yRSDoyTiq6yrb1emG5F2cf8JEvnJ4rEhU/9LzKlRHNM4HyvDSb4 thKA== X-Gm-Message-State: AHQUAuZcfVSSzqZzLXPpvePGsmpkO1+nqO3Vtq4yFtF8vfo/z2UnuVEN u5qBMxZdR8+wRG7mii+PHDwmvQ== X-Google-Smtp-Source: AHgI3Ib7XlWSsFKm7ADikAZWcnh6HSGHIVdikVDr8NDDZvgXi+O7YrSrAjw0VlYAiPHY1i9JxcJycA== X-Received: by 2002:a1c:d049:: with SMTP id h70mr2586970wmg.81.1550163919391; Thu, 14 Feb 2019 09:05:19 -0800 (PST) Received: from debian-brgl.home ([2a01:cb1d:af:5b00:6d6c:8493:1ab5:dad7]) by smtp.gmail.com with ESMTPSA id f187sm2028695wma.4.2019.02.14.09.05.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Feb 2019 09:05:18 -0800 (PST) From: Bartosz Golaszewski To: Sekhar Nori , Kevin Hilman , "Rafael J . Wysocki" , Viresh Kumar Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-pm@vger.kernel.org, Bartosz Golaszewski Subject: [PATCH] cpufreq: davinci: move configuration to include/linux/platform_data Date: Thu, 14 Feb 2019 18:05:05 +0100 Message-Id: <20190214170505.27251-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Bartosz Golaszewski The header containing the configuration structure for davinci cpufreq driver lives in mach-davinci/include/mach/. This is fine for now but if we want to make davinci part of the multi_v5 build, no code external to mach-davinci should include machine-specific headers. Move the configuration structure to include/linux/platform_data. While we're at it: convert the GPL-2.0 boilerplate to a proper SPDX license identifier. Signed-off-by: Bartosz Golaszewski Acked-by: Sekhar Nori --- arch/arm/mach-davinci/da850.c | 2 +- arch/arm/mach-davinci/include/mach/cpufreq.h | 26 ------------------- drivers/cpufreq/davinci-cpufreq.c | 5 +--- include/linux/platform_data/davinci-cpufreq.h | 19 ++++++++++++++ 4 files changed, 21 insertions(+), 31 deletions(-) delete mode 100644 arch/arm/mach-davinci/include/mach/cpufreq.h create mode 100644 include/linux/platform_data/davinci-cpufreq.h diff --git a/arch/arm/mach-davinci/da850.c b/arch/arm/mach-davinci/da850.c index e7b78df2bfef..a02ff431ba47 100644 --- a/arch/arm/mach-davinci/da850.c +++ b/arch/arm/mach-davinci/da850.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -29,7 +30,6 @@ #include #include -#include #include #include #include diff --git a/arch/arm/mach-davinci/include/mach/cpufreq.h b/arch/arm/mach-davinci/include/mach/cpufreq.h deleted file mode 100644 index 3c089cfb6cd6..000000000000 --- a/arch/arm/mach-davinci/include/mach/cpufreq.h +++ /dev/null @@ -1,26 +0,0 @@ -/* - * TI DaVinci CPUFreq platform support. - * - * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/ - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of the GNU General Public License as - * published by the Free Software Foundation version 2. - * - * This program is distributed "as is" WITHOUT ANY WARRANTY of any - * kind, whether express or implied; without even the implied warranty - * of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ -#ifndef _MACH_DAVINCI_CPUFREQ_H -#define _MACH_DAVINCI_CPUFREQ_H - -#include - -struct davinci_cpufreq_config { - struct cpufreq_frequency_table *freq_table; - int (*set_voltage) (unsigned int index); - int (*init) (void); -}; - -#endif diff --git a/drivers/cpufreq/davinci-cpufreq.c b/drivers/cpufreq/davinci-cpufreq.c index d54a27c99121..940fe85db97a 100644 --- a/drivers/cpufreq/davinci-cpufreq.c +++ b/drivers/cpufreq/davinci-cpufreq.c @@ -23,13 +23,10 @@ #include #include #include +#include #include #include -#include -#include -#include - struct davinci_cpufreq { struct device *dev; struct clk *armclk; diff --git a/include/linux/platform_data/davinci-cpufreq.h b/include/linux/platform_data/davinci-cpufreq.h new file mode 100644 index 000000000000..3fbf9f2793b5 --- /dev/null +++ b/include/linux/platform_data/davinci-cpufreq.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * TI DaVinci CPUFreq platform support. + * + * Copyright (C) 2009 Texas Instruments, Inc. http://www.ti.com/ + */ + +#ifndef _MACH_DAVINCI_CPUFREQ_H +#define _MACH_DAVINCI_CPUFREQ_H + +#include + +struct davinci_cpufreq_config { + struct cpufreq_frequency_table *freq_table; + int (*set_voltage)(unsigned int index); + int (*init)(void); +}; + +#endif /* _MACH_DAVINCI_CPUFREQ_H */