soc: qcom: smem: Ensure ordering of the allocated entry

The remote cpus might not use locking when looking for smem entries, so
it's important that the header is fully prepared before we mark it as
allocated.

Also, we can drop the wmb() right before we unlock the hwspinlock as
this contains a memory barrier.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
Merge branch 'drivers/qcom-smem'
gpio: qcom-smp2p: Qualcomm Shared Memory Point to Point

Introduce the Qualcomm Shard Memory Point to Point driver, exposing bits
from the SMP2P protocol as GPIOs to the system.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
gpio: qcom-smp2p: Expose the bits to consumers

Implement a interrupt-controller and gpio-chip for the purpose of
exposing the bits to consumers with interesst in these.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
gpio: qcom-smp2p: Support interrupt flags

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>
gpio: qcom-smp2p: Simplify driver and clean up error handling

The downstream version only supports version 1, so we don't need to be
fancy about things. Simplify the structure of the smem data and clean up
the usage.

Also add error handling that roll back the gpiochips and irq domains
created during probe.

Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com>