lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY4PR07MB27579742A452BC2E71D9A946C1CF9@CY4PR07MB2757.namprd07.prod.outlook.com>
Date:   Fri, 3 Sep 2021 10:47:50 +0000
From:   Parshuram Raju Thombare <pthombar@...ence.com>
To:     Mark Brown <broonie@...nel.org>
CC:     "lukas@...ner.de" <lukas@...ner.de>,
        "p.yadav@...com" <p.yadav@...com>,
        "robh+dt@...nel.org" <robh+dt@...nel.org>,
        "linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Jayshri Dajiram Pawar <jpawar@...ence.com>,
        Milind Parab <mparab@...ence.com>,
        Konrad Kociolek <konrad@...ence.com>
Subject: RE: [PATCH v3 2/2] spi: cadence: add support for Cadence XSPI
 controller

>On Fri, Sep 03, 2021 at 08:10:38AM +0000, Parshuram Raju Thombare wrote:
>
>> >> +	master->mode_bits = SPI_3WIRE | SPI_TX_DUAL  | SPI_TX_QUAD  |
>> >> +		SPI_RX_DUAL | SPI_RX_QUAD | SPI_TX_OCTAL | SPI_RX_OCTAL
>> >|
>> >> +		SPI_MODE_0  | SPI_MODE_3;
>
>> >I don't see any handling of these in the code?
>
>> This is just to declare controller's capability, so that spi_setup() can modify
>> spi->mode according to the capability of attached device.
>
>In order for this to work I would expect there to be code in the driver
>which configures the controller into the specified mode.

Oh, ok.  That is done at power on reset by the controller in 2 ways.
1. Using device discovery module, controller try to auto detect the valid protocol
    mode by trying to read SFDP signature in various modes.
2. Particular protocol mode can be selected using bootstrap signals.

I think mode_bits need to include protocol mode which is auto detected or
set using bootstrap signals. I will make that change in next version. 

Regards,
Parshuram Thombare
     
    

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ