Commit cb8278cd authored by Peter Maydell's avatar Peter Maydell
Browse files

Merge remote-tracking branch 'remotes/pmaydell/tags/pull-target-arm-20200616' into staging



 * hw: arm: Set vendor property for IMX SDHCI emulations
 * sd: sdhci: Implement basic vendor specific register support
 * hw/net/imx_fec: Convert debug fprintf() to trace events
 * target/arm/cpu: adjust virtual time for all KVM arm cpus
 * Implement configurable descriptor size in ftgmac100
 * hw/misc/imx6ul_ccm: Implement non writable bits in CCM registers
 * target/arm: More Neon decodetree conversion work

# gpg: Signature made Tue 16 Jun 2020 10:56:10 BST
# gpg:                using RSA key E1A5C593CD419DE28E8315CF3C2525ED14360CDE
# gpg:                issuer "peter.maydell@linaro.org"
# gpg: Good signature from "Peter Maydell <peter.maydell@linaro.org>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@gmail.com>" [ultimate]
# gpg:                 aka "Peter Maydell <pmaydell@chiark.greenend.org.uk>" [ultimate]
# Primary key fingerprint: E1A5 C593 CD41 9DE2 8E83  15CF 3C25 25ED 1436 0CDE

* remotes/pmaydell/tags/pull-target-arm-20200616: (23 commits)
  hw: arm: Set vendor property for IMX SDHCI emulations
  sd: sdhci: Implement basic vendor specific register support
  hw/net/imx_fec: Convert debug fprintf() to trace events
  target/arm/cpu: adjust virtual time for all KVM arm cpus
  Implement configurable descriptor size in ftgmac100
  hw/misc/imx6ul_ccm: Implement non writable bits in CCM registers
  target/arm: Convert Neon VDUP (scalar) to decodetree
  target/arm: Convert Neon VTBL, VTBX to decodetree
  target/arm: Convert Neon VEXT to decodetree
  target/arm: Convert Neon 2-reg-scalar long multiplies to decodetree
  target/arm: Convert Neon 2-reg-scalar VQRDMLAH, VQRDMLSH to decodetree
  target/arm: Convert Neon 2-reg-scalar VQDMULH, VQRDMULH to decodetree
  target/arm: Convert Neon 2-reg-scalar float multiplies to decodetree
  target/arm: Convert Neon 2-reg-scalar integer multiplies to decodetree
  target/arm: Add missing TCG temp free in do_2shift_env_64()
  target/arm: Add 'static' and 'const' annotations to VSHLL function arrays
  target/arm: Convert Neon 3-reg-diff polynomial VMULL
  target/arm: Convert Neon 3-reg-diff saturating doubling multiplies
  target/arm: Convert Neon 3-reg-diff long multiplies
  target/arm: Convert Neon 3-reg-diff VABAL, VABDL to decodetree
  ...

Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>

# Conflicts:
#	hw/arm/fsl-imx25.c
#	hw/arm/fsl-imx6.c
#	hw/arm/fsl-imx6ul.c
#	hw/arm/fsl-imx7.c
parents 6675a653 64b39741
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -263,6 +263,12 @@ static void fsl_imx25_realize(DeviceState *dev, Error **errp)
                                 &err);
        object_property_set_uint(OBJECT(&s->esdhc[i]), IMX25_ESDHC_CAPABILITIES,
                                 "capareg", &err);
        object_property_set_uint(OBJECT(&s->esdhc[i]), SDHCI_VENDOR_IMX,
                                 "vendor", &err);
        if (err) {
            error_propagate(errp, err);
            return;
        }
        sysbus_realize(SYS_BUS_DEVICE(&s->esdhc[i]), &err);
        if (err) {
            error_propagate(errp, err);
+6 −0
Original line number Diff line number Diff line
@@ -339,6 +339,12 @@ static void fsl_imx6_realize(DeviceState *dev, Error **errp)
                                 &err);
        object_property_set_uint(OBJECT(&s->esdhc[i]), IMX6_ESDHC_CAPABILITIES,
                                 "capareg", &err);
        object_property_set_uint(OBJECT(&s->esdhc[i]), SDHCI_VENDOR_IMX,
                                 "vendor", &err);
        if (err) {
            error_propagate(errp, err);
            return;
        }
        sysbus_realize(SYS_BUS_DEVICE(&s->esdhc[i]), &err);
        if (err) {
            error_propagate(errp, err);
+2 −0
Original line number Diff line number Diff line
@@ -479,6 +479,8 @@ static void fsl_imx6ul_realize(DeviceState *dev, Error **errp)
            FSL_IMX6UL_USDHC2_IRQ,
        };

        object_property_set_uint(OBJECT(&s->usdhc[i]), SDHCI_VENDOR_IMX,
                                        "vendor", &error_abort);
        sysbus_realize(SYS_BUS_DEVICE(&s->usdhc[i]), &error_abort);

        sysbus_mmio_map(SYS_BUS_DEVICE(&s->usdhc[i]), 0,
+2 −0
Original line number Diff line number Diff line
@@ -393,6 +393,8 @@ static void fsl_imx7_realize(DeviceState *dev, Error **errp)
            FSL_IMX7_USDHC3_IRQ,
        };

        object_property_set_uint(OBJECT(&s->usdhc[i]), SDHCI_VENDOR_IMX,
                                 "vendor", &error_abort);
        sysbus_realize(SYS_BUS_DEVICE(&s->usdhc[i]), &error_abort);

        sysbus_mmio_map(SYS_BUS_DEVICE(&s->usdhc[i]), 0,
+63 −13
Original line number Diff line number Diff line
@@ -19,6 +19,62 @@

#include "trace.h"

static const uint32_t ccm_mask[CCM_MAX] = {
    [CCM_CCR] = 0xf01fef80,
    [CCM_CCDR] = 0xfffeffff,
    [CCM_CSR] = 0xffffffff,
    [CCM_CCSR] = 0xfffffef2,
    [CCM_CACRR] = 0xfffffff8,
    [CCM_CBCDR] = 0xc1f8e000,
    [CCM_CBCMR] = 0xfc03cfff,
    [CCM_CSCMR1] = 0x80700000,
    [CCM_CSCMR2] = 0xe01ff003,
    [CCM_CSCDR1] = 0xfe00c780,
    [CCM_CS1CDR] = 0xfe00fe00,
    [CCM_CS2CDR] = 0xf8007000,
    [CCM_CDCDR] = 0xf00fffff,
    [CCM_CHSCCDR] = 0xfffc01ff,
    [CCM_CSCDR2] = 0xfe0001ff,
    [CCM_CSCDR3] = 0xffffc1ff,
    [CCM_CDHIPR] = 0xffffffff,
    [CCM_CTOR] = 0x00000000,
    [CCM_CLPCR] = 0xf39ff01c,
    [CCM_CISR] = 0xfb85ffbe,
    [CCM_CIMR] = 0xfb85ffbf,
    [CCM_CCOSR] = 0xfe00fe00,
    [CCM_CGPR] = 0xfffc3fea,
    [CCM_CCGR0] = 0x00000000,
    [CCM_CCGR1] = 0x00000000,
    [CCM_CCGR2] = 0x00000000,
    [CCM_CCGR3] = 0x00000000,
    [CCM_CCGR4] = 0x00000000,
    [CCM_CCGR5] = 0x00000000,
    [CCM_CCGR6] = 0x00000000,
    [CCM_CMEOR] = 0xafffff1f,
};

static const uint32_t analog_mask[CCM_ANALOG_MAX] = {
    [CCM_ANALOG_PLL_ARM] = 0xfff60f80,
    [CCM_ANALOG_PLL_USB1] = 0xfffe0fbc,
    [CCM_ANALOG_PLL_USB2] = 0xfffe0fbc,
    [CCM_ANALOG_PLL_SYS] = 0xfffa0ffe,
    [CCM_ANALOG_PLL_SYS_SS] = 0x00000000,
    [CCM_ANALOG_PLL_SYS_NUM] = 0xc0000000,
    [CCM_ANALOG_PLL_SYS_DENOM] = 0xc0000000,
    [CCM_ANALOG_PLL_AUDIO] = 0xffe20f80,
    [CCM_ANALOG_PLL_AUDIO_NUM] = 0xc0000000,
    [CCM_ANALOG_PLL_AUDIO_DENOM] = 0xc0000000,
    [CCM_ANALOG_PLL_VIDEO] = 0xffe20f80,
    [CCM_ANALOG_PLL_VIDEO_NUM] = 0xc0000000,
    [CCM_ANALOG_PLL_VIDEO_DENOM] = 0xc0000000,
    [CCM_ANALOG_PLL_ENET] = 0xffc20ff0,
    [CCM_ANALOG_PFD_480] = 0x40404040,
    [CCM_ANALOG_PFD_528] = 0x40404040,
    [PMU_MISC0] = 0x01fe8306,
    [PMU_MISC1] = 0x07fcede0,
    [PMU_MISC2] = 0x005f5f5f,
};

static const char *imx6ul_ccm_reg_name(uint32_t reg)
{
    static char unknown[20];
@@ -596,11 +652,8 @@ static void imx6ul_ccm_write(void *opaque, hwaddr offset, uint64_t value,

    trace_ccm_write_reg(imx6ul_ccm_reg_name(index), (uint32_t)value);

    /*
     * We will do a better implementation later. In particular some bits
     * cannot be written to.
     */
    s->ccm[index] = (uint32_t)value;
    s->ccm[index] = (s->ccm[index] & ccm_mask[index]) |
                           ((uint32_t)value & ~ccm_mask[index]);
}

static uint64_t imx6ul_analog_read(void *opaque, hwaddr offset, unsigned size)
@@ -737,7 +790,7 @@ static void imx6ul_analog_write(void *opaque, hwaddr offset, uint64_t value,
         * the REG_NAME register. So we change the value of the
         * REG_NAME register, setting bits passed in the value.
         */
        s->analog[index - 1] |= value;
        s->analog[index - 1] |= (value & ~analog_mask[index - 1]);
        break;
    case CCM_ANALOG_PLL_ARM_CLR:
    case CCM_ANALOG_PLL_USB1_CLR:
@@ -762,7 +815,7 @@ static void imx6ul_analog_write(void *opaque, hwaddr offset, uint64_t value,
         * the REG_NAME register. So we change the value of the
         * REG_NAME register, unsetting bits passed in the value.
         */
        s->analog[index - 2] &= ~value;
        s->analog[index - 2] &= ~(value & ~analog_mask[index - 2]);
        break;
    case CCM_ANALOG_PLL_ARM_TOG:
    case CCM_ANALOG_PLL_USB1_TOG:
@@ -787,14 +840,11 @@ static void imx6ul_analog_write(void *opaque, hwaddr offset, uint64_t value,
         * the REG_NAME register. So we change the value of the
         * REG_NAME register, toggling bits passed in the value.
         */
        s->analog[index - 3] ^= value;
        s->analog[index - 3] ^= (value & ~analog_mask[index - 3]);
        break;
    default:
        /*
         * We will do a better implementation later. In particular some bits
         * cannot be written to.
         */
        s->analog[index] = value;
        s->analog[index] = (s->analog[index] & analog_mask[index]) |
                           (value & ~analog_mask[index]);
        break;
    }
}
Loading