diff options
author | Mike Frysinger <vapier@gentoo.org> | 2012-03-18 23:53:28 -0400 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2024-01-01 18:23:25 -0500 |
commit | 8695b9b4dc9c515866c0be20da0808211d748c6a (patch) | |
tree | 637f3fc4ef87d9d43b721cf4520aca7c9cd32bc9 | |
parent | a3a35fa65a0e493804fb4ae02cd90ec40694d870 (diff) | |
download | gdb-8695b9b4dc9c515866c0be20da0808211d748c6a.zip gdb-8695b9b4dc9c515866c0be20da0808211d748c6a.tar.gz gdb-8695b9b4dc9c515866c0be20da0808211d748c6a.tar.bz2 |
Revert "sim: bfin: add proper regs to dmac"
This reverts commit 29dd0cd28218880292b6d69322b09c09c04fd59b.
-rw-r--r-- | sim/bfin/dv-bfin_dmac.c | 44 | ||||
-rw-r--r-- | sim/bfin/machs.c | 2 | ||||
-rw-r--r-- | sim/bfin/machs.h | 1 |
3 files changed, 0 insertions, 47 deletions
diff --git a/sim/bfin/dv-bfin_dmac.c b/sim/bfin/dv-bfin_dmac.c index 5480dcb..b193dc3 100644 --- a/sim/bfin/dv-bfin_dmac.c +++ b/sim/bfin/dv-bfin_dmac.c @@ -37,21 +37,7 @@ struct bfin_dmac const char * const *pmap; unsigned int pmap_count; - - /* Order after here is important -- matches hardware MMR layout. */ - bu32 _pad0[3]; - bu16 BFIN_MMR_16 (tc_per); - bu16 BFIN_MMR_16 (tc_cnt); -}; -#define mmr_base() offsetof(struct bfin_dmac, _pad0[0]) -#define mmr_offset(mmr) (offsetof(struct bfin_dmac, mmr) - mmr_base()) -#define mmr_idx(mmr) (mmr_offset (mmr) / 4) - -static const char * const mmr_names[] = -{ - [mmr_idx (tc_per)] = "DMAC_TC_PER", "DMAC_TC_CNT", }; -#define mmr_name(off) (mmr_names[(off) / 4] ? : "<INV>") struct hw * bfin_dmac_get_peer (struct hw *dma, bu16 pmap) @@ -386,34 +372,6 @@ bfin_dmac_port_event (struct hw *me, int my_port, struct hw *source, } static void -attach_bfin_dmac_regs (struct hw *me, struct bfin_dmac *dmac) -{ - address_word attach_address; - int attach_space; - unsigned attach_size; - reg_property_spec reg; - - if (hw_find_property (me, "reg") == NULL) - hw_abort (me, "Missing \"reg\" property"); - - if (!hw_find_reg_array_property (me, "reg", 0, ®)) - hw_abort (me, "\"reg\" property must contain three addr/size entries"); - - hw_unit_address_to_attach_address (hw_parent (me), - ®.address, - &attach_space, &attach_address, me); - hw_unit_size_to_attach_size (hw_parent (me), ®.size, &attach_size, me); - - if (attach_size != BFIN_MMR_DMAC_SIZE) - hw_abort (me, "\"reg\" size must be %#x", BFIN_MMR_DMAC_SIZE); - - hw_attach_address (hw_parent (me), - 0, attach_space, attach_address, attach_size, me); - - dmac->base = attach_address; -} - -static void bfin_dmac_finish (struct hw *me) { struct bfin_dmac *dmac; @@ -424,8 +382,6 @@ bfin_dmac_finish (struct hw *me) set_hw_data (me, dmac); set_hw_port_event (me, bfin_dmac_port_event); - attach_bfin_dmac_regs (me, dmac); - /* Initialize the DMA Controller. */ if (hw_find_property (me, "type") == NULL) hw_abort (me, "Missing \"type\" property"); diff --git a/sim/bfin/machs.c b/sim/bfin/machs.c index 4ed4c0d..92ce85a 100644 --- a/sim/bfin/machs.c +++ b/sim/bfin/machs.c @@ -655,7 +655,6 @@ static const struct bfin_dev_layout bf534_dev[] = DEVICE (0xFFC00700, BFIN_MMR_GPIO_SIZE, "bfin_gpio@5"), DEVICE (0xFFC00A00, BFIN_MMR_EBIU_AMC_SIZE, "bfin_ebiu_amc"), DEVICE (0xFFC00A10, BFIN_MMR_EBIU_SDC_SIZE, "bfin_ebiu_sdc"), - DEVICE (0xFFC00B00, BFIN_MMR_DMAC_SIZE, "bfin_dmac@0"), DEVICE (0xFFC01000, BFIN_MMR_PPI_SIZE, "bfin_ppi@0"), DEVICE (0xFFC01400, BFIN_MMR_TWI_SIZE, "bfin_twi@0"), DEVICE (0xFFC01500, BFIN_MMR_GPIO_SIZE, "bfin_gpio@6"), @@ -691,7 +690,6 @@ static const struct bfin_dev_layout bf537_dev[] = DEVICE (0xFFC00700, BFIN_MMR_GPIO_SIZE, "bfin_gpio@5"), DEVICE (0xFFC00A00, BFIN_MMR_EBIU_AMC_SIZE, "bfin_ebiu_amc"), DEVICE (0xFFC00A10, BFIN_MMR_EBIU_SDC_SIZE, "bfin_ebiu_sdc"), - DEVICE (0xFFC00B00, BFIN_MMR_DMAC_SIZE, "bfin_dmac@0"), DEVICE (0xFFC01000, BFIN_MMR_PPI_SIZE, "bfin_ppi@0"), DEVICE (0xFFC01400, BFIN_MMR_TWI_SIZE, "bfin_twi@0"), DEVICE (0xFFC01500, BFIN_MMR_GPIO_SIZE, "bfin_gpio@6"), diff --git a/sim/bfin/machs.h b/sim/bfin/machs.h index e062cc0..5bddfcf 100644 --- a/sim/bfin/machs.h +++ b/sim/bfin/machs.h @@ -52,7 +52,6 @@ extern const SIM_MACH * const bfin_sim_machs[]; #define BFIN_COREMMR_WP_SIZE 0x204 #define BFIN_MMR_DMA_SIZE (4 * 16) -#define BFIN_MMR_DMAC_SIZE 0x20 #define BFIN_MMR_DMAC0_BASE 0xFFC00C00 #define BFIN_MMR_DMAC1_BASE 0xFFC01C00 #define BFIN_MMR_EBIU_AMC_SIZE (4 * 3) |