bcm2835_fb: use {get, set}_uint() for "vcram-size" and "vcram-base"
Both properties are defined with DEFINE_PROP_UINT32(). Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20170607163635.17635-26-marcandre.lureau@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
This commit is contained in:
		
							parent
							
								
									19e9cdf040
								
							
						
					
					
						commit
						c5c6c47ce3
					
				@ -125,7 +125,7 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp)
 | 
				
			|||||||
    Object *obj;
 | 
					    Object *obj;
 | 
				
			||||||
    MemoryRegion *ram;
 | 
					    MemoryRegion *ram;
 | 
				
			||||||
    Error *err = NULL;
 | 
					    Error *err = NULL;
 | 
				
			||||||
    uint32_t ram_size, vcram_size;
 | 
					    uint64_t ram_size, vcram_size;
 | 
				
			||||||
    int n;
 | 
					    int n;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    obj = object_property_get_link(OBJECT(dev), "ram", &err);
 | 
					    obj = object_property_get_link(OBJECT(dev), "ram", &err);
 | 
				
			||||||
@ -207,15 +207,14 @@ static void bcm2835_peripherals_realize(DeviceState *dev, Error **errp)
 | 
				
			|||||||
                               INTERRUPT_ARM_MAILBOX));
 | 
					                               INTERRUPT_ARM_MAILBOX));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    /* Framebuffer */
 | 
					    /* Framebuffer */
 | 
				
			||||||
    vcram_size = (uint32_t)object_property_get_int(OBJECT(s), "vcram-size",
 | 
					    vcram_size = object_property_get_uint(OBJECT(s), "vcram-size", &err);
 | 
				
			||||||
                                                   &err);
 | 
					 | 
				
			||||||
    if (err) {
 | 
					    if (err) {
 | 
				
			||||||
        error_propagate(errp, err);
 | 
					        error_propagate(errp, err);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    object_property_set_int(OBJECT(&s->fb), ram_size - vcram_size,
 | 
					    object_property_set_uint(OBJECT(&s->fb), ram_size - vcram_size,
 | 
				
			||||||
                            "vcram-base", &err);
 | 
					                             "vcram-base", &err);
 | 
				
			||||||
    if (err) {
 | 
					    if (err) {
 | 
				
			||||||
        error_propagate(errp, err);
 | 
					        error_propagate(errp, err);
 | 
				
			||||||
        return;
 | 
					        return;
 | 
				
			||||||
 | 
				
			|||||||
@ -153,8 +153,8 @@ static void raspi2_init(MachineState *machine)
 | 
				
			|||||||
    qdev_prop_set_drive(carddev, "drive", blk, &error_fatal);
 | 
					    qdev_prop_set_drive(carddev, "drive", blk, &error_fatal);
 | 
				
			||||||
    object_property_set_bool(OBJECT(carddev), true, "realized", &error_fatal);
 | 
					    object_property_set_bool(OBJECT(carddev), true, "realized", &error_fatal);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    vcram_size = object_property_get_int(OBJECT(&s->soc), "vcram-size",
 | 
					    vcram_size = object_property_get_uint(OBJECT(&s->soc), "vcram-size",
 | 
				
			||||||
                                         &error_abort);
 | 
					                                          &error_abort);
 | 
				
			||||||
    setup_boot(machine, 2, machine->ram_size - vcram_size);
 | 
					    setup_boot(machine, 2, machine->ram_size - vcram_size);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user