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)
hw_port_event (dma, 0, 1);
}
-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)
{
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");
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"),
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"),