pl110: Rename pl110_version enum values
The PL110 enum value name will conflict with the PL110 type cast checker, when we replace the existing macro with an inline function. Add a VERSION_ prefix to all pl110_version enum values, to avoid conflicts. Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com> Tested-By: Roman Bolshakov <r.bolshakov@yadro.com> Message-Id: <20200825192110.3528606-5-ehabkost@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
This commit is contained in:
parent
bd7dff9460
commit
c7bf34922d
@ -42,9 +42,9 @@ enum pl110_bppmode
|
|||||||
/* The Versatile/PB uses a slightly modified PL110 controller. */
|
/* The Versatile/PB uses a slightly modified PL110 controller. */
|
||||||
enum pl110_version
|
enum pl110_version
|
||||||
{
|
{
|
||||||
PL110,
|
VERSION_PL110,
|
||||||
PL110_VERSATILE,
|
VERSION_PL110_VERSATILE,
|
||||||
PL111
|
VERSION_PL111
|
||||||
};
|
};
|
||||||
|
|
||||||
#define TYPE_PL110 "pl110"
|
#define TYPE_PL110 "pl110"
|
||||||
@ -189,7 +189,7 @@ static void pl110_update_display(void *opaque)
|
|||||||
else
|
else
|
||||||
bpp_offset = 24;
|
bpp_offset = 24;
|
||||||
|
|
||||||
if ((s->version != PL111) && (s->bpp == BPP_16)) {
|
if ((s->version != VERSION_PL111) && (s->bpp == BPP_16)) {
|
||||||
/* The PL110's native 16 bit mode is 5551; however
|
/* The PL110's native 16 bit mode is 5551; however
|
||||||
* most boards with a PL110 implement an external
|
* most boards with a PL110 implement an external
|
||||||
* mux which allows bits to be reshuffled to give
|
* mux which allows bits to be reshuffled to give
|
||||||
@ -372,12 +372,12 @@ static uint64_t pl110_read(void *opaque, hwaddr offset,
|
|||||||
case 5: /* LCDLPBASE */
|
case 5: /* LCDLPBASE */
|
||||||
return s->lpbase;
|
return s->lpbase;
|
||||||
case 6: /* LCDIMSC */
|
case 6: /* LCDIMSC */
|
||||||
if (s->version != PL110) {
|
if (s->version != VERSION_PL110) {
|
||||||
return s->cr;
|
return s->cr;
|
||||||
}
|
}
|
||||||
return s->int_mask;
|
return s->int_mask;
|
||||||
case 7: /* LCDControl */
|
case 7: /* LCDControl */
|
||||||
if (s->version != PL110) {
|
if (s->version != VERSION_PL110) {
|
||||||
return s->int_mask;
|
return s->int_mask;
|
||||||
}
|
}
|
||||||
return s->cr;
|
return s->cr;
|
||||||
@ -437,7 +437,7 @@ static void pl110_write(void *opaque, hwaddr offset,
|
|||||||
s->lpbase = val;
|
s->lpbase = val;
|
||||||
break;
|
break;
|
||||||
case 6: /* LCDIMSC */
|
case 6: /* LCDIMSC */
|
||||||
if (s->version != PL110) {
|
if (s->version != VERSION_PL110) {
|
||||||
goto control;
|
goto control;
|
||||||
}
|
}
|
||||||
imsc:
|
imsc:
|
||||||
@ -445,7 +445,7 @@ static void pl110_write(void *opaque, hwaddr offset,
|
|||||||
pl110_update(s);
|
pl110_update(s);
|
||||||
break;
|
break;
|
||||||
case 7: /* LCDControl */
|
case 7: /* LCDControl */
|
||||||
if (s->version != PL110) {
|
if (s->version != VERSION_PL110) {
|
||||||
goto imsc;
|
goto imsc;
|
||||||
}
|
}
|
||||||
control:
|
control:
|
||||||
@ -513,21 +513,21 @@ static void pl110_init(Object *obj)
|
|||||||
{
|
{
|
||||||
PL110State *s = PL110(obj);
|
PL110State *s = PL110(obj);
|
||||||
|
|
||||||
s->version = PL110;
|
s->version = VERSION_PL110;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pl110_versatile_init(Object *obj)
|
static void pl110_versatile_init(Object *obj)
|
||||||
{
|
{
|
||||||
PL110State *s = PL110(obj);
|
PL110State *s = PL110(obj);
|
||||||
|
|
||||||
s->version = PL110_VERSATILE;
|
s->version = VERSION_PL110_VERSATILE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pl111_init(Object *obj)
|
static void pl111_init(Object *obj)
|
||||||
{
|
{
|
||||||
PL110State *s = PL110(obj);
|
PL110State *s = PL110(obj);
|
||||||
|
|
||||||
s->version = PL111;
|
s->version = VERSION_PL111;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void pl110_class_init(ObjectClass *klass, void *data)
|
static void pl110_class_init(ObjectClass *klass, void *data)
|
||||||
|
Loading…
Reference in New Issue
Block a user