hc
2024-05-11 297b60346df8beafee954a0fd7c2d64f33f3b9bc
kernel/arch/m68k/atari/config.c
....@@ -78,7 +78,6 @@
7878
7979 /* atari specific timer functions (in time.c) */
8080 extern void atari_sched_init(irq_handler_t);
81
-extern u32 atari_gettimeoffset(void);
8281 extern int atari_mste_hwclk (int, struct rtc_time *);
8382 extern int atari_tt_hwclk (int, struct rtc_time *);
8483
....@@ -148,7 +147,7 @@
148147 /* Parse the Atari-specific switches= option. */
149148 static int __init atari_switches_setup(char *str)
150149 {
151
- char switches[strlen(str) + 1];
150
+ char switches[COMMAND_LINE_SIZE];
152151 char *p;
153152 int ovsc_shift;
154153 char *args = switches;
....@@ -205,7 +204,6 @@
205204 mach_init_IRQ = atari_init_IRQ;
206205 mach_get_model = atari_get_model;
207206 mach_get_hardware_list = atari_get_hardware_list;
208
- arch_gettimeoffset = atari_gettimeoffset;
209207 mach_reset = atari_reset;
210208 mach_max_dma_address = 0xffffff;
211209 #if IS_ENABLED(CONFIG_INPUT_M68K_BEEP)
....@@ -248,9 +246,9 @@
248246 } else if (hwreg_present(tt_palette)) {
249247 ATARIHW_SET(TT_SHIFTER);
250248 pr_cont(" TT_SHIFTER");
251
- } else if (hwreg_present(&shifter.bas_hi)) {
252
- if (hwreg_present(&shifter.bas_lo) &&
253
- (shifter.bas_lo = 0x0aau, shifter.bas_lo == 0x0aau)) {
249
+ } else if (hwreg_present(&shifter_st.bas_hi)) {
250
+ if (hwreg_present(&shifter_st.bas_lo) &&
251
+ (shifter_st.bas_lo = 0x0aau, shifter_st.bas_lo == 0x0aau)) {
254252 ATARIHW_SET(EXTD_SHIFTER);
255253 pr_cont(" EXTD_SHIFTER");
256254 } else {
....@@ -871,8 +869,28 @@
871869 };
872870 #endif
873871
872
+/*
873
+ * Falcon IDE interface
874
+ */
875
+
876
+#define FALCON_IDE_BASE 0xfff00000
877
+
878
+static const struct resource atari_falconide_rsrc[] __initconst = {
879
+ {
880
+ .flags = IORESOURCE_MEM,
881
+ .start = FALCON_IDE_BASE,
882
+ .end = FALCON_IDE_BASE + 0x39,
883
+ },
884
+ {
885
+ .flags = IORESOURCE_IRQ,
886
+ .start = IRQ_MFP_FSCSI,
887
+ .end = IRQ_MFP_FSCSI,
888
+ },
889
+};
890
+
874891 int __init atari_platform_init(void)
875892 {
893
+ struct platform_device *pdev;
876894 int rv = 0;
877895
878896 if (!MACH_IS_ATARI)
....@@ -914,6 +932,13 @@
914932 atari_scsi_tt_rsrc, ARRAY_SIZE(atari_scsi_tt_rsrc));
915933 #endif
916934
935
+ if (ATARIHW_PRESENT(IDE)) {
936
+ pdev = platform_device_register_simple("atari-falcon-ide", -1,
937
+ atari_falconide_rsrc, ARRAY_SIZE(atari_falconide_rsrc));
938
+ if (IS_ERR(pdev))
939
+ rv = PTR_ERR(pdev);
940
+ }
941
+
917942 return rv;
918943 }
919944