Modifications for 0.9.0:
======================================================================
+* Cleanup of 8xx specific #includes, Makefiles, ...
+
+* Fix console on SCC3 for MPC850 systems
+ (Patch by Dr. Bruno Achauer, 31 Mar 2001)
+
* Added support for DOS partitions
* Fix get_bus_freq() for ppc4xx - returned MHz instead of Hz
FADS823 FADS850SAR FADS860T ADS860 \
cogent_mpc8xx \
GENIETV \
- MBX MBX860T \
+ MBX \
RPXlite \
GTH \
"
+# MBX860T disabled for now, file `include/config_MBX860T.h' is missing
+
#########################################################################
## PPC4xx Systems
#########################################################################
## MPC8xx Systems
#########################################################################
+LANTEC_config : unconfig
+ @echo "Configuring for $(@:_config=) Board..." ; \
+ cd include ; \
+ echo "ARCH = ppc" > config.mk ; \
+ echo "BOARD = lantec" >>config.mk ; \
+ echo "CPU = mpc8xx" >>config.mk ; \
+ echo "#include <config_$(@:_config=).h>" >config.h
+
TQM823L_config \
TQM850L_config \
FPS850L_config \
cd include ; \
echo "ARCH = ppc" > config.mk ; \
echo "BOARD = spd8xx" >>config.mk ; \
- echo "CPU = mpc8xx" >>config.mk ; \
- echo "#include <config_$(@:_config=).h>" >config.h
+ echo "CPU = mpc8xx" >>config.mk ; \
+ echo "#include <config_$(@:_config=).h>" >config.h
IVMS8_config: unconfig
@echo "Configuring for $(@:_config=) Board..." ; \
cd include ; \
echo "ARCH = ppc" > config.mk ; \
echo "BOARD = ivms8" >>config.mk ; \
- echo "CPU = mpc8xx" >>config.mk ; \
- echo "#include <config_$(@:_config=).h>" >config.h
+ echo "CPU = mpc8xx" >>config.mk ; \
+ echo "#include <config_$(@:_config=).h>" >config.h
IVML24_config: unconfig
@echo "Configuring for $(@:_config=) Board..." ; \
cd include ; \
echo "ARCH = ppc" > config.mk ; \
echo "BOARD = ivms8" >>config.mk ; \
- echo "CPU = mpc8xx" >>config.mk ; \
- echo "#include <config_$(@:_config=).h>" >config.h
+ echo "CPU = mpc8xx" >>config.mk ; \
+ echo "#include <config_$(@:_config=).h>" >config.h
hermes_config : unconfig
@echo "Configuring for $(@:_config=) Board..." ; \
clean:
rm -f `find . -type f \
- \( -name 'core' -o -name '*.bak' \
+ \( -name 'core' -o -name '*.bak' -o -name '*~' \
-o -name '*.o' -o -name '*.a' \) -print`
rm -f examples/hello_world examples/timer
rm -f tools/img2srec tools/mkimage tools/envcrc tools/gen_eth_addr
rm -f $(OBJS) *.bak tags
rm -fr *.*~
rm -f ppcboot ppcboot.bin ppcboot.elf ppcboot.srec ppcboot.map
+ rm -f tools/crc32.c tools/environment.S
distclean: clobber unconfig
#ifndef CONFIG_I2C_X
blk_num = (offset + i) >> 8;
blk_off = (offset + i) & 0xFF;
- write_addr (CFG_EEPROM_ADDR, blk_num);
+ write_addr (CFG_I2C_EEPROM_ADDR, blk_num);
write_byte (blk_off);
#else
blk_num = (offset + i) >> 16; /* addr selectors */
blk_off = (offset + i) & 0xFFFF;/* 16-bit address in EEPROM */
- write_addr (CFG_EEPROM_ADDR, blk_num);
+ write_addr (CFG_I2C_EEPROM_ADDR, blk_num);
write_byte (blk_off >> 8); /* upper address octet */
write_byte (blk_off & 0xff); /* lower address octet */
#endif /* CONFIG_I2C_X */
send_start ();
- read_addr (CFG_EEPROM_ADDR, blk_num);
+ read_addr (CFG_I2C_EEPROM_ADDR, blk_num);
/* Read data until done or would cross a page boundary.
* We must write the address again when changing pages
blk_num = (offset + i) >> 8;
blk_off = (offset + i) & 0xFF;
- write_addr (CFG_EEPROM_ADDR, blk_num);
+ write_addr (CFG_I2C_EEPROM_ADDR, blk_num);
write_byte (blk_off);
#else
blk_num = (offset + i) >> 16; /* addr selectors */
blk_off = (offset + i) & 0xFFFF;/* 16-bit address in EEPROM */
- write_addr (CFG_EEPROM_ADDR, blk_num);
+ write_addr (CFG_I2C_EEPROM_ADDR, blk_num);
write_byte (blk_off >> 8); /* upper address octet */
write_byte (blk_off & 0xff); /* lower address octet */
#endif /* CONFIG_I2C_X */
/*-----------------------------------------------------------------------
* Test: Enable Ethernet
*/
-#define CFG_PICIO_ADDR 0x57
uchar pic_read (uchar reg)
{
uchar c;
eeprom_init ();
- write_addr (CFG_PICIO_ADDR, 0);
+ write_addr (CFG_I2C_PICIO_ADDR, 0);
write_byte (reg);
send_start ();
- read_addr (CFG_PICIO_ADDR, 0);
+ read_addr (CFG_I2C_PICIO_ADDR, 0);
c = read_byte(1);
send_stop ();
return (c);
}
void pic_write (uchar reg, uchar val)
{
- write_addr (CFG_PICIO_ADDR, 0);
+ write_addr (CFG_I2C_PICIO_ADDR, 0);
write_byte (reg);
write_byte (val);
send_stop ();
}
+/*-----------------------------------------------------------------------
+ * Test:
+ */
+uchar x_i2c_read (uchar addr)
+{
+ uchar c;
+
+ eeprom_init ();
+
+ send_start ();
+ read_addr (addr, 0);
+ c = read_byte(1);
+ send_stop ();
+ return (c);
+}
+
+void x_i2c_write (uchar addr, uchar val)
+{
+ write_addr (addr, 0);
+ write_byte (val);
+ send_stop ();
+}
+
/*-----------------------------------------------------------------------
*/
*
*/
-#include <mpc8xx_irq.h>
#include <ppcboot.h>
#include <config.h>
#include <command.h>
-#include <mpc8xx.h>
#if (CONFIG_COMMANDS & CFG_CMD_EEPROM)
/*
* IDE support
*/
-#include <mpc8xx_irq.h>
#include <ppcboot.h>
#include <config.h>
#include <command.h>
#include <image.h>
#ifdef CONFIG_IDE_PCMCIA
-#include <pcmcia.h>
+# include <pcmcia.h>
+# ifdef CONFIG_8xx
+# include <mpc8xx.h>
+# endif
#endif
#include <ide.h>
#include <ata.h>
#include <cmd_ide.h>
#include <cmd_disk.h>
#include <cmd_pcmcia.h>
-#include <mpc8xx.h>
#ifdef CONFIG_STATUS_LED
-#include <status_led.h>
+# include <status_led.h>
#endif
/* stdlib.h causes some compatibility problems; should fixe these! -- wd */
/*
* PCMCIA support
*/
-#include <mpc8xx_irq.h>
#include <ppcboot.h>
#include <command.h>
#include <config.h>
#include <pcmcia.h>
#include <cmd_pcmcia.h>
+#if defined(CONFIG_IDE_PCCARD) && defined(CONFIG_8xx)
#include <mpc8xx.h>
+#endif
#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA) || \
((CONFIG_COMMANDS & CFG_CMD_IDE) && defined(CONFIG_IDE_PCCARD))
/* ------------------------------------------------------------------------- */
+#undef DEBUG
+
#ifdef DEBUG
#define PCMCIA_DEBUG(fmt,args...) do { printf (fmt ,##args); } while (0)
#else
/* ------------------------------------------------------------------------- */
+#if defined(CONFIG_LWMON)
+# define CFG_PCMCIA_TIMING (PCMCIA_SHT(9) | PCMCIA_SST(3) | PCMCIA_SL(12))
+#else
+# define CFG_PCMCIA_TIMING (PCMCIA_SHT(2) | PCMCIA_SST(4) | PCMCIA_SL(9))
+#endif
+
int pcmcia_on (void)
{
int i;
| PCMCIA_PRS_ATTR
| PCMCIA_SLOT_x
| PCMCIA_PV
- | 0x00024480 ); /* fixed access timing */
+ | CFG_PCMCIA_TIMING );
break;
}
| PCMCIA_PRS_IO
| PCMCIA_SLOT_x
| PCMCIA_PV
- | 0x00024480 ); /* fixed access timing */
+ | CFG_PCMCIA_TIMING );
break;
}
| PCMCIA_PRS_IO
| PCMCIA_SLOT_x
| PCMCIA_PV
- | 0x00024480 ); /* fixed access timing */
+ | CFG_PCMCIA_TIMING );
break;
}
-#endif
+#endif /* CONFIG_IDE_PCCARD */
default: /* set to not valid */
win->or = 0;
break;
}
- PCMCIA_DEBUG ("MemWin %d: Base 0x%08lX\n", i, base);
+ PCMCIA_DEBUG ("MemWin %d: PBR 0x%08lX POR %08lX\n",
+ i, win->br, win->or);
base += CFG_PCMCIA_MEM_SIZE;
++win;
}
int found = 0;
int i;
- PCMCIA_DEBUG ("PCMCIA MEM: %08lX\n", CFG_PCMCIA_MEM_ADDR);
+ PCMCIA_DEBUG ("PCMCIA MEM: %08X\n", CFG_PCMCIA_MEM_ADDR);
start = p = (volatile uchar *) CFG_PCMCIA_MEM_ADDR;
# endif
#endif
-#ifdef CONFIG_TQM8xxL
+#if defined(CONFIG_TQM8xxL)
#define PCMCIA_BOARD_MSG "TQM8xxL"
+
static int hardware_enable(int slot)
{
volatile immap_t *immap;
volatile sysconf8xx_t *sysp;
uint reg, mask;
- PCMCIA_DEBUG ("hardware_enable: TQM8xxL Slot %c\n", 'A'+slot);
+ PCMCIA_DEBUG ("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
+
+ udelay(10000);
immap = (immap_t *)CFG_IMMR;
sysp = (sysconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_siu_conf));
volatile pcmconf8xx_t *pcmp;
u_long reg;
- PCMCIA_DEBUG ("hardware_disable: TQM8xxL Slot %c\n", 'A'+slot);
+ PCMCIA_DEBUG ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
immap = (immap_t *)CFG_IMMR;
pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
PCMCIA_PGCRX(_slot_) = reg;
+ udelay(10000);
+
return (0);
}
#endif /* CFG_CMD_PCMCIA */
volatile pcmconf8xx_t *pcmp;
u_long reg;
- PCMCIA_DEBUG ("voltage_set: TQM8xxL Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
+ PCMCIA_DEBUG ("voltage_set: " \
+ PCMCIA_BOARD_MSG \
+ " Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10);
immap = (immap_t *)CFG_IMMR;
PCMCIA_PGCRX(_slot_) = reg;
udelay(500);
- PCMCIA_DEBUG ("voltage_set: TQM8xxL Slot %c, DONE\n", slot+'A');
+ PCMCIA_DEBUG ("voltage_set: " PCMCIA_BOARD_MSG " Slot %c, DONE\n",
+ slot+'A');
return (0);
}
#endif /* TQM8xxL */
+
+/* ---------------------------------------------------------------------------- */
+/* LWMON Board */
+/* ---------------------------------------------------------------------------- */
+
+#if defined(CONFIG_LWMON)
+
+#define PCMCIA_BOARD_MSG "LWMON"
+
+/* #define's for MAX1604 Power Switch */
+#define MAX1604_OP_SUS 0x80
+#define MAX1604_VCCBON 0x40
+#define MAX1604_VCC_35 0x20
+#define MAX1604_VCCBHIZ 0x10
+#define MAX1604_VPPBON 0x08
+#define MAX1604_VPPBPBPGM 0x04
+#define MAX1604_VPPBHIZ 0x02
+/* reserved 0x01 */
+
+extern void x_i2c_write (uchar, uchar);
+
+static int hardware_enable(int slot)
+{
+ volatile immap_t *immap;
+ volatile cpm8xx_t *cp;
+ volatile pcmconf8xx_t *pcmp;
+ volatile sysconf8xx_t *sysp;
+ uint reg, mask;
+ uchar val;
+
+
+ PCMCIA_DEBUG ("hardware_enable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
+
+ /* Switch on PCMCIA port in PIC register 0x60 */
+ reg = pic_read (0x60);
+ PCMCIA_DEBUG ("[%d] PIC read: reg_60 = 0x%02x\n", __LINE__, reg);
+ reg &= ~0x10;
+ /* reg |= 0x08; Vpp not needed */
+ pic_write (0x60, reg);
+#ifdef DEBUG
+ reg = pic_read (0x60);
+ printf ("[%d] PIC read: reg_60 = 0x%02x\n", __LINE__, reg);
+#endif
+ udelay(10000);
+
+ immap = (immap_t *)CFG_IMMR;
+ sysp = (sysconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_siu_conf));
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
+ cp = (cpm8xx_t *)(&(((immap_t *)CFG_IMMR)->im_cpm));
+
+ /*
+ * Configure SIUMCR to enable PCMCIA port B
+ * (VFLS[0:1] are not used for debugging, we connect FRZ# instead)
+ */
+ sysp->sc_siumcr &= ~SIUMCR_DBGC11; /* set DBGC to 00 */
+
+ /* clear interrupt state, and disable interrupts */
+ pcmp->pcmc_pscr = PCMCIA_MASK(_slot_);
+ pcmp->pcmc_per &= ~PCMCIA_MASK(_slot_);
+
+ /* disable interrupts & DMA */
+ PCMCIA_PGCRX(_slot_) = 0;
+
+ /*
+ * Disable PCMCIA buffers (isolate the interface)
+ * and assert RESET signal
+ */
+ PCMCIA_DEBUG ("Disable PCMCIA buffers and assert RESET\n");
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX(_slot_) = reg;
+ udelay(500);
+
+ /*
+ * Make sure there is a card in the slot, then configure the interface.
+ */
+ udelay(10000);
+ PCMCIA_DEBUG ("[%d] %s: PIPR(%p)=0x%x\n",
+ __LINE__,__FUNCTION__,
+ &(pcmp->pcmc_pipr),pcmp->pcmc_pipr);
+ if (pcmp->pcmc_pipr & 0x00001800) {
+ printf (" No Card found\n");
+ return (1);
+ }
+
+ /*
+ * Power On.
+ */
+ mask = PCMCIA_VS1(slot) | PCMCIA_VS2(slot);
+ reg = pcmp->pcmc_pipr;
+ PCMCIA_DEBUG ("PIPR: 0x%x ==> VS1=o%s, VS2=o%s\n",
+ reg,
+ (reg&PCMCIA_VS1(slot))?"n":"ff",
+ (reg&PCMCIA_VS2(slot))?"n":"ff");
+ if ((reg & mask) == mask) {
+ val = 0; /* VCCB3/5 = 0 ==> use Vx = 5.0 V */
+ puts (" 5.0V card found: ");
+ } else {
+ val = MAX1604_VCC_35; /* VCCB3/5 = 1 ==> use Vy = 3.3 V */
+ puts (" 3.3V card found: ");
+ }
+
+ /* switch VCC on */
+ val |= MAX1604_OP_SUS | MAX1604_VCCBON;
+ x_i2c_write (CFG_I2C_POWER_A_ADDR, val);
+
+ udelay(500000);
+
+ PCMCIA_DEBUG ("Enable PCMCIA buffers and stop RESET\n");
+ reg = PCMCIA_PGCRX(_slot_);
+ reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX(_slot_) = reg;
+
+ udelay(250000); /* some cards need >150 ms to come up :-( */
+
+ PCMCIA_DEBUG ("# hardware_enable done\n");
+
+ return (0);
+}
+
+
+
+#if (CONFIG_COMMANDS & CFG_CMD_PCMCIA)
+static int hardware_disable(int slot)
+{
+ volatile immap_t *immap;
+ volatile pcmconf8xx_t *pcmp;
+ u_long reg;
+
+ PCMCIA_DEBUG ("hardware_disable: " PCMCIA_BOARD_MSG " Slot %c\n", 'A'+slot);
+
+ immap = (immap_t *)CFG_IMMR;
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
+
+ /* remove all power, put output in high impedance state */
+ x_i2c_write (CFG_I2C_POWER_A_ADDR, MAX1604_VCCBHIZ | MAX1604_VPPBHIZ);
+
+ /* Configure PCMCIA General Control Register */
+ PCMCIA_PGCRX(_slot_) = 0;
+
+ PCMCIA_DEBUG ("Disable PCMCIA buffers and assert RESET\n");
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX(_slot_) = reg;
+
+ /* Switch off PCMCIA port in PIC register 0x60 */
+ reg = pic_read (0x60);
+ PCMCIA_DEBUG ("[%d] PIC read: reg_60 = 0x%02x\n", __LINE__, reg);
+ reg |= 0x10;
+ reg &= ~0x08;
+ pic_write (0x60, reg);
+#ifdef DEBUG
+ reg = pic_read (0x60);
+ printf ("[%d] PIC read: reg_60 = 0x%02x\n", __LINE__, reg);
+#endif
+ udelay(10000);
+
+ return (0);
+}
+#endif /* CFG_CMD_PCMCIA */
+
+
+
+static int voltage_set(int slot, int vcc, int vpp)
+{
+ volatile immap_t *immap;
+ volatile pcmconf8xx_t *pcmp;
+ u_long reg;
+ uchar val;
+
+ PCMCIA_DEBUG ("voltage_set: " \
+ PCMCIA_BOARD_MSG \
+ " Slot %c, Vcc=%d.%d, Vpp=%d.%d\n",
+ 'A'+slot, vcc/10, vcc%10, vpp/10, vcc%10);
+
+ immap = (immap_t *)CFG_IMMR;
+ pcmp = (pcmconf8xx_t *)(&(((immap_t *)CFG_IMMR)->im_pcmcia));
+ /*
+ * Disable PCMCIA buffers (isolate the interface)
+ * and assert RESET signal
+ */
+ PCMCIA_DEBUG ("Disable PCMCIA buffers and assert RESET\n");
+ reg = PCMCIA_PGCRX(_slot_);
+ reg |= __MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg |= __MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX(_slot_) = reg;
+ udelay(500);
+
+ /*
+ * Turn off all power (switch to high impedance)
+ */
+ PCMCIA_DEBUG ("PCMCIA power OFF\n");
+ x_i2c_write (CFG_I2C_POWER_A_ADDR, MAX1604_VCCBHIZ | MAX1604_VPPBHIZ);
+
+ val = 0;
+ switch(vcc) {
+ case 0: break;
+ case 33: val = MAX1604_VCC_35; break;
+ case 50: break;
+ default: goto done;
+ }
+
+ /* Checking supported voltages */
+
+ PCMCIA_DEBUG ("PIPR: 0x%x --> %s\n",
+ pcmp->pcmc_pipr,
+ (pcmp->pcmc_pipr & 0x00008000) ? "only 5 V" : "can do 3.3V");
+
+ x_i2c_write (CFG_I2C_POWER_A_ADDR, val);
+ if (val) {
+ PCMCIA_DEBUG ("PCMCIA powered at %sV\n",
+ (val & MAX1604_VCC_35) ? "3.3" : "5.0");
+ } else {
+ PCMCIA_DEBUG ("PCMCIA powered down\n");
+ }
+
+done:
+ PCMCIA_DEBUG ("Enable PCMCIA buffers and stop RESET\n");
+ reg = PCMCIA_PGCRX(_slot_);
+ reg &= ~__MY_PCMCIA_GCRX_CXRESET; /* active high */
+ reg &= ~__MY_PCMCIA_GCRX_CXOE; /* active low */
+ PCMCIA_PGCRX(_slot_) = reg;
+ udelay(500);
+
+ PCMCIA_DEBUG ("voltage_set: " PCMCIA_BOARD_MSG " Slot %c, DONE\n",
+ slot+'A');
+ return (0);
+}
+
+#endif /* LWMON */
+
/* ---------------------------------------------------------------------------- */
/* GTH board by Corelatus AB */
/* ---------------------------------------------------------------------------- */
#include <ppcboot.h>
#include <command.h>
#include <cmd_boot.h>
+#if defined(CONFIG_8xx)
#include <mpc8xx.h>
+#endif
#if defined(CONFIG_8xx) && (CONFIG_COMMANDS & CFG_CMD_REGINFO)
uint
m8260_cpm_dpalloc(uint size, uint align)
{
+ volatile immap_t *immr = (immap_t *)CFG_IMMR;
uint retloc;
uint align_mask, off;
uint savebase;
retloc = idata->dp_alloc_base;
idata->dp_alloc_base += size;
- memset((void *)retloc, 0, size);
+ memset((void *)&immr->im_dprambase[retloc], 0, size);
return(retloc);
}
#if defined(CFG_OR1_REMAP)
memctl->memc_or1 = CFG_OR1_REMAP;
#endif
+#if defined(CFG_OR5_REMAP)
+ memctl->memc_or5 = CFG_OR5_REMAP;
+#endif
/* now restrict to preliminary range */
memctl->memc_br0 = CFG_BR0_PRELIM;
memctl->memc_or1 = CFG_OR1_PRELIM;
memctl->memc_br1 = CFG_BR1_PRELIM;
#endif
+#if (defined(CFG_OR5_PRELIM) && defined(CFG_BR5_PRELIM))
+ memctl->memc_or5 = CFG_OR5_PRELIM;
+ memctl->memc_br5 = CFG_BR5_PRELIM;
+#endif
#if defined(CONFIG_IP860) /* disable CS0 now that Flash is mapped on CS1 */
memctl->memc_br0 = 0;
#include <net.h>
#include <command.h>
-#ifdef CFG_DISCOVER_PHY
-static void mii_discover_phy(void);
-#endif
-
#undef ET_DEBUG
#if (CONFIG_COMMANDS & CFG_CMD_NET) && defined(FEC_ENET)
+#ifdef CFG_DISCOVER_PHY
+static void mii_discover_phy(void);
+#endif
+
/* Ethernet Transmit and Receive Buffers */
#define DBUF_LENGTH 1520
*/
im->im_siu_conf.sc_sdcr = 1;
-#if (SCC_INDEX < 2) || !defined(CONFIG_IP860)
+#if (SCC_INDEX == 2) && defined(CONFIG_MPC850)
/*
- * Standard configuration for SCC's in on Part A
+ * The MPC850 has SCC3 on Port B
+ */
+ cp->cp_pbpar |= 0x06;
+ cp->cp_pbdir &= ~0x06;
+ cp->cp_pbodr &= ~0x06;
+
+#elif (SCC_INDEX < 2) || !defined(CONFIG_IP860)
+ /*
+ * Standard configuration for SCC's is on Part A
*/
ip->iop_papar |= ((3 << (2 * SCC_INDEX)));
ip->iop_padir &= ~((3 << (2 * SCC_INDEX)));
#ifdef CONFIG_MAC_PARTITION
case PART_TYPE_MAC:
if (get_partition_info_mac(dev,part,info) == 0) {
-printf ("## Valid MAC partition found ##\n");
+#ifdef DEBUG
+ printf ("## Valid MAC partition found ##\n");
+#endif
return (0);
}
break;
#ifdef CONFIG_DOS_PARTITION
case PART_TYPE_DOS:
if (get_partition_info_dos(dev,part,info) == 0) {
-printf ("## Valid DOS partition found ##\n");
+#ifdef DEBUG
+ printf ("## Valid DOS partition found ##\n");
+#endif
return (0);
}
break;
switch (part_type[dev]) {
#ifdef CONFIG_MAC_PARTITION
case PART_TYPE_MAC:
-printf ("## Testing for valid MAC partition ##\n");
+#ifdef DEBUG
+ printf ("## Testing for valid MAC partition ##\n");
+#endif
print_part_header ("MAC", dev);
print_part_mac (dev);
return;
#endif
#ifdef CONFIG_DOS_PARTITION
case PART_TYPE_DOS:
-printf ("## Testing for valid DOS partition ##\n");
+#ifdef DEBUG
+ printf ("## Testing for valid DOS partition ##\n");
+#endif
print_part_header ("DOS", dev);
print_part_dos (dev);
return;
/*** TQM823L, TQM850L, ETX094 ***************************************/
-#if defined(CONFIG_TQM823L) || defined(CONFIG_TQM850L) || defined(CONFIG_ETX094)
+#if defined(CONFIG_TQM823L) || \
+ defined(CONFIG_TQM850L) || \
+ defined(CONFIG_ETX094) || \
+ defined(CONFIG_LANTEC)
/* Bits in parallel I/O port registers that have to be set/cleared
* to configure the pins for SCC2 use.
*/
*/
#define SICR_ENET_MASK ((uint)0x0000ff00)
#define SICR_ENET_CLKRT ((uint)0x00002600)
-#endif /* CONFIG_TQM823L, CONFIG_TQM850L, CONFIG_ETX094 */
+#endif /* CONFIG_TQM823L, CONFIG_TQM850L, CONFIG_ETX094, CONFIG_LANTEC */
/*** FPS850L *********************************************************/
#if 1
#define CONFIG_COMMANDS \
(CONFIG_CMD_DFL | CFG_CMD_PCI | CFG_CMD_IRQ | CFG_CMD_IDE)
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
#else
#define CONFIG_COMMANDS \
(CONFIG_CMD_DFL | CFG_CMD_PCI | CFG_CMD_IRQ)
#endif
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_IDE)
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
/* this must be included AFTER the definition of CONFIG_COMMANDS (if any) */
#include <cmd_confdefs.h>
#define CONFIG_STATUS_LED 1 /* Status LED enabled */
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_IDE)
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
#define CONFIG_BOOTP_MASK \
((CONFIG_BOOTP_DEFAULT | CONFIG_BOOTP_BOOTFILESIZE) & ~CONFIG_BOOTP_GATEWAY)
#define CONFIG_STATUS_LED 1 /* Status LED enabled */
#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_IDE)
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
#define CONFIG_BOOTP_MASK \
((CONFIG_BOOTP_DEFAULT | CONFIG_BOOTP_BOOTFILESIZE) & ~CONFIG_BOOTP_GATEWAY)
#define CONFIG_COMMANDS \
((CONFIG_CMD_DFL & ~(CFG_CMD_FLASH)) | CFG_CMD_IDE) /* no Flash, but IDE */
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
#define CONFIG_BOOTP_MASK (CONFIG_BOOTP_DEFAULT | CONFIG_BOOTP_BOOTFILESIZE)
// #define CONFIG_I2C /* I2C support enabled */
-#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_EEPROM /*| CFG_CMD_I2C|CFG_CMD_IDE*/)
+#define CONFIG_COMMANDS (CONFIG_CMD_DFL | CFG_CMD_EEPROM | CFG_CMD_IDE /*|CFG_CMD_I2C*/)
+#define CONFIG_MAC_PARTITION
+#define CONFIG_DOS_PARTITION
#define CONFIG_BOOTP_MASK \
((CONFIG_BOOTP_DEFAULT | CONFIG_BOOTP_BOOTFILESIZE) & ~CONFIG_BOOTP_GATEWAY)
*/
#define CFG_SDRAM_BASE 0x00000000
#define CFG_FLASH_BASE 0x40000000
-#ifdef DEBUG
+#if defined(DEBUG) || (CONFIG_COMMANDS & CFG_CMD_IDE)
#define CFG_MONITOR_LEN (256 << 10) /* Reserve 256 kB for Monitor */
#else
#define CFG_MONITOR_LEN (128 << 10) /* Reserve 128 kB for Monitor */
*/
#define CFG_I2C_CLOCK 33000 /* I²C Clock Rate in kHz */
-#define CFG_EEPROM_ADDR 0x58
+#define CFG_I2C_AUDIO_ADDR 0x28 /* Audio volume control */
+#define CFG_I2C_SYSMON_ADDR 0x2E /* LM87 System Monitor */
+#define CFG_I2C_RTC_ADDR 0x51 /* PCF8563 RTC */
+#define CFG_I2C_POWER_A_ADDR 0x52 /* PCMCIA/USB power switch, channel A */
+#define CFG_I2C_POWER_B_ADDR 0x53 /* PCMCIA/USB power switch, channel B */
+#define CFG_I2C_KEYBD_ADDR 0x56 /* PIC LWE keyboard */
+#define CFG_I2C_PICIO_ADDR 0x57 /* PIC IO Expander */
+#define CFG_I2C_EEPROM_ADDR 0x58 /* EEPROM AT24C164 */
/*-----------------------------------------------------------------------
* Cache Configuration
*/
/* EARB, DBGC and DBPC are initialised by the HCW */
/* => 0x000000C0 */
-#define CFG_SIUMCR (SIUMCR_BSC | SIUMCR_GB5E)
+#define CFG_SIUMCR (SIUMCR_GB5E)
+//#define CFG_SIUMCR (SIUMCR_DBGC00 | SIUMCR_DBPC00 | SIUMCR_MLRC01)
/*-----------------------------------------------------------------------
* TBSCR - Time Base Status and Control 11-26
#define CFG_PCMCIA_IO_SIZE ( 64 << 20 )
/*-----------------------------------------------------------------------
- * IDE/ATA stuff
+ * IDE/ATA stuff (Supports IDE harddisk on PCMCIA Adapter)
*-----------------------------------------------------------------------
*/
# define CONFIG_PCMCIA_SLOT_B
#elif defined(CONFIG_IVMS8) || defined(CONFIG_IVML24) /* The IVM* use SLOT_A */
# define CONFIG_PCMCIA_SLOT_A
+#elif defined(CONFIG_LWMON) /* The LWMON use SLOT_B */
+# define CONFIG_PCMCIA_SLOT_B
#else
# error "PCMCIA Slot not configured"
#endif
# define STATUS_LED_GREEN 1
# define STATUS_LED_BOOT 2 /* IDE LED used for boot status */
+/***** LANTEC *********************************************************/
+#elif defined(CONFIG_LANTEC)
+
+# define STATUS_LED_PAR im_ioport.iop_pdpar
+# define STATUS_LED_DIR im_ioport.iop_pddir
+# undef STATUS_LED_ODR
+# define STATUS_LED_DAT im_ioport.iop_pddat
+
+# define STATUS_LED_BIT 0x1000
+# define STATUS_LED_PERIOD (CFG_HZ / 2)
+# define STATUS_LED_STATE STATUS_LED_BLINKING
+
+# define STATUS_LED_ACTIVE 0 /* LED on for bit == 0 */
+
+# define STATUS_LED_BOOT 0 /* LED 0 used for boot status */
+
/************************************************************************/
#else
# error Status LED configuration missing
{
if (*src && (*src == '"')) {
++src;
+ --size;
}
while ((--size > 0) && *src && (*src != '"')) {
#include <unistd.h>
#include <errno.h>
-#ifdef __BEOS__
+#if defined(__BEOS__) || defined(__NetBSD__)
#include <inttypes.h>
#endif
#include <time.h>
#include <unistd.h>
+#if defined(__BEOS__) || defined(__NetBSD__)
+#include <inttypes.h>
+#endif
+
#include <image.h>
extern int errno;