All pastes #821858 Raw Edit

Mine

public text v1 · immutable
·published 2007-12-18 11:21 UTC
rendered paste body
/*
unsigned char __res[sizeof(bd_t)];
*/
bd_t __res;

void __init
platform_init(unsigned long r3, unsigned long r4, unsigned long r5,
                unsigned long r6, unsigned long r7)
{
        parse_bootinfo(find_bootinfo());

...
                memcpy( (void *)&__res,(void *)(r3+KERNELBASE), sizeof(bd_t) );
...
        ppc_md.setup_arch = iomega8241_setup_arch;
}

static void __init
iomega8241_setup_arch(void)
{
        if (133333332 == __res.bi_busfreq)
                freq = 132000000;
        if (99999999 == __res.bi_busfreq)
                freq = 100000000;
        base_baud = freq / 16;