From f8bd9de913fc004705002f7bd6e840b1c685b188 Mon Sep 17 00:00:00 2001 From: Kars de Jong Date: Tue, 18 Nov 2008 21:22:22 +0100 Subject: m68k/serial: SERIAL_PORT_DFNS only if CONFIG_ISA Only define SERIAL_PORT_DFNS when CONFIG_ISA is defined. Otherwise the first 4 slots in the 8250 driver are unavailable on non-ISA machines. Signed-off-by: Kars de Jong Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/serial.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/serial.h b/arch/m68k/include/asm/serial.h index 2b90d6e6907..7267536adbc 100644 --- a/arch/m68k/include/asm/serial.h +++ b/arch/m68k/include/asm/serial.h @@ -25,9 +25,11 @@ #define STD_COM4_FLAGS ASYNC_BOOT_AUTOCONF #endif +#ifdef CONFIG_ISA #define SERIAL_PORT_DFNS \ /* UART CLK PORT IRQ FLAGS */ \ { 0, BASE_BAUD, 0x3F8, 4, STD_COM_FLAGS }, /* ttyS0 */ \ { 0, BASE_BAUD, 0x2F8, 3, STD_COM_FLAGS }, /* ttyS1 */ \ { 0, BASE_BAUD, 0x3E8, 4, STD_COM_FLAGS }, /* ttyS2 */ \ { 0, BASE_BAUD, 0x2E8, 3, STD_COM4_FLAGS }, /* ttyS3 */ +#endif -- cgit v1.2.3 From 30c0527d15ce4edcde64581e9d062ba9fb08fe16 Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Mon, 24 Oct 2011 01:11:14 +1100 Subject: m68k/mac: cleanup mac_irq_pending mac_irq_pending() has only one caller (mac_esp.c). Nothing tests for Baboon, PSC or OSS pending interrupts. Until that need arises, let's keep it simple and remove all the unused abstraction. Replace it with a routine to check for SCSI DRQ. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/mac_via.h | 2 ++ arch/m68k/include/asm/macintosh.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index a59665e1d41..3622cf89f83 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h @@ -254,6 +254,8 @@ extern volatile __u8 *via1,*via2; extern int rbv_present,via_alt_mapping; +extern int via2_scsi_drq_pending(void); + static inline int rbv_set_video_bpp(int bpp) { char val = (bpp==1)?0:(bpp==2)?1:(bpp==4)?2:(bpp==8)?3:-1; diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index 12ebe43b008..e5bf02d3741 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h @@ -11,7 +11,7 @@ extern void mac_reset(void); extern void mac_poweroff(void); extern void mac_init_IRQ(void); -extern int mac_irq_pending(unsigned int); + extern void mac_irq_enable(struct irq_data *data); extern void mac_irq_disable(struct irq_data *data); -- cgit v1.2.3 From ed04c97d5187c2d606a8fee0ec9ba172942ee508 Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Mon, 24 Oct 2011 01:11:15 +1100 Subject: m68k/mac: cleanup forward declarations Move some forward declarations into header files and adjust includes. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/mac_baboon.h | 6 ++++++ arch/m68k/include/asm/mac_iop.h | 2 ++ arch/m68k/include/asm/mac_oss.h | 4 ++++ arch/m68k/include/asm/mac_psc.h | 4 ++++ arch/m68k/include/asm/mac_via.h | 5 +++++ arch/m68k/include/asm/macintosh.h | 6 ------ 6 files changed, 21 insertions(+), 6 deletions(-) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/mac_baboon.h b/arch/m68k/include/asm/mac_baboon.h index c2a042b8c34..a2d32f6589f 100644 --- a/arch/m68k/include/asm/mac_baboon.h +++ b/arch/m68k/include/asm/mac_baboon.h @@ -29,4 +29,10 @@ struct baboon { */ }; +extern int baboon_present; + +extern void baboon_register_interrupts(void); +extern void baboon_irq_enable(int); +extern void baboon_irq_disable(int); + #endif /* __ASSEMBLY **/ diff --git a/arch/m68k/include/asm/mac_iop.h b/arch/m68k/include/asm/mac_iop.h index a2c7e6fcca3..fde874a01e2 100644 --- a/arch/m68k/include/asm/mac_iop.h +++ b/arch/m68k/include/asm/mac_iop.h @@ -159,4 +159,6 @@ extern void iop_upload_code(uint, __u8 *, uint, __u16); extern void iop_download_code(uint, __u8 *, uint, __u16); extern __u8 *iop_compare_code(uint, __u8 *, uint, __u16); +extern void iop_register_interrupts(void); + #endif /* __ASSEMBLY__ */ diff --git a/arch/m68k/include/asm/mac_oss.h b/arch/m68k/include/asm/mac_oss.h index 3cf2b6ed685..3f04a66f093 100644 --- a/arch/m68k/include/asm/mac_oss.h +++ b/arch/m68k/include/asm/mac_oss.h @@ -91,4 +91,8 @@ struct mac_oss { extern volatile struct mac_oss *oss; extern int oss_present; +extern void oss_register_interrupts(void); +extern void oss_irq_enable(int); +extern void oss_irq_disable(int); + #endif /* __ASSEMBLY__ */ diff --git a/arch/m68k/include/asm/mac_psc.h b/arch/m68k/include/asm/mac_psc.h index 7808bb0b232..e5c0d71d154 100644 --- a/arch/m68k/include/asm/mac_psc.h +++ b/arch/m68k/include/asm/mac_psc.h @@ -211,6 +211,10 @@ extern volatile __u8 *psc; extern int psc_present; +extern void psc_register_interrupts(void); +extern void psc_irq_enable(int); +extern void psc_irq_disable(int); + /* * Access functions */ diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index 3622cf89f83..53e831c4097 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h @@ -254,6 +254,11 @@ extern volatile __u8 *via1,*via2; extern int rbv_present,via_alt_mapping; +extern void via_register_interrupts(void); +extern void via_irq_enable(int); +extern void via_irq_disable(int); +extern void via1_irq(unsigned int irq, struct irq_desc *desc); +extern void via1_set_head(int); extern int via2_scsi_drq_pending(void); static inline int rbv_set_video_bpp(int bpp) diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index e5bf02d3741..b02418c45b8 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h @@ -15,12 +15,6 @@ extern void mac_init_IRQ(void); extern void mac_irq_enable(struct irq_data *data); extern void mac_irq_disable(struct irq_data *data); -/* - * Floppy driver magic hook - probably shouldn't be here - */ - -extern void via1_set_head(int); - /* * Macintosh Table */ -- cgit v1.2.3 From c4af5da7f24ff1bf60db2d6ff3e9d9bd912ca47a Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Mon, 24 Oct 2011 01:11:17 +1100 Subject: m68k/mac: fix nubus slot irq disable and shutdown Improve NuBus slot interrupt handling code and documentation. This patch fixes the NuBus NIC (mac8390) in my Quadra 700. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/mac_via.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/mac_via.h b/arch/m68k/include/asm/mac_via.h index 53e831c4097..aeeedf8b2d2 100644 --- a/arch/m68k/include/asm/mac_via.h +++ b/arch/m68k/include/asm/mac_via.h @@ -257,6 +257,8 @@ extern int rbv_present,via_alt_mapping; extern void via_register_interrupts(void); extern void via_irq_enable(int); extern void via_irq_disable(int); +extern void via_nubus_irq_startup(int irq); +extern void via_nubus_irq_shutdown(int irq); extern void via1_irq(unsigned int irq, struct irq_desc *desc); extern void via1_set_head(int); extern int via2_scsi_drq_pending(void); -- cgit v1.2.3 From da3fb3c9aaa357421ade92910303af82340c2ff5 Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Mon, 24 Oct 2011 01:11:18 +1100 Subject: m68k/mac: oss irq fixes The IOP driver calls into the OSS driver to enable its IRQ. This undesirable coupling between drivers only exists because the OSS driver doesn't correctly handle all of its machspec IRQs. Fix OSS handling of enable/disable for VIA1 IRQs (8 thru 15) which includes MAC_IRQ_ADB. Back when I implemented pmac_zilog support I redefined IRQ_MAC_SCC incorrectly. Change this to a machspec IRQ so that it works on OSS. Clean up the unused OSS audio IRQ and OSS_IRQLEV_* cruft that only confuses things. Fix the OSS description in macints.c and remove an obsolete comment. Don't enable the VIA1 irq before registering the handler. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/mac_oss.h | 19 ------------------- arch/m68k/include/asm/macints.h | 6 +++--- 2 files changed, 3 insertions(+), 22 deletions(-) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/mac_oss.h b/arch/m68k/include/asm/mac_oss.h index 3f04a66f093..425fbff4f4d 100644 --- a/arch/m68k/include/asm/mac_oss.h +++ b/arch/m68k/include/asm/mac_oss.h @@ -58,25 +58,6 @@ #define OSS_POWEROFF 0x80 -/* - * OSS Interrupt levels for various sub-systems - * - * This mapping is laid out with two things in mind: first, we try to keep - * things on their own levels to avoid having to do double-dispatches. Second, - * the levels match as closely as possible the alternate IRQ mapping mode (aka - * "A/UX mode") available on some VIA machines. - */ - -#define OSS_IRQLEV_DISABLED 0 -#define OSS_IRQLEV_IOPISM 1 /* ADB? */ -#define OSS_IRQLEV_SCSI IRQ_AUTO_2 -#define OSS_IRQLEV_NUBUS IRQ_AUTO_3 /* keep this on its own level */ -#define OSS_IRQLEV_IOPSCC IRQ_AUTO_4 /* matches VIA alternate mapping */ -#define OSS_IRQLEV_SOUND IRQ_AUTO_5 /* matches VIA alternate mapping */ -#define OSS_IRQLEV_60HZ 6 /* matches VIA alternate mapping */ -#define OSS_IRQLEV_VIA1 IRQ_AUTO_6 /* matches VIA alternate mapping */ -#define OSS_IRQLEV_PARITY 7 /* matches VIA alternate mapping */ - #ifndef __ASSEMBLY__ struct mac_oss { diff --git a/arch/m68k/include/asm/macints.h b/arch/m68k/include/asm/macints.h index ebe1b70fe90..92aa8a4c2d0 100644 --- a/arch/m68k/include/asm/macints.h +++ b/arch/m68k/include/asm/macints.h @@ -104,6 +104,9 @@ #define IRQ_PSC4_3 (35) #define IRQ_MAC_MACE_DMA IRQ_PSC4_3 +/* OSS Level 4 interrupts */ +#define IRQ_MAC_SCC (33) + /* Level 5 (PSC, AV Macs only) interrupts */ #define IRQ_PSC5_0 (40) #define IRQ_PSC5_1 (41) @@ -131,9 +134,6 @@ #define IRQ_BABOON_2 (66) #define IRQ_BABOON_3 (67) -/* On non-PSC machines, the serial ports share an IRQ */ -#define IRQ_MAC_SCC IRQ_AUTO_4 - #define SLOT2IRQ(x) (x + 47) #define IRQ2SLOT(x) (x - 47) -- cgit v1.2.3 From 608e287b0591789ecd851b05db6f0ba37807fadc Mon Sep 17 00:00:00 2001 From: Finn Thain Date: Mon, 24 Oct 2011 01:11:22 +1100 Subject: m68k/mac: cleanup macro case Code style convention has macro names in uppercase. Change MAC_VIA_IIci to MAC_VIA_IICI. Also remove an obsolete comment. Signed-off-by: Finn Thain Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/macintosh.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/macintosh.h b/arch/m68k/include/asm/macintosh.h index b02418c45b8..682a1a2ff55 100644 --- a/arch/m68k/include/asm/macintosh.h +++ b/arch/m68k/include/asm/macintosh.h @@ -42,7 +42,7 @@ struct mac_model #define MAC_ADB_IOP 6 #define MAC_VIA_II 1 -#define MAC_VIA_IIci 2 +#define MAC_VIA_IICI 2 #define MAC_VIA_QUADRA 3 #define MAC_SCSI_NONE 0 -- cgit v1.2.3 From f808b8650788f78bc1e5e693712e7d7603ab26bc Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Mon, 7 Nov 2011 21:14:43 +0100 Subject: m68k/hp300: Export hp300_ledstate The accidental loss of CONFIG_DIO in commit 0e152d80507b75c00aac60f2ffc586360687cd52 ("m68k: reorganize Kconfig options to improve mmu/non-mmu selections") exposed a missing symbol export in m68k allmodconfig. If CONFIG_HP300=y but CONFIG_HPLANCE (which is bool, and depends on CONFIG_DIO) is not set, and CONFIG_MVME147=y and CONFIG_MVME147_NET=m, 7990.c is compiled as a module, giving: ERROR: "ledstate" [drivers/net/ethernet/amd/7990.ko] undefined! Add the missing export, and rename ledstate to hp300_ledstate while we're at it, as it's a too generic name. Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/blinken.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/blinken.h b/arch/m68k/include/asm/blinken.h index 1a749cf7b06..0626582a7db 100644 --- a/arch/m68k/include/asm/blinken.h +++ b/arch/m68k/include/asm/blinken.h @@ -17,15 +17,15 @@ #define HP300_LEDS 0xf001ffff -extern unsigned char ledstate; +extern unsigned char hp300_ledstate; static __inline__ void blinken_leds(int on, int off) { if (MACH_IS_HP300) { - ledstate |= on; - ledstate &= ~off; - out_8(HP300_LEDS, ~ledstate); + hp300_ledstate |= on; + hp300_ledstate &= ~off; + out_8(HP300_LEDS, ~hp300_ledstate); } } -- cgit v1.2.3 From 125298d2daf7c9005d5bc26313a037b798c8de70 Mon Sep 17 00:00:00 2001 From: Geert Uytterhoeven Date: Sun, 13 Nov 2011 10:44:24 +0100 Subject: m68k/atari: Move declaration of atari_SCC_reset_done to header file Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/atarihw.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/atarihw.h b/arch/m68k/include/asm/atarihw.h index 0392b28656a..c0cb3635077 100644 --- a/arch/m68k/include/asm/atarihw.h +++ b/arch/m68k/include/asm/atarihw.h @@ -30,6 +30,8 @@ extern u_long atari_switches; extern int atari_rtc_year_offset; extern int atari_dont_touch_floppy_select; +extern int atari_SCC_reset_done; + /* convenience macros for testing machine type */ #define MACH_IS_ST ((atari_mch_cookie >> 16) == ATARI_MCH_ST) #define MACH_IS_STE ((atari_mch_cookie >> 16) == ATARI_MCH_STE && \ -- cgit v1.2.3 From 0c51a0c6a3bc974d42d6ea5e15c0a00e1eb87fc2 Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Tue, 1 Nov 2011 21:34:23 +0100 Subject: m68k: Don't comment out syscalls used by glibc Define again the syscalls that are used by glibc so that it is possible to compile a feature-complete glibc with the newest kernel headers. Signed-off-by: Andreas Schwab Signed-off-by: Geert Uytterhoeven --- arch/m68k/include/asm/unistd.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'arch/m68k/include') diff --git a/arch/m68k/include/asm/unistd.h b/arch/m68k/include/asm/unistd.h index 303192fc926..ea0b502f845 100644 --- a/arch/m68k/include/asm/unistd.h +++ b/arch/m68k/include/asm/unistd.h @@ -132,10 +132,10 @@ #define __NR_adjtimex 124 #define __NR_mprotect 125 #define __NR_sigprocmask 126 -/*#define __NR_create_module 127*/ +#define __NR_create_module 127 #define __NR_init_module 128 #define __NR_delete_module 129 -/*#define __NR_get_kernel_syms 130*/ +#define __NR_get_kernel_syms 130 #define __NR_quotactl 131 #define __NR_getpgid 132 #define __NR_fchdir 133 @@ -172,7 +172,7 @@ #define __NR_setresuid 164 #define __NR_getresuid 165 #define __NR_getpagesize 166 -/*#define __NR_query_module 167*/ +#define __NR_query_module 167 #define __NR_poll 168 #define __NR_nfsservctl 169 #define __NR_setresgid 170 @@ -193,8 +193,8 @@ #define __NR_capset 185 #define __NR_sigaltstack 186 #define __NR_sendfile 187 -/*#define __NR_getpmsg 188*/ /* some people actually want streams */ -/*#define __NR_putpmsg 189*/ /* some people actually want streams */ +#define __NR_getpmsg 188 /* some people actually want streams */ +#define __NR_putpmsg 189 /* some people actually want streams */ #define __NR_vfork 190 #define __NR_ugetrlimit 191 #define __NR_mmap2 192 -- cgit v1.2.3