mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: German Rivera <German.Rivera@freescale.com>
To: Alexander Graf <agraf@suse.de>, <gregkh@linuxfoundation.org>,
	<arnd@arndb.de>, <linux-kernel@vger.kernel.org>
Cc: <stuart.yoder@freescale.com>, <Kim.Phillips@freescale.com>,
	<scottwood@freescale.com>, <bhamciu1@freescale.com>,
	<R89243@freescale.com>, <Geoff.Thorpe@freescale.com>,
	<bhupesh.sharma@freescale.com>, <nir.erez@freescale.com>,
	<richard.schmitt@freescale.com>
Subject: Re: [PATCH 1/3 v4] drivers/bus: Added Freescale Management Complex APIs
Date: Tue, 25 Nov 2014 12:15:15 -0600	[thread overview]
Message-ID: <5474C733.1010702@freescale.com> (raw)
In-Reply-To: <54748D00.1030000@suse.de>



On 11/25/2014 08:06 AM, Alexander Graf wrote:
>
>
> On 13.11.14 18:54, J. German Rivera wrote:
>> APIs to access the Management Complex (MC) hardware
>> module of Freescale LS2 SoCs. This patch includes
>> APIs to check the MC firmware version and to manipulate
>> DPRC objects in the MC.
>>
>> Signed-off-by: J. German Rivera <German.Rivera@freescale.com>
>> Signed-off-by: Stuart Yoder <stuart.yoder@freescale.com>
>> ---
>> Changes in v4:
>> - Addressed comments from Alex Graf:
>>    * Added file description for files that did not have one
>>    * Removed Marshalling/unmarshalling macros invoked in MC
>>      command wrapper functions, and instead do the marshalling/
>>      unmarshalling directly in these functions.
>>    * Added type cast u32 in status range-check in mc_status_to_error()
>>    * Moved mc_write_command() and mc_read_response() inline
>>      function to mc_sys.c as they are only used in that file
>>    * Renamed u64_enc() as mc_enc() and u64_dec() as mc_dec()
>> - Upgraded MC flibs for MC firmware 0.5
>>
>> Changes in v3:
>> - Addressed comment from Greg Kroah-Hartman:
>>    * Removed doxygen comments
>>
>> - Addressed comment from Scott Wood:
>>    * Replaced udelay() call with usleep_range() call in polling loop
>> - Addressed comments from Kim Phillips:
>>    * Fixed license text in all files
>>    * Renamed files:
>> 	drivers/bus/fsl-mc/fsl_dpmng_cmd.h -> drivers/bus/fsl-mc/dpmng-cmd.h
>> 	drivers/bus/fsl-mc/fsl_dprc_cmd.h -> drivers/bus/fsl-mc/dprc-cmd.h
>> 	drivers/bus/fsl-mc/fsl_mc_sys.c -> drivers/bus/fsl-mc/mc-sys.c
>> 	include/linux/fsl_dpmng.h -> include/linux/fsl/dpmng.h
>> 	include/linux/fsl_dprc.h -> include/linux/fsl/dprc.h
>> 	include/linux/fsl_mc_cmd.h -> include/linux/fsl/mc-cmd.h
>> 	include/linux/fsl_mc_sys.h -> include/linux/fsl/mc-sys.h
>>    * Changed dpmng_load_iop() to take the DMA address directly,
>>      instead of the image virtual address.
>>    * Removed if and WARN_ON that checks for NULL fsl_destroy_mc_io()
>>    * Removed locking from mc_send_command(). Now the caller of MC flib
>>      APIs is responsible for protecting concurrent accesses to the same
>>      MC portal.
>>
>> Changes in v2:
>> - Addressed comment from Joe Perches:
>>    * Refactored logic to actively fail on err and proceed at
>>      the same indent level on success, for all functions in dprc.c
>>      and dpmng.c.
>>
>> - Addressed comments from Kim Phillips:
>>    * Fixed warning in mc_send_command
>>    * Changed serialization logic in mc_send_command() to only use
>>      spinlock_irqsave() when both threads and interrupt handlers
>>      concurrently access the same portal.
>>    * Changed switch to lookup table in mc_status_to_error()
>>    * Removed macros iowrite64(), ioread64(), ENOTSUP from fsl_mc_sys.h
>>    * Removed #ifdef side for FSL_MC_FIRMWARE in fsl_mc_cmd.h
>>    * Changed non-devm_ API calls to devm_ API calls and refactored
>>      fsl_create_mc_io()/fsl_destroy_mc_io() to simplify cleanup logic.
>>
>> - Addressed comments from Scott Wood:
>>    * Return -ENXIO instead of -EFAULT when ioremap_nocache() fails
>>
>> - Addressed comments from Alex Graf:
>>    * Added MAINTAINERS file entries for new files
>>    * Added dev param to fsl_create_mc_io(), to enable the use
>>      of devm_ APIs in this function and fsl_destroy_mc_io().
>>    * Changed the value of the timeout for MC command completion
>>      to be a function of HZ instead of a hard-coded jiffies value.
>>
>>   MAINTAINERS                    |   8 +
>>   drivers/bus/fsl-mc/dpmng-cmd.h |  50 +++
>>   drivers/bus/fsl-mc/dpmng.c     | 126 ++++++
>>   drivers/bus/fsl-mc/dprc-cmd.h  |  85 ++++
>>   drivers/bus/fsl-mc/dprc.c      | 933 +++++++++++++++++++++++++++++++++++++++++
>>   drivers/bus/fsl-mc/mc-sys.c    | 284 +++++++++++++
>>   include/linux/fsl/dpmng.h      | 151 +++++++
>>   include/linux/fsl/dprc.h       | 868 ++++++++++++++++++++++++++++++++++++++
>>   include/linux/fsl/mc-cmd.h     | 109 +++++
>>   include/linux/fsl/mc-sys.h     |  70 ++++
>>   10 files changed, 2684 insertions(+)
>>   create mode 100644 drivers/bus/fsl-mc/dpmng-cmd.h
>>   create mode 100644 drivers/bus/fsl-mc/dpmng.c
>>   create mode 100644 drivers/bus/fsl-mc/dprc-cmd.h
>>   create mode 100644 drivers/bus/fsl-mc/dprc.c
>>   create mode 100644 drivers/bus/fsl-mc/mc-sys.c
>>   create mode 100644 include/linux/fsl/dpmng.h
>>   create mode 100644 include/linux/fsl/dprc.h
>>   create mode 100644 include/linux/fsl/mc-cmd.h
>>   create mode 100644 include/linux/fsl/mc-sys.h
>>
>
> [...]
>
>> +/**
>> + * Sends an command to the MC device using the given MC I/O object
>> + *
>> + * @mc_io: MC I/O object to be used
>> + * @cmd: command to be sent
>> + *
>> + * Returns '0' on Success; Error code otherwise.
>> + *
>> + * NOTE: This function cannot be invoked from from atomic contexts.
>> + */
>> +int mc_send_command(struct fsl_mc_io *mc_io, struct mc_command *cmd)
>> +{
>> +	enum mc_cmd_status status;
>> +	unsigned long irqsave_flags = 0;
>
> drivers/bus/fsl-mc/mc-sys.c: In function ‘mc_send_command’:
> drivers/bus/fsl-mc/mc-sys.c:235:16: warning: unused variable
> ‘irqsave_flags’ [-Wunused-variable]
>    unsigned long irqsave_flags = 0;
>
I'll fix this in the next respin.

Thanks,

German
                 ^
>
>
> Alex
>

  reply	other threads:[~2014-11-25 18:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13 17:54 [PATCH 0/3 v4] drivers/bus: Freescale Management Complex bus driver patch series J. German Rivera
2014-11-13 17:54 ` [PATCH 1/3 v4] drivers/bus: Added Freescale Management Complex APIs J. German Rivera
2014-11-25 14:06   ` Alexander Graf
2014-11-25 18:15     ` German Rivera [this message]
2014-11-26 10:15   ` Alexander Graf
2014-11-26 18:35     ` German Rivera
2014-11-26 22:33     ` Stuart Yoder
2014-11-27  0:24       ` Alexander Graf
2014-11-27  1:15         ` Stuart Yoder
2014-11-27 14:29   ` Alexander Graf
2014-12-01 22:28     ` Stuart Yoder
2014-12-01 23:35       ` Alexander Graf
2014-11-27 16:14   ` Alexander Graf
2014-12-01 22:53     ` Stuart Yoder
2014-12-01 23:40       ` Alexander Graf
2014-11-13 17:54 ` [PATCH 2/3 v4] drivers/bus: Freescale Management Complex (fsl-mc) bus driver J. German Rivera
2014-11-13 17:54 ` [PATCH 3/3 v4] drivers/bus: Device driver for FSL-MC DPRC devices J. German Rivera

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5474C733.1010702@freescale.com \
    --to=german.rivera@freescale.com \
    --cc=Geoff.Thorpe@freescale.com \
    --cc=Kim.Phillips@freescale.com \
    --cc=R89243@freescale.com \
    --cc=agraf@suse.de \
    --cc=arnd@arndb.de \
    --cc=bhamciu1@freescale.com \
    --cc=bhupesh.sharma@freescale.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nir.erez@freescale.com \
    --cc=richard.schmitt@freescale.com \
    --cc=scottwood@freescale.com \
    --cc=stuart.yoder@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome