]> xenbits.xensource.com Git - qemu-xen.git/commitdiff
hw/arm/pxa2xx: Set value default values for CCCR and CKEN on PXA255
authorGuenter Roeck <linux@roeck-us.net>
Fri, 28 Oct 2016 13:12:31 +0000 (14:12 +0100)
committerPeter Maydell <peter.maydell@linaro.org>
Fri, 28 Oct 2016 14:51:27 +0000 (15:51 +0100)
The code used default values for PXA270 to configure CCCR. For PXA255,
the resulting register value is invalid (unsupported) and resulted
in a division by zero in the Linux kernel. Use default values from
datasheet instead.

Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Message-id: 1477361273-18888-1-git-send-email-linux@roeck-us.net
[PMM: fixed tabs-vs-spaces nit]
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
hw/arm/pxa2xx.c

index 42cdde0478fbca7c12581e58ca67d5e2f0aa35e0..21ea1d6210645deb324a62b582dc50f947d9810d 100644 (file)
@@ -2267,7 +2267,9 @@ PXA2xxState *pxa255_init(MemoryRegion *address_space, unsigned int sdram_size)
                     qdev_get_gpio_in(s->pic, PXA2XX_PIC_LCD));
 
     s->cm_base = 0x41300000;
-    s->cm_regs[CCCR >> 2] = 0x02000210;        /* 416.0 MHz */
+    s->cm_regs[CCCR >> 2] = 0x00000121;         /* from datasheet */
+    s->cm_regs[CKEN >> 2] = 0x00017def;         /* from datasheet */
+
     s->clkcfg = 0x00000009;            /* Turbo mode active */
     memory_region_init_io(&s->cm_iomem, NULL, &pxa2xx_cm_ops, s, "pxa2xx-cm", 0x1000);
     memory_region_add_subregion(address_space, s->cm_base, &s->cm_iomem);