From 55e00a19b6dc8f20e5688866451bb4a60e649459 Mon Sep 17 00:00:00 2001 From: Peter Maydell Date: Mon, 13 Aug 2012 11:04:05 +0100 Subject: hw/armv7m_nvic: Fix incorrect default for num-irqs property Fix an incorrect default value for the num-irqs property (we were attempting to override it from the default set by the parent class but not succeeding, which meant that the lm3s6965evb model would assert on startup attempting to wire up nonexistent irq lines). Instead of trying to override the parent's Property array, we define an instance_init function which runs after default setup but before user property setting and can just fix up the default value in the gic_state struct. Reported-by: Peter Crosthwaite Tested-by: Peter Crosthwaite Signed-off-by: Peter Maydell --- hw/armv7m_nvic.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/hw/armv7m_nvic.c b/hw/armv7m_nvic.c index 4867c1d5fa..6a0832eb3f 100644 --- a/hw/armv7m_nvic.c +++ b/hw/armv7m_nvic.c @@ -467,7 +467,7 @@ static int armv7m_nvic_init(SysBusDevice *dev) s->gic.num_cpu = 1; /* Tell the common code we're an NVIC */ s->gic.revision = 0xffffffff; - s->gic.num_irq = s->num_irq; + s->num_irq = s->gic.num_irq; nc->parent_init(dev); gic_init_irqs_and_distributor(&s->gic, s->num_irq); /* The NVIC and system controller register area looks like this: @@ -498,14 +498,21 @@ static int armv7m_nvic_init(SysBusDevice *dev) return 0; } -static Property armv7m_nvic_properties[] = { +static void armv7m_nvic_instance_init(Object *obj) +{ + /* We have a different default value for the num-irq property + * than our superclass. This function runs after qdev init + * has set the defaults from the Property array and before + * any user-specified property setting, so just modify the + * value in the gic_state struct. + */ + gic_state *s = ARM_GIC_COMMON(obj); /* The ARM v7m may have anything from 0 to 496 external interrupt * IRQ lines. We default to 64. Other boards may differ and should - * set this property appropriately. + * set the num-irq property appropriately. */ - DEFINE_PROP_UINT32("num-irq", nvic_state, num_irq, 64), - DEFINE_PROP_END_OF_LIST(), -}; + s->num_irq = 64; +} static void armv7m_nvic_class_init(ObjectClass *klass, void *data) { @@ -518,12 +525,12 @@ static void armv7m_nvic_class_init(ObjectClass *klass, void *data) sdc->init = armv7m_nvic_init; dc->vmsd = &vmstate_nvic; dc->reset = armv7m_nvic_reset; - dc->props = armv7m_nvic_properties; } static TypeInfo armv7m_nvic_info = { .name = TYPE_NVIC, .parent = TYPE_ARM_GIC_COMMON, + .instance_init = armv7m_nvic_instance_init, .instance_size = sizeof(nvic_state), .class_init = armv7m_nvic_class_init, .class_size = sizeof(NVICClass), -- cgit v1.2.3 From 01fd41ab3fb69971c24a69ed49cde96086d81278 Mon Sep 17 00:00:00 2001 From: "Peter A. G. Crosthwaite" Date: Mon, 13 Aug 2012 11:04:05 +0100 Subject: armv7m: Guard against no -kernel argument A -kernel argument must be specified for this machine. Guard against no -kernel argument. Previously gave an unhelpful "bad address" error message. Signed-off-by: Peter A. G. Crosthwaite Tested-by: Markus Armbruster Signed-off-by: Peter Maydell --- hw/armv7m.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hw/armv7m.c b/hw/armv7m.c index 8cec78db96..9f66667c6d 100644 --- a/hw/armv7m.c +++ b/hw/armv7m.c @@ -227,6 +227,11 @@ qemu_irq *armv7m_init(MemoryRegion *address_space_mem, big_endian = 0; #endif + if (!kernel_filename) { + fprintf(stderr, "Guest image must be specified (using -kernel)\n"); + exit(1); + } + image_size = load_elf(kernel_filename, NULL, NULL, &entry, &lowaddr, NULL, big_endian, ELF_MACHINE, 1); if (image_size < 0) { -- cgit v1.2.3 From a9c0183059d6a4e4d940cd86ac0f9402b0655d24 Mon Sep 17 00:00:00 2001 From: Mitsyanko Igor Date: Mon, 13 Aug 2012 11:04:06 +0100 Subject: hw/sd.c: convert wp_groups in SDState to bitfield Representing each group write protection flag with only one bit instead of int variable significantly reduces memory consumption. Signed-off-by: Igor Mitsyanko Signed-off-by: Peter Maydell --- hw/sd.c | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index 07eb263388..575b509bde 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -32,6 +32,7 @@ #include "hw.h" #include "block.h" #include "sd.h" +#include "bitmap.h" //#define DEBUG_SD 1 @@ -81,7 +82,7 @@ struct SDState { uint8_t sd_status[64]; uint32_t vhs; int wp_switch; - int *wp_groups; + unsigned long *wp_groups; uint64_t size; int blk_len; uint32_t erase_start; @@ -415,7 +416,7 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv) if (sd->wp_groups) g_free(sd->wp_groups); sd->wp_switch = bdrv ? bdrv_is_read_only(bdrv) : 0; - sd->wp_groups = (int *) g_malloc0(sizeof(int) * sect); + sd->wp_groups = bitmap_new(sect); memset(sd->function_group, 0, sizeof(int) * 6); sd->erase_start = 0; sd->erase_end = 0; @@ -484,9 +485,11 @@ static void sd_erase(SDState *sd) sd->erase_end = 0; sd->csd[14] |= 0x40; - for (i = start; i <= end; i ++) - if (sd->wp_groups[i]) + for (i = start; i <= end; i++) { + if (test_bit(i, sd->wp_groups)) { sd->card_status |= WP_ERASE_SKIP; + } + } } static uint32_t sd_wpbits(SDState *sd, uint64_t addr) @@ -496,9 +499,11 @@ static uint32_t sd_wpbits(SDState *sd, uint64_t addr) wpnum = addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT); - for (i = 0; i < 32; i ++, wpnum ++, addr += WPGROUP_SIZE) - if (addr < sd->size && sd->wp_groups[wpnum]) + for (i = 0; i < 32; i++, wpnum++, addr += WPGROUP_SIZE) { + if (addr < sd->size && test_bit(wpnum, sd->wp_groups)) { ret |= (1 << i); + } + } return ret; } @@ -536,8 +541,8 @@ static void sd_function_switch(SDState *sd, uint32_t arg) static inline int sd_wp_addr(SDState *sd, uint32_t addr) { - return sd->wp_groups[addr >> - (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT)]; + return test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), + sd->wp_groups); } static void sd_lock_command(SDState *sd) @@ -560,8 +565,8 @@ static void sd_lock_command(SDState *sd) sd->card_status |= LOCK_UNLOCK_FAILED; return; } - memset(sd->wp_groups, 0, sizeof(int) * (sd->size >> - (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT))); + bitmap_zero(sd->wp_groups, + (sd->size >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT)) + 1); sd->csd[14] &= ~0x10; sd->card_status &= ~CARD_IS_LOCKED; sd->pwd_len = 0; @@ -1007,8 +1012,8 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, } sd->state = sd_programming_state; - sd->wp_groups[addr >> (HWBLOCK_SHIFT + - SECTOR_SHIFT + WPGROUP_SHIFT)] = 1; + set_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), + sd->wp_groups); /* Bzzzzzzztt .... Operation complete. */ sd->state = sd_transfer_state; return sd_r1b; @@ -1027,8 +1032,8 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, } sd->state = sd_programming_state; - sd->wp_groups[addr >> (HWBLOCK_SHIFT + - SECTOR_SHIFT + WPGROUP_SHIFT)] = 0; + clear_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), + sd->wp_groups); /* Bzzzzzzztt .... Operation complete. */ sd->state = sd_transfer_state; return sd_r1b; -- cgit v1.2.3 From 347cab1a762ff8542016f574c5eb32f0c4588ea2 Mon Sep 17 00:00:00 2001 From: Mitsyanko Igor Date: Mon, 13 Aug 2012 11:04:06 +0100 Subject: hw/sd.c: make sd_wp_addr() accept 64 bit address argument Currently sd_wp_addr() accepts 32 bit address arguments therefore implicitly restricting SD card address range. Change address argument type to uint64_t. Signed-off-by: Igor Mitsyanko Signed-off-by: Peter Maydell --- hw/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd.c b/hw/sd.c index 575b509bde..e24d04ae33 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -539,7 +539,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg) sd->data[66] = crc & 0xff; } -static inline int sd_wp_addr(SDState *sd, uint32_t addr) +static inline int sd_wp_addr(SDState *sd, uint64_t addr) { return test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), sd->wp_groups); -- cgit v1.2.3 From b7202b8870ebb8e9b0246361c96e129172738f82 Mon Sep 17 00:00:00 2001 From: Mitsyanko Igor Date: Mon, 13 Aug 2012 11:04:06 +0100 Subject: hw/sd.c: introduce wrapper for conversion address to wp group Add wrapper function sd_addr_to_wpnum() to replace long address-->wg_group conversion line. Signed-off-by: Igor Mitsyanko Signed-off-by: Peter Maydell --- hw/sd.c | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index e24d04ae33..d0674d5d39 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -388,6 +388,11 @@ static void sd_response_r7_make(SDState *sd, uint8_t *response) response[3] = (sd->vhs >> 0) & 0xff; } +static inline uint64_t sd_addr_to_wpnum(uint64_t addr) +{ + return addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT); +} + static void sd_reset(SDState *sd, BlockDriverState *bdrv) { uint64_t size; @@ -400,7 +405,7 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv) } size = sect << 9; - sect = (size >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT)) + 1; + sect = sd_addr_to_wpnum(size) + 1; sd->state = sd_idle_state; sd->rca = 0x0000; @@ -477,10 +482,8 @@ static void sd_erase(SDState *sd) return; } - start = sd->erase_start >> - (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT); - end = sd->erase_end >> - (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT); + start = sd_addr_to_wpnum(sd->erase_start); + end = sd_addr_to_wpnum(sd->erase_end); sd->erase_start = 0; sd->erase_end = 0; sd->csd[14] |= 0x40; @@ -497,7 +500,7 @@ static uint32_t sd_wpbits(SDState *sd, uint64_t addr) uint32_t i, wpnum; uint32_t ret = 0; - wpnum = addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT); + wpnum = sd_addr_to_wpnum(addr); for (i = 0; i < 32; i++, wpnum++, addr += WPGROUP_SIZE) { if (addr < sd->size && test_bit(wpnum, sd->wp_groups)) { @@ -541,8 +544,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg) static inline int sd_wp_addr(SDState *sd, uint64_t addr) { - return test_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), - sd->wp_groups); + return test_bit(sd_addr_to_wpnum(addr), sd->wp_groups); } static void sd_lock_command(SDState *sd) @@ -565,8 +567,7 @@ static void sd_lock_command(SDState *sd) sd->card_status |= LOCK_UNLOCK_FAILED; return; } - bitmap_zero(sd->wp_groups, - (sd->size >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT)) + 1); + bitmap_zero(sd->wp_groups, sd_addr_to_wpnum(sd->size) + 1); sd->csd[14] &= ~0x10; sd->card_status &= ~CARD_IS_LOCKED; sd->pwd_len = 0; @@ -1012,8 +1013,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, } sd->state = sd_programming_state; - set_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), - sd->wp_groups); + set_bit(sd_addr_to_wpnum(addr), sd->wp_groups); /* Bzzzzzzztt .... Operation complete. */ sd->state = sd_transfer_state; return sd_r1b; @@ -1032,8 +1032,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, } sd->state = sd_programming_state; - clear_bit(addr >> (HWBLOCK_SHIFT + SECTOR_SHIFT + WPGROUP_SHIFT), - sd->wp_groups); + clear_bit(sd_addr_to_wpnum(addr), sd->wp_groups); /* Bzzzzzzztt .... Operation complete. */ sd->state = sd_transfer_state; return sd_r1b; -- cgit v1.2.3 From bebd12717c76b251514098bb9682d0309642e565 Mon Sep 17 00:00:00 2001 From: Mitsyanko Igor Date: Mon, 13 Aug 2012 11:04:06 +0100 Subject: hw/sd.c: convert binary variables to bool Several members of SDState have type int when they actually are binary variables. Change type of these variables to bool to improve code readability. Change SD API to be in consistency with new variables type. Signed-off-by: Igor Mitsyanko Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/sd.c | 24 ++++++++++++------------ hw/sd.h | 4 ++-- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index d0674d5d39..ebc4e7c97f 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -81,7 +81,7 @@ struct SDState { uint32_t card_status; uint8_t sd_status[64]; uint32_t vhs; - int wp_switch; + bool wp_switch; unsigned long *wp_groups; uint64_t size; int blk_len; @@ -91,12 +91,12 @@ struct SDState { int pwd_len; int function_group[6]; - int spi; + bool spi; int current_cmd; /* True if we will handle the next command as an ACMD. Note that this does * *not* track the APP_CMD status bit! */ - int expecting_acmd; + bool expecting_acmd; int blk_written; uint64_t data_start; uint32_t data_offset; @@ -106,7 +106,7 @@ struct SDState { BlockDriverState *bdrv; uint8_t *buf; - int enable; + bool enable; }; static void sd_set_mode(SDState *sd) @@ -420,7 +420,7 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv) if (sd->wp_groups) g_free(sd->wp_groups); - sd->wp_switch = bdrv ? bdrv_is_read_only(bdrv) : 0; + sd->wp_switch = bdrv ? bdrv_is_read_only(bdrv) : false; sd->wp_groups = bitmap_new(sect); memset(sd->function_group, 0, sizeof(int) * 6); sd->erase_start = 0; @@ -428,7 +428,7 @@ static void sd_reset(SDState *sd, BlockDriverState *bdrv) sd->size = size; sd->blk_len = 0x200; sd->pwd_len = 0; - sd->expecting_acmd = 0; + sd->expecting_acmd = false; } static void sd_cardchange(void *opaque, bool load) @@ -450,14 +450,14 @@ static const BlockDevOps sd_block_ops = { whether card should be in SSI or MMC/SD mode. It is also up to the board to ensure that ssi transfers only occur when the chip select is asserted. */ -SDState *sd_init(BlockDriverState *bs, int is_spi) +SDState *sd_init(BlockDriverState *bs, bool is_spi) { SDState *sd; sd = (SDState *) g_malloc0(sizeof(SDState)); sd->buf = qemu_blockalign(bs, 512); sd->spi = is_spi; - sd->enable = 1; + sd->enable = true; sd_reset(sd, bs); if (sd->bdrv) { bdrv_attach_dev_nofail(sd->bdrv, sd); @@ -1129,7 +1129,7 @@ static sd_rsp_type_t sd_normal_command(SDState *sd, if (sd->rca != rca) return sd_r0; - sd->expecting_acmd = 1; + sd->expecting_acmd = true; sd->card_status |= APP_CMD; return sd_r1; @@ -1311,7 +1311,7 @@ int sd_do_command(SDState *sd, SDRequest *req, if (sd->card_status & CARD_IS_LOCKED) { if (!cmd_valid_while_locked(sd, req)) { sd->card_status |= ILLEGAL_COMMAND; - sd->expecting_acmd = 0; + sd->expecting_acmd = false; fprintf(stderr, "SD: Card is locked\n"); rtype = sd_illegal; goto send_response; @@ -1322,7 +1322,7 @@ int sd_do_command(SDState *sd, SDRequest *req, sd_set_mode(sd); if (sd->expecting_acmd) { - sd->expecting_acmd = 0; + sd->expecting_acmd = false; rtype = sd_app_command(sd, *req); } else { rtype = sd_normal_command(sd, *req); @@ -1708,7 +1708,7 @@ int sd_data_ready(SDState *sd) return sd->state == sd_sendingdata_state; } -void sd_enable(SDState *sd, int enable) +void sd_enable(SDState *sd, bool enable) { sd->enable = enable; } diff --git a/hw/sd.h b/hw/sd.h index ac4b7c4dfa..d25342f645 100644 --- a/hw/sd.h +++ b/hw/sd.h @@ -67,13 +67,13 @@ typedef struct { typedef struct SDState SDState; -SDState *sd_init(BlockDriverState *bs, int is_spi); +SDState *sd_init(BlockDriverState *bs, bool is_spi); int sd_do_command(SDState *sd, SDRequest *req, uint8_t *response); void sd_write_data(SDState *sd, uint8_t value); uint8_t sd_read_data(SDState *sd); void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert); int sd_data_ready(SDState *sd); -void sd_enable(SDState *sd, int enable); +void sd_enable(SDState *sd, bool enable); #endif /* __hw_sd_h */ -- cgit v1.2.3 From 879bf4a716410c9c7933dea5a5f3d3867734efb6 Mon Sep 17 00:00:00 2001 From: Mitsyanko Igor Date: Mon, 13 Aug 2012 11:04:07 +0100 Subject: hw/sd.c: make sd_dataready() return bool For the sake of code clarity Signed-off-by: Igor Mitsyanko Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/sd.c | 2 +- hw/sd.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/sd.c b/hw/sd.c index ebc4e7c97f..209bc1936c 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -1703,7 +1703,7 @@ uint8_t sd_read_data(SDState *sd) return ret; } -int sd_data_ready(SDState *sd) +bool sd_data_ready(SDState *sd) { return sd->state == sd_sendingdata_state; } diff --git a/hw/sd.h b/hw/sd.h index d25342f645..4eb9679acd 100644 --- a/hw/sd.h +++ b/hw/sd.h @@ -73,7 +73,7 @@ int sd_do_command(SDState *sd, SDRequest *req, void sd_write_data(SDState *sd, uint8_t value); uint8_t sd_read_data(SDState *sd); void sd_set_cb(SDState *sd, qemu_irq readonly, qemu_irq insert); -int sd_data_ready(SDState *sd); +bool sd_data_ready(SDState *sd); void sd_enable(SDState *sd, bool enable); #endif /* __hw_sd_h */ -- cgit v1.2.3 From 4e8f1be21287a101996c56fc2e22737692e2868d Mon Sep 17 00:00:00 2001 From: Mitsyanko Igor Date: Mon, 13 Aug 2012 11:04:07 +0100 Subject: hw/sd.c: make sd_wp_addr() return bool For the sake of code clarity Signed-off-by: Igor Mitsyanko Signed-off-by: Peter Maydell --- hw/sd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/sd.c b/hw/sd.c index 209bc1936c..ec26407543 100644 --- a/hw/sd.c +++ b/hw/sd.c @@ -542,7 +542,7 @@ static void sd_function_switch(SDState *sd, uint32_t arg) sd->data[66] = crc & 0xff; } -static inline int sd_wp_addr(SDState *sd, uint64_t addr) +static inline bool sd_wp_addr(SDState *sd, uint64_t addr) { return test_bit(sd_addr_to_wpnum(addr), sd->wp_groups); } -- cgit v1.2.3 From b1c265424abfa5a1b2589e606b4e4dafbb5108f0 Mon Sep 17 00:00:00 2001 From: "Peter A. G. Crosthwaite" Date: Mon, 13 Aug 2012 11:04:07 +0100 Subject: ssd0323: abort() instead of exit(1) on error. To be more consistent with the newer ways of error signalling. That and SIGABT is easier to debug with than exit(1). Signed-off-by: Peter A. G. Crosthwaite Reviewed-by: Peter Maydell Signed-off-by: Peter Maydell --- hw/ssd0323.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/hw/ssd0323.c b/hw/ssd0323.c index b0b2e94a81..b101c5112c 100644 --- a/hw/ssd0323.c +++ b/hw/ssd0323.c @@ -19,7 +19,9 @@ #define DPRINTF(fmt, ...) \ do { printf("ssd0323: " fmt , ## __VA_ARGS__); } while (0) #define BADF(fmt, ...) \ -do { fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__); exit(1);} while (0) +do { \ + fprintf(stderr, "ssd0323: error: " fmt , ## __VA_ARGS__); abort(); \ +} while (0) #else #define DPRINTF(fmt, ...) do {} while(0) #define BADF(fmt, ...) \ -- cgit v1.2.3 From 58f9b98f8a341c8b7bb0c9b38e492a01fe71d666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20F=C3=A4rber?= Date: Mon, 13 Aug 2012 02:11:12 +0000 Subject: arm: Move some ARM devices into libhw MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Avoids some unnecessary dependencies on cpu.h and prepares for a future armeb-softmmu where most machines would not be built. Defer touching the SoC devices since most have implicit or explicit dependencies on the CPU. Signed-off-by: Andreas Färber Signed-off-by: Peter Maydell --- default-configs/arm-softmmu.mak | 18 ++++++++++++++++++ hw/Makefile.objs | 20 ++++++++++++++++++++ hw/arm/Makefile.objs | 15 +++------------ 3 files changed, 41 insertions(+), 12 deletions(-) diff --git a/default-configs/arm-softmmu.mak b/default-configs/arm-softmmu.mak index e542b4f8ee..f335a725f0 100644 --- a/default-configs/arm-softmmu.mak +++ b/default-configs/arm-softmmu.mak @@ -27,3 +27,21 @@ CONFIG_SMC91C111=y CONFIG_DS1338=y CONFIG_PFLASH_CFI01=y CONFIG_PFLASH_CFI02=y + +CONFIG_ARM_TIMER=y +CONFIG_PL011=y +CONFIG_PL022=y +CONFIG_PL031=y +CONFIG_PL041=y +CONFIG_PL050=y +CONFIG_PL061=y +CONFIG_PL080=y +CONFIG_PL110=y +CONFIG_PL181=y +CONFIG_PL190=y +CONFIG_PL310=y +CONFIG_CADENCE=y +CONFIG_XGMAC=y + +CONFIG_VERSATILE_PCI=y +CONFIG_VERSATILE_I2C=y diff --git a/hw/Makefile.objs b/hw/Makefile.objs index 6eee9a074c..7f57ed58e2 100644 --- a/hw/Makefile.objs +++ b/hw/Makefile.objs @@ -74,6 +74,26 @@ hw-obj-$(CONFIG_PUV3) += puv3_gpio.o hw-obj-$(CONFIG_PUV3) += puv3_pm.o hw-obj-$(CONFIG_PUV3) += puv3_dma.o +# ARM devices +hw-obj-$(CONFIG_ARM_TIMER) += arm_timer.o +hw-obj-$(CONFIG_PL011) += pl011.o +hw-obj-$(CONFIG_PL022) += pl022.o +hw-obj-$(CONFIG_PL031) += pl031.o +hw-obj-$(CONFIG_PL041) += pl041.o lm4549.o +hw-obj-$(CONFIG_PL050) += pl050.o +hw-obj-$(CONFIG_PL061) += pl061.o +hw-obj-$(CONFIG_PL080) += pl080.o +hw-obj-$(CONFIG_PL110) += pl110.o +hw-obj-$(CONFIG_PL181) += pl181.o +hw-obj-$(CONFIG_PL190) += pl190.o +hw-obj-$(CONFIG_PL310) += arm_l2x0.o +hw-obj-$(CONFIG_VERSATILE_PCI) += versatile_pci.o +hw-obj-$(CONFIG_VERSATILE_I2C) += versatile_i2c.o +hw-obj-$(CONFIG_CADENCE) += cadence_uart.o +hw-obj-$(CONFIG_CADENCE) += cadence_ttc.o +hw-obj-$(CONFIG_CADENCE) += cadence_gem.o +hw-obj-$(CONFIG_XGMAC) += xgmac.o + # PCI watchdog devices hw-obj-$(CONFIG_PCI) += wdt_i6300esb.o diff --git a/hw/arm/Makefile.objs b/hw/arm/Makefile.objs index c413780784..2b39fb3c85 100644 --- a/hw/arm/Makefile.objs +++ b/hw/arm/Makefile.objs @@ -1,10 +1,5 @@ -obj-y = integratorcp.o versatilepb.o arm_pic.o arm_timer.o -obj-y += arm_boot.o pl011.o pl031.o pl050.o pl080.o pl110.o pl181.o pl190.o -obj-y += versatile_pci.o -obj-y += versatile_i2c.o -obj-y += cadence_uart.o -obj-y += cadence_ttc.o -obj-y += cadence_gem.o +obj-y = integratorcp.o versatilepb.o arm_pic.o +obj-y += arm_boot.o obj-y += xilinx_zynq.o zynq_slcr.o obj-y += arm_gic.o arm_gic_common.o obj-y += realview_gic.o realview.o arm_sysctl.o arm11mpcore.o a9mpcore.o @@ -12,12 +7,9 @@ obj-y += exynos4210_gic.o exynos4210_combiner.o exynos4210.o obj-y += exynos4_boards.o exynos4210_uart.o exynos4210_pwm.o obj-y += exynos4210_pmu.o exynos4210_mct.o exynos4210_fimd.o obj-y += exynos4210_rtc.o exynos4210_i2c.o -obj-y += arm_l2x0.o obj-y += arm_mptimer.o a15mpcore.o -obj-y += armv7m.o armv7m_nvic.o stellaris.o pl022.o stellaris_enet.o +obj-y += armv7m.o armv7m_nvic.o stellaris.o stellaris_enet.o obj-y += highbank.o -obj-y += pl061.o -obj-y += xgmac.o obj-y += pxa2xx.o pxa2xx_pic.o pxa2xx_gpio.o pxa2xx_timer.o pxa2xx_dma.o obj-y += pxa2xx_lcd.o pxa2xx_mmci.o pxa2xx_pcmcia.o pxa2xx_keypad.o obj-y += gumstix.o @@ -37,7 +29,6 @@ obj-y += strongarm.o obj-y += collie.o obj-y += imx_serial.o imx_ccm.o imx_timer.o imx_avic.o obj-y += kzm.o -obj-y += pl041.o lm4549.o obj-$(CONFIG_FDT) += ../device_tree.o obj-y := $(addprefix ../,$(obj-y)) -- cgit v1.2.3