hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from old_mmio
commite2a176dfda32f5cf80703c2921a19fe75850c38c
authorPeter Maydell <peter.maydell@linaro.org>
Mon, 16 Nov 2015 14:57:50 +0000 (16 14:57 +0000)
committerDavid Gibson <david@gibson.dropbear.id.au>
Mon, 30 Nov 2015 08:39:00 +0000 (30 19:39 +1100)
treecb5dc1dcbe08b81b9a91e373914ddf17f30f5cc4
parent9b7a70e63e7b59f2444aff9399f9b482f55b8f9e
hw/ppc/ppc405_boards: Fix infinite recursion by converting taihu_cpld from old_mmio

The taihu_cpld_writel() function had an obvious typo that meant that
if it was ever called it would go into an infinite recursion. Newer
versions of clang will detect and warn about this:
  hw/ppc/ppc405_boards.c:481:1: warning: all paths through this function will call itself [-Winfinite-recursion]

Fix this by converting taihu_cpld from the legacy old_mmio accessors
to new-style ones, with an impl {} declaration to cause the core
memory code to do the splitting of 16 bit and 32 bit accesses into
multiple 8-bit accesses.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
hw/ppc/ppc405_boards.c