openpic: symbolicize some magic numbers
authorScott Wood <scottwood@freescale.com>
Thu, 13 Dec 2012 16:11:59 +0000 (16:11 +0000)
committerAlexander Graf <agraf@suse.de>
Mon, 7 Jan 2013 16:37:08 +0000 (17:37 +0100)
commit71c6cacb241689bbf99d54467dc2ae6912ffdab9
treeb3bc48cbe24745c7d7a26c83b61d688d28cea019
parent8e4a424b305e29dc0e454f52df3b35577f342975
openpic: symbolicize some magic numbers

Deefine symbolic names for some register bits, and use some that
have already been defined.

Also convert some register values from hex to decimal when it improves
readability.

IPVP_PRIORITY_MASK is corrected from (0x1F << 16) to (0xF << 16), in
conjunction with making wider use of the symbolic name.  I looked at
Freescale and IBM MPIC docs and at the base OpenPIC spec, and all three
had priority as 4 bits rather than 5.  Plus, the magic nubmer that is
being replaced with symbolic values treated the field as 4 bits wide.

Signed-off-by: Scott Wood <scottwood@freescale.com>
Signed-off-by: Alexander Graf <agraf@suse.de>
hw/openpic.c