* [PATCH linux dev-4.7] drivers: fsi: scom: Remove scom reset before every putscom
@ 2017-03-27 17:54 Eddie James
2017-03-27 18:05 ` Christopher Bostic
0 siblings, 1 reply; 3+ messages in thread
From: Eddie James @ 2017-03-27 17:54 UTC (permalink / raw)
To: openbmc; +Cc: joel, cbostic, Edward A. James
From: "Edward A. James" <eajames@us.ibm.com>
Reset was causing PIB I2C master issues.
Signed-off-by: Edward A. James <eajames@us.ibm.com>
---
drivers/fsi/fsi-scom.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c
index 9216467..57eab1d4 100644
--- a/drivers/fsi/fsi-scom.c
+++ b/drivers/fsi/fsi-scom.c
@@ -55,12 +55,7 @@ static int put_scom(struct scom_device *scom_dev, uint64_t value,
uint32_t addr)
{
int rc;
- uint32_t data = SCOM_RESET_CMD;
-
- rc = fsi_device_write(scom_dev->fsi_dev, SCOM_RESET_REG, &data,
- sizeof(uint32_t));
- if (rc)
- return rc;
+ uint32_t data;
data = (value >> 32) & 0xffffffff;
rc = fsi_device_write(scom_dev->fsi_dev, SCOM_DATA0_REG, &data,
@@ -185,6 +180,7 @@ static const struct file_operations scom_fops = {
static int scom_probe(struct device *dev)
{
+ u32 data = SCOM_RESET_CMD;
struct fsi_device *fsi_dev = to_fsi_dev(dev);
struct scom_device *scom;
@@ -202,6 +198,8 @@ static int scom_probe(struct device *dev)
scom->mdev.parent = dev;
list_add(&scom->link, &scom_devices);
+ fsi_device_write(fsi_dev, SCOM_RESET_REG, &data, sizeof(u32));
+
return misc_register(&scom->mdev);
}
--
1.8.3.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH linux dev-4.7] drivers: fsi: scom: Remove scom reset before every putscom
2017-03-27 17:54 [PATCH linux dev-4.7] drivers: fsi: scom: Remove scom reset before every putscom Eddie James
@ 2017-03-27 18:05 ` Christopher Bostic
2017-03-28 5:07 ` Joel Stanley
0 siblings, 1 reply; 3+ messages in thread
From: Christopher Bostic @ 2017-03-27 18:05 UTC (permalink / raw)
To: Eddie James, openbmc; +Cc: joel, Edward A. James
On 3/27/17 12:54 PM, Eddie James wrote:
> From: "Edward A. James" <eajames@us.ibm.com>
>
> Reset was causing PIB I2C master issues.
>
> Signed-off-by: Edward A. James <eajames@us.ibm.com>
> ---
> drivers/fsi/fsi-scom.c | 10 ++++------
> 1 file changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/fsi/fsi-scom.c b/drivers/fsi/fsi-scom.c
> index 9216467..57eab1d4 100644
> --- a/drivers/fsi/fsi-scom.c
> +++ b/drivers/fsi/fsi-scom.c
> @@ -55,12 +55,7 @@ static int put_scom(struct scom_device *scom_dev, uint64_t value,
> uint32_t addr)
> {
> int rc;
> - uint32_t data = SCOM_RESET_CMD;
> -
> - rc = fsi_device_write(scom_dev->fsi_dev, SCOM_RESET_REG, &data,
> - sizeof(uint32_t));
> - if (rc)
> - return rc;
> + uint32_t data;
>
> data = (value >> 32) & 0xffffffff;
> rc = fsi_device_write(scom_dev->fsi_dev, SCOM_DATA0_REG, &data,
> @@ -185,6 +180,7 @@ static const struct file_operations scom_fops = {
>
> static int scom_probe(struct device *dev)
> {
> + u32 data = SCOM_RESET_CMD;
> struct fsi_device *fsi_dev = to_fsi_dev(dev);
> struct scom_device *scom;
>
> @@ -202,6 +198,8 @@ static int scom_probe(struct device *dev)
> scom->mdev.parent = dev;
> list_add(&scom->link, &scom_devices);
>
> + fsi_device_write(fsi_dev, SCOM_RESET_REG, &data, sizeof(u32));
> +
> return misc_register(&scom->mdev);
> }
>
Looks good to me.
Acked by Christopher Bostic <cbostic@linux.vnet.ibm.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH linux dev-4.7] drivers: fsi: scom: Remove scom reset before every putscom
2017-03-27 18:05 ` Christopher Bostic
@ 2017-03-28 5:07 ` Joel Stanley
0 siblings, 0 replies; 3+ messages in thread
From: Joel Stanley @ 2017-03-28 5:07 UTC (permalink / raw)
To: Christopher Bostic; +Cc: Eddie James, OpenBMC Maillist, Edward A. James
On Tue, Mar 28, 2017 at 4:35 AM, Christopher Bostic
<cbostic@linux.vnet.ibm.com> wrote:
>
>
> On 3/27/17 12:54 PM, Eddie James wrote:
>>
>> From: "Edward A. James" <eajames@us.ibm.com>
>>
>> Reset was causing PIB I2C master issues.
>>
>> Signed-off-by: Edward A. James <eajames@us.ibm.com>
> Looks good to me.
>
> Acked by Christopher Bostic <cbostic@linux.vnet.ibm.com>
>
For patchwork to recognise your review, it needs to be in the form
"Acked-by: ". Otherwise it ignores it.
I fixed it up for you this time.
Applied to dev-4.7.
Cheers,
Joel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-03-28 5:07 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-03-27 17:54 [PATCH linux dev-4.7] drivers: fsi: scom: Remove scom reset before every putscom Eddie James
2017-03-27 18:05 ` Christopher Bostic
2017-03-28 5:07 ` Joel Stanley
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.