X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fm68k%2Fapollo%2Fconfig.c;h=d401962d9b251e53dcef279d5045473056d6f995;hb=43bc926fffd92024b46cafaf7350d669ba9ca884;hp=3e96cb6eef43a4e8a6a87fcde417beadc64e0afb;hpb=5273a3df6485dc2ad6aa7ddd441b9a21970f003b;p=linux-2.6.git diff --git a/arch/m68k/apollo/config.c b/arch/m68k/apollo/config.c index 3e96cb6ee..d401962d9 100644 --- a/arch/m68k/apollo/config.c +++ b/arch/m68k/apollo/config.c @@ -62,19 +62,19 @@ int apollo_parse_bootinfo(const struct bi_record *record) { const unsigned long *data = record->data; switch(record->tag) { - case BI_APOLLO_MODEL: - apollo_model=*data; + case BI_APOLLO_MODEL: + apollo_model=*data; break; default: unknown=1; } - + return unknown; } void dn_setup_model(void) { - + printk("Apollo hardware found: "); printk("[%s]\n", apollo_models[apollo_model - APOLLO_DN3000]); @@ -85,19 +85,19 @@ void dn_setup_model(void) { break; case APOLLO_DN3000: case APOLLO_DN3010: - sio01_physaddr=SAU8_SIO01_PHYSADDR; - rtc_physaddr=SAU8_RTC_PHYSADDR; - pica_physaddr=SAU8_PICA; - picb_physaddr=SAU8_PICB; + sio01_physaddr=SAU8_SIO01_PHYSADDR; + rtc_physaddr=SAU8_RTC_PHYSADDR; + pica_physaddr=SAU8_PICA; + picb_physaddr=SAU8_PICB; cpuctrl_physaddr=SAU8_CPUCTRL; timer_physaddr=SAU8_TIMER; break; case APOLLO_DN4000: - sio01_physaddr=SAU7_SIO01_PHYSADDR; - sio23_physaddr=SAU7_SIO23_PHYSADDR; - rtc_physaddr=SAU7_RTC_PHYSADDR; - pica_physaddr=SAU7_PICA; - picb_physaddr=SAU7_PICB; + sio01_physaddr=SAU7_SIO01_PHYSADDR; + sio23_physaddr=SAU7_SIO23_PHYSADDR; + rtc_physaddr=SAU7_RTC_PHYSADDR; + pica_physaddr=SAU7_PICA; + picb_physaddr=SAU7_PICB; cpuctrl_physaddr=SAU7_CPUCTRL; timer_physaddr=SAU7_TIMER; break; @@ -105,11 +105,11 @@ void dn_setup_model(void) { panic("Apollo model not yet supported"); break; case APOLLO_DN3500: - sio01_physaddr=SAU7_SIO01_PHYSADDR; - sio23_physaddr=SAU7_SIO23_PHYSADDR; - rtc_physaddr=SAU7_RTC_PHYSADDR; - pica_physaddr=SAU7_PICA; - picb_physaddr=SAU7_PICB; + sio01_physaddr=SAU7_SIO01_PHYSADDR; + sio23_physaddr=SAU7_SIO23_PHYSADDR; + rtc_physaddr=SAU7_RTC_PHYSADDR; + pica_physaddr=SAU7_PICA; + picb_physaddr=SAU7_PICB; cpuctrl_physaddr=SAU7_CPUCTRL; timer_physaddr=SAU7_TIMER; break; @@ -131,17 +131,17 @@ int dn_serial_console_wait_key(struct console *co) { void dn_serial_console_write (struct console *co, const char *str,unsigned int count) { while(count--) { - if (*str == '\n') { - sio01.rhrb_thrb = (unsigned char)'\r'; - while (!(sio01.srb_csrb & 0x4)) + if (*str == '\n') { + sio01.rhrb_thrb = (unsigned char)'\r'; + while (!(sio01.srb_csrb & 0x4)) ; - } + } sio01.rhrb_thrb = (unsigned char)*str++; while (!(sio01.srb_csrb & 0x4)) ; - } + } } - + void dn_serial_print (const char *str) { while (*str) { @@ -160,7 +160,7 @@ void config_apollo(void) { int i; - dn_setup_model(); + dn_setup_model(); mach_sched_init=dn_sched_init; /* */ mach_init_IRQ=dn_init_IRQ; @@ -176,28 +176,25 @@ void config_apollo(void) { mach_set_clock_mmss = dn_dummy_set_clock_mmss; /* */ mach_process_int = dn_process_int; mach_reset = dn_dummy_reset; /* */ -#ifdef CONFIG_DUMMY_CONSOLE - conswitchp = &dummy_con; -#endif #ifdef CONFIG_HEARTBEAT - mach_heartbeat = dn_heartbeat; + mach_heartbeat = dn_heartbeat; #endif mach_get_model = dn_get_model; cpuctrl=0xaa00; /* clear DMA translation table */ - for(i=0;i<0x400;i++) + for(i=0;i<0x400;i++) addr_xlat_map[i]=0; -} +} irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) { volatile unsigned char x; sched_timer_handler(irq,dev_id,fp); - + x=*(volatile unsigned char *)(timer+3); x=*(volatile unsigned char *)(timer+5); @@ -206,7 +203,7 @@ irqreturn_t dn_timer_int(int irq, void *dev_id, struct pt_regs *fp) { void dn_sched_init(irqreturn_t (*timer_routine)(int, void *, struct pt_regs *)) { - /* program timer 1 */ + /* program timer 1 */ *(volatile unsigned char *)(timer+3)=0x01; *(volatile unsigned char *)(timer+1)=0x40; *(volatile unsigned char *)(timer+5)=0x09; @@ -272,7 +269,7 @@ void dn_dummy_reset(void) { for(;;); } - + void dn_dummy_waitbut(void) { dn_serial_print("waitbut\n"); @@ -291,7 +288,7 @@ static int dn_cpuctrl=0xff00; static void dn_heartbeat(int on) { - if(on) { + if(on) { dn_cpuctrl&=~0x100; cpuctrl=dn_cpuctrl; }