From 1d67e90f19a7acfd9a05dc59678e7d0c5090bd0d Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Sat, 4 Dec 1999 03:58:56 +0000 Subject: Merge with Linux 2.3.21. --- arch/ppc/amiga/Makefile | 4 ++ arch/ppc/amiga/amiints.c | 146 ++++++++++++++++++++------------------ arch/ppc/amiga/bootinfo.c | 13 +++- arch/ppc/amiga/chipram.c | 176 +++++++++++++++++++++++++++++++++++++++++++++- arch/ppc/amiga/config.c | 49 ++++++++++--- arch/ppc/amiga/ints.c | 22 +++--- arch/ppc/amiga/pcmcia.c | 1 + arch/ppc/amiga/time.c | 6 +- 8 files changed, 323 insertions(+), 94 deletions(-) create mode 100644 arch/ppc/amiga/pcmcia.c (limited to 'arch/ppc/amiga') diff --git a/arch/ppc/amiga/Makefile b/arch/ppc/amiga/Makefile index 2658af4c7..2d5ec4811 100644 --- a/arch/ppc/amiga/Makefile +++ b/arch/ppc/amiga/Makefile @@ -12,4 +12,8 @@ O_OBJS := config.o amiints.o cia.o time.o \ bootinfo.o amisound.o chipram.o ints.o OX_OBJS := amiga_ksyms.o +ifdef CONFIG_AMIGA_PCMCIA +O_OBJS := $(O_OBJS) pcmcia.o +endif + include $(TOPDIR)/Rules.make diff --git a/arch/ppc/amiga/amiints.c b/arch/ppc/amiga/amiints.c index 795ea6378..408f8211c 100644 --- a/arch/ppc/amiga/amiints.c +++ b/arch/ppc/amiga/amiints.c @@ -1,7 +1,3 @@ -/* Rename a few functions. */ -#define amiga_request_irq request_irq -#define amiga_free_irq free_irq - /* * linux/arch/m68k/amiga/amiints.c -- Amiga Linux interrupt handling code * @@ -23,6 +19,20 @@ * called again. * The whole interrupt handling for CIAs is moved to cia.c * /Roman Zippel + * + * 07/08/99: rewamp of the interrupt handling - we now have two types of + * interrupts, normal and fast handlers, fast handlers being + * marked with SA_INTERRUPT and runs with all other interrupts + * disabled. Normal interrupts disable their own source but + * run with all other interrupt sources enabled. + * PORTS and EXTER interrupts are always shared even if the + * drivers do not explicitly mark this when calling + * request_irq which they really should do. + * This is similar to the way interrupts are handled on all + * other architectures and makes a ton of sense besides + * having the advantage of making it easier to share + * drivers. + * /Jes */ #include @@ -90,7 +100,7 @@ void __init amiga_init_IRQ(void) } else { ami_irq_list[i] = new_irq_node(); ami_irq_list[i]->handler = ami_badint; - ami_irq_list[i]->flags = IRQ_FLG_STD; + ami_irq_list[i]->flags = 0; ami_irq_list[i]->dev_id = NULL; ami_irq_list[i]->devname = NULL; ami_irq_list[i]->next = NULL; @@ -108,7 +118,7 @@ void __init amiga_init_IRQ(void) custom.intreq = 0x7fff; #ifdef CONFIG_APUS - /* Clear any inter-CPU interrupt requests. Circumvents bug in + /* Clear any inter-CPU interupt requests. Circumvents bug in Blizzard IPL emulation HW (or so it appears). */ APUS_WRITE(APUS_INT_LVL, INTLVL_SETRESET | INTLVL_MASK); @@ -124,7 +134,7 @@ void __init amiga_init_IRQ(void) cia_init_IRQ(&ciab_base); } -static inline void amiga_insert_irq(irq_node_t **list, irq_node_t *node) +static inline int amiga_insert_irq(irq_node_t **list, irq_node_t *node) { unsigned long flags; irq_node_t *cur; @@ -138,19 +148,18 @@ static inline void amiga_insert_irq(irq_node_t **list, irq_node_t *node) cur = *list; - if (node->flags & IRQ_FLG_FAST) { - node->flags &= ~IRQ_FLG_SLOW; - while (cur && cur->flags & IRQ_FLG_FAST) { - list = &cur->next; - cur = cur->next; - } - } else if (node->flags & IRQ_FLG_SLOW) { - while (cur) { + if (node->flags & SA_INTERRUPT) { + if (node->flags & SA_SHIRQ) + return -EBUSY; + /* + * There should never be more than one + */ + while (cur && cur->flags & SA_INTERRUPT) { list = &cur->next; cur = cur->next; } } else { - while (cur && !(cur->flags & IRQ_FLG_SLOW)) { + while (cur) { list = &cur->next; cur = cur->next; } @@ -160,6 +169,7 @@ static inline void amiga_insert_irq(irq_node_t **list, irq_node_t *node) *list = node; restore_flags(flags); + return 0; } static inline void amiga_delete_irq(irq_node_t **list, void *dev_id) @@ -189,13 +199,16 @@ static inline void amiga_delete_irq(irq_node_t **list, void *dev_id) * If the addition was successful, it returns 0. */ -int amiga_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_regs *), +int amiga_request_irq(unsigned int irq, + void (*handler)(int, void *, struct pt_regs *), unsigned long flags, const char *devname, void *dev_id) { irq_node_t *node; + int error = 0; if (irq >= AMI_IRQS) { - printk ("%s: Unknown IRQ %d from %s\n", __FUNCTION__, irq, devname); + printk ("%s: Unknown IRQ %d from %s\n", __FUNCTION__, + irq, devname); return -ENXIO; } @@ -211,6 +224,11 @@ int amiga_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_r return cia_request_irq(&ciaa_base, irq - IRQ_AMIGA_CIAA, handler, flags, devname, dev_id); + /* + * IRQ_AMIGA_PORTS & IRQ_AMIGA_EXTER defaults to shared, + * we could add a check here for the SA_SHIRQ flag but all drivers + * should be aware of sharing anyway. + */ if (ami_servers[irq]) { if (!(node = new_irq_node())) return -ENOMEM; @@ -219,20 +237,8 @@ int amiga_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_r node->dev_id = dev_id; node->devname = devname; node->next = NULL; - amiga_insert_irq(&ami_irq_list[irq], node); + error = amiga_insert_irq(&ami_irq_list[irq], node); } else { - if (!(ami_irq_list[irq]->flags & IRQ_FLG_STD)) { - if (ami_irq_list[irq]->flags & IRQ_FLG_LOCK) { - printk("%s: IRQ %d from %s is not replaceable\n", - __FUNCTION__, irq, ami_irq_list[irq]->devname); - return -EBUSY; - } - if (!(flags & IRQ_FLG_REPLACE)) { - printk("%s: %s can't replace IRQ %d from %s\n", - __FUNCTION__, devname, irq, ami_irq_list[irq]->devname); - return -EBUSY; - } - } ami_irq_list[irq]->handler = handler; ami_irq_list[irq]->flags = flags; ami_irq_list[irq]->dev_id = dev_id; @@ -243,7 +249,7 @@ int amiga_request_irq(unsigned int irq, void (*handler)(int, void *, struct pt_r if (irq < IRQ_AMIGA_PORTS && !ami_ablecount[irq]) custom.intena = IF_SETCLR | ami_intena_vals[irq]; - return 0; + return error; } void amiga_free_irq(unsigned int irq, void *dev_id) @@ -276,7 +282,7 @@ void amiga_free_irq(unsigned int irq, void *dev_id) printk("%s: removing probably wrong IRQ %d from %s\n", __FUNCTION__, irq, ami_irq_list[irq]->devname); ami_irq_list[irq]->handler = ami_badint; - ami_irq_list[irq]->flags = IRQ_FLG_STD; + ami_irq_list[irq]->flags = 0; ami_irq_list[irq]->dev_id = NULL; ami_irq_list[irq]->devname = NULL; custom.intena = ami_intena_vals[irq]; @@ -366,45 +372,58 @@ inline void amiga_do_irq(int irq, struct pt_regs *fp) void amiga_do_irq_list(int irq, struct pt_regs *fp, struct irq_server *server) { irq_node_t *node, *slow_nodes; - unsigned short flags; + unsigned short flags, intena; kstat.irqs[0][SYS_IRQS + irq]++; if (server->count++) server->reentrance = 1; - /* serve first fast and normal handlers */ - for (node = ami_irq_list[irq]; - node && (!(node->flags & IRQ_FLG_SLOW)); - node = node->next) - node->handler(irq, node->dev_id, fp); - custom.intreq = ami_intena_vals[irq]; + + intena = ami_intena_vals[irq]; + custom.intreq = intena; + + /* serve first fast handlers - there can only be one of these */ + node = ami_irq_list[irq]; + + /* + * Timer interrupts show up like this + */ if (!node) { server->count--; return; } -#ifdef CONFIG_APUS - APUS_WRITE(APUS_IPL_EMU, IPLEMU_SETRESET | IPLEMU_DISABLEINT); - APUS_WRITE(APUS_IPL_EMU, IPLEMU_IPLMASK); - APUS_WRITE(APUS_IPL_EMU, (IPLEMU_SETRESET - | (~(fp->mq) & IPLEMU_IPLMASK))); - APUS_WRITE(APUS_IPL_EMU, IPLEMU_DISABLEINT); -#else + + if (node && (node->flags & SA_INTERRUPT)) { + save_flags(flags); + cli(); + node->handler(irq, node->dev_id, fp); + restore_flags(flags); + + server->count--; + return; + } + + /* + * Disable the interrupt source in question and reenable all + * other interrupts. No interrupt handler should ever touch + * the intena flags directly! + */ + custom.intena = intena; save_flags(flags); - restore_flags((flags & ~0x0700) | (fp->sr & 0x0700)); -#endif - /* if slow handlers exists, serve them now */ + sti(); + slow_nodes = node; for (;;) { for (; node; node = node->next) node->handler(irq, node->dev_id, fp); - /* if reentrance occurred, serve slow handlers again */ - custom.intena = ami_intena_vals[irq]; + if (!server->reentrance) { server->count--; - custom.intena = IF_SETCLR | ami_intena_vals[irq]; + restore_flags(flags); + custom.intena = IF_SETCLR | intena; return; } + server->reentrance = 0; - custom.intena = IF_SETCLR | ami_intena_vals[irq]; node = slow_nodes; } } @@ -522,24 +541,13 @@ int amiga_get_irq_list(char *buf) for (i = 0; i < AMI_STD_IRQS; i++) { if (!(node = ami_irq_list[i])) continue; - if (node->flags & IRQ_FLG_STD) - continue; len += sprintf(buf+len, "ami %2d: %10u ", i, kstat.irqs[0][SYS_IRQS + i]); do { - if (ami_servers[i]) { - if (node->flags & IRQ_FLG_FAST) - len += sprintf(buf+len, "F "); - else if (node->flags & IRQ_FLG_SLOW) - len += sprintf(buf+len, "S "); - else - len += sprintf(buf+len, " "); - } else { - if (node->flags & IRQ_FLG_LOCK) - len += sprintf(buf+len, "L "); - else - len += sprintf(buf+len, " "); - } + if (node->flags & SA_INTERRUPT) + len += sprintf(buf+len, "F "); + else + len += sprintf(buf+len, " "); len += sprintf(buf+len, "%s\n", node->devname); if ((node = node->next)) len += sprintf(buf+len, " "); diff --git a/arch/ppc/amiga/bootinfo.c b/arch/ppc/amiga/bootinfo.c index 21fd37aa1..6011910e0 100644 --- a/arch/ppc/amiga/bootinfo.c +++ b/arch/ppc/amiga/bootinfo.c @@ -16,9 +16,11 @@ extern char cmd_line[CL_SIZE]; -int num_memory = 0; -struct mem_info memory[NUM_MEMINFO]; -struct mem_info ramdisk; +extern int num_memory; +extern int m68k_realnum_memory; +extern struct mem_info memory[NUM_MEMINFO]; +extern struct mem_info m68k_memory[NUM_MEMINFO]; +extern struct mem_info ramdisk; extern int amiga_parse_bootinfo(const struct bi_record *); extern int atari_parse_bootinfo(const struct bi_record *); @@ -42,6 +44,11 @@ void __init parse_bootinfo(const struct bi_record *record) memory[num_memory].addr = data[0]; memory[num_memory].size = data[1]; num_memory++; + + /* FIXME: duplicate for m68k drivers. */ + m68k_memory[m68k_realnum_memory].addr = data[0]; + m68k_memory[m68k_realnum_memory].size = data[1]; + m68k_realnum_memory++; } else printk("parse_bootinfo: too many memory chunks\n"); break; diff --git a/arch/ppc/amiga/chipram.c b/arch/ppc/amiga/chipram.c index e6ab3c6b2..31f91a794 100644 --- a/arch/ppc/amiga/chipram.c +++ b/arch/ppc/amiga/chipram.c @@ -1 +1,175 @@ -#include "../../m68k/amiga/chipram.c" +/* +** linux/amiga/chipram.c +** +** Modified 03-May-94 by Geert Uytterhoeven +** (Geert.Uytterhoeven@cs.kuleuven.ac.be) +** - 64-bit aligned allocations for full AGA compatibility +*/ + +#include +#include +#include +#include +#include + +struct chip_desc { + unsigned first : 1; + unsigned last : 1; + unsigned alloced : 1; + unsigned length : 24; + long pad; /* We suppose this makes this struct 64 bits long!! */ +}; + +#define DP(ptr) ((struct chip_desc *)(ptr)) + +u_long amiga_chip_size; +static unsigned long chipavail; + +unsigned long amiga_chip_avail( void ) +{ +#ifdef DEBUG + printk("chip_avail : %ld bytes\n",chipavail); +#endif + return chipavail; +} + + +__init +void amiga_chip_init (void) +{ + struct chip_desc *dp; + + if (!AMIGAHW_PRESENT(CHIP_RAM)) + return; + +#ifndef CONFIG_APUS_FAST_EXCEPT + /* + * Remove the first 4 pages where PPC exception handlers will + * be located. + */ + amiga_chip_size -= 0x4000; +#endif + + /* initialize start boundary */ + + dp = DP(chipaddr); + dp->first = 1; + + dp->alloced = 0; + dp->length = amiga_chip_size - 2*sizeof(*dp); + + /* initialize end boundary */ + dp = DP(chipaddr + amiga_chip_size) - 1; + dp->last = 1; + + dp->alloced = 0; + dp->length = amiga_chip_size - 2*sizeof(*dp); + chipavail = dp->length; /*MILAN*/ + +#ifdef DEBUG + printk ("chipram end boundary is %p, length is %d\n", dp, + dp->length); +#endif +} + +void *amiga_chip_alloc (long size) +{ + /* last chunk */ + struct chip_desc *dp; + void *ptr; + + /* round off */ + size = (size + 7) & ~7; + +#ifdef DEBUG + printk("chip_alloc: allocate %ld bytes\n", size); +#endif + + /* + * get pointer to descriptor for last chunk by + * going backwards from end chunk + */ + dp = DP(chipaddr + amiga_chip_size) - 1; + dp = DP((unsigned long)dp - dp->length) - 1; + + while ((dp->alloced || dp->length < size) + && !dp->first) + dp = DP ((unsigned long)dp - dp[-1].length) - 2; + + if (dp->alloced || dp->length < size) { + printk ("no chipmem available for %ld allocation\n", size); + return NULL; + } + + if (dp->length < (size + 2*sizeof(*dp))) { + /* length too small to split; allocate the whole thing */ + dp->alloced = 1; + ptr = (void *)(dp+1); + dp = DP((unsigned long)ptr + dp->length); + dp->alloced = 1; +#ifdef DEBUG + printk ("chip_alloc: no split\n"); +#endif + } else { + /* split the extent; use the end part */ + long newsize = dp->length - (2*sizeof(*dp) + size); + +#ifdef DEBUG + printk ("chip_alloc: splitting %d to %ld\n", dp->length, + newsize); +#endif + dp->length = newsize; + dp = DP((unsigned long)(dp+1) + newsize); + dp->first = dp->last = 0; + dp->alloced = 0; + dp->length = newsize; + dp++; + dp->first = dp->last = 0; + dp->alloced = 1; + dp->length = size; + ptr = (void *)(dp+1); + dp = DP((unsigned long)ptr + size); + dp->alloced = 1; + dp->length = size; + } + +#ifdef DEBUG + printk ("chip_alloc: returning %p\n", ptr); +#endif + + if ((unsigned long)ptr & 7) + panic("chip_alloc: alignment violation\n"); + + chipavail -= size + (2*sizeof(*dp)); /*MILAN*/ + + return ptr; +} + +void amiga_chip_free (void *ptr) +{ + struct chip_desc *sdp = DP(ptr) - 1, *dp2; + struct chip_desc *edp = DP((unsigned long)ptr + sdp->length); + + chipavail += sdp->length + (2* sizeof(sdp)); /*MILAN*/ +#ifdef DEBUG + printk("chip_free: free %ld bytes at %p\n",sdp->length,ptr); +#endif + /* deallocate the chunk */ + sdp->alloced = edp->alloced = 0; + + /* check if we should merge with the previous chunk */ + if (!sdp->first && !sdp[-1].alloced) { + dp2 = DP((unsigned long)sdp - sdp[-1].length) - 2; + dp2->length += sdp->length + 2*sizeof(*sdp); + edp->length = dp2->length; + sdp = dp2; + } + + /* check if we should merge with the following chunk */ + if (!edp->last && !edp[1].alloced) { + dp2 = DP((unsigned long)edp + edp[1].length) + 2; + dp2->length += edp->length + 2*sizeof(*sdp); + sdp->length = dp2->length; + edp = dp2; + } +} diff --git a/arch/ppc/amiga/config.c b/arch/ppc/amiga/config.c index 59050c421..47b8f64ea 100644 --- a/arch/ppc/amiga/config.c +++ b/arch/ppc/amiga/config.c @@ -1,13 +1,12 @@ #define m68k_debug_device debug_device -#define m68k_num_memory num_memory -#define m68k_memory memory #include /* machine dependent "kbd-reset" setup function */ -void (*kbd_reset_setup) (char *, int) __initdata = 0; +void (*mach_kbd_reset_setup) (char *, int) __initdata = 0; #include +#include /* * linux/arch/m68k/amiga/config.c @@ -41,6 +40,7 @@ void (*kbd_reset_setup) (char *, int) __initdata = 0; #include #include +unsigned long powerup_PCI_present; unsigned long amiga_model; unsigned long amiga_eclock; unsigned long amiga_masterclock; @@ -61,7 +61,6 @@ static void amiga_sched_init(void (*handler)(int, void *, struct pt_regs *)); /* amiga specific keyboard functions */ extern int amiga_keyb_init(void); extern int amiga_kbdrate (struct kbd_repeat *); -extern void amiga_kbd_reset_setup(char*, int); /* amiga specific irq functions */ extern void amiga_init_IRQ (void); extern void (*amiga_default_handler[]) (int, void *, struct pt_regs *); @@ -137,8 +136,13 @@ int amiga_parse_bootinfo(const struct bi_record *record) switch (record->tag) { case BI_AMIGA_MODEL: - amiga_model = *data; - break; + { + unsigned long d = *data; + + powerup_PCI_present = d & 0x100; + amiga_model = d & 0xff; + } + break; case BI_AMIGA_ECLOCK: amiga_eclock = *data; @@ -352,7 +356,6 @@ void __init config_amiga(void) mach_sched_init = amiga_sched_init; mach_keyb_init = amiga_keyb_init; mach_kbdrate = amiga_kbdrate; - kbd_reset_setup = amiga_kbd_reset_setup; mach_init_IRQ = amiga_init_IRQ; mach_default_handler = &amiga_default_handler; #ifndef CONFIG_APUS @@ -451,8 +454,7 @@ static void __init amiga_sched_init(void (*timer_routine)(int, void *, * Please don't change this to use ciaa, as it interferes with the * SCSI code. We'll have to take a look at this later */ - request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, IRQ_FLG_LOCK, - "timer", NULL); + request_irq(IRQ_AMIGA_CIAB_TA, timer_routine, 0, "timer", NULL); /* start timer */ ciab.cra |= 0x11; } @@ -741,7 +743,7 @@ static void amiga_savekmsg_init(void) static void amiga_serial_putc(char c) { custom.serdat = (unsigned char)c | 0x100; - iobarrier_rw (); + mb(); while (!(custom.serdatr & 0x2000)) ; } @@ -921,3 +923,30 @@ static int amiga_get_hardware_list(char *buffer) return(len); } + +#ifdef CONFIG_APUS +int get_hardware_list(char *buffer) +{ + extern int get_cpuinfo(char *buffer); + int len = 0; + char model[80]; + u_long mem; + int i; + + if (mach_get_model) + mach_get_model(model); + else + strcpy(model, "Unknown PowerPC"); + + len += sprintf(buffer+len, "Model:\t\t%s\n", model); + len += get_cpuinfo(buffer+len); + for (mem = 0, i = 0; i < m68k_realnum_memory; i++) + mem += m68k_memory[i].size; + len += sprintf(buffer+len, "System Memory:\t%ldK\n", mem>>10); + + if (mach_get_hardware_list) + len += mach_get_hardware_list(buffer+len); + + return(len); +} +#endif diff --git a/arch/ppc/amiga/ints.c b/arch/ppc/amiga/ints.c index c3eabcc83..80c63f7ab 100644 --- a/arch/ppc/amiga/ints.c +++ b/arch/ppc/amiga/ints.c @@ -5,19 +5,22 @@ * Needed to drive the m68k emulating IRQ hardware on the PowerUp boards. */ +#include #include +#include #include -#include #include #include #include +#include #include #include +#include #include /* table for system interrupt handlers */ -irq_handler_t irq_list[SYS_IRQS]; +static irq_handler_t irq_list[SYS_IRQS]; static const char *default_names[SYS_IRQS] = { "spurious int", "int1 handler", "int2 handler", "int3 handler", @@ -42,14 +45,15 @@ static irq_node_t nodes[NUM_IRQ_NODES]; * the IRQ handling routines. */ -void __init apus_init_IRQ(void) +__init +void m68k_init_IRQ(void) { int i; for (i = 0; i < SYS_IRQS; i++) { if (mach_default_handler) irq_list[i].handler = (*mach_default_handler)[i]; - irq_list[i].flags = IRQ_FLG_STD; + irq_list[i].flags = 0; irq_list[i].dev_id = NULL; irq_list[i].devname = default_names[i]; } @@ -83,6 +87,7 @@ int sys_request_irq(unsigned int irq, return -ENXIO; } +#if 0 if (!(irq_list[irq].flags & IRQ_FLG_STD)) { if (irq_list[irq].flags & IRQ_FLG_LOCK) { printk("%s: IRQ %d from %s is not replaceable\n", @@ -95,6 +100,8 @@ int sys_request_irq(unsigned int irq, return -EBUSY; } } +#endif + irq_list[irq].handler = handler; irq_list[irq].flags = flags; irq_list[irq].dev_id = dev_id; @@ -114,7 +121,7 @@ void sys_free_irq(unsigned int irq, void *dev_id) __FUNCTION__, irq, irq_list[irq].devname); irq_list[irq].handler = (*mach_default_handler)[irq]; - irq_list[irq].flags = IRQ_FLG_STD; + irq_list[irq].flags = 0; irq_list[irq].dev_id = NULL; irq_list[irq].devname = default_names[irq]; } @@ -134,7 +141,7 @@ asmlinkage void process_int(unsigned long vec, struct pt_regs *fp) } } -int get_irq_list(char *buf) +int m68k_get_irq_list(char *buf) { int i, len = 0; @@ -143,9 +150,6 @@ int get_irq_list(char *buf) for (i = 0; i < SYS_IRQS; i++) { len += sprintf(buf+len, "auto %2d: %10u ", i, i ? kstat.irqs[0][i] : num_spurious); - if (irq_list[i].flags & IRQ_FLG_LOCK) - len += sprintf(buf+len, "L "); - else len += sprintf(buf+len, " "); len += sprintf(buf+len, "%s\n", irq_list[i].devname); } diff --git a/arch/ppc/amiga/pcmcia.c b/arch/ppc/amiga/pcmcia.c new file mode 100644 index 000000000..5d29dc650 --- /dev/null +++ b/arch/ppc/amiga/pcmcia.c @@ -0,0 +1 @@ +#include "../../m68k/amiga/pcmcia.c" diff --git a/arch/ppc/amiga/time.c b/arch/ppc/amiga/time.c index 65f94d778..a78f8aa41 100644 --- a/arch/ppc/amiga/time.c +++ b/arch/ppc/amiga/time.c @@ -15,7 +15,7 @@ static inline unsigned long mktime(unsigned int year, unsigned int mon, unsigned int day, unsigned int hour, unsigned int min, unsigned int sec); -unsigned long apus_get_rtc_time(void) +unsigned long m68k_get_rtc_time(void) { unsigned int year, mon, day, hour, min, sec; @@ -30,7 +30,7 @@ unsigned long apus_get_rtc_time(void) return mktime(year, mon, day, hour, min, sec); } -int apus_set_rtc_time(unsigned long nowtime) +int m68k_set_rtc_time(unsigned long nowtime) { if (mach_set_clock_mmss) return mach_set_clock_mmss (nowtime); @@ -89,4 +89,6 @@ void apus_heartbeat (void) dist = period / 4; } #endif + /* should be made smarter */ + ppc_md.heartbeat_count = 1; } -- cgit v1.2.3