Message ID | 20161115101232.3854-7-jh80.chung@samsung.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Added Adrian for sdhci.h On 11/15/2016 07:12 PM, Jaehoon Chung wrote: > It's not for only sdhci controller. > So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie > to mmc_cookie. > > Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> > Tested-by: Heiko Stuebner <heiko@sntech.de> > --- > drivers/mmc/host/sdhci.h | 6 ------ > include/linux/mmc/core.h | 6 ++++++ > 2 files changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h > index 766df17..325663b 100644 > --- a/drivers/mmc/host/sdhci.h > +++ b/drivers/mmc/host/sdhci.h > @@ -321,12 +321,6 @@ struct sdhci_adma2_64_desc { > /* Allow for a a command request and a data request at the same time */ > #define SDHCI_MAX_MRQS 2 > > -enum sdhci_cookie { > - COOKIE_UNMAPPED, > - COOKIE_PRE_MAPPED, /* mapped by sdhci_pre_req() */ > - COOKIE_MAPPED, /* mapped by sdhci_prepare_data() */ > -}; > - > struct sdhci_host { > /* Data set by hardware interface driver */ > const char *hw_name; /* Hardware bus name */ > diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h > index 0ce928b..82d707f 100644 > --- a/include/linux/mmc/core.h > +++ b/include/linux/mmc/core.h > @@ -118,6 +118,12 @@ struct mmc_command { > struct mmc_request *mrq; /* associated request */ > }; > > +enum mmc_cookie { > + COOKIE_UNMAPPED, > + COOKIE_PRE_MAPPED, /* mapped by pre_req() of controller */ > + COOKIE_MAPPED, /* mapped by prepare_data() of controller */ > +}; > + > struct mmc_data { > unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ > unsigned int timeout_clks; /* data timeout (in clocks) */ > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 16/11/16 09:53, Jaehoon Chung wrote: > Added Adrian for sdhci.h > > On 11/15/2016 07:12 PM, Jaehoon Chung wrote: >> It's not for only sdhci controller. >> So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie >> to mmc_cookie. The cookie is currently host private data, so I don't understand the motivation behind this. >> >> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >> Tested-by: Heiko Stuebner <heiko@sntech.de> >> --- >> drivers/mmc/host/sdhci.h | 6 ------ >> include/linux/mmc/core.h | 6 ++++++ >> 2 files changed, 6 insertions(+), 6 deletions(-) >> >> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h >> index 766df17..325663b 100644 >> --- a/drivers/mmc/host/sdhci.h >> +++ b/drivers/mmc/host/sdhci.h >> @@ -321,12 +321,6 @@ struct sdhci_adma2_64_desc { >> /* Allow for a a command request and a data request at the same time */ >> #define SDHCI_MAX_MRQS 2 >> >> -enum sdhci_cookie { >> - COOKIE_UNMAPPED, >> - COOKIE_PRE_MAPPED, /* mapped by sdhci_pre_req() */ >> - COOKIE_MAPPED, /* mapped by sdhci_prepare_data() */ >> -}; >> - >> struct sdhci_host { >> /* Data set by hardware interface driver */ >> const char *hw_name; /* Hardware bus name */ >> diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h >> index 0ce928b..82d707f 100644 >> --- a/include/linux/mmc/core.h >> +++ b/include/linux/mmc/core.h >> @@ -118,6 +118,12 @@ struct mmc_command { >> struct mmc_request *mrq; /* associated request */ >> }; >> >> +enum mmc_cookie { >> + COOKIE_UNMAPPED, >> + COOKIE_PRE_MAPPED, /* mapped by pre_req() of controller */ >> + COOKIE_MAPPED, /* mapped by prepare_data() of controller */ >> +}; >> + >> struct mmc_data { >> unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ >> unsigned int timeout_clks; /* data timeout (in clocks) */ >> > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/16/2016 05:09 PM, Adrian Hunter wrote: > On 16/11/16 09:53, Jaehoon Chung wrote: >> Added Adrian for sdhci.h >> >> On 11/15/2016 07:12 PM, Jaehoon Chung wrote: >>> It's not for only sdhci controller. >>> So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie >>> to mmc_cookie. > > The cookie is currently host private data, so I don't understand the > motivation behind this. dwmmc controller can also use the data->host_cookie. because it's working with post/pre_req(). So i think it can be used about both sdhci and dwmmc. Is there no reason that add the private dwmmc data? With these cookie value, update the dwmmc controller for post/pre_req(). https://patchwork.kernel.org/patch/9429287/ Best Regards, Jaehoon Chung > >>> >>> Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com> >>> Tested-by: Heiko Stuebner <heiko@sntech.de> >>> --- >>> drivers/mmc/host/sdhci.h | 6 ------ >>> include/linux/mmc/core.h | 6 ++++++ >>> 2 files changed, 6 insertions(+), 6 deletions(-) >>> >>> diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h >>> index 766df17..325663b 100644 >>> --- a/drivers/mmc/host/sdhci.h >>> +++ b/drivers/mmc/host/sdhci.h >>> @@ -321,12 +321,6 @@ struct sdhci_adma2_64_desc { >>> /* Allow for a a command request and a data request at the same time */ >>> #define SDHCI_MAX_MRQS 2 >>> >>> -enum sdhci_cookie { >>> - COOKIE_UNMAPPED, >>> - COOKIE_PRE_MAPPED, /* mapped by sdhci_pre_req() */ >>> - COOKIE_MAPPED, /* mapped by sdhci_prepare_data() */ >>> -}; >>> - >>> struct sdhci_host { >>> /* Data set by hardware interface driver */ >>> const char *hw_name; /* Hardware bus name */ >>> diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h >>> index 0ce928b..82d707f 100644 >>> --- a/include/linux/mmc/core.h >>> +++ b/include/linux/mmc/core.h >>> @@ -118,6 +118,12 @@ struct mmc_command { >>> struct mmc_request *mrq; /* associated request */ >>> }; >>> >>> +enum mmc_cookie { >>> + COOKIE_UNMAPPED, >>> + COOKIE_PRE_MAPPED, /* mapped by pre_req() of controller */ >>> + COOKIE_MAPPED, /* mapped by prepare_data() of controller */ >>> +}; >>> + >>> struct mmc_data { >>> unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ >>> unsigned int timeout_clks; /* data timeout (in clocks) */ >>> >> >> > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 16/11/16 10:25, Jaehoon Chung wrote: > On 11/16/2016 05:09 PM, Adrian Hunter wrote: >> On 16/11/16 09:53, Jaehoon Chung wrote: >>> Added Adrian for sdhci.h >>> >>> On 11/15/2016 07:12 PM, Jaehoon Chung wrote: >>>> It's not for only sdhci controller. >>>> So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie >>>> to mmc_cookie. >> >> The cookie is currently host private data, so I don't understand the >> motivation behind this. > > dwmmc controller can also use the data->host_cookie. because it's working with post/pre_req(). > > So i think it can be used about both sdhci and dwmmc. > Is there no reason that add the private dwmmc data? > > With these cookie value, update the dwmmc controller for post/pre_req(). > > https://patchwork.kernel.org/patch/9429287/ So why not define dwmmc cookies in dw_mmc.c ? -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/16/2016 05:28 PM, Adrian Hunter wrote: > On 16/11/16 10:25, Jaehoon Chung wrote: >> On 11/16/2016 05:09 PM, Adrian Hunter wrote: >>> On 16/11/16 09:53, Jaehoon Chung wrote: >>>> Added Adrian for sdhci.h >>>> >>>> On 11/15/2016 07:12 PM, Jaehoon Chung wrote: >>>>> It's not for only sdhci controller. >>>>> So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie >>>>> to mmc_cookie. >>> >>> The cookie is currently host private data, so I don't understand the >>> motivation behind this. >> >> dwmmc controller can also use the data->host_cookie. because it's working with post/pre_req(). >> >> So i think it can be used about both sdhci and dwmmc. >> Is there no reason that add the private dwmmc data? >> >> With these cookie value, update the dwmmc controller for post/pre_req(). >> >> https://patchwork.kernel.org/patch/9429287/ > > So why not define dwmmc cookies in dw_mmc.c ? Because I understood that it's not sdhci specific cookies. It can be used generally, doesn't? Role of post/pre_req() in host controller is the doing dma_map/unmap(). And data's cookies only needs to notice whether dma is mapped or unmapped, etc. Well, If it's really private value and should be added other cookies values in future, i will put cookies in dw_mmc.h. (it should be duplicated in sdhci and dwmmc.) Best Regards, Jaehoon Chung > > > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 16/11/16 10:58, Jaehoon Chung wrote: > On 11/16/2016 05:28 PM, Adrian Hunter wrote: >> On 16/11/16 10:25, Jaehoon Chung wrote: >>> On 11/16/2016 05:09 PM, Adrian Hunter wrote: >>>> On 16/11/16 09:53, Jaehoon Chung wrote: >>>>> Added Adrian for sdhci.h >>>>> >>>>> On 11/15/2016 07:12 PM, Jaehoon Chung wrote: >>>>>> It's not for only sdhci controller. >>>>>> So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie >>>>>> to mmc_cookie. >>>> >>>> The cookie is currently host private data, so I don't understand the >>>> motivation behind this. >>> >>> dwmmc controller can also use the data->host_cookie. because it's working with post/pre_req(). >>> >>> So i think it can be used about both sdhci and dwmmc. >>> Is there no reason that add the private dwmmc data? >>> >>> With these cookie value, update the dwmmc controller for post/pre_req(). >>> >>> https://patchwork.kernel.org/patch/9429287/ >> >> So why not define dwmmc cookies in dw_mmc.c ? > > Because I understood that it's not sdhci specific cookies. It can be used generally, doesn't? > > Role of post/pre_req() in host controller is the doing dma_map/unmap(). > And data's cookies only needs to notice whether dma is mapped or unmapped, etc. > > Well, If it's really private value and should be added other cookies values in future, i will put cookies in dw_mmc.h. > (it should be duplicated in sdhci and dwmmc.) Probably all host controllers should do cookies the same way, but they don't at the moment, so there is no reason to share definitions. -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 11/16/2016 06:04 PM, Adrian Hunter wrote: > On 16/11/16 10:58, Jaehoon Chung wrote: >> On 11/16/2016 05:28 PM, Adrian Hunter wrote: >>> On 16/11/16 10:25, Jaehoon Chung wrote: >>>> On 11/16/2016 05:09 PM, Adrian Hunter wrote: >>>>> On 16/11/16 09:53, Jaehoon Chung wrote: >>>>>> Added Adrian for sdhci.h >>>>>> >>>>>> On 11/15/2016 07:12 PM, Jaehoon Chung wrote: >>>>>>> It's not for only sdhci controller. >>>>>>> So it can be moved from sdhci.h to mmc.h. And renamed from sdhci_cookie >>>>>>> to mmc_cookie. >>>>> >>>>> The cookie is currently host private data, so I don't understand the >>>>> motivation behind this. >>>> >>>> dwmmc controller can also use the data->host_cookie. because it's working with post/pre_req(). >>>> >>>> So i think it can be used about both sdhci and dwmmc. >>>> Is there no reason that add the private dwmmc data? >>>> >>>> With these cookie value, update the dwmmc controller for post/pre_req(). >>>> >>>> https://patchwork.kernel.org/patch/9429287/ >>> >>> So why not define dwmmc cookies in dw_mmc.c ? >> >> Because I understood that it's not sdhci specific cookies. It can be used generally, doesn't? >> >> Role of post/pre_req() in host controller is the doing dma_map/unmap(). >> And data's cookies only needs to notice whether dma is mapped or unmapped, etc. >> >> Well, If it's really private value and should be added other cookies values in future, i will put cookies in dw_mmc.h. >> (it should be duplicated in sdhci and dwmmc.) > > Probably all host controllers should do cookies the same way, but they don't > at the moment, so there is no reason to share definitions. Ok. Then I will put dwmmc_cookie in dw_mmc.h on next version. Thanks for comments. Best Regards, Jaehoon Chung > > -- > To unsubscribe from this list: send the line "unsubscribe linux-mmc" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > > > -- To unsubscribe from this list: send the line "unsubscribe linux-mmc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/mmc/host/sdhci.h b/drivers/mmc/host/sdhci.h index 766df17..325663b 100644 --- a/drivers/mmc/host/sdhci.h +++ b/drivers/mmc/host/sdhci.h @@ -321,12 +321,6 @@ struct sdhci_adma2_64_desc { /* Allow for a a command request and a data request at the same time */ #define SDHCI_MAX_MRQS 2 -enum sdhci_cookie { - COOKIE_UNMAPPED, - COOKIE_PRE_MAPPED, /* mapped by sdhci_pre_req() */ - COOKIE_MAPPED, /* mapped by sdhci_prepare_data() */ -}; - struct sdhci_host { /* Data set by hardware interface driver */ const char *hw_name; /* Hardware bus name */ diff --git a/include/linux/mmc/core.h b/include/linux/mmc/core.h index 0ce928b..82d707f 100644 --- a/include/linux/mmc/core.h +++ b/include/linux/mmc/core.h @@ -118,6 +118,12 @@ struct mmc_command { struct mmc_request *mrq; /* associated request */ }; +enum mmc_cookie { + COOKIE_UNMAPPED, + COOKIE_PRE_MAPPED, /* mapped by pre_req() of controller */ + COOKIE_MAPPED, /* mapped by prepare_data() of controller */ +}; + struct mmc_data { unsigned int timeout_ns; /* data timeout (in ns, max 80ms) */ unsigned int timeout_clks; /* data timeout (in clocks) */