<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-dev/drivers/net/can/m_can/m_can_platform.c, branch linus/master</title>
<subtitle>Linux kernel development work - see feature branches</subtitle>
<id>https://git.zx2c4.com/linux-dev/atom/drivers/net/can/m_can/m_can_platform.c?h=linus%2Fmaster</id>
<link rel='self' href='https://git.zx2c4.com/linux-dev/atom/drivers/net/can/m_can/m_can_platform.c?h=linus%2Fmaster'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/'/>
<updated>2021-10-17T20:51:43Z</updated>
<entry>
<title>can: m_can: fix iomap_read_fifo() and iomap_write_fifo()</title>
<updated>2021-10-17T20:51:43Z</updated>
<author>
<name>Aswath Govindraju</name>
<email>a-govindraju@ti.com</email>
</author>
<published>2021-09-20T12:33:43Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=99d173fbe8944861a00ebd1c73817a1260d21e60'/>
<id>urn:sha1:99d173fbe8944861a00ebd1c73817a1260d21e60</id>
<content type='text'>
The read and writes from the fifo are from a buffer, with various
fields and data at predefined offsets. So, they should not be done to
the same address(or port) in case of val_count greater than 1.
Therefore, fix this by using iowrite32()/ioread32() instead of
ioread32_rep()/iowrite32_rep().

Also, the write into FIFO must be performed with an offset from the
message ram base address. Therefore, fix the base address to
mram_base.

Fixes: e39381770ec9 ("can: m_can: Disable IRQs on FIFO bus errors")
Link: https://lore.kernel.org/all/20210920123344.2320-1-a-govindraju@ti.com
Signed-off-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Disable IRQs on FIFO bus errors</title>
<updated>2021-08-19T13:07:04Z</updated>
<author>
<name>Matt Kline</name>
<email>matt@bitbashing.io</email>
</author>
<published>2021-08-17T05:08:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a'/>
<id>urn:sha1:e39381770ec9ca3c51d8b9bd9cc6e01d78ea974a</id>
<content type='text'>
If FIFO reads or writes fail due to the underlying regmap (e.g., SPI)
I/O, propagate that up to the m_can driver, log an error, and disable
interrupts, similar to the mcp251xfd driver.

While reworking the FIFO functions to add this error handling,
add support for bulk reads and writes of multiple registers.

Link: https://lore.kernel.org/r/20210817050853.14875-2-matt@bitbashing.io
Signed-off-by: Matt Kline &lt;matt@bitbashing.io&gt;
[mkl: re-wrap long lines, remove WARN_ON, convert to netdev block comments]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: use devm_platform_ioremap_resource_byname</title>
<updated>2021-07-25T09:36:26Z</updated>
<author>
<name>Yang Yingliang</name>
<email>yangyingliang@huawei.com</email>
</author>
<published>2021-06-03T07:34:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=9808dba1bbcb8271bd1e7d66b43b555c926b8eb0'/>
<id>urn:sha1:9808dba1bbcb8271bd1e7d66b43b555c926b8eb0</id>
<content type='text'>
Use the devm_platform_ioremap_resource_byname() helper instead of
calling platform_get_resource_byname() and devm_ioremap_resource()
separately.

Link: https://lore.kernel.org/r/20210603073441.2983497-1-yangyingliang@huawei.com
Signed-off-by: Yang Yingliang &lt;yangyingliang@huawei.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Add support for transceiver as phy</title>
<updated>2021-07-25T09:36:26Z</updated>
<author>
<name>Faiz Abbas</name>
<email>faiz_abbas@ti.com</email>
</author>
<published>2021-05-10T05:25:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=d836cb5fe045463cdab15ad6f278f7c7c194228f'/>
<id>urn:sha1:d836cb5fe045463cdab15ad6f278f7c7c194228f</id>
<content type='text'>
Add support for implementing transceiver node as phy. The max_bitrate
is obtained by getting a phy attribute.

Link: https://lore.kernel.org/r/20210724174001.553047-1-mkl@pengutronix.de
Signed-off-by: Faiz Abbas &lt;faiz_abbas@ti.com&gt;
Signed-off-by: Aswath Govindraju &lt;a-govindraju@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: use struct m_can_classdev as drvdata</title>
<updated>2020-12-14T13:24:17Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2020-12-12T17:55:18Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=c6b734892420f00fdc3c49b8c1029aa5bf0790b9'/>
<id>urn:sha1:c6b734892420f00fdc3c49b8c1029aa5bf0790b9</id>
<content type='text'>
The m_can driver's suspend and resume functions (m_can_class_suspend() and
m_can_class_resume()) make use of dev_get_drvdata() and assume that the drvdata
is a pointer to the struct net_device.

With upcoming conversion of the tcan4x5x driver to pm_runtime this assumption
is no longer valid. As the suspend and resume functions actually need a struct
m_can_classdev pointer, change the m_can_platform and the m_can_pci driver to
hold a pointer to struct m_can_classdev instead, as the tcan4x5x driver already
does.

Link: https://lore.kernel.org/r/20201212175518.139651-8-mkl@pengutronix.de
Reviewed-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Reviewed-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: let m_can_class_allocate_dev() allocate driver specific private data</title>
<updated>2020-12-14T13:24:14Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2020-12-12T17:55:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ac33ffd3e2b037fe68683b48dadd1cef4a969993'/>
<id>urn:sha1:ac33ffd3e2b037fe68683b48dadd1cef4a969993</id>
<content type='text'>
This patch enhances m_can_class_allocate_dev() to allocate driver specific
private data. The driver's private data struct must contain struct
m_can_classdev as its first member followed by the remaining private data.

Link: https://lore.kernel.org/r/20201212175518.139651-7-mkl@pengutronix.de
Reviewed-by: Sean Nyekjaer &lt;sean@geanix.com&gt;
Reviewed-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: move runtime PM enable/disable to m_can_platform</title>
<updated>2020-12-10T09:39:36Z</updated>
<author>
<name>Patrik Flykt</name>
<email>patrik.flykt@linux.intel.com</email>
</author>
<published>2020-10-23T11:58:00Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=227619c3ff7c71eab76848b3b2add06838f5b6e6'/>
<id>urn:sha1:227619c3ff7c71eab76848b3b2add06838f5b6e6</id>
<content type='text'>
This is a preparatory patch for upcoming PCI based M_CAN devices. The current
PM implementation would cause PCI based drivers to enable PM twice, once when
the PCI device is added and a second time in m_can_class_register(). This will
cause 'Unbalanced pm_runtime_enable!' to be logged, and is a situation that
should be avoided.

Therefore, in anticipation of PCI devices, move PM enabling out from M_CAN
class registration to its only user, the m_can_platform driver.

Signed-off-by: Patrik Flykt &lt;patrik.flykt@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20201023115800.46538-2-patrik.flykt@linux.intel.com
[mkl: m_can_plat_probe(): fix error handling
      m_can_class_register(): simplify error handling]
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: m_can_plat_remove(): remove unneeded platform_set_drvdata()</title>
<updated>2020-11-30T13:55:38Z</updated>
<author>
<name>Marc Kleine-Budde</name>
<email>mkl@pengutronix.de</email>
</author>
<published>2020-11-30T13:37:12Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=ba844cb96f7735cbfea925c5fc723d8d769d5c51'/>
<id>urn:sha1:ba844cb96f7735cbfea925c5fc723d8d769d5c51</id>
<content type='text'>
There's no need to unset the drvdata on remove, so remove the unneeded call to
platform_set_drvdata() in m_can_plat_remove().

Link: https://lore.kernel.org/r/20201130133713.269256-6-mkl@pengutronix.de
Reviewed-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can: Fix freeing of can device from peripherials</title>
<updated>2020-11-15T17:33:45Z</updated>
<author>
<name>Dan Murphy</name>
<email>dmurphy@ti.com</email>
</author>
<published>2020-02-27T18:38:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=85816aba460ceebed0047381395615891df68c8f'/>
<id>urn:sha1:85816aba460ceebed0047381395615891df68c8f</id>
<content type='text'>
Fix leaking netdev device from peripherial devices. The call to allocate the
netdev device is made from and managed by the peripherial.

Fixes: f524f829b75a ("can: m_can: Create a m_can platform framework")
Reported-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
Signed-off-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Link: http://lore.kernel.org/r/20200227183829.21854-2-dmurphy@ti.com
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
<entry>
<title>can: m_can_platform: don't call m_can_class_suspend in runtime suspend</title>
<updated>2020-10-06T21:29:30Z</updated>
<author>
<name>Lucas Stach</name>
<email>l.stach@pengutronix.de</email>
</author>
<published>2020-08-11T08:15:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/linux-dev/commit/?id=81f1f5ae8b3cbd54fdd994c9e9aacdb7b414a802'/>
<id>urn:sha1:81f1f5ae8b3cbd54fdd994c9e9aacdb7b414a802</id>
<content type='text'>
    0704c5743694 can: m_can_platform: remove unnecessary m_can_class_resume() call

removed the m_can_class_resume() call in the runtime resume path to get
rid of a infinite recursion, so the runtime resume now only handles the device
clocks.

Unfortunately it did not remove the complementary m_can_class_suspend() call in
the runtime suspend function, so those paths are now unbalanced, which causes
the pinctrl state to get stuck on the "sleep" state, which breaks all CAN
functionality on SoCs where this state is defined. Remove the
m_can_class_suspend() call to fix this.

Fixes: 0704c5743694 can: m_can_platform: remove unnecessary m_can_class_resume() call
Signed-off-by: Lucas Stach &lt;l.stach@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20200811081545.19921-1-l.stach@pengutronix.de
Acked-by: Dan Murphy &lt;dmurphy@ti.com&gt;
Signed-off-by: Marc Kleine-Budde &lt;mkl@pengutronix.de&gt;
</content>
</entry>
</feed>
