Port-dreamcast archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: DC IDE adapter questions



On 31 July 2012 10:38, Marcus Comstedt <marcus%mc.pp.se@localhost> wrote:
>
> David Brownlee <abs%NetBSD.org@localhost> writes:
>
>> (I ran the trivial patch update to -current, just to see :)
>> http://sync.absd.org/dreamcast/dcext-current-2012-07-29.diff
>
> Why is the modification of g2busvar.h needed?  Nothing should call
> these functions directly, AFAIK.

Presumably for dcext_bus_mem_init() setting up the bus_space_tag_t -
should that be done a different way?

dcext_bus_mem_init(struct dcext_softc *sc)
{
        bus_space_tag_t t = &sc->sc_memt;

        memset(t, 0, sizeof(*t));

        t->dbs_map = dcext_bus_mem_map;
        t->dbs_unmap = dcext_bus_mem_unmap;

        t->dbs_r_1 = g2bus_sparse_bus_mem_read_1;
        t->dbs_r_2 = g2bus_sparse_bus_mem_read_2;
        t->dbs_r_4 = g2bus_sparse_bus_mem_read_4;

        t->dbs_w_1 = g2bus_sparse_bus_mem_write_1;
        t->dbs_w_2 = g2bus_sparse_bus_mem_write_2;
        t->dbs_w_4 = g2bus_sparse_bus_mem_write_4;

        t->dbs_rr_1 = g2bus_sparse_bus_mem_read_region_1;

        t->dbs_wr_1 = g2bus_sparse_bus_mem_write_region_1;

        t->dbs_rm_1 = g2bus_sparse_bus_mem_read_multi_1;
        t->dbs_rm_2 = g2bus_sparse_bus_mem_read_multi_2;

        t->dbs_wm_1 = g2bus_sparse_bus_mem_write_multi_1;
        t->dbs_wm_2 = g2bus_sparse_bus_mem_write_multi_2;

        t->dbs_subregion = dcext_space_subregion;
}


Home | Main Index | Thread Index | Old Index