If you need to put your MBR elsewhere, use this. Even with this defined,
block 0 is still checked first and a valid MBR there is used in preference.
+ CONFIG_IDE, IDE_DRIVE_COUNT
+ CONFIG_SD, SD_DRIVE_COUNT
+ CONFIG_FLOPPY
+ CONFIG_P112_FLOPPY
+ CONFIG_COCOSDC (Darren Atkinson's "CoCoSDC" floppy emulator cartridge)
+ The common kernel files don't provide any support for these different block
+ devices. Support for block devices is provided per-platform by the
+ platform-specific Makefile (ie, by pulling in IDE support code from
+ Kernel/dev or from platform-specific source files) and by entries in the
+ device driver switch table and calls in device_init(). Examine devices.c
+ for a few different platforms to get the idea. You might use (eg) CONFIG_SD
+ in your platform code in order to allow a build with and without SD support.
+
+ MAX_BLKDEV is the total number of block devices. Current examples include
+ IDE, FLOPPY, SD, COCOSDC, SCSI, ROM and RAM disks.
+
- Set the basic system parameters
TICKSPERSEC - clock rate
#include "platform_ide.h"
/* IDE Drive Configuration (in config.h)
-
- Define DEVICE_IDE if IDE hardware is present on your platform.
+
+ Define CONFIG_IDE if IDE hardware is present on your platform.
+
+ Define IDE_DRIVE_COUNT to the number of IDE drives your hardware
+ supports (at most 16) - defaults to 2 if undefined.
Define IDE_8BIT_ONLY if the system implements only half of the 16-bit data
bus (eg n8vem-mark4).
Define IDE_REG_INDIRECT if the IDE registers are not directly addressable on
your platform. If you do not define IDE_REG_INDIRECT then IDE registers
should be directly addressable by CPU I/O operations.
-
+
If IDE_REG_INDIRECT is defined you will need to provide devide_readb() and
devide_writeb() to access the IDE registers. You will need to define
suitable values for each register (ide_reg_data, ide_reg_error etc) to be
#ifdef _IDE_PRIVATE
-#ifndef DRIVE_COUNT
-#define DRIVE_COUNT 2 /* at most 16 drives without adjusting DRIVE_NR_MASK */
+#ifndef IDE_DRIVE_COUNT
+#define IDE_DRIVE_COUNT 2 /* at most 16 drives without adjusting DRIVE_NR_MASK */
#endif
/* we use the bits in the driver_data field of blkdev_t as follows: */
devide_reset();
#endif
- for(d=0; d < DRIVE_COUNT; d++)
+ for(d=0; d < IDE_DRIVE_COUNT; d++)
devide_init_drive(d);
}
/* SD Configuration (in config.h)
- Define DEVICE_SD if SD hardware is present on your platform.
+ Define CONFIG_SD if SD hardware is present on your platform.
Define SD_DRIVE_COUNT to the number of SD cards your hardware
supports (at most 16)
/* Block device define */
#define MAX_BLKDEV 4 /* 2 IDE + 2 SDC */
-#define DEVICE_IDE /* enable if IDE interface present */
+#undef CONFIG_COCOSDC /* Darren Atkinson's "CoCoSDC" cartridge */
+#define CONFIG_IDE /* enable if IDE interface present */
void device_init(void)
{
devide_init( );
-#ifdef CONFIG_SDC
+#ifdef CONFIG_COCOSDC
devsdc_init( );
#endif
}
#define MAX_BLKDEV 3 /* 2 IDE drives + 1 SPI */
#define SD_DRIVE_COUNT 1 /* Could be higher with multiple CS used */
-#define DEVICE_IDE /* enable if IDE interface present */
+#define CONFIG_SD /* enable if SD interface present */
+#define CONFIG_IDE /* enable if IDE interface present */
/* Video terminal, not a serial tty */
#define CONFIG_VT
#define NBUFS 10 /* Number of block buffers */
#define NMOUNTS 4 /* Number of mounts at a time */
-#define DEVICE_SD
+#define CONFIG_SD
#define SD_DRIVE_COUNT 1
#define MAX_BLKDEV 1 /* Single SD drive */
#define readb(x) *((volatile uint8_t *)x)
#define writeb(val,x) *((volatile uint8_t *)x) = val
-#ifdef DEVICE_SD
+#ifdef CONFIG_SD
/* slot and subslot containing the sd interface */
#define MAX_BLKDEV 3 /* 2 IDE drives, 1 SD drive */
-#define DEVICE_IDE
+#define CONFIG_IDE
#define IDE_REG_BASE MARK4_IO_BASE
#define IDE_8BIT_ONLY
#define IDE_REG_CS1_FIRST
/* On-board SD on Mark IV */
-#define DEVICE_SD
+#define CONFIG_SD
#define SD_DRIVE_COUNT 1
/* On-board DS1302 on Mark IV, we can read the time of day from it */
#define MAX_BLKDEV 2 /* 2 IDE drives */
-#define DEVICE_IDE /* enable if IDE interface present */
+#define CONFIG_IDE /* enable if IDE interface present */
/* We have a DS1302, we can read the time of day from it */
#define CONFIG_RTC
#ifdef CONFIG_PPP
/* SD card in ParPortProp */
- #define DEVICE_SD
+ #define CONFIG_SD
#define SD_DRIVE_COUNT 1
#define NUM_DEV_TTY 2