zxdiv: move the MMC and IDE drivers into dev/zx
authorAlan Cox <alan@linux.intel.com>
Mon, 26 Nov 2018 12:02:54 +0000 (12:02 +0000)
committerAlan Cox <alan@linux.intel.com>
Mon, 26 Nov 2018 12:02:54 +0000 (12:02 +0000)
We can share a lot of ZX variant stuff so plan accordingly

Kernel/dev/zx/divide.c [moved from Kernel/platform-zxdiv/divide.c with 100% similarity]
Kernel/dev/zx/divmmc.c [moved from Kernel/platform-zxdiv/divmmc.c with 100% similarity]
Kernel/platform-zxdiv/Makefile
Kernel/platform-zxdiv/README

index aab649d..578fe86 100644 (file)
@@ -1,7 +1,9 @@
-CSRCS = devtty.c devices.c main.c bank128.c divide.c divmmc.c devinput.c
+CSRCS = devtty.c devices.c main.c bank128.c devinput.c
 CDSRCS = discard.c
 DSRCS = ../dev/devide.c ../dev/devsd.c ../dev/blkdev.c
 DDSRCS = ../dev/devide_discard.c ../dev/devsd_discard.c ../dev/mbr.c
+DZSRCS = ../dev/zx/divide.c ../dev/zx/divmmc.c
+DDZSRCS =
 ASRCS = crt0.s zx128.s zxvideo.s
 ASRCS += tricks.s commonmem.s loader-divide.s
 
@@ -10,7 +12,9 @@ CDOBJS = $(CDSRCS:.c=.rel)
 AOBJS = $(ASRCS:.s=.rel)
 DOBJS = $(patsubst ../dev/%.c,%.rel, $(DSRCS))
 DDOBJS = $(patsubst ../dev/%.c,%.rel, $(DDSRCS))
-OBJS  = $(COBJS) $(CDOBJS) $(AOBJS) $(DOBJS) $(DDOBJS)
+DZOBJS = $(patsubst ../dev/zx/%.c,%.rel, $(DZSRCS))
+DDZOBJS = $(patsubst ../dev/zx/%.c,%.rel, $(DDZSRCS))
+OBJS  = $(COBJS) $(CDOBJS) $(AOBJS) $(DOBJS) $(DDOBJS) $(DZOBJS) $(DDZOBJS)
 
 CROSS_CCOPTS += -I../dev/
 
@@ -30,6 +34,12 @@ $(DOBJS): %.rel: ../dev/%.c
 $(DDOBJS): %.rel: ../dev/%.c
        $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEGDISC) -c $<
 
+$(DZOBJS): %.rel: ../dev/zx/%.c
+       $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEG3) -c $<
+
+$(DDZOBJS): %.rel: ../dev/zx/%.c
+       $(CROSS_CC) $(CROSS_CCOPTS) $(CROSS_CC_SEGDISC) -c $<
+
 $(AOBJS): %.rel: %.s
        $(CROSS_AS) $(ASOPTS) $<
 
index 97e0164..ae05007 100644 (file)
@@ -72,6 +72,7 @@ To Do:
        Right now we ldir in one case (could be faster abusing stack), and
        the exchange case could be made much much faster using registers
        and stack tricks not bounce buffers
+-      Enable interrupts during swap
 -      Look at what is needed for other suitable interfaces. DIVMMC would
        in particular be good to support but that means another harder
        bootloader hack