log files got flooded with spi dev clock messages

Hi,
I’m trying to use the spi device on my beaglebone black with a C program.
For setup I use something like:

`
uint8_t SPImode |= SPI_CPOL;

uint8_t bits = 8;
uint16_t delay = 0;
uint32_t speed = 500000;
fd= open(“spidev1.0”, O_RDWR);
ret = ioctl(fd, SPI_IOC_WR_MODE, &SPImode);

ret = ioctl(fd, SPI_IOC_RD_MODE, &SPImode);

ret = ioctl(fd, SPI_IOC_WR_BITS_PER_WORD, &bits);

ret = ioctl(fd, SPI_IOC_RD_BITS_PER_WORD, &bits);

ret = ioctl(fd, SPI_IOC_WR_MAX_SPEED_HZ, &speed);

ret = ioctl(fd, SPI_IOC_RD_MAX_SPEED_HZ, &speed);
`

For transfer I use something like:

`
struct spi_ioc_transfer tr = {
.tx_buf = (unsigned long)dataWrite,
.rx_buf = (unsigned long)dataRead,
.len = len,
.delay_usecs = 0,
.speed_hz = 500000,
.bits_per_word = 8,
};

ret = ioctl(fd, SPI_IOC_MESSAGE(1), &tr);
`

Unfortunately my log files (syslog, kern.log, debug) gets flooded with SPI messages:

Mar 28 14:25:28 bbbi-ohl-1 kernel: [ 9846.393284] spidev spi1.0: setup: speed 500000, sample trailing edge, clk normal
Mar 28 14:25:28 bbbi-ohl-1 kernel: [ 9846.393337] spidev spi1.0: setup: speed 16000000, sample trailing edge, clk normal
Mar 28 14:25:28 bbbi-ohl-1 kernel: [ 9846.393440] spidev spi1.0: setup: speed 500000, sample trailing edge, clk normal
Mar 28 14:25:28 bbbi-ohl-1 kernel: [ 9846.393492] spidev spi1.0: setup: speed 16000000, sample trailing edge, clk normal
Mar 28 14:25:28 bbbi-ohl-1 kernel: [ 9846.394007] spidev spi1.0: setup: speed 500000, sample trailing edge, clk normal
Mar 28 14:25:28 bbbi-ohl-1 kernel: [ 9846.394062] spidev spi1.0: setup: speed 16000000, sample trailing edge, clk normal

Looks like somebody tries to reset the SPI clock to the maximum of 16 MHz?
And the SPI driver logs everthing in each log file.
Somebody knows a solution for this?
Because my flash gets filled in just a few seconds :frowning:

what version kernel are you using. 4.9 had logging turned on and it made
a lot of noise

I’m using kernel 4.1.13
uname output:

Linux bbbi-ohl-1 4.1.13-ti-r30 #1 SMP PREEMPT Fri Nov 13 21:54:17 UTC 2015 armv7l GNU/Linux
Is there a way to disable logging?
Still don’t know who is setting the clock back to 16MHz.
The capemgr?

I'm using kernel 4.1.13
uname output:
Linux bbbi-ohl-1 4.1.13-ti-r30 #1 SMP PREEMPT Fri Nov 13 21:54:17 UTC 2015
armv7l GNU/Linux

That's kinda old. :wink:

Grab Yakbuild:

Follow the readme and use the "recipe.sh.v4.1.x.sample" example..

and change kernel_tag to:

kernel_tag="4.1.13-ti-r30"

Is there a way to disable logging?

Device Drivers --->
[*] SPI support --->
[*] Debug support for SPI drivers -> Debug support for SPI drivers

exit saving and let it rebuild

Still don't know who is setting the clock back to 16MHz.
The capemgr?

Reboot with spi debug disabled and then it'll be easier to find what
causing that in dmesg...

Regards,