From: Grant Likely <grant.likely@secretlab.ca>
To: Hu Mingkai-B21284 <B21284@freescale.com>
Cc: "@angua.secretlab.ca"@angua.secretlab.ca,
linuxppc-dev@ozlabs.org, Zang Roy-R61911 <R61911@freescale.com>
Subject: Re: [PATCH 1/6] spi/mpc8xxx: refactor the common code for SPI/eSPI controller
Date: Mon, 26 Jul 2010 00:48:11 -0600 [thread overview]
Message-ID: <AANLkTim8GVosXE1F88av7hi38uYdk-x4yfFLsOvG4tT=@mail.gmail.com> (raw)
In-Reply-To: <73839B4A0818E747864426270AC332C3054005D5@zmy16exm20.fsl.freescale.net>
On Mon, Jul 26, 2010 at 12:18 AM, Hu Mingkai-B21284
<B21284@freescale.com> wrote:
>
>
>> -----Original Message-----
>> From: Grant Likely [mailto:glikely@secretlab.ca] On Behalf Of
>> Grant Likely
>> Sent: Monday, July 26, 2010 8:14 AM
>> To: Hu Mingkai-B21284; "@angua.secretlab.ca"@angua.secretlab.ca
>> Cc: linuxppc-dev@ozlabs.org; galak@kernel.crashing.org; Zang
>> Roy-R61911
>> Subject: Re: [PATCH 1/6] spi/mpc8xxx: refactor the common
>> code for SPI/eSPI controller
>>
>> On Tue, Jul 20, 2010 at 10:08:20AM +0800, Mingkai Hu wrote:
>> > Refactor the common code to file spi_mpc8xxx.c used by SPI/eSPI
>> > controller driver, move the SPI controller driver to a new file
>> > fsl_spi.c, and leave the QE/CPM SPI controller code in this file.
>> >
>> > Because the register map of the SPI controller and eSPI controller
>> > is so different, also leave the code operated the register to the
>> > driver code, not the common code.
>> >
>> > Signed-off-by: Mingkai Hu <Mingkai.hu@freescale.com>
>> > ---
>> > =A0drivers/spi/Kconfig =A0 =A0 =A0 | =A0 13 +-
>> > =A0drivers/spi/Makefile =A0 =A0 =A0| =A0 =A01 +
>> > =A0drivers/spi/fsl_spi.c =A0 =A0 | 1118
>> ++++++++++++++++++++++++++++++++++++++++++
>> > =A0drivers/spi/spi_mpc8xxx.c | 1198
>> ++-------------------------------------------
>> > =A0drivers/spi/spi_mpc8xxx.h | =A0135 +++++
>>
>> Please name files spi-*.[ch]. =A0I'm going to start enforcing
>> this naming convention in the drivers/spi directory.
>>
>
> Ok.
>
>> > =A05 files changed, 1299 insertions(+), 1166 deletions(-)
>> > =A0create mode 100644 drivers/spi/fsl_spi.c
>> > =A0create mode 100644 drivers/spi/spi_mpc8xxx.h
>> >
>> > diff --git a/drivers/spi/Kconfig b/drivers/spi/Kconfig
>> > index 91c2f4f..cd564e2 100644
>> > --- a/drivers/spi/Kconfig
>> > +++ b/drivers/spi/Kconfig
>> > @@ -183,11 +183,18 @@ config SPI_MPC512x_PSC
>> > =A0 =A0 =A0 Controller in SPI master mode.
>> >
>> > =A0config SPI_MPC8xxx
>> > - =A0 tristate "Freescale MPC8xxx SPI controller"
>> > + =A0 bool
>>
>> This should be tristate so it can be loaded as a module.
>>
>
> This option is selected by FSL_SPI and FSL_ESPI option, can we load the
> driver as a module?
Yes. You may need to export some symbols, but the common library can
be loaded as a module.
>> > +static void __exit fsl_spi_exit(void)
>> > +{
>> > + =A0 of_unregister_platform_driver(&of_fsl_spi_driver);
>> > + =A0 legacy_driver_unregister();
>> > +}
>>
>> It would appear that the legacy driver should *also* be
>> separated out into its own module. =A0I realize you're just cut
>> & pasting code here, but it should be considered for a followup patch.
>>
>
> Can we remove the legacy driver thoroughly?
> If we separated out the code, what's the proper name for it?
> spi_mpc8xxx_legacy.c?
Sure.
g.
--=20
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
next prev parent reply other threads:[~2010-07-26 6:48 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-20 2:08 [PATCH 0/6] refactor spi_mpc8xxx.c and add eSPI controller support Mingkai Hu
2010-07-20 2:08 ` [PATCH 1/6] spi/mpc8xxx: refactor the common code for SPI/eSPI controller Mingkai Hu
2010-07-20 2:08 ` [PATCH 2/6] eSPI: add eSPI controller support Mingkai Hu
2010-07-20 2:08 ` [PATCH 3/6] of/spi: add support to parse the SPI flash's partitions Mingkai Hu
2010-07-20 2:08 ` [PATCH 4/6] mtd: m25p80: change the read function to read page by page Mingkai Hu
2010-07-20 2:08 ` [PATCH 5/6] powerpc/of: add eSPI controller dts bindings Mingkai Hu
2010-07-20 2:08 ` [PATCH 6/6] DTS: add SPI flash(s25fl128p01) support on p4080ds and mpc8536ds board Mingkai Hu
2010-07-26 0:35 ` Grant Likely
2010-07-26 7:39 ` Hu Mingkai-B21284
2010-07-26 7:59 ` Grant Likely
2010-07-26 0:33 ` [PATCH 5/6] powerpc/of: add eSPI controller dts bindings Grant Likely
2010-07-26 7:35 ` Hu Mingkai-B21284
2010-07-26 0:30 ` [PATCH 4/6] mtd: m25p80: change the read function to read page by page Grant Likely
2010-07-26 7:33 ` Hu Mingkai-B21284
2010-07-26 7:55 ` Grant Likely
2010-07-26 0:28 ` [PATCH 3/6] of/spi: add support to parse the SPI flash's partitions Grant Likely
2010-07-26 7:25 ` Hu Mingkai-B21284
2010-07-26 7:52 ` Grant Likely
2010-07-26 8:20 ` Hu Mingkai-B21284
2010-07-27 19:24 ` Grant Likely
2010-07-26 0:25 ` [PATCH 2/6] eSPI: add eSPI controller support Grant Likely
2010-07-26 7:02 ` Hu Mingkai-B21284
2010-07-26 0:14 ` [PATCH 1/6] spi/mpc8xxx: refactor the common code for SPI/eSPI controller Grant Likely
2010-07-26 6:18 ` Hu Mingkai-B21284
2010-07-26 6:48 ` Grant Likely [this message]
2010-07-26 7:07 ` Zang Roy-R61911
2010-07-26 7:45 ` Grant Likely
2010-07-26 0:36 ` [PATCH 0/6] refactor spi_mpc8xxx.c and add eSPI controller support Grant Likely
2010-07-26 5:52 ` Hu Mingkai-B21284
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='AANLkTim8GVosXE1F88av7hi38uYdk-x4yfFLsOvG4tT=@mail.gmail.com' \
--to=grant.likely@secretlab.ca \
--cc="@angua.secretlab.ca"@angua.secretlab.ca \
--cc=B21284@freescale.com \
--cc=R61911@freescale.com \
--cc=linuxppc-dev@ozlabs.org \
/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;
as well as URLs for NNTP newsgroup(s).