[gpio:gpio-descriptors-spi 14/14] drivers/spi/spi-pl022.c:1861:4: error: implicit declaration of function 'of_property_read_u32'; did you mean '__percpu_read_32'?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   https://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio.git gpio-descriptors-spi
head:   d52781e8bf3600398a5da184d4df22072a8e5e57
commit: d52781e8bf3600398a5da184d4df22072a8e5e57 [14/14] slask
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        git checkout d52781e8bf3600398a5da184d4df22072a8e5e57
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=arm64 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

   In file included from include/linux/bitops.h:5:0,
                    from include/linux/kernel.h:12,
                    from include/linux/list.h:9,
                    from include/linux/module.h:9,
                    from drivers/spi/spi-pl022.c:26:
   drivers/spi/spi-pl022.c: In function 'pl022_set_cs':
   drivers/spi/spi-pl022.c:451:22: error: 'struct pl022' has no member named 'cur_cs'; did you mean 'cur_msg'?
      tmp &= ~BIT(pl022->cur_cs);
                         ^
   include/linux/bits.h:6:28: note: in definition of macro 'BIT'
    #define BIT(nr)   (1UL << (nr))
                               ^~
   drivers/spi/spi-pl022.c:453:21: error: 'struct pl022' has no member named 'cur_cs'; did you mean 'cur_msg'?
      tmp |= BIT(pl022->cur_cs);
                        ^
   include/linux/bits.h:6:28: note: in definition of macro 'BIT'
    #define BIT(nr)   (1UL << (nr))
                               ^~
   drivers/spi/spi-pl022.c: In function 'giveback':
   drivers/spi/spi-pl022.c:502:4: error: implicit declaration of function 'pl022_cs_control'; did you mean 'pl022_set_cs'? [-Werror=implicit-function-declaration]
       pl022_cs_control(pl022, SSP_CHIP_DESELECT);
       ^~~~~~~~~~~~~~~~
       pl022_set_cs
   drivers/spi/spi-pl022.c: In function 'pl022_transfer_one_message':
   drivers/spi/spi-pl022.c:1580:9: error: 'struct pl022' has no member named 'cur_cs'; did you mean 'cur_msg'?
     pl022->cur_cs = pl022->chipselects[msg->spi->chip_select];
            ^~~~~~
            cur_msg
   drivers/spi/spi-pl022.c:1580:23: error: 'struct pl022' has no member named 'chipselects'
     pl022->cur_cs = pl022->chipselects[msg->spi->chip_select];
                          ^~
   drivers/spi/spi-pl022.c: In function 'pl022_setup':
>> drivers/spi/spi-pl022.c:1861:4: error: implicit declaration of function 'of_property_read_u32'; did you mean '__percpu_read_32'? [-Werror=implicit-function-declaration]
       of_property_read_u32(np, "pl022,interface",
       ^~~~~~~~~~~~~~~~~~~~
       __percpu_read_32
   drivers/spi/spi-pl022.c:1923:7: error: implicit declaration of function 'gpio_is_valid'; did you mean 'uuid_is_valid'? [-Werror=implicit-function-declaration]
     if (!gpio_is_valid(pl022->chipselects[spi->chip_select]))
          ^~~~~~~~~~~~~
          uuid_is_valid
   drivers/spi/spi-pl022.c:1923:26: error: 'struct pl022' has no member named 'chipselects'
     if (!gpio_is_valid(pl022->chipselects[spi->chip_select]))
                             ^~
   drivers/spi/spi-pl022.c: In function 'pl022_platform_data_dt_get':
   drivers/spi/spi-pl022.c:2090:11: error: implicit declaration of function 'of_property_read_bool' [-Werror=implicit-function-declaration]
     pd->rt = of_property_read_bool(np, "pl022,rt");
              ^~~~~~~~~~~~~~~~~~~~~
   drivers/spi/spi-pl022.c: In function 'pl022_probe':
   drivers/spi/spi-pl022.c:2134:7: error: 'struct pl022' has no member named 'chipselects'
     pl022->chipselects = devm_kcalloc(dev, num_cs, sizeof(int),
          ^~
   drivers/spi/spi-pl022.c:2136:12: error: 'struct pl022' has no member named 'chipselects'
     if (!pl022->chipselects) {
               ^~
   drivers/spi/spi-pl022.c:2146:8: warning: statement with no effect [-Wunused-value]
     master->use_gpio_descriptors;
     ~~~~~~^~~~~~~~~~~~~~~~~~~~~~
   drivers/spi/spi-pl022.c:2159:9: error: 'struct pl022' has no member named 'chipselects'
       pl022->chipselects[i] = i;
            ^~
   drivers/spi/spi-pl022.c:2162:18: error: implicit declaration of function 'of_get_named_gpio'; did you mean 'fwnode_get_named_gpiod'? [-Werror=implicit-function-declaration]
       int cs_gpio = of_get_named_gpio(np, "cs-gpios", i);
                     ^~~~~~~~~~~~~~~~~
                     fwnode_get_named_gpiod
   drivers/spi/spi-pl022.c:2169:9: error: 'struct pl022' has no member named 'chipselects'
       pl022->chipselects[i] = cs_gpio;
            ^~
   drivers/spi/spi-pl022.c:2172:9: error: implicit declaration of function 'devm_gpio_request'; did you mean 'devm_gpiod_put'? [-Werror=implicit-function-declaration]
        if (devm_gpio_request(dev, cs_gpio, "ssp-pl022"))
            ^~~~~~~~~~~~~~~~~
            devm_gpiod_put
   drivers/spi/spi-pl022.c:2176:14: error: implicit declaration of function 'gpio_direction_output'; did you mean 'gpiod_direction_output'? [-Werror=implicit-function-declaration]
        else if (gpio_direction_output(cs_gpio, 1))
                 ^~~~~~~~~~~~~~~~~~~~~
                 gpiod_direction_output
   cc1: some warnings being treated as errors

vim +1861 drivers/spi/spi-pl022.c

f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1814  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1815  /**
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1816   * pl022_setup - setup function registered to SPI master framework
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1817   * @spi: spi device which is requesting setup
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1818   *
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1819   * This function is registered to the SPI framework for this SPI master
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1820   * controller. If it is the first time when setup is called by this device,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1821   * this function will initialize the runtime state for this chip and save
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1822   * the same in the device structure. Else it will update the runtime info
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1823   * with the updated chip info. Nothing is really being written to the
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1824   * controller hardware here, that is not done until the actual transfer
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1825   * commence.
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1826   */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1827  static int pl022_setup(struct spi_device *spi)
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1828  {
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1829  	struct pl022_config_chip const *chip_info;
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1830  	struct pl022_config_chip chip_info_dt;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1831  	struct chip_data *chip;
c4a478430 drivers/spi/spi-pl022.c  Jonas Aaberg             2011-02-28  1832  	struct ssp_clock_params clk_freq = { .cpsdvsr = 0, .scr = 0};
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1833  	int status = 0;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1834  	struct pl022 *pl022 = spi_master_get_devdata(spi->master);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1835  	unsigned int bits = spi->bits_per_word;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1836  	u32 tmp;
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1837  	struct device_node *np = spi->dev.of_node;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1838  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1839  	if (!spi->max_speed_hz)
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1840  		return -EINVAL;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1841  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1842  	/* Get controller_state if one is supplied */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1843  	chip = spi_get_ctldata(spi);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1844  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1845  	if (chip == NULL) {
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1846  		chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
77538f4a9 drivers/spi/spi-pl022.c  Jingoo Han               2014-04-29  1847  		if (!chip)
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1848  			return -ENOMEM;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1849  		dev_dbg(&spi->dev,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1850  			"allocated memory for controller's runtime state\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1851  	}
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1852  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1853  	/* Get controller data if one is supplied */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1854  	chip_info = spi->controller_data;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1855  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1856  	if (chip_info == NULL) {
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1857  		if (np) {
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1858  			chip_info_dt = pl022_default_chip_info;
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1859  
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1860  			chip_info_dt.hierarchy = SSP_MASTER;
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22 @1861  			of_property_read_u32(np, "pl022,interface",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1862  				&chip_info_dt.iface);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1863  			of_property_read_u32(np, "pl022,com-mode",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1864  				&chip_info_dt.com_mode);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1865  			of_property_read_u32(np, "pl022,rx-level-trig",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1866  				&chip_info_dt.rx_lev_trig);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1867  			of_property_read_u32(np, "pl022,tx-level-trig",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1868  				&chip_info_dt.tx_lev_trig);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1869  			of_property_read_u32(np, "pl022,ctrl-len",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1870  				&chip_info_dt.ctrl_len);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1871  			of_property_read_u32(np, "pl022,wait-state",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1872  				&chip_info_dt.wait_state);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1873  			of_property_read_u32(np, "pl022,duplex",
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1874  				&chip_info_dt.duplex);
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1875  
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1876  			chip_info = &chip_info_dt;
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1877  		} else {
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1878  			chip_info = &pl022_default_chip_info;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1879  			/* spi_board_info.controller_data not is supplied */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1880  			dev_dbg(&spi->dev,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1881  				"using default controller_data settings\n");
6d3952a7d drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1882  		}
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1883  	} else
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1884  		dev_dbg(&spi->dev,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1885  			"using user supplied controller_data settings\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1886  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1887  	/*
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1888  	 * We can override with custom divisors, else we use the board
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1889  	 * frequency setting
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1890  	 */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1891  	if ((0 == chip_info->clk_freq.cpsdvsr)
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1892  	    && (0 == chip_info->clk_freq.scr)) {
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1893  		status = calculate_effective_freq(pl022,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1894  						  spi->max_speed_hz,
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1895  						  &clk_freq);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1896  		if (status < 0)
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1897  			goto err_config_params;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1898  	} else {
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1899  		memcpy(&clk_freq, &chip_info->clk_freq, sizeof(clk_freq));
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1900  		if ((clk_freq.cpsdvsr % 2) != 0)
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1901  			clk_freq.cpsdvsr =
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1902  				clk_freq.cpsdvsr - 1;
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1903  	}
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1904  	if ((clk_freq.cpsdvsr < CPSDVR_MIN)
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1905  	    || (clk_freq.cpsdvsr > CPSDVR_MAX)) {
e3f88ae99 drivers/spi/amba-pl022.c Virupax Sadashivpetimath 2011-06-13  1906  		status = -EINVAL;
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1907  		dev_err(&spi->dev,
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1908  			"cpsdvsr is configured incorrectly\n");
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1909  		goto err_config_params;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1910  	}
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1911  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1912  	status = verify_controller_parameters(pl022, chip_info);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1913  	if (status) {
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1914  		dev_err(&spi->dev, "controller data is incorrect");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1915  		goto err_config_params;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1916  	}
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1917  
083be3f05 drivers/spi/spi-pl022.c  Linus Walleij            2011-06-16  1918  	pl022->rx_lev_trig = chip_info->rx_lev_trig;
083be3f05 drivers/spi/spi-pl022.c  Linus Walleij            2011-06-16  1919  	pl022->tx_lev_trig = chip_info->tx_lev_trig;
083be3f05 drivers/spi/spi-pl022.c  Linus Walleij            2011-06-16  1920  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1921  	/* Now set controller state based on controller data */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1922  	chip->xfer_type = chip_info->com_mode;
f6f46de10 drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1923  	if (!gpio_is_valid(pl022->chipselects[spi->chip_select]))
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1924  		dev_warn(&spi->dev,
f6f46de10 drivers/spi/spi-pl022.c  Roland Stigge            2012-08-22  1925  			 "invalid chip select\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1926  
eb798c641 drivers/spi/spi-pl022.c  Vinit Shenoy             2012-04-17  1927  	/* Check bits per word with vendor specific range */
eb798c641 drivers/spi/spi-pl022.c  Vinit Shenoy             2012-04-17  1928  	if ((bits <= 3) || (bits > pl022->vendor->max_bpw)) {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1929  		status = -ENOTSUPP;
eb798c641 drivers/spi/spi-pl022.c  Vinit Shenoy             2012-04-17  1930  		dev_err(&spi->dev, "illegal data size for this controller!\n");
eb798c641 drivers/spi/spi-pl022.c  Vinit Shenoy             2012-04-17  1931  		dev_err(&spi->dev, "This controller can only handle 4 <= n <= %d bit words\n",
eb798c641 drivers/spi/spi-pl022.c  Vinit Shenoy             2012-04-17  1932  				pl022->vendor->max_bpw);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1933  		goto err_config_params;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1934  	} else if (bits <= 8) {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1935  		dev_dbg(&spi->dev, "4 <= n <=8 bits per word\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1936  		chip->n_bytes = 1;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1937  		chip->read = READING_U8;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1938  		chip->write = WRITING_U8;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1939  	} else if (bits <= 16) {
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1940  		dev_dbg(&spi->dev, "9 <= n <= 16 bits per word\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1941  		chip->n_bytes = 2;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1942  		chip->read = READING_U16;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1943  		chip->write = WRITING_U16;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1944  	} else {
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1945  		dev_dbg(&spi->dev, "17 <= n <= 32 bits per word\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1946  		chip->n_bytes = 4;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1947  		chip->read = READING_U32;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1948  		chip->write = WRITING_U32;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1949  	}
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1950  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1951  	/* Now Initialize all register settings required for this chip */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1952  	chip->cr0 = 0;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1953  	chip->cr1 = 0;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1954  	chip->dmacr = 0;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1955  	chip->cpsr = 0;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1956  	if ((chip_info->com_mode == DMA_TRANSFER)
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1957  	    && ((pl022->master_info)->enable_dma)) {
b1b6b9aa6 drivers/spi/amba-pl022.c Linus Walleij            2010-09-29  1958  		chip->enable_dma = true;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1959  		dev_dbg(&spi->dev, "DMA mode set in controller state\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1960  		SSP_WRITE_BITS(chip->dmacr, SSP_DMA_ENABLED,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1961  			       SSP_DMACR_MASK_RXDMAE, 0);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1962  		SSP_WRITE_BITS(chip->dmacr, SSP_DMA_ENABLED,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1963  			       SSP_DMACR_MASK_TXDMAE, 1);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1964  	} else {
b1b6b9aa6 drivers/spi/amba-pl022.c Linus Walleij            2010-09-29  1965  		chip->enable_dma = false;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1966  		dev_dbg(&spi->dev, "DMA mode NOT set in controller state\n");
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1967  		SSP_WRITE_BITS(chip->dmacr, SSP_DMA_DISABLED,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1968  			       SSP_DMACR_MASK_RXDMAE, 0);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1969  		SSP_WRITE_BITS(chip->dmacr, SSP_DMA_DISABLED,
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1970  			       SSP_DMACR_MASK_TXDMAE, 1);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1971  	}
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1972  
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  1973  	chip->cpsr = clk_freq.cpsdvsr;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  1974  
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1975  	/* Special setup for the ST micro extended control registers */
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1976  	if (pl022->vendor->extended_cr) {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1977  		u32 etx;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1978  
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1979  		if (pl022->vendor->pl023) {
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1980  			/* These bits are only in the PL023 */
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1981  			SSP_WRITE_BITS(chip->cr1, chip_info->clkdelay,
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1982  				       SSP_CR1_MASK_FBCLKDEL_ST, 13);
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1983  		} else {
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1984  			/* These bits are in the PL022 but not PL023 */
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1985  			SSP_WRITE_BITS(chip->cr0, chip_info->duplex,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1986  				       SSP_CR0_MASK_HALFDUP_ST, 5);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1987  			SSP_WRITE_BITS(chip->cr0, chip_info->ctrl_len,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1988  				       SSP_CR0_MASK_CSS_ST, 16);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1989  			SSP_WRITE_BITS(chip->cr0, chip_info->iface,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  1990  				       SSP_CR0_MASK_FRF_ST, 21);
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1991  			SSP_WRITE_BITS(chip->cr1, chip_info->wait_state,
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1992  				       SSP_CR1_MASK_MWAIT_ST, 6);
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1993  		}
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1994  		SSP_WRITE_BITS(chip->cr0, bits - 1,
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  1995  			       SSP_CR0_MASK_DSS_ST, 0);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1996  
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1997  		if (spi->mode & SPI_LSB_FIRST) {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1998  			tmp = SSP_RX_LSB;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  1999  			etx = SSP_TX_LSB;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2000  		} else {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2001  			tmp = SSP_RX_MSB;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2002  			etx = SSP_TX_MSB;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2003  		}
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2004  		SSP_WRITE_BITS(chip->cr1, tmp, SSP_CR1_MASK_RENDN_ST, 4);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2005  		SSP_WRITE_BITS(chip->cr1, etx, SSP_CR1_MASK_TENDN_ST, 5);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2006  		SSP_WRITE_BITS(chip->cr1, chip_info->rx_lev_trig,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2007  			       SSP_CR1_MASK_RXIFLSEL_ST, 7);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2008  		SSP_WRITE_BITS(chip->cr1, chip_info->tx_lev_trig,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2009  			       SSP_CR1_MASK_TXIFLSEL_ST, 10);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2010  	} else {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2011  		SSP_WRITE_BITS(chip->cr0, bits - 1,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2012  			       SSP_CR0_MASK_DSS, 0);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2013  		SSP_WRITE_BITS(chip->cr0, chip_info->iface,
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2014  			       SSP_CR0_MASK_FRF, 4);
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2015  	}
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2016  
556f4aeb7 drivers/spi/amba-pl022.c Linus Walleij            2010-05-05  2017  	/* Stuff that is common for all versions */
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2018  	if (spi->mode & SPI_CPOL)
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2019  		tmp = SSP_CLK_POL_IDLE_HIGH;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2020  	else
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2021  		tmp = SSP_CLK_POL_IDLE_LOW;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2022  	SSP_WRITE_BITS(chip->cr0, tmp, SSP_CR0_MASK_SPO, 6);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2023  
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2024  	if (spi->mode & SPI_CPHA)
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2025  		tmp = SSP_CLK_SECOND_EDGE;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2026  	else
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2027  		tmp = SSP_CLK_FIRST_EDGE;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2028  	SSP_WRITE_BITS(chip->cr0, tmp, SSP_CR0_MASK_SPH, 7);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2029  
f9d629c73 drivers/spi/amba-pl022.c Linus Walleij            2010-10-01  2030  	SSP_WRITE_BITS(chip->cr0, clk_freq.scr, SSP_CR0_MASK_SCR, 8);
781c7b129 drivers/spi/amba-pl022.c Linus Walleij            2010-05-07  2031  	/* Loopback is available on all versions except PL023 */
06fb01fd1 drivers/spi/amba-pl022.c Philippe Langlais        2011-03-23  2032  	if (pl022->vendor->loopback) {
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2033  		if (spi->mode & SPI_LOOP)
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2034  			tmp = LOOPBACK_ENABLED;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2035  		else
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2036  			tmp = LOOPBACK_DISABLED;
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2037  		SSP_WRITE_BITS(chip->cr1, tmp, SSP_CR1_MASK_LBM, 0);
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2038  	}
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2039  	SSP_WRITE_BITS(chip->cr1, SSP_DISABLED, SSP_CR1_MASK_SSE, 1);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2040  	SSP_WRITE_BITS(chip->cr1, chip_info->hierarchy, SSP_CR1_MASK_MS, 2);
f1e45f86e drivers/spi/spi-pl022.c  Viresh Kumar             2011-08-10  2041  	SSP_WRITE_BITS(chip->cr1, chip_info->slave_tx_disable, SSP_CR1_MASK_SOD,
f1e45f86e drivers/spi/spi-pl022.c  Viresh Kumar             2011-08-10  2042  		3);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2043  
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2044  	/* Save controller_state */
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2045  	spi_set_ctldata(spi, chip);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2046  	return status;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2047   err_config_params:
bde435a9c drivers/spi/amba-pl022.c Kevin Wells              2010-09-16  2048  	spi_set_ctldata(spi, NULL);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2049  	kfree(chip);
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2050  	return status;
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2051  }
b43d65f7e drivers/spi/amba-pl022.c Linus Walleij            2009-06-09  2052  

:::::: The code at line 1861 was first introduced by commit
:::::: 6d3952a7dfa80919842bbe01ac7f693d40a1eb84 spi/pl022: Add devicetree support

:::::: TO: Roland Stigge <stigge@xxxxxxxxx>
:::::: CC: Mark Brown <broonie@xxxxxxxxxxxxxxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux SPI]     [Linux Kernel]     [Linux ARM (vger)]     [Linux ARM MSM]     [Linux Omap]     [Linux Arm]     [Linux Tegra]     [Fedora ARM]     [Linux for Samsung SOC]     [eCos]     [Linux Fastboot]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [Linux MIPS]     [Yosemite Campsites]

  Powered by Linux