mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 01:53:29 +02:00
MHI Host
======== - Fixed typo in the comments section - Fixed the sparse warning in MHI trace by converting the inputs to native endian instead of passing little endian fields. - Used pcim_iomap_region() API to request and map the MHI BAR. This removes the usage of deprecated pcim_iomap_regions() and pcim_iomap_table() APIs. -----BEGIN PGP SIGNATURE----- iQEzBAABCgAdFiEEZ6VDKoFIy9ikWCeXVZ8R5v6RzvUFAmct/UMACgkQVZ8R5v6R zvU3Mwf/fekxrkbfwn32wWrU8ns4lwW6hcF/muRB4dZ8sqD/IavNc/tdDZWFb87s xqHCgvIE+iX1FeJuIbH46zRfHN29/paWT1qD0apiFw/HvDd9WyE69PNkJ2AxU4RP BaODOIhGDjZ0DZ8+X5YcHA9ykoEu45QkAqAwSmifc6jTz8hjvBfICKxh6W+5jtM9 nq/19VzRt36uWoxsDIju5A/aLxFGIJHzIh5z13l/HTSqUyv/50haC1qNPkKZ8EPZ 0tWy6f/dbUYgi9+AusS4sTtUFUYtAaa7R2PqBIT0xzBJY/GMb8bqKWi/Px8WHMJz vPobjQ/kaCoVmjaBIRictfAXaPGu/A== =RaVN -----END PGP SIGNATURE----- Merge tag 'mhi-for-v6.13' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi into char-misc-next Manivannan writes: MHI Host ======== - Fixed typo in the comments section - Fixed the sparse warning in MHI trace by converting the inputs to native endian instead of passing little endian fields. - Used pcim_iomap_region() API to request and map the MHI BAR. This removes the usage of deprecated pcim_iomap_regions() and pcim_iomap_table() APIs. * tag 'mhi-for-v6.13' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/mani/mhi: bus: mhi: host: pci_generic: Use pcim_iomap_region() to request and map MHI BAR bus: mhi: host: Switch trace_mhi_gen_tre fields to native endian bus: mhi: host: Fix typos in the comments
This commit is contained in:
commit
7215ff51c5
|
|
@ -82,9 +82,9 @@ static int __mhi_download_rddm_in_panic(struct mhi_controller *mhi_cntrl)
|
|||
* other cores to shutdown while we're collecting RDDM buffer. After
|
||||
* returning from this function, we expect the device to reset.
|
||||
*
|
||||
* Normaly, we read/write pm_state only after grabbing the
|
||||
* Normally, we read/write pm_state only after grabbing the
|
||||
* pm_lock, since we're in a panic, skipping it. Also there is no
|
||||
* gurantee that this state change would take effect since
|
||||
* guarantee that this state change would take effect since
|
||||
* we're setting it w/o grabbing pm_lock
|
||||
*/
|
||||
mhi_cntrl->pm_state = MHI_PM_LD_ERR_FATAL_DETECT;
|
||||
|
|
|
|||
|
|
@ -255,7 +255,7 @@ struct mhi_chan {
|
|||
/*
|
||||
* Important: When consuming, increment tre_ring first and when
|
||||
* releasing, decrement buf_ring first. If tre_ring has space, buf_ring
|
||||
* is guranteed to have space so we do not need to check both rings.
|
||||
* is guaranteed to have space so we do not need to check both rings.
|
||||
*/
|
||||
struct mhi_ring buf_ring;
|
||||
struct mhi_ring tre_ring;
|
||||
|
|
|
|||
|
|
@ -917,12 +917,12 @@ static int mhi_pci_claim(struct mhi_controller *mhi_cntrl,
|
|||
return err;
|
||||
}
|
||||
|
||||
err = pcim_iomap_regions(pdev, 1 << bar_num, pci_name(pdev));
|
||||
if (err) {
|
||||
mhi_cntrl->regs = pcim_iomap_region(pdev, 1 << bar_num, pci_name(pdev));
|
||||
if (IS_ERR(mhi_cntrl->regs)) {
|
||||
err = PTR_ERR(mhi_cntrl->regs);
|
||||
dev_err(&pdev->dev, "failed to map pci region: %d\n", err);
|
||||
return err;
|
||||
}
|
||||
mhi_cntrl->regs = pcim_iomap_table(pdev)[bar_num];
|
||||
mhi_cntrl->reg_len = pci_resource_len(pdev, bar_num);
|
||||
|
||||
err = dma_set_mask_and_coherent(&pdev->dev, dma_mask);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
#if !defined(_TRACE_EVENT_MHI_HOST_H) || defined(TRACE_HEADER_MULTI_READ)
|
||||
#define _TRACE_EVENT_MHI_HOST_H
|
||||
|
||||
#include <linux/byteorder/generic.h>
|
||||
#include <linux/tracepoint.h>
|
||||
#include <linux/trace_seq.h>
|
||||
#include "../common.h"
|
||||
|
|
@ -97,18 +98,18 @@ TRACE_EVENT(mhi_gen_tre,
|
|||
__string(name, mhi_cntrl->mhi_dev->name)
|
||||
__field(int, ch_num)
|
||||
__field(void *, wp)
|
||||
__field(__le64, tre_ptr)
|
||||
__field(__le32, dword0)
|
||||
__field(__le32, dword1)
|
||||
__field(uint64_t, tre_ptr)
|
||||
__field(uint32_t, dword0)
|
||||
__field(uint32_t, dword1)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(name);
|
||||
__entry->ch_num = mhi_chan->chan;
|
||||
__entry->wp = mhi_tre;
|
||||
__entry->tre_ptr = mhi_tre->ptr;
|
||||
__entry->dword0 = mhi_tre->dword[0];
|
||||
__entry->dword1 = mhi_tre->dword[1];
|
||||
__entry->tre_ptr = le64_to_cpu(mhi_tre->ptr);
|
||||
__entry->dword0 = le32_to_cpu(mhi_tre->dword[0]);
|
||||
__entry->dword1 = le32_to_cpu(mhi_tre->dword[1]);
|
||||
),
|
||||
|
||||
TP_printk("%s: Chan: %d TRE: 0x%p TRE buf: 0x%llx DWORD0: 0x%08x DWORD1: 0x%08x\n",
|
||||
|
|
@ -176,19 +177,19 @@ DECLARE_EVENT_CLASS(mhi_process_event_ring,
|
|||
|
||||
TP_STRUCT__entry(
|
||||
__string(name, mhi_cntrl->mhi_dev->name)
|
||||
__field(__le32, dword0)
|
||||
__field(__le32, dword1)
|
||||
__field(uint32_t, dword0)
|
||||
__field(uint32_t, dword1)
|
||||
__field(int, state)
|
||||
__field(__le64, ptr)
|
||||
__field(uint64_t, ptr)
|
||||
__field(void *, rp)
|
||||
),
|
||||
|
||||
TP_fast_assign(
|
||||
__assign_str(name);
|
||||
__entry->rp = rp;
|
||||
__entry->ptr = rp->ptr;
|
||||
__entry->dword0 = rp->dword[0];
|
||||
__entry->dword1 = rp->dword[1];
|
||||
__entry->ptr = le64_to_cpu(rp->ptr);
|
||||
__entry->dword0 = le32_to_cpu(rp->dword[0]);
|
||||
__entry->dword1 = le32_to_cpu(rp->dword[1]);
|
||||
__entry->state = MHI_TRE_GET_EV_STATE(rp);
|
||||
),
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user