mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
ARM: SoC: late fixes and dependencies
This is a collection of a few late fixes and other misc. stuff that had dependencies on things being merged from other trees. The bulk of the changes are for samsung/exynos SoCs for some changes that needed a few minor reworks so ended up a bit late. The others are mainly for qcom SoCs: a couple fixes and some DTS updates. There's one conflict with drivers/cpufreq/exynos-cpufreq.c because it's now been completely removed, but there were some fixes that hit mainline in the meantime. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIbBAABAgAGBQJV8fkAAAoJEFk3GJrT+8Zllf8P9jj3+TnvbJS/8bWoQoB7BRUZ LZPgi2+sBXylrBV60uQdyodiTHQUMZhbL7GvgEVG0z6yyin7nyijqNkulTbQbWmg WhumLNCNcs8vlZegA/corbwgcVC7FkjOP97HveTe2mgwZ+GaXj9qMRQzBsMqSXEo 4890ZeP1nWBTP42oXOQHkNyKWFBjuERK0dTw2MXj7WE0/Ag8i7ERp76uJQdQ7V5O BpNRwxp3vSCky8rxbpD/avWdlspv1yZGBQyLeIreVq2YQFojvT36K8wHcf6iWBT/ pzGGV/uZM7MnrGZdqSfVEMDHl7Z2s7Ls+sv5F6Md7ErnVDerHGRjw/6lJDjbeH7u trucpsuhz5yhTjpZssGHH2NT8pWxxh8M+AaNOiiH8PuYESAbPAmWLpWkn+648bIn P++Z90DIyfNEqnNSMHkcQYpVt8zc4g75gZfTIIsXLB+DLgzgSK8ergrfyRN/O0zj oFY35g3wHdgisnGve+BAW30zTZtP19TMT36OltWjIkjuRZC29PS2vkH8eTETdVXx 01f/qcpbB1L1rXfIBjNkjx81j89XPd68JIBfctTF5QBOAGm/Dix6tj2mU/N7TNu5 TrBmD3CXdOQbCPaoK/qWX7/b11IN/XOlGL06hhYwbSdvCVy7rNccApXvfnrDWziK Ly923FP1OB7h0Kk1cmo= =85Ck -----END PGP SIGNATURE----- Merge tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull late ARM SoC updates from Kevin Hilman: "This is a collection of a few late fixes and other misc stuff that had dependencies on things being merged from other trees. The bulk of the changes are for samsung/exynos SoCs for some changes that needed a few minor reworks so ended up a bit late. The others are mainly for qcom SoCs: a couple fixes and some DTS updates" * tag 'armsoc-late' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (37 commits) ARM: multi_v7_defconfig: Enable PBIAS regulator soc: qcom: smd: Correct fBLOCKREADINTR handling soc: qcom: smd: Use correct remote processor ID soc: qcom: smem: Fix errant private access ARM: dts: qcom: msm8974-sony-xperia-honami: Use stdout-path ARM: dts: qcom: msm8960-cdp: Use stdout-path ARM: dts: qcom: msm8660-surf: Use stdout-path ARM: dts: qcom: ipq8064-ap148: Use stdout-path ARM: dts: qcom: apq8084-mtp: Use stdout-path ARM: dts: qcom: apq8084-ifc6540: Use stdout-path ARM: dts: qcom: apq8074-dragonboard: Use stdout-path ARM: dts: qcom: apq8064-ifc6410: Use stdout-path ARM: dts: qcom: apq8064-cm-qs600: Use stdout-path ARM: dts: qcom: Label serial nodes for aliasing and stdout-path reset: ath79: Fix missing spin_lock_init reset: Add (devm_)reset_control_get stub functions ARM: EXYNOS: switch to using generic cpufreq driver for exynos4x12 cpufreq: exynos: Remove unselectable rule for arm-exynos-cpufreq.o ARM: dts: add iommu property to JPEG device for exynos4 ARM: dts: enable SPI1 for exynos4412-odroidu3 ...
This commit is contained in:
commit
d71fc239b6
47 changed files with 540 additions and 853 deletions
|
|
@ -96,6 +96,7 @@ static const struct {
|
|||
* @smd: handle to qcom_smd
|
||||
* @of_node: of_node handle for information related to this edge
|
||||
* @edge_id: identifier of this edge
|
||||
* @remote_pid: identifier of remote processor
|
||||
* @irq: interrupt for signals on this edge
|
||||
* @ipc_regmap: regmap handle holding the outgoing ipc register
|
||||
* @ipc_offset: offset within @ipc_regmap of the register for ipc
|
||||
|
|
@ -111,6 +112,7 @@ struct qcom_smd_edge {
|
|||
struct qcom_smd *smd;
|
||||
struct device_node *of_node;
|
||||
unsigned edge_id;
|
||||
unsigned remote_pid;
|
||||
|
||||
int irq;
|
||||
|
||||
|
|
@ -310,7 +312,7 @@ static void qcom_smd_channel_reset(struct qcom_smd_channel *channel)
|
|||
SET_TX_CHANNEL_INFO(channel, fHEAD, 0);
|
||||
SET_TX_CHANNEL_INFO(channel, fTAIL, 0);
|
||||
SET_TX_CHANNEL_INFO(channel, fSTATE, 1);
|
||||
SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0);
|
||||
SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1);
|
||||
SET_TX_CHANNEL_INFO(channel, head, 0);
|
||||
SET_TX_CHANNEL_INFO(channel, tail, 0);
|
||||
|
||||
|
|
@ -572,7 +574,7 @@ static irqreturn_t qcom_smd_edge_intr(int irq, void *data)
|
|||
* have to scan if the amount of available space in smem have changed
|
||||
* since last scan.
|
||||
*/
|
||||
available = qcom_smem_get_free_space(edge->edge_id);
|
||||
available = qcom_smem_get_free_space(edge->remote_pid);
|
||||
if (available != edge->smem_available) {
|
||||
edge->smem_available = available;
|
||||
edge->need_rescan = true;
|
||||
|
|
@ -681,7 +683,7 @@ int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len)
|
|||
goto out;
|
||||
}
|
||||
|
||||
SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1);
|
||||
SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0);
|
||||
|
||||
ret = wait_event_interruptible(channel->fblockread_event,
|
||||
qcom_smd_get_tx_avail(channel) >= tlen ||
|
||||
|
|
@ -689,7 +691,7 @@ int qcom_smd_send(struct qcom_smd_channel *channel, const void *data, int len)
|
|||
if (ret)
|
||||
goto out;
|
||||
|
||||
SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 0);
|
||||
SET_TX_CHANNEL_INFO(channel, fBLOCKREADINTR, 1);
|
||||
}
|
||||
|
||||
SET_TX_CHANNEL_INFO(channel, fTAIL, 0);
|
||||
|
|
@ -976,7 +978,8 @@ static struct qcom_smd_channel *qcom_smd_create_channel(struct qcom_smd_edge *ed
|
|||
spin_lock_init(&channel->recv_lock);
|
||||
init_waitqueue_head(&channel->fblockread_event);
|
||||
|
||||
ret = qcom_smem_get(edge->edge_id, smem_info_item, (void **)&info, &info_size);
|
||||
ret = qcom_smem_get(edge->remote_pid, smem_info_item, (void **)&info,
|
||||
&info_size);
|
||||
if (ret)
|
||||
goto free_name_and_channel;
|
||||
|
||||
|
|
@ -997,7 +1000,8 @@ static struct qcom_smd_channel *qcom_smd_create_channel(struct qcom_smd_edge *ed
|
|||
goto free_name_and_channel;
|
||||
}
|
||||
|
||||
ret = qcom_smem_get(edge->edge_id, smem_fifo_item, &fifo_base, &fifo_size);
|
||||
ret = qcom_smem_get(edge->remote_pid, smem_fifo_item, &fifo_base,
|
||||
&fifo_size);
|
||||
if (ret)
|
||||
goto free_name_and_channel;
|
||||
|
||||
|
|
@ -1041,7 +1045,7 @@ static void qcom_discover_channels(struct qcom_smd_edge *edge)
|
|||
int i;
|
||||
|
||||
for (tbl = 0; tbl < SMD_ALLOC_TBL_COUNT; tbl++) {
|
||||
ret = qcom_smem_get(edge->edge_id,
|
||||
ret = qcom_smem_get(edge->remote_pid,
|
||||
smem_items[tbl].alloc_tbl_id,
|
||||
(void **)&alloc_tbl,
|
||||
NULL);
|
||||
|
|
@ -1184,6 +1188,10 @@ static int qcom_smd_parse_edge(struct device *dev,
|
|||
return -EINVAL;
|
||||
}
|
||||
|
||||
edge->remote_pid = QCOM_SMEM_HOST_ANY;
|
||||
key = "qcom,remote-pid";
|
||||
of_property_read_u32(node, key, &edge->remote_pid);
|
||||
|
||||
syscon_np = of_parse_phandle(node, "qcom,ipc", 0);
|
||||
if (!syscon_np) {
|
||||
dev_err(dev, "no qcom,ipc node\n");
|
||||
|
|
|
|||
|
|
@ -258,10 +258,6 @@ static int qcom_smem_alloc_private(struct qcom_smem *smem,
|
|||
size_t alloc_size;
|
||||
void *p;
|
||||
|
||||
/* We're not going to find it if there's no matching partition */
|
||||
if (host >= SMEM_HOST_COUNT || !smem->partitions[host])
|
||||
return -ENOENT;
|
||||
|
||||
phdr = smem->partitions[host];
|
||||
|
||||
p = (void *)phdr + sizeof(*phdr);
|
||||
|
|
@ -371,8 +367,9 @@ int qcom_smem_alloc(unsigned host, unsigned item, size_t size)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = qcom_smem_alloc_private(__smem, host, item, size);
|
||||
if (ret == -ENOENT)
|
||||
if (host < SMEM_HOST_COUNT && __smem->partitions[host])
|
||||
ret = qcom_smem_alloc_private(__smem, host, item, size);
|
||||
else
|
||||
ret = qcom_smem_alloc_global(__smem, item, size);
|
||||
|
||||
hwspin_unlock_irqrestore(__smem->hwlock, &flags);
|
||||
|
|
@ -428,10 +425,6 @@ static int qcom_smem_get_private(struct qcom_smem *smem,
|
|||
struct smem_private_entry *hdr;
|
||||
void *p;
|
||||
|
||||
/* We're not going to find it if there's no matching partition */
|
||||
if (host >= SMEM_HOST_COUNT || !smem->partitions[host])
|
||||
return -ENOENT;
|
||||
|
||||
phdr = smem->partitions[host];
|
||||
|
||||
p = (void *)phdr + sizeof(*phdr);
|
||||
|
|
@ -484,8 +477,9 @@ int qcom_smem_get(unsigned host, unsigned item, void **ptr, size_t *size)
|
|||
if (ret)
|
||||
return ret;
|
||||
|
||||
ret = qcom_smem_get_private(__smem, host, item, ptr, size);
|
||||
if (ret == -ENOENT)
|
||||
if (host < SMEM_HOST_COUNT && __smem->partitions[host])
|
||||
ret = qcom_smem_get_private(__smem, host, item, ptr, size);
|
||||
else
|
||||
ret = qcom_smem_get_global(__smem, item, ptr, size);
|
||||
|
||||
hwspin_unlock_irqrestore(__smem->hwlock, &flags);
|
||||
|
|
|
|||
Loading…
Reference in a new issue