static void pxa2xx_cm_write(void *opaque, hwaddr addr,

                            uint64_t value, unsigned size)

{

    PXA2xxState *s = (PXA2xxState *) opaque;



    switch (addr) {

    case CCCR:

    case CKEN:

        s->cm_regs[addr >> 2] = value;

        break;



    case OSCC:

        s->cm_regs[addr >> 2] &= ~0x6c;

        s->cm_regs[addr >> 2] |= value & 0x6e;

        if ((value >> 1) & 1)			/* OON */

            s->cm_regs[addr >> 2] |= 1 << 0;	/* Oscillator is now stable */

        break;



    default:

        printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);

        break;

    }

}

static void pxa2xx_cm_write(void *opaque, hwaddr addr,

                            uint64_t value, unsigned size)

{

    PXA2xxState *s = (PXA2xxState *) opaque;



    switch (addr) {

    case CCCR:

    case CKEN:

        s->cm_regs[addr >> 2] = value;

        break;



    case OSCC:

        s->cm_regs[addr >> 2] &= ~0x6c;

        s->cm_regs[addr >> 2] |= value & 0x6e;

        if ((value >> 1) & 1)			

            s->cm_regs[addr >> 2] |= 1 << 0;	

        break;



    default:

        printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, addr);

        break;

    }

}

static void FUNC_0(void *VAR_0, hwaddr VAR_1,

                            uint64_t VAR_2, unsigned VAR_3)

{

    PXA2xxState *s = (PXA2xxState *) VAR_0;



    switch (VAR_1) {

    case CCCR:

    case CKEN:

        s->cm_regs[VAR_1 >> 2] = VAR_2;

        break;



    case OSCC:

        s->cm_regs[VAR_1 >> 2] &= ~0x6c;

        s->cm_regs[VAR_1 >> 2] |= VAR_2 & 0x6e;

        if ((VAR_2 >> 1) & 1)			

            s->cm_regs[VAR_1 >> 2] |= 1 << 0;	

        break;



    default:

        printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, VAR_1);

        break;

    }

}

static void FUNC_0(void *VAR_0, hwaddr VAR_1,
uint64_t VAR_2, unsigned VAR_3)
{ PXA2xxState *s = (PXA2xxState *) VAR_0; switch (VAR_1) { case CCCR:
case CKEN:
s->cm_regs[VAR_1 >> 2] = VAR_2; break; case OSCC:
s->cm_regs[VAR_1 >> 2] &= ~0x6c; s->cm_regs[VAR_1 >> 2] |= VAR_2 & 0x6e; if ((VAR_2 >> 1) & 1)
s->cm_regs[VAR_1 >> 2] |= 1 << 0; break; default:
printf("%s: Bad register " REG_FMT "\n", __FUNCTION__, VAR_1); break; } }