Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1332627

Re: [PATCH 4/4] mailbox: mailbox-test: add support for separate tx/rx buffer with single channel

From Sudeep Holla <sudeep.holla@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH 4/4] mailbox: mailbox-test: add support for separate tx/rx buffer with single channel
Date 2016-02-12 10:40 +0100
Message-ID <r1imL-54w-37@gated-at.bofh.it> (permalink)
References <r134l-3on-3@gated-at.bofh.it> <r134l-3on-1@gated-at.bofh.it> <r1i3o-4XY-15@gated-at.bofh.it>
Organization ARM

Show all headers | View raw



On 12/02/16 09:15, Lee Jones wrote:
> On Thu, 11 Feb 2016, Sudeep Holla wrote:
>

[...]

>> @@ -294,9 +295,13 @@ static int mbox_test_probe(struct platform_device *pdev)
>>
>>   	/* It's okay for MMIO to be NULL */
>>   	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>> -	tdev->mmio = devm_ioremap_resource(&pdev->dev, res);
>> -	if (IS_ERR(tdev->mmio))
>> -		tdev->mmio = NULL;
>> +	tdev->tx_mmio = devm_ioremap_resource(&pdev->dev, res);
>> +	if (IS_ERR(tdev->tx_mmio))
>> +		tdev->tx_mmio = NULL;
>
> Nit: I'd prefer to see a new line separator here.
>

OK will add it

>> +	res = platform_get_resource(pdev, IORESOURCE_MEM, 1);
>> +	tdev->rx_mmio = devm_ioremap_resource(&pdev->dev, res);
>> +	if (IS_ERR(tdev->rx_mmio))
>> +		tdev->rx_mmio = tdev->tx_mmio;
>>
>>   	tdev->tx_channel = mbox_test_request_channel(pdev, "tx");
>>   	tdev->rx_channel = mbox_test_request_channel(pdev, "rx");
>> @@ -304,6 +309,9 @@ static int mbox_test_probe(struct platform_device *pdev)
>>   	if (!tdev->tx_channel && !tdev->rx_channel)
>>   		return -EPROBE_DEFER;
>>
>> +	if (!tdev->rx_channel && (tdev->rx_mmio != tdev->tx_mmio))
>> +		tdev->rx_channel = tdev->tx_channel;
>> +
>>   	tdev->dev = &pdev->dev;
>>   	platform_set_drvdata(pdev, tdev);
>
> Otherwise code looks good.  Nice extension.
>

Thanks for the review.

> Acked-by: Lee Jones <lee.jones@linaro.org>
>

-- 
Regards,
Sudeep

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 4/4] mailbox: mailbox-test: add support for separate tx/rx buffer with single channel Sudeep Holla <sudeep.holla@arm.com> - 2016-02-11 18:20 +0100
  Re: [PATCH 4/4] mailbox: mailbox-test: add support for separate  tx/rx buffer with single channel Lee Jones <lee.jones@linaro.org> - 2016-02-12 10:20 +0100
    Re: [PATCH 4/4] mailbox: mailbox-test: add support for separate tx/rx  buffer with single channel Sudeep Holla <sudeep.holla@arm.com> - 2016-02-12 10:40 +0100

csiph-web