From: Seungwon Jeon <tgih.jun@samsung.com>
To: 'Prabu Thangamuthu' <Prabu.T@synopsys.com>,
'Arnd Bergmann' <arnd@arndb.de>
Cc: 'Chris Ball' <cjb@laptop.org>,
'Jaehoon Chung' <jh80.chung@samsung.com>,
'Wei WANG' <wei_wang@realsil.com.cn>,
'Ludovic Desroches' <ludovic.desroches@atmel.com>,
'Greg Kroah-Hartman' <gregkh@linuxfoundation.org>,
linux-mmc@vger.kernel.org,
'Manjunath M Bettegowda' <Manjunath.MB@synopsys.com>
Subject: RE: [PATCH v3 1/1] mmc: dw_mmc: Add IDMAC 64-bit address mode support
Date: Tue, 20 Aug 2013 18:56:33 +0900 [thread overview]
Message-ID: <001d01ce9d8b$8d4e7fb0$a7eb7f10$%jun@samsung.com> (raw)
In-Reply-To: <705D14B1C7978B40A723277C067CEDE2CD7EC6@IN01WEMBXB.internal.synopsys.com>
On Tue, August 20, 2013, Prabu Thangamuthu wrote:
> Hi Arnd, Seungwon Jeon,
>
> > On Tue, August 20, 2013, Seungwon Jeon wrote:
> > Hi Prabu,
> >
> > On Tue, August 20, 2013, Arnd Bergmann wrote:
> > > On Monday 19 August 2013, Prabu Thangamuthu wrote:
> > > >
> > > > +#ifdef CONFIG_MMC_DW_IDMAC_64BIT_ADDRESS
> > > > + u32 des1; /* Reserved */
> > > > +
> > > > + u32 des2; /* Buffer sizes */
> > > > +#define IDMAC_SET_BUFFER1_SIZE(d, s) \
> > > > + ((d)->des2 = ((d)->des2 & 0x03ffe000) | ((s) & 0x1fff))
> > > > +
> > > > + u32 des3; /* Reserved */
> > > > +
> > > > + u32 des4; /* Lower 32-bits of Buffer Address Pointer 1*/
> > > > + u32 des5; /* Upper 32-bits of Buffer Address Pointer 1*/
> > > > + u32 des6; /* Lower 32-bits of Next Descriptor Address */
> > > > + u32 des7; /* Upper 32-bits of Next Descriptor Address */
> > > > +#else
> > > > u32 des1; /* Buffer sizes */
> > > > #define IDMAC_SET_BUFFER1_SIZE(d, s) \
> > > > ((d)->des1 = ((d)->des1 & 0x03ffe000) | ((s) & 0x1fff)) @@
> > > > -73,6 +86,7 @@ struct idmac_desc {
> > > > u32 des2; /* buffer 1 physical address */
> > > >
> > > > u32 des3; /* buffer 2 physical address */
> > > > +#endif /* CONFIG_MMC_DW_IDMAC_64BIT_ADDRESS */
> > >
> > > This is not a good idea: It means you cannot build the driver to
> > > support both 32 and 64 bit at run-time. You have to remove all the
> > > #ifdef here and replace it with runtime checks. You also need to
> > > update the binding document to provide a way to detect which one is
> > > present in a given system.
>
> OK, I will modify the code to support both 32-bit and 64-bit at run-time based on
> hardware capability.
>
>
> > I guess HCON register can be used to identify 32 or 64 bit, right?
> > You already used it.
> > addr_config = (mci_readl(host, HCON) >> 27) & 0x01;
> >
> > Then, CONFIG_MMC_DW_IDMAC_64BIT_ADDRESS could be removed.
>
> You are correct. HCON register 27th bit is used to decide 32-bit or 64-bit support.
> But, this bit is reserved in older IP versions and it is valid from IP version 2.70a onwards only.
Yes, 27th is reserved bit filed. If it's read in old version host, it could be '0' by reset value.
Then, we can decide that this host supports only 32-bit address anyway?
If right, we don't need to get version.
> So, I will consider both IP version and HCON register 27th bit to provide run-time support.
>
> Thank you Arnd and Seungwon Jeo for your valuable comments.
>
>
Thanks,
Seungwon Jeon
next prev parent reply other threads:[~2013-08-20 9:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-19 10:27 [PATCH v3 1/1] mmc: dw_mmc: Add IDMAC 64-bit address mode support Prabu Thangamuthu
2013-08-19 18:39 ` Arnd Bergmann
2013-08-20 7:55 ` Seungwon Jeon
2013-08-20 9:38 ` Prabu Thangamuthu
2013-08-20 9:56 ` Seungwon Jeon [this message]
2013-08-20 10:24 ` Prabu Thangamuthu
2013-08-21 9:33 ` Prabu Thangamuthu
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='001d01ce9d8b$8d4e7fb0$a7eb7f10$%jun@samsung.com' \
--to=tgih.jun@samsung.com \
--cc=Manjunath.MB@synopsys.com \
--cc=Prabu.T@synopsys.com \
--cc=arnd@arndb.de \
--cc=cjb@laptop.org \
--cc=gregkh@linuxfoundation.org \
--cc=jh80.chung@samsung.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ludovic.desroches@atmel.com \
--cc=wei_wang@realsil.com.cn \
/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