On Tue, Sep 2, 2014 at 2:30 AM, Peter Maydell <peter.mayd...@linaro.org> wrote:
> On 24 August 2014 03:09, Peter Crosthwaite <peter.crosthwa...@xilinx.com> 
> wrote:
>> If you make your registers an array, you can index the with the offset
>> and remove the repeated s->foo return logic. You can also use a single
>> memset to do all the 0 resets.
>
> Hmm. I dislike that style personally, especially for devices
> like this which only have a handful of registers.

I think it'll end up being just as complex, as some of the offsets
cause multiple registers to change (status registers and things
like that)

I'll keep it as a switch case for now

Thanks,

Alistair

>
> -- PMM

Reply via email to