diff options
Diffstat (limited to 'arch/m68k/atari')
-rw-r--r-- | arch/m68k/atari/ataints.c | 9 | ||||
-rw-r--r-- | arch/m68k/atari/atakeyb.c | 4 | ||||
-rw-r--r-- | arch/m68k/atari/atari.h | 15 | ||||
-rw-r--r-- | arch/m68k/atari/atasound.c | 2 | ||||
-rw-r--r-- | arch/m68k/atari/config.c | 27 | ||||
-rw-r--r-- | arch/m68k/atari/nvram.c | 6 | ||||
-rw-r--r-- | arch/m68k/atari/stdma.c | 2 | ||||
-rw-r--r-- | arch/m68k/atari/stram.c | 3 | ||||
-rw-r--r-- | arch/m68k/atari/time.c | 18 |
9 files changed, 39 insertions, 47 deletions
diff --git a/arch/m68k/atari/ataints.c b/arch/m68k/atari/ataints.c index 56f02ea2c248..0465444ceb21 100644 --- a/arch/m68k/atari/ataints.c +++ b/arch/m68k/atari/ataints.c @@ -52,6 +52,7 @@ #include <asm/entry.h> #include <asm/io.h> +#include "atari.h" /* * Atari interrupt handling scheme: @@ -81,8 +82,6 @@ __ALIGN_STR "\n\t" "orw #0x200,%sp@\n\t" /* set saved ipl to 2 */ "rte"); -extern void atari_microwire_cmd(int cmd); - static unsigned int atari_irq_startup(struct irq_data *data) { unsigned int irq = data->irq; @@ -302,11 +301,7 @@ void __init atari_init_IRQ(void) if (ATARIHW_PRESENT(SCU)) { /* init the SCU if present */ - tt_scu.sys_mask = 0x10; /* enable VBL (for the cursor) and - * disable HSYNC interrupts (who - * needs them?) MFP and SCC are - * enabled in VME mask - */ + tt_scu.sys_mask = 0x0; /* disable all interrupts */ tt_scu.vme_mask = 0x60; /* enable MFP and SCC ints */ } else { /* If no SCU and no Hades, the HSYNC interrupt needs to be diff --git a/arch/m68k/atari/atakeyb.c b/arch/m68k/atari/atakeyb.c index 37091898adb3..49a9a459bdf4 100644 --- a/arch/m68k/atari/atakeyb.c +++ b/arch/m68k/atari/atakeyb.c @@ -207,7 +207,7 @@ repeat: self_test_last_rcv = jiffies; break; } - /* FALL THROUGH */ + fallthrough; default: break_flag = scancode & BREAK_MASK; @@ -332,7 +332,7 @@ void ikbd_write(const char *str, int len) } /* Reset (without touching the clock) */ -void ikbd_reset(void) +static void ikbd_reset(void) { static const char cmd[2] = { 0x80, 0x01 }; diff --git a/arch/m68k/atari/atari.h b/arch/m68k/atari/atari.h new file mode 100644 index 000000000000..494a03ddac3d --- /dev/null +++ b/arch/m68k/atari/atari.h @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +struct rtc_time; + +/* ataints.c */ +void atari_init_IRQ(void); + +/* atasound.c */ +void atari_microwire_cmd(int cmd); +void atari_mksound(unsigned int hz, unsigned int ticks); + +/* time.c */ +void atari_sched_init(void); +int atari_mste_hwclk(int op, struct rtc_time *t); +int atari_tt_hwclk(int op, struct rtc_time *t); diff --git a/arch/m68k/atari/atasound.c b/arch/m68k/atari/atasound.c index 1c1181ebb947..c38ef0e6078e 100644 --- a/arch/m68k/atari/atasound.c +++ b/arch/m68k/atari/atasound.c @@ -26,9 +26,9 @@ #include <asm/atarihw.h> #include <asm/irq.h> -#include <asm/pgtable.h> #include <asm/atariints.h> +#include "atari.h" /* * stuff from the old atasound.c diff --git a/arch/m68k/atari/config.c b/arch/m68k/atari/config.c index 7ec3161e8517..b48a0606a000 100644 --- a/arch/m68k/atari/config.c +++ b/arch/m68k/atari/config.c @@ -46,6 +46,9 @@ #include <asm/machdep.h> #include <asm/hwtest.h> #include <asm/io.h> +#include <asm/config.h> + +#include "atari.h" u_long atari_mch_cookie; EXPORT_SYMBOL(atari_mch_cookie); @@ -68,19 +71,10 @@ int atari_rtc_year_offset; static void atari_reset(void); static void atari_get_model(char *model); static void atari_get_hardware_list(struct seq_file *m); - -/* atari specific irq functions */ -extern void atari_init_IRQ (void); -extern void atari_mksound(unsigned int count, unsigned int ticks); #ifdef CONFIG_HEARTBEAT static void atari_heartbeat(int on); #endif -/* atari specific timer functions (in time.c) */ -extern void atari_sched_init(irq_handler_t); -extern int atari_mste_hwclk (int, struct rtc_time *); -extern int atari_tt_hwclk (int, struct rtc_time *); - /* ++roman: This is a more elaborate test for an SCC chip, since the plain * Medusa board generates DTACK at the SCC's standard addresses, but a SCC * board in the Medusa is possible. Also, the addresses where the ST_ESCC @@ -205,7 +199,6 @@ void __init config_atari(void) mach_get_model = atari_get_model; mach_get_hardware_list = atari_get_hardware_list; mach_reset = atari_reset; - mach_max_dma_address = 0xffffff; #if IS_ENABLED(CONFIG_INPUT_M68K_BEEP) mach_beep = atari_mksound; #endif @@ -876,19 +869,11 @@ static const struct resource atari_scsi_tt_rsrc[] __initconst = { #define FALCON_IDE_BASE 0xfff00000 static const struct resource atari_falconide_rsrc[] __initconst = { - { - .flags = IORESOURCE_MEM, - .start = FALCON_IDE_BASE, - .end = FALCON_IDE_BASE + 0x39, - }, - { - .flags = IORESOURCE_IRQ, - .start = IRQ_MFP_FSCSI, - .end = IRQ_MFP_FSCSI, - }, + DEFINE_RES_MEM(FALCON_IDE_BASE, 0x38), + DEFINE_RES_MEM(FALCON_IDE_BASE + 0x38, 2), }; -int __init atari_platform_init(void) +static int __init atari_platform_init(void) { struct platform_device *pdev; int rv = 0; diff --git a/arch/m68k/atari/nvram.c b/arch/m68k/atari/nvram.c index 7000d2443aa3..ededc31375c3 100644 --- a/arch/m68k/atari/nvram.c +++ b/arch/m68k/atari/nvram.c @@ -16,7 +16,9 @@ #include <linux/proc_fs.h> #include <linux/seq_file.h> #include <linux/spinlock.h> +#include <linux/string_choices.h> #include <linux/types.h> + #include <asm/atarihw.h> #include <asm/atariints.h> @@ -198,7 +200,7 @@ static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq, seq_printf(seq, "0x%02x (undefined)\n", nvram[1]); seq_printf(seq, "SCSI arbitration : %s\n", - (nvram[16] & 0x80) ? "on" : "off"); + str_on_off(nvram[16] & 0x80)); seq_puts(seq, "SCSI host ID : "); if (nvram[16] & 0x80) seq_printf(seq, "%d\n", nvram[16] & 7); @@ -236,7 +238,7 @@ static void atari_nvram_proc_read(unsigned char *nvram, struct seq_file *seq, vmode & 16 ? "VGA" : "TV", vmode & 32 ? "PAL" : "NTSC"); seq_printf(seq, " %soverscan, compat. mode %s%s\n", - vmode & 64 ? "" : "no ", vmode & 128 ? "on" : "off", + vmode & 64 ? "" : "no ", str_on_off(vmode & 128), vmode & 256 ? (vmode & 16 ? ", line doubling" : ", half screen") : ""); } diff --git a/arch/m68k/atari/stdma.c b/arch/m68k/atari/stdma.c index ba65f942d0c7..155fefff19b0 100644 --- a/arch/m68k/atari/stdma.c +++ b/arch/m68k/atari/stdma.c @@ -30,7 +30,6 @@ #include <linux/types.h> #include <linux/kdev_t.h> -#include <linux/genhd.h> #include <linux/sched.h> #include <linux/init.h> #include <linux/interrupt.h> @@ -62,6 +61,7 @@ static irqreturn_t stdma_int (int irq, void *dummy); /** * stdma_try_lock - attempt to acquire ST DMA interrupt "lock" * @handler: interrupt handler to use after acquisition + * @data: cookie passed to the interrupt handler function * * Returns !0 if lock was acquired; otherwise 0. */ diff --git a/arch/m68k/atari/stram.c b/arch/m68k/atari/stram.c index 6152f9f631d2..922e53bcb853 100644 --- a/arch/m68k/atari/stram.c +++ b/arch/m68k/atari/stram.c @@ -26,7 +26,6 @@ #include <asm/setup.h> #include <asm/machdep.h> #include <asm/page.h> -#include <asm/pgtable.h> #include <asm/atarihw.h> #include <asm/atari_stram.h> #include <asm/io.h> @@ -116,7 +115,7 @@ void __init atari_stram_reserve_pages(void *start_mem) * This function is called as arch initcall to reserve the pages needed for * ST-RAM management, if the kernel does not reside in ST-RAM. */ -int __init atari_stram_map_pages(void) +static int __init atari_stram_map_pages(void) { if (!kernel_in_stram) { /* diff --git a/arch/m68k/atari/time.c b/arch/m68k/atari/time.c index ce923a523695..3453c6dc6b41 100644 --- a/arch/m68k/atari/time.c +++ b/arch/m68k/atari/time.c @@ -21,6 +21,9 @@ #include <linux/export.h> #include <asm/atariints.h> +#include <asm/machdep.h> + +#include "atari.h" DEFINE_SPINLOCK(rtc_lock); EXPORT_SYMBOL_GPL(rtc_lock); @@ -40,7 +43,6 @@ static u8 last_timer_count; static irqreturn_t mfp_timer_c_handler(int irq, void *dev_id) { - irq_handler_t timer_routine = dev_id; unsigned long flags; local_irq_save(flags); @@ -48,14 +50,15 @@ static irqreturn_t mfp_timer_c_handler(int irq, void *dev_id) last_timer_count = st_mfp.tim_dt_c; } while (last_timer_count == 1); clk_total += INT_TICKS; - timer_routine(0, NULL); + legacy_timer_tick(1); + timer_heartbeat(); local_irq_restore(flags); return IRQ_HANDLED; } void __init -atari_sched_init(irq_handler_t timer_routine) +atari_sched_init(void) { /* set Timer C data Register */ st_mfp.tim_dt_c = INT_TICKS; @@ -63,7 +66,7 @@ atari_sched_init(irq_handler_t timer_routine) st_mfp.tim_ct_cd = (st_mfp.tim_ct_cd & 15) | 0x60; /* install interrupt service routine for MFP Timer C */ if (request_irq(IRQ_MFP_TIMC, mfp_timer_c_handler, IRQF_TIMER, "timer", - timer_routine)) + NULL)) pr_err("Couldn't register timer interrupt\n"); clocksource_register_hz(&atari_clk, INT_CLK); @@ -316,10 +319,3 @@ int atari_tt_hwclk( int op, struct rtc_time *t ) return( 0 ); } - -/* - * Local variables: - * c-indent-level: 4 - * tab-width: 8 - * End: - */ |